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>
</div>
</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>
</el-form>

View File

@ -13,10 +13,10 @@
</el-table>
<el-row justify="center" class="button-group">
<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 :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-row>
<el-row justify="center" class="button-group">
@ -60,10 +60,10 @@ export default {
'requestList'
]),
domIdConfirm() {
return OperationEvent.Signal.arrangementRoute.menu.domId;
return OperationEvent.Command.commandXian.confirm.domId;
},
domIdCancel() {
return OperationEvent.Command.cancel.menu.domId;
return OperationEvent.Command.commandXian.cancel.domId;
}
},
watch: {

View File

@ -366,7 +366,7 @@ export default {
productTypes: ['01', '02'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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: [
{ 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: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
@ -556,7 +556,7 @@ export default {
productTypes: ['01', '02'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
{ 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: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路交人工控】' },
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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'],
stepVOList: [
{ 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',
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>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<!--<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>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
@ -61,7 +26,7 @@ export default {
common: false,
stationCode: ''
},
mapList: [],
mapList: [], // 线
dataStationList: [],
ibpStationMap: {},
ibpMap: {}
@ -74,6 +39,7 @@ export default {
items: [
{ prop: 'dataMapId', label: '发布数据地图:', type: 'select', options: this.mapList, change: true, onChange: this.changeMapId},
{ prop: 'dataStationCode', label: '发布地图车站:', type: 'select', options: this.dataStationList },
{ prop: 'common', label: '公共数据:', type: 'switchBox' },
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList }
]
};
@ -96,7 +62,6 @@ export default {
},
async created () {
this.getIbpList();
this.getStationLIst();
},
methods: {
async getIbpList() {
@ -145,9 +110,10 @@ export default {
},
doShow() {
this.dialogVisible = true;
this.getStationLIst();
},
doCreate() {
this.$refs.form.validate(() => {
this.$refs.dataform.validateForm(() => {
const param = {
mapId: this.$route.params.mapId,
ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode],
@ -163,13 +129,13 @@ export default {
});
},
doClose() {
this.$refs.form.resetFields();
this.$refs.dataform.resetForm();
this.dialogVisible = false;
},
async changeMapId(val) {
try {
const res = await getStationList(val);
this.dataStationList = [];
this.dataStationList = []; //
this.formModel.dataStationCode = '';
if (res.code == 200 || this.ibpStationMap[val]) {
res.data.forEach(station => {

View File

@ -89,26 +89,30 @@ export default {
watch: {
'$route' () {
this.reloadTable();
this.getStationLists();
}
},
async created () {
try {
const res = await getStationList(this.$route.params.mapId);
this.stationList = [];
if (res.code == 200) {
res.data.forEach(station => {
const param = {
name: station.name,
code: station.code
};
this.stationList.push(param);
});
}
} catch (error) {
console.log(error);
}
this.getStationLists();
},
methods: {
async getStationLists() {
try {
const res = await getStationList(this.$route.params.mapId);
this.stationList = [];
if (res.code == 200) {
res.data.forEach(station => {
const param = {
name: station.name,
code: station.code
};
this.stationList.push(param);
});
}
} catch (error) {
console.log(error);
}
},
queryFunction(params) {
const param = {
...params,

View File

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

View File

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