From 387ad98a90ecc5cf9b5ff1dbb0f0c38347508ec6 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 11 Nov 2020 16:59:58 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/drts/scene/modify.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index 0d1658d44..109969837 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -662,7 +662,7 @@ export default { getSummaries(param) { const { columns, data } = param; const sums = []; - columns.forEach((column, index) => { + columns && columns.forEach((column, index) => { if (index === 0) { sums[index] = '总分值'; return; @@ -674,8 +674,11 @@ export default { values.push(item.id); } }); + console.log(this.commandEvaluationRuleVOs); sums[index] = values.reduce((prev, curr) => { - const value = Number(this.commandEvaluationRuleVOs[curr].score); + console.log(curr, this.commandEvaluationRuleVOs[curr], '1111111111111111'); + let value = 0; + if (this.commandEvaluationRuleVOs[curr]) { value = Number(this.commandEvaluationRuleVOs[curr].score || 0); } if (!isNaN(value)) { return prev + value; } else { From 994433a3ba4a0a6fd4864d23614da806341204b6 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 11 Nov 2020 17:52:08 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=8C=87=E4=BB=A4=E5=AD=97=E5=85=B8=20?= =?UTF-8?q?=E5=A4=8D=E5=88=BB=E6=8C=87=E4=BB=A4=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/QueryListPage/DataForm.vue | 1 + .../system/commandDictionary/copyParam.vue | 49 +++++++++++++------ src/views/system/commandDictionary/index.vue | 14 +++--- 3 files changed, 41 insertions(+), 23 deletions(-) diff --git a/src/components/QueryListPage/DataForm.vue b/src/components/QueryListPage/DataForm.vue index f9edadf9c..f843a0365 100644 --- a/src/components/QueryListPage/DataForm.vue +++ b/src/components/QueryListPage/DataForm.vue @@ -183,6 +183,7 @@ :placeholder="item.placeholder" :disabled="item.disabled" multiple + @change="((val)=>{deviceChange(val, item)})" > { - if (item.value != lineCode) { - this.targetList.push(item); - } else { - this.formModel.fromCode = item.value; - this.formModel.fromName = item.label; - } - }); - } + this.targetList = []; + this.originList = []; + this.taskStatusList.forEach(item => { + this.targetList.push(item); + this.originList.push(item); + }); }, doSave() { this.$refs.dataform.validateForm(() => { @@ -93,6 +88,28 @@ export default { handleClose() { this.$refs.dataform.resetForm(); this.dialogVisible = false; + }, + originChange(fromCode) { + this.formModel.fromCode = fromCode; + this.formModel.targetIds = ''; + this.targetList = this.targetList.map(each=>{ + if (each.value == fromCode) { + each.disabled = true; + } else { + each.disabled = false; + } + return each; + }); + }, + targetChange(targetIds) { + this.originList = this.originList.map(each=>{ + if (targetIds.includes(each.value)) { + each.disabled = true; + } else { + each.disabled = false; + } + return each; + }); } } }; diff --git a/src/views/system/commandDictionary/index.vue b/src/views/system/commandDictionary/index.vue index f73039cd4..8ecaf1833 100644 --- a/src/views/system/commandDictionary/index.vue +++ b/src/views/system/commandDictionary/index.vue @@ -126,9 +126,7 @@ export default { { text: this.$t('global.add'), handler: this.handleAdd }, { text: '复刻', handler: this.handleCopyAll } ] - }, - - currentModel: {} + } }; }, mounted () { @@ -201,8 +199,8 @@ export default { cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { - const param = row; - createCommand(param).then(response => { + // const param = row; + createCommand(row).then(response => { this.$message.success('复制指令成功!'); }).catch(error => { console.log(error); @@ -212,13 +210,15 @@ export default { }, // 复制线路到其他线路 操作 handleCopyAll() { - this.$refs.copyParam.doShow(this.lineCode); + // this.lineCode = this.taskStatusList[0].value; + // this.lineCode + this.$refs.copyParam.doShow(); }, reloadTable() { this.queryList.reload(); }, convertField(list, status) { - console.log(list, typeof list, status); + // console.log(list, typeof list, status); if (list && list.length > 0) { return list.find(each=>{ return status == each.value; }).label; } } } From b8f26007e4c6a5b63b829d143c8adcc06839bf1b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 11 Nov 2020 18:40:02 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=BF=9E=E6=8C=82?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menus/dialog/setTrainOperation.vue | 33 ++++++++++--------- .../component/covertOperation.js | 8 ++--- src/views/system/commandDictionary/index.vue | 3 -- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue b/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue index fe6398a80..8200a2d2b 100644 --- a/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue +++ b/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue @@ -15,20 +15,21 @@ - - + + + + @@ -87,14 +88,14 @@ export default { loading: false, operation: '', formModel: { - groupNumber1: '', + groupNumber: '', groupNumber2: '' }, groupNumber: '', field: '', rules: { - faultType: [ - { required: true, message: '请选择故障类型', trigger: 'change'} + groupNumber2: [ + { required: true, message: '请选择被动车', trigger: 'change'} ] } }; @@ -154,6 +155,7 @@ export default { this.cmdType = operate.cmdType; } if (selected._type) { + this.formModel.groupNumber = selected.groupNumber; this.dialogShow = true; this.$nextTick(function () { this.$store.dispatch('training/emitTipFresh'); @@ -181,7 +183,7 @@ export default { operation: menuOperate.Common.setLink.operation, cmdType: menuOperate.Common.setLink.cmdType, param: { - groupNumber1: this.formModel.groupNumber1, + groupNumber: this.formModel.groupNumber, groupNumber2: this.formModel.groupNumber2 } }; @@ -196,12 +198,12 @@ export default { this.doClose(); } else { this.doClose(); - this.$messageBox('设置或取消故障操作失败!'); + this.$messageBox('设置连挂失败!'); } }).catch((error) => { this.loading = false; this.doClose(); - this.$messageBox(error.message || '设置或取消故障操作失败!'); + this.$messageBox(error.message || '设置连挂失败!'); }); }, @@ -219,10 +221,11 @@ export default { }); }, deviceSelect(em) { - if (this.field == 'selectedCode1' && em._type == 'Train') { - this.formModel.groupNumber1 = em.code; - this.field = ''; - } else if (this.field == 'selectedCode2' && em._type == 'Train') { + // if (this.field == 'selectedCode1' && em._type == 'Train') { + // this.formModel.groupNumber1 = em.code; + // this.field = ''; + // } else + if (this.field == 'selectedCode2' && em._type == 'Train') { this.formModel.groupNumber2 = em.code; this.field = ''; } diff --git a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js index b7f3e3ed0..6894e29d8 100644 --- a/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js +++ b/src/views/newMap/displayNew/scriptDisplay/component/covertOperation.js @@ -222,10 +222,10 @@ export const operateEnum = { Train_Link: { isList:true, params:[ - { - code:'groupNumber1', - name:'主动车' - }, + // { + // code:'groupNumber1', + // name:'主动车' + // }, { code:'groupNumber2', name:'被动车' diff --git a/src/views/system/commandDictionary/index.vue b/src/views/system/commandDictionary/index.vue index 8ecaf1833..dfc9cf762 100644 --- a/src/views/system/commandDictionary/index.vue +++ b/src/views/system/commandDictionary/index.vue @@ -210,15 +210,12 @@ export default { }, // 复制线路到其他线路 操作 handleCopyAll() { - // this.lineCode = this.taskStatusList[0].value; - // this.lineCode this.$refs.copyParam.doShow(); }, reloadTable() { this.queryList.reload(); }, convertField(list, status) { - // console.log(list, typeof list, status); if (list && list.length > 0) { return list.find(each=>{ return status == each.value; }).label; } } } From 1a7a6e27c7cf31d063b4849878573a8a4c0c1b62 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 11 Nov 2020 18:49:32 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=BF=9E=E6=8C=82=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue | 2 +- src/views/drts/scene/modify.vue | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue b/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue index 8200a2d2b..6589857a2 100644 --- a/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue +++ b/src/jmapNew/theme/components/menus/dialog/setTrainOperation.vue @@ -13,7 +13,7 @@
- + diff --git a/src/views/drts/scene/modify.vue b/src/views/drts/scene/modify.vue index 109969837..f54bebfd0 100644 --- a/src/views/drts/scene/modify.vue +++ b/src/views/drts/scene/modify.vue @@ -676,7 +676,6 @@ export default { }); console.log(this.commandEvaluationRuleVOs); sums[index] = values.reduce((prev, curr) => { - console.log(curr, this.commandEvaluationRuleVOs[curr], '1111111111111111'); let value = 0; if (this.commandEvaluationRuleVOs[curr]) { value = Number(this.commandEvaluationRuleVOs[curr].score || 0); } if (!isNaN(value)) { From 7e288934bc84437abf7f433299ed975f131c28e7 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 12 Nov 2020 09:04:37 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=BC=A0=E8=B5=9BIP=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue | 4 ++-- src/utils/baseUrl.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue index ae31fb36a..b9071cbfe 100644 --- a/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/foshan_01/menus/dialog/routeSelection.vue @@ -20,9 +20,9 @@ - - 允许选排 + + 允许选排 diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 4bb14fdb5..155cae30a 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -5,7 +5,7 @@ export function getBaseUrl() { BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 - // BASE_API = 'http://192.168.8.109:9000'; // 张赛 + // BASE_API = 'http://192.168.8.119:9000'; // 张赛 // BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 From 1d50db05102065f263aba49375294d14c340c41f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 12 Nov 2020 09:54:42 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E7=BA=BF=E8=B7=AF=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/commandDictionary/copyParam.vue | 1 - src/views/system/configLine/config.vue | 20 +-- src/views/system/configLine/edit.vue | 46 +++---- src/views/system/configLine/editConfig.vue | 119 ------------------ src/views/system/configLine/index.vue | 6 +- 5 files changed, 25 insertions(+), 167 deletions(-) delete mode 100644 src/views/system/configLine/editConfig.vue diff --git a/src/views/system/commandDictionary/copyParam.vue b/src/views/system/commandDictionary/copyParam.vue index 5b873a6f2..d6ab4c118 100644 --- a/src/views/system/commandDictionary/copyParam.vue +++ b/src/views/system/commandDictionary/copyParam.vue @@ -43,7 +43,6 @@ export default { const form = { labelWidth: '100px', items: [ - // type: 'text', disabled: true { prop: 'fromCode', label: '源线路', type: 'select', options: this.originList, change:true, onChange:this.originChange}, { prop: 'targetIds', label:'拷贝线路', type: 'select', options: this.targetList, multiple: true, deviceChange: this.targetChange }, { prop: 'deviceType', label: '操作对象', type: 'select', options: this.deviceTypeList, multiple: true } diff --git a/src/views/system/configLine/config.vue b/src/views/system/configLine/config.vue index cabcd67ce..1c4f1d42a 100644 --- a/src/views/system/configLine/config.vue +++ b/src/views/system/configLine/config.vue @@ -59,9 +59,6 @@ import { getRealLineConfigList, putRealLineConfig } from '@/api/management/mapline'; export default { name: 'Config', - components: { - // EditConfig - }, props: { type: { type: String, @@ -146,21 +143,21 @@ export default { let rangeStart = 0; let rangeEnd = 0; let options = []; - if (this.booleanList.indexOf(key) >= 0) { + if (this.booleanList.includes(key)) { type = 'boolean'; - } else if (this.selectList.indexOf(key) >= 0) { + } else if (this.selectList.includes(key)) { type = 'select'; options = this.optionsMap[key]; - } else if (this.numberList.indexOf(key) >= 0) { + } else if (this.numberList.includes(key)) { type = 'number'; - } else if (this.rangeList.indexOf(key) >= 0) { + } else if (this.rangeList.includes(key)) { type = 'range'; if (res.data[key]) { const ranges = res.data[key].split('-'); rangeStart = ranges[0]; rangeEnd = ranges[1]; } - } else if (this.speedList.indexOf(key) >= 0) { + } else if (this.speedList.includes(key)) { type = 'speed'; } else { type = 'input'; @@ -195,13 +192,6 @@ export default { this.dialogVisible = false; } }, - addModel() { - this.$refs.addConfig.show(); - }, - editModel(item, index) { - this.$refs.editConfig.show(item); - this.index = index; - }, save() { const param = {}; this.generalData.forEach(item => { diff --git a/src/views/system/configLine/edit.vue b/src/views/system/configLine/edit.vue index 39bc23891..9b13195b2 100644 --- a/src/views/system/configLine/edit.vue +++ b/src/views/system/configLine/edit.vue @@ -12,12 +12,6 @@ import { addSkinCode, updateSkinCode } from '@/api/management/mapline'; export default { name: 'DictionaryEdit', - props: { - type: { - type: String, - required: true - } - }, data() { return { dialogVisible: false, @@ -27,20 +21,21 @@ export default { name: '', origin: { x: 0, y: 0 }, scaling: 1 - } + }, + isAdd:false, + title:'' }; }, computed: { form() { - const isAdd = this.type === 'ADD'; const form = { labelWidth: '100px', items: [ - { prop: 'code', label: this.$t('system.code'), type: 'text', disabled: !isAdd }, + { prop: 'code', label: this.$t('system.code'), type: 'text', disabled: !this.isAdd }, { prop: 'name', label: this.$t('system.name'), type: 'text' }, { prop: 'origin', label: '坐标:', type: 'coordinate', children: [ - { prop: 'origin.x', firstLevel: 'origin', secondLevel: 'x', label: 'x', type: 'number', labelWidth: '20px'}, - { prop: 'origin.y', firstLevel: 'origin', secondLevel: 'y', label: 'y', type: 'number', labelWidth: '20px'} + { prop: 'origin.x', firstLevel: 'origin', secondLevel: 'x', label: 'x', type: 'number', labelWidth: '30px'}, + { prop: 'origin.y', firstLevel: 'origin', secondLevel: 'y', label: 'y', type: 'number', labelWidth: '30px'} ] }, { prop: 'scaling', label: '缩放比例:', type: 'number', min: 0.4, max: 8, step: 0.2 } ] @@ -49,6 +44,9 @@ export default { }, rules() { const crules = { + code: [ + { required: true, message: this.$t('rules.pleaseInputCode'), trigger: 'blur' } + ], name: [ { required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' } ], @@ -65,27 +63,11 @@ export default { { required: true, message: '请输入缩放比例', trigger: 'blur' } ] }; - if (this.type === 'ADD') { - return Object.assign(crules, { - code: [ - { required: true, message: this.$t('rules.pleaseInputCode'), trigger: 'blur' } - ] - }); - } else { - return crules; - } - }, - title() { - if (this.type === 'ADD') { - return this.$t('system.createDirectory'); - } else { - return this.$t('system.editDictionary'); - } + return crules; } }, methods: { show(row) { - this.dialogVisible = true; if (row && row.id) { this.formModel = { id: row.id, @@ -94,12 +76,18 @@ export default { origin: row.origin, scaling: row.scaling }; + this.isAdd = false; + this.title = this.$t('system.editDictionary'); + } else { + this.isAdd = true; + this.title = this.$t('system.createDirectory'); } + this.dialogVisible = true; }, doSave() { const self = this; this.$refs.dataform.validateForm(() => { - if (self.type === 'ADD') { + if (this.isAdd === 'ADD') { self.create(); } else { self.update(); diff --git a/src/views/system/configLine/editConfig.vue b/src/views/system/configLine/editConfig.vue deleted file mode 100644 index 755a2ba95..000000000 --- a/src/views/system/configLine/editConfig.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - diff --git a/src/views/system/configLine/index.vue b/src/views/system/configLine/index.vue index 8d862a96f..8d84c632c 100644 --- a/src/views/system/configLine/index.vue +++ b/src/views/system/configLine/index.vue @@ -1,8 +1,7 @@ @@ -106,7 +105,8 @@ export default { }, // 新增指令 handleAdd() { - this.$refs.create.show(); + this.$refs.edit.show(); + // this.$refs.create.show(); }, handleDelete(index, row) { this.$confirm(this.$t('system.wellDelType'), this.$t('global.tips'), { From fee759e83b75f2818b20890236cbeb41e9979b32 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 12 Nov 2020 10:21:37 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BC=9A=E8=AF=9D=20=E5=8F=91=E9=80=81?= =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/chatView/chatBox.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/chatView/chatBox.vue b/src/views/newMap/chatView/chatBox.vue index a80d955c3..2680eae04 100644 --- a/src/views/newMap/chatView/chatBox.vue +++ b/src/views/newMap/chatView/chatBox.vue @@ -673,7 +673,7 @@ export default { // this.$message.success('创建会话成功!'); this.createLoading = false; }).catch((error) => { - this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建仿真失败!'); + this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建会话失败:' + error.message); this.createLoading = false; }); } else { @@ -691,6 +691,7 @@ export default { }, // 语音录制开始 startRecording() { + this.audioPlay = true; const that = this; if (!this.recordSending) { if (!this.recordSending && !this.recorders && !this.microphone) { @@ -709,11 +710,13 @@ export default { }); that.recorders.startRecording(); that.recordSending = true; + that.audioPlay = false; that.inter = setInterval(() => { if (that.seconds < 60) { that.seconds++; } else { clearInterval(that.inter); + that.stopRecording(); } }, 1000); }, function (error) { @@ -769,6 +772,7 @@ export default { }, // 停止录制 发送语音 stopRecording() { + this.audioPlay = true; const that = this; this.recorders.stopRecording(function(blobURL) { clearInterval(that.inter); @@ -779,10 +783,12 @@ export default { sendSimulationConversition(that.group, that.conversitionId, fd) .then((data) => { that.textContent = ''; + that.audioPlay = false; }) .catch(error => { console.log(error); that.$message.error('语音发送失败: ' + error.message); + that.audioPlay = false; }); if (that.microphone) { that.microphone.stop(); From 19e42a4ec6c2b4ff183c35dd0986e3dd94cf2022 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 12 Nov 2020 13:33:09 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8C=97=E4=BA=A4?= =?UTF-8?q?=E5=A4=A7=E9=A1=B9=E7=9B=AE=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/ProjectConfig.js | 1 + .../newMap/jointTrainingNew/menuDemon.vue | 56 ++++++++++--------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index e10d7eb89..d18cab427 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -408,6 +408,7 @@ export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'd export const GenerateRouteProjectList = ['jsxt', 'refereeJsxt'];// 需要在公共路由中生成登录页面的项目 export const ProjectLoginStyleList = ['jsxt', 'refereeJsxt', 'gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd']; // 登录页样式 export const NoQrcodeList = ['heb', 'designheb']; +export const NoSimulationQrCodeList = ['heb', 'bjd']; export const goOtherPlatformMenu = { // 导航栏快速切换平台 login: '/design/login', design: '/login', diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index 42867cdb8..f6362b26d 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -7,22 +7,21 @@
菜单
- {{ $t('display.demon.deviceView') }} + {{ $t('display.demon.deviceView') }} - {{ jl3dname }} + {{ jl3dname }} {{ $t('display.demon.passengerflow') }} - {{ $t('display.demon.maintainer') }} + {{ $t('display.demon.maintainer') }} - 生成二维码 - 成员管理 - 设备管理 - 教学系统 - 考试系统 + 生成二维码 + 成员管理 + 设备管理 + 教学系统 + 考试系统
@@ -60,10 +59,9 @@ import { exitFullscreen } from '@/utils/screen'; import { getSimulationQrcode } from '@/api/jointSimulation'; import { getSessionStorage } from '@/utils/auth'; import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition'; -import { NoQrcodeList } from '@/scripts/ProjectConfig'; +import { NoSimulationQrCodeList } from '@/scripts/ProjectConfig'; import { getPublishLessonListByMapId } from '@/api/jmap/lesson'; import localStore from 'storejs'; -import { OperateMode } from '@/scripts/ConstDic'; export default { name: 'MenuDemonJoint', @@ -119,12 +117,11 @@ export default { chatShow: true, jsStart: true, isGoback: false, - noQrcodeList: NoQrcodeList, + noSimulationQrCodeList: NoSimulationQrCodeList, isShow3dmodel :false, jl3dname: this.$t('display.demon.threeDimensionalView'), hoverBtn: false, - btnWidth: 0, - faultMode: false + btnWidth: 0 }; }, computed: { @@ -155,7 +152,7 @@ export default { if ((this.isShow3dmodel && this.isShowScheduling) || (this.isShowScheduling || this.isDriver) || (this.isShowScheduling || this.isStationSupervisor) || - (this.isAdmin && !this.noQrcodeList.includes(this.project)) || + (this.isAdmin && !this.noSimulationQrCodeList.includes(this.project)) || (this.isAdmin) || (this.isAdmin && this.isProject) || this.isDeviceLogin || this.$route.query.type === 'IM') { num++; } @@ -165,6 +162,23 @@ export default { const typeList = ['LW', 'CW']; return typeList.includes(this.$route.query.type); }, + examSystemShow() { + const typeList = ['LW', 'CW', 'IM']; + return typeList.includes(this.$route.query.type); + }, + teachSystemShow() { + const typeList = ['LW', 'CW']; + return typeList.includes(this.$route.query.type); + }, + memberManageShow() { + return this.isAdmin && this.$route.query.type !== 'ILW' && this.project !== 'bjd'; + }, + deviceManageShow() { + return (this.isAdmin && this.isProject && this.project !== 'bjd') || this.$route.query.type === 'ILW'; + }, + qrCodeShow() { + return this.isAdmin && !this.noSimulationQrCodeList.includes(this.project) && this.$route.query.type !== 'ILW'; + }, isDisable() { return this.$store.state.training.started; }, @@ -503,14 +517,6 @@ export default { }); } }, - changeOperateMode() { - this.faultMode = !this.faultMode; - let mode = OperateMode.NORMAL; - if (this.faultMode) { - mode = OperateMode.FAULT; - } - this.$store.dispatch('training/changeOperateMode', { mode: mode }); - }, loadRunPlan() { this.$emit('runPlanLoadShow'); }, From d0421ff9fe5b5fdafda35079fe371ef2da992372 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 12 Nov 2020 14:06:13 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chengdu_03/menus/menuDialog/viewName.vue | 26 +++++++++---------- src/views/publish/publishMap/index.vue | 4 +-- src/views/publish/runPlanCommon/index.vue | 2 +- src/views/publish/runPlanEveryDay/index.vue | 2 +- src/views/publish/runPlanTemplate/index.vue | 2 +- src/views/scriptManage/allScriptRole.vue | 2 +- src/views/scriptManage/home.vue | 2 +- src/views/teach/detail/index.vue | 2 +- src/views/trainingPlatform/demonList.vue | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/menuDialog/viewName.vue b/src/jmapNew/theme/chengdu_03/menus/menuDialog/viewName.vue index e76393b55..01e9d5f65 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuDialog/viewName.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuDialog/viewName.vue @@ -159,7 +159,7 @@ export default { const deviceList = []; // 信号机 - let nameShow = this.nameLevels.indexOf(1) !== -1; + let nameShow = this.nameLevels.includes(1); const signalList = this.$store.getters['map/signalList']; if (signalList && signalList.length > 0) { signalList.forEach(elem => { @@ -168,11 +168,11 @@ export default { } // 按钮名称 - nameShow = this.nameLevels.indexOf(3) !== -1; + nameShow = this.nameLevels.includes(3); // 道岔 - nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称 - const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称 + nameShow = this.nameLevels.includes(7); // 道岔名称 + const switchSectionNameShow = this.nameLevels.includes(9); // 道岔轨名称 const switchList = this.$store.getters['map/switchList']; if (switchList && switchList.length > 0) { switchList.forEach(elem => { @@ -181,7 +181,7 @@ export default { } // 控制模式 - const indicatorShow = this.nameLevels.indexOf(8) !== -1; + const indicatorShow = this.nameLevels.includes(8); const control = this.$store.getters['map/stationControlList']; if (control && control.length > 0) { control.forEach(elem => { @@ -204,28 +204,28 @@ export default { nameShow = false; } else if (elem.type === '01') { // 计轴区段名称 - nameShow = this.nameLevels.indexOf(11) !== -1; + nameShow = this.nameLevels.includes(11); } else if (elem.type === '02') { // 轨道轨名称 - nameShow = this.nameLevels.indexOf(5) !== -1; + nameShow = this.nameLevels.includes(5); } else if (elem.type === '04') { // 道岔区段名称 - nameShow = this.nameLevels.indexOf(9) !== -1; + nameShow = this.nameLevels.includes(9); } // 站台轨名称 if (elem.standTrack) { - standTrackNameShow = this.nameLevels.indexOf(2) !== -1; + standTrackNameShow = this.nameLevels.includes(2); } // 折返轨名称 if (elem.reentryTrack) { - reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1; + reentryTrackNameShow = this.nameLevels.includes(4); } // 转换轨名称 if (elem.transferTrack) { - transferTrackNameShow = this.nameLevels.indexOf(6) !== -1; + transferTrackNameShow = this.nameLevels.includes(6); } deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow })); @@ -233,7 +233,7 @@ export default { } // 停车点 - const destCodeShow = this.nameLevels.indexOf(10) !== -1; + const destCodeShow = this.nameLevels.includes(10); const stopPointList = this.$store.getters['map/stopPointList']; if (stopPointList && stopPointList.length > 0) { stopPointList.forEach(elem => { @@ -242,7 +242,7 @@ export default { } // 车站 - const kmPostShow = this.nameLevels.indexOf(12) !== -1; + const kmPostShow = this.nameLevels.includes(12); const stationList = this.$store.getters['map/stationList']; if (stationList && stationList.length > 0) { stationList.forEach(elem => { diff --git a/src/views/publish/publishMap/index.vue b/src/views/publish/publishMap/index.vue index 69d15c0ff..f3ad09b77 100644 --- a/src/views/publish/publishMap/index.vue +++ b/src/views/publish/publishMap/index.vue @@ -158,8 +158,8 @@ export default { ], actions: [ { text: '地图排序', handler: this.mapSort }, - { text: '导出', handler: this.localExport, show: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0; }}, - { text: '导入', handler: this.localImport, fileType: 'file', show: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0; }} + { text: '导出', handler: this.localExport, show: () => { return this.$store.state.user.roles.includes(superAdmin); }}, + { text: '导入', handler: this.localImport, fileType: 'file', show: () => { return this.$store.state.user.roles.includes(superAdmin); }} ] }, diff --git a/src/views/publish/runPlanCommon/index.vue b/src/views/publish/runPlanCommon/index.vue index 79db93f09..1885b5131 100644 --- a/src/views/publish/runPlanCommon/index.vue +++ b/src/views/publish/runPlanCommon/index.vue @@ -56,7 +56,7 @@ export default { type: 'button', title: this.$t('global.operate'), width: '450', - hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, + hide: () => { return !this.$store.state.user.roles.includes(superAdmin); }, buttons: [ { name: this.$t('global.preview'), diff --git a/src/views/publish/runPlanEveryDay/index.vue b/src/views/publish/runPlanEveryDay/index.vue index 6021c0fe9..30b16b6d0 100644 --- a/src/views/publish/runPlanEveryDay/index.vue +++ b/src/views/publish/runPlanEveryDay/index.vue @@ -66,7 +66,7 @@ export default { type: 'button', title: this.$t('global.operate'), width: '250', - hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, + hide: (row) => { return !this.$store.state.user.roles.includes(superAdmin); }, buttons: [ { name: this.$t('global.preview'), diff --git a/src/views/publish/runPlanTemplate/index.vue b/src/views/publish/runPlanTemplate/index.vue index 822513796..da6dbdd0f 100644 --- a/src/views/publish/runPlanTemplate/index.vue +++ b/src/views/publish/runPlanTemplate/index.vue @@ -66,7 +66,7 @@ export default { type: 'button', title: this.$t('global.operate'), width: '550', - hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; }, + hide: () => { return !this.$store.state.user.roles.includes(superAdmin); }, buttons: [ { name: this.$t('publish.generateRunPlan'), diff --git a/src/views/scriptManage/allScriptRole.vue b/src/views/scriptManage/allScriptRole.vue index f32d3ea3f..0b678f8ff 100644 --- a/src/views/scriptManage/allScriptRole.vue +++ b/src/views/scriptManage/allScriptRole.vue @@ -80,7 +80,7 @@ export default { }, methods:{ filterNode(value, data) { - return data.label.indexOf(value) !== -1; + return data.label.includes(value); }, changeRole(member) { if (member) { diff --git a/src/views/scriptManage/home.vue b/src/views/scriptManage/home.vue index 7fbbc7bc6..c76281bd7 100644 --- a/src/views/scriptManage/home.vue +++ b/src/views/scriptManage/home.vue @@ -249,7 +249,7 @@ export default { // } }, covertButtonname() { - if (this.$store.getters.roles.indexOf(admin) >= 0 || this.$store.getters.roles.indexOf(superAdmin) >= 0) { + if (this.$store.getters.roles.includes(admin) || this.$store.getters.roles.includes(superAdmin)) { return this.$t('scriptRecord.publish'); } else { return this.$t('scriptRecord.applyPublish'); diff --git a/src/views/teach/detail/index.vue b/src/views/teach/detail/index.vue index f63dad156..d2fa550e5 100644 --- a/src/views/teach/detail/index.vue +++ b/src/views/teach/detail/index.vue @@ -178,7 +178,7 @@ export default { }, filterNode(value, data) { if (!value) return true; - return data.name.indexOf(value) !== -1; + return data.name.includes(value); }, buy() { // this.disabled = true; diff --git a/src/views/trainingPlatform/demonList.vue b/src/views/trainingPlatform/demonList.vue index 52d541fa0..7b719c46d 100644 --- a/src/views/trainingPlatform/demonList.vue +++ b/src/views/trainingPlatform/demonList.vue @@ -95,7 +95,7 @@ export default { methods: { filterNode(value, data) { if (!value) return true; - return data.name.indexOf(value) !== -1; + return data.name.includes(value); }, showContextMenu(e, obj, node, vueElem) { if (obj) {