Merge remote-tracking branch 'origin/test'

This commit is contained in:
program-walker 2020-05-15 20:31:10 +08:00
commit 8f1961b9ae
60 changed files with 1669 additions and 1333 deletions

View File

@ -80,3 +80,10 @@ export function getLessonByClassId(classId) {
method: 'get' method: 'get'
}); });
} }
/** 强制删除课程(即删除课程和课程关联的试卷) */
export function forceDeleteLesson(lessonId) {
return request({
url: `/api/lesson/usedLesson/${lessonId}`
});
}

View File

@ -13,7 +13,7 @@ export function getScriptPageListOnline(params) {
/** 分页查找上线的剧本(新版)*/ /** 分页查找上线的剧本(新版)*/
export function getScriptPageListOnlineNew(params) { export function getScriptPageListOnlineNew(params) {
return request({ return request({
url: `/api/scirpt/v1/paging/online`, url: `/api/script/v1/paging/online`,
method: 'get', method: 'get',
params: params params: params
}); });
@ -30,7 +30,7 @@ export function getScriptById(id) {
/** 通过ID查询发布的剧本的详细信息(新版) */ /** 通过ID查询发布的剧本的详细信息(新版) */
export function getScriptByIdNew(id) { export function getScriptByIdNew(id) {
return request({ return request({
url: `/api/scirpt/v1/${id}/detail`, url: `/api/script/v1/${id}/detail`,
method: 'get' method: 'get'
}); });
} }

View File

@ -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) { export function saveScriptData(group) {
return request({ return request({

View File

@ -76,5 +76,7 @@ export default {
deviceManage: '设备管理', deviceManage: '设备管理',
iscsDraw: 'Iscs绘制', iscsDraw: 'Iscs绘制',
iscsSystem: 'Iscs系统', iscsSystem: 'Iscs系统',
studentManage: '学生管理' studentManage: '学生管理',
competitionManage: '竞赛管理',
refereeJManage: '仿真管理'
}; };

View File

@ -76,33 +76,6 @@ export default {
}, },
initMenu() { initMenu() {
this.menuNormal = []; 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) { if (this.isScreen) {
this.menu = [...this.menuScreen]; this.menu = [...this.menuScreen];
} }

View File

@ -371,7 +371,6 @@ export default {
}, },
// //
reopenSignalByRoute(selectType) { reopenSignalByRoute(selectType) {
debugger;
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
}).catch(error=>{ }).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow({}, error.message);

View File

@ -63,29 +63,19 @@ export default {
initMenu() { initMenu() {
this.menuNormal = []; this.menuNormal = [];
this.stationList.forEach(station => { this.stationList.forEach(station => {
if (station.code === station.concentrateStationCode) { if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = { const node = {
label: station.name, label: station.name,
children: [] children: []
}; };
station.chargeStationCodeList.forEach(item => {
this.stationList.forEach(elem => { const next = this.$store.getters['map/getDeviceByCode'](item);
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({ node.children.push({
code: elem.code, code: next.code,
label: elem.name, label: next.name,
handler: this.mapLocation handler: this.mapLocation
}); });
}
}
}); });
this.menuNormal.push(node); this.menuNormal.push(node);
} }
}); });

View File

@ -63,33 +63,22 @@ export default {
initMenu() { initMenu() {
this.menuNormal = []; this.menuNormal = [];
this.stationList.forEach(station => { this.stationList.forEach(station => {
if (station.code === station.concentrateStationCode) { if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = { const node = {
label: station.name, label: station.name,
children: [] children: []
}; };
station.chargeStationCodeList.forEach(item => {
this.stationList.forEach(elem => { const next = this.$store.getters['map/getDeviceByCode'](item);
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({ node.children.push({
code: elem.code, code: next.code,
label: elem.name, label: next.name,
handler: this.mapLocation handler: this.mapLocation
}); });
}
}
}); });
this.menuNormal.push(node); this.menuNormal.push(node);
} }
}); });
this.menu = [...this.menuNormal]; this.menu = [...this.menuNormal];
}, },
doShow(point) { doShow(point) {

View 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>

View File

@ -6,6 +6,7 @@
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" /> <alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -21,6 +22,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from './dialog/setFault';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -30,7 +32,8 @@ export default {
SectionUnLock, SectionUnLock,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo NoticeInfo,
SetFault
}, },
props: { props: {
selected: { selected: {
@ -95,10 +98,20 @@ export default {
] ]
}, },
menuForce: [ menuForce: [
// {
// label: '', //
// handler: this.alxeFailure,
// cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
// },
{ {
label: '设置计轴失效', // label: this.$t('menu.menuSection.setFault'),
handler: this.alxeFailure, handler: this.setStoppage,
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT 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(); this.$refs.popMenu.close();
} }
}, },
// // //
alxeFailure() { // alxeFailure() {
this.mouseCancelState(this.selected); // this.mouseCancelState(this.selected);
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{ // commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
}).catch(()=>{ // }).catch(()=>{
this.$refs.noticeInfo.doShow(); // this.$refs.noticeInfo.doShow();
}); // });
}, // },
// //
fault() { fault() {
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ 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); 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> </script>

View File

@ -45,6 +45,10 @@ export const menuOperate = {
// 区段故障解锁 // 区段故障解锁
operation: OperationEvent.Section.fault.menu.operation, operation: OperationEvent.Section.fault.menu.operation,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
setFault: {
operation: OperationEvent.Section.stoppage.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
} }
}, },
Signal:{ Signal:{

View 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>

View File

@ -63,33 +63,22 @@ export default {
initMenu() { initMenu() {
this.menuNormal = []; this.menuNormal = [];
this.stationList.forEach(station => { this.stationList.forEach(station => {
if (station.code === station.concentrateStationCode) { if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = { const node = {
label: station.name, label: station.name,
children: [] children: []
}; };
station.chargeStationCodeList.forEach(item => {
this.stationList.forEach(elem => { const next = this.$store.getters['map/getDeviceByCode'](item);
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({ node.children.push({
code: elem.code, code: next.code,
label: elem.name, label: next.name,
handler: this.mapLocation handler: this.mapLocation
}); });
}
}
}); });
this.menuNormal.push(node); this.menuNormal.push(node);
} }
}); });
this.menu = [...this.menuNormal]; this.menu = [...this.menuNormal];
}, },
doShow(point) { doShow(point) {

View File

@ -5,6 +5,7 @@
<section-cmd-control ref="sectionCmdControl" /> <section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -20,6 +21,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate'; import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from './dialog/setFault';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -28,7 +30,8 @@ export default {
SectionControl, SectionControl,
SectionCmdControl, SectionCmdControl,
SpeedCmdControl, SpeedCmdControl,
NoticeInfo NoticeInfo,
SetFault
}, },
props: { props: {
selected: { selected: {
@ -170,45 +173,18 @@ export default {
}, },
// //
setStoppage() { setStoppage() {
const step = { commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
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 }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(step);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
const step = { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
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 }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(step);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //

View File

@ -8,6 +8,7 @@
<route-hand-control ref="routeHandControl" /> <route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" /> <route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -26,6 +27,7 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from './utils/menuOperate'; import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from './dialog/setFault';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -37,7 +39,8 @@ export default {
RouteCmdControl, RouteCmdControl,
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
NoticeInfo NoticeInfo,
SetFault
}, },
props: { props: {
selected: { selected: {
@ -227,44 +230,18 @@ export default {
}, },
// //
setStoppage() { setStoppage() {
const step = { commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
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 }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(step);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
const step = { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
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 }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(step);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //

View File

@ -5,6 +5,7 @@
<switch-cmd-control ref="switchCmdControl" /> <switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" /> <speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div> </div>
</template> </template>
@ -20,6 +21,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate'; import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from './dialog/setFault';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
@ -28,7 +30,8 @@ export default {
SwitchControl, SwitchControl,
SwitchCmdControl, SwitchCmdControl,
SpeedCmdControl, SpeedCmdControl,
NoticeInfo NoticeInfo,
SetFault
}, },
props: { props: {
selected: { selected: {
@ -222,42 +225,18 @@ export default {
}, },
// //
setStoppage() { setStoppage() {
const step = { commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
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 }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(step);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
cancelStoppage() { cancelStoppage() {
const step = { commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
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 }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.setFault.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow(step);
} }
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //

View File

@ -263,7 +263,16 @@ export const menuOperate = {
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation, operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL 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
}
} }
}; };

View File

@ -47,41 +47,42 @@ export default {
return { return {
entryList: [ entryList: [
{ {
name: 'global.designPlatformEntrance', name: 'global.designPlatformEntrance', //
handle: this.goToDesign, handle: this.goToDesign,
hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')] hidden: getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
}, },
{ {
name: 'global.trainingPlatformEntrance', name: 'global.trainingPlatformEntrance', //
handle: this.goToTraining, handle: this.goToTraining,
hidden: !getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')] hidden: !getSessionStorage('project').startsWith('design') || !goOtherPlatformMenu[getSessionStorage('project')]
}, },
{ {
name: 'global.caseShow', name: 'global.caseShow', //
handle: this.goEmpty, handle: this.goEmpty,
isHelp:true, isHelp:true,
style:'padding-right:0px;', 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, 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, 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' : '中文', name: LangStorage.getLang('zh') === 'zh' ? 'English' : '中文',
handle: this.switchLanguage, handle: this.switchLanguage,
hidden: getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt'),
tip: true tip: true
}, },
{ {
name: 'global.help', name: 'global.help',
handle: this.goToHelp, handle: this.goToHelp,
hidden: getSessionStorage('project').endsWith('hyd') hidden: getSessionStorage('project').endsWith('hyd') || getSessionStorage('project').startsWith('refereeJsxt') || getSessionStorage('project').startsWith('jsxt')
} }
], ],

View File

@ -40,7 +40,7 @@ const News = () => import('@/views/system/news/index');
const CommandDictionary = () => import('@/views/system/commandDictionary/index'); const CommandDictionary = () => import('@/views/system/commandDictionary/index');
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit'); const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
const configLine = () => import('@/views/system/configLine/index'); 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 IscsSystem = () => import('@/views/iscs/iscsSystem/index');
const IscsDraw = () => import('@/views/iscs/iscsDraw/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 MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
const BigScreen = () => import('@/views/designPlatform/bigScreen'); const BigScreen = () => import('@/views/designPlatform/bigScreen');
const DesignPlatformUser = () => import('@/views/designUser/index'); // const DesignPlatformUser = () => import('@/views/designUser/index');
const Package = () => import('@/views/package/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 MapSort = () => import('@/views/publish/publishMap/mapSort');
const StudentManage = () => import('@/views/studentManage'); const StudentManage = () => import('@/views/studentManage');
const CompetitionManage = () => import('@/views/competition/index');
const RefereeList = () => import('@/views/refereeList/index');
import { loginInfo, GenerateRouteProjectList } from '@/scripts/ProjectConfig'; import { loginInfo, GenerateRouteProjectList } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
@ -848,7 +851,6 @@ export const asyncRouter = [
}, },
{ // 新个人地图 { // 新个人地图
path: '/design', path: '/design',
// redirect: '/design/usermap/home',
component: Layout, component: Layout,
meta: { meta: {
i18n: 'router.newDesignUserPage', 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({ const createRouter = () => new Router({
mode: 'history', // require service support mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
@ -990,6 +1036,11 @@ const router = createRouter();
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
const project = getSessionStorage('project'); 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; document.title = loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title;
next(); next();
}); });

View File

@ -55,7 +55,11 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
}, },
jsxt:{ jsxt:{
title: '城市轨道交通竞赛平台', title: '城市轨道交通竞赛平台',
loginPath: '/js/login' loginPath: '/jsxt/login'
},
refereeJsxt:{
title: '城市轨道交通裁判平台',
loginPath: '/refereeJsxt/login'
} }
}; };
@ -70,7 +74,8 @@ export const ProjectIcon = {
designhyd: FaviconHyd, designhyd: FaviconHyd,
xadt: FaviconXadt, xadt: FaviconXadt,
designxadt: FaviconXadt, designxadt: FaviconXadt,
jsxt: Favicon jsxt: Favicon,
refereeJsxt: Favicon
}; };
export const ProjectCode = { export const ProjectCode = {
@ -85,7 +90,7 @@ export const ProjectCode = {
}; };
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt']; // 实训设计平台通过项目code获取地图列表的项目 export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['hyd', 'designhyd']; // 案例展示隐藏的项目 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 = { // 导航栏快速切换平台 export const goOtherPlatformMenu = { // 导航栏快速切换平台
login: '/design/login', login: '/design/login',
design: '/login', design: '/login',
@ -133,6 +138,11 @@ export const PermissionParam = { // 路径权限处理所需参数配置(跳
whitePage: '/jsxt/login', whitePage: '/jsxt/login',
reg: /^\/jsxt/, reg: /^\/jsxt/,
clientId: null clientId: null
},
refereeJsxt: {
whitePage: '/refereeJsxt/login',
reg: /^\/refereeJsxt/,
clientId: null
} }
}; };
export const ProjectList = [ export const ProjectList = [

View File

@ -8,7 +8,7 @@ export default class Command {
} }
toFound(definition, wholeParam) { toFound(definition, wholeParam) {
this.id = definition.id; this.id = definition.operate;
(definition.paramList || []).forEach(param => { (definition.paramList || []).forEach(param => {
if (wholeParam.hasOwnProperty(param.name)) { if (wholeParam.hasOwnProperty(param.name)) {
this.command[param.name] = wholeParam[param.name]; this.command[param.name] = wholeParam[param.name];

View File

@ -218,7 +218,10 @@ export default {
/** 新建计划列车 */ /** 新建计划列车 */
CMD_Train_Init_Plan: {value: 'Train_Init_Plan', label: '新建计划列车'} 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: { LimitControl: {
} }

View File

@ -14,7 +14,11 @@ class CommandHandle {
load(list) { load(list) {
this.definitionMap = { this.definitionMap = {
Center: {}, 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 => { (list || []).forEach(definition => {
this.definitionMap[definition.simulationRole][definition.operate] = definition; this.definitionMap[definition.simulationRole][definition.operate] = definition;
@ -25,7 +29,7 @@ class CommandHandle {
getDefinition(cmdType) { getDefinition(cmdType) {
if (cmdType) { if (cmdType) {
const simulationRole = Handler.getSimulationRole(); const simulationRole = Handler.getSimulationRole();
return this.definitionMap[simulationRole][cmdType.value] || null; return this.definitionMap[simulationRole][cmdType.value] || this.definitionMap.Common[cmdType.value] || null;
} else { } else {
return null; return null;
} }

View File

@ -26,4 +26,25 @@ export const MapDeviceType = {
MixinCommand: { type: '11', label: '混合命令' } 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: '列车'
};

View File

@ -57,7 +57,6 @@ class Handler {
if (operation.cmdType) { if (operation.cmdType) {
const cmdType = operation.cmdType; const cmdType = operation.cmdType;
const wholeParam = this.getWholeParam(); const wholeParam = this.getWholeParam();
command = CommandHandler.getCommand(cmdType, wholeParam); command = CommandHandler.getCommand(cmdType, wholeParam);
if (command && command.isError) { if (command && command.isError) {
this.operations.pop(); this.operations.pop();

View File

@ -26,6 +26,9 @@ function handle(state, data) {
case 'Simulation_User': // 仿真-聊天界面用户进出仿真消息 case 'Simulation_User': // 仿真-聊天界面用户进出仿真消息
handleSimulationUserinfo(state, msg); // 用户进出仿真消息 handleSimulationUserinfo(state, msg); // 用户进出仿真消息
break; break;
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
break;
case 'Simulation_RunFact': // 仿真-列车实际到发车站消息 case 'Simulation_RunFact': // 仿真-列车实际到发车站消息
// let runFactMsg = msg; // let runFactMsg = msg;
// if (runFactMsg.constructor !== Array ) { // if (runFactMsg.constructor !== Array ) {
@ -136,7 +139,6 @@ function handleSimulationInfo(state, data) {
if (data.member.userId == userId) { if (data.member.userId == userId) {
isSelf = true; isSelf = true;
} }
const myDate = new Date(); const myDate = new Date();
const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-'); const myDate1 = myDate.toLocaleDateString().replace(/\//g, '-');
const chatTime = /\d{2}:\d{2}:\d{2}/.exec(data.chatTime)[0] || data.chatTime; 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}`) date: +new Date(`${myDate1} ${chatTime}`)
}; };
state.simulationText = params; 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': function handleSimulationScriptTipInfo(state, data) {
// role = '管理员'; state.simulationScriptTip = data;
// 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 handleUserinfo(state, data) { function handleUserinfo(state, data) {
@ -242,6 +194,7 @@ const socket = {
chatContent: {}, // 聊天室聊天内容 chatContent: {}, // 聊天室聊天内容
roleList: [], // 设置角色信息 roleList: [], // 设置角色信息
simulationRoleList:[], // 设置仿真的聊天角色信息 simulationRoleList:[], // 设置仿真的聊天角色信息
simulationScriptTip:{}, // 剧本推送提示信息
jointRoomPrepare: false, // 演练房间准备状态 jointRoomPrepare: false, // 演练房间准备状态
equipmentStatus: [], // 仿真-设备状态消息 equipmentStatus: [], // 仿真-设备状态消息
trainStationList: [], // 仿真-列车实际到发车站消息 trainStationList: [], // 仿真-列车实际到发车站消息

View File

@ -2,12 +2,12 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82: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://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View 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'">&nbsp;仿真系统</span>
<span v-else>&nbsp;{{ 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>

View 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>

View File

@ -1,17 +1,22 @@
<template> <template>
<div class="map-view"> <div class="map-view">
<jlmap-visual ref="jlmapVisual" /> <jlmap-visual ref="jlmapVisual" @onMenu="onContextmenu" />
<pop-menu ref="popMenu" :menu="menu" />
</div> </div>
</template> </template>
<script> <script>
import JlmapVisual from '@/views/newMap/jlmapNew/index'; import JlmapVisual from '@/views/newMap/jlmapNew/index';
import { loadMapDataById } from '@/utils/loaddata'; import { loadMapDataById } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
export default { export default {
name: 'MapPreview', name: 'MapPreview',
components: { components: {
JlmapVisual JlmapVisual,
PopMenu
}, },
props: { props: {
widthLeft: { widthLeft: {
@ -24,10 +29,15 @@ export default {
size: { size: {
width: document.documentElement.clientWidth - 400, width: document.documentElement.clientWidth - 400,
height: document.documentElement.clientHeight - 80 height: document.documentElement.clientHeight - 80
} },
menu: [],
menuNormal: []
}; };
}, },
computed: { computed: {
...mapGetters('map', [
'stationList'
]),
mapId() { mapId() {
return this.$route.params.mapId; return this.$route.params.mapId;
}, },
@ -49,6 +59,13 @@ export default {
}, },
'$store.state.map.mapViewLoadedCount':function() { '$store.state.map.mapViewLoadedCount':function() {
this.$store.dispatch('map/setTrainWindowShow', false); 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() { async beforeDestroy() {
@ -66,6 +83,62 @@ export default {
this.endViewLoading(); 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 // id
async loadMapDataById(mapId) { async loadMapDataById(mapId) {
try { try {

View File

@ -8,12 +8,20 @@
<el-card v-loading="loading"> <el-card v-loading="loading">
<el-table :data="tableData" border style="width: 100%"> <el-table :data="tableData" border style="width: 100%">
<el-table-column prop="name" :label="this.$t('exam.courseName')" /> <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 prop="remarks" show-overflow-tooltip :label="this.$t('exam.courseDescription')" />
<el-table-column :label="this.$t('global.operate')"> <el-table-column :label="this.$t('global.operate')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="goLesson(scope.row)"> <el-button size="mini" type="primary" @click="goLesson(scope.row)">
{{ $t('exam.enterTheExam') }} {{ $t('exam.enterTheExam') }}
</el-button> </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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -24,6 +32,9 @@
<script> <script>
import { getSubSystemDetail } from '@/api/trainingPlatform'; import { getSubSystemDetail } from '@/api/trainingPlatform';
import { UrlConfig } from '@/scripts/ConstDic'; 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'; import localStore from 'storejs';
export default { export default {
@ -31,7 +42,10 @@ export default {
data() { data() {
return { return {
tableData: [], tableData: [],
loading: false loading: false,
project: '',
isTeacher: false,
userId: ''
}; };
}, },
watch: { watch: {
@ -41,6 +55,9 @@ export default {
}, },
mounted() { mounted() {
this.loadInitPage(); this.loadInitPage();
this.project = getSessionStorage('project');
this.isTeacher = this.$store.state.user.roles.includes(lessonCreater);
this.userId = this.$store.state.user.id;
}, },
methods: { methods: {
loadInitPage() { loadInitPage() {
@ -64,6 +81,21 @@ export default {
goLesson(row) { goLesson(row) {
localStore.set('examDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`); 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}}); 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(() => { });
} }
} }
}; };

View File

@ -1,10 +1,10 @@
<template> <template>
<div> <div class="boradcast_box">
<div style="margin: 20px auto 0;text-align: center;font-size: 20px;color: #9EEBEF;">语音广播</div> <div style="margin: 20px auto 0;text-align: center;font-size: 20px;color: #9EEBEF;">语音广播</div>
<div style="overflow: hidden;"> <div style="overflow: hidden;">
<div class="area-selection"> <div class="area-selection">
<el-row><div style="margin-top: 10px;margin-bottom: 5px; color: #9EEBEF;">特定区域</div></el-row> <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>
<div class="broadcast-form"> <div class="broadcast-form">
<div style="width: 120px; height: 300px; float: left; position: absolute; top: 20px;"> <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 v-for="(item,i) in verticalHeader" :key="i" :style="{width: tableWidth+'px'}" class="iscs-pa-table">
<div style="position: relative; left: 80px;"> <div style="position: relative; left: 80px;">
<div v-for="(it, j) in stationList" :key="j" class="table-grid"> <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 style="cursor: default;">{{ it }}</div>
</div> </el-button>
<div v-if="item.type==='checkBox'"> <div v-if="item.type==='checkBox'">
<div class="pa-table-content" @click="clickArea(i,j)"> <div class="pa-table-content" @click="clickArea(i,j)">
<div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" /> <div class="pa-table-content-inside" :style="{background: selectedAreaList.includes(i + '-' + j)? '#2EFF74':'#CDCDCD'}" />
@ -32,30 +32,30 @@
<div class="broadcast-mode"> <div class="broadcast-mode">
<el-row> <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 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> </el-row>
</div> </div>
<div class="broadcast-operations"> <div class="broadcast-operations">
<el-row> <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 style="height: 80px;text-align: center; background: #000088;color: #fff;padding-top: 30px">预备<br>广播</div></el-col>
<el-col :span="12"> <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 class="pa-check-box" :style="{background: videoMode==='common'?'#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 5px;display: inline-block;">普通预录</div> <div style="position: relative; left: 5px;display: inline-block;">普通预录</div>
</div> </el-button>
<br> <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 class="pa-check-box" :style="{background: videoMode==='emergency'?'#2EFF74':'#CDCDCD'}" />
<div style="position: relative; left: 5px;display: inline-block; color: #f00;">紧急预录</div> <div style="position: relative; left: 5px;display: inline-block; color: #f00;">紧急预录</div>
</div> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="padding-bottom: 10px"> <el-row style="padding-bottom: 10px">
<el-col :span="12"> <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>
<el-col :span="12"> <el-col :span="12">
<div class="broadcast-mode-button">广播停止</div> <el-button class="broadcast-mode-button">广播停止</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </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-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">背景音乐</div></el-col>
</el-row> </el-row>
<el-row style="padding-bottom: 10px"> <el-row style="padding-bottom: 10px">
<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"><div class="broadcast-mode-button">停止音乐</div></el-col> <el-col :span="12"><el-button class="broadcast-mode-button">停止音乐</el-button></el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
@ -138,7 +138,7 @@ export default {
selectedBatch(data) { selectedBatch(data) {
data.active = !data.active; data.active = !data.active;
if (data.key == 'station') { if (data.key == 'station') {
this.selectedAll(); this.selectedAll(data);
} else { } else {
let areaIndex; let areaIndex;
this.verticalHeader.map((item, index) => { this.verticalHeader.map((item, index) => {
@ -146,48 +146,28 @@ export default {
areaIndex = index; areaIndex = index;
} }
}); });
const flag = this.checkSelectedBatch(areaIndex); const flag = data.active;
for (let j = 0; j < this.stationList.length; j++) { 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); this.selectedAreaList.push(areaIndex + '-' + j);
} else if (flag) { } else if (!flag) {
const index = this.selectedAreaList.indexOf(areaIndex + '-' + j); const index = this.selectedAreaList.indexOf(areaIndex + '-' + j);
this.selectedAreaList.splice(index, 1); this.selectedAreaList.splice(index, 1);
} }
} }
} }
}, },
selectedAll() { selectedAll(data) {
const flag = this.checkSelectedAll(); const flag = data.active;
this.selectedAreaList = []; this.selectedAreaList = [];
for (let i = 1; i < this.verticalHeader.length; i++) { for (let i = 1; i < this.verticalHeader.length; i++) {
for (let j = 0; j < this.stationList.length; j++) { for (let j = 0; j < this.stationList.length; j++) {
if (!flag) { if (flag) {
this.selectedAreaList.push(i + '-' + j); 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) { checkSelectedStation(stationIndex) {
let selectedStationFlag = true; let selectedStationFlag = true;
for (let i = 1; i < this.verticalHeader.length; i++) { for (let i = 1; i < this.verticalHeader.length; i++) {
@ -224,7 +204,15 @@ export default {
}; };
</script> </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{ .area-selection{
text-align: center; text-align: center;
border-top: 3px solid #898888; border-top: 3px solid #898888;
@ -248,6 +236,8 @@ export default {
border-right: 2px solid #565656; border-right: 2px solid #565656;
border-bottom: 2px solid #565656; border-bottom: 2px solid #565656;
cursor: default; cursor: default;
margin-left: 0;
&:active,
&.active{ &.active{
background: #cccccc; background: #cccccc;
border-top: 2px solid #9c9c9c; border-top: 2px solid #9c9c9c;
@ -298,6 +288,9 @@ export default {
border-left: 2px solid #fff; border-left: 2px solid #fff;
border-right: 2px solid #898888; border-right: 2px solid #898888;
border-bottom: 2px solid #898888; border-bottom: 2px solid #898888;
font-size: 12px;
padding: 0;
&:active,
&.active{ &.active{
background: #cccccc; background: #cccccc;
border-top: 2px solid #9c9c9c; border-top: 2px solid #9c9c9c;
@ -364,16 +357,15 @@ export default {
height: 30px; height: 30px;
text-align: center; text-align: center;
background: #CCCCCC; background: #CCCCCC;
position: relative;
top: 5px;
width: 85%; width: 85%;
left: 5%;
line-height: 28px; line-height: 28px;
border-top: 2px solid #fff; border-top: 2px solid #fff;
border-left: 2px solid #fff; border-left: 2px solid #fff;
border-right: 2px solid #898888; border-right: 2px solid #898888;
border-bottom: 2px solid #898888; border-bottom: 2px solid #898888;
cursor: default; cursor: default;
padding: 0;
&:active,
&.active{ &.active{
background: #cccccc; background: #cccccc;
border-top: 2px solid #9c9c9c; border-top: 2px solid #9c9c9c;

View File

@ -11,7 +11,6 @@
<emergency-release v-else-if="mode === 'EmergencyRelease'" /> <emergency-release v-else-if="mode === 'EmergencyRelease'" />
<controlBAS v-else-if="mode === 'controlBAS'" /> <controlBAS v-else-if="mode === 'controlBAS'" />
<controlPermissionBAS v-else-if="mode === 'controlPermissionBAS'" /> <controlPermissionBAS v-else-if="mode === 'controlPermissionBAS'" />
<!-- <mainScreenPA v-else-if="mode === 'mainScreenPA'" /> -->
<radioListeningPA v-else-if="mode === 'radioListeningPA'" /> <radioListeningPA v-else-if="mode === 'radioListeningPA'" />
<timePreviewPA v-else-if="mode === 'timePreviewPA'" /> <timePreviewPA v-else-if="mode === 'timePreviewPA'" />
<controlCCTV v-else-if="mode === 'controlCCTV'" /> <controlCCTV v-else-if="mode === 'controlCCTV'" />
@ -75,7 +74,6 @@ export default {
EmergencyRelease, EmergencyRelease,
controlBAS, controlBAS,
controlPermissionBAS, controlPermissionBAS,
// mainScreenPA,
radioListeningPA, radioListeningPA,
timePreviewPA, timePreviewPA,
controlCCTV, controlCCTV,

View File

@ -1,10 +1,226 @@
<template> <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> </div>
</template> </template>
<script> <script>
import { getByGroupStationList } from '@/api/jmap/map';
export default { 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> </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>

View File

@ -1,10 +1,102 @@
<template> <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> </div>
</template> </template>
<script> <script>
export default { 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> </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>

View File

@ -1,5 +1,5 @@
<template> <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="lcdControl_title">LCD控制屏</div>
<div class="area_select" style="position: absolute; top: 15%; left: 25%; width: 80px; height: 50px;"> <div class="area_select" style="position: absolute; top: 15%; left: 25%; width: 80px; height: 50px;">
<div>特定区域</div> <div>特定区域</div>
@ -28,6 +28,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.iscs_lcd_box {
}
.lcdControl_title{ .lcdControl_title{
width: 100%; width: 100%;
text-align: center; text-align: center;

View File

@ -6,7 +6,7 @@
<div class="main_screen_content"> <div class="main_screen_content">
<div class="screen_left"> <div class="screen_left">
<div class="screen_left_tab">特定区域</div> <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="selectedAllLine">全线</div>
<div class="screen_operate_name" @click="selectedAreaBatch(0)">全站厅(LCD)</div> <div class="screen_operate_name" @click="selectedAreaBatch(0)">全站厅(LCD)</div>
<div class="screen_operate_name" @click="selectedAreaBatch(1)">全上行站台</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(4)">全物业</div>
<div class="screen_operate_name" @click="selectedAreaBatch(5)">全天桥</div> <div class="screen_operate_name" @click="selectedAreaBatch(5)">全天桥</div>
<div class="screen_operate_name" @click="selectedAreaBatch(6)">出入口(LED)</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>
<div class="screen_main_content"> <div class="screen_main_content">
<div class="screen_main_content_inner"> <div class="screen_main_content_inner">
<div class="screen_left_text_group"> <div class="screen_left_text_group">
<div class="each_data_info">车站</div> <div v-for="(item, index) in verticalHeader" :key="index" class="each_data_info">{{ item.name }}</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> </div>
<div class="screen_right_group"> <div class="screen_right_group">
<div class="screen_right_group_in"> <div class="screen_right_group_in">
@ -93,6 +86,17 @@ export default {
}, },
data() { data() {
return { 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:[], stationList:[],
selectedAreaList: [] selectedAreaList: []
}; };
@ -122,31 +126,7 @@ export default {
showInfoBrroadcast() { showInfoBrroadcast() {
this.$refs.infoBroadcast.doShow(); 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) { selectArea(stationName, index) {
const elem = stationName + '-' + index; const elem = stationName + '-' + index;
if (this.selectedAreaList.includes(elem)) { if (this.selectedAreaList.includes(elem)) {
@ -178,37 +158,61 @@ export default {
}); });
return stationSelectedFlag; return stationSelectedFlag;
}, },
selectedAreaBatch(areaIndex) { selectedBatch(data) {
const flag = this.checkAreaBatchSelected(areaIndex); 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 => { this.stationList.forEach(station => {
station.children.forEach((item, index) => { station.children.forEach((item, index) => {
const elem = station.stationName + '-' + index; if (item.status === 'default' && flag) {
if (item.status === 'default' && index === areaIndex && flag) { this.selectedAreaList.push(station.stationName + '-' + index);
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);
} }
}); });
}); });
},
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> </script>
<style lang="scss" scoped> <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;} .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{padding-left: 50px;width: 100%;}
.main_screen_header{} .main_screen_header{}
@ -258,7 +262,7 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
vertical-align: top; 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_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;} .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%;} .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;} .each_station_info{width:130px;display: inline-block;vertical-align:top;padding-right: 10px;}
@ -272,11 +276,13 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
border-right: 2px solid #9e9e9e; border-right: 2px solid #9e9e9e;
border-bottom: 2px solid #636667; border-bottom: 2px solid #636667;
cursor: pointer; cursor: pointer;
&.active, margin-left: 0;
&:hover{ margin-top: 10px;
background: #EBB570; &:active,
border-top: 2px solid #795B31; &.active{
border-left: 2px solid #795B31; background: #cccccc;
border-top: 2px solid #9c9c9c;
border-left: 2px solid #9c9c9c;
border-right: 2px solid #fff; border-right: 2px solid #fff;
border-bottom: 2px solid #fff; border-bottom: 2px solid #fff;
} }
@ -284,18 +290,6 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
.screen_station_name{ .screen_station_name{
width: 120px; 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{ .screen_station_name.active{
background: #EBB570; background: #EBB570;
border-top: 2px solid #795B31; border-top: 2px solid #795B31;

View File

@ -73,7 +73,8 @@ export default {
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
/deep/{
.time_preview{padding:20px;} .time_preview{padding:20px;}
.preview_header_text{margin-top:10px;text-align: center;color: #9af1ec;font-size: 18px;padding-bottom: 10px;} .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_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;}
@ -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;} .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} .preview_footer_content{margin-top:15px;margin-left:20px;margin-bottom:10px;display:flex;flex-direction:row}
}
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="joylink-card"> <div class="joylink-card">
<div class="lesson-header"> <div class="lesson-header">
<div class="lesson-list">{{ $t('lesson.courseList') }}</div> <div class="lesson-list">草稿{{ $t('lesson.courseList') }}</div>
<div class="but-group"> <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="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</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'; } tagType: (row) => { return 'success'; }
}, },
{
title: this.$t('lesson.explanation'),
prop: 'explanation'
},
{ {
type: 'button', type: 'button',
title: this.$t('global.operate'), title: this.$t('global.operate'),

View File

@ -215,6 +215,10 @@ export default {
this.modelType = 'design'; this.modelType = 'design';
this.loginClient = 'Design'; this.loginClient = 'Design';
this.path = UrlConfig.design.prefix; 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'); const nowLang = LangStorage.getLang('zh');

View File

@ -450,7 +450,7 @@ export default {
isSwitchSection: true, isSwitchSection: true,
relSwitchCode: elem.code, relSwitchCode: elem.code,
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }], points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
logicSectionNum: [0], logicSectionNum: 0,
logicSectionShow: false, logicSectionShow: false,
sepTypeLeft: '00', sepTypeLeft: '00',
offsetLeft: 0, offsetLeft: 0,

View File

@ -252,8 +252,7 @@ export default {
if (collection && collection.length) { if (collection && collection.length) {
collection.forEach(elem => { collection.forEach(elem => {
if (elem.type !== '03' && !elem.isSwitchSection && ( if (elem.type !== '03' && !elem.isSwitchSection && (Number(elem.logicSectionNum) == 0)) {
elem.logicSectionNum.length == 0 || elem.logicSectionNum.length == 1 && elem.logicSectionNum[0] == 0)) {
const triangle = new JTriangle(elem.points[0], elem.points[elem.points.length - 1]); const triangle = new JTriangle(elem.points[0], elem.points[elem.points.length - 1]);
models.push(this.createModel({ models.push(this.createModel({
triangle: triangle, triangle: triangle,

View File

@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div class="chat-box-content"> <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 v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" /> <div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" /> <div class="record_icon" />
@ -31,6 +31,7 @@
<div class="chat-box-footer"> <div class="chat-box-footer">
<div class="chat-box-footer-tool" /> <div class="chat-box-footer-tool" />
<div class="chat-box-footer-send" @click="startRecording()">发送语音</div> <div class="chat-box-footer-send" @click="startRecording()">发送语音</div>
<div v-if="scriptTip" class="scriptTip">{{ scriptTip }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -74,6 +75,7 @@ export default {
inter:null, inter:null,
recorders: null, recorders: null,
microphone:null, microphone:null,
scriptTip:'',
form:{ form:{
language:'zh', language:'zh',
sex:'1' sex:'1'
@ -89,6 +91,17 @@ export default {
this.$refs.chatCoversitionList.setCoversitionStatus(val); 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() { mounted() {
@ -110,19 +123,24 @@ export default {
}, },
setCurrentCoversition(coversition) { setCurrentCoversition(coversition) {
this.currentCoversition = coversition; this.currentCoversition = coversition;
if (this.recordSending) {
this.cancleRecording();
}
}, },
setHeadTitle(headerTitle) { setHeadTitle(headerTitle) {
this.headerTitle = headerTitle; this.headerTitle = headerTitle;
}, },
addCoversition({data, headerTitle}) { addCoversition({data, headerTitle}) {
this.$refs.chatCoversitionList.addCoversition(data, headerTitle); this.$refs.chatCoversitionList.addCoversition(data, headerTitle);
if (headerTitle) {
this.currentCoversition = {id:data.id, group:data.group}; this.currentCoversition = {id:data.id, group:data.group};
this.headerTitle = headerTitle; this.headerTitle = headerTitle;
} },
changeCoversition(data) {
this.$refs.chatCoversitionList.changeCoversitionOther(data);
}, },
// //
startRecording() { startRecording() {
this.scriptTip = '';
const that = this; const that = this;
if (!this.recordSending && !this.recorders && !this.microphone) { if (!this.recordSending && !this.recorders && !this.microphone) {
this.$refs.chatSetting.doClose(); this.$refs.chatSetting.doClose();
@ -267,6 +285,7 @@ export default {
.chat-box-footer{ .chat-box-footer{
display: inline-block; display: inline-block;
width: 100%; width: 100%;
position: relative;
} }
.chat-window{ .chat-window{
display: inline-block; display: inline-block;
@ -322,6 +341,27 @@ export default {
.coversition-list{ .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{ .showMembers{
float: right; float: right;

View File

@ -8,7 +8,8 @@
</div> </div>
<div class="userBubble" @click="playAudio('audio'+index)"> <div class="userBubble" @click="playAudio('audio'+index)">
<div class="userMessage"> <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="el-icon-video-play playicon" />
<span class="messageText">{{ chatContent.message }}</span> <span class="messageText">{{ chatContent.message }}</span>
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" /> <audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />
@ -42,7 +43,8 @@ export default {
if (this.currentCoversition.id == val.id) { if (this.currentCoversition.id == val.id) {
this.chatContentList.push(simulationText); this.chatContentList.push(simulationText);
} else { } else {
this.$emit('addCoversition', {data:simulationText, headerTitle:''}); this.$emit('changeCoversition', simulationText);
// this.$emit('addCoversition', {data:simulationText, headerTitle:''});
this.chatContentList.push(simulationText); this.chatContentList.push(simulationText);
} }
}, },

View File

@ -48,7 +48,6 @@ export default {
addCoversition(data, headerTitle) { addCoversition(data, headerTitle) {
const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; }); const index = this.coversitionList.findIndex(item=>{ return item.id == data.id; });
if (index < 0) { if (index < 0) {
debugger;
const objectCover = this.handleMemberName(data); const objectCover = this.handleMemberName(data);
data.coverName = objectCover.coversitionName; data.coverName = objectCover.coversitionName;
data.isOnline = objectCover.isOnline; data.isOnline = objectCover.isOnline;
@ -64,6 +63,13 @@ export default {
this.$emit('setCurrentCoversition', coversition); this.$emit('setCurrentCoversition', coversition);
// this.$refs.chatContent.reloadData(this.currentCoversition); // 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) { handleMemberName(conversition) {
if (conversition.group) { if (conversition.group) {
return {coversitionName:conversition.name, isOnline:true}; return {coversitionName:conversition.name, isOnline:true};

View File

@ -78,6 +78,11 @@ export default {
this.memberList = lastData; this.memberList = lastData;
}); });
}, },
getMember(memberId) {
return this.memberList.filter(member=>{
return member.id == memberId;
});
},
doShow() { doShow() {
if (this.showMembers) { if (this.showMembers) {
this.showMembers = false; this.showMembers = false;

View File

@ -51,6 +51,8 @@
</template> </template>
<script> <script>
import Cookies from 'js-cookie';
import ConstConfig from '@/scripts/ConstConfig';
import {getScriptPageListOnlineNew, getScriptByIdNew, getDraftScriptByGroupNew } from '@/api/script'; import {getScriptPageListOnlineNew, getScriptByIdNew, getDraftScriptByGroupNew } from '@/api/script';
// //
@ -152,6 +154,24 @@ export default {
}, },
async loadInitData() { 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) { async handleLoad(index, row) {
this.row = row; this.row = row;
@ -159,7 +179,9 @@ export default {
let newMemberList = []; let newMemberList = [];
if (res.code == 200) { if (res.code == 200) {
if (res.data.playerList && res.data.playerList.length > 0) { 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) { if (res.data.mapLocation) {
this.mapLocation = res.data.mapLocation; this.mapLocation = res.data.mapLocation;

View File

@ -39,7 +39,7 @@ import { getGoodsTryUse } from '@/api/management/goods';
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation'; import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
import { PermissionType } from '@/scripts/ConstDic'; import { PermissionType } from '@/scripts/ConstDic';
import { getCountTime } from '@/utils/index'; import { getCountTime } from '@/utils/index';
import { quitScript, quitScriptNew } from '@/api/simulation'; import { quitScriptNew, scriptRePreview } from '@/api/simulation';
export default { export default {
name: 'MenuDemon', name: 'MenuDemon',
@ -227,22 +227,25 @@ export default {
}); });
}, },
handleQuitQuest() { 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 => { quitScriptNew(this.group).then(resp => {
this.$emit('quitQuest'); this.$emit('quitQuest');
this.initLoadPage(); this.initLoadPage();
}).catch(() => { }).catch(() => {
this.$messageBox(this.$t('display.demon.exitTaskFail')); 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() { async back() {
await clearSimulation(this.group); await clearSimulation(this.group);

View File

@ -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>

View File

@ -47,18 +47,20 @@
/> />
<ci-config ref="ciConfig" /> <ci-config ref="ciConfig" />
</div> </div>
<pop-menu ref="popMenu" :menu="menu" />
</div> </div>
</transition> </transition>
</template> </template>
<script> <script>
import { saveMap, getMapDetail, verifyMap, postBuildMapImport, getRouteNewList, getAutoReentryList } from '@/api/jmap/mapdraft'; 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 { checkLoginLine } from '@/api/login';
import JlmapVisual from '@/views/newMap/jlmapNew/index'; import JlmapVisual from '@/views/newMap/jlmapNew/index';
import MapOperate from './mapoperate/index'; import MapOperate from './mapoperate/index';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import CiConfig from './ciConfig'; import CiConfig from './ciConfig';
import PopMenu from '@/components/PopMenu';
import ConfigMap from './configMap'; import ConfigMap from './configMap';
@ -71,7 +73,8 @@ export default {
MapOperate, MapOperate,
DataRelation, DataRelation,
ConfigMap, ConfigMap,
CiConfig CiConfig,
PopMenu
}, },
data() { data() {
return { return {
@ -95,13 +98,16 @@ export default {
x: '', x: '',
y: '' y: ''
} }
} },
menu: [],
menuNormal: []
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stepData', 'stepData',
'recoverStepData' 'recoverStepData',
'stationList'
]), ]),
maskOpen() { maskOpen() {
return this.$store.state.config.maskOpen; return this.$store.state.config.maskOpen;
@ -119,6 +125,13 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.loadInitPage(); 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() { mounted() {
@ -148,6 +161,52 @@ export default {
this.updtModel.scaling = dataZoom.scaleRate; 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() { updateObjAxis() {
this.getMapOrigin(); this.getMapOrigin();
this.$confirm('您确认按当前绘图位置更新坐标及缩放比例?', this.$t('tip.hint'), { this.$confirm('您确认按当前绘图位置更新坐标及缩放比例?', this.$t('tip.hint'), {

View File

@ -17,8 +17,6 @@
<el-dropdown-item><span style="display:block;" :disabled="mapSaveing" @click="generateCIEvent">生成联锁</span></el-dropdown-item> <el-dropdown-item><span style="display:block;" :disabled="mapSaveing" @click="generateCIEvent">生成联锁</span></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </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="dataRelation">{{ $t('map.advanced') }}</el-button>
<el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="showMap">绘图显隐</el-button> <el-button type="text" style="float: right; padding: 3px 0; margin-right: 5px;" @click="showMap">绘图显隐</el-button>
</div> </div>

View File

@ -3,31 +3,17 @@
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy"> <el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div style="height: calc(100% - 46px);"> <div style="height: calc(100% - 46px);">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<config-list <config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
ref="dataform"
:form="form"
:form-model="editModel"
:rules="rules"
/>
</el-scrollbar> </el-scrollbar>
</div> </div>
<div class="button_box"> <div class="button_box">
<el-button-group class="map-draft-group"> <el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button> <el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button <el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
type="danger"
size="small"
@click="deleteObj"
>{{ $t('map.deleteObj') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
class="view-control"
:label="$t('map.newConstruction')"
name="second"
:lazy="lazy"
>
<create-section <create-section
ref="create" ref="create"
:field="field" :field="field"
@ -193,511 +179,84 @@ export default {
draw: { draw: {
name: this.$t('map.drawData'), name: this.$t('map.drawData'),
item: [ 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: 'code', { prop: 'name', label: this.$t('map.sectionNameColon'), type: 'input' },
label: this.$t('map.blockCoding'), { prop: 'namePosition', label: this.$t('map.sectionNameOffset'), type: 'coordinate', width: '150px', children: [
type: 'select', { prop: 'namePosition.x', firstLevel: 'namePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
mode: false, { prop: 'namePosition.y', firstLevel: 'namePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
optionLabel: 'name&&code', ] },
optionValue: 'code', { prop: 'type', label: this.$t('map.sectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionTypeList }, //
options: this.sectionList, { prop: 'roadType', label: '线路类型:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.sectionRoadTypeList, clearable: true, isHidden: !this.isSwitchSectionType, change: true, deviceChange: this.roadTypeChange },
change: true, { 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 }, //
deviceChange: this.deviceChange { 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: 'name', { prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
label: this.$t('map.sectionNameColon'), { prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
type: 'input' { 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: '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: 'standTrackName', { prop: 'standTrackNamePosition', label: this.$t('map.standTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isstandTrackNameShow, children: [
label: this.$t('map.standTrackName'), { prop: 'standTrackNamePosition.x', firstLevel: 'standTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
type: 'input', { prop: 'standTrackNamePosition.y', firstLevel: 'standTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
isHidden: !this.isstandTrackNameShow ] },
}, { prop: 'reentryTrack', label: this.$t('map.isReentryTrack'), type: 'checkbox', isHidden: !this.isReentryTrackShow }, //
{ { prop: 'firstTurnBack', label: '是否优先折返:', type: 'checkbox', isHidden: !this.isreentryTrackName },
prop: 'standTrackNamePosition', { prop: 'reentryTrackName', label: this.$t('map.reentryTrackName'), type: 'input', isHidden: !this.isreentryTrackName }, //
label: this.$t('map.standTrackNamePosition'), { prop: 'reentryTrackNamePosition', label: this.$t('map.reentryTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.isreentryTrackName, children: [
type: 'coordinate', { prop: 'reentryTrackNamePosition.x', firstLevel: 'reentryTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
width: '150px', { prop: 'reentryTrackNamePosition.y', firstLevel: 'reentryTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
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: 'transferTrackName', { prop: 'transferTrackNamePosition', label: this.$t('map.transferTrackNamePosition'), type: 'coordinate', width: '150px', isHidden: !this.istransferTrackName, children: [
label: this.$t('map.transferTrackName'), { prop: 'transferTrackNamePosition.x', firstLevel: 'transferTrackNamePosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
type: 'input', { prop: 'transferTrackNamePosition.y', firstLevel: 'transferTrackNamePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
isHidden: !this.istransferTrackName ] }, //
}, // { 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: 'transferTrackNamePosition', { prop: 'destinationCodePoint.x', firstLevel: 'destinationCodePoint', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
label: this.$t('map.transferTrackNamePosition'), { prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
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: 'switchSection', { prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: !this.isRelevanceSwitchShow, disabled: true }, //
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: 'logicSectionShow', { prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', optionLabel: 'label', optionValue: 'value', isHidden: !this.isLogicSectionNameSort, radioList: [
label: this.$t('map.displayLogicalExtents'), { value: true, label: this.$t('map.fromSmallToLarge') },
type: 'checkbox', { value: false, label: this.$t('map.fromLargeToSmall') }
isHidden: !this.isSwitchSectionType ] }, // 1
}, // 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: 'logicSectionNameSort', { prop: 'leftAxlePosition', label: '左侧计轴:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.axlePositionList, isHidden: !this.hasAssociatedSection },
label: this.$t('map.logicSectionNameSort'), { prop: 'leftAxleOffset', label: '左侧计轴偏移:', type: 'coordinate', width: '150px', isHidden: !this.hasAssociatedSection, children: [
type: 'radio', { prop: 'leftAxleOffset.x', firstLevel: 'leftAxleOffset', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
optionLabel: 'label', { prop: 'leftAxleOffset.y', firstLevel: 'leftAxleOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
optionValue: 'value', ] },
isHidden: !this.isLogicSectionNameSort, { prop: 'rightAxlePosition', label: '右侧计轴:', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.axlePositionList, isHidden: !this.hasAssociatedSection },
radioList: [ { prop: 'rightAxleOffset', label: '右侧计轴偏移:', type: 'coordinate', width: '150px', isHidden: !this.hasAssociatedSection, children: [
{ { prop: 'rightAxleOffset.x', firstLevel: 'rightAxleOffset', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
value: true, { prop: 'rightAxleOffset.y', firstLevel: 'rightAxleOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
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: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ 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: 'stationCode', { 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 },
label: this.$t('map.equipmentStation') + ':', { prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), isHidden: !this.isSwitchSectionType },
type: 'select', { prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, //
mode: true, { prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, //
optionLabel: 'name&&code', { prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
optionValue: 'code', { prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow },
disabled: this.isStationCodeDisabled, { prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
options: this.centralizedStationList, { prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') }
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')
}
] ]
} }
} }
@ -854,11 +413,7 @@ export default {
return this.editModel.type == '01' && this.editModel.standTrack; return this.editModel.type == '01' && this.editModel.standTrack;
}, },
isreentryTrackName() { isreentryTrackName() {
return ( return this.editModel.type != '02' && this.editModel.type != '03' && this.editModel.reentryTrack;
this.editModel.type != '02' &&
this.editModel.type != '03' &&
this.editModel.reentryTrack
);
}, },
istransferTrackName() { istransferTrackName() {
return this.editModel.type == '01' && this.editModel.transferTrack; return this.editModel.type == '01' && this.editModel.transferTrack;
@ -867,26 +422,13 @@ export default {
return this.editModel.type == '01' && !this.editModel.reentryTrack; return this.editModel.type == '01' && !this.editModel.reentryTrack;
}, },
isReentryTrackShow() { isReentryTrackShow() {
return ( return this.editModel.type != '02' && this.editModel.type != '03' && !this.editModel.transferTrack;
this.editModel.type != '02' &&
this.editModel.type != '03' &&
!this.editModel.transferTrack
);
}, },
isdestinationCode() { isdestinationCode() {
return ( return this.editModel.type != '02' && this.editModel.type != '03' && (this.editModel.reentryTrack || this.editModel.transferTrack);
this.editModel.type != '02' &&
this.editModel.type != '03' &&
(this.editModel.reentryTrack || this.editModel.transferTrack)
);
}, },
isStopPointOffset() { isStopPointOffset() {
return ( return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack);
this.editModel.type !== '04' &&
(this.editModel.reentryTrack ||
this.editModel.standTrack ||
this.editModel.transferTrack)
);
}, },
isLeftSectionButtonShow() { isLeftSectionButtonShow() {
@ -910,15 +452,10 @@ export default {
} }
}, },
watch: { watch: {
// '$store.state.menuOperation.mapDrawSelectCount': function(val) {
// this.deviceSelect(this.selected);
// },
activeName(val) { activeName(val) {
if (val === 'four') { if (val == 'four') {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.logicBlock.computedLogicSectionNumList( this.$refs.logicBlock.computedLogicSectionNumList(this.editModel.logicSectionCodeList);
this.editModel.logicSectionCodeList
);
}); });
} }
} }
@ -944,10 +481,7 @@ export default {
}, },
deviceSelect(selected) { deviceSelect(selected) {
// //
if ( if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
selected &&
selected._type.toUpperCase() === 'Section'.toUpperCase()
) {
if (this.field === 'leftSection') { if (this.field === 'leftSection') {
if (selected.type === '01' || selected.type === '03') { if (selected.type === '01' || selected.type === '03') {
this.editModel.leftSectionCode = selected.code; this.editModel.leftSectionCode = selected.code;
@ -968,76 +502,46 @@ export default {
this.clear(); this.clear();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.editModel.points = JSON.parse( this.editModel.points = JSON.parse(JSON.stringify(selected.points));
JSON.stringify(selected.points)
);
this.editModel.lengthFact = selected.lengthFact || 0; // this.editModel.lengthFact = selected.lengthFact || 0; //
this.oldPoint = JSON.parse(JSON.stringify(selected.points)); this.oldPoint = JSON.parse(JSON.stringify(selected.points));
this.oldLeftSectionCode = selected.leftSectionCode; this.oldLeftSectionCode = selected.leftSectionCode;
this.oldRightSectionCode = selected.rightSectionCode; this.oldRightSectionCode = selected.rightSectionCode;
this.editModel.leftAxlePosition = this.editModel.leftAxlePosition = selected.leftAxlePosition || 0; //
selected.leftAxlePosition || 0; // this.editModel.rightAxlePosition = selected.rightAxlePosition || 0; //
this.editModel.rightAxlePosition =
selected.rightAxlePosition || 0; //
this.editModel.belongStation = selected.belongStation || ''; this.editModel.belongStation = selected.belongStation || '';
if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) { if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) {
this.$refs.splitOrMerge.addModel.splitOffsetMax = Math.sqrt( this.$refs.splitOrMerge.addModel.splitOffsetMax = Math.sqrt(new JTriangle(selected.points[0], selected.points[selected.points.length - 1]).abspowz);
new JTriangle( this.$refs.splitOrMerge.addModel.splitOffset = this.$refs.splitOrMerge.addModel.splitOffsetMax / 2;
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.$refs.splitOrMerge.addModel.code = selected.code;
this.activeName = 'three'; this.activeName = 'three';
this.field = ''; this.field = '';
this.$emit('fieldSelect', ''); this.$emit('fieldSelect', '');
} else if ( } else if (this.field.toUpperCase() === 'leftSectionCode'.toUpperCase()) {
this.field.toUpperCase() === 'leftSectionCode'.toUpperCase() this.$refs.splitOrMerge.mergeModel.lsectioncode = selected.code;
) {
this.$refs.splitOrMerge.mergeModel.lsectioncode =
selected.code;
this.activeName = 'three'; this.activeName = 'three';
this.field = ''; this.field = '';
this.$emit('fieldSelect', ''); this.$emit('fieldSelect', '');
} else if ( } else if (this.field.toUpperCase() === 'rightSectionCode'.toUpperCase()) {
this.field.toUpperCase() === this.$refs.splitOrMerge.mergeModel.rsectioncode = selected.code;
'rightSectionCode'.toUpperCase()
) {
this.$refs.splitOrMerge.mergeModel.rsectioncode =
selected.code;
this.activeName = 'three'; this.activeName = 'three';
this.field = ''; this.field = '';
this.$emit('fieldSelect', ''); this.$emit('fieldSelect', '');
} else if ( } else if (this.field.toUpperCase() === 'getSectionStart'.toUpperCase()) {
this.field.toUpperCase() === 'getSectionStart'.toUpperCase() this.$refs.create.createModel.leftSectionCode = selected.code;
) {
this.$refs.create.createModel.leftSectionCode =
selected.code;
this.activeName = 'second'; this.activeName = 'second';
this.field = ''; this.field = '';
this.$emit('fieldSelect', ''); this.$emit('fieldSelect', '');
} else if ( } else if (this.field.toUpperCase() === 'getSectionEnd'.toUpperCase()) {
this.field.toUpperCase() === 'getSectionEnd'.toUpperCase() this.$refs.create.createModel.rightSectionCode = selected.code;
) {
this.$refs.create.createModel.rightSectionCode =
selected.code;
this.activeName = 'second'; this.activeName = 'second';
this.field = ''; this.field = '';
this.$emit('fieldSelect', ''); this.$emit('fieldSelect', '');
} else if ( } else if (this.field.toUpperCase() === 'sectionTypeCode'.toUpperCase()) {
this.field.toUpperCase() === 'sectionTypeCode'.toUpperCase() this.$refs.batchSettings.formModel.modelList.push(selected.code);
) {
this.$refs.batchSettings.formModel.modelList.push(
selected.code
);
this.activeName = 'five'; this.activeName = 'five';
} else if ( } else if (this.field.toUpperCase() === 'sectionRoadCode'.toUpperCase()) {
this.field.toUpperCase() === 'sectionRoadCode'.toUpperCase() this.$refs.batchSettings.roadModel.sectionCode = selected.code;
) {
this.$refs.batchSettings.roadModel.sectionCode =
selected.code;
this.activeName = 'five'; this.activeName = 'five';
} }
} }
@ -1103,9 +607,7 @@ export default {
if (copySection.code === model.leftSectionCode) { if (copySection.code === model.leftSectionCode) {
copySection.rightSectionCode = model.code; copySection.rightSectionCode = model.code;
updataFlag = true; updataFlag = true;
} else if ( } else if (copySection.code === this.oldLeftSectionCode) {
copySection.code === this.oldLeftSectionCode
) {
copySection.rightSectionCode = ''; copySection.rightSectionCode = '';
updataFlag = true; updataFlag = true;
} }
@ -1114,9 +616,7 @@ export default {
if (copySection.code === model.rightSectionCode) { if (copySection.code === model.rightSectionCode) {
copySection.leftSectionCode = model.code; copySection.leftSectionCode = model.code;
updataFlag = true; updataFlag = true;
} else if ( } else if (copySection.code === this.oldRightSectionCode) {
copySection.code === this.oldRightSectionCode
) {
copySection.leftSectionCode = ''; copySection.leftSectionCode = '';
updataFlag = true; updataFlag = true;
} }
@ -1137,20 +637,10 @@ export default {
} }
updataFlag = true; updataFlag = true;
} }
if ( if (this.checkPointsCoincide(this.oldPoint[0], section.points[section.points.length - 1])) {
this.checkPointsCoincide(
this.oldPoint[0],
section.points[section.points.length - 1]
)
) {
pointModel.push(copySection); pointModel.push(copySection);
} }
if ( if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], section.points[0])) {
this.checkPointsCoincide(
this.oldPoint[this.oldPoint.length - 1],
section.points[0]
)
) {
pointModel.push(copySection); pointModel.push(copySection);
} }
if (updataFlag) { if (updataFlag) {
@ -1159,39 +649,17 @@ export default {
} }
}); });
pointModel.forEach(item => { pointModel.forEach(item => {
const slope2 = const slope2 = (item.points[item.points.length - 1].y - item.points[0].y) / (item.points[item.points.length - 1].x - item.points[0].x);
(item.points[item.points.length - 1].y - item.points[0].y) / if (this.checkPointsCoincide(this.oldPoint[0], item.points[item.points.length - 1])) {
(item.points[item.points.length - 1].x - item.points[0].x); if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) {
if ( item.points[item.points.length - 1].x = model.points[0].x;
this.checkPointsCoincide( item.points[item.points.length - 1].y = model.points[0].y;
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 ( if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], item.points[0])) {
this.checkPointsCoincide( if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) {
this.oldPoint[this.oldPoint.length - 1], item.points[0].x = model.points[model.points.length - 1].x;
item.points[0] item.points[0].y = model.points[model.points.length - 1].y;
)
) {
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); models.push(item);
@ -1202,10 +670,7 @@ export default {
getSectionByCode(code) { getSectionByCode(code) {
// sectionCode section // sectionCode section
if (code) { if (code) {
const section = deepAssign( const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](code) || {});
{},
this.$store.getters['map/getDeviceByCode'](code) || {}
);
if (JSON.stringify(section) !== '{}') { if (JSON.stringify(section) !== '{}') {
return section; return section;
} }
@ -1219,48 +684,30 @@ export default {
// //
deleteObj() { deleteObj() {
let models = []; let models = [];
const selected = this.$store.getters['map/getDeviceByCode']( const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
this.editModel.code if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
); this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
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'), confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
} }).then(() => {
)
.then(() => {
models.push(deepAssign(selected, { _dispose: true })); models.push(deepAssign(selected, { _dispose: true }));
const deleteObjAssociatedSection = this.handleDeleteSectionAssociatedSection( const deleteObjAssociatedSection = this.handleDeleteSectionAssociatedSection(selected);
selected
);
models = [...models, ...deleteObjAssociatedSection]; models = [...models, ...deleteObjAssociatedSection];
_that.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
this.clear(); this.clear();
_that.deviceSelect(); this.deviceSelect();
}) }).catch(error => {
.catch(error => {
console.log(error); console.log(error);
_that.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));
}); });
} }
}, },
// //
handleDeleteSectionAssociatedSection(selected) { handleDeleteSectionAssociatedSection(selected) {
const models = []; const models = [];
const delLeftSection = this.getSectionByCode( const delLeftSection = this.getSectionByCode(selected.leftSectionCode);
selected.leftSectionCode const delRightSection = this.getSectionByCode(selected.rightSectionCode);
);
const delRightSection = this.getSectionByCode(
selected.rightSectionCode
);
if (delLeftSection) { if (delLeftSection) {
delLeftSection.rightSectionCode = ''; delLeftSection.rightSectionCode = '';
models.push(delLeftSection); models.push(delLeftSection);
@ -1280,23 +727,7 @@ export default {
}, },
checkSectionPointsHasCoincide(points1, points2) { checkSectionPointsHasCoincide(points1, points2) {
// //
return ( 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])));
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) { tipInfoHandle(list) {
if (list.length) { if (list.length) {
@ -1322,7 +753,6 @@ export default {
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.coordinate { .coordinate {
overflow: hidden; overflow: hidden;
.title { .title {
text-align: right; text-align: right;
font-size: 14px; font-size: 14px;

View File

@ -2,24 +2,6 @@
<div style="height:100%"> <div style="height:100%">
<div style="height: calc(100% - 46px);"> <div style="height: calc(100% - 46px);">
<el-scrollbar wrap-class="scrollbar-wrapper"> <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 ref="showDelimiter" label-width="180px" size="mini">
<el-form-item label="逻辑区段数量"> <el-form-item label="逻辑区段数量">
<el-input-number v-model="logicNum" :min="0" /> <el-input-number v-model="logicNum" :min="0" />
@ -48,12 +30,6 @@ import { mapGetters } from 'vuex';
export default { export default {
name: 'LogicBlock', name: 'LogicBlock',
props: { props: {
selected: {
type: Object,
default() {
return {};
}
},
editModel:{ editModel:{
type:Object, type:Object,
default() { default() {

View File

@ -351,7 +351,7 @@ export default {
relSwitchCode: '', relSwitchCode: '',
relevanceSectionList: elem.relevanceSectionList, relevanceSectionList: elem.relevanceSectionList,
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }], points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
logicSectionNum: [0], logicSectionNum: 0,
logicSectionShow: false, logicSectionShow: false,
sepTypeLeft: '00', sepTypeLeft: '00',
offsetLeft: 0, offsetLeft: 0,

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="joylink-card"> <div class="joylink-card">
<div class="runPlanHeader" style="width: 90%;margin-left:5%;margin-top:40px;display: inline-block;"> <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> <el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
</div> </div>
<!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />--> <!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />-->

View 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>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="joylink-card"> <div class="joylink-card">
<div class="scriptHeader"> <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> <el-button size="small" type="primary" class="createScript" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
</div> </div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />

View File

@ -8,12 +8,20 @@
<el-card v-loading="loading"> <el-card v-loading="loading">
<el-table :data="tableData" border style="width: 100%"> <el-table :data="tableData" border style="width: 100%">
<el-table-column prop="name" :label="this.$t('teach.courseName')" /> <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 prop="remarks" show-overflow-tooltip :label="this.$t('teach.courseDescription')" />
<el-table-column :label="this.$t('global.operate')"> <el-table-column :label="this.$t('global.operate')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="goLesson(scope.row)"> <el-button size="mini" type="primary" @click="goLesson(scope.row)">
{{ $t('teach.enterTheCourse') }} {{ $t('teach.enterTheCourse') }}
</el-button> </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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -24,6 +32,9 @@
<script> <script>
import { getSubSystemDetail } from '@/api/trainingPlatform'; import { getSubSystemDetail } from '@/api/trainingPlatform';
import { UrlConfig } from '@/scripts/ConstDic'; 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'; import localStore from 'storejs';
export default { export default {
@ -31,7 +42,10 @@ export default {
data() { data() {
return { return {
tableData: [], tableData: [],
loading: false loading: false,
project: '',
isTeacher: false,
userId: ''
}; };
}, },
watch: { watch: {
@ -41,6 +55,9 @@ export default {
}, },
mounted() { mounted() {
this.loadInitPage(); this.loadInitPage();
this.project = getSessionStorage('project');
this.isTeacher = this.$store.state.user.roles.includes(lessonCreater);
this.userId = this.$store.state.user.id;
}, },
methods: { methods: {
loadInitPage() { loadInitPage() {
@ -66,6 +83,21 @@ export default {
goLesson(row) { 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}`); 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}}); 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(() => { });
} }
} }
}; };

View File

@ -30,10 +30,11 @@ module.exports = {
assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录 assetsDir: 'static', // 相对于outputDir的静态资源(js、css、img、fonts)目录
lintOnSave: false, lintOnSave: false,
// filenameHashing: true, // filenameHashing: true,
productionSourceMap: false, productionSourceMap: false, // 项目打包后是否压缩
devServer: { devServer: {
port: port, port: port,
// open: true, // open: true,
hotOnly: true,
overlay: { overlay: {
warnings: false, warnings: false,
errors: true errors: true