Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
2df4c5f8cb
@ -95,14 +95,6 @@ export function dragSortLessonChapter(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 根据lessonId获取课程名称*/
|
|
||||||
export function getLessonNameByMapIdAndLessonId(model) {
|
|
||||||
return request({
|
|
||||||
url: `/api/lessonDraft/${model.mapId}/${model.lessonId}`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getLessonDrftList(params) {
|
export function getLessonDrftList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/lessonDraft`,
|
url: `/api/lessonDraft`,
|
||||||
|
@ -17,22 +17,6 @@ export function getPublishMapListBySkinCode(skinCode) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 根据皮肤获取地图版本信息*/
|
|
||||||
export function getPublishMapVersion(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/map/skin/${skinCode}/version`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据皮肤获取发布地图详细内容*/
|
|
||||||
export function getPublishMapDetail(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/map/skin/${skinCode}/details`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 根据地图id获取地图版本信息*/
|
/** 根据地图id获取地图版本信息*/
|
||||||
export function getPublishMapVersionById(id) {
|
export function getPublishMapVersionById(id) {
|
||||||
return request({
|
return request({
|
||||||
@ -49,14 +33,6 @@ export function getPublishMapDetailById(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取发布地图列车列表*/
|
|
||||||
export function getPublishTrainList(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/map/${skinCode}/train`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取发布地图列表*/
|
/** 获取发布地图列表*/
|
||||||
export function listPublishMap(params) {
|
export function listPublishMap(params) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -62,9 +62,9 @@ export function deleteTrainingCategory(data) {
|
|||||||
/**
|
/**
|
||||||
* 获取地图下的产品列表
|
* 获取地图下的产品列表
|
||||||
*/
|
*/
|
||||||
export function getCommodityMapProduct(skinCode) {
|
export function getCommodityMapProduct(mapId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapPrd/${skinCode}/list`,
|
url: `/api/mapPrd/${mapId}/list`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import request from '@/utils/request';
|
|||||||
/** 分页查询皮肤*/
|
/** 分页查询皮肤*/
|
||||||
export function getSkinCodePageList(params) {
|
export function getSkinCodePageList(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin`,
|
url: `/api/realLine`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
@ -12,7 +12,7 @@ export function getSkinCodePageList(params) {
|
|||||||
/** 添加皮肤*/
|
/** 添加皮肤*/
|
||||||
export function addSkinCode(data) {
|
export function addSkinCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin`,
|
url: `/api/realLine`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -21,7 +21,7 @@ export function addSkinCode(data) {
|
|||||||
/** 删除皮肤*/
|
/** 删除皮肤*/
|
||||||
export function delSkinCode(id) {
|
export function delSkinCode(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${id}`,
|
url: `/api/realLine/${id}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ export function delSkinCode(id) {
|
|||||||
/** 查询地图皮肤 */
|
/** 查询地图皮肤 */
|
||||||
export function querySkinCode(id) {
|
export function querySkinCode(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${id}`,
|
url: `/api/realLine/${id}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ export function querySkinCode(id) {
|
|||||||
/** 修改地图皮肤*/
|
/** 修改地图皮肤*/
|
||||||
export function updateSkinCode(data) {
|
export function updateSkinCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${data.id}`,
|
url: `/api/realLine/${data.id}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -46,7 +46,7 @@ export function updateSkinCode(data) {
|
|||||||
/** 通过皮肤Code更新地图皮肤*/
|
/** 通过皮肤Code更新地图皮肤*/
|
||||||
export function updateSkinCodeByCode(data) {
|
export function updateSkinCodeByCode(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${data.code}/update`,
|
url: `/api/realLine/${data.code}/update`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
@ -55,7 +55,7 @@ export function updateSkinCodeByCode(data) {
|
|||||||
/** 查询皮肤是否存在*/
|
/** 查询皮肤是否存在*/
|
||||||
export function querySkinCodeExistByCode(code) {
|
export function querySkinCodeExistByCode(code) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/${code}/exist`,
|
url: `/api/realLine/${code}/exist`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ export function querySkinCodeExistByCode(code) {
|
|||||||
/** 获取皮肤列表*/
|
/** 获取皮肤列表*/
|
||||||
export function getSkinCodeList() {
|
export function getSkinCodeList() {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapSkin/list`,
|
url: `/api/realLine/list`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取运行图列表
|
|
||||||
*/
|
|
||||||
export function getRunPlanList() {
|
|
||||||
return request({
|
|
||||||
url: '/api/runPlan/draft/tree',
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取地图速度等级列表
|
* 获取地图速度等级列表
|
||||||
*/
|
*/
|
||||||
@ -41,16 +31,6 @@ export function getStationList(mapId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过皮肤获取运行图车站列表
|
|
||||||
*/
|
|
||||||
export function getStationListBySkinCode(skinCode) {
|
|
||||||
return request({
|
|
||||||
url: `/api/runPlan/draft/station/${skinCode}/bySkin`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建运行图
|
* 创建运行图
|
||||||
*/
|
*/
|
||||||
@ -73,9 +53,9 @@ export function queryRunPlan(planId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 根据skinCode查询发布运行图列表
|
// 根据skinCode查询发布运行图列表
|
||||||
export function queryRunPlanList(skinCode) {
|
export function queryRunPlanList(mapId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/runPlan/template/skin/${skinCode}`,
|
url: `/api/runPlan/template/${mapId}/list`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
@ -245,13 +244,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
|
@ -1,12 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou_01 route-create" :title="title" :visible.sync="show" width="580px" label-position="top"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
class="fuzhou_01 route-create"
|
||||||
|
v-dialogDrag
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="580px"
|
||||||
|
label-position="top"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item label="列车:" prop="trainCode">
|
<el-form-item label="列车:" prop="trainCode">
|
||||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||||
<el-option v-for="item in trainList" :key="item.code" :label="item.trainNumber"
|
<el-option
|
||||||
:value="item.code"></el-option>
|
v-for="item in trainList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.trainNumber"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="列车车次:" prop="trainNo">
|
<!-- <el-form-item label="列车车次:" prop="trainNo">
|
||||||
@ -17,8 +31,7 @@
|
|||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="列车方向:" prop="direction">
|
<el-form-item label="列车方向:" prop="direction">
|
||||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
|
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -30,17 +43,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
@ -65,7 +77,7 @@
|
|||||||
trainNo: '',
|
trainNo: '',
|
||||||
direction: '',
|
direction: '',
|
||||||
selected: null
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -87,17 +99,10 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
|
||||||
this.trainList = response.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车列表失败`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -118,12 +123,12 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -137,10 +142,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -151,5 +156,5 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,19 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm route-create" :title="title" :visible.sync="show" width="580px"
|
<el-dialog
|
||||||
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
v-dialogDrag
|
||||||
v-dialogDrag>
|
class="beijing-01__systerm route-create"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="580px"
|
||||||
|
label-position="top"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item label="列车:" prop="trainCode">
|
<el-form-item label="列车:" prop="trainCode">
|
||||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
|
<el-option
|
||||||
:value="item.code"></el-option>
|
v-for="item in trainList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.groupNumber"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="列车方向:" prop="direction">
|
<el-form-item label="列车方向:" prop="direction">
|
||||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
<el-select v-model="direction" filterable placeholder="列车方向">
|
||||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
|
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -24,18 +36,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
@ -60,7 +71,7 @@
|
|||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
direction: '',
|
direction: '',
|
||||||
selected: null
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -82,17 +93,10 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
|
||||||
this.trainList = response.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车列表失败`);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -114,12 +118,12 @@
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -133,10 +137,10 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -147,5 +151,5 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -118,9 +118,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -97,7 +97,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
@ -201,13 +200,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
@ -88,13 +87,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
|
||||||
this.trainList = response.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车列表失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="chengdou-03__systerm stand-stop-time"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="480px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<span slot="label">车次窗</span>
|
||||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -21,9 +30,12 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||||
<el-select v-model="addModel.groupNumber" filterable>
|
<el-select v-model="addModel.groupNumber" filterable>
|
||||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
<el-option
|
||||||
:value="train.groupNumber">
|
v-for="train in trainList"
|
||||||
</el-option>
|
:key="train.groupNumber"
|
||||||
|
:label="train.groupNumber"
|
||||||
|
:value="train.groupNumber"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -42,12 +54,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainCreateNumber',
|
name: 'TrainCreateNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -59,17 +70,17 @@
|
|||||||
addModel: {
|
addModel: {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
groupNumber: [
|
groupNumber: [
|
||||||
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -85,33 +96,26 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '新建车组号'
|
return '新建车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -128,11 +132,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.createTrainNo.menu.operation,
|
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -144,17 +148,17 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -163,7 +167,7 @@
|
|||||||
}).catch(error => { this.doClose(); });
|
}).catch(error => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="chengdou-03__systerm stand-stop-time"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="480px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<span slot="label">车次窗</span>
|
||||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -21,9 +30,12 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
<el-option
|
||||||
:value="train.groupNumber">
|
v-for="train in trainList"
|
||||||
</el-option>
|
:key="train.groupNumber"
|
||||||
|
:label="train.groupNumber"
|
||||||
|
:value="train.groupNumber"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -42,12 +54,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainDeleteNumber',
|
name: 'TrainDeleteNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -59,12 +70,12 @@
|
|||||||
addModel: {
|
addModel: {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
},
|
},
|
||||||
|
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -80,33 +91,26 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '删除车组号'
|
return '删除车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName:'',
|
stationName:'',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber:'',
|
groupNumber:''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -123,10 +127,10 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation,
|
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -139,17 +143,17 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -158,7 +162,7 @@
|
|||||||
}).catch(error => { this.doClose(); });
|
}).catch(error => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -234,7 +234,6 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainDetailInfo',
|
name: 'TrainDetailInfo',
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainEditNumber',
|
name: 'TrainEditNumber',
|
||||||
@ -100,19 +99,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName: '',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
oldGroupNumber: '',
|
oldGroupNumber: '',
|
||||||
|
@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
|
class="chengdou-03__systerm stand-stop-time"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="480px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="90px" :model="addModel" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<span slot="label">车次窗</span>
|
||||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -21,9 +30,12 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
<el-option
|
||||||
:value="train.groupNumber">
|
v-for="train in trainList"
|
||||||
</el-option>
|
:key="train.groupNumber"
|
||||||
|
:label="train.groupNumber"
|
||||||
|
:value="train.groupNumber"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -32,13 +44,13 @@
|
|||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="purposeStationName">
|
<el-form-item prop="purposeStationName">
|
||||||
<span slot="label">车站</span>
|
<span slot="label">车站</span>
|
||||||
<el-input v-model="addModel.purposeStationName" :disabled="true"></el-input>
|
<el-input v-model="addModel.purposeStationName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="purposeTrainWindowCode" >
|
<el-form-item prop="purposeTrainWindowCode">
|
||||||
<span slot="label">目的车次窗</span>
|
<span slot="label">目的车次窗</span>
|
||||||
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true"></el-input>
|
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -56,12 +68,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainMoveNumber',
|
name: 'TrainMoveNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -75,11 +86,11 @@
|
|||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
purposeStationName: '',
|
purposeStationName: '',
|
||||||
purposeTrainWindowCode: '',
|
purposeTrainWindowCode: ''
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -95,36 +106,29 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '移动车组号'
|
return '移动车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
console.log('operate',operate,selected);
|
console.log('operate', operate, selected);
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel = {
|
||||||
stationName: '',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
purposeStationName: '',
|
purposeStationName: '',
|
||||||
purposeTrainWindowCode: '',
|
purposeTrainWindowCode: ''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -141,10 +145,10 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.moveTrainNo.menu.operation,
|
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -157,16 +161,16 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
// this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -176,7 +180,7 @@
|
|||||||
}).catch(error => { this.doClose(); });
|
}).catch(error => { this.doClose(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -119,9 +119,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -118,9 +118,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||||
@ -273,15 +272,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {},
|
||||||
if (map.skinCode) {
|
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
|
||||||
this.trainList = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(this.$t('error.obtainTrainGroupNumberFailed'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
// import { getPublishTrainList } from '@/api/jmap/map';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -131,7 +131,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.$t('menu.menuTrain.moveTrainId');
|
return this.$t('menu.menuTrain.switchTrainId');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
import { getEveryDayRunPlanData, generateDayRunPlan } from '@/api/simulation';
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
@ -118,9 +118,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
const skinCode = this.$route.query.skinCode;
|
const skinCode = this.$route.query.skinCode;
|
||||||
|
const mapId = this.$route.query.mapId;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getStationListBySkinCode(skinCode).then(response => {
|
getStationList(mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinCode);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
|
@ -41,7 +41,6 @@ import ScriptmanageHome from '@/views/scriptManage/home';
|
|||||||
import ScriptDisplay from '@/views/scriptManage/display/index';
|
import ScriptDisplay from '@/views/scriptManage/display/index';
|
||||||
|
|
||||||
import TeachDetail from '@/views/teach/detail/index';
|
import TeachDetail from '@/views/teach/detail/index';
|
||||||
import TeachPractical from '@/views/teach/practical/index';
|
|
||||||
import TeachHome from '@/views/teach/index';
|
import TeachHome from '@/views/teach/index';
|
||||||
import Pay from '@/views/components/pay/index';
|
import Pay from '@/views/components/pay/index';
|
||||||
import ExamDetail from '@/views/exam/detail/examDetail';
|
import ExamDetail from '@/views/exam/detail/examDetail';
|
||||||
@ -603,11 +602,6 @@ export const asyncRouter = [
|
|||||||
component: ExamDetail,
|
component: ExamDetail,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'practical/:trainingId/:lessonId',
|
|
||||||
component: TeachPractical,
|
|
||||||
hidden: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'pay/:lessonId',
|
path: 'pay/:lessonId',
|
||||||
component: Pay,
|
component: Pay,
|
||||||
|
@ -3,9 +3,9 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
|
@ -1,40 +1,10 @@
|
|||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { getPublishMapVersion, getPublishMapDetail, getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map';
|
import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map';
|
||||||
|
|
||||||
// 获取地图版本数据,和store里面的map版本做比较,如果不同
|
// 获取地图版本数据,和store里面的map版本做比较,如果不同
|
||||||
// 获取发布的地图数据
|
// 获取发布的地图数据
|
||||||
// 先设置地图数据
|
// 先设置地图数据
|
||||||
// 清除列车数据
|
// 清除列车数据
|
||||||
export function loadMapData(skinCode) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
getPublishMapVersion(skinCode).then(resp => {
|
|
||||||
var version = resp.data;
|
|
||||||
var mapData = store.state.map.mapList[`mapDate_${skinCode}`];
|
|
||||||
if (mapData && mapData.version == version) {
|
|
||||||
store.dispatch('map/setMapData', mapData).then(() => {
|
|
||||||
store.dispatch('map/clearJlmapTrainView').then(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
getPublishMapDetail(skinCode).then(res => {
|
|
||||||
mapData = res.data;
|
|
||||||
store.dispatch('map/setMapDataList', mapData);
|
|
||||||
store.dispatch('map/setMapData', mapData).then(() => {
|
|
||||||
store.dispatch('map/clearJlmapTrainView').then(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}).catch(error => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function loadMapDataById(mapId) {
|
export function loadMapDataById(mapId) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getPublishMapVersionById(mapId).then(resp => {
|
getPublishMapVersionById(mapId).then(resp => {
|
||||||
|
@ -49,15 +49,15 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
// 获取城市列表
|
// 获取城市列表
|
||||||
this.filterOptions=[];
|
this.filterOptions = [];
|
||||||
|
|
||||||
let resp = this.$route.fullPath.includes('design/userlist')?await this.$Dictionary.cityType():await publisMapCityList('city_type');
|
let resp = this.$route.fullPath.includes('design/userlist') ? await this.$Dictionary.cityType() : await publisMapCityList('city_type');
|
||||||
resp=this.$route.fullPath.includes('design/userlist')?resp:resp.data;
|
resp = this.$route.fullPath.includes('design/userlist') ? resp : resp.data;
|
||||||
const cityList = resp.sort((a, b) => {
|
const cityList = resp.sort((a, b) => {
|
||||||
return a.code.localeCompare(b.code);
|
return a.code.localeCompare(b.code);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.filterOptions=cityList;
|
this.filterOptions = cityList;
|
||||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
||||||
|
|
||||||
this.$emit('filterSelectChange', this.filterSelect);
|
this.$emit('filterSelectChange', this.filterSelect);
|
||||||
|
@ -63,5 +63,6 @@ export default {
|
|||||||
.system-time-box {
|
.system-time-box {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
background: #000;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<span
|
<span
|
||||||
class="el-icon-tickets"
|
class="el-icon-tickets"
|
||||||
:style="{color: data.valid ? 'green':''}"
|
:style="{color: data.valid ? 'green':''}"
|
||||||
></span>
|
/>
|
||||||
<span :style="{color: data.valid ? 'green':''}"> {{ tnode.label }}</span>
|
<span :style="{color: data.valid ? 'green':''}"> {{ tnode.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
@ -79,10 +79,9 @@ import { getProductDetail } from '@/api/management/mapprd';
|
|||||||
import { runDiagramQuit, getSimulationInfo } from '@/api/simulation';
|
import { runDiagramQuit, getSimulationInfo } from '@/api/simulation';
|
||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
// import { UrlConfig } from '@/router/index';
|
|
||||||
import {loadDraftScript} from '@/api/designPlatform';
|
import {loadDraftScript} from '@/api/designPlatform';
|
||||||
|
|
||||||
// 三维
|
// 三维
|
||||||
@ -401,7 +400,7 @@ export default {
|
|||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
const data = rest.data;
|
const data = rest.data;
|
||||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||||
await this.loadMapData(detail.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(`获取实训步骤数据失败`);
|
this.$messageBox(`获取实训步骤数据失败`);
|
||||||
@ -417,9 +416,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -430,9 +428,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -443,9 +440,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -468,9 +464,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -535,16 +530,6 @@ export default {
|
|||||||
async quitQuest() {
|
async quitQuest() {
|
||||||
this.questId = 0;
|
this.questId = 0;
|
||||||
},
|
},
|
||||||
// 加载地图数据
|
|
||||||
async loadMapData(skinCode) {
|
|
||||||
try {
|
|
||||||
await loadMapData(skinCode);
|
|
||||||
await this.$store.dispatch('training/setMapDefaultState');
|
|
||||||
} catch (error) {
|
|
||||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 通过id加载地图数据
|
// 通过id加载地图数据
|
||||||
async loadMapDataById(mapId) {
|
async loadMapDataById(mapId) {
|
||||||
|
@ -79,7 +79,7 @@ import { getProductDetail } from '@/api/management/mapprd';
|
|||||||
import { runDiagramQuit, loadScript, getSimulationInfo } from '@/api/simulation';
|
import { runDiagramQuit, loadScript, getSimulationInfo } from '@/api/simulation';
|
||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
@ -237,7 +237,6 @@ export default {
|
|||||||
$route() {
|
$route() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.initLoadData();
|
this.initLoadData();
|
||||||
console.log(1111);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -394,7 +393,7 @@ export default {
|
|||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
const data = rest.data;
|
const data = rest.data;
|
||||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||||
await this.loadMapData(detail.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(`获取实训步骤数据失败`);
|
this.$messageBox(`获取实训步骤数据失败`);
|
||||||
@ -410,9 +409,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -423,8 +421,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
this.$store.dispatch('training/setPrdType', this.prdTypeMap[this.prdType]);
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
@ -435,10 +433,8 @@ export default {
|
|||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
if (parseInt(this.mapId)) {
|
||||||
if (parseInt(this.skinCode)) {
|
await this.loadMapDataById(this.mapId);
|
||||||
await this.loadMapData(this.skinCode);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -461,9 +457,8 @@ export default {
|
|||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
|
||||||
if (parseInt(this.skinCode)) {
|
if (parseInt(this.mapId)) {
|
||||||
await this.loadMapData(this.skinCode);
|
await this.loadMapDataById(this.mapId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
@ -474,7 +469,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async runAddRolesLoadShow() {
|
async runAddRolesLoadShow() {
|
||||||
// this.$refs.addQuest.doShow();
|
// this.$refs.addQuest.doShow();
|
||||||
const row={id: this.$route.query.scriptId};
|
const row = {id: this.$route.query.scriptId};
|
||||||
this.$refs.addQuest.handleLoad(1, row);
|
this.$refs.addQuest.handleLoad(1, row);
|
||||||
},
|
},
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
@ -485,7 +480,7 @@ export default {
|
|||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.questId = parseInt(row.id);
|
this.questId = parseInt(row.id);
|
||||||
if (mapLocation) {
|
if (mapLocation) {
|
||||||
const newMapLocation={'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||||
}
|
}
|
||||||
// if (res.data && res.data.mapLocation) {
|
// if (res.data && res.data.mapLocation) {
|
||||||
@ -509,17 +504,6 @@ export default {
|
|||||||
async quitQuest() {
|
async quitQuest() {
|
||||||
this.questId = 0;
|
this.questId = 0;
|
||||||
},
|
},
|
||||||
// 加载地图数据
|
|
||||||
async loadMapData(skinCode) {
|
|
||||||
try {
|
|
||||||
await loadMapData(skinCode);
|
|
||||||
await this.$store.dispatch('training/setMapDefaultState');
|
|
||||||
} catch (error) {
|
|
||||||
this.$messageBox(`获取地图数据失败: ${error.message}`);
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 通过id加载地图数据
|
// 通过id加载地图数据
|
||||||
async loadMapDataById(mapId) {
|
async loadMapDataById(mapId) {
|
||||||
try {
|
try {
|
||||||
|
@ -125,7 +125,7 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$emit('quit');
|
this.$emit('quit');
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${this.$route.query.examId}`, query: { subSystem: this.$route.query.subSystem }});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${this.$route.query.examId}`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId }});
|
||||||
Notification.closeAll();
|
Notification.closeAll();
|
||||||
exitFullscreen();
|
exitFullscreen();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
@ -6,23 +6,23 @@
|
|||||||
|
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<!-- viewRunQuest -->
|
<!-- viewRunQuest -->
|
||||||
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{$t('display.schema.selectRoles')}}</el-button>
|
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||||
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{$t('display.schema.loadScript')}}</el-button>
|
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{$t('display.schema.previewRunDiagram')}}</el-button>
|
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||||
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{$t('display.schema.loadRunDiagram')}}</el-button>
|
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{$t('display.schema.faultSetting')}}</el-button>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
<el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
<el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{$t('display.schema.normalOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{$t('display.schema.faultOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { getStationListBySkinCode, queryRunPlan } from '@/api/runplan';
|
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||||
import {getRpDetailByUserMapId} from '@/api/designPlatform';
|
import {getRpDetailByUserMapId} from '@/api/designPlatform';
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ export default {
|
|||||||
isDemon() {
|
isDemon() {
|
||||||
return this.$route.params.mode === 'demon';
|
return this.$route.params.mode === 'demon';
|
||||||
},
|
},
|
||||||
isDesignPlatform(){
|
isDesignPlatform() {
|
||||||
return this.$route.fullPath.includes('design/display/demon');
|
return this.$route.fullPath.includes('design/display/demon');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -86,18 +86,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
console.log(this.$route.query, '=====');
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData(this.$route.query);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData(opt) {
|
loadRunData(opt) {
|
||||||
this.$store.dispatch('runPlan/clear').then(() => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
if (opt && opt.skinCode) {
|
if (opt && opt.mapId) {
|
||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
getStationList(opt.mapId).then(response => {
|
||||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
if (this.$route.params.mode == 'plan') {
|
if (this.$route.params.mode == 'plan') {
|
||||||
// debugger;
|
// debugger;
|
||||||
if(this.$route.query.from=="user"){
|
if (this.$route.query.from == 'user') {
|
||||||
// 测试运行图功能
|
// 测试运行图功能
|
||||||
getRpDetailByUserMapId(this.$route.query.planId).then(resp => {
|
getRpDetailByUserMapId(this.$route.query.planId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
@ -106,7 +107,7 @@ export default {
|
|||||||
this.$store.dispatch('runPlan/setPlanData', []);
|
this.$store.dispatch('runPlan/setPlanData', []);
|
||||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
// 测试运行图功能
|
// 测试运行图功能
|
||||||
queryRunPlan(this.$route.query.planId).then(resp => {
|
queryRunPlan(this.$route.query.planId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
@ -117,7 +118,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
getEveryDayRunPlanData(this.group).then(resp => {
|
getEveryDayRunPlanData(this.group).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
@ -156,7 +156,7 @@ export default {
|
|||||||
viewRunQuest() {
|
viewRunQuest() {
|
||||||
this.$emit('runQuestLoadShow');
|
this.$emit('runQuestLoadShow');
|
||||||
},
|
},
|
||||||
viewScriptRoles(){
|
viewScriptRoles() {
|
||||||
this.$emit('runAddRolesLoadShow');
|
this.$emit('runAddRolesLoadShow');
|
||||||
},
|
},
|
||||||
switchMode(swch) {
|
switchMode(swch) {
|
||||||
|
@ -158,7 +158,7 @@ export default {
|
|||||||
updateTime: res.data.updateTime
|
updateTime: res.data.updateTime
|
||||||
};
|
};
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message.error(this.$t('display.exam.getTestInformation')+':' + error.message);
|
this.$message.error(this.$t('display.exam.getTestInformation') + ':' + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -235,7 +235,8 @@ export default {
|
|||||||
trainingId: obj.trainingId,
|
trainingId: obj.trainingId,
|
||||||
examQuestionId: obj.id,
|
examQuestionId: obj.id,
|
||||||
subSystem: this.$route.query.subSystem,
|
subSystem: this.$route.query.subSystem,
|
||||||
examId: this.$route.query.examId
|
examId: this.$route.query.examId,
|
||||||
|
mapId: this.$route.query.mapId
|
||||||
};
|
};
|
||||||
this.$router.push({ path: '/display/exam', query: query });
|
this.$router.push({ path: '/display/exam', query: query });
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
|
@ -128,7 +128,7 @@ export default {
|
|||||||
treeList: resp.data.examDefinitionList
|
treeList: resp.data.examDefinitionList
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length >0) {
|
if (this.courseModel.pmsList && this.courseModel.pmsList.length > 0) {
|
||||||
this.valid = true;
|
this.valid = true;
|
||||||
}
|
}
|
||||||
this.getExpandList(this.courseModel.id);
|
this.getExpandList(this.courseModel.id);
|
||||||
@ -166,7 +166,7 @@ export default {
|
|||||||
},
|
},
|
||||||
clickEvent(obj, node, data) {
|
clickEvent(obj, node, data) {
|
||||||
if (this.valid || obj.trial) {
|
if (this.valid || obj.trial) {
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem }});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examDetail}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: this.courseModel.mapId }});
|
||||||
} else {
|
} else {
|
||||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
@ -182,24 +182,24 @@ export default {
|
|||||||
},
|
},
|
||||||
nodeExpand(obj, node, ele) {
|
nodeExpand(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
this.expandList.push(key);
|
this.expandList.push(key);
|
||||||
setSessionStorage('trainingExamExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
nodeCollapse(obj, node, ele) {
|
nodeCollapse(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
setSessionStorage('trainingExamExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingExamExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
getExpandList(id) {
|
getExpandList(id) {
|
||||||
let expand = getSessionStorage('trainingExamExpandList'+id);
|
let expand = getSessionStorage('trainingExamExpandList' + id);
|
||||||
expand = expand?(expand+'').split(','):'';
|
expand = expand ? (expand + '').split(',') : '';
|
||||||
if (expand instanceof Array) {
|
if (expand instanceof Array) {
|
||||||
this.expandList = expand;
|
this.expandList = expand;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
backLessonList() {
|
backLessonList() {
|
||||||
localStore.remove('examDetail'+this.$route.params.subSystem);
|
localStore.remove('examDetail' + this.$route.params.subSystem);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,13 +202,14 @@ export default {
|
|||||||
userExamId: this.userExam.id,
|
userExamId: this.userExam.id,
|
||||||
examQuestionId: this.examList[0].id,
|
examQuestionId: this.examList[0].id,
|
||||||
subSystem: this.$route.query.subSystem,
|
subSystem: this.$route.query.subSystem,
|
||||||
examId: this.$route.params.examId
|
examId: this.$route.params.examId,
|
||||||
|
mapId: this.$route.query.mapId
|
||||||
};
|
};
|
||||||
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/exam`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox( this.$t('error.createSimulationFailed') +`: ${error.message}`);
|
this.$messageBox( this.$t('error.createSimulationFailed') + `: ${error.message}`);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div :id="id" style="background: #000;" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Jlmap from '@/jmap/map';
|
|
||||||
import deviceType from '@/jmap/constant/deviceType';
|
|
||||||
import { getPublishMapDetail } from '@/api/test.js';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Jlmap',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
id: '__jmap__',
|
|
||||||
jmap: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.app.windowSizeCount': function() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.jmap.resize({width: this.$store.state.app.width, height: this.$store.state.app.height});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
document.getElementById(this.id).oncontextmenu = function (e) {
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.jmap = new Jlmap({
|
|
||||||
dom: document.getElementById(this.id),
|
|
||||||
config: {
|
|
||||||
renderer: 'canvas',
|
|
||||||
width: document.documentElement.clientWidth,
|
|
||||||
height: document.documentElement.clientHeight
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
scaleRate: 1,
|
|
||||||
offsetX: 0,
|
|
||||||
offsetY: 0
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
dataLoaded() { console.log('dataLoaded'); },
|
|
||||||
viewLoaded() { console.log('viewLoaded'); },
|
|
||||||
stateLoaded() { console.log('stateLoaded'); },
|
|
||||||
viewUpdate() { console.log('viewUpdate'); },
|
|
||||||
stateUpdate() { console.log('stateUpdate'); }
|
|
||||||
// optionsUpdate() { console.log('optionsUpdate'); }
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.jmap.on('selected', this.selected);
|
|
||||||
this.jmap.on('contextmenu', this.contextmenu);
|
|
||||||
|
|
||||||
// const list = [];
|
|
||||||
// for (let i = 1; i < 20; i++) {
|
|
||||||
// for (let j = 1; j < 500; j++) {
|
|
||||||
// list.push({ code: `${(Array(3).join(0) + i).slice(-3)}${(Array(3).join(0) + j).slice(-3)}`, lp: { x: 50 + i * 120, y: 50 + j * 20 }, rp: { x: 150 + i * 120, y: 50 + j * 20 } });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.jmap.load({ skinVO: { code: '02' }, linkList: list });
|
|
||||||
|
|
||||||
getPublishMapDetail('02').then(resp => {
|
|
||||||
this.jmap.setLevelVisible([deviceType.Link], false);
|
|
||||||
this.jmap.setMap(resp.data);
|
|
||||||
// this.jmap.setDefaultState();
|
|
||||||
});
|
|
||||||
|
|
||||||
// this.jmap.render([
|
|
||||||
// {code: '11', type: 'Link', lp: { x: 20 , y: 100}, rp: { x: 120, y: 100 }}
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// this.jmap.update([
|
|
||||||
// { code: '11', type: 'Link', status: '02' }
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// this.jmap.render([
|
|
||||||
// { code: '11', type: 'Link', lp: { x: 0, y: 0 }, rp: { x: 200, y: 200 } }
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
// this.jmap.update([]);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
this.jmap.off('selected', this.selected);
|
|
||||||
this.jmap.off('contextmenu', this.contextmenu);
|
|
||||||
this.jmap.dispose();
|
|
||||||
this.jmap = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
selected(e) {
|
|
||||||
// console.log('selected', e, this.jmap);
|
|
||||||
},
|
|
||||||
contextmenu(e) {
|
|
||||||
// console.log('contextmenu', e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@ -37,7 +37,7 @@ import IbpPlate from '@/views/ibp/index';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { loadMapData } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { getUserRoles, deljointTrainRoom } from '@/api/chat';
|
import { getUserRoles, deljointTrainRoom } from '@/api/chat';
|
||||||
import { runDiagramOver, getSimulationInfo } from '@/api/simulation';
|
import { runDiagramOver, getSimulationInfo } from '@/api/simulation';
|
||||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.chatContentList': function (val) { // 综合演练被踢出房间
|
'$store.state.socket.chatContentList': function (val) { // 综合演练被踢出房间
|
||||||
if (val.type === 'userRoomKickOut'&&val.oneself) {
|
if (val.type === 'userRoomKickOut' && val.oneself) {
|
||||||
this.$router.push({ path: `/` });
|
this.$router.push({ path: `/` });
|
||||||
this.messageInfo(this.$t('tip.beKickedOut'), 'warning');
|
this.messageInfo(this.$t('tip.beKickedOut'), 'warning');
|
||||||
}
|
}
|
||||||
@ -315,14 +315,14 @@ export default {
|
|||||||
case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); this.hideIbp(); break;
|
case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); this.hideIbp(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await this.getTrainDetail(this.skinCode);
|
await this.getTrainDetail();
|
||||||
} else {
|
} else {
|
||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getTrainDetail(skinCode) {
|
async getTrainDetail() {
|
||||||
try {
|
try {
|
||||||
await loadMapData(skinCode);
|
await loadMapDataById(this.mapId);
|
||||||
await this.$store.dispatch('training/setMapDefaultState');
|
await this.$store.dispatch('training/setMapDefaultState');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$messageBox(this.$t('error.getMapDataFailed'));
|
this.$messageBox(this.$t('error.getMapDataFailed'));
|
||||||
@ -344,7 +344,7 @@ export default {
|
|||||||
showdriving() {
|
showdriving() {
|
||||||
this.panelShow = true;
|
this.panelShow = true;
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
this.ibpShow =false;
|
this.ibpShow = false;
|
||||||
},
|
},
|
||||||
showIbp(deviceCode) {
|
showIbp(deviceCode) {
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
|
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<template>
|
<template>
|
||||||
<el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{$t('joinTraining.runGraphPreview')}}</el-button>
|
<el-button v-if="runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="userRole == 'Admin'">
|
<template v-if="userRole == 'Admin'">
|
||||||
<el-button v-if="!runing" size="small" type="warning" :disabled="viewDisabled" @click="loadRunPlan">
|
<el-button v-if="!runing" size="small" type="warning" :disabled="viewDisabled" @click="loadRunPlan">
|
||||||
{{$t('joinTraining.runGraphLoading')}}</el-button>
|
{{ $t('joinTraining.runGraphLoading') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="userRole == 'Instructor' || userRole == 'Admin'">
|
<template v-if="userRole == 'Instructor' || userRole == 'Admin'">
|
||||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{$t('joinTraining.faultSetting')}}</el-button>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
@ -29,15 +29,15 @@
|
|||||||
size="small"
|
size="small"
|
||||||
@change="changeOperateMode(mode)"
|
@change="changeOperateMode(mode)"
|
||||||
>
|
>
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{$t('joinTraining.normalOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('joinTraining.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{$t('joinTraining.faultOperation')}}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('joinTraining.faultOperation') }}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { getStationListBySkinCode } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -97,14 +97,15 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.userId = this.$store.state.user.id;
|
this.userId = this.$store.state.user.id;
|
||||||
|
console.log(this.$route.query);
|
||||||
await this.loadRunData(this.$route.query);
|
await this.loadRunData(this.$route.query);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadRunData(opt) {
|
loadRunData(opt) {
|
||||||
this.$store.dispatch('runPlan/clear').then(resp => {
|
this.$store.dispatch('runPlan/clear').then(resp => {
|
||||||
if (opt && opt.skinCode) {
|
if (opt && opt.mapId) {
|
||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
getStationList(opt.mapId).then(response => {
|
||||||
const stations = response.data;
|
const stations = response.data;
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
getEveryDayRunPlanData(this.group).then(resp => {
|
getEveryDayRunPlanData(this.group).then(resp => {
|
||||||
|
@ -119,7 +119,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.courseModel.skinCode = this.$route.query.skinCode;
|
this.courseModel.skinCode = this.$route.query.skinCode;
|
||||||
}
|
}
|
||||||
getCommodityMapProduct(this.$route.query.skinCode).then(response => {
|
getCommodityMapProduct(this.$route.query.mapId).then(response => {
|
||||||
this.productList = response.data || [];
|
this.productList = response.data || [];
|
||||||
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
||||||
});
|
});
|
||||||
|
@ -197,7 +197,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.skinCodeChoose(this.$route.params.skinCode);
|
this.mapIdChoose(this.$route.query.mapId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show(data) {
|
show(data) {
|
||||||
@ -211,11 +211,11 @@ export default {
|
|||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
skinCodeChoose(skinCode) {
|
mapIdChoose(mapId) {
|
||||||
this.operateModel.prdCode = '';
|
this.operateModel.prdCode = '';
|
||||||
this.productList = [];
|
this.productList = [];
|
||||||
if (skinCode) {
|
if (mapId) {
|
||||||
getCommodityMapProduct(skinCode).then((response) => {
|
getCommodityMapProduct(mapId).then((response) => {
|
||||||
this.productList = response.data;
|
this.productList = response.data;
|
||||||
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
this.productList = this.productList.filter(elem => { return elem.prdType != '03'; });
|
||||||
});
|
});
|
||||||
|
@ -172,7 +172,7 @@ export default {
|
|||||||
listPublishMap().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.mapIdList = response.data;
|
this.mapIdList = response.data;
|
||||||
});
|
});
|
||||||
getCommodityMapProduct(this.$route.params.skinCode).then((response) => {
|
getCommodityMapProduct(this.$route.query.mapId).then((response) => {
|
||||||
const productList = response.data;
|
const productList = response.data;
|
||||||
if (productList && productList.length > 0) {
|
if (productList && productList.length > 0) {
|
||||||
productList.forEach(elem => {
|
productList.forEach(elem => {
|
||||||
|
@ -124,17 +124,10 @@ export default {
|
|||||||
this.formModel.userId = item.id;
|
this.formModel.userId = item.id;
|
||||||
},
|
},
|
||||||
async mapChange(val) {
|
async mapChange(val) {
|
||||||
let skinCode = '';
|
|
||||||
this.mapPrdList = [];
|
this.mapPrdList = [];
|
||||||
this.formModel.mapPrdCode = '';
|
this.formModel.mapPrdCode = '';
|
||||||
if (this.LessonList.length) {
|
|
||||||
this.LessonList.forEach(item => {
|
|
||||||
if (item.value == val) {
|
|
||||||
skinCode = item.skinCode;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
try {
|
try {
|
||||||
const res = await getCommodityMapProduct(skinCode);
|
const res = await getCommodityMapProduct(val);
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
data.forEach(elem => {
|
data.forEach(elem => {
|
||||||
@ -144,7 +137,6 @@ export default {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
show(data) {
|
show(data) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
|
||||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||||
import { OperatorModel, PermissionType } from '@/scripts/ConstDic';
|
import { OperatorModel, PermissionType } from '@/scripts/ConstDic';
|
||||||
import { getTotalRemains } from '@/api/management/author';
|
import { getTotalRemains } from '@/api/management/author';
|
||||||
@ -208,14 +207,12 @@ export default {
|
|||||||
this.formModel.prdCode = '';
|
this.formModel.prdCode = '';
|
||||||
this.formModel.lessonId = '';
|
this.formModel.lessonId = '';
|
||||||
this.mapProductList = [];
|
this.mapProductList = [];
|
||||||
getPublishMapInfo(mapId).then(resp => {
|
getCommodityMapProduct(mapId).then(rest => {
|
||||||
getCommodityMapProduct(resp.data.skinCode).then(rest => {
|
|
||||||
const list = rest.data || [];
|
const list = rest.data || [];
|
||||||
this.mapProductList = list.map(elem => {
|
this.mapProductList = list.map(elem => {
|
||||||
return { value: elem.code, label: elem.name };
|
return { value: elem.code, label: elem.name };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
mapProductChange(prdCode) {
|
mapProductChange(prdCode) {
|
||||||
this.formModel.lessonId = '';
|
this.formModel.lessonId = '';
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPublishMap, getPublishMapInfo } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||||
import { packagePermissionDistribute } from '@/api/management/distribute';
|
import { packagePermissionDistribute } from '@/api/management/distribute';
|
||||||
@ -142,8 +142,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async computedMapProduct(item) {
|
async computedMapProduct(item) {
|
||||||
let name = '';
|
let name = '';
|
||||||
const resp = await getPublishMapInfo(item.mapId);
|
const rest = await getCommodityMapProduct(item.mapId);
|
||||||
const rest = await getCommodityMapProduct(resp.data.skinCode);
|
|
||||||
const list = rest.data || [];
|
const list = rest.data || [];
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
if (elem.id == item.mapProductCode) {
|
if (elem.id == item.mapProductCode) {
|
||||||
@ -206,14 +205,12 @@ export default {
|
|||||||
item.prdCode == elem.prdCode &&
|
item.prdCode == elem.prdCode &&
|
||||||
item.permissionType == elem.permissionType;
|
item.permissionType == elem.permissionType;
|
||||||
});
|
});
|
||||||
getPublishMapInfo(item.mapId).then(resp => {
|
getCommodityMapProduct(item.mapId).then(rest => {
|
||||||
getCommodityMapProduct(resp.data.skinCode).then(rest => {
|
|
||||||
const list = rest.data || [];
|
const list = rest.data || [];
|
||||||
this.mapProductList = list.map(elem => {
|
this.mapProductList = list.map(elem => {
|
||||||
return { value: elem.code, label: elem.name };
|
return { value: elem.code, label: elem.name };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
this.ruleList.push(item);
|
this.ruleList.push(item);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,41 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-card :style="{height: height+'px'}" style="overflow-y:scroll;padding-bottom:20px;">
|
<el-card :style="{height: height+'px'}" style="overflow-y:scroll;padding-bottom:20px;">
|
||||||
<div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
<div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
||||||
<div class="runPlanList">{{$t('planMonitor.openRunPlan.runPlanList')}}</div>
|
<div class="runPlanList">{{ $t('planMonitor.openRunPlan.runPlanList') }}</div>
|
||||||
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">{{$t('planMonitor.createRunningDiagram')}}</el-button>
|
<el-button v-if="isCreate" size="small" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="runPlanList" height="500" stripe
|
<el-table
|
||||||
|
:data="runPlanList"
|
||||||
|
height="500"
|
||||||
|
stripe
|
||||||
border
|
border
|
||||||
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;"
|
||||||
|
>
|
||||||
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
|
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
|
||||||
<el-table-column :label="this.$t('global.status')" v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))">
|
<el-table-column v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))" :label="this.$t('global.status')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag>{{handlerStatus(scope.row)}}</el-tag>
|
<el-tag>{{ handlerStatus(scope.row) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
|
||||||
prop="explanation"
|
prop="explanation"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
|
:label="this.$t('planMonitor.explanation')"
|
||||||
:label="this.$t('planMonitor.explanation')">
|
/>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="this.$t('planMonitor.creationDate')">
|
<el-table-column :label="this.$t('planMonitor.creationDate')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="success">{{handleTime(scope.row.createTime)}}</el-tag>
|
<el-tag type="success">{{ handleTime(scope.row.createTime) }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="this.$t('global.operate')" width="400">
|
<el-table-column :label="this.$t('global.operate')" width="400">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" class="button_box" type="success" @click="handleConfirm(scope.row)" v-if="scope.row.status !=='1'">{{$t('planMonitor.load')}}</el-button>
|
<el-button v-if="scope.row.status !=='1'" size="mini" class="button_box" type="success" @click="handleConfirm(scope.row)">{{ $t('planMonitor.load') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)" v-if="isCreate && scope.row.status !=='1'">{{$t('planMonitor.modifyName')}}</el-button>
|
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)">{{ $t('planMonitor.modifyName') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)" v-if="isCreate && scope.row.status !=='1'">{{$t('global.delete')}}</el-button>
|
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">{{ $t('global.delete') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)" v-if="isCreate && scope.row.status ==='0'">{{hasRelease?$t('global.release'):$t('planMonitor.applyRelease')}}</el-button>
|
<el-button v-if="isCreate && scope.row.status ==='0'" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)" v-if="scope.row.status === '1'">{{$t('planMonitor.preview')}}</el-button>
|
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="primary" @click="handlePreview(scope.row)">{{ $t('planMonitor.preview') }}</el-button>
|
||||||
<el-button size="mini" class="button_box" type="danger" @click="handelRevert(scope.row)" v-if="scope.row.status === '1'" >{{$t('planMonitor.revoke')}}</el-button>
|
<el-button v-if="scope.row.status === '1'" size="mini" class="button_box" type="danger" @click="handelRevert(scope.row)">{{ $t('planMonitor.revoke') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<create-empty-plan ref="createEmptyPlan" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" @refresh="refresh"/>
|
<create-empty-plan ref="createEmptyPlan" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" @refresh="refresh" />
|
||||||
<!-- @dispatchOperate="dispatchOperate" -->
|
<!-- @dispatchOperate="dispatchOperate" -->
|
||||||
<edit-plan-name ref="editPlan" @renewal="getRunPlanList" />
|
<edit-plan-name ref="editPlan" @renewal="getRunPlanList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -48,7 +52,7 @@ import { getRpListByMapId, deleteRunPlan } from '@/api/runplan';
|
|||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
export default {
|
export default {
|
||||||
name: 'userRunPlanList',
|
name: 'UserRunPlanList',
|
||||||
components: {
|
components: {
|
||||||
CreateEmptyPlan,
|
CreateEmptyPlan,
|
||||||
EditPlanName
|
EditPlanName
|
||||||
@ -76,7 +80,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 60 -30;
|
return this.$store.state.app.height - 60 - 30;
|
||||||
},
|
},
|
||||||
skinCode() {
|
skinCode() {
|
||||||
return this.$route.query.skinCode || '02';
|
return this.$route.query.skinCode || '02';
|
||||||
@ -86,24 +90,24 @@ export default {
|
|||||||
this.$store.state.user.roles.includes('05');
|
this.$store.state.user.roles.includes('05');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode);
|
|
||||||
},
|
|
||||||
mounted(){
|
|
||||||
this.getRunPlanList();
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
'$route' () {
|
'$route' () {
|
||||||
this.getRunPlanList();
|
this.getRunPlanList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.skinCode);
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getRunPlanList();
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
refresh(){
|
refresh() {
|
||||||
this.getRunPlanList();
|
this.getRunPlanList();
|
||||||
},
|
},
|
||||||
getRunPlanList() {
|
getRunPlanList() {
|
||||||
if(/^\/design\/userlist/.test(this.$route.fullPath)){
|
if (/^\/design\/userlist/.test(this.$route.fullPath)) {
|
||||||
this.isCreate=false;
|
this.isCreate = false;
|
||||||
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
|
getRpListByUserMapId(this.$route.params.mapId).then((resp) => {
|
||||||
this.runPlanList = resp.data;
|
this.runPlanList = resp.data;
|
||||||
this.runPlanList.forEach(elem => {
|
this.runPlanList.forEach(elem => {
|
||||||
@ -113,9 +117,8 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('planMonitor.openRunPlan.getRunPlanListFail'));
|
this.$messageBox(this.$t('planMonitor.openRunPlan.getRunPlanListFail'));
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
this.isCreate = true;
|
||||||
this.isCreate=true;
|
|
||||||
getRpListByMapId(this.$route.params.mapId).then((resp) => {
|
getRpListByMapId(this.$route.params.mapId).then((resp) => {
|
||||||
this.runPlanList = resp.data;
|
this.runPlanList = resp.data;
|
||||||
this.runPlanList.forEach(elem => {
|
this.runPlanList.forEach(elem => {
|
||||||
@ -130,13 +133,13 @@ export default {
|
|||||||
// dispatchOperate(){
|
// dispatchOperate(){
|
||||||
// this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
// this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
|
||||||
// },
|
// },
|
||||||
dispatchDialog(){
|
dispatchDialog() {
|
||||||
this.$refs['createEmptyPlan'].doShow();
|
this.$refs['createEmptyPlan'].doShow();
|
||||||
},
|
},
|
||||||
handleCreate(){
|
handleCreate() {
|
||||||
this.$refs['createEmptyPlan'].doShow();
|
this.$refs['createEmptyPlan'].doShow();
|
||||||
},
|
},
|
||||||
handleConfirm(row){
|
handleConfirm(row) {
|
||||||
this.loadRunPlanData({
|
this.loadRunPlanData({
|
||||||
planId: row.id,
|
planId: row.id,
|
||||||
skinCode: this.$route.query.skinCode,
|
skinCode: this.$route.query.skinCode,
|
||||||
@ -156,10 +159,9 @@ export default {
|
|||||||
this.$store.dispatch('runPlan/refresh');
|
this.$store.dispatch('runPlan/refresh');
|
||||||
} else {
|
} else {
|
||||||
const query = { skinCode: skinCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
|
const query = { skinCode: skinCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
|
||||||
if(/^\/design\/userlist/.test(this.$route.fullPath)){
|
if (/^\/design\/userlist/.test(this.$route.fullPath)) {
|
||||||
this.$router.push({ path: `${UrlConfig.plan.usertool}`, query: query });
|
this.$router.push({ path: `${UrlConfig.plan.usertool}`, query: query });
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,19 +187,19 @@ export default {
|
|||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
handlePublish(row) {
|
handlePublish(row) {
|
||||||
this.$confirm(this.hasRelease? this.$t('tip.publishRunPlanTips'):this.$t('tip.applyRunPlanTips'),this.$t('tip.hint'),{
|
this.$confirm(this.hasRelease ? this.$t('tip.publishRunPlanTips') : this.$t('tip.applyRunPlanTips'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (this.hasRelease){
|
if (this.hasRelease) {
|
||||||
publishRunPlan(row.id,{runPlanName: name}).then(resp => {
|
publishRunPlan(row.id, {runPlanName: name}).then(resp => {
|
||||||
this.$message.success(this.$t('tip.publishRunPlanSuccess'));
|
this.$message.success(this.$t('tip.publishRunPlanSuccess'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.publishRunPlanFail'));
|
this.$messageBox(this.$t('tip.publishRunPlanFail'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
releaseOrCancelRunPlan(row.id, '1').then(resp => {
|
releaseOrCancelRunPlan(row.id, '1').then(resp => {
|
||||||
this.$message.success(this.$t('tip.applyRunPlanSuccess'));
|
this.$message.success(this.$t('tip.applyRunPlanSuccess'));
|
||||||
@ -205,28 +207,28 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.applyRunPlanFail'));
|
this.$messageBox(this.$t('tip.applyRunPlanFail'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handelRevert(row) {
|
handelRevert(row) {
|
||||||
this.$confirm(this.$t('tip.cancelRunPlanTips'),this.$t('tip.hint'),{
|
this.$confirm(this.$t('tip.cancelRunPlanTips'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type:'warning'
|
type:'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
releaseOrCancelRunPlan(row.id,'0').then(resp=> {
|
releaseOrCancelRunPlan(row.id, '0').then(resp=> {
|
||||||
this.$message.success(this.$t('tip.cancelRunPlanSuccess'));
|
this.$message.success(this.$t('tip.cancelRunPlanSuccess'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.cancelRunPlanFail'))
|
this.$messageBox(this.$t('tip.cancelRunPlanFail'));
|
||||||
this.refresh();
|
this.refresh();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handlerStatus(row) {
|
handlerStatus(row) {
|
||||||
let lessonStatus = '';
|
let lessonStatus = '';
|
||||||
switch (row.status){
|
switch (row.status) {
|
||||||
case '0':
|
case '0':
|
||||||
lessonStatus = this.$t('lesson.notRelease');
|
lessonStatus = this.$t('lesson.notRelease');
|
||||||
break;
|
break;
|
||||||
@ -243,17 +245,17 @@ export default {
|
|||||||
return lessonStatus;
|
return lessonStatus;
|
||||||
},
|
},
|
||||||
handleTime(time) {
|
handleTime(time) {
|
||||||
return time.replace("T"," ");
|
return time.replace('T', ' ');
|
||||||
},
|
},
|
||||||
handlePreview(row){
|
handlePreview(row) {
|
||||||
previewRunPlan(row.id).then(resp => {
|
previewRunPlan(row.id).then(resp => {
|
||||||
const query = {
|
const query = {
|
||||||
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id,from:''
|
skinCode: row.skinCode, prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
|
||||||
};
|
};
|
||||||
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(this.$t('tip.createSimulationFaild')+this.$t('global.colon')+error.message);
|
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initLoad() {
|
async initLoad() {
|
||||||
const res = await queryRunPlanList(this.$route.query.skinCode);
|
const res = await queryRunPlanList(this.$route.params.mapId);
|
||||||
if (res.code == 200 && res.data.length) {
|
if (res.code == 200 && res.data.length) {
|
||||||
this.publishMapList = res.data;
|
this.publishMapList = res.data;
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ export default {
|
|||||||
// this.jump(resp.data, this.newModel.name);
|
// this.jump(resp.data, this.newModel.name);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
this.$messageBox(this.$t('error.createOperationGraphFailed') + this.$t('global.colon') + error.message);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ export default {
|
|||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
|
this.$messageBox(this.$t('error.createOperationGraphFailed') + this.$t('global.colon') + error.message);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { getStationListBySkinCode, queryRunPlan } from '@/api/runplan';
|
import { getStationList, queryRunPlan } from '@/api/runplan';
|
||||||
import {getRpDetailByUserMapId,getUserMapDetailByMapId} from '@/api/designPlatform';
|
import {getRpDetailByUserMapId, getUserMapDetailByMapId} from '@/api/designPlatform';
|
||||||
import { loadMapData } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import DataTable from './menus/components/dataTable';
|
import DataTable from './menus/components/dataTable';
|
||||||
|
|
||||||
@ -358,12 +358,11 @@ export default {
|
|||||||
},
|
},
|
||||||
async loadChartPage() {
|
async loadChartPage() {
|
||||||
try {
|
try {
|
||||||
if(/^\/plan\/usertool/.test(this.$route.fullPath)){
|
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||||
getUserMapDetailByMapId(this.$route.query.mapId).then(resp => {
|
getUserMapDetailByMapId(this.$route.query.mapId).then(resp => {
|
||||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
|
||||||
});
|
});
|
||||||
@ -371,15 +370,15 @@ export default {
|
|||||||
this.planConvert = this.$theme.loadPlanConvert(this.skinCode);
|
this.planConvert = this.$theme.loadPlanConvert(this.skinCode);
|
||||||
this.$store.dispatch('runPlan/clear').then(() => {
|
this.$store.dispatch('runPlan/clear').then(() => {
|
||||||
this.loadInitChart().then(() => {
|
this.loadInitChart().then(() => {
|
||||||
if (this.skinCode) {
|
if (this.$route.query.mapId) {
|
||||||
loadMapData(this.skinCode);
|
loadMapDataById(this.$route.query.mapId);
|
||||||
getStationListBySkinCode(this.$route.query.skinCode).then(resp => {
|
getStationList(this.$route.query.mapId).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
if (this.planId) {
|
if (this.planId) {
|
||||||
this.myChart && this.myChart.showLoading();
|
this.myChart && this.myChart.showLoading();
|
||||||
|
|
||||||
if(/^\/plan\/usertool/.test(this.$route.fullPath)){
|
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||||
getRpDetailByUserMapId(this.planId).then(rest => {
|
getRpDetailByUserMapId(this.planId).then(rest => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||||
@ -390,7 +389,7 @@ export default {
|
|||||||
this.myChart && this.myChart.hideLoading();
|
this.myChart && this.myChart.hideLoading();
|
||||||
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
queryRunPlan(this.planId).then(rest => {
|
queryRunPlan(this.planId).then(rest => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||||
@ -403,7 +402,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.clearCanvas();
|
this.clearCanvas();
|
||||||
}
|
}
|
||||||
@ -435,7 +433,7 @@ export default {
|
|||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
this.$messageBox(this.$t('error.loadingOperationGraphFailed')+this.$t('global.colon')+error.message);
|
this.$messageBox(this.$t('error.loadingOperationGraphFailed') + this.$t('global.colon') + error.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
|
@ -177,7 +177,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 预览
|
// 预览
|
||||||
handleView(index, row) {
|
handleView(index, row) {
|
||||||
this.$router.push({ path: `${UrlConfig.publish.runPlanView}/template`, query: { skinCode: row.skinCode, planId: row.id } });
|
this.$router.push({ path: `${UrlConfig.publish.runPlanView}/template`, query: { skinCode: row.skinCode, planId: row.id, mapId: row.mapId } });
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { getStationListBySkinCode, queryRunPlan, queryRunPlanTemplate, queryRunPlanDaily } from '@/api/runplan';
|
import { getStationList, queryRunPlan, queryRunPlanTemplate, queryRunPlanDaily } from '@/api/runplan';
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
@ -179,9 +179,9 @@ export default {
|
|||||||
this.PlanConvert = this.$theme.loadPlanConvert(opt.skinCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(opt.skinCode);
|
||||||
this.$store.dispatch('runPlan/clear').then(resp => {
|
this.$store.dispatch('runPlan/clear').then(resp => {
|
||||||
this.loadInitChart().then(() => {
|
this.loadInitChart().then(() => {
|
||||||
if (opt.skinCode && opt.planId) {
|
if (opt.mapId && opt.planId) {
|
||||||
this.myChart && this.myChart.showLoading();
|
this.myChart && this.myChart.showLoading();
|
||||||
getStationListBySkinCode(opt.skinCode).then(response => {
|
getStationList(opt.mapId).then(response => {
|
||||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
let queryFunc = null;
|
let queryFunc = null;
|
||||||
const params = opt.planId;
|
const params = opt.planId;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<span>{{ $t('map.productCategories') }}</span>
|
<span>{{ $t('map.productCategories') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||||
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
||||||
<div style="height: calc(100% - 87px);">
|
<div style="height: calc(100% - 87px);">
|
||||||
<el-tree
|
<el-tree
|
||||||
@ -29,13 +30,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProductTree } from '@/api/management/mapprd';
|
import { getPublishMapTree } from '@/api/management/mapprd';
|
||||||
|
import FilterCity from '@/views/components/filterCity';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TreeOperate',
|
name: 'TreeOperate',
|
||||||
|
components: {
|
||||||
|
FilterCity
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
|
queryFunction: getPublishMapTree,
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
@ -46,7 +52,8 @@ export default {
|
|||||||
point: {
|
point: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0
|
y: 0
|
||||||
}
|
},
|
||||||
|
localParamName: 'product_cityCode'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -54,9 +61,6 @@ export default {
|
|||||||
this.$refs.trainingTree.filter(val);
|
this.$refs.trainingTree.filter(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.refresh();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
filterNode(value, data) {
|
filterNode(value, data) {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
@ -90,14 +94,19 @@ export default {
|
|||||||
}
|
}
|
||||||
return tree;
|
return tree;
|
||||||
},
|
},
|
||||||
refresh() {
|
async refresh(filterSelect) {
|
||||||
getProductTree().then(response => {
|
console.log(filterSelect, '==========');
|
||||||
this.treeData = this.convertTreeData(response.data);
|
this.loading = true;
|
||||||
this.$nextTick(() => { this.loading = false; });
|
try {
|
||||||
}).catch(() => {
|
const res = await getPublishMapTree(filterSelect);
|
||||||
this.$messageBox(this.$t('tip.refreshFailure'));
|
this.treeData = this.convertTreeData(res.data);
|
||||||
|
this.$nextTick(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
this.loading = false;
|
||||||
|
this.$messageBox(this.$t('error.refreshFailed'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,21 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doCreate">{{$t('global.confirm')}}</el-button>
|
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
import { getCommodityMapProduct } from '@/api/management/mapprd';
|
||||||
export default {
|
export default {
|
||||||
name: 'OnceGenerate',
|
name: 'OnceGenerate',
|
||||||
|
props: {
|
||||||
|
title: String,
|
||||||
|
operateType:String
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@ -27,118 +31,110 @@
|
|||||||
typeList:[],
|
typeList:[],
|
||||||
formModel:{
|
formModel:{
|
||||||
mapId:'',
|
mapId:'',
|
||||||
name: "",
|
name: '',
|
||||||
prdCode: "",
|
prdCode: '',
|
||||||
type: "",
|
type: '',
|
||||||
id:null,
|
id:null
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
form() {
|
||||||
|
let form = {};
|
||||||
|
if (this.operateType == 'add') {
|
||||||
|
form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: [
|
||||||
|
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: this.projectList},
|
||||||
|
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList, change:true, onChange:this.changeMap},
|
||||||
|
{ prop: 'prdCode', label: this.$t('systemGenerate.prdName'), type: 'select', required: true, options:this.productList},
|
||||||
|
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},
|
||||||
|
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true, options: this.typeList}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: [
|
||||||
|
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return form;
|
||||||
|
},
|
||||||
|
rules() {
|
||||||
|
let crules = {};
|
||||||
|
if (this.operateType == 'add') {
|
||||||
|
crules = {customized:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectProject'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
mapId:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
type:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
prdCode:[
|
||||||
|
{ required: true, message: this.$t('systemGenerate.selectPrdName'), trigger: 'change'}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
crules = {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
||||||
|
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return crules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
title: String,
|
|
||||||
operateType:String
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
form() {
|
|
||||||
let form={};
|
|
||||||
if(this.operateType=="add"){
|
|
||||||
form={
|
|
||||||
labelWidth: '150px',
|
|
||||||
items: [
|
|
||||||
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true,options: this.projectList},
|
|
||||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true,options: this.mapList,change:true,onChange:this.changeMap},
|
|
||||||
{ prop: 'prdCode', label: this.$t('systemGenerate.prdName'), type: 'select', required: true,options:this.productList},
|
|
||||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true,},
|
|
||||||
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true,options: this.typeList},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
form={
|
|
||||||
labelWidth: '150px',
|
|
||||||
items: [
|
|
||||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true,},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return form
|
|
||||||
},
|
|
||||||
rules() {
|
|
||||||
let crules ={};
|
|
||||||
if(this.operateType=="add"){
|
|
||||||
crules ={customized:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectProject'), trigger: 'change'},
|
|
||||||
],
|
|
||||||
mapId:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectMap'), trigger: 'change'},
|
|
||||||
],
|
|
||||||
name: [
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
type:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'},
|
|
||||||
],
|
|
||||||
prdCode:[
|
|
||||||
{ required: true, message: this.$t('systemGenerate.selectPrdName'), trigger: 'change'},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
crules ={
|
|
||||||
name: [
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'blur' },
|
|
||||||
{ required: true, message: this.$t('systemGenerate.inputName'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return crules
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods:{
|
methods:{
|
||||||
loadInitData(){
|
loadInitData() {
|
||||||
this.projectList=[{value:'xty',label:'西铁院'}];
|
this.projectList = [{value:'xty', label:'西铁院'}];
|
||||||
let customeredProductType=ConstConfig.ConstSelect.customeredProductType;
|
const customeredProductType = ConstConfig.ConstSelect.customeredProductType;
|
||||||
this.typeList=Cookies.get("user_lang")=="en"?
|
this.typeList = Cookies.get('user_lang') == 'en'
|
||||||
customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel } }):
|
? customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
||||||
customeredProductType.map(elem => { return { value: elem.value, label: elem.label } });
|
: customeredProductType.map(elem => { return { value: elem.value, label: elem.label }; });
|
||||||
listPublishMap().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.mapInfoList=response.data;
|
this.mapInfoList = response.data;
|
||||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name } });
|
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||||
})
|
|
||||||
},
|
|
||||||
changeMap(index){
|
|
||||||
this.productList=[];
|
|
||||||
let mapInfo=this.mapInfoList.find(elem=>{
|
|
||||||
return elem.id==index;
|
|
||||||
});
|
});
|
||||||
getCommodityMapProduct(mapInfo.skinCode).then((response) => {
|
},
|
||||||
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name } });
|
changeMap(index) {
|
||||||
this.formModel.prdCode="";
|
this.productList = [];
|
||||||
|
getCommodityMapProduct(index).then((response) => {
|
||||||
|
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
|
||||||
|
this.formModel.prdCode = '';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doShow(data) {
|
doShow(data) {
|
||||||
if(data){
|
if (data) {
|
||||||
this.formModel.name=data.name;
|
this.formModel.name = data.name;
|
||||||
this.formModel.id=data.id;
|
this.formModel.id = data.id;
|
||||||
}
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
doCreate() {
|
doCreate() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
self.$emit('create', Object.assign({}, this.formModel));
|
self.$emit('create', Object.assign({}, this.formModel));
|
||||||
self.doClose()
|
self.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .el-dialog--center .el-dialog__body{
|
/deep/ .el-dialog--center .el-dialog__body{
|
||||||
|
@ -105,7 +105,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
getPublishLessonTree(this.$route.query.lessonId).then(response => {
|
getPublishLessonTree(this.$route.query.lessonId).then(response => {
|
||||||
if (response.data.tree && response.data.tree.length>0) {
|
if (response.data.tree && response.data.tree.length > 0) {
|
||||||
this.courseModel = {
|
this.courseModel = {
|
||||||
id: response.data.tree[0].id,
|
id: response.data.tree[0].id,
|
||||||
name: response.data.tree[0].name,
|
name: response.data.tree[0].name,
|
||||||
@ -136,12 +136,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickEvent(obj, node, ele) {
|
clickEvent(obj, node, ele) {
|
||||||
if (obj && obj.type==='Training') {
|
if (obj && obj.type === 'Training') {
|
||||||
if (obj.valid) {
|
if (obj.valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
trainingNotify({ trainingId: obj.id }).then(resp => {
|
trainingNotify({ trainingId: obj.id }).then(resp => {
|
||||||
const query = {
|
const query = {
|
||||||
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId
|
group: resp.data, trainingId: obj.id, lessonId: this.$route.query.lessonId, mapId: this.courseModel.mapId
|
||||||
};
|
};
|
||||||
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
@ -171,28 +171,28 @@ export default {
|
|||||||
},
|
},
|
||||||
nodeExpand(obj, node, ele) {
|
nodeExpand(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
this.expandList.push(key);
|
this.expandList.push(key);
|
||||||
setSessionStorage('trainingTeachExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingTeachExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
nodeCollapse(obj, node, ele) {
|
nodeCollapse(obj, node, ele) {
|
||||||
const key = obj.id;
|
const key = obj.id;
|
||||||
if (obj.type === 'Lesson') {
|
if (obj.type === 'Lesson') {
|
||||||
this.expandList = [];
|
this.expandList = [];
|
||||||
} else {
|
} else {
|
||||||
this.expandList = this.expandList.filter(item => item!==key);
|
this.expandList = this.expandList.filter(item => item !== key);
|
||||||
}
|
}
|
||||||
setSessionStorage('trainingTeachExpandList'+this.courseModel.id, this.expandList);
|
setSessionStorage('trainingTeachExpandList' + this.courseModel.id, this.expandList);
|
||||||
},
|
},
|
||||||
getExpandList(id) {
|
getExpandList(id) {
|
||||||
let expand = getSessionStorage('trainingTeachExpandList'+id);
|
let expand = getSessionStorage('trainingTeachExpandList' + id);
|
||||||
expand = expand?(expand+'').split(','):'';
|
expand = expand ? (expand + '').split(',') : '';
|
||||||
if (expand instanceof Array) {
|
if (expand instanceof Array) {
|
||||||
this.expandList = expand;
|
this.expandList = expand;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
startTraining(data) {
|
startTraining(data) {
|
||||||
if (data && data.type==='Training') {
|
if (data && data.type === 'Training') {
|
||||||
if (data.valid) {
|
if (data.valid) {
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${data.id}/${this.courseModel.id}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.practical}/${data.id}/${this.courseModel.id}`});
|
||||||
} else {
|
} else {
|
||||||
@ -206,7 +206,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
backLessonList() {
|
backLessonList() {
|
||||||
localStore.remove('teachDetail'+this.$route.params.subSystem);
|
localStore.remove('teachDetail' + this.$route.params.subSystem);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachHome}/${this.$route.params.subSystem}`});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,131 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-card>
|
|
||||||
<div slot="header" style="text-align: center;">
|
|
||||||
<b>{{ $t('teach.trainingName') }} {{ courseModel.name }}</b>
|
|
||||||
</div>
|
|
||||||
<div style="margin:50px">
|
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }">
|
|
||||||
<p class="list-item">
|
|
||||||
<span class="list-label">{{ $t('teach.trainingTime') }}</span>
|
|
||||||
<span class="list-elem"> {{ courseModel.minDuration | setTime }} {{ $t('teach.seconds') }}</span>
|
|
||||||
</p>
|
|
||||||
<p class="list-item">
|
|
||||||
<span class="list-label">{{ $t('teach.trainingMaximum') }}</span>
|
|
||||||
<span class="list-elem">{{ courseModel.maxDuration | setTime }} {{ $t('teach.seconds') }}</span>
|
|
||||||
</p>
|
|
||||||
<p class="list-item">
|
|
||||||
<span class="list-label">{{ $t('teach.trainingInstructions') }}</span>
|
|
||||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
|
||||||
</p>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
<div class="btn-start">
|
|
||||||
<el-button :loading="loading" type="primary" @click="start">{{ $t('teach.startTraining') }}</el-button>
|
|
||||||
<el-button @click="back">{{ $t('global.back') }}</el-button>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getTrainingDetail } from '@/api/jmap/training';
|
|
||||||
import { trainingNotify } from '@/api/simulation';
|
|
||||||
import { UrlConfig } from '@/router/index';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'LessonPracticalDetail',
|
|
||||||
filters: {
|
|
||||||
setTime(val) {
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading: false,
|
|
||||||
courseModel: {
|
|
||||||
id: '',
|
|
||||||
name: '',
|
|
||||||
maxDuration: '',
|
|
||||||
minDuration: '',
|
|
||||||
remarks: '',
|
|
||||||
updateTime: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
height() {
|
|
||||||
return this.$store.state.app.height - 50;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route(newVal) {
|
|
||||||
this.initLoadPage();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.initLoadPage();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
initLoadPage() {
|
|
||||||
const trainingId = this.$route.params.trainingId;
|
|
||||||
if (parseInt(trainingId)) {
|
|
||||||
getTrainingDetail(trainingId)
|
|
||||||
.then(res => {
|
|
||||||
this.courseModel = {
|
|
||||||
id: res.data.id,
|
|
||||||
name: res.data.name,
|
|
||||||
maxDuration: res.data.maxDuration,
|
|
||||||
remarks: res.data.remarks,
|
|
||||||
minDuration: res.data.minDuration,
|
|
||||||
updateTime: res.data.updateTime
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
start() {
|
|
||||||
this.loading = true;
|
|
||||||
trainingNotify({ trainingId: this.$route.params.trainingId }).then(resp => {
|
|
||||||
const query = {
|
|
||||||
group: resp.data, trainingId: this.$route.params.trainingId, lessonId: this.$route.params.lessonId
|
|
||||||
};
|
|
||||||
this.$router.push({ path: `${UrlConfig.display}/teach`, query: query });
|
|
||||||
launchFullscreen();
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
back() {
|
|
||||||
this.$router.back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.list-item {
|
|
||||||
font-size: 16px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-label {
|
|
||||||
display: inline-block;
|
|
||||||
text-align: right;
|
|
||||||
width: 160px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-elem {
|
|
||||||
color: #808080 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-start {
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
justify-content: center;
|
|
||||||
transform: translateY(-20px);
|
|
||||||
}
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue
Block a user