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

Loading…
Cancel
Save