Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
# Conflicts: # src/jmap/theme/chengdu_03/planSchedule/menuBar.vue
This commit is contained in:
commit
75f9cf8a70
@ -95,14 +95,6 @@ export function dragSortLessonChapter(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 根据lessonId获取课程名称*/
|
|
||||||
export function getLessonNameByMapIdAndLessonId(model) {
|
|
||||||
return request({
|
|
||||||
url: `/api/lessonDraft/${model.mapId}/${model.lessonId}`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getLessonDrftList(params) {
|
export function getLessonDrftList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/lessonDraft`,
|
url: `/api/lessonDraft`,
|
||||||
|
@ -17,22 +17,6 @@ export function getPublishMapListBySkinCode(skinCode) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 根据皮肤获取地图版本信息*/
|
|
||||||
export function getPublishMapVersion(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/map/skin/${skinCode}/version`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据皮肤获取发布地图详细内容*/
|
|
||||||
export function getPublishMapDetail(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/map/skin/${skinCode}/details`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据地图id获取地图版本信息*/
|
/** 根据地图id获取地图版本信息*/
|
||||||
export function getPublishMapVersionById(id) {
|
export function getPublishMapVersionById(id) {
|
||||||
return request({
|
return request({
|
||||||
@ -49,14 +33,6 @@ export function getPublishMapDetailById(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取发布地图列车列表*/
|
|
||||||
export function getPublishTrainList(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/map/${skinCode}/train`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取发布地图列表*/
|
/** 获取发布地图列表*/
|
||||||
export function listPublishMap(params) {
|
export function listPublishMap(params) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -62,9 +62,9 @@ export function deleteTrainingCategory(data) {
|
|||||||
/**
|
/**
|
||||||
* 获取地图下的产品列表
|
* 获取地图下的产品列表
|
||||||
*/
|
*/
|
||||||
export function getCommodityMapProduct(skinCode) {
|
export function getCommodityMapProduct(mapId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapPrd/${skinCode}/list`,
|
url: `/api/mapPrd/${mapId}/list`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request';
|
|||||||
/** 分页查询皮肤*/
|
/** 分页查询皮肤*/
|
||||||
export function getSkinCodePageList(params) {
|
export function getSkinCodePageList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin`,
|
url: `/api/realLine`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
@ -12,7 +12,7 @@ export function getSkinCodePageList(params) {
|
|||||||
/** 添加皮肤*/
|
/** 添加皮肤*/
|
||||||
export function addSkinCode(data) {
|
export function addSkinCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin`,
|
url: `/api/realLine`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -21,7 +21,7 @@ export function addSkinCode(data) {
|
|||||||
/** 删除皮肤*/
|
/** 删除皮肤*/
|
||||||
export function delSkinCode(id) {
|
export function delSkinCode(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${id}`,
|
url: `/api/realLine/${id}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ export function delSkinCode(id) {
|
|||||||
/** 查询地图皮肤 */
|
/** 查询地图皮肤 */
|
||||||
export function querySkinCode(id) {
|
export function querySkinCode(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${id}`,
|
url: `/api/realLine/${id}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ export function querySkinCode(id) {
|
|||||||
/** 修改地图皮肤*/
|
/** 修改地图皮肤*/
|
||||||
export function updateSkinCode(data) {
|
export function updateSkinCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${data.id}`,
|
url: `/api/realLine/${data.id}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -46,7 +46,7 @@ export function updateSkinCode(data) {
|
|||||||
/** 通过皮肤Code更新地图皮肤*/
|
/** 通过皮肤Code更新地图皮肤*/
|
||||||
export function updateSkinCodeByCode(data) {
|
export function updateSkinCodeByCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${data.code}/update`,
|
url: `/api/realLine/${data.code}/update`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -55,7 +55,7 @@ export function updateSkinCodeByCode(data) {
|
|||||||
/** 查询皮肤是否存在*/
|
/** 查询皮肤是否存在*/
|
||||||
export function querySkinCodeExistByCode(code) {
|
export function querySkinCodeExistByCode(code) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${code}/exist`,
|
url: `/api/realLine/${code}/exist`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ export function querySkinCodeExistByCode(code) {
|
|||||||
/** 获取皮肤列表*/
|
/** 获取皮肤列表*/
|
||||||
export function getSkinCodeList() {
|
export function getSkinCodeList() {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/list`,
|
url: `/api/realLine/list`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -121,15 +121,15 @@ export function getOperateTrainingList(data) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
productType: data.productType,
|
productType: data.productType,
|
||||||
skinCode: data.skinCode
|
mapId: data.mapId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 另存为 操作定义
|
// 另存为 操作定义
|
||||||
export function postOperateSaveAs(skinCode, other) {
|
export function postOperateSaveAs(mapId, other) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/operate/${skinCode}/saveAs/${other}`,
|
url: `/api/operate/${mapId}/saveAs/${other}`,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取运行图列表
|
|
||||||
*/
|
|
||||||
export function getRunPlanList() {
|
|
||||||
return request({
|
|
||||||
url: '/api/runPlan/draft/tree',
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取地图速度等级列表
|
* 获取地图速度等级列表
|
||||||
*/
|
*/
|
||||||
@ -41,16 +31,6 @@ export function getStationList(mapId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过皮肤获取运行图车站列表
|
|
||||||
*/
|
|
||||||
export function getStationListBySkinCode(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/runPlan/draft/station/${skinCode}/bySkin`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建运行图
|
* 创建运行图
|
||||||
*/
|
*/
|
||||||
@ -73,9 +53,9 @@ export function queryRunPlan(planId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 根据skinCode查询发布运行图列表
|
// 根据skinCode查询发布运行图列表
|
||||||
export function queryRunPlanList(skinCode) {
|
export function queryRunPlanList(mapId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/runPlan/template/skin/${skinCode}`,
|
url: `/api/runPlan/template/${mapId}/list`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -411,7 +391,7 @@ export function postSchedulingCommonGenerate(mapId) {
|
|||||||
// 从加载计划创建每日计划
|
// 从加载计划创建每日计划
|
||||||
export function postRunPlanTemplate(data) {
|
export function postRunPlanTemplate(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/runPlan/template/${data.id}/copyAs/${data.skinCode}?name=${data.name}`,
|
url: `/api/runPlan/template/${data.id}/copyAs/${data.mapId}?name=${data.name}`,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -119,5 +119,6 @@ export default {
|
|||||||
review: 'Review',
|
review: 'Review',
|
||||||
explanation: 'Explanation',
|
explanation: 'Explanation',
|
||||||
courseDetails: 'Course details',
|
courseDetails: 'Course details',
|
||||||
courseTree: 'Course tree:'
|
courseTree: 'Course tree:',
|
||||||
|
mapName:'Map Name'
|
||||||
};
|
};
|
||||||
|
@ -118,6 +118,7 @@ export default {
|
|||||||
review: '查看',
|
review: '查看',
|
||||||
explanation: '驳回说明',
|
explanation: '驳回说明',
|
||||||
courseDetails: '课程详情',
|
courseDetails: '课程详情',
|
||||||
courseTree: '课程树:'
|
courseTree: '课程树:',
|
||||||
|
mapName:'地图名称'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,7 +82,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
@ -245,13 +244,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
|
@ -1,12 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou_01 route-create" :title="title" :visible.sync="show" width="580px" label-position="top"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
class="fuzhou_01 route-create"
|
||||||
|
v-dialogDrag
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="580px"
|
||||||
|
label-position="top"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item label="列车:" prop="trainCode">
|
<el-form-item label="列车:" prop="trainCode">
|
||||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||||
<el-option v-for="item in trainList" :key="item.code" :label="item.trainNumber"
|
<el-option
|
||||||
:value="item.code"></el-option>
|
v-for="item in trainList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.trainNumber"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="列车车次:" prop="trainNo">
|
<!-- <el-form-item label="列车车次:" prop="trainNo">
|
||||||
@ -17,8 +31,7 @@
|
|||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="列车方向:" prop="direction">
|
<el-form-item label="列车方向:" prop="direction">
|
||||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
|
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -30,17 +43,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
@ -65,7 +77,7 @@
|
|||||||
trainNo: '',
|
trainNo: '',
|
||||||
direction: '',
|
direction: '',
|
||||||
selected: null
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -87,17 +99,10 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
|
||||||
this.trainList = response.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车列表失败`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -118,12 +123,12 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -137,10 +142,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -151,5 +156,5 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,19 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm route-create" :title="title" :visible.sync="show" width="580px"
|
<el-dialog
|
||||||
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
v-dialogDrag
|
||||||
v-dialogDrag>
|
class="beijing-01__systerm route-create"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="580px"
|
||||||
|
label-position="top"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item label="列车:" prop="trainCode">
|
<el-form-item label="列车:" prop="trainCode">
|
||||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
|
<el-option
|
||||||
:value="item.code"></el-option>
|
v-for="item in trainList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.groupNumber"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="列车方向:" prop="direction">
|
<el-form-item label="列车方向:" prop="direction">
|
||||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
|
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -24,18 +36,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
@ -60,7 +71,7 @@
|
|||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
direction: '',
|
direction: '',
|
||||||
selected: null
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -82,17 +93,10 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
|
||||||
this.trainList = response.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车列表失败`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -114,12 +118,12 @@
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -133,10 +137,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -147,5 +151,5 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -118,9 +118,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -119,10 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import XLSX from 'xlsx';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { importRunPlan } from '@/api/runplan';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -269,7 +266,6 @@ export default {
|
|||||||
},
|
},
|
||||||
hookClick(item, event) {
|
hookClick(item, event) {
|
||||||
this.closeMenu();
|
this.closeMenu();
|
||||||
// launchFullscreen();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (item && typeof item.click == 'function') {
|
if (item && typeof item.click == 'function') {
|
||||||
item.click();
|
item.click();
|
||||||
|
@ -97,7 +97,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
@ -201,13 +200,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
@ -88,13 +87,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
|
||||||
this.trainList = response.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车列表失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="chengdou-03__systerm stand-stop-time"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="480px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<span slot="label">车次窗</span>
|
||||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -21,9 +30,12 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||||
<el-select v-model="addModel.groupNumber" filterable>
|
<el-select v-model="addModel.groupNumber" filterable>
|
||||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
<el-option
|
||||||
:value="train.groupNumber">
|
v-for="train in trainList"
|
||||||
</el-option>
|
:key="train.groupNumber"
|
||||||
|
:label="train.groupNumber"
|
||||||
|
:value="train.groupNumber"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -42,12 +54,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainCreateNumber',
|
name: 'TrainCreateNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -59,17 +70,17 @@
|
|||||||
addModel: {
|
addModel: {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
groupNumber: [
|
groupNumber: [
|
||||||
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -85,33 +96,26 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '新建车组号'
|
return '新建车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -128,11 +132,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.createTrainNo.menu.operation,
|
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -144,17 +148,17 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -163,7 +167,7 @@
|
|||||||
}).catch(error => { this.doClose(); });
|
}).catch(error => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="chengdou-03__systerm stand-stop-time"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="480px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<span slot="label">车次窗</span>
|
||||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -21,9 +30,12 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
<el-option
|
||||||
:value="train.groupNumber">
|
v-for="train in trainList"
|
||||||
</el-option>
|
:key="train.groupNumber"
|
||||||
|
:label="train.groupNumber"
|
||||||
|
:value="train.groupNumber"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -42,12 +54,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainDeleteNumber',
|
name: 'TrainDeleteNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -59,12 +70,12 @@
|
|||||||
addModel: {
|
addModel: {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
},
|
},
|
||||||
|
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -80,33 +91,26 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '删除车组号'
|
return '删除车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -123,10 +127,10 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation,
|
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -139,17 +143,17 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -158,7 +162,7 @@
|
|||||||
}).catch(error => { this.doClose(); });
|
}).catch(error => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -234,7 +234,6 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainDetailInfo',
|
name: 'TrainDetailInfo',
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainEditNumber',
|
name: 'TrainEditNumber',
|
||||||
@ -100,19 +99,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName: '',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
oldGroupNumber: '',
|
oldGroupNumber: '',
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="chengdou-03__systerm stand-stop-time"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="480px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="90px" :model="addModel" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<span slot="label">车次窗</span>
|
||||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -21,9 +30,12 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
<el-option
|
||||||
:value="train.groupNumber">
|
v-for="train in trainList"
|
||||||
</el-option>
|
:key="train.groupNumber"
|
||||||
|
:label="train.groupNumber"
|
||||||
|
:value="train.groupNumber"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -32,13 +44,13 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="purposeStationName">
|
<el-form-item prop="purposeStationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.purposeStationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.purposeStationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="purposeTrainWindowCode" >
|
<el-form-item prop="purposeTrainWindowCode">
|
||||||
<span slot="label">目的车次窗</span>
|
<span slot="label">目的车次窗</span>
|
||||||
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -56,12 +68,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainMoveNumber',
|
name: 'TrainMoveNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -75,11 +86,11 @@
|
|||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
purposeStationName: '',
|
purposeStationName: '',
|
||||||
purposeTrainWindowCode: '',
|
purposeTrainWindowCode: ''
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -95,36 +106,29 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '移动车组号'
|
return '移动车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
console.log('operate',operate,selected);
|
console.log('operate', operate, selected);
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName: '',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
purposeStationName: '',
|
purposeStationName: '',
|
||||||
purposeTrainWindowCode: '',
|
purposeTrainWindowCode: ''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -141,10 +145,10 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.moveTrainNo.menu.operation,
|
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -157,16 +161,16 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -176,7 +180,7 @@
|
|||||||
}).catch(error => { this.doClose(); });
|
}).catch(error => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -119,9 +119,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -119,10 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import XLSX from 'xlsx';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { importRunPlan } from '@/api/runplan';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -269,7 +266,6 @@ export default {
|
|||||||
},
|
},
|
||||||
hookClick(item, event) {
|
hookClick(item, event) {
|
||||||
this.closeMenu();
|
this.closeMenu();
|
||||||
// launchFullscreen();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (item && typeof item.click == 'function') {
|
if (item && typeof item.click == 'function') {
|
||||||
item.click();
|
item.click();
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -118,9 +118,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -119,10 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import XLSX from 'xlsx';
|
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { importRunPlan } from '@/api/runplan';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -269,7 +266,6 @@ export default {
|
|||||||
},
|
},
|
||||||
hookClick(item, event) {
|
hookClick(item, event) {
|
||||||
this.closeMenu();
|
this.closeMenu();
|
||||||
// launchFullscreen();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (item && typeof item.click == 'function') {
|
if (item && typeof item.click == 'function') {
|
||||||
item.click();
|
item.click();
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||||
@ -273,15 +272,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {},
|
||||||
if (map.skinCode) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(this.$t('error.obtainTrainGroupNumberFailed'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
// import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -131,7 +131,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuTrain.moveTrainId');
|
return this.$t('menu.menuTrain.switchTrainId');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -118,9 +118,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -26,7 +26,6 @@ import MapProduct from '@/views/system/product/index';
|
|||||||
// import Mapdraft from '@/views/map/mapdraft/index';
|
// import Mapdraft from '@/views/map/mapdraft/index';
|
||||||
import Mapedit from '@/views/map/mapdraft/index';
|
import Mapedit from '@/views/map/mapdraft/index';
|
||||||
// import Runplan from '@/views/map/runplan/index';
|
// import Runplan from '@/views/map/runplan/index';
|
||||||
import RunplanView from '@/views/map/runplan/chart';
|
|
||||||
|
|
||||||
import Trainingrecord from '@/views/lesson/trainingrecord/index';
|
import Trainingrecord from '@/views/lesson/trainingrecord/index';
|
||||||
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
|
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
|
||||||
@ -42,7 +41,6 @@ import ScriptmanageHome from '@/views/scriptManage/home';
|
|||||||
import ScriptDisplay from '@/views/scriptManage/display/index';
|
import ScriptDisplay from '@/views/scriptManage/display/index';
|
||||||
|
|
||||||
import TeachDetail from '@/views/teach/detail/index';
|
import TeachDetail from '@/views/teach/detail/index';
|
||||||
import TeachPractical from '@/views/teach/practical/index';
|
|
||||||
import TeachHome from '@/views/teach/index';
|
import TeachHome from '@/views/teach/index';
|
||||||
import Pay from '@/views/components/pay/index';
|
import Pay from '@/views/components/pay/index';
|
||||||
import ExamDetail from '@/views/exam/detail/examDetail';
|
import ExamDetail from '@/views/exam/detail/examDetail';
|
||||||
@ -84,6 +82,7 @@ import RunPlanTemplate from '@/views/publish/runPlanTemplate/index';
|
|||||||
import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
|
import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
|
||||||
import ProductStatus from '@/views/publish/productStatus/index';
|
import ProductStatus from '@/views/publish/productStatus/index';
|
||||||
import PublishLesson from '@/views/publish/publishLesson/index';
|
import PublishLesson from '@/views/publish/publishLesson/index';
|
||||||
|
import RunplanView from '@/views/publish/runPlanView/index';
|
||||||
|
|
||||||
import IbpEdit from '@/views/ibp/ibpDraft/ibpEdit/index';
|
import IbpEdit from '@/views/ibp/ibpDraft/ibpEdit/index';
|
||||||
import TrainingPlatform from '@/views/trainingPlatform/index';
|
import TrainingPlatform from '@/views/trainingPlatform/index';
|
||||||
@ -603,11 +602,6 @@ export const asyncRouter = [
|
|||||||
component: ExamDetail,
|
component: ExamDetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'practical/:trainingId/:lessonId',
|
|
||||||
component: TeachPractical,
|
|
||||||
hidden: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'pay/:lessonId',
|
path: 'pay/:lessonId',
|
||||||
component: Pay,
|
component: Pay,
|
||||||
|
@ -3,9 +3,9 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
|
@ -1,40 +1,10 @@
|
|||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { getPublishMapVersion, getPublishMapDetail, getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map';
|
import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map';
|
||||||
|
|
||||||
// 获取地图版本数据,和store里面的map版本做比较,如果不同
|
// 获取地图版本数据,和store里面的map版本做比较,如果不同
|
||||||
// 获取发布的地图数据
|
// 获取发布的地图数据
|
||||||
// 先设置地图数据
|
// 先设置地图数据
|
||||||
// 清除列车数据
|
// 清除列车数据
|
||||||
export function loadMapData(skinCode) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
getPublishMapVersion(skinCode).then(resp => {
|
|
||||||
var version = resp.data;
|
|
||||||
var mapData = store.state.map.mapList[`mapDate_${skinCode}`];
|
|
||||||
if (mapData && mapData.version == version) {
|
|
||||||
store.dispatch('map/setMapData', mapData).then(() => {
|
|
||||||
store.dispatch('map/clearJlmapTrainView').then(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
getPublishMapDetail(skinCode).then(res => {
|
|
||||||
mapData = res.data;
|
|
||||||
store.dispatch('map/setMapDataList', mapData);
|
|
||||||
store.dispatch('map/setMapData', mapData).then(() => {
|
|
||||||
store.dispatch('map/clearJlmapTrainView').then(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}).catch(error => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function loadMapDataById(mapId) {
|
export function loadMapDataById(mapId) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getPublishMapVersionById(mapId).then(resp => {
|
getPublishMapVersionById(mapId).then(resp => {
|
||||||
|
@ -1,27 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<run-plan-operate ref='applyPassed' @reloadTable="reloadTable" @create="handleConfirmPass" :title="$t('approval.passedRunPlan')" type="applyPassed">
|
<run-plan-operate ref="applyPassed" :title="$t('approval.passedRunPlan')" @reloadTable="reloadTable" type="applyPassed" @create="handleConfirmPass" />
|
||||||
</run-plan-operate>
|
<run-plan-operate ref="applyReject" :title="$t('approval.rejectRunPlan')" @reloadTable="reloadTable" type="applyReject" @create="handleConfirmReject" />
|
||||||
<run-plan-operate ref='applyReject' @reloadTable="reloadTable" @create="handleConfirmReject" :title="$t('approval.rejectRunPlan')" type="applyReject">
|
|
||||||
</run-plan-operate>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import RunPlanOperate from './operate';
|
import RunPlanOperate from './operate';
|
||||||
import { reviewRunPlanList,publishRunPlan,rejectRunPlan,previewRunPlan } from '@/api/designPlatform';
|
import { reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan } from '@/api/designPlatform';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
// import { getSkinCodeList } from '@/api/management/mapskin';
|
// import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
export default {
|
export default {
|
||||||
name: 'ScriptApproval',
|
name: 'ScriptApproval',
|
||||||
components: {
|
components: {
|
||||||
RunPlanOperate
|
RunPlanOperate
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return{
|
return {
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
@ -64,7 +62,7 @@
|
|||||||
prop: 'mapId ',
|
prop: 'mapId ',
|
||||||
width:250,
|
width:250,
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {return this.$convertField(row.mapId , this.mapList, ['value', 'label']); },
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -75,7 +73,7 @@
|
|||||||
title: this.$t('approval.applyTime'),
|
title: this.$t('approval.applyTime'),
|
||||||
prop: 'uploadTime',
|
prop: 'uploadTime',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return row.uploadTime.replace("T"," ")},
|
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -102,18 +100,18 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
|
||||||
created(){
|
|
||||||
},
|
|
||||||
mounted(){
|
|
||||||
this.loadInitData();
|
|
||||||
},
|
|
||||||
beforeDestroy(){
|
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.loadInitData();
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
@ -129,8 +127,8 @@
|
|||||||
// 获取地图
|
// 获取地图
|
||||||
this.mapList = [];
|
this.mapList = [];
|
||||||
const res = await listPublishMap();
|
const res = await listPublishMap();
|
||||||
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name } });
|
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||||
this.queryForm.queryObject.mapId.config.data=this.mapList;
|
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
}
|
}
|
||||||
@ -138,44 +136,43 @@
|
|||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
return reviewRunPlanList(params);
|
return reviewRunPlanList(params);
|
||||||
},
|
},
|
||||||
applyPassed(index,row){
|
applyPassed(index, row) {
|
||||||
this.$refs.applyPassed.doShow(row);
|
this.$refs.applyPassed.doShow(row);
|
||||||
},
|
},
|
||||||
applyReject(index,row){
|
applyReject(index, row) {
|
||||||
this.$refs.applyReject.doShow(row);
|
this.$refs.applyReject.doShow(row);
|
||||||
},
|
},
|
||||||
runPlanPreview(index,row){
|
runPlanPreview(index, row) {
|
||||||
previewRunPlan(row.id).then(resp => {
|
previewRunPlan(row.id).then(resp => {
|
||||||
const query = {
|
const query = {
|
||||||
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id,from:''
|
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
|
||||||
};
|
};
|
||||||
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(this.$t('tip.createSimulationFaild')+this.$t('global.colon')+error.message);
|
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleConfirmPass(data){
|
handleConfirmPass(data) {
|
||||||
publishRunPlan(data.id,data).then(resp => {
|
publishRunPlan(data.id, data).then(resp => {
|
||||||
if(resp.data.length<=0){
|
if (resp.data.length <= 0) {
|
||||||
this.$message.success(this.$t('approval.passedRunPlanSuccess'));
|
this.$message.success(this.$t('approval.passedRunPlanSuccess'));
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`);
|
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`);
|
||||||
}
|
}
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`);
|
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleConfirmReject(data){
|
handleConfirmReject(data) {
|
||||||
rejectRunPlan(data.id,data).then(resp => {
|
rejectRunPlan(data.id, data).then(resp => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$message.success(this.$t('approval.rejectRunPlanSuccess'));
|
this.$message.success(this.$t('approval.rejectRunPlanSuccess'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`);
|
this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`);
|
||||||
})
|
});
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -49,15 +49,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
// 获取城市列表
|
// 获取城市列表
|
||||||
this.filterOptions=[];
|
this.filterOptions = [];
|
||||||
|
|
||||||
let resp = this.$route.fullPath.includes('design/userlist')?await this.$Dictionary.cityType():await publisMapCityList('city_type');
|
let resp = this.$route.fullPath.includes('design/userlist') ? await this.$Dictionary.cityType() : await publisMapCityList('city_type');
|
||||||
resp=this.$route.fullPath.includes('design/userlist')?resp:resp.data;
|
resp = this.$route.fullPath.includes('design/userlist') ? resp : resp.data;
|
||||||
const cityList = resp.sort((a, b) => {
|
const cityList = resp.sort((a, b) => {
|
||||||
return a.code.localeCompare(b.code);
|
return a.code.localeCompare(b.code);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.filterOptions=cityList;
|
this.filterOptions = cityList;
|
||||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
||||||
|
|
||||||
this.$emit('filterSelectChange', this.filterSelect);
|
this.$emit('filterSelectChange', this.filterSelect);
|
||||||
|
@ -63,5 +63,6 @@ export default {
|
|||||||
.system-time-box {
|
.system-time-box {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
background: #000;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<span
|
<span
|
||||||
class="el-icon-tickets"
|
class="el-icon-tickets"
|
||||||
:style="{color: data.valid ? 'green':''}"
|
:style="{color: data.valid ? 'green':''}"
|
||||||
></span>
|
/>
|
||||||
<span :style="{color: data.valid ? 'green':''}"> {{ tnode.label }}</span>
|
<span :style="{color: data.valid ? 'green':''}"> {{ tnode.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
@ -79,10 +79,9 @@ import { getProductDetail } from '@/api/management/mapprd';
|
|||||||
import { runDiagramQuit, getSimulationInfo } from '@/api/simulation';
|
import { runDiagramQuit, getSimulationInfo } from '@/api/simulation';
|
||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
// import { UrlConfig } from '@/router/index';
|
|
||||||
import {loadDraftScript} from '@/api/designPlatform';
|
import {loadDraftScript} from '@/api/designPlatform';
|
||||||
|
|
||||||
// 三维
|
// 三维
|
||||||
@ -401,7 +400,7 @@ export default {
|
|||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
const data = rest.data;
|
const data = rest.data;
|
||||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||||
await this.loadMapData(detail.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(`获取实训步骤数据失败`);
|
this.$messageBox(`获取实训步骤数据失败`);
|
||||||
@ -417,9 +416,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -430,9 +428,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -443,9 +440,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -468,9 +464,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -535,16 +530,6 @@ export default {
|
|||||||
async quitQuest() {
|
async quitQuest() {
|
||||||
this.questId = 0;
|
this.questId = 0;
|
||||||
},
|
},
|
||||||
// 加载地图数据
|
|
||||||
async loadMapData(skinCode) {
|
|
||||||
try {
|
|
||||||
await loadMapData(skinCode);
|
|
||||||
await this.$store.dispatch('training/setMapDefaultState');
|
|
||||||
} catch (error) {
|
|
||||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 通过id加载地图数据
|
// 通过id加载地图数据
|
||||||
async loadMapDataById(mapId) {
|
async loadMapDataById(mapId) {
|
||||||
|
@ -79,7 +79,7 @@ import { getProductDetail } from '@/api/management/mapprd';
|
|||||||
import { runDiagramQuit, loadScript, getSimulationInfo } from '@/api/simulation';
|
import { runDiagramQuit, loadScript, getSimulationInfo } from '@/api/simulation';
|
||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
@ -237,7 +237,6 @@ export default {
|
|||||||
$route() {
|
$route() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initLoadData();
|
this.initLoadData();
|
||||||
console.log(1111);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -394,7 +393,7 @@ export default {
|
|||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
const data = rest.data;
|
const data = rest.data;
|
||||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||||
await this.loadMapData(detail.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(`获取实训步骤数据失败`);
|
this.$messageBox(`获取实训步骤数据失败`);
|
||||||
@ -410,9 +409,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -423,8 +421,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
@ -435,10 +433,8 @@ export default {
|
|||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
if (parseInt(this.mapId)) {
|
||||||
if (parseInt(this.skinCode)) {
|
await this.loadMapDataById(this.mapId);
|
||||||
await this.loadMapData(this.skinCode);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -461,9 +457,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -474,7 +469,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async runAddRolesLoadShow() {
|
async runAddRolesLoadShow() {
|
||||||
// this.$refs.addQuest.doShow();
|
// this.$refs.addQuest.doShow();
|
||||||
const row={id: this.$route.query.scriptId};
|
const row = {id: this.$route.query.scriptId};
|
||||||
this.$refs.addQuest.handleLoad(1, row);
|
this.$refs.addQuest.handleLoad(1, row);
|
||||||
},
|
},
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
@ -485,7 +480,7 @@ export default {
|
|||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.questId = parseInt(row.id);
|
this.questId = parseInt(row.id);
|
||||||
if (mapLocation) {
|
if (mapLocation) {
|
||||||
const newMapLocation={'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||||
}
|
}
|
||||||
// if (res.data && res.data.mapLocation) {
|
// if (res.data && res.data.mapLocation) {
|
||||||
@ -509,17 +504,6 @@ export default {
|
|||||||
async quitQuest() {
|
async quitQuest() {
|
||||||
this.questId = 0;
|
this.questId = 0;
|
||||||
},
|
},
|
||||||
// 加载地图数据
|
|
||||||
async loadMapData(skinCode) {
|
|
||||||
try {
|
|
||||||
await loadMapData(skinCode);
|
|
||||||
await this.$store.dispatch('training/setMapDefaultState');
|
|
||||||
} catch (error) {
|
|
||||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 通过id加载地图数据
|
// 通过id加载地图数据
|
||||||
async loadMapDataById(mapId) {
|
async loadMapDataById(mapId) {
|
||||||
try {
|
try {
|
||||||
|
@ -125,7 +125,7 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$emit('quit');
|
this.$emit('quit');
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${this.$route.query.examId}`, query: { subSystem: this.$route.query.subSystem }});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${this.$route.query.examId}`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId }});
|
||||||
Notification.closeAll();
|
Notification.closeAll();
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
@ -6,23 +6,23 @@
|
|||||||
|
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<!-- viewRunQuest -->
|
<!-- viewRunQuest -->
|
||||||
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{$t('display.schema.selectRoles')}}</el-button>
|
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||||
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{$t('display.schema.loadScript')}}</el-button>
|
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{$t('display.schema.previewRunDiagram')}}</el-button>
|
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||||
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{$t('display.schema.loadRunDiagram')}}</el-button>
|
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{$t('display.schema.faultSetting')}}</el-button>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
<el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
<el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{$t('display.schema.normalOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{$t('display.schema.faultOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { getStationListBySkinCode, queryRunPlan } from '@/api/runplan';
|
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||||
import {getRpDetailByUserMapId} from '@/api/designPlatform';
|
import {getRpDetailByUserMapId} from '@/api/designPlatform';
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ export default {
|
|||||||
isDemon() {
|
isDemon() {
|
||||||
return this.$route.params.mode === 'demon';
|
return this.$route.params.mode === 'demon';
|
||||||
},
|
},
|
||||||
isDesignPlatform(){
|
isDesignPlatform() {
|
||||||
return this.$route.fullPath.includes('design/display/demon');
|
return this.$route.fullPath.includes('design/display/demon');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -86,18 +86,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
console.log(this.$route.query, '=====');
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData(this.$route.query);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData(opt) {
|
loadRunData(opt) {
|
||||||
this.$store.dispatch('runPlan/clear').then(() => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
if (opt && opt.skinCode) {
|
if (opt && opt.mapId) {
|
||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
getStationList(opt.mapId).then(response => {
|
||||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
if (this.$route.params.mode == 'plan') {
|
if (this.$route.params.mode == 'plan') {
|
||||||
// debugger;
|
// debugger;
|
||||||
if(this.$route.query.from=="user"){
|
if (this.$route.query.from == 'user') {
|
||||||
// 测试运行图功能
|
// 测试运行图功能
|
||||||
getRpDetailByUserMapId(this.$route.query.planId).then(resp => {
|
getRpDetailByUserMapId(this.$route.query.planId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
@ -106,7 +107,7 @@ export default {
|
|||||||
this.$store.dispatch('runPlan/setPlanData', []);
|
this.$store.dispatch('runPlan/setPlanData', []);
|
||||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
// 测试运行图功能
|
// 测试运行图功能
|
||||||
queryRunPlan(this.$route.query.planId).then(resp => {
|
queryRunPlan(this.$route.query.planId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
@ -117,7 +118,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
getEveryDayRunPlanData(this.group).then(resp => {
|
getEveryDayRunPlanData(this.group).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
@ -156,7 +156,7 @@ export default {
|
|||||||
viewRunQuest() {
|
viewRunQuest() {
|
||||||
this.$emit('runQuestLoadShow');
|
this.$emit('runQuestLoadShow');
|
||||||
},
|
},
|
||||||
viewScriptRoles(){
|
viewScriptRoles() {
|
||||||
this.$emit('runAddRolesLoadShow');
|
this.$emit('runAddRolesLoadShow');
|
||||||
},
|
},
|
||||||
switchMode(swch) {
|
switchMode(swch) {
|
||||||
|
@ -158,7 +158,7 @@ export default {
|
|||||||
updateTime: res.data.updateTime
|
updateTime: res.data.updateTime
|
||||||
};
|
};
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.error(this.$t('display.exam.getTestInformation')+':' + error.message);
|
this.$message.error(this.$t('display.exam.getTestInformation') + ':' + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +235,8 @@ export default {
|
|||||||
trainingId: obj.trainingId,
|
trainingId: obj.trainingId,
|
||||||
examQuestionId: obj.id,
|
examQuestionId: obj.id,
|
||||||
subSystem: this.$route.query.subSystem,
|
subSystem: this.$route.query.subSystem,
|
||||||
examId: this.$route.query.examId
|
examId: this.$route.query.examId,
|
||||||
|
mapId: this.$route.query.mapId
|
||||||
};
|
};
|
||||||
this.$router.push({ path: '/display/exam', query: query });
|
this.$router.push({ path: '/display/exam', query: query });
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
|
@ -128,7 +128,7 @@ export default {
|
|||||||
treeList: resp.data.examDefinitionList
|
treeList: resp.data.examDefinitionList
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length >0) {
|
if (this.courseModel.pmsList && this.courseModel.pmsList.length > 0) {
|
||||||
this.valid = true;
|
this.valid = true;
|
||||||
}
|
}
|
||||||
this.getExpandList(this.courseModel.id);
|
this.getExpandList(this.courseModel.id);
|
||||||
@ -166,7 +166,7 @@ export default {
|
|||||||
},
|
},
|
||||||
clickEvent(obj, node, data) {
|
clickEvent(obj, node, data) {
|
||||||
if (this.valid || obj.trial) {
|
if (this.valid || obj.trial) {
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem }});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: this.courseModel.mapId }});
|
||||||
} else {
|
} else {
|
||||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
@ -182,24 +182,24 @@ export default {
|
|||||||
},
|
},
|
||||||
nodeExpand(obj, node, ele) {
|
nodeExpand(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
this.expandList.push(key);
|
this.expandList.push(key);
|
||||||
setSessionStorage('trainingExamExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
nodeCollapse(obj, node, ele) {
|
nodeCollapse(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
setSessionStorage('trainingExamExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
getExpandList(id) {
|
getExpandList(id) {
|
||||||
let expand = getSessionStorage('trainingExamExpandList'+id);
|
let expand = getSessionStorage('trainingExamExpandList' + id);
|
||||||
expand = expand?(expand+'').split(','):'';
|
expand = expand ? (expand + '').split(',') : '';
|
||||||
if (expand instanceof Array) {
|
if (expand instanceof Array) {
|
||||||
this.expandList = expand;
|
this.expandList = expand;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
backLessonList() {
|
backLessonList() {
|
||||||
localStore.remove('examDetail'+this.$route.params.subSystem);
|
localStore.remove('examDetail' + this.$route.params.subSystem);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,13 +202,14 @@ export default {
|
|||||||
userExamId: this.userExam.id,
|
userExamId: this.userExam.id,
|
||||||
examQuestionId: this.examList[0].id,
|
examQuestionId: this.examList[0].id,
|
||||||
subSystem: this.$route.query.subSystem,
|
subSystem: this.$route.query.subSystem,
|
||||||
examId: this.$route.params.examId
|
examId: this.$route.params.examId,
|
||||||
|
mapId: this.$route.query.mapId
|
||||||
};
|
};
|
||||||
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox( this.$t('error.createSimulationFailed') +`: ${error.message}`);
|
this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div :id="id" style="background: #000;" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Jlmap from '@/jmap/map';
|
|
||||||
import deviceType from '@/jmap/constant/deviceType';
|
|
||||||
import { getPublishMapDetail } from '@/api/test.js';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Jlmap',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
id: '__jmap__',
|
|
||||||
jmap: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.app.windowSizeCount': function() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.jmap.resize({width: this.$store.state.app.width, height: this.$store.state.app.height});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
document.getElementById(this.id).oncontextmenu = function (e) {
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.jmap = new Jlmap({
|
|
||||||
dom: document.getElementById(this.id),
|
|
||||||
config: {
|
|
||||||
renderer: 'canvas',
|
|
||||||
width: document.documentElement.clientWidth,
|
|
||||||
height: document.documentElement.clientHeight
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
scaleRate: 1,
|
|
||||||
offsetX: 0,
|
|
||||||
offsetY: 0
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
dataLoaded() { console.log('dataLoaded'); },
|
|
||||||
viewLoaded() { console.log('viewLoaded'); },
|
|
||||||
stateLoaded() { console.log('stateLoaded'); },
|
|
||||||
viewUpdate() { console.log('viewUpdate'); },
|
|
||||||
stateUpdate() { console.log('stateUpdate'); }
|
|
||||||
// optionsUpdate() { console.log('optionsUpdate'); }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.jmap.on('selected', this.selected);
|
|
||||||
this.jmap.on('contextmenu', this.contextmenu);
|
|
||||||
|
|
||||||
// const list = [];
|
|
||||||
// for (let i = 1; i < 20; i++) {
|
|
||||||
// for (let j = 1; j < 500; j++) {
|
|
||||||
// list.push({ code: `${(Array(3).join(0) + i).slice(-3)}${(Array(3).join(0) + j).slice(-3)}`, lp: { x: 50 + i * 120, y: 50 + j * 20 }, rp: { x: 150 + i * 120, y: 50 + j * 20 } });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.jmap.load({ skinVO: { code: '02' }, linkList: list });
|
|
||||||
|
|
||||||
getPublishMapDetail('02').then(resp => {
|
|
||||||
this.jmap.setLevelVisible([deviceType.Link], false);
|
|
||||||
this.jmap.setMap(resp.data);
|
|
||||||
// this.jmap.setDefaultState();
|
|
||||||
});
|
|
||||||
|
|
||||||
// this.jmap.render([
|
|
||||||
// {code: '11', type: 'Link', lp: { x: 20 , y: 100}, rp: { x: 120, y: 100 }}
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// this.jmap.update([
|
|
||||||
// { code: '11', type: 'Link', status: '02' }
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// this.jmap.render([
|
|
||||||
// { code: '11', type: 'Link', lp: { x: 0, y: 0 }, rp: { x: 200, y: 200 } }
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// this.jmap.update([]);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
this.jmap.off('selected', this.selected);
|
|
||||||
this.jmap.off('contextmenu', this.contextmenu);
|
|
||||||
this.jmap.dispose();
|
|
||||||
this.jmap = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
selected(e) {
|
|
||||||
// console.log('selected', e, this.jmap);
|
|
||||||
},
|
|
||||||
contextmenu(e) {
|
|
||||||
// console.log('contextmenu', e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -37,7 +37,7 @@ import IbpPlate from '@/views/ibp/index';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { loadMapData } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { getUserRoles, deljointTrainRoom } from '@/api/chat';
|
import { getUserRoles, deljointTrainRoom } from '@/api/chat';
|
||||||
import { runDiagramOver, getSimulationInfo } from '@/api/simulation';
|
import { runDiagramOver, getSimulationInfo } from '@/api/simulation';
|
||||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.chatContentList': function (val) { // 综合演练被踢出房间
|
'$store.state.socket.chatContentList': function (val) { // 综合演练被踢出房间
|
||||||
if (val.type === 'userRoomKickOut'&&val.oneself) {
|
if (val.type === 'userRoomKickOut' && val.oneself) {
|
||||||
this.$router.push({ path: `/` });
|
this.$router.push({ path: `/` });
|
||||||
this.messageInfo(this.$t('tip.beKickedOut'), 'warning');
|
this.messageInfo(this.$t('tip.beKickedOut'), 'warning');
|
||||||
}
|
}
|
||||||
@ -315,14 +315,14 @@ export default {
|
|||||||
case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); this.hideIbp(); break;
|
case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); this.hideIbp(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await this.getTrainDetail(this.skinCode);
|
await this.getTrainDetail();
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getTrainDetail(skinCode) {
|
async getTrainDetail() {
|
||||||
try {
|
try {
|
||||||
await loadMapData(skinCode);
|
await loadMapDataById(this.mapId);
|
||||||
await this.$store.dispatch('training/setMapDefaultState');
|
await this.$store.dispatch('training/setMapDefaultState');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$messageBox(this.$t('error.getMapDataFailed'));
|
this.$messageBox(this.$t('error.getMapDataFailed'));
|
||||||
@ -344,7 +344,7 @@ export default {
|
|||||||
showdriving() {
|
showdriving() {
|
||||||
this.panelShow = true;
|
this.panelShow = true;
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
this.ibpShow =false;
|
this.ibpShow = false;
|
||||||
},
|
},
|
||||||
showIbp(deviceCode) {
|
showIbp(deviceCode) {
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<template>
|
<template>
|
||||||
<el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{$t('joinTraining.runGraphPreview')}}</el-button>
|
<el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="userRole == 'Admin'">
|
<template v-if="userRole == 'Admin'">
|
||||||
<el-button v-if="!runing" size="small" type="warning" :disabled="viewDisabled" @click="loadRunPlan">
|
<el-button v-if="!runing" size="small" type="warning" :disabled="viewDisabled" @click="loadRunPlan">
|
||||||
{{$t('joinTraining.runGraphLoading')}}</el-button>
|
{{ $t('joinTraining.runGraphLoading') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="userRole == 'Instructor' || userRole == 'Admin'">
|
<template v-if="userRole == 'Instructor' || userRole == 'Admin'">
|
||||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{$t('joinTraining.faultSetting')}}</el-button>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
@ -29,15 +29,15 @@
|
|||||||
size="small"
|
size="small"
|
||||||
@change="changeOperateMode(mode)"
|
@change="changeOperateMode(mode)"
|
||||||
>
|
>
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{$t('joinTraining.normalOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('joinTraining.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{$t('joinTraining.faultOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('joinTraining.faultOperation') }}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -97,14 +97,15 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.userId = this.$store.state.user.id;
|
this.userId = this.$store.state.user.id;
|
||||||
|
console.log(this.$route.query);
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData(this.$route.query);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData(opt) {
|
loadRunData(opt) {
|
||||||
this.$store.dispatch('runPlan/clear').then(resp => {
|
this.$store.dispatch('runPlan/clear').then(resp => {
|
||||||
if (opt && opt.skinCode) {
|
if (opt && opt.mapId) {
|
||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
getStationList(opt.mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
getEveryDayRunPlanData(this.group).then(resp => {
|
getEveryDayRunPlanData(this.group).then(resp => {
|
||||||
|
@ -119,7 +119,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.courseModel.skinCode = this.$route.query.skinCode;
|
this.courseModel.skinCode = this.$route.query.skinCode;
|
||||||
}
|
}
|
||||||
getCommodityMapProduct(this.$route.query.skinCode).then(response => {
|
getCommodityMapProduct(this.$route.query.mapId).then(response => {
|
||||||
this.productList = response.data || [];
|
this.productList = response.data || [];
|
||||||
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
||||||
});
|
});
|
||||||
|
@ -19,7 +19,7 @@ import {
|
|||||||
deleteTrainingRulesData,
|
deleteTrainingRulesData,
|
||||||
getPlaceholderList
|
getPlaceholderList
|
||||||
} from '@/api/management/operation';
|
} from '@/api/management/operation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import TrainingEdit from './addEdit';
|
import TrainingEdit from './addEdit';
|
||||||
import AddBatch from './addBatch';
|
import AddBatch from './addBatch';
|
||||||
import SaveAs from './saveAs.vue';
|
import SaveAs from './saveAs.vue';
|
||||||
@ -37,7 +37,7 @@ export default {
|
|||||||
placeholderMap: {},
|
placeholderMap: {},
|
||||||
trainingOperateTypeMap: {},
|
trainingOperateTypeMap: {},
|
||||||
trainingTypeList: [],
|
trainingTypeList: [],
|
||||||
skinCodeList: [],
|
mapIdList: [],
|
||||||
totals: '',
|
totals: '',
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
@ -77,12 +77,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.skinType'),
|
title: this.$t('lesson.mapName'),
|
||||||
prop: 'skinCode',
|
prop: 'mapId',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: row => {
|
columnValue: row => {
|
||||||
return this.$convertField(row.skinCode, this.skinCodeList, [
|
return this.$convertField(row.id, this.mapIdList, [
|
||||||
'code',
|
'id',
|
||||||
'name'
|
'name'
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
@ -210,10 +210,10 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取皮肤列表
|
// 获取地图列表
|
||||||
this.skinCodeList = [];
|
this.mapIdList = [];
|
||||||
getSkinCodeList().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.skinCodeList = response.data;
|
this.mapIdList = response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取实训类型
|
// 获取实训类型
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { postOperateSaveAs } from '@/api/management/operation';
|
import { postOperateSaveAs } from '@/api/management/operation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddBatch',
|
name: 'AddBatch',
|
||||||
@ -29,7 +29,7 @@ export default {
|
|||||||
skinCodeFrom: '',
|
skinCodeFrom: '',
|
||||||
skinCodeTo: ''
|
skinCodeTo: ''
|
||||||
},
|
},
|
||||||
skinCodeList: []
|
mapIdList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -43,14 +43,14 @@ export default {
|
|||||||
label: this.$t('lesson.skinTypeFrom'),
|
label: this.$t('lesson.skinTypeFrom'),
|
||||||
type: 'select',
|
type: 'select',
|
||||||
required: true,
|
required: true,
|
||||||
options: this.skinCodeList
|
options: this.mapIdList
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'skinCodeTo',
|
prop: 'skinCodeTo',
|
||||||
label: this.$t('lesson.skinTypeTo'),
|
label: this.$t('lesson.skinTypeTo'),
|
||||||
type: 'select',
|
type: 'select',
|
||||||
required: true,
|
required: true,
|
||||||
options: this.skinCodeList
|
options: this.mapIdList
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -84,13 +84,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
// 获取皮肤列表
|
// 获取已发布地图列表
|
||||||
this.skinCodeList = [];
|
this.mapIdList = [];
|
||||||
getSkinCodeList().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.skinCodeList = response.data.map(item => {
|
this.mapIdList = response.data.map(item => {
|
||||||
const params = {};
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.id;
|
||||||
return params;
|
return params;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
<el-form-item v-if="isAdd" :label="this.$t('lesson.trainingName')+':'" prop="name">
|
<el-form-item v-if="isAdd" :label="this.$t('lesson.trainingName')+':'" prop="name">
|
||||||
<el-input v-model="operateModel.name" style="width: 300px" />
|
<el-input v-model="operateModel.name" style="width: 300px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('lesson.skinType') + ':'" prop="skinCode">
|
<el-form-item :label="this.$t('lesson.mapName') + ':'" prop="mapId">
|
||||||
<el-select v-model="operateModel.skinCode" style="width: 300px" :disabled="this.disable" @change="skinCodeChoose">
|
<el-select v-model="operateModel.skinCode" style="width: 300px" :disabled="this.disable" @change="skinCodeChoose">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in skinCodeList"
|
v-for="option in mapIdList"
|
||||||
:key="option.code"
|
:key="option.code"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.code"
|
:value="option.code"
|
||||||
@ -70,7 +70,7 @@ import { getCommodityMapProduct } from '@/api/management/mapprd';
|
|||||||
export default {
|
export default {
|
||||||
name: 'TrainingAdd',
|
name: 'TrainingAdd',
|
||||||
props: {
|
props: {
|
||||||
skinCodeList: {
|
mapIdList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
@ -197,7 +197,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.skinCodeChoose(this.$route.params.skinCode);
|
this.mapIdChoose(this.$route.query.mapId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show(data) {
|
show(data) {
|
||||||
@ -211,11 +211,11 @@ export default {
|
|||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
skinCodeChoose(skinCode) {
|
mapIdChoose(mapId) {
|
||||||
this.operateModel.prdCode = '';
|
this.operateModel.prdCode = '';
|
||||||
this.productList = [];
|
this.productList = [];
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getCommodityMapProduct(skinCode).then((response) => {
|
getCommodityMapProduct(mapId).then((response) => {
|
||||||
this.productList = response.data;
|
this.productList = response.data;
|
||||||
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
||||||
});
|
});
|
||||||
@ -225,9 +225,10 @@ export default {
|
|||||||
this.trainingTypeMap = {};
|
this.trainingTypeMap = {};
|
||||||
this.operateModel.operateType = [];
|
this.operateModel.operateType = [];
|
||||||
|
|
||||||
const skinCodeObj = this.skinCodeList.find(elem => { return elem.code === this.operateModel.skinCode; }) || {};
|
debugger;
|
||||||
|
const skinCodeObj = this.mapIdList.find(elem => { return elem.code === this.operateModel.skinCode; }) || {};
|
||||||
const prdTypeObj = this.productList.find(elem => { return elem.code === prdCode; }) || {};
|
const prdTypeObj = this.productList.find(elem => { return elem.code === prdCode; }) || {};
|
||||||
const res = await getOperateTrainingList({ skinCode: skinCodeObj.code, productType: prdTypeObj.prdType });
|
const res = await getOperateTrainingList({ skinCode: skinCodeObj.mapId, productType: prdTypeObj.prdType });
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.trainingTypeLists = res.data;
|
this.trainingTypeLists = res.data;
|
||||||
this.trainingTypeList.forEach(elem => {
|
this.trainingTypeList.forEach(elem => {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<training-draft
|
<training-draft
|
||||||
ref="draftTrain"
|
ref="draftTrain"
|
||||||
:skin-code-list="skinCodeList"
|
:map-id-list="mapIdList"
|
||||||
:training-type-list="trainingTypeList"
|
:training-type-list="trainingTypeList"
|
||||||
:training-operate-type-map="trainingOperateTypeMap"
|
:training-operate-type-map="trainingOperateTypeMap"
|
||||||
@refresh="reloadTable"
|
@refresh="reloadTable"
|
||||||
@ -21,7 +21,7 @@ import { pageQueryTraining } from '@/api/jmap/training';
|
|||||||
import { trainingNotify } from '@/api/simulation';
|
import { trainingNotify } from '@/api/simulation';
|
||||||
import { getCommodityMapProduct, getProductList } from '@/api/management/mapprd';
|
import { getCommodityMapProduct, getProductList } from '@/api/management/mapprd';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import TrainingDraft from './draft';
|
import TrainingDraft from './draft';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
@ -33,7 +33,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
skinCodeList: [],
|
mapIdList: [],
|
||||||
trainingTypeList: [],
|
trainingTypeList: [],
|
||||||
prdTypeList: [],
|
prdTypeList: [],
|
||||||
trainingOperateTypeMap: {},
|
trainingOperateTypeMap: {},
|
||||||
@ -93,7 +93,7 @@ export default {
|
|||||||
title: this.$t('lesson.skinType'),
|
title: this.$t('lesson.skinType'),
|
||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapIdList, ['id', 'name']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -167,12 +167,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.skinCodeList = [];
|
this.mapIdList = [];
|
||||||
this.queryForm.queryObject.prdCode.config.data = [];
|
this.queryForm.queryObject.prdCode.config.data = [];
|
||||||
getSkinCodeList().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.skinCodeList = response.data;
|
this.mapIdList = response.data;
|
||||||
});
|
});
|
||||||
getCommodityMapProduct(this.$route.params.skinCode).then((response) => {
|
getCommodityMapProduct(this.$route.query.mapId).then((response) => {
|
||||||
const productList = response.data;
|
const productList = response.data;
|
||||||
if (productList && productList.length > 0) {
|
if (productList && productList.length > 0) {
|
||||||
productList.forEach(elem => {
|
productList.forEach(elem => {
|
||||||
|
@ -29,7 +29,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
const form = {
|
const form = {
|
||||||
labelWidth: '60px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
|
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
|
||||||
// { prop: 'nickname', label: '昵称', type: 'text' },
|
// { prop: 'nickname', label: '昵称', type: 'text' },
|
||||||
@ -45,6 +45,9 @@ export default {
|
|||||||
name: [
|
name: [
|
||||||
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
|
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
|
||||||
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
roles: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectPermission'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
// nickname: [
|
// nickname: [
|
||||||
// { required: true, message: this.$t('rules.pleaseInputNickName'), trigger: 'blur' },
|
// { required: true, message: this.$t('rules.pleaseInputNickName'), trigger: 'blur' },
|
||||||
|
@ -124,17 +124,10 @@ export default {
|
|||||||
this.formModel.userId = item.id;
|
this.formModel.userId = item.id;
|
||||||
},
|
},
|
||||||
async mapChange(val) {
|
async mapChange(val) {
|
||||||
let skinCode = '';
|
|
||||||
this.mapPrdList = [];
|
this.mapPrdList = [];
|
||||||
this.formModel.mapPrdCode = '';
|
this.formModel.mapPrdCode = '';
|
||||||
if (this.LessonList.length) {
|
|
||||||
this.LessonList.forEach(item => {
|
|
||||||
if (item.value == val) {
|
|
||||||
skinCode = item.skinCode;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
const res = await getCommodityMapProduct(skinCode);
|
const res = await getCommodityMapProduct(val);
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
data.forEach(elem => {
|
data.forEach(elem => {
|
||||||
@ -144,7 +137,6 @@ export default {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
show(data) {
|
show(data) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
|
@ -1,376 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="main" style="background-color:floralwhite">
|
|
||||||
<div :id="runPlanId" />
|
|
||||||
<div v-if="isShowBack" style="float: right; margin-right: 2%; margin-top: 10px; margin-bottom: 20px">
|
|
||||||
<el-button-group>
|
|
||||||
<el-button type="primary" @click="back">{{ $t('global.return') }}</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { getStationListBySkinCode, queryRunPlan, queryRunPlanTemplate, queryRunPlanDaily } from '@/api/runplan';
|
|
||||||
import { timeFormat } from '@/utils/date';
|
|
||||||
import { UrlConfig } from '@/router/index';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RunPlan',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
runPlanId: 'main',
|
|
||||||
myChart: null,
|
|
||||||
PlanConvert: {},
|
|
||||||
option: {
|
|
||||||
title: {
|
|
||||||
text: '',
|
|
||||||
left: 'center'
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
top: '30px',
|
|
||||||
left: '120px',
|
|
||||||
right: '2%',
|
|
||||||
bottom: '80px',
|
|
||||||
containLabel: true,
|
|
||||||
backgroundColor: 'floralwhite'
|
|
||||||
},
|
|
||||||
toolbox: {
|
|
||||||
right: '2%',
|
|
||||||
feature: {
|
|
||||||
dataZoom: {
|
|
||||||
yAxisIndex: 'none'
|
|
||||||
},
|
|
||||||
restore: {},
|
|
||||||
saveAsImage: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
axisPointer: {
|
|
||||||
trigger: 'item',
|
|
||||||
type: 'cross'
|
|
||||||
},
|
|
||||||
formatter: this.axisTooltip,
|
|
||||||
borderWidth: 1
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
boundaryGap: false,
|
|
||||||
data: [],
|
|
||||||
axisLine: {
|
|
||||||
onZero: false,
|
|
||||||
lineStyle: {
|
|
||||||
width: 2,
|
|
||||||
color: '#d14a61'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
formatter: this.xAxisLableFormat,
|
|
||||||
textStyle: {
|
|
||||||
color: '#333'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisPointer: {
|
|
||||||
snap: true,
|
|
||||||
label: {
|
|
||||||
formatter: this.xAxisPointFormat,
|
|
||||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
|
||||||
color: 'white'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
splitLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
onZero: false,
|
|
||||||
lineStyle: {
|
|
||||||
width: 2,
|
|
||||||
color: '#d14a61'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
interval: 'auto',
|
|
||||||
formatter: this.yAxisLableFormat
|
|
||||||
},
|
|
||||||
axisPointer: {
|
|
||||||
xAxisIndex: 'all',
|
|
||||||
label: {
|
|
||||||
formatter: this.yAxisPointFormat,
|
|
||||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
|
||||||
color: 'white'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
min: 0,
|
|
||||||
max: 0
|
|
||||||
},
|
|
||||||
series: [],
|
|
||||||
dataZoom: [
|
|
||||||
{
|
|
||||||
type: 'inside'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
fiterMode: 'filter',
|
|
||||||
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
|
||||||
handleSize: '80%',
|
|
||||||
handleStyle: {
|
|
||||||
color: '#fff',
|
|
||||||
shadowBlur: 3,
|
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
|
||||||
shadowOffsetX: 2,
|
|
||||||
shadowOffsetY: 2
|
|
||||||
},
|
|
||||||
bottom: '25px'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
kmRangeCoordMap: {}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('runPlan', [
|
|
||||||
'stations'
|
|
||||||
]),
|
|
||||||
isShowBack() {
|
|
||||||
if (this.$route.params.mode !== 'draft') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
mode() {
|
|
||||||
return this.$route.params.mode;
|
|
||||||
},
|
|
||||||
width() {
|
|
||||||
return this.$store.state.app.width;
|
|
||||||
},
|
|
||||||
height() {
|
|
||||||
return this.$store.state.app.height;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.runPlan.planSizeCount': function () {
|
|
||||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
|
||||||
},
|
|
||||||
'$store.state.app.windowSizeCount': function() {
|
|
||||||
this.setPlanSize();
|
|
||||||
},
|
|
||||||
$route() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.loadChartPage(this.$route.query);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.setPlanSize();
|
|
||||||
this.loadChartPage(this.$route.query);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
this.destroy();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
loadChartPage(opt) {
|
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(opt.skinCode);
|
|
||||||
this.$store.dispatch('runPlan/clear').then(resp => {
|
|
||||||
this.loadInitChart().then(() => {
|
|
||||||
if (opt.skinCode && opt.planId) {
|
|
||||||
this.myChart && this.myChart.showLoading();
|
|
||||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
|
||||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
|
||||||
let queryFunc = null;
|
|
||||||
const params = opt.planId;
|
|
||||||
|
|
||||||
switch (this.mode) {
|
|
||||||
case 'common': queryFunc = queryRunPlanTemplate; break;
|
|
||||||
case 'template': queryFunc = queryRunPlanTemplate; break;
|
|
||||||
case 'everyDay': queryFunc = queryRunPlanDaily; break;
|
|
||||||
default: queryFunc = queryRunPlan; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
queryFunc(params).then(resp => {
|
|
||||||
this.loadChartData(resp.data);
|
|
||||||
this.myChart && this.myChart.hideLoading();
|
|
||||||
}).catch(() => {
|
|
||||||
this.myChart && this.myChart.hideLoading();
|
|
||||||
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
this.myChart && this.myChart.hideLoading();
|
|
||||||
this.$messageBox(this.$t('error.obtainStationListFailed'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async loadChartData(data) {
|
|
||||||
try {
|
|
||||||
this.option.title.text = data.planName;
|
|
||||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(this.stations);
|
|
||||||
this.option.series = [];
|
|
||||||
this.pushModels(this.option.series, [this.PlanConvert.initializeYaxis(this.stations)]);
|
|
||||||
this.pushModels(this.option.series, this.PlanConvert.convertDataToModels(data, this.stations, this.kmRangeCoordMap, { width: 1 }));
|
|
||||||
this.loadInitData();
|
|
||||||
} catch (error) {
|
|
||||||
this.$messageBox(this.$t('error.loadingOperationGraphFailed'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loadInitData() {
|
|
||||||
await this.xAxisInit();
|
|
||||||
await this.yAxisInit();
|
|
||||||
await this.loadInitChart();
|
|
||||||
},
|
|
||||||
xAxisPointFormat(params) {
|
|
||||||
return timeFormat(params.value);
|
|
||||||
},
|
|
||||||
yAxisPointFormat(params) {
|
|
||||||
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
|
||||||
},
|
|
||||||
xAxisLableFormat(value, index) {
|
|
||||||
if (value % 60 === 0) {
|
|
||||||
return timeFormat(parseInt(value));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
yAxisLableFormat(value, index) {
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
xAxisInit() {
|
|
||||||
const list = [];
|
|
||||||
for (var time = this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
|
||||||
list.push(time);
|
|
||||||
}
|
|
||||||
this.option.xAxis[0].data = list;
|
|
||||||
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = 3600 * 6 - 600 + this.PlanConvert.TranslationTime;
|
|
||||||
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = 3600 * 8 + 600 + this.PlanConvert.TranslationTime;
|
|
||||||
},
|
|
||||||
yAxisInit() {
|
|
||||||
if (Object.keys(this.PlanConvert).length) {
|
|
||||||
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
|
||||||
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
pushModels(series, models) {
|
|
||||||
if (models && models.length) {
|
|
||||||
models.forEach(elem => {
|
|
||||||
if (elem) {
|
|
||||||
series.push(elem);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return series;
|
|
||||||
},
|
|
||||||
popModels(series, models) {
|
|
||||||
if (models && models.length) {
|
|
||||||
models.forEach(elem => {
|
|
||||||
const index = series.indexOf(elem);
|
|
||||||
if (index >= 0) {
|
|
||||||
series.split(index, 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return series;
|
|
||||||
},
|
|
||||||
loadInitChart() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
try {
|
|
||||||
const that = this;
|
|
||||||
// 加载echart配置
|
|
||||||
require.config(
|
|
||||||
{
|
|
||||||
paths: {
|
|
||||||
echarts: './js/dist'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// 按需加载所需图表,如需动态类型切换功能,别忘了同时加载相应图表
|
|
||||||
require(
|
|
||||||
[
|
|
||||||
'echarts',
|
|
||||||
'echarts/lib/chart/line'
|
|
||||||
],
|
|
||||||
function (ec) {
|
|
||||||
if (that.myChart && that.myChart.isDisposed) {
|
|
||||||
that.myChart.clear();
|
|
||||||
}
|
|
||||||
that.myChart = ec.init(document.getElementById(that.runPlanId));
|
|
||||||
that.myChart.setOption(that.option);
|
|
||||||
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
|
|
||||||
// that.myChart.on('click', that.mouseClick);
|
|
||||||
resolve(true);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
reject(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
axisTooltip(param) {
|
|
||||||
if (param.data[1] >= this.option.yAxis.min + this.PlanConvert.EdgeHeight && param.data[1] <= this.option.yAxis.max - this.PlanConvert.EdgeHeight) {
|
|
||||||
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
|
||||||
return [
|
|
||||||
`Point Data <hr size=1 style="margin: 3px 0">`,
|
|
||||||
`${this.$t('map.stationName')}: ${station.name}<br>`,
|
|
||||||
`${this.$t('map.stationKilometerMark')}: ${station.kmRange} km <br>`,
|
|
||||||
`${this.$t('map.arrivalTime')}: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
|
||||||
].join('');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mouseClick(params) {
|
|
||||||
},
|
|
||||||
settingExac(data) {
|
|
||||||
this.myChart && this.myChart.setOption({
|
|
||||||
xAxis: this.option.xAxis,
|
|
||||||
yAxis: this.option.yAxis
|
|
||||||
});
|
|
||||||
|
|
||||||
this.myChart && this.myChart.dispatchAction({
|
|
||||||
type: 'dataZoom',
|
|
||||||
dataZoomIndex: [0, 1],
|
|
||||||
startValue: parseInt(data.startValue / 1000),
|
|
||||||
endValue: parseInt(data.endValue / 1000)
|
|
||||||
});
|
|
||||||
},
|
|
||||||
reSize(opt) {
|
|
||||||
if (this.myChart) {
|
|
||||||
this.myChart.resize({
|
|
||||||
width: opt.width,
|
|
||||||
height: opt.height,
|
|
||||||
silent: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setPlanSize() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.mode !== 'draft') {
|
|
||||||
this.$store.dispatch('runPlan/resize', { width: this.width, height: this.height - 130 });
|
|
||||||
} else {
|
|
||||||
this.$store.dispatch('runPlan/resize', { width: this.$store.state.runPlan.width, height: this.height - 60 });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
destroy() {
|
|
||||||
if (this.myChart && this.myChart.isDisposed) {
|
|
||||||
this.myChart.dispose();
|
|
||||||
this.myChart = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
back() {
|
|
||||||
if (this.$route.params.mode === 'everyDay') {
|
|
||||||
this.$router.replace({ path: `${UrlConfig.publish.runPlanEveryDay}` });
|
|
||||||
} else if (this.$route.params.mode === 'template') {
|
|
||||||
this.$router.replace({ path: `${UrlConfig.publish.runPlanTemplate}` });
|
|
||||||
} else if (this.$route.params.mode === 'common') {
|
|
||||||
this.$router.replace({ path: `${UrlConfig.publish.runPlanCommon}` });
|
|
||||||
} else {
|
|
||||||
this.$router.go(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,84 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :title="this.$t('map.setupOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="doClose" append-to-body>
|
|
||||||
<el-form ref="form" :model="formModel" label-width="160px" size="mini" :rules="rules">
|
|
||||||
<el-form-item :label="this.$t('map.selectOperationGraphDataRange')+':'" prop="timeArea">
|
|
||||||
<el-time-picker
|
|
||||||
v-model="formModel.timeArea"
|
|
||||||
is-range
|
|
||||||
range-separator="this.$t('map.to')"
|
|
||||||
start-placeholder="this.$t('global.startTime')"
|
|
||||||
end-placeholder="this.$t('global.endTime')"
|
|
||||||
placeholder="this.$t('map.selectionTimeRange')"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
|
||||||
<el-button type="primary" @click="handle">{{ $t(global.confirm) }}</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'ChartSetting',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
intervalList: [
|
|
||||||
{ code: '01', value: this.$t('map.pointSystem1') },
|
|
||||||
{ code: '02', value: this.$t('map.pointSystem2') },
|
|
||||||
{ code: '05', value: this.$t('map.pointSystem5') }
|
|
||||||
],
|
|
||||||
formModel: {
|
|
||||||
timeArea: [new Date(2018, 10, 1), new Date(2018, 10, 1)]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
rules() {
|
|
||||||
return {
|
|
||||||
timeArea: [
|
|
||||||
{ required: true, message: this.$t('rules.selectDataRange'), trigger: 'change' }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow() {
|
|
||||||
this.dialogShow = true;
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
},
|
|
||||||
handle() {
|
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const baseDate = new Date(2018, 10, 1);
|
|
||||||
const model = {
|
|
||||||
startValue: this.formModel.timeArea[0].valueOf() - baseDate.valueOf(),
|
|
||||||
endValue: this.formModel.timeArea[1].valueOf() - baseDate.valueOf(),
|
|
||||||
intervalLevel: parseFloat('01')
|
|
||||||
};
|
|
||||||
this.$emit('settingExac', model);
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.dialog {
|
|
||||||
border-color: black;
|
|
||||||
border-style: solid;
|
|
||||||
border-top-width: 2px;
|
|
||||||
border-right-width: 2px;
|
|
||||||
border-bottom-width: 2px;
|
|
||||||
border-left-width: 2px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,70 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="main">
|
|
||||||
<div class="list" :style="{width: widthLeft+'px'}">
|
|
||||||
<!-- <chart-list ref="list" :height="height" /> -->
|
|
||||||
</div>
|
|
||||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
|
||||||
<transition>
|
|
||||||
<router-view style="float: right;" :style="{width: width+'px'}" />
|
|
||||||
</transition>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import DrapLeft from '@/views/components/drapLeft/index';
|
|
||||||
// import ChartList from './manage/list';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RunPlan',
|
|
||||||
components: {
|
|
||||||
DrapLeft,
|
|
||||||
ChartList
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
widthLeft: 320
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
width() {
|
|
||||||
return this.$store.state.app.width - this.widthLeft;
|
|
||||||
},
|
|
||||||
height() {
|
|
||||||
return this.$store.state.app.height;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
widthLeft(val) {
|
|
||||||
this.setRunPlanResize(val);
|
|
||||||
},
|
|
||||||
'$store.state.app.windowSizeCount': function() {
|
|
||||||
this.setRunPlanResize(this.widthLeft);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.setRunPlanResize();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
drapWidth(width) {
|
|
||||||
this.widthLeft = Number(width);
|
|
||||||
},
|
|
||||||
setRunPlanResize(LeftWidth) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('runPlan/resize', { width: this.width, height: this.height - 60 });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.main {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.list {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -10,7 +10,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
|
||||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||||
import { OperatorModel, PermissionType } from '@/scripts/ConstDic';
|
import { OperatorModel, PermissionType } from '@/scripts/ConstDic';
|
||||||
import { getTotalRemains } from '@/api/management/author';
|
import { getTotalRemains } from '@/api/management/author';
|
||||||
@ -208,14 +207,12 @@ export default {
|
|||||||
this.formModel.prdCode = '';
|
this.formModel.prdCode = '';
|
||||||
this.formModel.lessonId = '';
|
this.formModel.lessonId = '';
|
||||||
this.mapProductList = [];
|
this.mapProductList = [];
|
||||||
getPublishMapInfo(mapId).then(resp => {
|
getCommodityMapProduct(mapId).then(rest => {
|
||||||
getCommodityMapProduct(resp.data.skinCode).then(rest => {
|
|
||||||
const list = rest.data || [];
|
const list = rest.data || [];
|
||||||
this.mapProductList = list.map(elem => {
|
this.mapProductList = list.map(elem => {
|
||||||
return { value: elem.code, label: elem.name };
|
return { value: elem.code, label: elem.name };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
mapProductChange(prdCode) {
|
mapProductChange(prdCode) {
|
||||||
this.formModel.lessonId = '';
|
this.formModel.lessonId = '';
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPublishMap, getPublishMapInfo } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||||
import { packagePermissionDistribute } from '@/api/management/distribute';
|
import { packagePermissionDistribute } from '@/api/management/distribute';
|
||||||
@ -142,8 +142,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async computedMapProduct(item) {
|
async computedMapProduct(item) {
|
||||||
let name = '';
|
let name = '';
|
||||||
const resp = await getPublishMapInfo(item.mapId);
|
const rest = await getCommodityMapProduct(item.mapId);
|
||||||
const rest = await getCommodityMapProduct(resp.data.skinCode);
|
|
||||||
const list = rest.data || [];
|
const list = rest.data || [];
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
if (elem.id == item.mapProductCode) {
|
if (elem.id == item.mapProductCode) {
|
||||||
@ -206,14 +205,12 @@ export default {
|
|||||||
item.prdCode == elem.prdCode &&
|
item.prdCode == elem.prdCode &&
|
||||||
item.permissionType == elem.permissionType;
|
item.permissionType == elem.permissionType;
|
||||||
});
|
});
|
||||||
getPublishMapInfo(item.mapId).then(resp => {
|
getCommodityMapProduct(item.mapId).then(rest => {
|
||||||
getCommodityMapProduct(resp.data.skinCode).then(rest => {
|
|
||||||
const list = rest.data || [];
|
const list = rest.data || [];
|
||||||
this.mapProductList = list.map(elem => {
|
this.mapProductList = list.map(elem => {
|
||||||
return { value: elem.code, label: elem.name };
|
return { value: elem.code, label: elem.name };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
this.ruleList.push(item);
|
this.ruleList.push(item);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,41 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card :style="{height: height+'px'}" style="overflow-y:scroll;padding-bottom:20px;">
|
<el-card :style="{height: height+'px'}" style="overflow-y:scroll;padding-bottom:20px;">
|
||||||
<div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
<div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
||||||
<div class="runPlanList">{{$t('planMonitor.openRunPlan.runPlanList')}}</div>
|
<div class="runPlanList">{{ $t('planMonitor.openRunPlan.runPlanList') }}</div>
|
||||||
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">{{$t('planMonitor.createRunningDiagram')}}</el-button>
|
<el-button v-if="isCreate" size="small" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="runPlanList" height="500" stripe
|
<el-table
|
||||||
|
:data="runPlanList"
|
||||||
|
height="500"
|
||||||
|
stripe
|
||||||
border
|
border
|
||||||
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;"
|
||||||
|
>
|
||||||
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
|
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
|
||||||
<el-table-column :label="this.$t('global.status')" v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))">
|
<el-table-column v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))" :label="this.$t('global.status')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag>{{handlerStatus(scope.row)}}</el-tag>
|
<el-tag>{{ handlerStatus(scope.row) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
|
||||||
prop="explanation"
|
prop="explanation"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
|
:label="this.$t('planMonitor.explanation')"
|
||||||
:label="this.$t('planMonitor.explanation')">
|
/>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="this.$t('planMonitor.creationDate')">
|
<el-table-column :label="this.$t('planMonitor.creationDate')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="success">{{handleTime(scope.row.createTime)}}</el-tag>
|
<el-tag type="success">{{ handleTime(scope.row.createTime) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="this.$t('global.operate')" width="400">
|
<el-table-column :label="this.$t('global.operate')" width="400">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" class="button_box" type="success" @click="handleConfirm(scope.row)" v-if="scope.row.status !=='1'">{{$t('planMonitor.load')}}</el-button>
|
<el-button v-if="scope.row.status !=='1'" size="mini" class="button_box" type="success" @click="handleConfirm(scope.row)">{{ $t('planMonitor.load') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)" v-if="isCreate && scope.row.status !=='1'">{{$t('planMonitor.modifyName')}}</el-button>
|
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)">{{ $t('planMonitor.modifyName') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)" v-if="isCreate && scope.row.status !=='1'">{{$t('global.delete')}}</el-button>
|
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">{{ $t('global.delete') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)" v-if="isCreate && scope.row.status ==='0'">{{hasRelease?$t('global.release'):$t('planMonitor.applyRelease')}}</el-button>
|
<el-button v-if="isCreate && scope.row.status ==='0'" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)" v-if="scope.row.status === '1'">{{$t('planMonitor.preview')}}</el-button>
|
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)">{{ $t('planMonitor.preview') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="danger" @click="handelRevert(scope.row)" v-if="scope.row.status === '1'" >{{$t('planMonitor.revoke')}}</el-button>
|
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="danger" @click="handelRevert(scope.row)">{{ $t('planMonitor.revoke') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<create-empty-plan ref="createEmptyPlan" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" @refresh="refresh"/>
|
<create-empty-plan ref="createEmptyPlan" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" @refresh="refresh" />
|
||||||
<!-- @dispatchOperate="dispatchOperate" -->
|
<!-- @dispatchOperate="dispatchOperate" -->
|
||||||
<edit-plan-name ref="editPlan" @renewal="getRunPlanList" />
|
<edit-plan-name ref="editPlan" @renewal="getRunPlanList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -48,7 +52,7 @@ import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
|||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
export default {
|
export default {
|
||||||
name: 'userRunPlanList',
|
name: 'UserRunPlanList',
|
||||||
components: {
|
components: {
|
||||||
CreateEmptyPlan,
|
CreateEmptyPlan,
|
||||||
EditPlanName
|
EditPlanName
|
||||||
@ -76,7 +80,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 60 -30;
|
return this.$store.state.app.height - 60 - 30;
|
||||||
},
|
},
|
||||||
skinCode() {
|
skinCode() {
|
||||||
return this.$route.query.skinCode || '02';
|
return this.$route.query.skinCode || '02';
|
||||||
@ -86,24 +90,24 @@ export default {
|
|||||||
this.$store.state.user.roles.includes('05');
|
this.$store.state.user.roles.includes('05');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode);
|
|
||||||
},
|
|
||||||
mounted(){
|
|
||||||
this.getRunPlanList();
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
'$route' () {
|
'$route' () {
|
||||||
this.getRunPlanList();
|
this.getRunPlanList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode);
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getRunPlanList();
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
refresh(){
|
refresh() {
|
||||||
this.getRunPlanList();
|
this.getRunPlanList();
|
||||||
},
|
},
|
||||||
getRunPlanList() {
|
getRunPlanList() {
|
||||||
if(/^\/design\/userlist/.test(this.$route.fullPath)){
|
if (/^\/design\/userlist/.test(this.$route.fullPath)) {
|
||||||
this.isCreate=false;
|
this.isCreate = false;
|
||||||
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
|
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
|
||||||
this.runPlanList = resp.data;
|
this.runPlanList = resp.data;
|
||||||
this.runPlanList.forEach(elem => {
|
this.runPlanList.forEach(elem => {
|
||||||
@ -113,9 +117,8 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('planMonitor.openRunPlan.getRunPlanListFail'));
|
this.$messageBox(this.$t('planMonitor.openRunPlan.getRunPlanListFail'));
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
this.isCreate = true;
|
||||||
this.isCreate=true;
|
|
||||||
getRpListByMapId(this.$route.params.mapId).then((resp) => {
|
getRpListByMapId(this.$route.params.mapId).then((resp) => {
|
||||||
this.runPlanList = resp.data;
|
this.runPlanList = resp.data;
|
||||||
this.runPlanList.forEach(elem => {
|
this.runPlanList.forEach(elem => {
|
||||||
@ -130,13 +133,13 @@ export default {
|
|||||||
// dispatchOperate(){
|
// dispatchOperate(){
|
||||||
// this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
// this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
||||||
// },
|
// },
|
||||||
dispatchDialog(){
|
dispatchDialog() {
|
||||||
this.$refs['createEmptyPlan'].doShow();
|
this.$refs['createEmptyPlan'].doShow();
|
||||||
},
|
},
|
||||||
handleCreate(){
|
handleCreate() {
|
||||||
this.$refs['createEmptyPlan'].doShow();
|
this.$refs['createEmptyPlan'].doShow();
|
||||||
},
|
},
|
||||||
handleConfirm(row){
|
handleConfirm(row) {
|
||||||
this.loadRunPlanData({
|
this.loadRunPlanData({
|
||||||
planId: row.id,
|
planId: row.id,
|
||||||
skinCode: this.$route.query.skinCode,
|
skinCode: this.$route.query.skinCode,
|
||||||
@ -156,10 +159,9 @@ export default {
|
|||||||
this.$store.dispatch('runPlan/refresh');
|
this.$store.dispatch('runPlan/refresh');
|
||||||
} else {
|
} else {
|
||||||
const query = { skinCode: skinCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
|
const query = { skinCode: skinCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
|
||||||
if(/^\/design\/userlist/.test(this.$route.fullPath)){
|
if (/^\/design\/userlist/.test(this.$route.fullPath)) {
|
||||||
this.$router.push({ path: `${UrlConfig.plan.usertool}`, query: query });
|
this.$router.push({ path: `${UrlConfig.plan.usertool}`, query: query });
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,19 +187,19 @@ export default {
|
|||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
handlePublish(row) {
|
handlePublish(row) {
|
||||||
this.$confirm(this.hasRelease? this.$t('tip.publishRunPlanTips'):this.$t('tip.applyRunPlanTips'),this.$t('tip.hint'),{
|
this.$confirm(this.hasRelease ? this.$t('tip.publishRunPlanTips') : this.$t('tip.applyRunPlanTips'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (this.hasRelease){
|
if (this.hasRelease) {
|
||||||
publishRunPlan(row.id,{runPlanName: name}).then(resp => {
|
publishRunPlan(row.id, {runPlanName: name}).then(resp => {
|
||||||
this.$message.success(this.$t('tip.publishRunPlanSuccess'));
|
this.$message.success(this.$t('tip.publishRunPlanSuccess'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.publishRunPlanFail'));
|
this.$messageBox(this.$t('tip.publishRunPlanFail'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
releaseOrCancelRunPlan(row.id, '1').then(resp => {
|
releaseOrCancelRunPlan(row.id, '1').then(resp => {
|
||||||
this.$message.success(this.$t('tip.applyRunPlanSuccess'));
|
this.$message.success(this.$t('tip.applyRunPlanSuccess'));
|
||||||
@ -205,28 +207,28 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.applyRunPlanFail'));
|
this.$messageBox(this.$t('tip.applyRunPlanFail'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handelRevert(row) {
|
handelRevert(row) {
|
||||||
this.$confirm(this.$t('tip.cancelRunPlanTips'),this.$t('tip.hint'),{
|
this.$confirm(this.$t('tip.cancelRunPlanTips'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type:'warning'
|
type:'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
releaseOrCancelRunPlan(row.id,'0').then(resp=> {
|
releaseOrCancelRunPlan(row.id, '0').then(resp=> {
|
||||||
this.$message.success(this.$t('tip.cancelRunPlanSuccess'));
|
this.$message.success(this.$t('tip.cancelRunPlanSuccess'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.cancelRunPlanFail'))
|
this.$messageBox(this.$t('tip.cancelRunPlanFail'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handlerStatus(row) {
|
handlerStatus(row) {
|
||||||
let lessonStatus = '';
|
let lessonStatus = '';
|
||||||
switch (row.status){
|
switch (row.status) {
|
||||||
case '0':
|
case '0':
|
||||||
lessonStatus = this.$t('lesson.notRelease');
|
lessonStatus = this.$t('lesson.notRelease');
|
||||||
break;
|
break;
|
||||||
@ -243,17 +245,17 @@ export default {
|
|||||||
return lessonStatus;
|
return lessonStatus;
|
||||||
},
|
},
|
||||||
handleTime(time) {
|
handleTime(time) {
|
||||||
return time.replace("T"," ");
|
return time.replace('T', ' ');
|
||||||
},
|
},
|
||||||
handlePreview(row){
|
handlePreview(row) {
|
||||||
previewRunPlan(row.id).then(resp => {
|
previewRunPlan(row.id).then(resp => {
|
||||||
const query = {
|
const query = {
|
||||||
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id,from:''
|
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
|
||||||
};
|
};
|
||||||
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(this.$t('tip.createSimulationFaild')+this.$t('global.colon')+error.message);
|
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initLoad() {
|
async initLoad() {
|
||||||
const res = await queryRunPlanList(this.$route.query.skinCode);
|
const res = await queryRunPlanList(this.$route.params.mapId);
|
||||||
if (res.code == 200 && res.data.length) {
|
if (res.code == 200 && res.data.length) {
|
||||||
this.publishMapList = res.data;
|
this.publishMapList = res.data;
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ export default {
|
|||||||
// this.jump(resp.data, this.newModel.name);
|
// this.jump(resp.data, this.newModel.name);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
this.$messageBox(this.$t('error.createOperationGraphFailed') + this.$t('global.colon') + error.message);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ export default {
|
|||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
this.$messageBox(this.$t('error.createOperationGraphFailed') + this.$t('global.colon') + error.message);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { getStationListBySkinCode, queryRunPlan } from '@/api/runplan';
|
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||||
import {getRpDetailByUserMapId,getUserMapDetailByMapId} from '@/api/designPlatform';
|
import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatform';
|
||||||
import { loadMapData } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import DataTable from './menus/components/dataTable';
|
import DataTable from './menus/components/dataTable';
|
||||||
|
|
||||||
@ -358,12 +358,11 @@ export default {
|
|||||||
},
|
},
|
||||||
async loadChartPage() {
|
async loadChartPage() {
|
||||||
try {
|
try {
|
||||||
if(/^\/plan\/usertool/.test(this.$route.fullPath)){
|
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||||
getUserMapDetailByMapId(this.$route.query.mapId).then(resp => {
|
getUserMapDetailByMapId(this.$route.query.mapId).then(resp => {
|
||||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||||
});
|
});
|
||||||
@ -371,15 +370,15 @@ export default {
|
|||||||
this.planConvert = this.$theme.loadPlanConvert(this.skinCode);
|
this.planConvert = this.$theme.loadPlanConvert(this.skinCode);
|
||||||
this.$store.dispatch('runPlan/clear').then(() => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
this.loadInitChart().then(() => {
|
this.loadInitChart().then(() => {
|
||||||
if (this.skinCode) {
|
if (this.$route.query.mapId) {
|
||||||
loadMapData(this.skinCode);
|
loadMapDataById(this.$route.query.mapId);
|
||||||
getStationListBySkinCode(this.$route.query.skinCode).then(resp => {
|
getStationList(this.$route.query.mapId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
if (this.planId) {
|
if (this.planId) {
|
||||||
this.myChart && this.myChart.showLoading();
|
this.myChart && this.myChart.showLoading();
|
||||||
|
|
||||||
if(/^\/plan\/usertool/.test(this.$route.fullPath)){
|
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||||
getRpDetailByUserMapId(this.planId).then(rest => {
|
getRpDetailByUserMapId(this.planId).then(rest => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||||
@ -390,7 +389,7 @@ export default {
|
|||||||
this.myChart && this.myChart.hideLoading();
|
this.myChart && this.myChart.hideLoading();
|
||||||
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
queryRunPlan(this.planId).then(rest => {
|
queryRunPlan(this.planId).then(rest => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||||
@ -403,7 +402,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.clearCanvas();
|
this.clearCanvas();
|
||||||
}
|
}
|
||||||
@ -435,7 +433,7 @@ export default {
|
|||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
this.$messageBox(this.$t('error.loadingOperationGraphFailed')+this.$t('global.colon')+error.message);
|
this.$messageBox(this.$t('error.loadingOperationGraphFailed') + this.$t('global.colon') + error.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
|
@ -34,7 +34,8 @@ export default {
|
|||||||
formMdoel: {
|
formMdoel: {
|
||||||
id: 0,
|
id: 0,
|
||||||
skinCode: '',
|
skinCode: '',
|
||||||
name: ''
|
name: '',
|
||||||
|
mapId: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -58,6 +59,7 @@ export default {
|
|||||||
this.formMdoel.id = row.id;
|
this.formMdoel.id = row.id;
|
||||||
this.formMdoel.skinCode = '';
|
this.formMdoel.skinCode = '';
|
||||||
this.formMdoel.name = row.name;
|
this.formMdoel.name = row.name;
|
||||||
|
this.formMdoel.mapId = row.mapId;
|
||||||
this.show = true;
|
this.show = true;
|
||||||
getSkinCodeList().then(response => {
|
getSkinCodeList().then(response => {
|
||||||
this.skinCodeList = response.data;
|
this.skinCodeList = response.data;
|
||||||
|
@ -165,7 +165,7 @@ export default {
|
|||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
postRunPlanTemplate({ id: data.id, skinCode: data.skinCode, name: data.name }).then(response => {
|
postRunPlanTemplate({ id: data.id, mapId: data.mapId, name: data.name }).then(response => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$refs.copyPlan.doClose();
|
this.$refs.copyPlan.doClose();
|
||||||
this.$message.success(this.$t('publish.createCommonSuccess'));
|
this.$message.success(this.$t('publish.createCommonSuccess'));
|
||||||
@ -177,7 +177,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 预览
|
// 预览
|
||||||
handleView(index, row) {
|
handleView(index, row) {
|
||||||
this.$router.push({ path: `${UrlConfig.publish.runPlanView}/template`, query: { skinCode: row.skinCode, planId: row.id } });
|
this.$router.push({ path: `${UrlConfig.publish.runPlanView}/template`, query: { skinCode: row.skinCode, planId: row.id, mapId: row.mapId } });
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
|
376
src/views/publish/runPlanView/index.vue
Normal file
376
src/views/publish/runPlanView/index.vue
Normal file
@ -0,0 +1,376 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main" style="background-color:floralwhite">
|
||||||
|
<div :id="runPlanId" />
|
||||||
|
<div v-if="isShowBack" style="float: right; margin-right: 2%; margin-top: 10px; margin-bottom: 20px">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button type="primary" @click="back">{{ $t('global.return') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getStationList, queryRunPlan, queryRunPlanTemplate, queryRunPlanDaily } from '@/api/runplan';
|
||||||
|
import { timeFormat } from '@/utils/date';
|
||||||
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RunPlan',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
runPlanId: 'main',
|
||||||
|
myChart: null,
|
||||||
|
PlanConvert: {},
|
||||||
|
option: {
|
||||||
|
title: {
|
||||||
|
text: '',
|
||||||
|
left: 'center'
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '30px',
|
||||||
|
left: '120px',
|
||||||
|
right: '2%',
|
||||||
|
bottom: '80px',
|
||||||
|
containLabel: true,
|
||||||
|
backgroundColor: 'floralwhite'
|
||||||
|
},
|
||||||
|
toolbox: {
|
||||||
|
right: '2%',
|
||||||
|
feature: {
|
||||||
|
dataZoom: {
|
||||||
|
yAxisIndex: 'none'
|
||||||
|
},
|
||||||
|
restore: {},
|
||||||
|
saveAsImage: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
axisPointer: {
|
||||||
|
trigger: 'item',
|
||||||
|
type: 'cross'
|
||||||
|
},
|
||||||
|
formatter: this.axisTooltip,
|
||||||
|
borderWidth: 1
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: [],
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
lineStyle: {
|
||||||
|
width: 2,
|
||||||
|
color: '#d14a61'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: this.xAxisLableFormat,
|
||||||
|
textStyle: {
|
||||||
|
color: '#333'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
snap: true,
|
||||||
|
label: {
|
||||||
|
formatter: this.xAxisPointFormat,
|
||||||
|
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||||
|
color: 'white'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
splitLine: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
onZero: false,
|
||||||
|
lineStyle: {
|
||||||
|
width: 2,
|
||||||
|
color: '#d14a61'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
interval: 'auto',
|
||||||
|
formatter: this.yAxisLableFormat
|
||||||
|
},
|
||||||
|
axisPointer: {
|
||||||
|
xAxisIndex: 'all',
|
||||||
|
label: {
|
||||||
|
formatter: this.yAxisPointFormat,
|
||||||
|
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||||
|
color: 'white'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
min: 0,
|
||||||
|
max: 0
|
||||||
|
},
|
||||||
|
series: [],
|
||||||
|
dataZoom: [
|
||||||
|
{
|
||||||
|
type: 'inside'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fiterMode: 'filter',
|
||||||
|
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||||
|
handleSize: '80%',
|
||||||
|
handleStyle: {
|
||||||
|
color: '#fff',
|
||||||
|
shadowBlur: 3,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||||
|
shadowOffsetX: 2,
|
||||||
|
shadowOffsetY: 2
|
||||||
|
},
|
||||||
|
bottom: '25px'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
kmRangeCoordMap: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('runPlan', [
|
||||||
|
'stations'
|
||||||
|
]),
|
||||||
|
isShowBack() {
|
||||||
|
if (this.$route.params.mode !== 'draft') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
mode() {
|
||||||
|
return this.$route.params.mode;
|
||||||
|
},
|
||||||
|
width() {
|
||||||
|
return this.$store.state.app.width;
|
||||||
|
},
|
||||||
|
height() {
|
||||||
|
return this.$store.state.app.height;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.runPlan.planSizeCount': function () {
|
||||||
|
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||||
|
},
|
||||||
|
'$store.state.app.windowSizeCount': function() {
|
||||||
|
this.setPlanSize();
|
||||||
|
},
|
||||||
|
$route() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadChartPage(this.$route.query);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.setPlanSize();
|
||||||
|
this.loadChartPage(this.$route.query);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.destroy();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadChartPage(opt) {
|
||||||
|
this.PlanConvert = this.$theme.loadPlanConvert(opt.skinCode);
|
||||||
|
this.$store.dispatch('runPlan/clear').then(resp => {
|
||||||
|
this.loadInitChart().then(() => {
|
||||||
|
if (opt.mapId && opt.planId) {
|
||||||
|
this.myChart && this.myChart.showLoading();
|
||||||
|
getStationList(opt.mapId).then(response => {
|
||||||
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
|
let queryFunc = null;
|
||||||
|
const params = opt.planId;
|
||||||
|
|
||||||
|
switch (this.mode) {
|
||||||
|
case 'common': queryFunc = queryRunPlanTemplate; break;
|
||||||
|
case 'template': queryFunc = queryRunPlanTemplate; break;
|
||||||
|
case 'everyDay': queryFunc = queryRunPlanDaily; break;
|
||||||
|
default: queryFunc = queryRunPlan; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
queryFunc(params).then(resp => {
|
||||||
|
this.loadChartData(resp.data);
|
||||||
|
this.myChart && this.myChart.hideLoading();
|
||||||
|
}).catch(() => {
|
||||||
|
this.myChart && this.myChart.hideLoading();
|
||||||
|
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
this.myChart && this.myChart.hideLoading();
|
||||||
|
this.$messageBox(this.$t('error.obtainStationListFailed'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async loadChartData(data) {
|
||||||
|
try {
|
||||||
|
this.option.title.text = data.planName;
|
||||||
|
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(this.stations);
|
||||||
|
this.option.series = [];
|
||||||
|
this.pushModels(this.option.series, [this.PlanConvert.initializeYaxis(this.stations)]);
|
||||||
|
this.pushModels(this.option.series, this.PlanConvert.convertDataToModels(data, this.stations, this.kmRangeCoordMap, { width: 1 }));
|
||||||
|
this.loadInitData();
|
||||||
|
} catch (error) {
|
||||||
|
this.$messageBox(this.$t('error.loadingOperationGraphFailed'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async loadInitData() {
|
||||||
|
await this.xAxisInit();
|
||||||
|
await this.yAxisInit();
|
||||||
|
await this.loadInitChart();
|
||||||
|
},
|
||||||
|
xAxisPointFormat(params) {
|
||||||
|
return timeFormat(params.value);
|
||||||
|
},
|
||||||
|
yAxisPointFormat(params) {
|
||||||
|
return this.PlanConvert.computedFormatYAxis(this.stations, params);
|
||||||
|
},
|
||||||
|
xAxisLableFormat(value, index) {
|
||||||
|
if (value % 60 === 0) {
|
||||||
|
return timeFormat(parseInt(value));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxisLableFormat(value, index) {
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
xAxisInit() {
|
||||||
|
const list = [];
|
||||||
|
for (var time = this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
||||||
|
list.push(time);
|
||||||
|
}
|
||||||
|
this.option.xAxis[0].data = list;
|
||||||
|
this.option.dataZoom[0].startValue = this.option.dataZoom[1].startValue = 3600 * 6 - 600 + this.PlanConvert.TranslationTime;
|
||||||
|
this.option.dataZoom[0].endValue = this.option.dataZoom[1].endValue = 3600 * 8 + 600 + this.PlanConvert.TranslationTime;
|
||||||
|
},
|
||||||
|
yAxisInit() {
|
||||||
|
if (Object.keys(this.PlanConvert).length) {
|
||||||
|
this.option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||||
|
this.option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pushModels(series, models) {
|
||||||
|
if (models && models.length) {
|
||||||
|
models.forEach(elem => {
|
||||||
|
if (elem) {
|
||||||
|
series.push(elem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return series;
|
||||||
|
},
|
||||||
|
popModels(series, models) {
|
||||||
|
if (models && models.length) {
|
||||||
|
models.forEach(elem => {
|
||||||
|
const index = series.indexOf(elem);
|
||||||
|
if (index >= 0) {
|
||||||
|
series.split(index, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return series;
|
||||||
|
},
|
||||||
|
loadInitChart() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
const that = this;
|
||||||
|
// 加载echart配置
|
||||||
|
require.config(
|
||||||
|
{
|
||||||
|
paths: {
|
||||||
|
echarts: './js/dist'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// 按需加载所需图表,如需动态类型切换功能,别忘了同时加载相应图表
|
||||||
|
require(
|
||||||
|
[
|
||||||
|
'echarts',
|
||||||
|
'echarts/lib/chart/line'
|
||||||
|
],
|
||||||
|
function (ec) {
|
||||||
|
if (that.myChart && that.myChart.isDisposed) {
|
||||||
|
that.myChart.clear();
|
||||||
|
}
|
||||||
|
that.myChart = ec.init(document.getElementById(that.runPlanId));
|
||||||
|
that.myChart.setOption(that.option);
|
||||||
|
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
|
||||||
|
// that.myChart.on('click', that.mouseClick);
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
axisTooltip(param) {
|
||||||
|
if (param.data[1] >= this.option.yAxis.min + this.PlanConvert.EdgeHeight && param.data[1] <= this.option.yAxis.max - this.PlanConvert.EdgeHeight) {
|
||||||
|
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
||||||
|
return [
|
||||||
|
`Point Data <hr size=1 style="margin: 3px 0">`,
|
||||||
|
`${this.$t('map.stationName')}: ${station.name}<br>`,
|
||||||
|
`${this.$t('map.stationKilometerMark')}: ${station.kmRange} km <br>`,
|
||||||
|
`${this.$t('map.arrivalTime')}: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||||
|
].join('');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mouseClick(params) {
|
||||||
|
},
|
||||||
|
settingExac(data) {
|
||||||
|
this.myChart && this.myChart.setOption({
|
||||||
|
xAxis: this.option.xAxis,
|
||||||
|
yAxis: this.option.yAxis
|
||||||
|
});
|
||||||
|
|
||||||
|
this.myChart && this.myChart.dispatchAction({
|
||||||
|
type: 'dataZoom',
|
||||||
|
dataZoomIndex: [0, 1],
|
||||||
|
startValue: parseInt(data.startValue / 1000),
|
||||||
|
endValue: parseInt(data.endValue / 1000)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
reSize(opt) {
|
||||||
|
if (this.myChart) {
|
||||||
|
this.myChart.resize({
|
||||||
|
width: opt.width,
|
||||||
|
height: opt.height,
|
||||||
|
silent: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setPlanSize() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.mode !== 'draft') {
|
||||||
|
this.$store.dispatch('runPlan/resize', { width: this.width, height: this.height - 130 });
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('runPlan/resize', { width: this.$store.state.runPlan.width, height: this.height - 60 });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
destroy() {
|
||||||
|
if (this.myChart && this.myChart.isDisposed) {
|
||||||
|
this.myChart.dispose();
|
||||||
|
this.myChart = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
back() {
|
||||||
|
if (this.$route.params.mode === 'everyDay') {
|
||||||
|
this.$router.replace({ path: `${UrlConfig.publish.runPlanEveryDay}` });
|
||||||
|
} else if (this.$route.params.mode === 'template') {
|
||||||
|
this.$router.replace({ path: `${UrlConfig.publish.runPlanTemplate}` });
|
||||||
|
} else if (this.$route.params.mode === 'common') {
|
||||||
|
this.$router.replace({ path: `${UrlConfig.publish.runPlanCommon}` });
|
||||||
|
} else {
|
||||||
|
this.$router.go(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -3,6 +3,7 @@
|
|||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<span>{{ $t('map.productCategories') }}</span>
|
<span>{{ $t('map.productCategories') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||||
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
||||||
<div style="height: calc(100% - 87px);">
|
<div style="height: calc(100% - 87px);">
|
||||||
<el-tree
|
<el-tree
|
||||||
@ -29,13 +30,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductTree } from '@/api/management/mapprd';
|
import { getPublishMapTree } from '@/api/management/mapprd';
|
||||||
|
import FilterCity from '@/views/components/filterCity';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TreeOperate',
|
name: 'TreeOperate',
|
||||||
|
components: {
|
||||||
|
FilterCity
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
|
queryFunction: getPublishMapTree,
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
@ -46,7 +52,8 @@ export default {
|
|||||||
point: {
|
point: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
}
|
},
|
||||||
|
localParamName: 'product_cityCode'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -54,9 +61,6 @@ export default {
|
|||||||
this.$refs.trainingTree.filter(val);
|
this.$refs.trainingTree.filter(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.refresh();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
@ -90,14 +94,18 @@ export default {
|
|||||||
}
|
}
|
||||||
return tree;
|
return tree;
|
||||||
},
|
},
|
||||||
refresh() {
|
async refresh(filterSelect) {
|
||||||
getProductTree().then(response => {
|
this.loading = true;
|
||||||
this.treeData = this.convertTreeData(response.data);
|
try {
|
||||||
this.$nextTick(() => { this.loading = false; });
|
const res = await getPublishMapTree(filterSelect);
|
||||||
}).catch(() => {
|
this.treeData = this.convertTreeData(res.data);
|
||||||
this.$messageBox(this.$t('tip.refreshFailure'));
|
this.$nextTick(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
this.loading = false;
|
||||||
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,21 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
|
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||||
export default {
|
export default {
|
||||||
name: 'OnceGenerate',
|
name: 'OnceGenerate',
|
||||||
|
props: {
|
||||||
|
title: String,
|
||||||
|
operateType:String
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@ -27,118 +31,110 @@
|
|||||||
typeList:[],
|
typeList:[],
|
||||||
formModel:{
|
formModel:{
|
||||||
mapId:'',
|
mapId:'',
|
||||||
name: "",
|
name: '',
|
||||||
prdCode: "",
|
prdCode: '',
|
||||||
type: "",
|
type: '',
|
||||||
id:null,
|
id:null
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
form() {
|
||||||
|
let form = {};
|
||||||
|
if (this.operateType == 'add') {
|
||||||
|
form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: [
|
||||||
|
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: this.projectList},
|
||||||
|
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList, change:true, onChange:this.changeMap},
|
||||||
|
{ prop: 'prdCode', label: this.$t('systemGenerate.prdName'), type: 'select', required: true, options:this.productList},
|
||||||
|
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},
|
||||||
|
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true, options: this.typeList}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: [
|
||||||
|
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return form;
|
||||||
|
},
|
||||||
|
rules() {
|
||||||
|
let crules = {};
|
||||||
|
if (this.operateType == 'add') {
|
||||||
|
crules = {customized:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectProject'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
mapId:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
type:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
prdCode:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectPrdName'), trigger: 'change'}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
crules = {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return crules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
title: String,
|
|
||||||
operateType:String
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
form() {
|
|
||||||
let form={};
|
|
||||||
if(this.operateType=="add"){
|
|
||||||
form={
|
|
||||||
labelWidth: '150px',
|
|
||||||
items: [
|
|
||||||
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true,options: this.projectList},
|
|
||||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true,options: this.mapList,change:true,onChange:this.changeMap},
|
|
||||||
{ prop: 'prdCode', label: this.$t('systemGenerate.prdName'), type: 'select', required: true,options:this.productList},
|
|
||||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true,},
|
|
||||||
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true,options: this.typeList},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
form={
|
|
||||||
labelWidth: '150px',
|
|
||||||
items: [
|
|
||||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true,},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return form
|
|
||||||
},
|
|
||||||
rules() {
|
|
||||||
let crules ={};
|
|
||||||
if(this.operateType=="add"){
|
|
||||||
crules ={customized:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectProject'), trigger: 'change'},
|
|
||||||
],
|
|
||||||
mapId:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'},
|
|
||||||
],
|
|
||||||
name: [
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
type:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'},
|
|
||||||
],
|
|
||||||
prdCode:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectPrdName'), trigger: 'change'},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
crules ={
|
|
||||||
name: [
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return crules
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods:{
|
methods:{
|
||||||
loadInitData(){
|
loadInitData() {
|
||||||
this.projectList=[{value:'xty',label:'西铁院'}];
|
this.projectList = [{value:'xty', label:'西铁院'}];
|
||||||
let customeredProductType=ConstConfig.ConstSelect.customeredProductType;
|
const customeredProductType = ConstConfig.ConstSelect.customeredProductType;
|
||||||
this.typeList=Cookies.get("user_lang")=="en"?
|
this.typeList = Cookies.get('user_lang') == 'en'
|
||||||
customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel } }):
|
? customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
||||||
customeredProductType.map(elem => { return { value: elem.value, label: elem.label } });
|
: customeredProductType.map(elem => { return { value: elem.value, label: elem.label }; });
|
||||||
listPublishMap().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.mapInfoList=response.data;
|
this.mapInfoList = response.data;
|
||||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||||
})
|
|
||||||
},
|
|
||||||
changeMap(index){
|
|
||||||
this.productList=[];
|
|
||||||
let mapInfo=this.mapInfoList.find(elem=>{
|
|
||||||
return elem.id==index;
|
|
||||||
});
|
});
|
||||||
getCommodityMapProduct(mapInfo.skinCode).then((response) => {
|
},
|
||||||
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name } });
|
changeMap(index) {
|
||||||
this.formModel.prdCode="";
|
this.productList = [];
|
||||||
|
getCommodityMapProduct(index).then((response) => {
|
||||||
|
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
|
||||||
|
this.formModel.prdCode = '';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doShow(data) {
|
doShow(data) {
|
||||||
if(data){
|
if (data) {
|
||||||
this.formModel.name=data.name;
|
this.formModel.name = data.name;
|
||||||
this.formModel.id=data.id;
|
this.formModel.id = data.id;
|
||||||
}
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
doCreate() {
|
doCreate() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
self.$emit('create', Object.assign({}, this.formModel));
|
self.$emit('create', Object.assign({}, this.formModel));
|
||||||
self.doClose()
|
self.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .el-dialog--center .el-dialog__body{
|
/deep/ .el-dialog--center .el-dialog__body{
|
||||||
|
@ -105,7 +105,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
getPublishLessonTree(this.$route.query.lessonId).then(response => {
|
getPublishLessonTree(this.$route.query.lessonId).then(response => {
|
||||||
if (response.data.tree && response.data.tree.length>0) {
|
if (response.data.tree && response.data.tree.length > 0) {
|
||||||
this.courseModel = {
|
this.courseModel = {
|
||||||
id: response.data.tree[0].id,
|
id: response.data.tree[0].id,
|
||||||
name: response.data.tree[0].name,
|
name: response.data.tree[0].name,
|
||||||
@ -136,12 +136,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickEvent(obj, node, ele) {
|
clickEvent(obj, node, ele) {
|
||||||
if (obj && obj.type==='Training') {
|
if (obj && obj.type === 'Training') {
|
||||||
if (obj.valid) {
|
if (obj.valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
trainingNotify({ trainingId: obj.id }).then(resp => {
|
trainingNotify({ trainingId: obj.id }).then(resp => {
|
||||||
const query = {
|
const query = {
|
||||||
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId
|
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId
|
||||||
};
|
};
|
||||||
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
@ -171,28 +171,28 @@ export default {
|
|||||||
},
|
},
|
||||||
nodeExpand(obj, node, ele) {
|
nodeExpand(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
this.expandList.push(key);
|
this.expandList.push(key);
|
||||||
setSessionStorage('trainingTeachExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingTeachExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
nodeCollapse(obj, node, ele) {
|
nodeCollapse(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
if (obj.type === 'Lesson') {
|
if (obj.type === 'Lesson') {
|
||||||
this.expandList = [];
|
this.expandList = [];
|
||||||
} else {
|
} else {
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
}
|
}
|
||||||
setSessionStorage('trainingTeachExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingTeachExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
getExpandList(id) {
|
getExpandList(id) {
|
||||||
let expand = getSessionStorage('trainingTeachExpandList'+id);
|
let expand = getSessionStorage('trainingTeachExpandList' + id);
|
||||||
expand = expand?(expand+'').split(','):'';
|
expand = expand ? (expand + '').split(',') : '';
|
||||||
if (expand instanceof Array) {
|
if (expand instanceof Array) {
|
||||||
this.expandList = expand;
|
this.expandList = expand;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
startTraining(data) {
|
startTraining(data) {
|
||||||
if (data && data.type==='Training') {
|
if (data && data.type === 'Training') {
|
||||||
if (data.valid) {
|
if (data.valid) {
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${data.id}/${this.courseModel.id}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${data.id}/${this.courseModel.id}`});
|
||||||
} else {
|
} else {
|
||||||
@ -206,7 +206,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
backLessonList() {
|
backLessonList() {
|
||||||
localStore.remove('teachDetail'+this.$route.params.subSystem);
|
localStore.remove('teachDetail' + this.$route.params.subSystem);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,131 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-card>
|
|
||||||
<div slot="header" style="text-align: center;">
|
|
||||||
<b>{{ $t('teach.trainingName') }} {{ courseModel.name }}</b>
|
|
||||||
</div>
|
|
||||||
<div style="margin:50px">
|
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }">
|
|
||||||
<p class="list-item">
|
|
||||||
<span class="list-label">{{ $t('teach.trainingTime') }}</span>
|
|
||||||
<span class="list-elem"> {{ courseModel.minDuration | setTime }} {{ $t('teach.seconds') }}</span>
|
|
||||||
</p>
|
|
||||||
<p class="list-item">
|
|
||||||
<span class="list-label">{{ $t('teach.trainingMaximum') }}</span>
|
|
||||||
<span class="list-elem">{{ courseModel.maxDuration | setTime }} {{ $t('teach.seconds') }}</span>
|
|
||||||
</p>
|
|
||||||
<p class="list-item">
|
|
||||||
<span class="list-label">{{ $t('teach.trainingInstructions') }}</span>
|
|
||||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
|
||||||
</p>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
<div class="btn-start">
|
|
||||||
<el-button :loading="loading" type="primary" @click="start">{{ $t('teach.startTraining') }}</el-button>
|
|
||||||
<el-button @click="back">{{ $t('global.back') }}</el-button>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getTrainingDetail } from '@/api/jmap/training';
|
|
||||||
import { trainingNotify } from '@/api/simulation';
|
|
||||||
import { UrlConfig } from '@/router/index';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'LessonPracticalDetail',
|
|
||||||
filters: {
|
|
||||||
setTime(val) {
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading: false,
|
|
||||||
courseModel: {
|
|
||||||
id: '',
|
|
||||||
name: '',
|
|
||||||
maxDuration: '',
|
|
||||||
minDuration: '',
|
|
||||||
remarks: '',
|
|
||||||
updateTime: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
height() {
|
|
||||||
return this.$store.state.app.height - 50;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route(newVal) {
|
|
||||||
this.initLoadPage();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.initLoadPage();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initLoadPage() {
|
|
||||||
const trainingId = this.$route.params.trainingId;
|
|
||||||
if (parseInt(trainingId)) {
|
|
||||||
getTrainingDetail(trainingId)
|
|
||||||
.then(res => {
|
|
||||||
this.courseModel = {
|
|
||||||
id: res.data.id,
|
|
||||||
name: res.data.name,
|
|
||||||
maxDuration: res.data.maxDuration,
|
|
||||||
remarks: res.data.remarks,
|
|
||||||
minDuration: res.data.minDuration,
|
|
||||||
updateTime: res.data.updateTime
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
start() {
|
|
||||||
this.loading = true;
|
|
||||||
trainingNotify({ trainingId: this.$route.params.trainingId }).then(resp => {
|
|
||||||
const query = {
|
|
||||||
group: resp.data, trainingId: this.$route.params.trainingId, lessonId: this.$route.params.lessonId
|
|
||||||
};
|
|
||||||
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
|
|
||||||
launchFullscreen();
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
back() {
|
|
||||||
this.$router.back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.list-item {
|
|
||||||
font-size: 16px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-label {
|
|
||||||
display: inline-block;
|
|
||||||
text-align: right;
|
|
||||||
width: 160px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-elem {
|
|
||||||
color: #808080 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-start {
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
justify-content: center;
|
|
||||||
transform: translateY(-20px);
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue
Block a user