Browse Source

移动所属网格位置,去除最后一层下拉菜单

shibei_master
HAHA 3 years ago
parent
commit
02767f45f8
  1. 33
      src/views/modules/cabaseinfo/caloudong.vue
  2. 33
      src/views/modules/cabaseinfo/capingfang.vue
  3. 33
      src/views/modules/cabaseinfo/carental.vue
  4. 33
      src/views/modules/cabaseinfo/caresident.vue
  5. 33
      src/views/modules/cabaseinfo/carotators.vue

33
src/views/modules/cabaseinfo/caloudong.vue

@ -2,6 +2,14 @@
<div class="mod-axis__caLoudong}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item label="楼宇名称" prop="buildingName">
<el-input
v-model="dataForm.buildingName"
@ -16,14 +24,6 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="网格下拉" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item>
@ -183,13 +183,24 @@ export default {
getloudongOptions(){
this.$http.post(`/opendata/caLoudong/getLouDongCascade`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = resp.data.data
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
})
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]

33
src/views/modules/cabaseinfo/capingfang.vue

@ -2,6 +2,14 @@
<div class="mod-axis__caPingfang}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item label="楼宇名称" prop="buildingName">
<el-input
v-model="dataForm.buildingName"
@ -16,14 +24,6 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="网格下拉" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item>
@ -183,13 +183,24 @@ export default {
getloudongOptions(){
this.$http.post(`/opendata/caLoudong/getLouDongCascade`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = resp.data.data
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
})
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]

33
src/views/modules/cabaseinfo/carental.vue

@ -2,6 +2,14 @@
<div class="mod-axis__caRental}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item label="房屋编号" prop="houseName">
<el-input
v-model="dataForm.houseName"
@ -22,14 +30,6 @@
placeholder="承租人姓名"
clearable
></el-input>
</el-form-item>
<el-form-item label="网格下拉" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
@ -184,13 +184,24 @@ export default {
getloudongOptions(){
this.$http.post(`/opendata/caLoudong/getLouDongCascade`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = resp.data.data
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
})
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]

33
src/views/modules/cabaseinfo/caresident.vue

@ -2,6 +2,14 @@
<div class="mod-axis__caResident}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="dataForm.idCard" placeholder="身份证号" clearable></el-input>
</el-form-item>
@ -19,14 +27,6 @@
clearable
></el-input>
</el-form-item>
<el-form-item label="网格下拉" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item>
@ -175,13 +175,24 @@ export default {
getloudongOptions(){
this.$http.post(`/opendata/caLoudong/getLouDongCascade`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = resp.data.data
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
})
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]

33
src/views/modules/cabaseinfo/carotators.vue

@ -2,6 +2,14 @@
<div class="mod-axis__caRotators}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="dataForm.idCard" placeholder="身份证号" clearable></el-input>
</el-form-item>
@ -18,14 +26,6 @@
placeholder="联系方式"
clearable
></el-input>
</el-form-item>
<el-form-item label="网格下拉" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
@ -169,13 +169,24 @@ export default {
getloudongOptions(){
this.$http.post(`/opendata/caLoudong/getLouDongCascade`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = resp.data.data
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
})
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]

Loading…
Cancel
Save