调整操作指令新增字段

This commit is contained in:
zyy 2020-12-21 14:09:50 +08:00
parent baffbf36c8
commit 0f6090c576
2 changed files with 11 additions and 76 deletions

View File

@ -11,6 +11,9 @@
<script>
import { postTrainingRulesData, putTrainingRulesData, getPlaceholderList } from '@/api/management/operation';
import { getPublishMapListOnline } from '@/api/jmap/map';
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
import { getTrainingOperateTypeMap } from '@/scripts/ConstDic';
export default {
name: 'TrainingEdit',
@ -102,13 +105,9 @@ export default {
created() {
this.init();
},
// beforeupdate(data) {
// this.$refs.dataform.clearValidate();
// },
methods: {
init() {
//
// this.$refs.dataform.resetForm();
this.mapIdList = [];
this.productTypesList = [{ value:'01', label:'现地'}, {value:'02', label:'行调'}];
getPublishMapListOnline().then(response => {
@ -122,73 +121,13 @@ export default {
//
this.trainingTypeList = [];
this.$Dictionary.trainingType().then(list => {
this.trainingTypeList = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
});
});
//
this.trainingOperateTypeMap = {};
this.$Dictionary.stationControl().then(list => {
this.trainingOperateTypeMap['01'] = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
}); //
});
this.$Dictionary.signalOperation().then(list => {
this.trainingOperateTypeMap['02'] = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
}); //
});
this.$Dictionary.switchOperation().then(list => {
this.trainingOperateTypeMap['03'] = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
}); //
});
this.$Dictionary.sectionOperation().then(list => {
this.trainingOperateTypeMap['04'] = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
}); //
});
this.$Dictionary.stationStandOperation().then(list => {
this.trainingOperateTypeMap['05'] = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
}); //
});
this.$Dictionary.trainPlanOperation().then(list => {
this.trainingOperateTypeMap['06'] = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
}); //
});
this.$Dictionary.trainOperation().then(list => {
this.trainingOperateTypeMap['07'] = list.map(item => {
const params = {};
params.label = item.name;
params.value = item.code;
return params;
}); //
});
const trainingDeviceTypeList = ConstConfig.ConstSelect.trainingDeviceType || {};
for (const val in trainingDeviceTypeList) {
this.trainingTypeList.push({value: val, label: Cookies.get('user_lang') == 'en' ? trainingDeviceTypeList[val].enlabel : trainingDeviceTypeList[val].label});
}
//
this.trainingOperateTypeMap = getTrainingOperateTypeMap();
},
async show(data) {
this.loading = false;
@ -210,9 +149,6 @@ export default {
};
} else {
this.formModel.mapId = this.$route.query.mapId;
// this.formModel = {
// mapId: this.$route.query.mapId
// };
}
},
repliceName(fieldValue, enumList) {
@ -307,7 +243,6 @@ export default {
productTypes:[]
};
this.$refs.dataform.resetForm();
// this.$refs.dataform.clearValidate();
this.dialogVisible = false;
}
}