Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
8f1961b9ae
@ -80,3 +80,10 @@ export function getLessonByClassId(classId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 强制删除课程(即删除课程和课程关联的试卷) */
|
||||
export function forceDeleteLesson(lessonId) {
|
||||
return request({
|
||||
url: `/api/lesson/usedLesson/${lessonId}`
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ export function getScriptPageListOnline(params) {
|
||||
/** 分页查找上线的剧本(新版)*/
|
||||
export function getScriptPageListOnlineNew(params) {
|
||||
return request({
|
||||
url: `/api/scirpt/v1/paging/online`,
|
||||
url: `/api/script/v1/paging/online`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
@ -30,7 +30,7 @@ export function getScriptById(id) {
|
||||
/** 通过ID查询发布的剧本的详细信息(新版) */
|
||||
export function getScriptByIdNew(id) {
|
||||
return request({
|
||||
url: `/api/scirpt/v1/${id}/detail`,
|
||||
url: `/api/script/v1/${id}/detail`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -193,6 +193,14 @@ export function saveScriptScenesNew(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 剧本预览再次加载剧本*/
|
||||
export function scriptRePreview(group) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${group}/rePreview`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存录制任务数据*/
|
||||
export function saveScriptData(group) {
|
||||
return request({
|
||||
|
@ -76,5 +76,7 @@ export default {
|
||||
deviceManage: '设备管理',
|
||||
iscsDraw: 'Iscs绘制',
|
||||
iscsSystem: 'Iscs系统',
|
||||
studentManage: '学生管理'
|
||||
studentManage: '学生管理',
|
||||
competitionManage: '竞赛管理',
|
||||
refereeJManage: '仿真管理'
|
||||
};
|
||||
|
@ -76,33 +76,6 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
// this.stationList.forEach(station => {
|
||||
// if (station.code === station.concentrateStationCode) {
|
||||
// let node = {
|
||||
// label: station.name,
|
||||
// children: []
|
||||
// }
|
||||
//
|
||||
// this.stationList.forEach(elem => {
|
||||
// if (elem.visible) {
|
||||
// let next = elem;
|
||||
// while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
// next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
// }
|
||||
//
|
||||
// if (station.code == next.code) {
|
||||
// node.children.push({
|
||||
// code: elem.code,
|
||||
// label: elem.name,
|
||||
// handler: this.mapLocation,
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
//
|
||||
// this.menuNormal.push(node);
|
||||
// }
|
||||
// });
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
|
@ -371,7 +371,6 @@ export default {
|
||||
},
|
||||
// 现地信号重开操作
|
||||
reopenSignalByRoute(selectType) {
|
||||
debugger;
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
|
@ -63,29 +63,19 @@ export default {
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.code === station.concentrateStationCode) {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.visible) {
|
||||
let next = elem;
|
||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
}
|
||||
|
||||
if (station.code == next.code) {
|
||||
node.children.push({
|
||||
code: elem.code,
|
||||
label: elem.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
}
|
||||
}
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
|
@ -63,33 +63,22 @@ export default {
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.code === station.concentrateStationCode) {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.visible) {
|
||||
let next = elem;
|
||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
}
|
||||
|
||||
if (station.code == next.code) {
|
||||
node.children.push({
|
||||
code: elem.code,
|
||||
label: elem.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
}
|
||||
}
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
doShow(point) {
|
||||
|
129
src/jmapNew/theme/ningbo_01/menus/dialog/setFault.vue
Normal file
129
src/jmapNew/theme/ningbo_01/menus/dialog/setFault.vue
Normal file
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>设备:</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>故障类型:</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="deviceName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-select v-model="faultType" style="height: 32px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in faultList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: '',
|
||||
activeShow: false,
|
||||
deviceName: '',
|
||||
faultType: '',
|
||||
faultList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '设置故障';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
this.operation = operate.operation;
|
||||
this.deviceName = deviceType[selected._type] + '-' + selected.name;
|
||||
this.faultList = deviceFaultType[selected._type];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
|
||||
},
|
||||
sendCommand(operate) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -21,6 +22,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -30,7 +32,8 @@ export default {
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -95,10 +98,20 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
// {
|
||||
// label: '设置计轴失效', // 设置区段故障
|
||||
// handler: this.alxeFailure,
|
||||
// cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
// },
|
||||
{
|
||||
label: '设置计轴失效', // 设置区段故障
|
||||
handler: this.alxeFailure,
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -148,14 +161,14 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
this.mouseCancelState(this.selected);
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(()=>{
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// // 设置计轴失效
|
||||
// alxeFailure() {
|
||||
// this.mouseCancelState(this.selected);
|
||||
// commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
// }).catch(()=>{
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
// },
|
||||
// 故障解锁
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -214,7 +227,15 @@ export default {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Section.setFault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelStoppage() {}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -45,6 +45,10 @@ export const menuOperate = {
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
|
142
src/jmapNew/theme/xian_01/menus/dialog/setFault.vue
Normal file
142
src/jmapNew/theme/xian_01/menus/dialog/setFault.vue
Normal file
@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="xian-01__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>设备:</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>故障类型:</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="deviceName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-select v-model="faultType" size="small" style="height: 28px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in faultList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import { menuOperate, commitOperate } from '../utils/menuOperate';
|
||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
switchName: '',
|
||||
activeShow: false,
|
||||
deviceName: '',
|
||||
faultType: '',
|
||||
faultList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Section.stoppage.menu.operation) {
|
||||
return '设置故障';
|
||||
} else if (this.operation === OperationEvent.Section.cancelStoppage.menu.operation) {
|
||||
return '取消故障';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
this.operation = operate.operation;
|
||||
this.deviceName = deviceType[selected._type] + '-' + selected.name;
|
||||
this.faultList = deviceFaultType[selected._type];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Section.stoppage.menu.operation) {
|
||||
if (this.faultType) {
|
||||
this.sendCommand(menuOperate.Common.setFault, {faultType:this.faultType});
|
||||
}
|
||||
} else if (this.operation === OperationEvent.Section.cancelStoppage.menu.operation) {
|
||||
if (this.faultType) {
|
||||
this.sendCommand(menuOperate.Common.cancelFault, {faultType:this.faultType});
|
||||
}
|
||||
}
|
||||
},
|
||||
sendCommand(operate, param) { // 发送指令
|
||||
this.loading = true;
|
||||
commitOperate(operate, param, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -63,33 +63,22 @@ export default {
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.code === station.concentrateStationCode) {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.visible) {
|
||||
let next = elem;
|
||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
}
|
||||
|
||||
if (station.code == next.code) {
|
||||
node.children.push({
|
||||
code: elem.code,
|
||||
label: elem.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
}
|
||||
}
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
doShow(point) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,6 +21,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -28,7 +30,8 @@ export default {
|
||||
SectionControl,
|
||||
SectionCmdControl,
|
||||
SpeedCmdControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -170,45 +173,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -8,6 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +27,7 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -37,7 +39,8 @@ export default {
|
||||
RouteCmdControl,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -227,44 +230,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
|
@ -5,6 +5,7 @@
|
||||
<switch-cmd-control ref="switchCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,6 +21,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -28,7 +30,8 @@ export default {
|
||||
SwitchControl,
|
||||
SwitchCmdControl,
|
||||
SpeedCmdControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -222,42 +225,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
@ -263,7 +263,16 @@ export const menuOperate = {
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -47,41 +47,42 @@ export default {
|
||||
return {
|
||||
entryList: [
|
||||
{
|
||||
name: 'global.designPlatformEntrance',
|
||||
name: 'global.designPlatformEntrance', // 设计平台入口
|
||||
handle: this.goToDesign,
|
||||
hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
|
||||
},
|
||||
{
|
||||
name: 'global.trainingPlatformEntrance',
|
||||
name: 'global.trainingPlatformEntrance', // 实训平台入口
|
||||
handle: this.goToTraining,
|
||||
hidden: !getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
|
||||
},
|
||||
{
|
||||
name: 'global.caseShow',
|
||||
name: 'global.caseShow', // 案例展示
|
||||
handle: this.goEmpty,
|
||||
isHelp:true,
|
||||
style:'padding-right:0px;',
|
||||
hidden:getSessionStorage('project').endsWith('hyd')
|
||||
hidden:getSessionStorage('project').endsWith('hyd') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
},
|
||||
{
|
||||
name: 'global.scan',
|
||||
name: 'global.scan', // 扫码
|
||||
handle: this.qcodeEntry,
|
||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local'
|
||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local' || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
},
|
||||
{
|
||||
name: 'global.quickEntry',
|
||||
name: 'global.quickEntry', // 快速入口
|
||||
handle: this.quickEntry,
|
||||
hidden: getSessionStorage('project').startsWith('design')
|
||||
hidden: getSessionStorage('project').startsWith('design') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
},
|
||||
{
|
||||
name: LangStorage.getLang('zh') === 'zh' ? 'English' : '中文',
|
||||
handle: this.switchLanguage,
|
||||
hidden: getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'),
|
||||
tip: true
|
||||
},
|
||||
{
|
||||
name: 'global.help',
|
||||
handle: this.goToHelp,
|
||||
hidden: getSessionStorage('project').endsWith('hyd')
|
||||
hidden: getSessionStorage('project').endsWith('hyd') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
|
||||
}
|
||||
|
||||
],
|
||||
|
@ -40,7 +40,7 @@ const News = () => import('@/views/system/news/index');
|
||||
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
|
||||
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
|
||||
const configLine = () => import('@/views/system/configLine/index');
|
||||
const Mapedit = () => import('@/views/mapdraft/index');
|
||||
// const Mapedit = () => import('@/views/mapdraft/index');
|
||||
|
||||
const IscsSystem = () => import('@/views/iscs/iscsSystem/index');
|
||||
const IscsDraw = () => import('@/views/iscs/iscsDraw/index');
|
||||
@ -87,7 +87,7 @@ const MapPreview = () => import('@/views/designPlatform/mapPreview');
|
||||
const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
|
||||
const BigScreen = () => import('@/views/designPlatform/bigScreen');
|
||||
|
||||
const DesignPlatformUser = () => import('@/views/designUser/index');
|
||||
// const DesignPlatformUser = () => import('@/views/designUser/index');
|
||||
|
||||
const Package = () => import('@/views/package/index');
|
||||
|
||||
@ -121,6 +121,9 @@ const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
const StudentManage = () => import('@/views/studentManage');
|
||||
|
||||
const CompetitionManage = () => import('@/views/competition/index');
|
||||
const RefereeList = () => import('@/views/refereeList/index');
|
||||
|
||||
import { loginInfo, GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
@ -848,7 +851,6 @@ export const asyncRouter = [
|
||||
},
|
||||
{ // 新个人地图
|
||||
path: '/design',
|
||||
// redirect: '/design/usermap/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.newDesignUserPage',
|
||||
@ -980,6 +982,50 @@ export const asyncRouter = [
|
||||
]
|
||||
}
|
||||
];
|
||||
const JSXT = [
|
||||
{
|
||||
path: '/jsxt',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.competitionManage',
|
||||
roles: [user, userTrainingPlatform]
|
||||
},
|
||||
pathStr: 'jsxt',
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('jsxt') && !window.document.location.pathname.includes('jsxt') : !window.document.location.pathname.includes('jsxt'),
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: CompetitionManage,
|
||||
meta: {
|
||||
i18n: 'router.competitionManage',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/refereeJsxt',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.refereeJManage',
|
||||
roles: [admin, userTrainingPlatform]
|
||||
},
|
||||
pathStr: 'refereeJsxt',
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: RefereeList,
|
||||
meta: {
|
||||
i18n: 'router.refereeJManage',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
const createRouter = () => new Router({
|
||||
mode: 'history', // require service support
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
@ -990,6 +1036,11 @@ const router = createRouter();
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const project = getSessionStorage('project');
|
||||
JSXT.forEach(route => {
|
||||
if (from.path.includes(route.pathStr)) {
|
||||
asyncRouter.push(route);
|
||||
}
|
||||
});
|
||||
document.title = loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title;
|
||||
next();
|
||||
});
|
||||
|
@ -55,7 +55,11 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
|
||||
},
|
||||
jsxt:{
|
||||
title: '城市轨道交通竞赛平台',
|
||||
loginPath: '/js/login'
|
||||
loginPath: '/jsxt/login'
|
||||
},
|
||||
refereeJsxt:{
|
||||
title: '城市轨道交通裁判平台',
|
||||
loginPath: '/refereeJsxt/login'
|
||||
}
|
||||
};
|
||||
|
||||
@ -70,7 +74,8 @@ export const ProjectIcon = {
|
||||
designhyd: FaviconHyd,
|
||||
xadt: FaviconXadt,
|
||||
designxadt: FaviconXadt,
|
||||
jsxt: Favicon
|
||||
jsxt: Favicon,
|
||||
refereeJsxt: Favicon
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
@ -85,7 +90,7 @@ export const ProjectCode = {
|
||||
};
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['hyd', 'designhyd']; // 案例展示隐藏的项目
|
||||
export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'jsxt'];// 需要在公共路由中生成登录页面的项目&登录页样式
|
||||
export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目&登录页样式
|
||||
export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
login: '/design/login',
|
||||
design: '/login',
|
||||
@ -133,6 +138,11 @@ export const PermissionParam = { // 路径权限处理所需参数配置(跳
|
||||
whitePage: '/jsxt/login',
|
||||
reg: /^\/jsxt/,
|
||||
clientId: null
|
||||
},
|
||||
refereeJsxt: {
|
||||
whitePage: '/refereeJsxt/login',
|
||||
reg: /^\/refereeJsxt/,
|
||||
clientId: null
|
||||
}
|
||||
};
|
||||
export const ProjectList = [
|
||||
|
@ -8,7 +8,7 @@ export default class Command {
|
||||
}
|
||||
|
||||
toFound(definition, wholeParam) {
|
||||
this.id = definition.id;
|
||||
this.id = definition.operate;
|
||||
(definition.paramList || []).forEach(param => {
|
||||
if (wholeParam.hasOwnProperty(param.name)) {
|
||||
this.command[param.name] = wholeParam[param.name];
|
||||
|
@ -218,7 +218,10 @@ export default {
|
||||
/** 新建计划列车 */
|
||||
CMD_Train_Init_Plan: {value: 'Train_Init_Plan', label: '新建计划列车'}
|
||||
},
|
||||
|
||||
Fault: {
|
||||
CMD_SET_FAULT: {value: 'Set_Fault', label: '设置故障'},
|
||||
CMD_CANCEL_FAULT: {value: 'Cancel_Fault', label: '取消故障'}
|
||||
},
|
||||
LimitControl: {
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,11 @@ class CommandHandle {
|
||||
load(list) {
|
||||
this.definitionMap = {
|
||||
Center: {},
|
||||
Local: {}
|
||||
Local: {},
|
||||
Common: {
|
||||
Set_Fault:{operate: 'Set_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]},
|
||||
Cancel_Fault: {operate:'Cancel_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]}
|
||||
}
|
||||
};
|
||||
(list || []).forEach(definition => {
|
||||
this.definitionMap[definition.simulationRole][definition.operate] = definition;
|
||||
@ -25,7 +29,7 @@ class CommandHandle {
|
||||
getDefinition(cmdType) {
|
||||
if (cmdType) {
|
||||
const simulationRole = Handler.getSimulationRole();
|
||||
return this.definitionMap[simulationRole][cmdType.value] || null;
|
||||
return this.definitionMap[simulationRole][cmdType.value] || this.definitionMap.Common[cmdType.value] || null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -26,4 +26,25 @@ export const MapDeviceType = {
|
||||
MixinCommand: { type: '11', label: '混合命令' }
|
||||
|
||||
};
|
||||
|
||||
/** 设备故障类型 */
|
||||
export const deviceFaultType = {
|
||||
Section: [
|
||||
{label: '计轴故障', value: 'FAULT'},
|
||||
{label: '计轴干扰', value: 'DISTURBANCE'}
|
||||
],
|
||||
Signal: [
|
||||
{label: '主灯丝熔断故障', value: 'MAIN_FILAMENT_BROKEN'}
|
||||
],
|
||||
Switch: [
|
||||
{label: '挤岔', value: 'SPLIT'}
|
||||
]
|
||||
};
|
||||
/** 设备类型 */
|
||||
export const deviceType = {
|
||||
Section: '区段',
|
||||
Signal: '信号机',
|
||||
Switch: '道岔',
|
||||
Station: '车站',
|
||||
StationStand: '站台',
|
||||
Train: '列车'
|
||||
};
|
||||
|
@ -57,7 +57,6 @@ class Handler {
|
||||
if (operation.cmdType) {
|
||||
const cmdType = operation.cmdType;
|
||||
const wholeParam = this.getWholeParam();
|
||||
|
||||
command = CommandHandler.getCommand(cmdType, wholeParam);
|
||||
if (command && command.isError) {
|
||||
this.operations.pop();
|
||||
|
@ -26,6 +26,9 @@ function handle(state, data) {
|
||||
case 'Simulation_User': // 仿真-聊天界面用户进出仿真消息
|
||||
handleSimulationUserinfo(state, msg); // 用户进出仿真消息
|
||||
break;
|
||||
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
|
||||
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
|
||||
break;
|
||||
case 'Simulation_RunFact': // 仿真-列车实际到发车站消息
|
||||
// let runFactMsg = msg;
|
||||
// if (runFactMsg.constructor !== Array ) {
|
||||
@ -136,7 +139,6 @@ function handleSimulationInfo(state, data) {
|
||||
if (data.member.userId == userId) {
|
||||
isSelf = true;
|
||||
}
|
||||
|
||||
const myDate = new Date();
|
||||
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
|
||||
const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime;
|
||||
@ -156,61 +158,11 @@ function handleSimulationInfo(state, data) {
|
||||
date: +new Date(`${myDate1} ${chatTime}`)
|
||||
};
|
||||
state.simulationText = params;
|
||||
// if (state.coversitionList[data.conversationId]) {
|
||||
// state.coversitionList[data.conversationId].push(params);
|
||||
// } else {
|
||||
// state.coversitionList[data.conversationId] = [];
|
||||
// state.coversitionList[data.conversationId].push(params);
|
||||
// }
|
||||
}
|
||||
|
||||
// switch (data.member.role) {
|
||||
// case '01':
|
||||
// role = '管理员';
|
||||
// break;
|
||||
// case '02':
|
||||
// role = '教员';
|
||||
// break;
|
||||
// case '03':
|
||||
// role = `调度员`;
|
||||
// break;
|
||||
// case '04':
|
||||
// store.state.map.map.stationList.forEach(nor => {
|
||||
// if (nor.code == data.member.deviceCode) {
|
||||
// role = `${nor.name}`;
|
||||
// }
|
||||
// });
|
||||
// break;
|
||||
// }
|
||||
// if (!data.member.userId && data.member.deviceName) {
|
||||
// data.member.nickName = data.member.deviceName;
|
||||
// }
|
||||
// if (!data.targetMember.userId && data.targetMember.deviceName) {
|
||||
// data.targetMember.nickName = data.targetMember.deviceName;
|
||||
// }
|
||||
|
||||
// const param = {
|
||||
// join: false,
|
||||
// value: data.message,
|
||||
// self: isSelf,
|
||||
// voice: data.isAudio,
|
||||
// src: data.isAudio ? `${process.env.process.env.VUE_VOICE_API}/jlcloud/audio/${data.audioPath}` : '',
|
||||
// other: !isSelf,
|
||||
// userName: '',
|
||||
// id: data.member.id,
|
||||
// chatTime: data.chatTime,
|
||||
// date: +new Date(`${myDate1} ${chatTime}`),
|
||||
// conversationId: data.conversationId,
|
||||
// changeVO: data.changeVO || {},
|
||||
// targetMember: data.targetMember,
|
||||
// member: data.member,
|
||||
// group: data.group
|
||||
// };
|
||||
// if (data.member.role) {
|
||||
// param.userName = `${role}【${data.member.nickName}】`;
|
||||
// } else {
|
||||
// param.userName = `${data.member.nickName}`;
|
||||
// }
|
||||
// state.simulationText = param;
|
||||
// 剧本提示
|
||||
function handleSimulationScriptTipInfo(state, data) {
|
||||
state.simulationScriptTip = data;
|
||||
}
|
||||
|
||||
function handleUserinfo(state, data) {
|
||||
@ -242,6 +194,7 @@ const socket = {
|
||||
chatContent: {}, // 聊天室聊天内容
|
||||
roleList: [], // 设置角色信息
|
||||
simulationRoleList:[], // 设置仿真的聊天角色信息
|
||||
simulationScriptTip:{}, // 剧本推送提示信息
|
||||
jointRoomPrepare: false, // 演练房间准备状态
|
||||
equipmentStatus: [], // 仿真-设备状态消息
|
||||
trainStationList: [], // 仿真-列车实际到发车站消息
|
||||
|
@ -2,12 +2,12 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张S赛
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
133
src/views/competition/demonList.vue
Normal file
133
src/views/competition/demonList.vue
Normal file
@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div v-loading="loading" class="joylink-card map-list-main">
|
||||
<div class="clearfix">
|
||||
<span>{{ $t('global.mapList') }}</span>
|
||||
</div>
|
||||
<div class="left-map-list">
|
||||
<div style="height: calc(100% - 76px); overflow: auto;">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeList"
|
||||
node-key="key"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
:span="22"
|
||||
:filter-node-method="filterNode"
|
||||
:default-expanded-keys="expandList"
|
||||
@node-click="clickEvent"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
>
|
||||
<span slot-scope="{ node }">
|
||||
<span class="el-icon-tickets" />
|
||||
<span v-if="node.data.id ==='Simulation'"> 仿真系统</span>
|
||||
<span v-else> {{ node.data.name }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'DemonList',
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
treeList: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
mapId: '',
|
||||
expandList: [],
|
||||
filterSelect: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userId() {
|
||||
return this.$store.state.user.id;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
beforeDestroy () {
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
clickEvent(obj, data, ele) {
|
||||
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId, obj.id);
|
||||
while (data) {
|
||||
if (data.data.type === 'Map') {
|
||||
this.mapId = data.data.id;
|
||||
break;
|
||||
}
|
||||
data = data.parent;
|
||||
}
|
||||
console.log(obj, data, ele);
|
||||
},
|
||||
setLocalRoute(path) {
|
||||
localStore.set('trainingPlatformRoute' + this.userId, path);
|
||||
},
|
||||
nodeExpand(obj, node, ele) {
|
||||
const key = obj.id + obj.type;
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
this.expandList.push(key);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId, this.expandList);
|
||||
},
|
||||
nodeCollapse(obj, node, ele) {
|
||||
const key = obj.id + obj.type;
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId, this.expandList);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.clearfix{
|
||||
width:100%;
|
||||
height: 47px;
|
||||
line-height: 47px;
|
||||
padding-left: 17px;
|
||||
position:absolute;
|
||||
}
|
||||
.back-home {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: #3ea726;
|
||||
}
|
||||
}
|
||||
.left-map-list{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: 47px;
|
||||
}
|
||||
.map-list-main{
|
||||
text-align:left;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-tree {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
</style>
|
85
src/views/competition/index.vue
Normal file
85
src/views/competition/index.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div class="app-wrapper">
|
||||
<div class="examList" :style="{width: widthLeft+'px'}">
|
||||
<demon-list ref="demonList" @goRoutePath="goRoutePath" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view :product-list="productList" />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import demonList from './demonList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'TrainingPlatform',
|
||||
components: {
|
||||
demonList,
|
||||
drapLeft
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
widthLeft: 450,
|
||||
productList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user.id;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.widthLeft = Number(localStore.get('LeftWidth')) ? Number(localStore.get('LeftWidth')) : 450;
|
||||
},
|
||||
methods: {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
goRoutePath(data) {
|
||||
const againEnter = getSessionStorage('againEnter') || null;
|
||||
if (!againEnter) {
|
||||
launchFullscreen();
|
||||
const path = localStore.get('trainingPlatformRoute' + this.userId);
|
||||
if (path && path.startsWith('/trainingPlatform')) {
|
||||
localStore.set('orignalTrainingPlatformRoute' + this.userId, `/trainingPlatform/permission/${data[0].id}`);
|
||||
this.$router.push(path);
|
||||
} else if (data && data[0]) {
|
||||
this.$router.push(`/trainingPlatform/permission/${data[0].id}`);
|
||||
}
|
||||
setSessionStorage('againEnter', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.examList {
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
/deep/ .scrollbar-wrapper{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
/deep/ .el-scrollbar__bar.is-horizontal {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
@ -1,17 +1,22 @@
|
||||
<template>
|
||||
<div class="map-view">
|
||||
<jlmap-visual ref="jlmapVisual" />
|
||||
<jlmap-visual ref="jlmapVisual" @onMenu="onContextmenu" />
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'MapPreview',
|
||||
components: {
|
||||
JlmapVisual
|
||||
JlmapVisual,
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
widthLeft: {
|
||||
@ -24,10 +29,15 @@ export default {
|
||||
size: {
|
||||
width: document.documentElement.clientWidth - 400,
|
||||
height: document.documentElement.clientHeight - 80
|
||||
}
|
||||
},
|
||||
menu: [],
|
||||
menuNormal: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
mapId() {
|
||||
return this.$route.params.mapId;
|
||||
},
|
||||
@ -49,6 +59,13 @@ export default {
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount':function() {
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.popDoShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.popDoClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
async beforeDestroy() {
|
||||
@ -66,6 +83,62 @@ export default {
|
||||
this.endViewLoading();
|
||||
}
|
||||
},
|
||||
onContextmenu(em) {
|
||||
this.point = {
|
||||
x: em.clientX,
|
||||
y: em.clientY
|
||||
};
|
||||
if (!em.deviceType) {
|
||||
var menu = getDeviceMenuByDeviceType('Cancel');
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.popDoClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
popDoShow(point) {
|
||||
this.popClickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
popClickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.popDoClose();
|
||||
};
|
||||
},
|
||||
popDoClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 通过id加载地图数据
|
||||
async loadMapDataById(mapId) {
|
||||
try {
|
||||
|
@ -8,12 +8,20 @@
|
||||
<el-card v-loading="loading">
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column prop="name" :label="this.$t('exam.courseName')" />
|
||||
<el-table-column prop="classNames" label="所属班级">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-for="(item, index) in scope.row.classNames" :key="index" type="success">{{ item }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" show-overflow-tooltip :label="this.$t('exam.courseDescription')" />
|
||||
<el-table-column :label="this.$t('global.operate')">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">
|
||||
{{ $t('exam.enterTheExam') }}
|
||||
</el-button>
|
||||
<el-button v-if="project.endsWith('gzb') && isTeacher && userId === scope.row.creatorId" size="mini" type="danger" @click="handleDelete(scope.row)">
|
||||
删除课程
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -24,6 +32,9 @@
|
||||
<script>
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { forceDeleteLesson } from '@/api/jmap/lesson';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { lessonCreater } from '@/router/index_APP_TARGET';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
@ -31,7 +42,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false
|
||||
loading: false,
|
||||
project: '',
|
||||
isTeacher: false,
|
||||
userId: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -41,6 +55,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitPage();
|
||||
this.project = getSessionStorage('project');
|
||||
this.isTeacher = this.$store.state.user.roles.includes(lessonCreater);
|
||||
this.userId = this.$store.state.user.id;
|
||||
},
|
||||
methods: {
|
||||
loadInitPage() {
|
||||
@ -64,6 +81,21 @@ export default {
|
||||
goLesson(row) {
|
||||
localStore.set('examDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('此操作将删除课程及所有对应的试卷,且无法恢复,是否继续?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
forceDeleteLesson(row.id).then(response => {
|
||||
this.$message.success(this.$t('publish.deleteSuccess'));
|
||||
this.loadInitPage();
|
||||
}).catch((error) => {
|
||||
this.loadInitPage();
|
||||
this.$messageBox(this.$t('error.deleteFailed') + ':' + error.message);
|
||||
});
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="boradcast_box">
|
||||
<div style="margin: 20px auto 0;text-align: center;font-size: 20px;color: #9EEBEF;">语音广播</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div class="area-selection">
|
||||
<el-row><div style="margin-top: 10px;margin-bottom: 5px; color: #9EEBEF;">特定区域</div></el-row>
|
||||
<el-row><div v-for="(item, index) in verticalHeader" :key="index" class="area-selection-button" :class="{'active': item.active}" @click="selectedBatch(item)">{{ item.title }}</div></el-row>
|
||||
<el-row><el-button v-for="(item, index) in verticalHeader" :key="index" class="area-selection-button" :class="{'active': item.active}" @click="selectedBatch(item)">{{ item.title }}</el-button></el-row>
|
||||
</div>
|
||||
<div class="broadcast-form">
|
||||
<div style="width: 120px; height: 300px; float: left; position: absolute; top: 20px;">
|
||||
@ -14,9 +14,9 @@
|
||||
<div v-for="(item,i) in verticalHeader" :key="i" :style="{width: tableWidth+'px'}" class="iscs-pa-table">
|
||||
<div style="position: relative; left: 80px;">
|
||||
<div v-for="(it, j) in stationList" :key="j" class="table-grid">
|
||||
<div v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)">
|
||||
<el-button v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)">
|
||||
<div style="cursor: default;">{{ it }}</div>
|
||||
</div>
|
||||
</el-button>
|
||||
<div v-if="item.type==='checkBox'">
|
||||
<div class="pa-table-content" @click="clickArea(i,j)">
|
||||
<div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" />
|
||||
@ -32,30 +32,30 @@
|
||||
<div class="broadcast-mode">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button">广播</div></el-col>
|
||||
<el-col :span="12"><el-button class="broadcast-mode-button">广播</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="broadcast-operations">
|
||||
<el-row>
|
||||
<el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;padding-top: 30px">预备<br>广播</div></el-col>
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button" @click="selectedVideoMode('common')">
|
||||
<el-button class="broadcast-mode-button" @click="selectedVideoMode('common')">
|
||||
<div class="pa-check-box" :style="{background: videoMode==='common'?'#2EFF74':'#CDCDCD'}" />
|
||||
<div style="position: relative; left: 5px;display: inline-block;">普通预录</div>
|
||||
</div>
|
||||
</el-button>
|
||||
<br>
|
||||
<div class="broadcast-mode-button" @click="selectedVideoMode('emergency')">
|
||||
<el-button class="broadcast-mode-button" @click="selectedVideoMode('emergency')">
|
||||
<div class="pa-check-box" :style="{background: videoMode==='emergency'?'#2EFF74':'#CDCDCD'}" />
|
||||
<div style="position: relative; left: 5px;display: inline-block; color: #f00;">紧急预录</div>
|
||||
</div>
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="padding-bottom: 10px">
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button" @click="showBroadcastContent">广播内容</div>
|
||||
<el-button class="broadcast-mode-button" @click="showBroadcastContent">广播内容</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="broadcast-mode-button">广播停止</div>
|
||||
<el-button class="broadcast-mode-button">广播停止</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -64,8 +64,8 @@
|
||||
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">背景音乐</div></el-col>
|
||||
</el-row>
|
||||
<el-row style="padding-bottom: 10px">
|
||||
<el-col :span="12"><div class="broadcast-mode-button">播放音乐</div></el-col>
|
||||
<el-col :span="12"><div class="broadcast-mode-button">停止音乐</div></el-col>
|
||||
<el-col :span="12"><el-button class="broadcast-mode-button">播放音乐</el-button></el-col>
|
||||
<el-col :span="12"><el-button class="broadcast-mode-button">停止音乐</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
selectedBatch(data) {
|
||||
data.active = !data.active;
|
||||
if (data.key == 'station') {
|
||||
this.selectedAll();
|
||||
this.selectedAll(data);
|
||||
} else {
|
||||
let areaIndex;
|
||||
this.verticalHeader.map((item, index) => {
|
||||
@ -146,48 +146,28 @@ export default {
|
||||
areaIndex = index;
|
||||
}
|
||||
});
|
||||
const flag = this.checkSelectedBatch(areaIndex);
|
||||
const flag = data.active;
|
||||
for (let j = 0; j < this.stationList.length; j++) {
|
||||
if (!this.selectedAreaList.includes(areaIndex + '-' + j) && !flag) {
|
||||
if (!this.selectedAreaList.includes(areaIndex + '-' + j) && flag) {
|
||||
this.selectedAreaList.push(areaIndex + '-' + j);
|
||||
} else if (flag) {
|
||||
} else if (!flag) {
|
||||
const index = this.selectedAreaList.indexOf(areaIndex + '-' + j);
|
||||
this.selectedAreaList.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
selectedAll() {
|
||||
const flag = this.checkSelectedAll();
|
||||
selectedAll(data) {
|
||||
const flag = data.active;
|
||||
this.selectedAreaList = [];
|
||||
for (let i = 1; i < this.verticalHeader.length; i++) {
|
||||
for (let j = 0; j < this.stationList.length; j++) {
|
||||
if (!flag) {
|
||||
if (flag) {
|
||||
this.selectedAreaList.push(i + '-' + j);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
checkSelectedAll() {
|
||||
let selectedAllFlag = true;
|
||||
for (let i = 1; i < this.verticalHeader.length; i++) {
|
||||
for (let j = 0; j < this.stationList.length; j++) {
|
||||
if (!this.selectedAreaList.includes(i + '-' + j)) {
|
||||
selectedAllFlag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return selectedAllFlag;
|
||||
},
|
||||
checkSelectedBatch(areaIndex) {
|
||||
let selectedBatchFlag = true;
|
||||
for (let j = 0; j < this.stationList.length; j++) {
|
||||
if (!this.selectedAreaList.includes(areaIndex + '-' + j)) {
|
||||
selectedBatchFlag = false;
|
||||
}
|
||||
}
|
||||
return selectedBatchFlag;
|
||||
},
|
||||
checkSelectedStation(stationIndex) {
|
||||
let selectedStationFlag = true;
|
||||
for (let i = 1; i < this.verticalHeader.length; i++) {
|
||||
@ -224,7 +204,15 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/{
|
||||
.el-button{
|
||||
border-radius: 0 !important;
|
||||
color: #333 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.area-selection{
|
||||
text-align: center;
|
||||
border-top: 3px solid #898888;
|
||||
@ -248,6 +236,8 @@ export default {
|
||||
border-right: 2px solid #565656;
|
||||
border-bottom: 2px solid #565656;
|
||||
cursor: default;
|
||||
margin-left: 0;
|
||||
&:active,
|
||||
&.active{
|
||||
background: #cccccc;
|
||||
border-top: 2px solid #9c9c9c;
|
||||
@ -298,6 +288,9 @@ export default {
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
&:active,
|
||||
&.active{
|
||||
background: #cccccc;
|
||||
border-top: 2px solid #9c9c9c;
|
||||
@ -364,16 +357,15 @@ export default {
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
background: #CCCCCC;
|
||||
position: relative;
|
||||
top: 5px;
|
||||
width: 85%;
|
||||
left: 5%;
|
||||
line-height: 28px;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
cursor: default;
|
||||
padding: 0;
|
||||
&:active,
|
||||
&.active{
|
||||
background: #cccccc;
|
||||
border-top: 2px solid #9c9c9c;
|
||||
|
@ -11,7 +11,6 @@
|
||||
<emergency-release v-else-if="mode === 'EmergencyRelease'" />
|
||||
<controlBAS v-else-if="mode === 'controlBAS'" />
|
||||
<controlPermissionBAS v-else-if="mode === 'controlPermissionBAS'" />
|
||||
<!-- <mainScreenPA v-else-if="mode === 'mainScreenPA'" /> -->
|
||||
<radioListeningPA v-else-if="mode === 'radioListeningPA'" />
|
||||
<timePreviewPA v-else-if="mode === 'timePreviewPA'" />
|
||||
<controlCCTV v-else-if="mode === 'controlCCTV'" />
|
||||
@ -75,7 +74,6 @@ export default {
|
||||
EmergencyRelease,
|
||||
controlBAS,
|
||||
controlPermissionBAS,
|
||||
// mainScreenPA,
|
||||
radioListeningPA,
|
||||
timePreviewPA,
|
||||
controlCCTV,
|
||||
|
@ -1,10 +1,226 @@
|
||||
<template>
|
||||
<div>
|
||||
广播监听
|
||||
<div class="boradcast_box">
|
||||
<div style="margin: 20px auto 0;text-align: center;font-size: 20px;color: #9EEBEF;">实时监听</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div class="broadcast-form">
|
||||
<div style="width: 120px; height: 300px; float: left; position: absolute; top: 20px;">
|
||||
<div v-for="(item,i) in verticalHeader" :key="i" :style="{top: i * 31.5 +'px'}" class="left-header">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="float: left; overflow-x: auto; width: 100%; height: 314px;">
|
||||
<div v-for="(item,i) in verticalHeader" :key="i" :style="{width: tableWidth+'px'}" class="iscs-pa-table">
|
||||
<div style="position: relative; left: 80px;">
|
||||
<div v-for="(it, j) in stationList" :key="j" class="table-grid">
|
||||
<el-button v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)">
|
||||
<div style="cursor: default;">{{ it }}</div>
|
||||
</el-button>
|
||||
<div v-if="item.type==='checkBox'">
|
||||
<div class="pa-table-content" @click="clickArea(i,j)">
|
||||
<div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" />
|
||||
</div>
|
||||
<div style="display: inline-block;margin-left: 5px;height: 18px;line-height: 18px;transform: translateY(-25%);color: #192780;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_box">
|
||||
<div class="list-box">
|
||||
<div class="color_box" style="background: #fff;">0</div>
|
||||
<div class="text_box">广播区没有占用</div>
|
||||
</div>
|
||||
<div class="list-box">
|
||||
<div class="color_box" style="background: #1a7913;">5</div>
|
||||
<div class="text_box">广播区占用</div>
|
||||
</div>
|
||||
<div class="list-box">
|
||||
<div class="color_box" style="background: #fff;">
|
||||
<div class="color" />
|
||||
</div>
|
||||
<div class="text_box">被选择</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
verticalHeader: [
|
||||
{name: '车站', title: '全线', key: 'station', type: 'header', active: false},
|
||||
{name: '站厅', title: '全站厅', key: 'stationHall', type: 'checkBox', active: false},
|
||||
{name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false},
|
||||
{name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false},
|
||||
{name: '办公区', title: '全办公区', key: 'officeArea', type: 'checkBox', active: false},
|
||||
{name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false},
|
||||
{name: '换乘通道', title: '全换乘通道', key: 'channel', type: '', active: false}
|
||||
],
|
||||
selectedAreaList: [],
|
||||
stationList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
tableWidth() {
|
||||
return this.stationList.length * 135 + 80;
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
// 请求当前线路车站列表
|
||||
const res = await getByGroupStationList(this.$route.query.group);
|
||||
if (res.code == 200) {
|
||||
this.stationList = [];
|
||||
res.data.forEach(station => {
|
||||
if (!station.depot) {
|
||||
this.stationList.push(station.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkSelectedStation(stationIndex) {
|
||||
let selectedStationFlag = true;
|
||||
for (let i = 1; i < this.verticalHeader.length; i++) {
|
||||
if (!this.selectedAreaList.includes(i + '-' + stationIndex)) {
|
||||
selectedStationFlag = false;
|
||||
}
|
||||
}
|
||||
return selectedStationFlag;
|
||||
},
|
||||
selectedStation(station) {
|
||||
let stationIndex;
|
||||
this.stationList.forEach((item, index) => {
|
||||
if (item === station) {
|
||||
stationIndex = index;
|
||||
}
|
||||
});
|
||||
const flag = this.checkSelectedStation(stationIndex);
|
||||
for (let i = 1; i < this.verticalHeader.length; i++) {
|
||||
if (!this.selectedAreaList.includes(i + '-' + stationIndex) && !flag) {
|
||||
this.selectedAreaList.push(i + '-' + stationIndex);
|
||||
} else if (flag) {
|
||||
const index = this.selectedAreaList.indexOf(i + '-' + stationIndex);
|
||||
this.selectedAreaList.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/{
|
||||
.el-button{
|
||||
border-radius: 0 !important;
|
||||
color: #333 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.broadcast-form{
|
||||
text-align: center;
|
||||
border-top: 3px solid #898888;
|
||||
border-left: 3px solid #898888;
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
width: 80%;
|
||||
height: 340px;
|
||||
margin: 63px auto 30px;
|
||||
overflow-x: auto;
|
||||
padding-top: 20px;
|
||||
position: relative;
|
||||
.left-header{
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
padding-left: 20px;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
color: #A2E8EB;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #45607B;
|
||||
z-index: 10;
|
||||
}
|
||||
.table-grid{
|
||||
width: 135px;
|
||||
display: inline-block;
|
||||
padding-left: 10px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.pa-table-header{
|
||||
background: #cccccc;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
&:active,
|
||||
&.active{
|
||||
background: #cccccc;
|
||||
border-top: 2px solid #9c9c9c;
|
||||
border-left: 2px solid #9c9c9c;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
}
|
||||
.pa-table-content{
|
||||
margin:0 auto;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
background: #D4D4D4;
|
||||
display: inline-block;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
}
|
||||
.pa-table-content-inside{
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
margin: auto;
|
||||
background:#CCCCCC;
|
||||
position: relative;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
}
|
||||
}
|
||||
.bottom_box{
|
||||
display: table;
|
||||
float: right;
|
||||
margin-right: 14%;
|
||||
.list-box{
|
||||
width: auto;
|
||||
overflow: hidden;
|
||||
margin-bottom: 5px;
|
||||
.color_box{
|
||||
width: 25px;
|
||||
height: 20px;
|
||||
float: left;
|
||||
color: #000;
|
||||
margin-right: 15px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
.color{
|
||||
width: 10px;
|
||||
height: 8px;
|
||||
background: #02c102;
|
||||
}
|
||||
}
|
||||
.text_box{
|
||||
color: #fff;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
line-height: 19px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,10 +1,102 @@
|
||||
<template>
|
||||
<div>
|
||||
计时一览
|
||||
<div class="time_preview">
|
||||
<div class="time_preview_header">
|
||||
<div class="preview_header_text">中心广播控制一览</div>
|
||||
</div>
|
||||
<div class="time_preview_content">
|
||||
<el-table cell-class-name="time_preview_column" header-cell-class-name="time_preview_thead" :data="tableData" border style="width:100%;overflow-y: auto;" highlight-current-row height="496">
|
||||
<el-table-column prop="describe" label="信息描述" />
|
||||
<el-table-column prop="startdate" label="开始日期" width="100" />
|
||||
<el-table-column prop="starttime" label="开始时间" width="100" />
|
||||
<el-table-column prop="enddate" label="结束日期" width="100" />
|
||||
<el-table-column prop="endtime" label="结束时间" width="100" />
|
||||
<el-table-column prop="interAmplitude" label="延迟时间" width="100" />
|
||||
<el-table-column prop="grade" label="等级" width="100" />
|
||||
<el-table-column prop="status" label="指定状态" width="180" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="time_preview_footer">
|
||||
<div class="preview_footer_top">操作</div>
|
||||
<div class="preview_footer_content">
|
||||
<div class="each_preview_btn">删除</div>
|
||||
<div class="each_preview_btn">停用</div>
|
||||
<div class="each_preview_btn">激活</div>
|
||||
<div class="each_preview_btn">修改</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
tableData:[
|
||||
{describe:'为了您和他人的安全,请不要在车厢内吸烟', startdate: '2018-06-15', starttime:'00:00:00', enddate: '2018-06-15', endtime:'23:59:59', interAmplitude:'00:00:30', grade: '普通', status:'0'},
|
||||
{describe:'手牵手积极防灾,心连心构建和谐家园', startdate: '2018-06-15', starttime:'00:01:32', enddate: '2018-06-15', endtime:'23:59:59', interAmplitude:'00:00:30', grade: '普通', status:'0'},
|
||||
{describe:'严禁携带易燃、易爆、剧毒、放射性、腐蚀性等危险物品', startdate: '2018-06-15', starttime:'00:00:00', enddate: '2018-06-15', endtime:'23:59:59', interAmplitude:'00:00:30', grade: '普通', status:'0'},
|
||||
{describe:'不要轻易给陌生人汇款、转账,谨防上当受骗', startdate: '2018-06-15', starttime:'00:00:00', enddate: '2018-06-15', endtime:'23:59:59', interAmplitude:'00:00:30', grade: '普通', status:'0'}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
indexMethod(index) {
|
||||
return index + 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/{
|
||||
.time_preview{padding:20px;}
|
||||
.preview_header_text{margin-top:10px;text-align: center;color: #9af1ec;font-size: 18px;padding-bottom: 10px;}
|
||||
.time_preview_content{
|
||||
width: 75%;
|
||||
height:500px;
|
||||
border-top: 2px solid #8c8a89;
|
||||
overflow-y: auto;
|
||||
margin: 20px auto 0;
|
||||
display:flex;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
.time_preview_footer{width: 75%;margin: 0 auto;border-top: 2px solid #8c8a89;
|
||||
border-left: 2px solid #8c8a89;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;background:#aabbbb;}
|
||||
.el-table .time_preview_column .cell{font-size:12px;}
|
||||
.el-table td.time_preview_column{padding:5px 0px;}
|
||||
.preview_footer_top{width: 100%;font-weight:bold;padding:10px 0px;text-align:center;background:#000077;color:#fff;font-size:12px;}
|
||||
.each_preview_btn{
|
||||
width:80px;
|
||||
text-align:center;
|
||||
height:38px;
|
||||
display:flex;
|
||||
align-items: center;
|
||||
justify-content:center;
|
||||
margin-left:4px;
|
||||
font-size:12px;
|
||||
cursor: pointer;
|
||||
vertical-align:top;
|
||||
font-weight:bold;
|
||||
border-top: 3px solid #f9f9f9;
|
||||
border-left: 3px solid #f6f8f8;
|
||||
border-right: 3px solid #565656;
|
||||
border-bottom: 3px solid #565656;
|
||||
background: #cccccc;
|
||||
&:active{
|
||||
background: #cccccc;
|
||||
border-top: 3px solid #9c9c9c;
|
||||
border-left: 3px solid #9c9c9c;
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
}
|
||||
}
|
||||
.el-table .time_preview_thead{background:#000077;color:#fff;padding: 5px 0px;text-align:center;font-size: 12px;}
|
||||
.preview_footer_content{margin-top:15px;margin-left:20px;margin-bottom:10px;display:flex; justify-content: center; align-items: center;}
|
||||
.current-row>td {
|
||||
background: #91AAC2 !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="width: 100%;height: 100%; position: relative;">
|
||||
<div class="iscs_lcd_box" style="width: 100%;height: 100%; position: relative;">
|
||||
<div class="lcdControl_title">LCD控制屏</div>
|
||||
<div class="area_select" style="position: absolute; top: 15%; left: 25%; width: 80px; height: 50px;">
|
||||
<div>特定区域</div>
|
||||
@ -28,6 +28,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.iscs_lcd_box {
|
||||
|
||||
}
|
||||
.lcdControl_title{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="main_screen_content">
|
||||
<div class="screen_left">
|
||||
<div class="screen_left_tab">特定区域</div>
|
||||
<div class="sceen_left_content">
|
||||
<!-- <div class="sceen_left_content">
|
||||
<div class="screen_operate_name" @click="selectedAllLine">全线</div>
|
||||
<div class="screen_operate_name" @click="selectedAreaBatch(0)">全站厅(LCD)</div>
|
||||
<div class="screen_operate_name" @click="selectedAreaBatch(1)">全上行站台</div>
|
||||
@ -15,20 +15,13 @@
|
||||
<div class="screen_operate_name" @click="selectedAreaBatch(4)">全物业</div>
|
||||
<div class="screen_operate_name" @click="selectedAreaBatch(5)">全天桥</div>
|
||||
<div class="screen_operate_name" @click="selectedAreaBatch(6)">出入口(LED)</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<el-row><el-button v-for="(item, index) in verticalHeader" :key="index" class="screen_operate_name" :class="{'active': item.active}" @click="selectedBatch(item)">{{ item.title }}</el-button></el-row>
|
||||
</div>
|
||||
<div class="screen_main_content">
|
||||
<div class="screen_main_content_inner">
|
||||
<div class="screen_left_text_group">
|
||||
<div class="each_data_info">车站</div>
|
||||
<div class="each_data_info">站厅(LCD)</div>
|
||||
<div class="each_data_info">上行站台</div>
|
||||
<div class="each_data_info">下行站台</div>
|
||||
<div class="each_data_info">出站口</div>
|
||||
<div class="each_data_info">天桥1</div>
|
||||
<div class="each_data_info">天桥2</div>
|
||||
<div class="each_data_info">物业</div>
|
||||
<div class="each_data_info">LED</div>
|
||||
<div v-for="(item, index) in verticalHeader" :key="index" class="each_data_info">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="screen_right_group">
|
||||
<div class="screen_right_group_in">
|
||||
@ -93,6 +86,17 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
verticalHeader: [
|
||||
{name: '车站', title: '全线', key: 'station', type: 'header', active: false},
|
||||
{name: '站厅(LCD)', title: '全站厅(LCD)', key: 'stationHall', type: 'checkBox', active: false},
|
||||
{name: '上行站台', title: '全上行站台', key: 'uplinkStation', type: 'checkBox', active: false},
|
||||
{name: '下行站台', title: '全下行站台', key: 'downlinkStation', type: 'checkBox', active: false},
|
||||
{name: '出入口', title: '全出入口', key: 'passageway', type: 'checkBox', active: false},
|
||||
{name: '物业', title: '全物业', key: 'property', type: 'checkBox', active: false},
|
||||
{name: '天桥1', title: '天桥1', key: 'overbridge1', type: 'checkBox', active: false},
|
||||
{name: '天桥2', title: '天桥2', key: 'overbridge2', type: 'checkBox', active: false},
|
||||
{name: 'LED', title: '出入口(LED)', key: 'LED', type: 'checkBox', active: false}
|
||||
],
|
||||
stationList:[],
|
||||
selectedAreaList: []
|
||||
};
|
||||
@ -122,31 +126,7 @@ export default {
|
||||
showInfoBrroadcast() {
|
||||
this.$refs.infoBroadcast.doShow();
|
||||
},
|
||||
selectedAllLine() {
|
||||
const flag = this.checkSelectedAllLine();
|
||||
this.selectedAreaList = [];
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
if (item.status === 'default' && !flag) {
|
||||
this.selectedAreaList.push(station.stationName + '-' + index);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
checkSelectedAllLine() {
|
||||
let selectedAllLineFlag = true;
|
||||
this.stationList.some(station => {
|
||||
station.children.some((item, index) => {
|
||||
if (item.status === 'default') {
|
||||
const elem = station.stationName + '-' + index;
|
||||
selectedAllLineFlag = this.selectedAreaList.includes(elem);
|
||||
return !selectedAllLineFlag;
|
||||
}
|
||||
});
|
||||
return !selectedAllLineFlag;
|
||||
});
|
||||
return selectedAllLineFlag;
|
||||
},
|
||||
|
||||
selectArea(stationName, index) {
|
||||
const elem = stationName + '-' + index;
|
||||
if (this.selectedAreaList.includes(elem)) {
|
||||
@ -178,37 +158,61 @@ export default {
|
||||
});
|
||||
return stationSelectedFlag;
|
||||
},
|
||||
selectedAreaBatch(areaIndex) {
|
||||
const flag = this.checkAreaBatchSelected(areaIndex);
|
||||
selectedBatch(data) {
|
||||
data.active = !data.active;
|
||||
if (data.key == 'station') {
|
||||
this.selectedAllLine(data);
|
||||
} else {
|
||||
let areaIndex;
|
||||
this.verticalHeader.map((item, index) => {
|
||||
if (item.key === data.key) {
|
||||
areaIndex = index;
|
||||
}
|
||||
});
|
||||
const flag = data.active;
|
||||
// this.stationList.forEach(station => {
|
||||
// station.children.forEach((item, index) => {
|
||||
// const elem = station.stationName + '-' + index;
|
||||
// if (item.status === 'default' && index === areaIndex && !flag) {
|
||||
// const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
|
||||
// this.selectedAreaList.splice(selectedAreaIndex, 1);
|
||||
// } else if (item.status === 'default' && index === areaIndex && !flag && !this.selectedAreaList.includes(elem)) {
|
||||
// this.selectedAreaList.push(elem);
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
for (let j = 0; j < this.stationList.length; j++) {
|
||||
if (!this.selectedAreaList.includes(areaIndex + '-' + j) && flag) {
|
||||
this.selectedAreaList.push(areaIndex + '-' + j);
|
||||
} else if (!flag) {
|
||||
const index = this.selectedAreaList.indexOf(areaIndex + '-' + j);
|
||||
this.selectedAreaList.splice(index, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
selectedAllLine(data) {
|
||||
const flag = data.active;
|
||||
this.selectedAreaList = [];
|
||||
this.stationList.forEach(station => {
|
||||
station.children.forEach((item, index) => {
|
||||
const elem = station.stationName + '-' + index;
|
||||
if (item.status === 'default' && index === areaIndex && flag) {
|
||||
const selectedAreaIndex = this.selectedAreaList.indexOf(elem);
|
||||
this.selectedAreaList.splice(selectedAreaIndex, 1);
|
||||
} else if (item.status === 'default' && index === areaIndex && !flag && !this.selectedAreaList.includes(elem)) {
|
||||
this.selectedAreaList.push(elem);
|
||||
if (item.status === 'default' && flag) {
|
||||
this.selectedAreaList.push(station.stationName + '-' + index);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
checkAreaBatchSelected(areaIndex) {
|
||||
let selectedAreaBatchFlag = true;
|
||||
this.stationList.some(station => {
|
||||
station.children.some((item, index) => {
|
||||
if (item.status === 'default' && index === areaIndex) {
|
||||
selectedAreaBatchFlag = this.selectedAreaList.includes(station.stationName + '-' + index);
|
||||
return !selectedAreaBatchFlag;
|
||||
}
|
||||
});
|
||||
return !selectedAreaBatchFlag;
|
||||
});
|
||||
return selectedAreaBatchFlag;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/{
|
||||
.el-button{
|
||||
border-radius: 0 !important;
|
||||
color: #333 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
.screen_header_text{margin-top: 20px;text-align: center;color: #9af1ec;font-size: 18px;padding-right: 100px;padding-bottom: 10px;}
|
||||
.main_screen{padding-left: 50px;width: 100%;}
|
||||
.main_screen_header{}
|
||||
@ -258,7 +262,7 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
|
||||
vertical-align: top;
|
||||
}
|
||||
.screen_status_active::after{content:'';border-top: 2px solid #a6a2a6;border-left: 2px solid #a5aca5;border-right: 2px solid #ececec;border-bottom: 2px solid #e4e4e4;background: #00ff00;min-width: 10px;height: 10px;display: inline-block;vertical-align: top;}
|
||||
.screen_left_text_group{width:210px;padding: 0px 10px 10px 10px;font-size: 14px;color: #9de4e8;display: inline-block;}
|
||||
.screen_left_text_group{width:260px;padding: 0px 10px 10px 10px;font-size: 14px;color: #9de4e8;display: inline-block;}
|
||||
.each_data_info{margin-top:10px;height:20px;}
|
||||
.screen_right_group{display: inline-block;vertical-align: top;font-size:0;overflow-x: auto;min-height:100%;}
|
||||
.each_station_info{width:130px;display: inline-block;vertical-align:top;padding-right: 10px;}
|
||||
@ -272,30 +276,20 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
|
||||
border-right: 2px solid #9e9e9e;
|
||||
border-bottom: 2px solid #636667;
|
||||
cursor: pointer;
|
||||
&.active,
|
||||
&:hover{
|
||||
background: #EBB570;
|
||||
border-top: 2px solid #795B31;
|
||||
border-left: 2px solid #795B31;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
margin-left: 0;
|
||||
margin-top: 10px;
|
||||
&:active,
|
||||
&.active{
|
||||
background: #cccccc;
|
||||
border-top: 2px solid #9c9c9c;
|
||||
border-left: 2px solid #9c9c9c;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
}
|
||||
.screen_station_name{
|
||||
width: 120px;
|
||||
}
|
||||
.screen_operate_name{
|
||||
width: 84px;
|
||||
margin-left: 5px;
|
||||
margin-top: 10px;
|
||||
// &:hover{
|
||||
// background: #EBB570;
|
||||
// border-top: 2px solid #795B31;
|
||||
// border-left: 2px solid #795B31;
|
||||
// border-right: 2px solid #fff;
|
||||
// border-bottom: 2px solid #fff;
|
||||
// }
|
||||
}
|
||||
.screen_station_name.active{
|
||||
background: #EBB570;
|
||||
border-top: 2px solid #795B31;
|
||||
|
@ -73,8 +73,9 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.time_preview{padding:20px;}
|
||||
<style lang="scss" scoped>
|
||||
/deep/{
|
||||
.time_preview{padding:20px;}
|
||||
.preview_header_text{margin-top:10px;text-align: center;color: #9af1ec;font-size: 18px;padding-bottom: 10px;}
|
||||
.time_preview_content{width:100%;height:500px;border-top: 2px solid #8c8a89;overflow-y: auto;margin-top:10px;display:flex;border-left: 2px solid #8c8a89;border-right: 2px solid #fff;border-bottom: 2px solid #fff;}
|
||||
.time_preview_footer{width:650px;margin-top:20px;border-top: 2px solid #8c8a89;
|
||||
@ -113,5 +114,6 @@ export default {
|
||||
}
|
||||
.el-table .time_preview_thead:not(:first-child){background:#000077;color:#fff;padding: 5px 0px;text-align:center;font-size: 12px;}
|
||||
.preview_footer_content{margin-top:15px;margin-left:20px;margin-bottom:10px;display:flex;flex-direction:row}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="joylink-card">
|
||||
<div class="lesson-header">
|
||||
<div class="lesson-list">{{ $t('lesson.courseList') }}</div>
|
||||
<div class="lesson-list">草稿{{ $t('lesson.courseList') }}</div>
|
||||
<div class="but-group">
|
||||
<el-button v-if="hasRelease" size="mini" @click="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
|
||||
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
|
||||
@ -66,10 +66,6 @@ export default {
|
||||
},
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('lesson.explanation'),
|
||||
prop: 'explanation'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
@ -209,7 +205,7 @@ export default {
|
||||
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}});
|
||||
},
|
||||
trainingManage() {
|
||||
if (this.$route.query.drawWay + '' === 'true') {
|
||||
if (this.$route.query.drawWay + '' === 'true') {
|
||||
this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}});
|
||||
} else {
|
||||
this.$router.push({path: `${UrlConfig.design.trainingManageOld}`, query: {mapId: this.$route.params.mapId, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode}});
|
||||
|
@ -215,6 +215,10 @@ export default {
|
||||
this.modelType = 'design';
|
||||
this.loginClient = 'Design';
|
||||
this.path = UrlConfig.design.prefix;
|
||||
} else if (this.project.startsWith('jsxt')) {
|
||||
this.path = '/jsxt/home';
|
||||
} else if (this.project.startsWith('refereeJsxt')) {
|
||||
this.path = '/refereeJsxt/home';
|
||||
}
|
||||
|
||||
const nowLang = LangStorage.getLang('zh');
|
||||
|
@ -450,7 +450,7 @@ export default {
|
||||
isSwitchSection: true,
|
||||
relSwitchCode: elem.code,
|
||||
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
|
||||
logicSectionNum: [0],
|
||||
logicSectionNum: 0,
|
||||
logicSectionShow: false,
|
||||
sepTypeLeft: '00',
|
||||
offsetLeft: 0,
|
||||
|
@ -252,8 +252,7 @@ export default {
|
||||
|
||||
if (collection && collection.length) {
|
||||
collection.forEach(elem => {
|
||||
if (elem.type !== '03' && !elem.isSwitchSection && (
|
||||
elem.logicSectionNum.length == 0 || elem.logicSectionNum.length == 1 && elem.logicSectionNum[0] == 0)) {
|
||||
if (elem.type !== '03' && !elem.isSwitchSection && (Number(elem.logicSectionNum) == 0)) {
|
||||
const triangle = new JTriangle(elem.points[0], elem.points[elem.points.length - 1]);
|
||||
models.push(this.createModel({
|
||||
triangle: triangle,
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-box-content">
|
||||
<chat-content ref="chatContent" :current-coversition="currentCoversition" @addCoversition="addCoversition" />
|
||||
<chat-content ref="chatContent" :current-coversition="currentCoversition" @changeCoversition="changeCoversition" />
|
||||
<div v-if="recordSending" class="chat_record_tip">
|
||||
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
|
||||
<div class="record_icon" />
|
||||
@ -31,6 +31,7 @@
|
||||
<div class="chat-box-footer">
|
||||
<div class="chat-box-footer-tool" />
|
||||
<div class="chat-box-footer-send" @click="startRecording()">发送语音</div>
|
||||
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -74,6 +75,7 @@ export default {
|
||||
inter:null,
|
||||
recorders: null,
|
||||
microphone:null,
|
||||
scriptTip:'',
|
||||
form:{
|
||||
language:'zh',
|
||||
sex:'1'
|
||||
@ -89,6 +91,17 @@ export default {
|
||||
this.$refs.chatCoversitionList.setCoversitionStatus(val);
|
||||
});
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationScriptTip':function(val, old) {
|
||||
if (val) {
|
||||
if (val.type == 'Conversation') {
|
||||
const target = this.$refs.chatMemberList.getMember(val.targetId);
|
||||
if (target && target.length > 0) {
|
||||
this.scriptTip = '请对' + target[0].memberName + '说:' + val.reply;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -110,19 +123,24 @@ export default {
|
||||
},
|
||||
setCurrentCoversition(coversition) {
|
||||
this.currentCoversition = coversition;
|
||||
if (this.recordSending) {
|
||||
this.cancleRecording();
|
||||
}
|
||||
},
|
||||
setHeadTitle(headerTitle) {
|
||||
this.headerTitle = headerTitle;
|
||||
},
|
||||
addCoversition({data, headerTitle}) {
|
||||
this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
|
||||
if (headerTitle) {
|
||||
this.currentCoversition = {id:data.id, group:data.group};
|
||||
this.headerTitle = headerTitle;
|
||||
}
|
||||
this.currentCoversition = {id:data.id, group:data.group};
|
||||
this.headerTitle = headerTitle;
|
||||
},
|
||||
changeCoversition(data) {
|
||||
this.$refs.chatCoversitionList.changeCoversitionOther(data);
|
||||
},
|
||||
// 语音录制开始
|
||||
startRecording() {
|
||||
this.scriptTip = '';
|
||||
const that = this;
|
||||
if (!this.recordSending && !this.recorders && !this.microphone) {
|
||||
this.$refs.chatSetting.doClose();
|
||||
@ -267,6 +285,7 @@ export default {
|
||||
.chat-box-footer{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.chat-window{
|
||||
display: inline-block;
|
||||
@ -322,6 +341,27 @@ export default {
|
||||
.coversition-list{
|
||||
|
||||
}
|
||||
.scriptTip{
|
||||
position: absolute;
|
||||
width: 260px;
|
||||
padding: 10px;
|
||||
background: #ccc;
|
||||
right: 7px;
|
||||
bottom:45px;
|
||||
border-radius: 5px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.scriptTip::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 8px solid #cccccc;
|
||||
right: 16px;
|
||||
bottom: -7px;
|
||||
}
|
||||
|
||||
.showMembers{
|
||||
float: right;
|
||||
|
@ -8,7 +8,8 @@
|
||||
</div>
|
||||
<div class="userBubble" @click="playAudio('audio'+index)">
|
||||
<div class="userMessage">
|
||||
<span v-if="chatContent.group&&!(chatContent.member && chatContent.member.robot)">@{{ covertName(chatContent.targetName) }}</span>
|
||||
<!-- &&!(chatContent.self) -->
|
||||
<span v-if="chatContent.group">@{{ covertName(chatContent.targetName) }}</span>
|
||||
<span class="el-icon-video-play playicon" />
|
||||
<span class="messageText">{{ chatContent.message }}</span>
|
||||
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />
|
||||
@ -42,7 +43,8 @@ export default {
|
||||
if (this.currentCoversition.id == val.id) {
|
||||
this.chatContentList.push(simulationText);
|
||||
} else {
|
||||
this.$emit('addCoversition', {data:simulationText, headerTitle:''});
|
||||
this.$emit('changeCoversition', simulationText);
|
||||
// this.$emit('addCoversition', {data:simulationText, headerTitle:''});
|
||||
this.chatContentList.push(simulationText);
|
||||
}
|
||||
},
|
||||
|
@ -48,7 +48,6 @@ export default {
|
||||
addCoversition(data, headerTitle) {
|
||||
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
|
||||
if (index < 0) {
|
||||
debugger;
|
||||
const objectCover = this.handleMemberName(data);
|
||||
data.coverName = objectCover.coversitionName;
|
||||
data.isOnline = objectCover.isOnline;
|
||||
@ -64,6 +63,13 @@ export default {
|
||||
this.$emit('setCurrentCoversition', coversition);
|
||||
// this.$refs.chatContent.reloadData(this.currentCoversition);
|
||||
},
|
||||
changeCoversitionOther(coversition) {
|
||||
const objectCover = this.handleMemberName(coversition);
|
||||
coversition.coverName = objectCover.coversitionName;
|
||||
coversition.isOnline = objectCover.isOnline;
|
||||
this.coversitionList.push(coversition);
|
||||
this.changeCoversition(coversition);
|
||||
},
|
||||
handleMemberName(conversition) {
|
||||
if (conversition.group) {
|
||||
return {coversitionName:conversition.name, isOnline:true};
|
||||
|
@ -78,6 +78,11 @@ export default {
|
||||
this.memberList = lastData;
|
||||
});
|
||||
},
|
||||
getMember(memberId) {
|
||||
return this.memberList.filter(member=>{
|
||||
return member.id == memberId;
|
||||
});
|
||||
},
|
||||
doShow() {
|
||||
if (this.showMembers) {
|
||||
this.showMembers = false;
|
||||
|
@ -51,6 +51,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import {getScriptPageListOnlineNew, getScriptByIdNew, getDraftScriptByGroupNew } from '@/api/script';
|
||||
|
||||
// 剧本弹窗
|
||||
@ -152,6 +154,24 @@ export default {
|
||||
},
|
||||
async loadInitData() {
|
||||
|
||||
},
|
||||
covert(data, roleTypeList) {
|
||||
let lastData = data;
|
||||
roleTypeList.forEach(function(element) {
|
||||
const rolename = element.value;
|
||||
if (Cookies.get('user_lang') == 'en') {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
||||
} else {
|
||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
||||
}
|
||||
});
|
||||
lastData = JSON.parse(lastData);
|
||||
lastData.forEach(each=>{
|
||||
const name = each.name == undefined ? '' : '-' + each.name;
|
||||
const deviceName = each.deviceName == undefined ? '' : '-' + each.deviceName;
|
||||
each.name = each.role + deviceName + name;
|
||||
});
|
||||
return lastData;
|
||||
},
|
||||
async handleLoad(index, row) {
|
||||
this.row = row;
|
||||
@ -159,7 +179,9 @@ export default {
|
||||
let newMemberList = [];
|
||||
if (res.code == 200) {
|
||||
if (res.data.playerList && res.data.playerList.length > 0) {
|
||||
newMemberList = res.data.playerList.filter(item => item.hasPlay === true);
|
||||
const lastData = JSON.stringify(res.data.playerList);
|
||||
const playerList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||
newMemberList = playerList.filter(item => item.hasPlay === true);
|
||||
}
|
||||
if (res.data.mapLocation) {
|
||||
this.mapLocation = res.data.mapLocation;
|
||||
|
@ -39,7 +39,7 @@ import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { quitScript, quitScriptNew } from '@/api/simulation';
|
||||
import { quitScriptNew, scriptRePreview } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'MenuDemon',
|
||||
@ -227,22 +227,25 @@ export default {
|
||||
});
|
||||
},
|
||||
handleQuitQuest() {
|
||||
if (this.$route.query.drawWay) {
|
||||
if (this.$route.fullPath.includes('design/displayNew/demon') ) {
|
||||
quitScriptNew(this.group).then(resp => {
|
||||
scriptRePreview(this.group).then(resp=>{
|
||||
this.$emit('quitQuest');
|
||||
this.initLoadPage();
|
||||
}).catch(()=>{
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
} else {
|
||||
quitScriptNew(this.group).then(resp => {
|
||||
this.$emit('quitQuest');
|
||||
this.initLoadPage();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
} else {
|
||||
quitScript(this.group).then(resp => {
|
||||
this.$emit('quitQuest');
|
||||
this.initLoadPage();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
async back() {
|
||||
await clearSimulation(this.group);
|
||||
|
@ -1,161 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<jlmap-canvas @onOffset="onDataZoom" @onSelect="onSelected" @onMenu="onContextMenu" @mapViewLoaded="mapViewLoaded" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JlmapCanvas from './cnavas';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'JlmapVisual',
|
||||
components: {
|
||||
JlmapCanvas
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
dataZoom: {
|
||||
offsetX: '0',
|
||||
offsetY: '0',
|
||||
scaleRate: '1'
|
||||
},
|
||||
showMode: '03'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'offsetStationCode'
|
||||
]),
|
||||
...mapGetters('config', [
|
||||
'canvasId'
|
||||
]),
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height - 55;
|
||||
},
|
||||
show() {
|
||||
if (this.mode == TrainingMode.EDIT || this.mode == TrainingMode.MAP_EDIT) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
isScreen() {
|
||||
return this.$route.path.includes('displayBigScreen') || this.$route.path.includes('bigScreen');
|
||||
},
|
||||
maskOpen() {
|
||||
return this.$store.state.config.maskOpen;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
EventBus.$on('viewProgressAt', (percentage) => {
|
||||
this.mapViewProgressAt(percentage);
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
// this.initLoadPage();
|
||||
},
|
||||
beforeDestroy() {
|
||||
EventBus.$off('viewProgressAt');
|
||||
this.$store.dispatch('map/mapClear');
|
||||
if (this.$jlmap) {
|
||||
this.$jlmap.dispose();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onDataZoom() {
|
||||
|
||||
},
|
||||
onSelected() {
|
||||
|
||||
},
|
||||
onContextMenu() {
|
||||
|
||||
},
|
||||
mapViewLoaded() {
|
||||
|
||||
},
|
||||
// 重置jlmap宽高
|
||||
resetWidth(opt) {
|
||||
console.log(opt, '-----');
|
||||
this.$jlmap && this.$jlmap.resize({ width: opt.width, height: opt.height });
|
||||
// this.$nextTick(() => {
|
||||
// this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
|
||||
|
||||
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
|
||||
|
||||
// setTimeout(() => {
|
||||
// this.$store.dispatch('config/resetCanvasOffset');
|
||||
// this.$store.dispatch('training/emitTipFresh');
|
||||
// }, 100);
|
||||
// });
|
||||
},
|
||||
// 设置地图加载进度
|
||||
mapViewProgressAt(percentage) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.progressBar.progressAt(percentage);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.mask{
|
||||
opacity: 0;
|
||||
background: #000;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9;
|
||||
}
|
||||
.jlmap-canvas {
|
||||
position: relative;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.title{
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
line-height: 32px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.zoom-view {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
padding-top: 5px;
|
||||
height: 42px;
|
||||
border-bottom: 1px #f3f3f3 solid;
|
||||
border-right: 1px #f3f3f3 solid;
|
||||
}
|
||||
|
||||
/deep/ {
|
||||
.el-form.el-form--inline {
|
||||
height: 28px !important;
|
||||
line-height: 28px !important
|
||||
}
|
||||
|
||||
.el-loading-mask {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -47,18 +47,20 @@
|
||||
/>
|
||||
<ci-config ref="ciConfig" />
|
||||
</div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
<script>
|
||||
import { saveMap, getMapDetail, verifyMap, postBuildMapImport, getRouteNewList, getAutoReentryList } from '@/api/jmap/mapdraft';
|
||||
import { ViewMode, TrainingMode, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||
import { ViewMode, TrainingMode, getDeviceMenuByDeviceType, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import MapOperate from './mapoperate/index';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CiConfig from './ciConfig';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
|
||||
import ConfigMap from './configMap';
|
||||
|
||||
@ -71,7 +73,8 @@ export default {
|
||||
MapOperate,
|
||||
DataRelation,
|
||||
ConfigMap,
|
||||
CiConfig
|
||||
CiConfig,
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -95,13 +98,16 @@ export default {
|
||||
x: '',
|
||||
y: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
menu: [],
|
||||
menuNormal: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stepData',
|
||||
'recoverStepData'
|
||||
'recoverStepData',
|
||||
'stationList'
|
||||
]),
|
||||
maskOpen() {
|
||||
return this.$store.state.config.maskOpen;
|
||||
@ -119,6 +125,13 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.loadInitPage();
|
||||
});
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
|
||||
this.popDoShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.popDoClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -148,6 +161,52 @@ export default {
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.popDoClose();
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
popDoShow(point) {
|
||||
this.popClickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
popClickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.popDoClose();
|
||||
};
|
||||
},
|
||||
popDoClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
updateObjAxis() {
|
||||
this.getMapOrigin();
|
||||
this.$confirm('您确认按当前绘图位置更新坐标及缩放比例?', this.$t('tip.hint'), {
|
||||
|
@ -184,8 +184,8 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'Resource'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
|
@ -17,8 +17,6 @@
|
||||
<el-dropdown-item><span style="display:block;" :disabled="mapSaveing" @click="generateCIEvent">生成联锁</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<!--<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0; margin-right: 5px;" :disabled="mapSaveing" @click="generateCIEvent">生成联锁</el-button>-->
|
||||
<!--<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0; margin-right: 5px;" :disabled="mapSaveing" @click="verifyMapEvent">{{ $t('map.dataVerification') }}</el-button>-->
|
||||
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="dataRelation">{{ $t('map.advanced') }}</el-button>
|
||||
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="showMap">绘图显隐</el-button>
|
||||
</div>
|
||||
|
@ -3,31 +3,17 @@
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<config-list
|
||||
ref="dataform"
|
||||
:form="form"
|
||||
:form-model="editModel"
|
||||
:rules="rules"
|
||||
/>
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="deleteObj"
|
||||
>{{ $t('map.deleteObj') }}</el-button>
|
||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
class="view-control"
|
||||
:label="$t('map.newConstruction')"
|
||||
name="second"
|
||||
:lazy="lazy"
|
||||
>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<create-section
|
||||
ref="create"
|
||||
:field="field"
|
||||
@ -193,511 +179,84 @@ export default {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{
|
||||
prop: 'code',
|
||||
label: this.$t('map.blockCoding'),
|
||||
type: 'select',
|
||||
mode: false,
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
options: this.sectionList,
|
||||
change: true,
|
||||
deviceChange: this.deviceChange
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: this.$t('map.sectionNameColon'),
|
||||
type: 'input'
|
||||
},
|
||||
{
|
||||
prop: 'namePosition',
|
||||
label: this.$t('map.sectionNameOffset'),
|
||||
type: 'coordinate',
|
||||
width: '150px',
|
||||
children: [
|
||||
{
|
||||
prop: 'namePosition.x',
|
||||
firstLevel: 'namePosition',
|
||||
secondLevel: 'x',
|
||||
label: 'x:',
|
||||
type: 'number',
|
||||
labelWidth: '25px'
|
||||
},
|
||||
{
|
||||
prop: 'namePosition.y',
|
||||
firstLevel: 'namePosition',
|
||||
secondLevel: 'y',
|
||||
label: 'y:',
|
||||
type: 'number',
|
||||
labelWidth: '25px'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: this.$t('map.sectionType'),
|
||||
type: 'select',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'code',
|
||||
options: this.SectionTypeList
|
||||
}, // 区段类型
|
||||
{
|
||||
prop: 'roadType',
|
||||
label: '线路类型:',
|
||||
type: 'select',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'code',
|
||||
options: this.sectionRoadTypeList,
|
||||
clearable: true,
|
||||
isHidden: !this.isSwitchSectionType,
|
||||
change: true,
|
||||
deviceChange: this.roadTypeChange
|
||||
},
|
||||
{
|
||||
prop: 'leftSectionCode',
|
||||
label: this.$t('map.leftAssociatedSection'),
|
||||
type: 'selectHover',
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
clearable: true,
|
||||
options: this.switchAndPhySicalSectionList,
|
||||
hover: this.hover,
|
||||
buttonType: 'leftSection',
|
||||
buttonShowType: this.isLeftSectionButtonShow,
|
||||
isHidden: !this.hasAssociatedSection
|
||||
}, // 左关联区段
|
||||
{
|
||||
prop: 'rightSectionCode',
|
||||
label: this.$t('map.rightAssociatedSection'),
|
||||
type: 'selectHover',
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
clearable: true,
|
||||
options: this.switchAndPhySicalSectionList,
|
||||
hover: this.hover,
|
||||
buttonType: 'rightSection',
|
||||
buttonShowType: this.isRightSectionButtonShow,
|
||||
isHidden: !this.hasAssociatedSection
|
||||
}, // 右关联区段
|
||||
{
|
||||
prop: 'parentCode',
|
||||
label: this.$t('map.associatedSection'),
|
||||
type: 'select',
|
||||
mode: true,
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
disabled: true,
|
||||
options: this.sectionList,
|
||||
isHidden: !this.isParentCode
|
||||
}, // 所属物理/道岔区段code
|
||||
{
|
||||
prop: 'sepTypeLeft',
|
||||
label: this.$t('map.sepTypeLeft'),
|
||||
type: 'select',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'code',
|
||||
options: this.SectionSepTypeList,
|
||||
isHidden: !this.isSwitchSectionType
|
||||
},
|
||||
{
|
||||
prop: 'sepTypeRight',
|
||||
label: this.$t('map.sepTypeRight'),
|
||||
type: 'select',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'code',
|
||||
options: this.SectionSepTypeList,
|
||||
isHidden: !this.isSwitchSectionType
|
||||
},
|
||||
{
|
||||
prop: 'points',
|
||||
label: this.$t('map.segmentCoordinates'),
|
||||
type: 'points',
|
||||
width: '100px',
|
||||
isHidden: !this.isPointsShow,
|
||||
addPoint: this.addPoint,
|
||||
delPoint: this.delPoint,
|
||||
lastDisabled: true
|
||||
},
|
||||
{
|
||||
prop: 'logicSectionStartOffset',
|
||||
label: this.$t('map.logicalSectionStartOffset'),
|
||||
type: 'number',
|
||||
min: 0,
|
||||
width: '150px',
|
||||
isHidden: !this.isStationCodeDisabled,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: 'logicSectionEndOffset',
|
||||
label: this.$t('map.logicalSectionEndOffset'),
|
||||
type: 'number',
|
||||
min: 0,
|
||||
width: '150px',
|
||||
isHidden: !this.isStationCodeDisabled,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: 'standTrack',
|
||||
label: this.$t('map.isStandTrack'),
|
||||
type: 'checkbox',
|
||||
isHidden: !this.isLogicSectionNameSort
|
||||
}, // 是否站台轨
|
||||
{ prop: 'code', label: this.$t('map.blockCoding'), type: 'select', mode: false, optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
|
||||
{ prop: 'namePosition', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
|
||||
{ prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList }, // 区段类型
|
||||
{ prop: 'roadType', label: '线路类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.sectionRoadTypeList, clearable: true, isHidden: !this.isSwitchSectionType, change: true, deviceChange: this.roadTypeChange },
|
||||
{ prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection }, // 左关联区段
|
||||
{ prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.switchAndPhySicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection }, // 右关联区段
|
||||
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode }, // 所属物理/道岔区段code
|
||||
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
||||
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
|
||||
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
|
||||
{ prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true },
|
||||
{ prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isStationCodeDisabled, disabled: true },
|
||||
{ prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isLogicSectionNameSort }, // 是否站台轨
|
||||
|
||||
{
|
||||
prop: 'standTrackName',
|
||||
label: this.$t('map.standTrackName'),
|
||||
type: 'input',
|
||||
isHidden: !this.isstandTrackNameShow
|
||||
},
|
||||
{
|
||||
prop: 'standTrackNamePosition',
|
||||
label: this.$t('map.standTrackNamePosition'),
|
||||
type: 'coordinate',
|
||||
width: '150px',
|
||||
isHidden: !this.isstandTrackNameShow,
|
||||
children: [
|
||||
{
|
||||
prop: 'standTrackNamePosition.x',
|
||||
firstLevel: 'standTrackNamePosition',
|
||||
secondLevel: 'x',
|
||||
label: 'x:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
},
|
||||
{
|
||||
prop: 'standTrackNamePosition.y',
|
||||
firstLevel: 'standTrackNamePosition',
|
||||
secondLevel: 'y',
|
||||
label: 'y:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 'reentryTrack',
|
||||
label: this.$t('map.isReentryTrack'),
|
||||
type: 'checkbox',
|
||||
isHidden: !this.isReentryTrackShow
|
||||
}, // 是否折返轨
|
||||
{
|
||||
prop: 'firstTurnBack',
|
||||
label: '是否优先折返:',
|
||||
type: 'checkbox',
|
||||
isHidden: !this.isreentryTrackName
|
||||
},
|
||||
{
|
||||
prop: 'reentryTrackName',
|
||||
label: this.$t('map.reentryTrackName'),
|
||||
type: 'input',
|
||||
isHidden: !this.isreentryTrackName
|
||||
}, // 折返轨名称
|
||||
{
|
||||
prop: 'reentryTrackNamePosition',
|
||||
label: this.$t('map.reentryTrackNamePosition'),
|
||||
type: 'coordinate',
|
||||
width: '150px',
|
||||
isHidden: !this.isreentryTrackName,
|
||||
children: [
|
||||
{
|
||||
prop: 'reentryTrackNamePosition.x',
|
||||
firstLevel: 'reentryTrackNamePosition',
|
||||
secondLevel: 'x',
|
||||
label: 'x:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
},
|
||||
{
|
||||
prop: 'reentryTrackNamePosition.y',
|
||||
firstLevel: 'reentryTrackNamePosition',
|
||||
secondLevel: 'y',
|
||||
label: 'y:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
}
|
||||
]
|
||||
}, // 折返轨名称坐标
|
||||
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
|
||||
{ prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
|
||||
{ prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop: 'reentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isReentryTrackShow }, // 是否折返轨
|
||||
{ prop: 'firstTurnBack', label: '是否优先折返:', type: 'checkbox', isHidden: !this.isreentryTrackName },
|
||||
{ prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName }, // 折返轨名称
|
||||
{ prop: 'reentryTrackNamePosition', label: this.$t('map.reentryTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
|
||||
{ prop: 'reentryTrackNamePosition.x', firstLevel: 'reentryTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] }, // 折返轨名称坐标
|
||||
|
||||
{
|
||||
prop: 'transferTrack',
|
||||
label: this.$t('map.isTransferTrack'),
|
||||
type: 'checkbox',
|
||||
isHidden: !this.isTransferTrackShow
|
||||
}, // 是否转换轨
|
||||
{ prop: 'transferTrack', label: this.$t('map.isTransferTrack'), type: 'checkbox', isHidden: !this.isTransferTrackShow }, // 是否转换轨
|
||||
|
||||
{
|
||||
prop: 'transferTrackName',
|
||||
label: this.$t('map.transferTrackName'),
|
||||
type: 'input',
|
||||
isHidden: !this.istransferTrackName
|
||||
}, // 转换轨名称
|
||||
{
|
||||
prop: 'transferTrackNamePosition',
|
||||
label: this.$t('map.transferTrackNamePosition'),
|
||||
type: 'coordinate',
|
||||
width: '150px',
|
||||
isHidden: !this.istransferTrackName,
|
||||
children: [
|
||||
{
|
||||
prop: 'transferTrackNamePosition.x',
|
||||
firstLevel: 'transferTrackNamePosition',
|
||||
secondLevel: 'x',
|
||||
label: 'x:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
},
|
||||
{
|
||||
prop: 'transferTrackNamePosition.y',
|
||||
firstLevel: 'transferTrackNamePosition',
|
||||
secondLevel: 'y',
|
||||
label: 'y:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
}
|
||||
]
|
||||
}, // 转换轨名称坐标
|
||||
{
|
||||
prop: 'destinationCode',
|
||||
label: this.$t('map.destinationCode'),
|
||||
type: 'input',
|
||||
isHidden: !this.isdestinationCode
|
||||
}, // 目的地码
|
||||
{
|
||||
prop: 'destinationCodePoint',
|
||||
label: this.$t('map.destinationCodePoint'),
|
||||
type: 'coordinate',
|
||||
width: '150px',
|
||||
isHidden: !this.isdestinationCode,
|
||||
children: [
|
||||
{
|
||||
prop: 'destinationCodePoint.x',
|
||||
firstLevel: 'destinationCodePoint',
|
||||
secondLevel: 'x',
|
||||
label: 'x:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
},
|
||||
{
|
||||
prop: 'destinationCodePoint.y',
|
||||
firstLevel: 'destinationCodePoint',
|
||||
secondLevel: 'y',
|
||||
label: 'y:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
}
|
||||
]
|
||||
}, // 目的地码坐标
|
||||
{ prop: 'transferTrackName', label: this.$t('map.transferTrackName'), type: 'input', isHidden: !this.istransferTrackName }, // 转换轨名称
|
||||
{ prop: 'transferTrackNamePosition', label: this.$t('map.transferTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
|
||||
{ prop: 'transferTrackNamePosition.x', firstLevel: 'transferTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'transferTrackNamePosition.y', firstLevel: 'transferTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] }, // 转换轨名称坐标
|
||||
{ prop: 'destinationCode', label: this.$t('map.destinationCode'), type: 'input', isHidden: !this.isdestinationCode }, // 目的地码
|
||||
{ prop: 'destinationCodePoint', label: this.$t('map.destinationCodePoint'), type: 'coordinate', width: '150px', isHidden: !this.isdestinationCode, children: [
|
||||
{ prop: 'destinationCodePoint.x', firstLevel: 'destinationCodePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] }, // 目的地码坐标
|
||||
|
||||
{
|
||||
prop: 'switchSection',
|
||||
label: this.$t('map.isSwitchSection'),
|
||||
type: 'checkbox',
|
||||
disabled: true
|
||||
}, // 是否关联道岔
|
||||
{
|
||||
prop: 'relSwitchCode',
|
||||
label: this.$t('map.relSwitchCode'),
|
||||
type: 'select',
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
options: this.switchList,
|
||||
isHidden: !this.isRelevanceSwitchShow,
|
||||
disabled: true
|
||||
}, // 关联道岔
|
||||
{ prop: 'switchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', disabled: true }, // 是否关联道岔
|
||||
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: !this.isRelevanceSwitchShow, disabled: true }, // 关联道岔
|
||||
|
||||
{
|
||||
prop: 'logicSectionShow',
|
||||
label: this.$t('map.displayLogicalExtents'),
|
||||
type: 'checkbox',
|
||||
isHidden: !this.isSwitchSectionType
|
||||
}, // 1
|
||||
{
|
||||
prop: 'logicSectionNameSort',
|
||||
label: this.$t('map.logicSectionNameSort'),
|
||||
type: 'radio',
|
||||
optionLabel: 'label',
|
||||
optionValue: 'value',
|
||||
isHidden: !this.isLogicSectionNameSort,
|
||||
radioList: [
|
||||
{
|
||||
value: true,
|
||||
label: this.$t('map.fromSmallToLarge')
|
||||
},
|
||||
{
|
||||
value: false,
|
||||
label: this.$t('map.fromLargeToSmall')
|
||||
}
|
||||
]
|
||||
}, // 1
|
||||
{
|
||||
prop: 'curve',
|
||||
label: this.$t('map.isCurve'),
|
||||
type: 'checkbox',
|
||||
isHidden: !this.isSwitchSectionType
|
||||
},
|
||||
{
|
||||
prop: 'relevanceSectionList',
|
||||
label: this.$t('map.associateSwitchSection'),
|
||||
type: 'multiSelect',
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
options: this.switchSectionList,
|
||||
isHidden: this.isSwitchSectionType,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
prop: 'leftAxlePosition',
|
||||
label: '左侧计轴:',
|
||||
type: 'select',
|
||||
optionLabel: 'label',
|
||||
optionValue: 'value',
|
||||
options: this.axlePositionList,
|
||||
isHidden: !this.hasAssociatedSection
|
||||
},
|
||||
{
|
||||
prop: 'leftAxleOffset',
|
||||
label: '左侧计轴偏移:',
|
||||
type: 'coordinate',
|
||||
width: '150px',
|
||||
isHidden: !this.hasAssociatedSection,
|
||||
children: [
|
||||
{
|
||||
prop: 'leftAxleOffset.x',
|
||||
firstLevel: 'leftAxleOffset',
|
||||
secondLevel: 'x',
|
||||
label: 'x:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
},
|
||||
{
|
||||
prop: 'leftAxleOffset.y',
|
||||
firstLevel: 'leftAxleOffset',
|
||||
secondLevel: 'y',
|
||||
label: 'y:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
prop: 'rightAxlePosition',
|
||||
label: '右侧计轴:',
|
||||
type: 'select',
|
||||
optionLabel: 'label',
|
||||
optionValue: 'value',
|
||||
options: this.axlePositionList,
|
||||
isHidden: !this.hasAssociatedSection
|
||||
},
|
||||
{
|
||||
prop: 'rightAxleOffset',
|
||||
label: '右侧计轴偏移:',
|
||||
type: 'coordinate',
|
||||
width: '150px',
|
||||
isHidden: !this.hasAssociatedSection,
|
||||
children: [
|
||||
{
|
||||
prop: 'rightAxleOffset.x',
|
||||
firstLevel: 'rightAxleOffset',
|
||||
secondLevel: 'x',
|
||||
label: 'x:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
},
|
||||
{
|
||||
prop: 'rightAxleOffset.y',
|
||||
firstLevel: 'rightAxleOffset',
|
||||
secondLevel: 'y',
|
||||
label: 'y:',
|
||||
type: 'number',
|
||||
labelWidth: '20px'
|
||||
}
|
||||
]
|
||||
}
|
||||
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionType }, // 1
|
||||
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', optionLabel: 'label', optionValue: 'value', isHidden: !this.isLogicSectionNameSort, radioList: [
|
||||
{ value: true, label: this.$t('map.fromSmallToLarge') },
|
||||
{ value: false, label: this.$t('map.fromLargeToSmall') }
|
||||
] }, // 1
|
||||
{ prop: 'curve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
|
||||
{ prop: 'relevanceSectionList', label: this.$t('map.associateSwitchSection'), type: 'multiSelect', optionLabel: 'name&&code', optionValue: 'code', options: this.switchSectionList, isHidden: this.isSwitchSectionType, disabled: true },
|
||||
{ prop: 'leftAxlePosition', label: '左侧计轴:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.axlePositionList, isHidden: !this.hasAssociatedSection },
|
||||
{ prop: 'leftAxleOffset', label: '左侧计轴偏移:', type: 'coordinate', width: '150px', isHidden: !this.hasAssociatedSection, children: [
|
||||
{ prop: 'leftAxleOffset.x', firstLevel: 'leftAxleOffset', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'leftAxleOffset.y', firstLevel: 'leftAxleOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop: 'rightAxlePosition', label: '右侧计轴:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.axlePositionList, isHidden: !this.hasAssociatedSection },
|
||||
{ prop: 'rightAxleOffset', label: '右侧计轴偏移:', type: 'coordinate', width: '150px', isHidden: !this.hasAssociatedSection, children: [
|
||||
{ prop: 'rightAxleOffset.x', firstLevel: 'rightAxleOffset', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'rightAxleOffset.y', firstLevel: 'rightAxleOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{
|
||||
prop: 'stationCode',
|
||||
label: this.$t('map.equipmentStation') + ':',
|
||||
type: 'select',
|
||||
mode: true,
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
disabled: this.isStationCodeDisabled,
|
||||
options: this.centralizedStationList,
|
||||
isHidden: this.isStationCodeDisabled
|
||||
},
|
||||
{
|
||||
prop: 'belongStation',
|
||||
label: '所属车站:',
|
||||
type: 'select',
|
||||
mode: true,
|
||||
optionLabel: 'name&&code',
|
||||
optionValue: 'code',
|
||||
options: this.stationList,
|
||||
isHidden:
|
||||
!this.editModel.standTrack &&
|
||||
!this.editModel.reentryTrack &&
|
||||
!this.editModel.transferTrack
|
||||
},
|
||||
{
|
||||
prop: 'lengthFact',
|
||||
label: this.$t('map.actualLength') + ':',
|
||||
type: 'number',
|
||||
min: 0,
|
||||
placeholder: this.$t('map.meter'),
|
||||
isHidden: !this.isSwitchSectionType
|
||||
},
|
||||
{
|
||||
prop: 'leftStopPointOffset',
|
||||
label: this.$t('map.leftStopPointOffset'),
|
||||
type: 'number',
|
||||
min: 0,
|
||||
max: this.maxLengthFact,
|
||||
// disabled: true,
|
||||
isHidden: !this.isStopPointOffset
|
||||
}, // 左向停车点偏移量
|
||||
{
|
||||
prop: 'rightStopPointOffset',
|
||||
label: this.$t('map.rightStopPointOffset'),
|
||||
type: 'number',
|
||||
min: 0,
|
||||
max: this.maxLengthFact,
|
||||
// disabled: true,
|
||||
isHidden: !this.isStopPointOffset
|
||||
}, // 右向停车点偏移量
|
||||
{
|
||||
prop: 'region',
|
||||
label: this.$t('map.sectionColon'),
|
||||
type: 'select',
|
||||
optionLabel: 'label',
|
||||
optionValue: 'value',
|
||||
options: this.regionList,
|
||||
isHidden: !this.sectionColonShow
|
||||
},
|
||||
{
|
||||
prop: 'trainWindowCode',
|
||||
label: '关联车次窗',
|
||||
type: 'input',
|
||||
disabled: true,
|
||||
isHidden: !this.isSwitchSectionShow
|
||||
},
|
||||
{
|
||||
prop: 'kmRangeLeft',
|
||||
label: this.$t('map.leftKilometerMark'),
|
||||
type: 'number',
|
||||
min: 0,
|
||||
placeholder: this.$t('map.meter')
|
||||
},
|
||||
{
|
||||
prop: 'kmRangeRight',
|
||||
label: this.$t('map.rightKilometerMark'),
|
||||
type: 'number',
|
||||
min: 0,
|
||||
placeholder: this.$t('map.meter')
|
||||
}
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled },
|
||||
{ prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, isHidden: !this.editModel.standTrack && !this.editModel.reentryTrack && !this.editModel.transferTrack },
|
||||
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: !this.isSwitchSectionType },
|
||||
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 左向停车点偏移量
|
||||
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 右向停车点偏移量
|
||||
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
|
||||
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow },
|
||||
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
|
||||
{ prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -854,11 +413,7 @@ export default {
|
||||
return this.editModel.type == '01' && this.editModel.standTrack;
|
||||
},
|
||||
isreentryTrackName() {
|
||||
return (
|
||||
this.editModel.type != '02' &&
|
||||
this.editModel.type != '03' &&
|
||||
this.editModel.reentryTrack
|
||||
);
|
||||
return this.editModel.type != '02' && this.editModel.type != '03' && this.editModel.reentryTrack;
|
||||
},
|
||||
istransferTrackName() {
|
||||
return this.editModel.type == '01' && this.editModel.transferTrack;
|
||||
@ -867,26 +422,13 @@ export default {
|
||||
return this.editModel.type == '01' && !this.editModel.reentryTrack;
|
||||
},
|
||||
isReentryTrackShow() {
|
||||
return (
|
||||
this.editModel.type != '02' &&
|
||||
this.editModel.type != '03' &&
|
||||
!this.editModel.transferTrack
|
||||
);
|
||||
return this.editModel.type != '02' && this.editModel.type != '03' && !this.editModel.transferTrack;
|
||||
},
|
||||
isdestinationCode() {
|
||||
return (
|
||||
this.editModel.type != '02' &&
|
||||
this.editModel.type != '03' &&
|
||||
(this.editModel.reentryTrack || this.editModel.transferTrack)
|
||||
);
|
||||
return this.editModel.type != '02' && this.editModel.type != '03' && (this.editModel.reentryTrack || this.editModel.transferTrack);
|
||||
},
|
||||
isStopPointOffset() {
|
||||
return (
|
||||
this.editModel.type !== '04' &&
|
||||
(this.editModel.reentryTrack ||
|
||||
this.editModel.standTrack ||
|
||||
this.editModel.transferTrack)
|
||||
);
|
||||
return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack);
|
||||
},
|
||||
|
||||
isLeftSectionButtonShow() {
|
||||
@ -910,15 +452,10 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.menuOperation.mapDrawSelectCount': function(val) {
|
||||
// this.deviceSelect(this.selected);
|
||||
// },
|
||||
activeName(val) {
|
||||
if (val === 'four') {
|
||||
if (val == 'four') {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.logicBlock.computedLogicSectionNumList(
|
||||
this.editModel.logicSectionCodeList
|
||||
);
|
||||
this.$refs.logicBlock.computedLogicSectionNumList(this.editModel.logicSectionCodeList);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -944,10 +481,7 @@ export default {
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
// 判断是否激活选择站台
|
||||
if (
|
||||
selected &&
|
||||
selected._type.toUpperCase() === 'Section'.toUpperCase()
|
||||
) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (this.field === 'leftSection') {
|
||||
if (selected.type === '01' || selected.type === '03') {
|
||||
this.editModel.leftSectionCode = selected.code;
|
||||
@ -968,76 +502,46 @@ export default {
|
||||
this.clear();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.points = JSON.parse(
|
||||
JSON.stringify(selected.points)
|
||||
);
|
||||
this.editModel.points = JSON.parse(JSON.stringify(selected.points));
|
||||
this.editModel.lengthFact = selected.lengthFact || 0; // 过滤非正常数值
|
||||
this.oldPoint = JSON.parse(JSON.stringify(selected.points));
|
||||
this.oldLeftSectionCode = selected.leftSectionCode;
|
||||
this.oldRightSectionCode = selected.rightSectionCode;
|
||||
this.editModel.leftAxlePosition =
|
||||
selected.leftAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.rightAxlePosition =
|
||||
selected.rightAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.leftAxlePosition = selected.leftAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.rightAxlePosition = selected.rightAxlePosition || 0; // 重置计轴显示
|
||||
this.editModel.belongStation = selected.belongStation || '';
|
||||
if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) {
|
||||
this.$refs.splitOrMerge.addModel.splitOffsetMax = Math.sqrt(
|
||||
new JTriangle(
|
||||
selected.points[0],
|
||||
selected.points[selected.points.length - 1]
|
||||
).abspowz
|
||||
);
|
||||
this.$refs.splitOrMerge.addModel.splitOffset =
|
||||
this.$refs.splitOrMerge.addModel.splitOffsetMax / 2;
|
||||
this.$refs.splitOrMerge.addModel.splitOffsetMax = Math.sqrt(new JTriangle(selected.points[0], selected.points[selected.points.length - 1]).abspowz);
|
||||
this.$refs.splitOrMerge.addModel.splitOffset = this.$refs.splitOrMerge.addModel.splitOffsetMax / 2;
|
||||
this.$refs.splitOrMerge.addModel.code = selected.code;
|
||||
this.activeName = 'three';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
} else if (
|
||||
this.field.toUpperCase() === 'leftSectionCode'.toUpperCase()
|
||||
) {
|
||||
this.$refs.splitOrMerge.mergeModel.lsectioncode =
|
||||
selected.code;
|
||||
} else if (this.field.toUpperCase() === 'leftSectionCode'.toUpperCase()) {
|
||||
this.$refs.splitOrMerge.mergeModel.lsectioncode = selected.code;
|
||||
this.activeName = 'three';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
} else if (
|
||||
this.field.toUpperCase() ===
|
||||
'rightSectionCode'.toUpperCase()
|
||||
) {
|
||||
this.$refs.splitOrMerge.mergeModel.rsectioncode =
|
||||
selected.code;
|
||||
} else if (this.field.toUpperCase() === 'rightSectionCode'.toUpperCase()) {
|
||||
this.$refs.splitOrMerge.mergeModel.rsectioncode = selected.code;
|
||||
this.activeName = 'three';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
} else if (
|
||||
this.field.toUpperCase() === 'getSectionStart'.toUpperCase()
|
||||
) {
|
||||
this.$refs.create.createModel.leftSectionCode =
|
||||
selected.code;
|
||||
} else if (this.field.toUpperCase() === 'getSectionStart'.toUpperCase()) {
|
||||
this.$refs.create.createModel.leftSectionCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
} else if (
|
||||
this.field.toUpperCase() === 'getSectionEnd'.toUpperCase()
|
||||
) {
|
||||
this.$refs.create.createModel.rightSectionCode =
|
||||
selected.code;
|
||||
} else if (this.field.toUpperCase() === 'getSectionEnd'.toUpperCase()) {
|
||||
this.$refs.create.createModel.rightSectionCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('fieldSelect', '');
|
||||
} else if (
|
||||
this.field.toUpperCase() === 'sectionTypeCode'.toUpperCase()
|
||||
) {
|
||||
this.$refs.batchSettings.formModel.modelList.push(
|
||||
selected.code
|
||||
);
|
||||
} else if (this.field.toUpperCase() === 'sectionTypeCode'.toUpperCase()) {
|
||||
this.$refs.batchSettings.formModel.modelList.push(selected.code);
|
||||
this.activeName = 'five';
|
||||
} else if (
|
||||
this.field.toUpperCase() === 'sectionRoadCode'.toUpperCase()
|
||||
) {
|
||||
this.$refs.batchSettings.roadModel.sectionCode =
|
||||
selected.code;
|
||||
} else if (this.field.toUpperCase() === 'sectionRoadCode'.toUpperCase()) {
|
||||
this.$refs.batchSettings.roadModel.sectionCode = selected.code;
|
||||
this.activeName = 'five';
|
||||
}
|
||||
}
|
||||
@ -1103,9 +607,7 @@ export default {
|
||||
if (copySection.code === model.leftSectionCode) {
|
||||
copySection.rightSectionCode = model.code;
|
||||
updataFlag = true;
|
||||
} else if (
|
||||
copySection.code === this.oldLeftSectionCode
|
||||
) {
|
||||
} else if (copySection.code === this.oldLeftSectionCode) {
|
||||
copySection.rightSectionCode = '';
|
||||
updataFlag = true;
|
||||
}
|
||||
@ -1114,9 +616,7 @@ export default {
|
||||
if (copySection.code === model.rightSectionCode) {
|
||||
copySection.leftSectionCode = model.code;
|
||||
updataFlag = true;
|
||||
} else if (
|
||||
copySection.code === this.oldRightSectionCode
|
||||
) {
|
||||
} else if (copySection.code === this.oldRightSectionCode) {
|
||||
copySection.leftSectionCode = '';
|
||||
updataFlag = true;
|
||||
}
|
||||
@ -1137,20 +637,10 @@ export default {
|
||||
}
|
||||
updataFlag = true;
|
||||
}
|
||||
if (
|
||||
this.checkPointsCoincide(
|
||||
this.oldPoint[0],
|
||||
section.points[section.points.length - 1]
|
||||
)
|
||||
) {
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], section.points[section.points.length - 1])) {
|
||||
pointModel.push(copySection);
|
||||
}
|
||||
if (
|
||||
this.checkPointsCoincide(
|
||||
this.oldPoint[this.oldPoint.length - 1],
|
||||
section.points[0]
|
||||
)
|
||||
) {
|
||||
if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], section.points[0])) {
|
||||
pointModel.push(copySection);
|
||||
}
|
||||
if (updataFlag) {
|
||||
@ -1159,39 +649,17 @@ export default {
|
||||
}
|
||||
});
|
||||
pointModel.forEach(item => {
|
||||
const slope2 =
|
||||
(item.points[item.points.length - 1].y - item.points[0].y) /
|
||||
(item.points[item.points.length - 1].x - item.points[0].x);
|
||||
if (
|
||||
this.checkPointsCoincide(
|
||||
this.oldPoint[0],
|
||||
item.points[item.points.length - 1]
|
||||
)
|
||||
) {
|
||||
if (
|
||||
(slope1 >= 0 && slope2 >= 0) ||
|
||||
(slope1 <= 0 && slope2 <= 0)
|
||||
) {
|
||||
item.points[item.points.length - 1].x =
|
||||
model.points[0].x;
|
||||
item.points[item.points.length - 1].y =
|
||||
model.points[0].y;
|
||||
const slope2 = (item.points[item.points.length - 1].y - item.points[0].y) / (item.points[item.points.length - 1].x - item.points[0].x);
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], item.points[item.points.length - 1])) {
|
||||
if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) {
|
||||
item.points[item.points.length - 1].x = model.points[0].x;
|
||||
item.points[item.points.length - 1].y = model.points[0].y;
|
||||
}
|
||||
}
|
||||
if (
|
||||
this.checkPointsCoincide(
|
||||
this.oldPoint[this.oldPoint.length - 1],
|
||||
item.points[0]
|
||||
)
|
||||
) {
|
||||
if (
|
||||
(slope1 >= 0 && slope2 >= 0) ||
|
||||
(slope1 <= 0 && slope2 <= 0)
|
||||
) {
|
||||
item.points[0].x =
|
||||
model.points[model.points.length - 1].x;
|
||||
item.points[0].y =
|
||||
model.points[model.points.length - 1].y;
|
||||
if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], item.points[0])) {
|
||||
if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) {
|
||||
item.points[0].x = model.points[model.points.length - 1].x;
|
||||
item.points[0].y = model.points[model.points.length - 1].y;
|
||||
}
|
||||
}
|
||||
models.push(item);
|
||||
@ -1202,10 +670,7 @@ export default {
|
||||
getSectionByCode(code) {
|
||||
// 根据sectionCode 获取深拷贝的section对象
|
||||
if (code) {
|
||||
const section = deepAssign(
|
||||
{},
|
||||
this.$store.getters['map/getDeviceByCode'](code) || {}
|
||||
);
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](code) || {});
|
||||
if (JSON.stringify(section) !== '{}') {
|
||||
return section;
|
||||
}
|
||||
@ -1219,48 +684,30 @@ export default {
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
let models = [];
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](
|
||||
this.editModel.code
|
||||
);
|
||||
if (
|
||||
selected &&
|
||||
selected._type.toUpperCase() === 'Section'.toUpperCase()
|
||||
) {
|
||||
const _that = this;
|
||||
this.$confirm(
|
||||
this.$t('tip.confirmDeletion'),
|
||||
this.$t('tip.hint'),
|
||||
{
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
models.push(deepAssign(selected, { _dispose: true }));
|
||||
const deleteObjAssociatedSection = this.handleDeleteSectionAssociatedSection(
|
||||
selected
|
||||
);
|
||||
models = [...models, ...deleteObjAssociatedSection];
|
||||
_that.$emit('updateMapModel', models);
|
||||
this.clear();
|
||||
_that.deviceSelect();
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
models.push(deepAssign(selected, { _dispose: true }));
|
||||
const deleteObjAssociatedSection = this.handleDeleteSectionAssociatedSection(selected);
|
||||
models = [...models, ...deleteObjAssociatedSection];
|
||||
this.$emit('updateMapModel', models);
|
||||
this.clear();
|
||||
this.deviceSelect();
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
// 处理删除对象的左右关联区段
|
||||
handleDeleteSectionAssociatedSection(selected) {
|
||||
const models = [];
|
||||
const delLeftSection = this.getSectionByCode(
|
||||
selected.leftSectionCode
|
||||
);
|
||||
const delRightSection = this.getSectionByCode(
|
||||
selected.rightSectionCode
|
||||
);
|
||||
const delLeftSection = this.getSectionByCode(selected.leftSectionCode);
|
||||
const delRightSection = this.getSectionByCode(selected.rightSectionCode);
|
||||
if (delLeftSection) {
|
||||
delLeftSection.rightSectionCode = '';
|
||||
models.push(delLeftSection);
|
||||
@ -1280,23 +727,7 @@ export default {
|
||||
},
|
||||
checkSectionPointsHasCoincide(points1, points2) {
|
||||
// 校验两区段的左右点是否有重合
|
||||
return (
|
||||
points1.length &&
|
||||
points2.length &&
|
||||
(this.checkPointsCoincide(points1[0], points2[0]) ||
|
||||
this.checkPointsCoincide(
|
||||
points1[0],
|
||||
points2[points2.length - 1]
|
||||
) ||
|
||||
this.checkPointsCoincide(
|
||||
points1[points1.length - 1],
|
||||
points2[points2.length - 1]
|
||||
) ||
|
||||
this.checkPointsCoincide(
|
||||
points1[points1.length - 1],
|
||||
points2[0]
|
||||
))
|
||||
);
|
||||
return (points1.length && points2.length && (this.checkPointsCoincide(points1[0], points2[0]) || this.checkPointsCoincide(points1[0], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[0])));
|
||||
},
|
||||
tipInfoHandle(list) {
|
||||
if (list.length) {
|
||||
@ -1322,7 +753,6 @@ export default {
|
||||
@import "src/styles/mixin.scss";
|
||||
.coordinate {
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
|
@ -2,24 +2,6 @@
|
||||
<div style="height:100%">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<!--<el-table :data="tableData" style="width: 80%; margin: 0 auto;">-->
|
||||
<!--<el-table-column :label="$t('map.sectionPolyline')" width="150">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<span style="margin-left: 10px">{{ $t('map.aux') }}{{ scope.row.index }}{{ $t('map.sectionLine') }}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column :label="$t('map.sectionLogicalNumber')" width="130">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-input v-model="scope.row.num" size="mini" />-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column :label="$t('map.operation')">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">{{ $t('map.empty') }}-->
|
||||
<!--</el-button>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--</el-table>-->
|
||||
<el-form ref="showDelimiter" label-width="180px" size="mini">
|
||||
<el-form-item label="逻辑区段数量">
|
||||
<el-input-number v-model="logicNum" :min="0" />
|
||||
@ -48,12 +30,6 @@ import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'LogicBlock',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
editModel:{
|
||||
type:Object,
|
||||
default() {
|
||||
|
@ -351,7 +351,7 @@ export default {
|
||||
relSwitchCode: '',
|
||||
relevanceSectionList: elem.relevanceSectionList,
|
||||
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
|
||||
logicSectionNum: [0],
|
||||
logicSectionNum: 0,
|
||||
logicSectionShow: false,
|
||||
sepTypeLeft: '00',
|
||||
offsetLeft: 0,
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="joylink-card">
|
||||
<div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:40px;display: inline-block;">
|
||||
<div class="runPlanList">{{ $t('planMonitor.openRunPlan.runPlanList') }}</div>
|
||||
<div class="runPlanList">草稿{{ $t('planMonitor.openRunPlan.runPlanList') }}</div>
|
||||
<el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
|
||||
</div>
|
||||
<!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />-->
|
||||
|
68
src/views/refereeList/index.vue
Normal file
68
src/views/refereeList/index.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="content_box">
|
||||
<div class="refresh_box"><el-button size="small">刷新列表</el-button></div>
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column prop="date" label="日期" />
|
||||
<el-table-column prop="name" label="姓名" />
|
||||
<el-table-column prop="address" label="地址" />
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" @click="handleClick(scope.row)">查看</el-button>
|
||||
<el-button size="small">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getPublishMapDetailList } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'RefereeList',
|
||||
data() {
|
||||
return {
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1517 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1519 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
|
||||
},
|
||||
handleClick(row) {
|
||||
console.log(row);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.content_box{
|
||||
position: relative;
|
||||
.refresh_box{
|
||||
float: right;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="joylink-card">
|
||||
<div class="scriptHeader">
|
||||
<div class="scriptList">{{ $t('scriptRecord.scriptList') }}</div>
|
||||
<div class="scriptList">草稿{{ $t('scriptRecord.scriptList') }}</div>
|
||||
<el-button size="small" type="primary" class="createScript" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
|
@ -8,12 +8,20 @@
|
||||
<el-card v-loading="loading">
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column prop="name" :label="this.$t('teach.courseName')" />
|
||||
<el-table-column prop="classNames" label="所属班级">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-for="(item, index) in scope.row.classNames" :key="index" type="success">{{ item }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remarks" show-overflow-tooltip :label="this.$t('teach.courseDescription')" />
|
||||
<el-table-column :label="this.$t('global.operate')">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">
|
||||
{{ $t('teach.enterTheCourse') }}
|
||||
</el-button>
|
||||
<el-button v-if="project.endsWith('gzb') && isTeacher && userId === scope.row.creatorId" size="mini" type="danger" @click="handleDelete(scope.row)">
|
||||
删除课程
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -24,6 +32,9 @@
|
||||
<script>
|
||||
import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { forceDeleteLesson } from '@/api/jmap/lesson';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { lessonCreater } from '@/router/index_APP_TARGET';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
@ -31,7 +42,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false
|
||||
loading: false,
|
||||
project: '',
|
||||
isTeacher: false,
|
||||
userId: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -41,6 +55,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitPage();
|
||||
this.project = getSessionStorage('project');
|
||||
this.isTeacher = this.$store.state.user.roles.includes(lessonCreater);
|
||||
this.userId = this.$store.state.user.id;
|
||||
},
|
||||
methods: {
|
||||
loadInitPage() {
|
||||
@ -66,6 +83,21 @@ export default {
|
||||
goLesson(row) {
|
||||
localStore.set('teachDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdType=${row.prdType}`);
|
||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdType: row.prdType}});
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('此操作将删除课程及所有对应的试卷,且无法恢复,是否继续?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
forceDeleteLesson(row.id).then(response => {
|
||||
this.$message.success(this.$t('publish.deleteSuccess'));
|
||||
this.loadInitPage();
|
||||
}).catch((error) => {
|
||||
this.loadInitPage();
|
||||
this.$messageBox(this.$t('error.deleteFailed') + ':' + error.message);
|
||||
});
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -30,10 +30,11 @@ module.exports = {
|
||||
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
|
||||
lintOnSave: false,
|
||||
// filenameHashing: true,
|
||||
productionSourceMap: false,
|
||||
productionSourceMap: false, // 项目打包后是否压缩
|
||||
devServer: {
|
||||
port: port,
|
||||
// open: true,
|
||||
hotOnly: true,
|
||||
overlay: {
|
||||
warnings: false,
|
||||
errors: true
|
||||
|
Loading…
Reference in New Issue
Block a user