This commit is contained in:
fan 2020-12-22 10:48:21 +08:00
commit fe146045f1
8 changed files with 85 additions and 89 deletions

View File

@ -329,6 +329,18 @@
</el-table> </el-table>
</div> </div>
</template> </template>
<template v-else-if="checkFieldType(item, 'switchBox')">
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
<el-switch
v-model="formModel[item.prop]"
:active-color="item.activeColor || '#13ce66'"
:inactive-color="item.inactiveColor || '#ff4949'"
/>
<!-- <el-radio-group v-model="formModel[item.prop]">
<el-radio v-for="item in item.children" :key="item.value" :label="item.value">{{ item.name }}</el-radio>
</el-radio-group> -->
</el-form-item>
</template>
</template> </template>
</el-form> </el-form>

View File

@ -13,10 +13,10 @@
</el-table> </el-table>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="2" :offset="4" class="button-top"> <el-col :span="2" :offset="4" class="button-top">
<el-button :id="domIdConfirm" size="mini" style="float: left;" :loading="loading" @click="commit">重做</el-button> <el-button size="mini" style="float: left;" :loading="loading" @click="commit">重做</el-button>
</el-col> </el-col>
<el-col :span="2" :offset="12" class="button-top"> <el-col :span="2" :offset="12" class="button-top">
<el-button :id="domIdCancel" size="mini" style="float: right;" @click="cancel">撤销</el-button> <el-button size="mini" style="float: right;" @click="cancel">撤销</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -60,10 +60,10 @@ export default {
'requestList' 'requestList'
]), ]),
domIdConfirm() { domIdConfirm() {
return OperationEvent.Signal.arrangementRoute.menu.domId; return OperationEvent.Command.commandXian.confirm.domId;
}, },
domIdCancel() { domIdCancel() {
return OperationEvent.Command.cancel.menu.domId; return OperationEvent.Command.commandXian.cancel.domId;
} }
}, },
watch: { watch: {

View File

@ -366,7 +366,7 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标左键菜单选择【定操】' }, { deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标左键菜单选择【定操】' },
{ deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' } { deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -380,7 +380,7 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【反操】' }, { deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【反操】' },
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' } { deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -394,7 +394,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' }, { deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' } { deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -408,7 +408,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' }, { deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' } { deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -440,7 +440,7 @@ export default {
productTypes: ['01'], productTypes: ['01'],
stepVOList: [ stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' }, { deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' } { deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -471,7 +471,7 @@ export default {
productTypes: ['01'], productTypes: ['01'],
stepVOList: [ stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' }, { deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' } { deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -542,7 +542,7 @@ export default {
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【始端/终端选择】', codeType:'START_SIGNAL' }, { deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【始端/终端选择】', codeType:'START_SIGNAL' },
{ deviceType: '04', orderNum: 2, operateCode: '301', tip: '鼠标左键选择进路名称【{3}】', val: '{4}', codeType:'END_SIGNAL' }, { deviceType: '04', orderNum: 2, operateCode: '301', tip: '鼠标左键选择进路名称【{3}】', val: '{4}', codeType:'END_SIGNAL' },
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -556,7 +556,7 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' }, { deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -570,7 +570,7 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' }, { deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -585,7 +585,7 @@ export default {
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' }, { deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择【{3}】进路', val: '{4}' }, { deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择【{3}】进路', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -600,7 +600,7 @@ export default {
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路交人工控】' }, { deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路交人工控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择【{3}】进路', val: '{4}' }, { deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择【{3}】进路', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -614,7 +614,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置通过模式】' }, { deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置通过模式】' },
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -628,7 +628,7 @@ export default {
productTypes: ['01'], productTypes: ['01'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【Fleet进路办理】' }, { deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【Fleet进路办理】' },
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -642,7 +642,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消通过模式】' }, { deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消通过模式】' },
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -656,7 +656,7 @@ export default {
productTypes: ['01'], productTypes: ['01'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【Fleet进路取消】' }, { deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【Fleet进路取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -670,7 +670,7 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '318', tip: '鼠标右键菜单选择【人工解锁进路】' }, { deviceType: '04', orderNum: 1, operateCode: '318', tip: '鼠标右键菜单选择【人工解锁进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '318', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -684,7 +684,7 @@ export default {
productTypes: ['01'], productTypes: ['01'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【信号机引导办理】' }, { deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【信号机引导办理】' },
{ deviceType: '04', orderNum: 2, operateCode: '308', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -698,7 +698,7 @@ export default {
productTypes: ['01'], productTypes: ['01'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' }, { deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },
{ {
@ -729,7 +729,7 @@ export default {
productTypes: ['01', '02'], productTypes: ['01', '02'],
stepVOList: [ stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制状态】' }, { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制状态】' },
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' } { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
] ]
}, },

View File

@ -234,6 +234,16 @@ export const OperationEvent = {
operation: '0082', operation: '0082',
domId: '_Tips-commandHaerbin-confirmCr2{BOTTOM}' domId: '_Tips-commandHaerbin-confirmCr2{BOTTOM}'
} }
},
commandXian: {
confirm: {
operation: '009',
domId: '_Tips-commandXian-confirm{TOP}'
},
cancel: {
operation: '0091',
domId: '_Tips-commandXian-cancel{TOP}'
}
} }
}, },

View File

@ -1,41 +1,6 @@
<template> <template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center> <el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<!--<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />--> <data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<el-form ref="form" :model="formModel" label-width="120px" :rules="rules">
<el-form-item label="发布数据地图" prop="dataMapId">
<el-select v-model="formModel.dataMapId" placeholder="请选择" @change="changeMapId">
<el-option
v-for="item in mapList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发布地图车站" prop="dataStationCode">
<el-select v-model="formModel.dataStationCode" placeholder="请选择">
<el-option
v-for="item in dataStationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="公共数据" prop="common">
<el-switch v-model="formModel.common" />
</el-form-item>
<el-form-item v-if="!formModel.common" label="关联车站" prop="stationCode">
<el-select v-model="formModel.stationCode" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button> <el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
@ -61,7 +26,7 @@ export default {
common: false, common: false,
stationCode: '' stationCode: ''
}, },
mapList: [], mapList: [], // 线
dataStationList: [], dataStationList: [],
ibpStationMap: {}, ibpStationMap: {},
ibpMap: {} ibpMap: {}
@ -74,6 +39,7 @@ export default {
items: [ items: [
{ prop: 'dataMapId', label: '发布数据地图:', type: 'select', options: this.mapList, change: true, onChange: this.changeMapId}, { prop: 'dataMapId', label: '发布数据地图:', type: 'select', options: this.mapList, change: true, onChange: this.changeMapId},
{ prop: 'dataStationCode', label: '发布地图车站:', type: 'select', options: this.dataStationList }, { prop: 'dataStationCode', label: '发布地图车站:', type: 'select', options: this.dataStationList },
{ prop: 'common', label: '公共数据:', type: 'switchBox' },
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList } { prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList }
] ]
}; };
@ -96,7 +62,6 @@ export default {
}, },
async created () { async created () {
this.getIbpList(); this.getIbpList();
this.getStationLIst();
}, },
methods: { methods: {
async getIbpList() { async getIbpList() {
@ -145,9 +110,10 @@ export default {
}, },
doShow() { doShow() {
this.dialogVisible = true; this.dialogVisible = true;
this.getStationLIst();
}, },
doCreate() { doCreate() {
this.$refs.form.validate(() => { this.$refs.dataform.validateForm(() => {
const param = { const param = {
mapId: this.$route.params.mapId, mapId: this.$route.params.mapId,
ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode], ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode],
@ -163,13 +129,13 @@ export default {
}); });
}, },
doClose() { doClose() {
this.$refs.form.resetFields(); this.$refs.dataform.resetForm();
this.dialogVisible = false; this.dialogVisible = false;
}, },
async changeMapId(val) { async changeMapId(val) {
try { try {
const res = await getStationList(val); const res = await getStationList(val);
this.dataStationList = []; this.dataStationList = []; //
this.formModel.dataStationCode = ''; this.formModel.dataStationCode = '';
if (res.code == 200 || this.ibpStationMap[val]) { if (res.code == 200 || this.ibpStationMap[val]) {
res.data.forEach(station => { res.data.forEach(station => {

View File

@ -89,9 +89,14 @@ export default {
watch: { watch: {
'$route' () { '$route' () {
this.reloadTable(); this.reloadTable();
this.getStationLists();
} }
}, },
async created () { async created () {
this.getStationLists();
},
methods: {
async getStationLists() {
try { try {
const res = await getStationList(this.$route.params.mapId); const res = await getStationList(this.$route.params.mapId);
this.stationList = []; this.stationList = [];
@ -108,7 +113,6 @@ export default {
console.log(error); console.log(error);
} }
}, },
methods: {
queryFunction(params) { queryFunction(params) {
const param = { const param = {
...params, ...params,

View File

@ -141,6 +141,7 @@ export default {
this.$store.dispatch('ibp/deleteIbpDevices', model); this.$store.dispatch('ibp/deleteIbpDevices', model);
}, },
async handleSave() { async handleSave() {
if (this.$store.state.ibp.ibp.background) {
try { try {
const param = { const param = {
drawData: this.$store.state.ibp.ibp drawData: this.$store.state.ibp.ibp
@ -150,6 +151,9 @@ export default {
} catch (error) { } catch (error) {
this.$message.success('保存失败:' + error.message); this.$message.success('保存失败:' + error.message);
} }
} else {
this.$message.error('ibp盘背景错误请检查数据后重试');
}
}, },
setIbpShow(data) { setIbpShow(data) {
if (data) { if (data) {

View File

@ -197,7 +197,7 @@ export default {
} catch (error) { } catch (error) {
console.log(error, '==='); console.log(error, '===');
this.loading = false; this.loading = false;
this.$alert('当前ibp盘数据不存在', '信息', { this.$alert('当前ibp盘数据有问题请检查', '信息', {
confirmButtonText: '确定', confirmButtonText: '确定',
callback: action => {} callback: action => {}
}); });