确认
@@ -62,40 +62,39 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
- props: {
- initCacheMap: {
- type: Object,
- default() {
- return {}
- }
- },
- initInfo: {
- type: Object,
- default() {
- return {}
- }
- },
- updateDone: {
- type: Number,
- default: 0
- }
- },
components: {
NoticeInfo
},
+ props: {
+ initCacheMap: {
+ type: Object,
+ default() {
+ return {};
+ }
+ },
+ initInfo: {
+ type: Object,
+ default() {
+ return {};
+ }
+ },
+ updateDone: {
+ type: Number,
+ default: 0
+ }
+ },
data() {
return {
- title: '',
status: false,
standStatus: true,
allChecked: false,
dialogShow: false,
loading: false,
command: true,
- sure: false,
- currentSelect: null,
- noInit: true,
- changeIgnore: false
+ sure: false,
+ currentSelect: null,
+ noInit: true,
+ changeIgnore: false
};
},
computed: {
@@ -105,20 +104,20 @@ export default {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
- tempList() {
- return this.signalList;
- },
- initSelect() {
- return this.initInfo.initSelect||{};
- },
- cmdType() {
- return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
- },
- disabled() {
- return !this.currentSelect || !this.currentSelect.callOn || this.noInit;
- },
- domIdChoose() {
- return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
+ tempList() {
+ return this.signalList;
+ },
+ initSelect() {
+ return this.initInfo.initSelect || {};
+ },
+ cmdType() {
+ return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
+ },
+ disabled() {
+ return !this.currentSelect || !this.currentSelect.callOn || this.noInit;
+ },
+ domIdChoose() {
+ return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
@@ -128,7 +127,10 @@ export default {
},
domIdApply() {
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
- }
+ },
+ title() {
+ return this.sure ? '确认/取消引导' : '初始化引导';
+ }
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
@@ -136,76 +138,89 @@ export default {
this.commit();
}
},
- updateDone() {
- if (this.currentSelect) {
- this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code]||{}).done != 'one';
- }
- }
+ updateDone() {
+ if (this.currentSelect) {
+ this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
+ }
+ }
},
methods: {
- getCacheMap() {
- return this.initCacheMap[this.cmdType.value]||{};
- },
+ getCacheMap() {
+ return this.initCacheMap[this.cmdType.value] || {};
+ },
doShow(operate, sure) {
this.operate = operate;
- this.sure = sure;
- if (!sure) this.command = true;
- this.title = `${sure? '确认/取消引导': '初始化引导'}`;
+ this.sure = sure;
+ if (!sure) this.command = true;
- this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
+ this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
this.dialogShow = true;
this.$nextTick(function () {
- this.changeIgnore = sure;
- this.$refs.table.setCurrentRow(sure? this.tempList.find(el => el.code == this.initSelect.code): null);
+ this.changeIgnore = sure;
+ this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
this.$store.dispatch('training/emitTipFresh');
});
},
+ rightClickShow(operate, sure, selected) {
+ this.operate = operate;
+ this.sure = sure;
+ if (!sure) this.command = true;
+ this.currentSelect = this.$store.getters['map/getDeviceByCode'](selected.code);
+ console.log(this.currentSelect, '==========', this.currentSelect.callOn, this.noInit);
+ this.dialogShow = true;
+ this.$nextTick(function () {
+ this.changeIgnore = sure;
+ this.$refs.table.setCurrentRow(this.tempList.find(el => el.code == selected.code));
+ this.$store.dispatch('training/emitTipFresh');
+ this.$emit('updateDone');
+ });
+ },
doClose() {
this.loading = false;
this.dialogShow = false;
- this.sure && (this.currentSelect = null);
+ this.sure && (this.currentSelect = null);
this.sure && this.$refs.table.setCurrentRow();
- this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
- Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
- )
+ this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
+ Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
+ );
this.$store.dispatch('training/emitTipFresh');
},
commit(isClose = false) {
- if (this.currentSelect &&
+ if (this.currentSelect &&
this.currentSelect.code == this.initSelect.code) {
- const cacheMap= this.getCacheMap();
- const isOK = this.command&&(!this.sure || this.sure&&cacheMap[this.currentSelect.code])
- const operate = {
- cmdType: this.sure&&isOK? this.cmdType: null,
- operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
- over: this.sure,
- param: {signalCode: this.currentSelect.code}
- };
+ const cacheMap = this.getCacheMap();
+ const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
+ const operate = {
+ cmdType: this.sure && isOK ? this.cmdType : null,
+ operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
+ over: this.sure,
+ param: {signalCode: this.currentSelect.code}
+ };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- if (isOK) {
- this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure? 'two': 'one'});
- } else {
- this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
- }
- this.$emit('updateDone')
- this.$store.dispatch('map/flushMapRef');
- isClose && this.doClose();
- }
- }).catch(() => {
- isClose && this.doClose();
- this.$refs.noticeInfo.doShow();
- });
- } else {
- this.$messageBox('两次选择不一致');
- }
+ this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
+ if (valid) {
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ if (isOK) {
+ this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure ? 'two' : 'one'});
+ } else {
+ this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
+ }
+ this.$emit('updateDone');
+ this.$store.dispatch('map/flushMapRef');
+ isClose && this.doClose();
+ }
+ }).catch(() => {
+ isClose && this.doClose();
+ this.$refs.noticeInfo.doShow();
+ });
+ } else {
+ this.$messageBox('两次选择不一致');
+ }
},
- handleCurrentChange(val) {
- if (!val) { return; }
- this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
- this.$emit('updateDone')
+ handleCurrentChange(val) {
+ if (!val) { return; }
+ this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
+ this.$emit('updateDone');
if (this.changeIgnore) { return; }
const step = {
@@ -214,12 +229,12 @@ export default {
val: val.code
};
- this.changeIgnore = false;
- this.$emit('updateDone')
+ this.changeIgnore = false;
+ this.$emit('updateDone');
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.sure || this.$emit('initSelect', this.currentSelect);
+ this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
+ this.sure || this.$emit('initSelect', this.currentSelect);
}
}).catch(_ => {
this.$refs.noticeInfo.doShow();
@@ -241,19 +256,19 @@ export default {
},
getCanGuide(code) {
const elem = this.$store.getters['map/getDeviceByCode'](code);
- return elem.callOn ? '是': '否';
+ return elem.callOn ? '是' : '否';
},
getProcess(code) {
- const cacheMap = this.getCacheMap();
- const cache = cacheMap[code];
- if (cache) {
- if (this.sure) {
- return cache.done == 'two' ? '确认引导完成' : '等待确认/取消';
- } else {
- return cache.done == 'one' ? '已初始化' : ''
- }
- }
- return '';
+ const cacheMap = this.getCacheMap();
+ const cache = cacheMap[code];
+ if (cache) {
+ if (this.sure) {
+ return cache.done == 'two' ? '确认引导完成' : '等待确认/取消';
+ } else {
+ return cache.done == 'one' ? '已初始化' : '';
+ }
+ }
+ return '';
},
cancel() {
const operate = {
diff --git a/src/jmapNew/theme/ningbo_03/menus/menuSignal.vue b/src/jmapNew/theme/ningbo_03/menus/menuSignal.vue
index 4c0451380..5c962eb6e 100644
--- a/src/jmapNew/theme/ningbo_03/menus/menuSignal.vue
+++ b/src/jmapNew/theme/ningbo_03/menus/menuSignal.vue
@@ -1,36 +1,31 @@
+
diff --git a/src/views/newMap/displayCity/demon/equipment.vue b/src/views/newMap/displayCity/demon/equipment.vue
new file mode 100644
index 000000000..781517835
--- /dev/null
+++ b/src/views/newMap/displayCity/demon/equipment.vue
@@ -0,0 +1,196 @@
+
+
+
+
+
名称: {{ plcInfo.name }}
+
状态: {{ plcInfo.status ? '在线' : '不在线' }}
+
刷新
+
+
+
+
+
+
+ {{ scope.row.vrDeviceName }}
+ (空)
+
+
+
+
+ 连接
+ 断开
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/demon/faultChoose.vue b/src/views/newMap/displayCity/demon/faultChoose.vue
new file mode 100644
index 000000000..23c550f25
--- /dev/null
+++ b/src/views/newMap/displayCity/demon/faultChoose.vue
@@ -0,0 +1,600 @@
+
+
+
{{ title }}
+
+
+
+
+ {{ isTableShow?'隐藏列表':'显示列表' }}
+
+
+
+ {{ `${deviceMap[scope.row.targetDeviceType]}${formatNameByCode(scope.row.targetDeviceCode)}` }}
+
+
+
+
+ {{ covertFaultType(scope.row) }}
+
+
+
+
+ {{ `${deviceMap[scope.row.condition.triggerDeviceType] || ''}${formatNameByCode(scope.row.condition.triggerDeviceCode)}` }}
+
+
+
+
+ {{ `${formatNameByCode(scope.row.condition.triggerAssociatedDeviceCode)}` }}
+
+
+
+
+
+ {{ scope.row.triggeringTime? '已触发': '未触发' }}
+
+
+
+
+ 取消
+
+
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('map.activate') }}
+
+
+
+ {{ $t('map.activate') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/demon/setTime.vue b/src/views/newMap/displayCity/demon/setTime.vue
new file mode 100644
index 000000000..d64695573
--- /dev/null
+++ b/src/views/newMap/displayCity/demon/setTime.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+ {{ ` (${$t('display.setTime.maxTrainNum')} :${maxNumber}) ` }}
+
+
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/demonMenu.vue b/src/views/newMap/displayCity/demonMenu.vue
new file mode 100644
index 000000000..ba458b3c1
--- /dev/null
+++ b/src/views/newMap/displayCity/demonMenu.vue
@@ -0,0 +1,190 @@
+
+
+
+
菜单
+
+ {{ jl3dmodel }}
+
+
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/index.vue b/src/views/newMap/displayCity/index.vue
new file mode 100644
index 000000000..bd400d64c
--- /dev/null
+++ b/src/views/newMap/displayCity/index.vue
@@ -0,0 +1,307 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/menuDemon.vue b/src/views/newMap/displayCity/menuDemon.vue
new file mode 100644
index 000000000..ee68d16b5
--- /dev/null
+++ b/src/views/newMap/displayCity/menuDemon.vue
@@ -0,0 +1,306 @@
+
+
+
+
+
+
+
+
+
+
+ {{ $t('display.demon.initialize') }}
+
+
+ {{ projectDevice?'退出':$t('display.demon.back') }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/menuSchema.vue b/src/views/newMap/displayCity/menuSchema.vue
new file mode 100644
index 000000000..f0583b583
--- /dev/null
+++ b/src/views/newMap/displayCity/menuSchema.vue
@@ -0,0 +1,111 @@
+
+
+ {{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/menuSystemTime.vue b/src/views/newMap/displayCity/menuSystemTime.vue
new file mode 100644
index 000000000..06d4b7486
--- /dev/null
+++ b/src/views/newMap/displayCity/menuSystemTime.vue
@@ -0,0 +1,154 @@
+
+
+
+ {{ $t('display.systemTime.timePause') }}
+
+
+
+
+
{{ dateString }}
+
{{ dayString }}
+
+
+
+
+
+
diff --git a/src/views/newMap/displayCity/utils.js b/src/views/newMap/displayCity/utils.js
new file mode 100644
index 000000000..6b99aee0b
--- /dev/null
+++ b/src/views/newMap/displayCity/utils.js
@@ -0,0 +1,58 @@
+import ConstConfig from '@/scripts/ConstConfig';
+import Cookies from 'js-cookie';
+import store from '@/store/index';
+export function covertMemberData (activeTrainList, resp) {
+ let lastData = JSON.stringify(resp);
+ const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
+ 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);
+ const lastMemberList = [];
+ // const electricDispatcherList = [];
+ const deviceListData = [[], [], [], [], [], [], [], []];
+ const driverList = [];
+ lastData.forEach((member, index)=>{
+ if (member.userId && member.userId == store.state.user.id) {
+ member.disabled = true;
+ member.userName = store.state.user.nickname;
+ store.dispatch('training/setOrignalUserRoleId', member.id);
+ } else {
+ member.disabled = false;
+ }
+ const userName = member.userName ? '-' + member.userName : '';
+ const name = member.name ? '-' + member.name : '';
+ if (member.deviceCode) {
+ const device = store.getters['map/getDeviceByCode'](member.deviceCode);
+ member.deviceName = device.name || device.groupNumber;
+ member.label = member.type + member.deviceName + name + userName;
+ member.normalName = member.type + member.deviceName + name;
+ } else {
+ member.deviceName = '';
+ member.label = member.type + name + userName;
+ member.normalName = member.type + name;
+ }
+ const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼'];
+ const deviceTypeIndex = deviceType.indexOf(member.type);
+ if (deviceTypeIndex >= 0) {
+ if (deviceTypeIndex == 3) {
+ if (activeTrainList.length > 0) {
+ if (activeTrainList.includes(member.deviceCode)) {
+ deviceListData[deviceTypeIndex].push(member);
+ }
+ }
+ lastMemberList.push(member);
+ driverList.push(member);
+ } else {
+ deviceListData[deviceTypeIndex].push(member);
+ lastMemberList.push(member);
+ }
+ }
+ });
+ return {lastMemberList:lastMemberList, deviceListData:deviceListData, driverList:driverList};
+}
diff --git a/src/views/newMap/newMapdraft/mapoperate/index.vue b/src/views/newMap/newMapdraft/mapoperate/index.vue
index 0f7beb327..caf36b77c 100644
--- a/src/views/newMap/newMapdraft/mapoperate/index.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/index.vue
@@ -67,6 +67,7 @@ import Arrow from './arrow';
import SplitScreen from './splitScreen';
import FloodGate from './floodGate';
import DirectionRod from './directionRod';
+import SignalButton from './signalButton';
import { EventBus } from '@/scripts/event-bus';
export default {
@@ -97,7 +98,8 @@ export default {
Arrow,
SplitScreen,
FloodGate,
- DirectionRod
+ DirectionRod,
+ SignalButton
},
props: {
selected: {
@@ -138,7 +140,8 @@ export default {
{label: '站间分隔', name:'SplitStation', menus:SplitStation},
{label: '箭头', name:'Arrow', menus:Arrow},
{label: '防淹门', name: 'FloodGate', menus: FloodGate},
- {label: '方向杆', name: 'DirectionRod', menus: DirectionRod}
+ {label: '方向杆', name: 'DirectionRod', menus: DirectionRod},
+ {label: '信号按钮', name: 'SignalButton', menus: SignalButton }
],
selectDevice:'',
enabledTab: 'Section',
diff --git a/src/views/newMap/newMapdraft/mapoperate/signalButton.vue b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue
new file mode 100644
index 000000000..018a8c8ae
--- /dev/null
+++ b/src/views/newMap/newMapdraft/mapoperate/signalButton.vue
@@ -0,0 +1,299 @@
+
+
+
+
+
+
+
+
+
+
+
+
+