Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
18344338c5
@ -169,6 +169,7 @@ export default {
|
||||
.menu-item {
|
||||
// background: $bg;
|
||||
list-style: none;
|
||||
min-width: 110px;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
|
@ -330,7 +330,7 @@ export default {
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar,
|
||||
froce: true
|
||||
// froce: true
|
||||
},
|
||||
{
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
|
105
src/views/system/commandDictionary/copyParam.vue
Normal file
105
src/views/system/commandDictionary/copyParam.vue
Normal file
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="复制线路操作" :visible.sync="dialogVisible" width="400px" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'EditCondition',
|
||||
props: {
|
||||
taskStatusList: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
fromId: '',
|
||||
fromName: '',
|
||||
targetIds: '',
|
||||
deviceType: []
|
||||
},
|
||||
deviceTypeList: [],
|
||||
targetList: [],
|
||||
lineCode: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
taskStatusList(list) {
|
||||
this.targetList = [];
|
||||
list.forEach(item => {
|
||||
if (item.value != this.lineCode) {
|
||||
this.targetList.push(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'fromName', label: '源线路', type: 'text', disabled: true },
|
||||
{ prop: 'targetIds', label:'拷贝线路', type: 'select', options: this.targetList, multiple: true },
|
||||
{ prop: 'deviceType', label: '操作对象', type: 'select', options: this.deviceTypeList, multiple: true }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
fromName: [
|
||||
{ required: true, message: '请选择拷贝源线路', trigger: 'blur' }
|
||||
],
|
||||
targetIds: [
|
||||
{ required: true, message: '请选择需要拷贝线路', trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.deviceTypeList = [];
|
||||
this.$ConstSelect.deviceTypeList.forEach(item => {
|
||||
this.deviceTypeList.push(item);
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(lineCode) {
|
||||
this.dialogVisible = true;
|
||||
if (lineCode) {
|
||||
this.lineCode = lineCode;
|
||||
this.targetList = [];
|
||||
this.taskStatusList.forEach(item => {
|
||||
item.value = item.id;
|
||||
item.label = item.name;
|
||||
if (item.code != lineCode) {
|
||||
this.targetList.push(item);
|
||||
} else {
|
||||
this.formModel.fromId = item.id;
|
||||
this.formModel.fromName = item.name;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
doSave() {
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
console.log('确定')
|
||||
this.handleClose();
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.$refs.dataform.resetForm();
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<show-condition ref="showCondition" />
|
||||
<copy-param ref="copyParam" :taskStatusList="taskStatusList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -10,11 +11,13 @@ import { createCommand, getCommandList, delCommand } from '@/api/management/dict
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
import CommandEnum from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import ShowCondition from './showCondition';
|
||||
import CopyParam from './copyParam';
|
||||
|
||||
export default {
|
||||
name: 'CommandDictionary',
|
||||
components: {
|
||||
ShowCondition
|
||||
ShowCondition,
|
||||
CopyParam
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -23,7 +26,8 @@ export default {
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
},
|
||||
lineCode: '',
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
@ -118,7 +122,8 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd }
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd },
|
||||
{ text: '复刻', handler: this.handleCopyAll }
|
||||
]
|
||||
},
|
||||
|
||||
@ -150,7 +155,8 @@ export default {
|
||||
queryFunction(params) {
|
||||
if (!params['lineCode']) {
|
||||
params['lineCode'] = '';
|
||||
}
|
||||
}
|
||||
this.lineCode = params['lineCode'];
|
||||
return getCommandList(params);
|
||||
},
|
||||
replace(fieldValue) {
|
||||
@ -205,7 +211,11 @@ export default {
|
||||
this.$message.error('复制指令失败!');
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
// 复制线路到其他线路 操作
|
||||
handleCopyAll() {
|
||||
this.$refs.copyParam.doShow(this.lineCode);
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user