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) {
|
||||
return request({
|
||||
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获取地图版本信息*/
|
||||
export function getPublishMapVersionById(id) {
|
||||
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) {
|
||||
return request({
|
||||
|
@ -62,9 +62,9 @@ export function deleteTrainingCategory(data) {
|
||||
/**
|
||||
* 获取地图下的产品列表
|
||||
*/
|
||||
export function getCommodityMapProduct(skinCode) {
|
||||
export function getCommodityMapProduct(mapId) {
|
||||
return request({
|
||||
url: `/api/mapPrd/${skinCode}/list`,
|
||||
url: `/api/mapPrd/${mapId}/list`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request';
|
||||
/** 分页查询皮肤*/
|
||||
export function getSkinCodePageList(params) {
|
||||
return request({
|
||||
url: `/api/mapSkin`,
|
||||
url: `/api/realLine`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
@ -12,7 +12,7 @@ export function getSkinCodePageList(params) {
|
||||
/** 添加皮肤*/
|
||||
export function addSkinCode(data) {
|
||||
return request({
|
||||
url: `/api/mapSkin`,
|
||||
url: `/api/realLine`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -21,7 +21,7 @@ export function addSkinCode(data) {
|
||||
/** 删除皮肤*/
|
||||
export function delSkinCode(id) {
|
||||
return request({
|
||||
url: `/api/mapSkin/${id}`,
|
||||
url: `/api/realLine/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
@ -29,7 +29,7 @@ export function delSkinCode(id) {
|
||||
/** 查询地图皮肤 */
|
||||
export function querySkinCode(id) {
|
||||
return request({
|
||||
url: `/api/mapSkin/${id}`,
|
||||
url: `/api/realLine/${id}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -37,7 +37,7 @@ export function querySkinCode(id) {
|
||||
/** 修改地图皮肤*/
|
||||
export function updateSkinCode(data) {
|
||||
return request({
|
||||
url: `/api/mapSkin/${data.id}`,
|
||||
url: `/api/realLine/${data.id}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
@ -46,7 +46,7 @@ export function updateSkinCode(data) {
|
||||
/** 通过皮肤Code更新地图皮肤*/
|
||||
export function updateSkinCodeByCode(data) {
|
||||
return request({
|
||||
url: `/api/mapSkin/${data.code}/update`,
|
||||
url: `/api/realLine/${data.code}/update`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
@ -55,7 +55,7 @@ export function updateSkinCodeByCode(data) {
|
||||
/** 查询皮肤是否存在*/
|
||||
export function querySkinCodeExistByCode(code) {
|
||||
return request({
|
||||
url: `/api/mapSkin/${code}/exist`,
|
||||
url: `/api/realLine/${code}/exist`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -63,7 +63,7 @@ export function querySkinCodeExistByCode(code) {
|
||||
/** 获取皮肤列表*/
|
||||
export function getSkinCodeList() {
|
||||
return request({
|
||||
url: `/api/mapSkin/list`,
|
||||
url: `/api/realLine/list`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -121,15 +121,15 @@ export function getOperateTrainingList(data) {
|
||||
method: 'get',
|
||||
params: {
|
||||
productType: data.productType,
|
||||
skinCode: data.skinCode
|
||||
mapId: data.mapId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 另存为 操作定义
|
||||
export function postOperateSaveAs(skinCode, other) {
|
||||
export function postOperateSaveAs(mapId, other) {
|
||||
return request({
|
||||
url: `/api/operate/${skinCode}/saveAs/${other}`,
|
||||
url: `/api/operate/${mapId}/saveAs/${other}`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
@ -1,15 +1,5 @@
|
||||
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查询发布运行图列表
|
||||
export function queryRunPlanList(skinCode) {
|
||||
export function queryRunPlanList(mapId) {
|
||||
return request({
|
||||
url: `/api/runPlan/template/skin/${skinCode}`,
|
||||
url: `/api/runPlan/template/${mapId}/list`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
@ -411,7 +391,7 @@ export function postSchedulingCommonGenerate(mapId) {
|
||||
// 从加载计划创建每日计划
|
||||
export function postRunPlanTemplate(data) {
|
||||
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'
|
||||
});
|
||||
}
|
||||
|
@ -119,5 +119,6 @@ export default {
|
||||
review: 'Review',
|
||||
explanation: 'Explanation',
|
||||
courseDetails: 'Course details',
|
||||
courseTree: 'Course tree:'
|
||||
courseTree: 'Course tree:',
|
||||
mapName:'Map Name'
|
||||
};
|
||||
|
@ -118,6 +118,7 @@ export default {
|
||||
review: '查看',
|
||||
explanation: '驳回说明',
|
||||
courseDetails: '课程详情',
|
||||
courseTree: '课程树:'
|
||||
courseTree: '课程树:',
|
||||
mapName:'地图名称'
|
||||
};
|
||||
|
||||
|
@ -82,7 +82,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
@ -245,13 +244,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
|
@ -1,12 +1,26 @@
|
||||
<template>
|
||||
<el-dialog class="fuzhou_01 route-create" :title="title" :visible.sync="show" width="580px" label-position="top"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
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;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="列车:" prop="trainCode">
|
||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||
<el-option v-for="item in trainList" :key="item.code" :label="item.trainNumber"
|
||||
:value="item.code"></el-option>
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.trainNumber"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="列车车次:" prop="trainNo">
|
||||
@ -17,8 +31,7 @@
|
||||
</el-form-item> -->
|
||||
<el-form-item label="列车方向:" prop="direction">
|
||||
<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>
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||
</el-select>
|
||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||
</el-form-item>
|
||||
@ -30,17 +43,16 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -65,7 +77,7 @@
|
||||
trainNo: '',
|
||||
direction: '',
|
||||
selected: null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -87,17 +99,10 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (Object.keys(map || {}).length) {
|
||||
getPublishTrainList(map.skinCode).then(response => {
|
||||
this.trainList = response.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车列表失败`);
|
||||
})
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
@ -118,12 +123,12 @@
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
val: '' + this.direction + '::' + this.trainCode
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
@ -137,10 +142,10 @@
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -151,5 +156,5 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,19 +1,31 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm route-create" :title="title" :visible.sync="show" width="580px"
|
||||
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<el-dialog
|
||||
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;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item label="列车:" prop="trainCode">
|
||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
|
||||
:value="item.code"></el-option>
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.groupNumber"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="列车方向:" prop="direction">
|
||||
<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>
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -24,18 +36,17 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
components: {
|
||||
NoticeInfo
|
||||
@ -60,7 +71,7 @@
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
selected: null
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -82,17 +93,10 @@
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (Object.keys(map || {}).length) {
|
||||
getPublishTrainList(map.skinCode).then(response => {
|
||||
this.trainList = response.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车列表失败`);
|
||||
})
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
@ -114,12 +118,12 @@
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
val: '' + this.direction + '::' + this.trainCode
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
@ -133,10 +137,10 @@
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Section.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -147,5 +151,5 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationListBySkinCode } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
|
||||
@ -118,9 +118,10 @@ export default {
|
||||
},
|
||||
loadRunData() {
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
const mapId = this.$route.query.mapId;
|
||||
this.$store.dispatch('runPlan/clear');
|
||||
if (skinCode) {
|
||||
getStationListBySkinCode(skinCode).then(response => {
|
||||
if (mapId) {
|
||||
getStationList(mapId).then(response => {
|
||||
const stations = response.data;
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||
|
@ -119,10 +119,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import XLSX from 'xlsx';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { importRunPlan } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -269,7 +266,6 @@ export default {
|
||||
},
|
||||
hookClick(item, event) {
|
||||
this.closeMenu();
|
||||
// launchFullscreen();
|
||||
setTimeout(() => {
|
||||
if (item && typeof item.click == 'function') {
|
||||
item.click();
|
||||
|
@ -97,7 +97,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
@ -201,13 +200,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
|
@ -33,7 +33,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
@ -88,13 +87,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (Object.keys(map || {}).length) {
|
||||
getPublishTrainList(map.skinCode).then(response => {
|
||||
this.trainList = response.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取列车列表失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
|
@ -1,19 +1,28 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
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">
|
||||
<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-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<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-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<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-col>
|
||||
</el-row>
|
||||
@ -21,9 +30,12 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
||||
:value="train.groupNumber">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -42,12 +54,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'TrainCreateNumber',
|
||||
components: {
|
||||
},
|
||||
@ -59,17 +70,17 @@
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:'',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
||||
],
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -85,33 +96,26 @@
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '新建车组号'
|
||||
return '新建车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel ={
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:'',
|
||||
}
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
@ -128,11 +132,11 @@
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -144,17 +148,17 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -163,7 +167,7 @@
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
|
@ -1,19 +1,28 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
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">
|
||||
<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-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<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-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<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-col>
|
||||
</el-row>
|
||||
@ -21,9 +30,12 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
||||
:value="train.groupNumber">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -42,12 +54,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'TrainDeleteNumber',
|
||||
components: {
|
||||
},
|
||||
@ -59,12 +70,12 @@
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:'',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -80,33 +91,26 @@
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除车组号'
|
||||
return '删除车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel ={
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:'',
|
||||
}
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
@ -123,10 +127,10 @@
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation,
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -139,17 +143,17 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -158,7 +162,7 @@
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
|
@ -234,7 +234,6 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
|
@ -49,7 +49,6 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'TrainEditNumber',
|
||||
@ -100,19 +99,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel ={
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
|
@ -1,19 +1,28 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-dialog
|
||||
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">
|
||||
<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-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<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-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<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-col>
|
||||
</el-row>
|
||||
@ -21,9 +30,12 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
||||
:value="train.groupNumber">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -32,13 +44,13 @@
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="purposeStationName">
|
||||
<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-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="purposeTrainWindowCode" >
|
||||
<el-form-item prop="purposeTrainWindowCode">
|
||||
<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-col>
|
||||
</el-row>
|
||||
@ -56,12 +68,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'TrainMoveNumber',
|
||||
components: {
|
||||
},
|
||||
@ -75,11 +86,11 @@
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: '',
|
||||
purposeTrainWindowCode: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -95,36 +106,29 @@
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动车组号'
|
||||
return '移动车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
console.log('operate',operate,selected);
|
||||
console.log('operate', operate, selected);
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel ={
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: '',
|
||||
}
|
||||
purposeTrainWindowCode: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
@ -141,10 +145,10 @@
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation,
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -157,16 +161,16 @@
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -176,7 +180,7 @@
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationListBySkinCode } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
|
||||
@ -119,9 +119,10 @@ export default {
|
||||
},
|
||||
loadRunData() {
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
const mapId = this.$route.query.mapId;
|
||||
this.$store.dispatch('runPlan/clear');
|
||||
if (skinCode) {
|
||||
getStationListBySkinCode(skinCode).then(response => {
|
||||
if (mapId) {
|
||||
getStationList(mapId).then(response => {
|
||||
const stations = response.data;
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||
|
@ -119,10 +119,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import XLSX from 'xlsx';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { importRunPlan } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -269,7 +266,6 @@ export default {
|
||||
},
|
||||
hookClick(item, event) {
|
||||
this.closeMenu();
|
||||
// launchFullscreen();
|
||||
setTimeout(() => {
|
||||
if (item && typeof item.click == 'function') {
|
||||
item.click();
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationListBySkinCode } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
|
||||
@ -118,9 +118,10 @@ export default {
|
||||
},
|
||||
loadRunData() {
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
const mapId = this.$route.query.mapId;
|
||||
this.$store.dispatch('runPlan/clear');
|
||||
if (skinCode) {
|
||||
getStationListBySkinCode(skinCode).then(response => {
|
||||
if (mapId) {
|
||||
getStationList(mapId).then(response => {
|
||||
const stations = response.data;
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||
|
@ -119,10 +119,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import XLSX from 'xlsx';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { importRunPlan } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -269,7 +266,6 @@ export default {
|
||||
},
|
||||
hookClick(item, event) {
|
||||
this.closeMenu();
|
||||
// launchFullscreen();
|
||||
setTimeout(() => {
|
||||
if (item && typeof item.click == 'function') {
|
||||
item.click();
|
||||
|
@ -84,7 +84,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||
@ -273,15 +272,7 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map.skinCode) {
|
||||
getPublishTrainList(map.skinCode).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.obtainTrainGroupNumberFailed'));
|
||||
});
|
||||
}
|
||||
},
|
||||
loadInitData(map) {},
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
@ -39,7 +39,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
|
@ -131,7 +131,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuTrain.moveTrainId');
|
||||
return this.$t('menu.menuTrain.switchTrainId');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { runPlanTemplateList } from '@/api/runplan';
|
||||
import { getStationListBySkinCode } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
|
||||
@ -118,9 +118,10 @@ export default {
|
||||
},
|
||||
loadRunData() {
|
||||
const skinCode = this.$route.query.skinCode;
|
||||
const mapId = this.$route.query.mapId;
|
||||
this.$store.dispatch('runPlan/clear');
|
||||
if (skinCode) {
|
||||
getStationListBySkinCode(skinCode).then(response => {
|
||||
if (mapId) {
|
||||
getStationList(mapId).then(response => {
|
||||
const stations = response.data;
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||
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 Mapedit from '@/views/map/mapdraft/index';
|
||||
// import Runplan from '@/views/map/runplan/index';
|
||||
import RunplanView from '@/views/map/runplan/chart';
|
||||
|
||||
import Trainingrecord from '@/views/lesson/trainingrecord/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 TeachDetail from '@/views/teach/detail/index';
|
||||
import TeachPractical from '@/views/teach/practical/index';
|
||||
import TeachHome from '@/views/teach/index';
|
||||
import Pay from '@/views/components/pay/index';
|
||||
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 ProductStatus from '@/views/publish/productStatus/index';
|
||||
import PublishLesson from '@/views/publish/publishLesson/index';
|
||||
import RunplanView from '@/views/publish/runPlanView/index';
|
||||
|
||||
import IbpEdit from '@/views/ibp/ibpDraft/ibpEdit/index';
|
||||
import TrainingPlatform from '@/views/trainingPlatform/index';
|
||||
@ -603,11 +602,6 @@ export const asyncRouter = [
|
||||
component: ExamDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'practical/:trainingId/:lessonId',
|
||||
component: TeachPractical,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'pay/:lessonId',
|
||||
component: Pay,
|
||||
|
@ -3,9 +3,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 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.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
|
@ -1,40 +1,10 @@
|
||||
import store from '@/store';
|
||||
import { getPublishMapVersion, getPublishMapDetail, getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map';
|
||||
import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/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) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getPublishMapVersionById(mapId).then(resp => {
|
||||
|
@ -1,27 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<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>
|
||||
<run-plan-operate ref='applyReject' @reloadTable="reloadTable" @create="handleConfirmReject" :title="$t('approval.rejectRunPlan')" type="applyReject">
|
||||
</run-plan-operate>
|
||||
<run-plan-operate ref="applyPassed" :title="$t('approval.passedRunPlan')" @reloadTable="reloadTable" type="applyPassed" @create="handleConfirmPass" />
|
||||
<run-plan-operate ref="applyReject" :title="$t('approval.rejectRunPlan')" @reloadTable="reloadTable" type="applyReject" @create="handleConfirmReject" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RunPlanOperate from './operate';
|
||||
import { reviewRunPlanList,publishRunPlan,rejectRunPlan,previewRunPlan } from '@/api/designPlatform';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
// import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import RunPlanOperate from './operate';
|
||||
import { reviewRunPlanList, publishRunPlan, rejectRunPlan, previewRunPlan } from '@/api/designPlatform';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
// import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
export default {
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
export default {
|
||||
name: 'ScriptApproval',
|
||||
components: {
|
||||
RunPlanOperate
|
||||
},
|
||||
data() {
|
||||
return{
|
||||
return {
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -64,7 +62,7 @@
|
||||
prop: 'mapId ',
|
||||
width:250,
|
||||
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 ''; }
|
||||
},
|
||||
{
|
||||
@ -75,7 +73,7 @@
|
||||
title: this.$t('approval.applyTime'),
|
||||
prop: 'uploadTime',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.uploadTime.replace("T"," ")},
|
||||
columnValue: (row) => { return row.uploadTime.replace('T', ' '); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
@ -102,18 +100,18 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
},
|
||||
mounted(){
|
||||
this.loadInitData();
|
||||
},
|
||||
beforeDestroy(){
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
reloadTable() {
|
||||
@ -129,8 +127,8 @@
|
||||
// 获取地图
|
||||
this.mapList = [];
|
||||
const res = await listPublishMap();
|
||||
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name } });
|
||||
this.queryForm.queryObject.mapId.config.data=this.mapList;
|
||||
this.mapList = res.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
@ -138,44 +136,43 @@
|
||||
queryFunction(params) {
|
||||
return reviewRunPlanList(params);
|
||||
},
|
||||
applyPassed(index,row){
|
||||
applyPassed(index, row) {
|
||||
this.$refs.applyPassed.doShow(row);
|
||||
},
|
||||
applyReject(index,row){
|
||||
applyReject(index, row) {
|
||||
this.$refs.applyReject.doShow(row);
|
||||
},
|
||||
runPlanPreview(index,row){
|
||||
runPlanPreview(index, row) {
|
||||
previewRunPlan(row.id).then(resp => {
|
||||
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 });
|
||||
launchFullscreen();
|
||||
}).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){
|
||||
publishRunPlan(data.id,data).then(resp => {
|
||||
if(resp.data.length<=0){
|
||||
handleConfirmPass(data) {
|
||||
publishRunPlan(data.id, data).then(resp => {
|
||||
if (resp.data.length <= 0) {
|
||||
this.$message.success(this.$t('approval.passedRunPlanSuccess'));
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${resp.data[0]}`);
|
||||
}
|
||||
this.reloadTable();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.passedRunPlanFailed')}: ${error.message}`);
|
||||
})
|
||||
});
|
||||
},
|
||||
handleConfirmReject(data){
|
||||
rejectRunPlan(data.id,data).then(resp => {
|
||||
handleConfirmReject(data) {
|
||||
rejectRunPlan(data.id, data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('approval.rejectRunPlanSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('approval.rejectRunPlanFailed')}: ${error.message}`);
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -49,15 +49,15 @@ export default {
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
// 获取城市列表
|
||||
this.filterOptions=[];
|
||||
this.filterOptions = [];
|
||||
|
||||
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;
|
||||
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;
|
||||
const cityList = resp.sort((a, b) => {
|
||||
return a.code.localeCompare(b.code);
|
||||
});
|
||||
|
||||
this.filterOptions=cityList;
|
||||
this.filterOptions = cityList;
|
||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
||||
|
||||
this.$emit('filterSelectChange', this.filterSelect);
|
||||
|
@ -63,5 +63,6 @@ export default {
|
||||
.system-time-box {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
background: #000;
|
||||
}
|
||||
</style>
|
||||
|
@ -21,7 +21,7 @@
|
||||
<span
|
||||
class="el-icon-tickets"
|
||||
:style="{color: data.valid ? 'green':''}"
|
||||
></span>
|
||||
/>
|
||||
<span :style="{color: data.valid ? 'green':''}"> {{ tnode.label }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
|
@ -79,10 +79,9 @@ import { getProductDetail } from '@/api/management/mapprd';
|
||||
import { runDiagramQuit, getSimulationInfo } from '@/api/simulation';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import Vue from 'vue';
|
||||
// import { UrlConfig } from '@/router/index';
|
||||
import {loadDraftScript} from '@/api/designPlatform';
|
||||
|
||||
// 三维
|
||||
@ -401,7 +400,7 @@ export default {
|
||||
if (rest && rest.code == 200) {
|
||||
const data = rest.data;
|
||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||
await this.loadMapData(detail.skinCode);
|
||||
await this.loadMapDataById(this.mapId);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
@ -417,9 +416,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -430,9 +428,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -443,9 +440,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -468,9 +464,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -535,16 +530,6 @@ export default {
|
||||
async quitQuest() {
|
||||
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加载地图数据
|
||||
async loadMapDataById(mapId) {
|
||||
|
@ -79,7 +79,7 @@ import { getProductDetail } from '@/api/management/mapprd';
|
||||
import { runDiagramQuit, loadScript, getSimulationInfo } from '@/api/simulation';
|
||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import Vue from 'vue';
|
||||
|
||||
@ -237,7 +237,6 @@ export default {
|
||||
$route() {
|
||||
this.$nextTick(() => {
|
||||
this.initLoadData();
|
||||
console.log(1111);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -394,7 +393,7 @@ export default {
|
||||
if (rest && rest.code == 200) {
|
||||
const data = rest.data;
|
||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||
await this.loadMapData(detail.skinCode);
|
||||
await this.loadMapDataById(this.mapId);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(`获取实训步骤数据失败`);
|
||||
@ -410,9 +409,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -423,8 +421,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
@ -435,10 +433,8 @@ export default {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -461,9 +457,8 @@ export default {
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||
this.$store.dispatch('training/setPrdType', '01');
|
||||
|
||||
if (parseInt(this.skinCode)) {
|
||||
await this.loadMapData(this.skinCode);
|
||||
|
||||
if (parseInt(this.mapId)) {
|
||||
await this.loadMapDataById(this.mapId);
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
@ -474,7 +469,7 @@ export default {
|
||||
},
|
||||
async runAddRolesLoadShow() {
|
||||
// this.$refs.addQuest.doShow();
|
||||
const row={id: this.$route.query.scriptId};
|
||||
const row = {id: this.$route.query.scriptId};
|
||||
this.$refs.addQuest.handleLoad(1, row);
|
||||
},
|
||||
// 选择脚本
|
||||
@ -485,7 +480,7 @@ export default {
|
||||
if (res && res.code == 200) {
|
||||
this.questId = parseInt(row.id);
|
||||
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);
|
||||
}
|
||||
// if (res.data && res.data.mapLocation) {
|
||||
@ -509,17 +504,6 @@ export default {
|
||||
async quitQuest() {
|
||||
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加载地图数据
|
||||
async loadMapDataById(mapId) {
|
||||
try {
|
||||
|
@ -125,7 +125,7 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
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();
|
||||
exitFullscreen();
|
||||
}).catch(() => {
|
||||
|
@ -6,23 +6,23 @@
|
||||
|
||||
<el-button-group>
|
||||
<!-- 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="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="!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="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="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="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
|
||||
</el-button-group>
|
||||
|
||||
<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.FAULT">{{$t('display.schema.faultOperation')}}</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-group>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getStationListBySkinCode, queryRunPlan } from '@/api/runplan';
|
||||
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||
import {getRpDetailByUserMapId} from '@/api/designPlatform';
|
||||
|
||||
@ -68,7 +68,7 @@ export default {
|
||||
isDemon() {
|
||||
return this.$route.params.mode === 'demon';
|
||||
},
|
||||
isDesignPlatform(){
|
||||
isDesignPlatform() {
|
||||
return this.$route.fullPath.includes('design/display/demon');
|
||||
}
|
||||
},
|
||||
@ -86,18 +86,19 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
console.log(this.$route.query, '=====');
|
||||
await this.loadRunData(this.$route.query);
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
if (opt && opt.skinCode) {
|
||||
if (opt && opt.mapId) {
|
||||
this.viewDisabled = true;
|
||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
||||
getStationList(opt.mapId).then(response => {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
if (this.$route.params.mode == 'plan') {
|
||||
// debugger;
|
||||
if(this.$route.query.from=="user"){
|
||||
if (this.$route.query.from == 'user') {
|
||||
// 测试运行图功能
|
||||
getRpDetailByUserMapId(this.$route.query.planId).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
@ -106,7 +107,7 @@ export default {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
// 测试运行图功能
|
||||
queryRunPlan(this.$route.query.planId).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
@ -117,7 +118,6 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
getEveryDayRunPlanData(this.group).then(resp => {
|
||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
viewRunQuest() {
|
||||
this.$emit('runQuestLoadShow');
|
||||
},
|
||||
viewScriptRoles(){
|
||||
viewScriptRoles() {
|
||||
this.$emit('runAddRolesLoadShow');
|
||||
},
|
||||
switchMode(swch) {
|
||||
|
@ -158,7 +158,7 @@ export default {
|
||||
updateTime: res.data.updateTime
|
||||
};
|
||||
}).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,
|
||||
examQuestionId: obj.id,
|
||||
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.$emit('refresh');
|
||||
|
@ -128,7 +128,7 @@ export default {
|
||||
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.getExpandList(this.courseModel.id);
|
||||
@ -166,7 +166,7 @@ export default {
|
||||
},
|
||||
clickEvent(obj, node, data) {
|
||||
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 {
|
||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
@ -182,24 +182,24 @@ export default {
|
||||
},
|
||||
nodeExpand(obj, node, ele) {
|
||||
const key = obj.id;
|
||||
this.expandList = this.expandList.filter(item => item!==key);
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
this.expandList.push(key);
|
||||
setSessionStorage('trainingExamExpandList'+this.courseModel.id, this.expandList);
|
||||
setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
|
||||
},
|
||||
nodeCollapse(obj, node, ele) {
|
||||
const key = obj.id;
|
||||
this.expandList = this.expandList.filter(item => item!==key);
|
||||
setSessionStorage('trainingExamExpandList'+this.courseModel.id, this.expandList);
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
|
||||
},
|
||||
getExpandList(id) {
|
||||
let expand = getSessionStorage('trainingExamExpandList'+id);
|
||||
expand = expand?(expand+'').split(','):'';
|
||||
let expand = getSessionStorage('trainingExamExpandList' + id);
|
||||
expand = expand ? (expand + '').split(',') : '';
|
||||
if (expand instanceof Array) {
|
||||
this.expandList = expand;
|
||||
}
|
||||
},
|
||||
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}`});
|
||||
}
|
||||
}
|
||||
|
@ -202,13 +202,14 @@ export default {
|
||||
userExamId: this.userExam.id,
|
||||
examQuestionId: this.examList[0].id,
|
||||
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 });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.$messageBox( this.$t('error.createSimulationFailed') +`: ${error.message}`);
|
||||
this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
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 { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { loadMapData } from '@/utils/loaddata';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { getUserRoles, deljointTrainRoom } from '@/api/chat';
|
||||
import { runDiagramOver, getSimulationInfo } from '@/api/simulation';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
@ -131,7 +131,7 @@ export default {
|
||||
}
|
||||
},
|
||||
'$store.state.socket.chatContentList': function (val) { // 综合演练被踢出房间
|
||||
if (val.type === 'userRoomKickOut'&&val.oneself) {
|
||||
if (val.type === 'userRoomKickOut' && val.oneself) {
|
||||
this.$router.push({ path: `/` });
|
||||
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;
|
||||
}
|
||||
}
|
||||
await this.getTrainDetail(this.skinCode);
|
||||
await this.getTrainDetail();
|
||||
} else {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
async getTrainDetail(skinCode) {
|
||||
async getTrainDetail() {
|
||||
try {
|
||||
await loadMapData(skinCode);
|
||||
await loadMapDataById(this.mapId);
|
||||
await this.$store.dispatch('training/setMapDefaultState');
|
||||
} catch (error) {
|
||||
this.$messageBox(this.$t('error.getMapDataFailed'));
|
||||
@ -344,7 +344,7 @@ export default {
|
||||
showdriving() {
|
||||
this.panelShow = true;
|
||||
this.drivingShow = false;
|
||||
this.ibpShow =false;
|
||||
this.ibpShow = false;
|
||||
},
|
||||
showIbp(deviceCode) {
|
||||
this.drivingShow = false;
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
<el-button-group>
|
||||
<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 v-if="userRole == 'Admin'">
|
||||
<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 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>
|
||||
</el-button-group>
|
||||
|
||||
@ -29,15 +29,15 @@
|
||||
size="small"
|
||||
@change="changeOperateMode(mode)"
|
||||
>
|
||||
<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.NORMAL">{{ $t('joinTraining.normalOperation') }}</el-radio-button>
|
||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('joinTraining.faultOperation') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { getStationListBySkinCode } from '@/api/runplan';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
@ -97,14 +97,15 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
this.userId = this.$store.state.user.id;
|
||||
console.log(this.$route.query);
|
||||
await this.loadRunData(this.$route.query);
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
this.$store.dispatch('runPlan/clear').then(resp => {
|
||||
if (opt && opt.skinCode) {
|
||||
if (opt && opt.mapId) {
|
||||
this.viewDisabled = true;
|
||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
||||
getStationList(opt.mapId).then(response => {
|
||||
const stations = response.data;
|
||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||
getEveryDayRunPlanData(this.group).then(resp => {
|
||||
|
@ -119,7 +119,7 @@ export default {
|
||||
} else {
|
||||
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 = this.productList.filter(elem => { return elem.prdType != '03'; });
|
||||
});
|
||||
|
@ -19,7 +19,7 @@ import {
|
||||
deleteTrainingRulesData,
|
||||
getPlaceholderList
|
||||
} from '@/api/management/operation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import TrainingEdit from './addEdit';
|
||||
import AddBatch from './addBatch';
|
||||
import SaveAs from './saveAs.vue';
|
||||
@ -37,7 +37,7 @@ export default {
|
||||
placeholderMap: {},
|
||||
trainingOperateTypeMap: {},
|
||||
trainingTypeList: [],
|
||||
skinCodeList: [],
|
||||
mapIdList: [],
|
||||
totals: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
@ -77,12 +77,12 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('lesson.skinType'),
|
||||
prop: 'skinCode',
|
||||
title: this.$t('lesson.mapName'),
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: row => {
|
||||
return this.$convertField(row.skinCode, this.skinCodeList, [
|
||||
'code',
|
||||
return this.$convertField(row.id, this.mapIdList, [
|
||||
'id',
|
||||
'name'
|
||||
]);
|
||||
},
|
||||
@ -210,10 +210,10 @@ export default {
|
||||
});
|
||||
});
|
||||
|
||||
// 获取皮肤列表
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
// 获取地图列表
|
||||
this.mapIdList = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapIdList = response.data;
|
||||
});
|
||||
|
||||
// 获取实训类型
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
<script>
|
||||
import { postOperateSaveAs } from '@/api/management/operation';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'AddBatch',
|
||||
@ -29,7 +29,7 @@ export default {
|
||||
skinCodeFrom: '',
|
||||
skinCodeTo: ''
|
||||
},
|
||||
skinCodeList: []
|
||||
mapIdList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -43,14 +43,14 @@ export default {
|
||||
label: this.$t('lesson.skinTypeFrom'),
|
||||
type: 'select',
|
||||
required: true,
|
||||
options: this.skinCodeList
|
||||
options: this.mapIdList
|
||||
},
|
||||
{
|
||||
prop: 'skinCodeTo',
|
||||
label: this.$t('lesson.skinTypeTo'),
|
||||
type: 'select',
|
||||
required: true,
|
||||
options: this.skinCodeList
|
||||
options: this.mapIdList
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -84,13 +84,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
// 获取皮肤列表
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
this.skinCodeList = response.data.map(item => {
|
||||
// 获取已发布地图列表
|
||||
this.mapIdList = [];
|
||||
listPublishMap().then(response => {
|
||||
this.mapIdList = response.data.map(item => {
|
||||
const params = {};
|
||||
params.label = item.name;
|
||||
params.value = item.code;
|
||||
params.value = item.id;
|
||||
return params;
|
||||
});
|
||||
});
|
||||
|
@ -4,10 +4,10 @@
|
||||
<el-form-item v-if="isAdd" :label="this.$t('lesson.trainingName')+':'" prop="name">
|
||||
<el-input v-model="operateModel.name" style="width: 300px" />
|
||||
</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-option
|
||||
v-for="option in skinCodeList"
|
||||
v-for="option in mapIdList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
@ -70,7 +70,7 @@ import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||
export default {
|
||||
name: 'TrainingAdd',
|
||||
props: {
|
||||
skinCodeList: {
|
||||
mapIdList: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
@ -197,7 +197,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.skinCodeChoose(this.$route.params.skinCode);
|
||||
this.mapIdChoose(this.$route.query.mapId);
|
||||
},
|
||||
methods: {
|
||||
show(data) {
|
||||
@ -211,11 +211,11 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.loading = false;
|
||||
},
|
||||
skinCodeChoose(skinCode) {
|
||||
mapIdChoose(mapId) {
|
||||
this.operateModel.prdCode = '';
|
||||
this.productList = [];
|
||||
if (skinCode) {
|
||||
getCommodityMapProduct(skinCode).then((response) => {
|
||||
if (mapId) {
|
||||
getCommodityMapProduct(mapId).then((response) => {
|
||||
this.productList = response.data;
|
||||
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
||||
});
|
||||
@ -225,9 +225,10 @@ export default {
|
||||
this.trainingTypeMap = {};
|
||||
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 res = await getOperateTrainingList({ skinCode: skinCodeObj.code, productType: prdTypeObj.prdType });
|
||||
const res = await getOperateTrainingList({ skinCode: skinCodeObj.mapId, productType: prdTypeObj.prdType });
|
||||
if (res && res.code == 200) {
|
||||
this.trainingTypeLists = res.data;
|
||||
this.trainingTypeList.forEach(elem => {
|
||||
|
@ -3,7 +3,7 @@
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<training-draft
|
||||
ref="draftTrain"
|
||||
:skin-code-list="skinCodeList"
|
||||
:map-id-list="mapIdList"
|
||||
:training-type-list="trainingTypeList"
|
||||
:training-operate-type-map="trainingOperateTypeMap"
|
||||
@refresh="reloadTable"
|
||||
@ -21,7 +21,7 @@ import { pageQueryTraining } from '@/api/jmap/training';
|
||||
import { trainingNotify } from '@/api/simulation';
|
||||
import { getCommodityMapProduct, getProductList } from '@/api/management/mapprd';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import TrainingDraft from './draft';
|
||||
import localStore from 'storejs';
|
||||
@ -33,7 +33,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
skinCodeList: [],
|
||||
mapIdList: [],
|
||||
trainingTypeList: [],
|
||||
prdTypeList: [],
|
||||
trainingOperateTypeMap: {},
|
||||
@ -93,7 +93,7 @@ export default {
|
||||
title: this.$t('lesson.skinType'),
|
||||
prop: 'skinCode',
|
||||
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 ''; }
|
||||
},
|
||||
{
|
||||
@ -167,12 +167,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
this.skinCodeList = [];
|
||||
this.mapIdList = [];
|
||||
this.queryForm.queryObject.prdCode.config.data = [];
|
||||
getSkinCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
listPublishMap().then(response => {
|
||||
this.mapIdList = response.data;
|
||||
});
|
||||
getCommodityMapProduct(this.$route.params.skinCode).then((response) => {
|
||||
getCommodityMapProduct(this.$route.query.mapId).then((response) => {
|
||||
const productList = response.data;
|
||||
if (productList && productList.length > 0) {
|
||||
productList.forEach(elem => {
|
||||
|
@ -29,7 +29,7 @@ export default {
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '60px',
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
|
||||
// { prop: 'nickname', label: '昵称', type: 'text' },
|
||||
@ -45,6 +45,9 @@ export default {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
|
||||
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||
],
|
||||
roles: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectPermission'), trigger: 'change' }
|
||||
]
|
||||
// nickname: [
|
||||
// { required: true, message: this.$t('rules.pleaseInputNickName'), trigger: 'blur' },
|
||||
|
@ -124,17 +124,10 @@ export default {
|
||||
this.formModel.userId = item.id;
|
||||
},
|
||||
async mapChange(val) {
|
||||
let skinCode = '';
|
||||
this.mapPrdList = [];
|
||||
this.formModel.mapPrdCode = '';
|
||||
if (this.LessonList.length) {
|
||||
this.LessonList.forEach(item => {
|
||||
if (item.value == val) {
|
||||
skinCode = item.skinCode;
|
||||
}
|
||||
});
|
||||
try {
|
||||
const res = await getCommodityMapProduct(skinCode);
|
||||
const res = await getCommodityMapProduct(val);
|
||||
const data = res.data;
|
||||
if (data && data.length) {
|
||||
data.forEach(elem => {
|
||||
@ -144,7 +137,6 @@ export default {
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
},
|
||||
show(data) {
|
||||
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>
|
||||
|
||||
<script>
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||
import { OperatorModel, PermissionType } from '@/scripts/ConstDic';
|
||||
import { getTotalRemains } from '@/api/management/author';
|
||||
@ -208,14 +207,12 @@ export default {
|
||||
this.formModel.prdCode = '';
|
||||
this.formModel.lessonId = '';
|
||||
this.mapProductList = [];
|
||||
getPublishMapInfo(mapId).then(resp => {
|
||||
getCommodityMapProduct(resp.data.skinCode).then(rest => {
|
||||
getCommodityMapProduct(mapId).then(rest => {
|
||||
const list = rest.data || [];
|
||||
this.mapProductList = list.map(elem => {
|
||||
return { value: elem.code, label: elem.name };
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
mapProductChange(prdCode) {
|
||||
this.formModel.lessonId = '';
|
||||
|
@ -70,7 +70,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPublishMap, getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||
import { packagePermissionDistribute } from '@/api/management/distribute';
|
||||
@ -142,8 +142,7 @@ export default {
|
||||
},
|
||||
async computedMapProduct(item) {
|
||||
let name = '';
|
||||
const resp = await getPublishMapInfo(item.mapId);
|
||||
const rest = await getCommodityMapProduct(resp.data.skinCode);
|
||||
const rest = await getCommodityMapProduct(item.mapId);
|
||||
const list = rest.data || [];
|
||||
list.forEach(elem => {
|
||||
if (elem.id == item.mapProductCode) {
|
||||
@ -206,14 +205,12 @@ export default {
|
||||
item.prdCode == elem.prdCode &&
|
||||
item.permissionType == elem.permissionType;
|
||||
});
|
||||
getPublishMapInfo(item.mapId).then(resp => {
|
||||
getCommodityMapProduct(resp.data.skinCode).then(rest => {
|
||||
getCommodityMapProduct(item.mapId).then(rest => {
|
||||
const list = rest.data || [];
|
||||
this.mapProductList = list.map(elem => {
|
||||
return { value: elem.code, label: elem.name };
|
||||
});
|
||||
});
|
||||
});
|
||||
if (index < 0) {
|
||||
this.ruleList.push(item);
|
||||
} else {
|
||||
|
@ -1,41 +1,45 @@
|
||||
<template>
|
||||
<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="runPlanList">{{$t('planMonitor.openRunPlan.runPlanList')}}</div>
|
||||
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">{{$t('planMonitor.createRunningDiagram')}}</el-button>
|
||||
<div class="runPlanList">{{ $t('planMonitor.openRunPlan.runPlanList') }}</div>
|
||||
<el-button v-if="isCreate" size="small" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
|
||||
</div>
|
||||
<el-table :data="runPlanList" height="500" stripe
|
||||
<el-table
|
||||
:data="runPlanList"
|
||||
height="500"
|
||||
stripe
|
||||
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 :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">
|
||||
<el-tag>{{handlerStatus(scope.row)}}</el-tag>
|
||||
<el-tag>{{ handlerStatus(scope.row) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
|
||||
prop="explanation"
|
||||
show-overflow-tooltip
|
||||
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
|
||||
:label="this.$t('planMonitor.explanation')">
|
||||
</el-table-column>
|
||||
:label="this.$t('planMonitor.explanation')"
|
||||
/>
|
||||
<el-table-column :label="this.$t('planMonitor.creationDate')">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column :label="this.$t('global.operate')" width="400">
|
||||
<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 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 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 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 size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)" v-if="scope.row.status === '1'">{{$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="success" @click="handleConfirm(scope.row)">{{ $t('planMonitor.load') }}</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 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 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 v-if="scope.row.status === '1'" size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)">{{ $t('planMonitor.preview') }}</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>
|
||||
</el-table-column>
|
||||
</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" -->
|
||||
<edit-plan-name ref="editPlan" @renewal="getRunPlanList" />
|
||||
</el-card>
|
||||
@ -48,7 +52,7 @@ import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
export default {
|
||||
name: 'userRunPlanList',
|
||||
name: 'UserRunPlanList',
|
||||
components: {
|
||||
CreateEmptyPlan,
|
||||
EditPlanName
|
||||
@ -76,7 +80,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 60 -30;
|
||||
return this.$store.state.app.height - 60 - 30;
|
||||
},
|
||||
skinCode() {
|
||||
return this.$route.query.skinCode || '02';
|
||||
@ -86,24 +90,24 @@ export default {
|
||||
this.$store.state.user.roles.includes('05');
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode);
|
||||
},
|
||||
mounted(){
|
||||
this.getRunPlanList();
|
||||
},
|
||||
watch: {
|
||||
'$route' () {
|
||||
this.getRunPlanList();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode);
|
||||
},
|
||||
mounted() {
|
||||
this.getRunPlanList();
|
||||
},
|
||||
methods:{
|
||||
refresh(){
|
||||
refresh() {
|
||||
this.getRunPlanList();
|
||||
},
|
||||
getRunPlanList() {
|
||||
if(/^\/design\/userlist/.test(this.$route.fullPath)){
|
||||
this.isCreate=false;
|
||||
if (/^\/design\/userlist/.test(this.$route.fullPath)) {
|
||||
this.isCreate = false;
|
||||
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
|
||||
this.runPlanList = resp.data;
|
||||
this.runPlanList.forEach(elem => {
|
||||
@ -113,9 +117,8 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('planMonitor.openRunPlan.getRunPlanListFail'));
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.isCreate=true;
|
||||
} else {
|
||||
this.isCreate = true;
|
||||
getRpListByMapId(this.$route.params.mapId).then((resp) => {
|
||||
this.runPlanList = resp.data;
|
||||
this.runPlanList.forEach(elem => {
|
||||
@ -130,13 +133,13 @@ export default {
|
||||
// dispatchOperate(){
|
||||
// this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
||||
// },
|
||||
dispatchDialog(){
|
||||
dispatchDialog() {
|
||||
this.$refs['createEmptyPlan'].doShow();
|
||||
},
|
||||
handleCreate(){
|
||||
handleCreate() {
|
||||
this.$refs['createEmptyPlan'].doShow();
|
||||
},
|
||||
handleConfirm(row){
|
||||
handleConfirm(row) {
|
||||
this.loadRunPlanData({
|
||||
planId: row.id,
|
||||
skinCode: this.$route.query.skinCode,
|
||||
@ -156,10 +159,9 @@ export default {
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
} else {
|
||||
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 });
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||
}
|
||||
}
|
||||
@ -185,19 +187,19 @@ export default {
|
||||
}).catch(() => { });
|
||||
},
|
||||
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'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.hasRelease){
|
||||
publishRunPlan(row.id,{runPlanName: name}).then(resp => {
|
||||
if (this.hasRelease) {
|
||||
publishRunPlan(row.id, {runPlanName: name}).then(resp => {
|
||||
this.$message.success(this.$t('tip.publishRunPlanSuccess'));
|
||||
this.refresh();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.publishRunPlanFail'));
|
||||
this.refresh();
|
||||
})
|
||||
});
|
||||
} else {
|
||||
releaseOrCancelRunPlan(row.id, '1').then(resp => {
|
||||
this.$message.success(this.$t('tip.applyRunPlanSuccess'));
|
||||
@ -205,28 +207,28 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.applyRunPlanFail'));
|
||||
this.refresh();
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
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'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type:'warning'
|
||||
}).then(() => {
|
||||
releaseOrCancelRunPlan(row.id,'0').then(resp=> {
|
||||
releaseOrCancelRunPlan(row.id, '0').then(resp=> {
|
||||
this.$message.success(this.$t('tip.cancelRunPlanSuccess'));
|
||||
this.refresh();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.cancelRunPlanFail'))
|
||||
this.$messageBox(this.$t('tip.cancelRunPlanFail'));
|
||||
this.refresh();
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
},
|
||||
handlerStatus(row) {
|
||||
let lessonStatus = '';
|
||||
switch (row.status){
|
||||
switch (row.status) {
|
||||
case '0':
|
||||
lessonStatus = this.$t('lesson.notRelease');
|
||||
break;
|
||||
@ -243,17 +245,17 @@ export default {
|
||||
return lessonStatus;
|
||||
},
|
||||
handleTime(time) {
|
||||
return time.replace("T"," ");
|
||||
return time.replace('T', ' ');
|
||||
},
|
||||
handlePreview(row){
|
||||
handlePreview(row) {
|
||||
previewRunPlan(row.id).then(resp => {
|
||||
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 });
|
||||
launchFullscreen();
|
||||
}).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: {
|
||||
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) {
|
||||
this.publishMapList = res.data;
|
||||
}
|
||||
@ -164,7 +164,7 @@ export default {
|
||||
// this.jump(resp.data, this.newModel.name);
|
||||
this.doClose();
|
||||
}).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();
|
||||
});
|
||||
}
|
||||
@ -179,7 +179,7 @@ export default {
|
||||
this.$emit('refresh');
|
||||
this.doClose();
|
||||
}).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();
|
||||
});
|
||||
}
|
||||
|
@ -25,9 +25,9 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { getStationListBySkinCode, queryRunPlan } from '@/api/runplan';
|
||||
import {getRpDetailByUserMapId,getUserMapDetailByMapId} from '@/api/designPlatform';
|
||||
import { loadMapData } from '@/utils/loaddata';
|
||||
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||
import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatform';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import DataTable from './menus/components/dataTable';
|
||||
|
||||
@ -358,12 +358,11 @@ export default {
|
||||
},
|
||||
async loadChartPage() {
|
||||
try {
|
||||
if(/^\/plan\/usertool/.test(this.$route.fullPath)){
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
getUserMapDetailByMapId(this.$route.query.mapId).then(resp => {
|
||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||
});
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||
});
|
||||
@ -371,15 +370,15 @@ export default {
|
||||
this.planConvert = this.$theme.loadPlanConvert(this.skinCode);
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
this.loadInitChart().then(() => {
|
||||
if (this.skinCode) {
|
||||
loadMapData(this.skinCode);
|
||||
getStationListBySkinCode(this.$route.query.skinCode).then(resp => {
|
||||
if (this.$route.query.mapId) {
|
||||
loadMapDataById(this.$route.query.mapId);
|
||||
getStationList(this.$route.query.mapId).then(resp => {
|
||||
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
||||
this.loadInitData();
|
||||
if (this.planId) {
|
||||
this.myChart && this.myChart.showLoading();
|
||||
|
||||
if(/^\/plan\/usertool/.test(this.$route.fullPath)){
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
getRpDetailByUserMapId(this.planId).then(rest => {
|
||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||
@ -390,7 +389,7 @@ export default {
|
||||
this.myChart && this.myChart.hideLoading();
|
||||
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
queryRunPlan(this.planId).then(rest => {
|
||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||
@ -403,7 +402,6 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
this.clearCanvas();
|
||||
}
|
||||
@ -435,7 +433,7 @@ export default {
|
||||
this.viewDisabled = false;
|
||||
} catch (error) {
|
||||
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() {
|
||||
|
@ -34,7 +34,8 @@ export default {
|
||||
formMdoel: {
|
||||
id: 0,
|
||||
skinCode: '',
|
||||
name: ''
|
||||
name: '',
|
||||
mapId: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -58,6 +59,7 @@ export default {
|
||||
this.formMdoel.id = row.id;
|
||||
this.formMdoel.skinCode = '';
|
||||
this.formMdoel.name = row.name;
|
||||
this.formMdoel.mapId = row.mapId;
|
||||
this.show = true;
|
||||
getSkinCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
|
@ -165,7 +165,7 @@ export default {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).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.$refs.copyPlan.doClose();
|
||||
this.$message.success(this.$t('publish.createCommonSuccess'));
|
||||
@ -177,7 +177,7 @@ export default {
|
||||
},
|
||||
// 预览
|
||||
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() {
|
||||
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">
|
||||
<span>{{ $t('map.productCategories') }}</span>
|
||||
</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 />
|
||||
<div style="height: calc(100% - 87px);">
|
||||
<el-tree
|
||||
@ -29,13 +30,18 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getProductTree } from '@/api/management/mapprd';
|
||||
import { getPublishMapTree } from '@/api/management/mapprd';
|
||||
import FilterCity from '@/views/components/filterCity';
|
||||
|
||||
export default {
|
||||
name: 'TreeOperate',
|
||||
components: {
|
||||
FilterCity
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
queryFunction: getPublishMapTree,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
@ -46,7 +52,8 @@ export default {
|
||||
point: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
localParamName: 'product_cityCode'
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -54,9 +61,6 @@ export default {
|
||||
this.$refs.trainingTree.filter(val);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.refresh();
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
@ -90,14 +94,18 @@ export default {
|
||||
}
|
||||
return tree;
|
||||
},
|
||||
refresh() {
|
||||
getProductTree().then(response => {
|
||||
this.treeData = this.convertTreeData(response.data);
|
||||
this.$nextTick(() => { this.loading = false; });
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.refreshFailure'));
|
||||
async refresh(filterSelect) {
|
||||
this.loading = true;
|
||||
try {
|
||||
const res = await getPublishMapTree(filterSelect);
|
||||
this.treeData = this.convertTreeData(res.data);
|
||||
this.$nextTick(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
} catch (error) {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,21 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
<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">
|
||||
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
|
||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||
export default {
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||
export default {
|
||||
name: 'OnceGenerate',
|
||||
props: {
|
||||
title: String,
|
||||
operateType:String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
@ -27,118 +31,110 @@
|
||||
typeList:[],
|
||||
formModel:{
|
||||
mapId:'',
|
||||
name: "",
|
||||
prdCode: "",
|
||||
type: "",
|
||||
id:null,
|
||||
name: '',
|
||||
prdCode: '',
|
||||
type: '',
|
||||
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() {
|
||||
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:{
|
||||
loadInitData(){
|
||||
this.projectList=[{value:'xty',label:'西铁院'}];
|
||||
let customeredProductType=ConstConfig.ConstSelect.customeredProductType;
|
||||
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.label } });
|
||||
loadInitData() {
|
||||
this.projectList = [{value:'xty', label:'西铁院'}];
|
||||
const customeredProductType = ConstConfig.ConstSelect.customeredProductType;
|
||||
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.label }; });
|
||||
listPublishMap().then(response => {
|
||||
this.mapInfoList=response.data;
|
||||
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;
|
||||
this.mapInfoList = response.data;
|
||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||
});
|
||||
getCommodityMapProduct(mapInfo.skinCode).then((response) => {
|
||||
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name } });
|
||||
this.formModel.prdCode="";
|
||||
},
|
||||
changeMap(index) {
|
||||
this.productList = [];
|
||||
getCommodityMapProduct(index).then((response) => {
|
||||
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
|
||||
this.formModel.prdCode = '';
|
||||
});
|
||||
},
|
||||
doShow(data) {
|
||||
if(data){
|
||||
this.formModel.name=data.name;
|
||||
this.formModel.id=data.id;
|
||||
if (data) {
|
||||
this.formModel.name = data.name;
|
||||
this.formModel.id = data.id;
|
||||
}
|
||||
this.dialogVisible = true
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
let self = this
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
self.$emit('create', Object.assign({}, this.formModel));
|
||||
self.doClose()
|
||||
})
|
||||
self.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog--center .el-dialog__body{
|
||||
|
@ -105,7 +105,7 @@ export default {
|
||||
methods: {
|
||||
initLoadPage() {
|
||||
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 = {
|
||||
id: response.data.tree[0].id,
|
||||
name: response.data.tree[0].name,
|
||||
@ -136,12 +136,12 @@ export default {
|
||||
}
|
||||
},
|
||||
clickEvent(obj, node, ele) {
|
||||
if (obj && obj.type==='Training') {
|
||||
if (obj && obj.type === 'Training') {
|
||||
if (obj.valid) {
|
||||
this.loading = true;
|
||||
trainingNotify({ trainingId: obj.id }).then(resp => {
|
||||
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 });
|
||||
launchFullscreen();
|
||||
@ -171,28 +171,28 @@ export default {
|
||||
},
|
||||
nodeExpand(obj, node, ele) {
|
||||
const key = obj.id;
|
||||
this.expandList = this.expandList.filter(item => item!==key);
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
this.expandList.push(key);
|
||||
setSessionStorage('trainingTeachExpandList'+this.courseModel.id, this.expandList);
|
||||
setSessionStorage('trainingTeachExpandList' + this.courseModel.id, this.expandList);
|
||||
},
|
||||
nodeCollapse(obj, node, ele) {
|
||||
const key = obj.id;
|
||||
if (obj.type === 'Lesson') {
|
||||
this.expandList = [];
|
||||
} 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) {
|
||||
let expand = getSessionStorage('trainingTeachExpandList'+id);
|
||||
expand = expand?(expand+'').split(','):'';
|
||||
let expand = getSessionStorage('trainingTeachExpandList' + id);
|
||||
expand = expand ? (expand + '').split(',') : '';
|
||||
if (expand instanceof Array) {
|
||||
this.expandList = expand;
|
||||
}
|
||||
},
|
||||
startTraining(data) {
|
||||
if (data && data.type==='Training') {
|
||||
if (data && data.type === 'Training') {
|
||||
if (data.valid) {
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${data.id}/${this.courseModel.id}`});
|
||||
} else {
|
||||
@ -206,7 +206,7 @@ export default {
|
||||
}
|
||||
},
|
||||
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}`});
|
||||
}
|
||||
}
|
||||
|
@ -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