Browse Source

【安宁-前端优化】【机构管理修改】-王公峰-2020-09-22

migration
wanggongfeng 5 years ago
parent
commit
8d3a4f036d
  1. 29
      src/views/modules/sys/dept-add-or-update.vue

29
src/views/modules/sys/dept-add-or-update.vue

@ -80,7 +80,9 @@
</template>
<script>
import debounce from 'lodash/debounce'
/* eslint-disable camelcase */
import debounce from 'lodash/debounce'
export default {
data () {
return {
@ -96,7 +98,7 @@ export default {
typeKey: '',
typeName: '',
partyCode: '',
typeKeyList : []
typeKeyList: []
},
secondOrgDictList: []
}
@ -141,15 +143,20 @@ export default {
},
//
changeOrgType (item) {
var type_key = ''
for(var i = 0; i < item.length; i++){
if(i === item.length - 1){
type_key += item[i]
}else{
type_key += (item[i] + ',')
}
var branch = ''
var type_key = ''
for (var i = 0; i < item.length; i++) {
if (item[i] === 'branch_grid_party' || item[i] === 'branch_enterprise_party') {
branch += (item[i] + ',')
} else {
type_key += (item[i] + ',')
}
this.dataForm.typeKey = type_key
}
var key = branch + type_key
if (key.length > 0) {
key = key.substring(0, key.length - 1)
}
this.dataForm.typeKey = key
},
//
getDeptList () {
@ -180,7 +187,7 @@ export default {
...res.data
}
if (this.dataForm.typeKey !== '' && this.dataForm.typeKey !== null) {
this.dataForm.typeKeyList = this.dataForm.typeKey.split(",")
this.dataForm.typeKeyList = this.dataForm.typeKey.split(',')
}
if (this.dataForm.pid === '0') {
return this.deptListTreeSetDefaultHandle()

Loading…
Cancel
Save