Selaa lähdekoodia

省市区新增删除逻辑

pull/1/head
yufei111 2 vuotta sitten
vanhempi
commit
97a8bd6bd4
3 muutettua tiedostoa jossa 21725 lisäystä ja 183 poistoa
  1. +21710
    -175
      package-lock.json
  2. +0
    -1
      src/views/data/tenant/index.vue
  3. +15
    -7
      src/views/data/tenant/tenant-edit.vue

+ 21710
- 175
package-lock.json
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
src/views/data/tenant/index.vue Näytä tiedosto

@@ -32,7 +32,6 @@
:datasource="url"
:columns="columns"
:where="where"
v-model:selection="selection"
:scroll="{x: 'max-content'}">
<template #toolbar>
<a-space>

+ 15
- 7
src/views/data/tenant/tenant-edit.vue Näytä tiedosto

@@ -298,26 +298,34 @@ export default {
},
/* 选择省市区 */
selectArea(value, type, name){
this.getListBycode(value, type, name)
if (type === 'province') {
this.cityList = []
this.districtList = []
this.form.cityCode = null
this.form.cityName = null
this.form.districtCode = null
this.form.districtName = null
}
if (type === 'city') {
this.districtList = []
this.form.districtCode = null
this.form.districtName = null
}
this.getListBycode(value, type, name)
},
/* 根据选择的选中的code返回子项列表 */
getListBycode(code, name, childrenName) {
this[name + 'List'].forEach((item) => {
if (item.citycode == code) {
this[childrenName + 'List'] = item.itemList
this.form[name+'Name'] = item.name
}
})
if(code) {
this[name + 'List'].forEach((item) => {
if (item.citycode == code) {
this[childrenName + 'List'] = item.itemList
this.form[name+'Name'] = item.name
}
})
} else {
this[childrenName + 'List'] = []
this.form[name+'Name'] = null
}
},
/* 保存编辑 */
save() {

Loading…
Peruuta
Tallenna