Commit f59ddfc7 authored by ztf's avatar ztf

修改选择项目代号组件

parent d10750bb
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
v-for="item in projectCodeOptions" v-for="item in projectCodeOptions"
:key="item.dictKey" :key="item.dictKey"
:label="item.label" :label="item.label"
:value="item.value" :value="item"
/> />
</el-select> </el-select>
</div> </div>
...@@ -43,11 +43,17 @@ export default { ...@@ -43,11 +43,17 @@ export default {
value(newVal) { value(newVal) {
if (newVal) { if (newVal) {
this.projectCode = newVal this.projectCode = newVal
if (newVal === 'QH4' || newVal === 'QH6') { }
},
'form.projectType': {
immediate: true,
deep: true,
handler: function(val) {
if (val === 'ScienceClass') {
this.form.subSystem = '' this.form.subSystem = ''
this.form.ownSubSystem = '' this.form.ownSubSystem = ''
this.form.ownedEquipment = '' this.form.ownedEquipment = ''
} else if (newVal === 'QH3') { } else if (val === 'ModelDevelop') {
this.form.subject = '' this.form.subject = ''
} }
} }
...@@ -84,15 +90,17 @@ export default { ...@@ -84,15 +90,17 @@ export default {
return { return {
value: row.dictKey, value: row.dictKey,
label: row.dictValue, label: row.dictValue,
dictKey: row.dictKey dictKey: row.dictKey,
parentKey: row.parentKey
} }
}) })
} }
}) })
}, },
handleChange(val) { handleChange(item) {
this.$emit('input', val) this.$emit('input', item.value)
this.form.projectType = item.parentKey
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment