|
@@ -15,13 +15,13 @@
|
|
|
<row-list :col="2">
|
|
|
<row-item>
|
|
|
<a-form-item
|
|
|
- label="计划性维修"
|
|
|
+ label="维修类别"
|
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
>
|
|
|
- <a-select v-decorator="['needStop']" placeholder="请选择">
|
|
|
+ <a-select @change="changePlanFlag" v-decorator="['category', {rules: [{required: true, message: '计划性维修不能为空'}]}]" placeholder="请选择">
|
|
|
<a-select-option
|
|
|
- v-for="(label,value) in needStopMap"
|
|
|
+ v-for="(label,value) in planFlagMap"
|
|
|
:key="value"
|
|
|
:label="label"
|
|
|
:value="parseInt(value)">{{ label }}
|
|
@@ -159,6 +159,8 @@ export default {
|
|
|
modalTitle: null,
|
|
|
form: this.$form.createForm(this),
|
|
|
visible: false,
|
|
|
+ category: 0,
|
|
|
+ planFlagMap: {},
|
|
|
// 下拉框map
|
|
|
treeData: [],
|
|
|
descripitionMap: {},
|
|
@@ -187,6 +189,7 @@ export default {
|
|
|
this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
|
|
|
this.needStopMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
|
|
|
this.descripitionMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIRE_ACTION)
|
|
|
+ this.planFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY)
|
|
|
},
|
|
|
methods: {
|
|
|
base (record) {
|
|
@@ -207,6 +210,7 @@ export default {
|
|
|
'id',
|
|
|
'needStop',
|
|
|
'level',
|
|
|
+ 'category',
|
|
|
'repairErrorTypeId',
|
|
|
'repairEndTime'
|
|
|
])))
|
|
@@ -217,6 +221,19 @@ export default {
|
|
|
this.userList = res.data
|
|
|
})
|
|
|
},
|
|
|
+ changePlanFlag (value) {
|
|
|
+ this.category = value
|
|
|
+ const { form: { setFieldsValue } } = this
|
|
|
+ if (this.category === 1) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setFieldsValue({ needStop: 1 })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setFieldsValue({ needStop: 0 })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
handleRepairFileChange (info) {
|
|
|
this.defaultRepairFileList = info.fileList
|
|
|
this.repairFileList = this.setFileList(info, 12)
|