Commit a6468381 authored by ztf's avatar ztf

选择项目代号组件点击编辑之后的回显

parent e211072d
...@@ -23,12 +23,36 @@ import { post } from '@/utils/http' ...@@ -23,12 +23,36 @@ import { post } from '@/utils/http'
export default { export default {
name: 'SelectProjectCode', name: 'SelectProjectCode',
componentName: '选择项目代号', componentName: '选择项目代号',
props: {
value: {
type: String,
default: null
},
form: {
type: Object,
default: () => {}
}
},
data() { data() {
return { return {
projectCode: '', projectCode: '',
projectCodeOptions: [] projectCodeOptions: []
} }
}, },
watch: {
value(newVal) {
if (newVal) {
this.projectCode = newVal
if (newVal === 'QH4' || newVal === 'QH6') {
this.form.subSystem = ''
this.form.ownSubSystem = ''
this.form.ownedEquipment = ''
} else if (newVal === 'QH3') {
this.form.subject = ''
}
}
}
},
mounted() { mounted() {
this.getProjectCodeList() this.getProjectCodeList()
}, },
......
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