Browse Source

表单新增提交属性

shibei_master
YUJT 3 years ago
parent
commit
16c3f6abe9
  1. 15
      src/views/modules/plugins/power/poweraxis-add-or-update.vue

15
src/views/modules/plugins/power/poweraxis-add-or-update.vue

@ -109,6 +109,7 @@ export default {
agencyId:'', agencyId:'',
agencyName:'', agencyName:'',
agencyType:'', agencyType:'',
structLevel: null,
pid:'', pid:'',
categoryCode:'', categoryCode:'',
sort:'', sort:'',
@ -249,17 +250,16 @@ export default {
...this.dataForm, ...this.dataForm,
...res.data ...res.data
} }
let selectedLevel
this.structCategoryArr.forEach((item) => { this.structCategoryArr.forEach((item) => {
if(item.categoryCode === this.dataForm.categoryCode){ if(item.categoryCode === this.dataForm.categoryCode){
selectedLevel = item.structLevel this.dataForm.structLevel = item.structLevel
} }
}) })
if(selectedLevel === 0) { if(this.dataForm.structLevel === 0) {
this.orgListSwitch = true this.orgListSwitch = true
} else { } else {
this.orgListSwitch = false this.orgListSwitch = false
this.getParentStructTree(selectedLevel) this.getParentStructTree(this.dataForm.structLevel)
} }
}).catch(() => {}) }).catch(() => {})
}, },
@ -277,19 +277,18 @@ export default {
// //
handelChange(val){ handelChange(val){
this.dataForm.categoryCode = val this.dataForm.categoryCode = val
let selectedLevel
this.structCategoryArr.forEach((item) => { this.structCategoryArr.forEach((item) => {
if(item.categoryCode === val){ if(item.categoryCode === val){
selectedLevel = item.structLevel this.dataForm.structLevel = item.structLevel
} }
}) })
if (selectedLevel === 0) { if (this.dataForm.structLevel === 0) {
this.orgListSwitch = true this.orgListSwitch = true
this.dataForm.pid = '0' this.dataForm.pid = '0'
} else { } else {
this.orgListSwitch = false this.orgListSwitch = false
this.dataForm.pid = '' this.dataForm.pid = ''
this.getParentStructTree(selectedLevel) this.getParentStructTree(this.dataForm.structLevel)
} }
}, },
// init // init

Loading…
Cancel
Save