Browse Source

修改网格控件

shibei_master
HAHA 3 years ago
parent
commit
7d49092f4a
  1. 88
      src/views/modules/cabaseinfo/caloudong.vue
  2. 89
      src/views/modules/cabaseinfo/capingfang.vue
  3. 90
      src/views/modules/cabaseinfo/carental.vue
  4. 91
      src/views/modules/cabaseinfo/caresident.vue
  5. 91
      src/views/modules/cabaseinfo/carotators.vue

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

@ -1,25 +1,27 @@
<template>
<div class="mod-axis__caLoudong}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
<el-select v-model="searchForm.gridId" filterable placeholder="请选择" clearable>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="楼宇名称" prop="buildingName">
<el-input
v-model="dataForm.buildingName"
v-model="searchForm.buildingName"
placeholder="楼宇名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="小区(单位)名称" prop="communityName">
<el-input
v-model="dataForm.communityName"
v-model="searchForm.communityName"
placeholder="小区(单位)名称"
clearable
></el-input>
@ -171,43 +173,65 @@ export default {
deleteURL: "",
deleteIsBatch: true,
},
dataForm: {
searchForm: {
buildingName: "",
communityName: "",
gridId:""
},
caLouDongOptions:[]
caLouDongOptions:[],
optionsG:[]
};
},
methods:{
getloudongOptions(){
this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
// getloudongOptions(){
// this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
// if(resp.data.code === 0){
// 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.searchForm.gridId = val[val.length - 1]
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
async getGridList(type, agencyId) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: agencyId || user.agencyId, purpose: type })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
if (type === 'query') this.optionsG = res.data
else this.optionsEditG = res.data
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]
.catch(() => {
return this.$message.error('网络错误')
})
},
},
created(){
this.getloudongOptions()
// this.getloudongOptions()
this.getGridList('query')
},
components: {
AddOrUpdate,

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

@ -1,25 +1,27 @@
<template>
<div class="mod-axis__caPingfang}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
<el-select v-model="searchForm.gridId" filterable placeholder="请选择" clearable>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="楼宇名称" prop="buildingName">
<el-input
v-model="dataForm.buildingName"
v-model="searchForm.buildingName"
placeholder="楼宇名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="小区(单位)名称" prop="communityName">
<el-input
v-model="dataForm.communityName"
v-model="searchForm.communityName"
placeholder="小区(单位)名称"
clearable
></el-input>
@ -171,43 +173,66 @@ export default {
deleteURL: "",
deleteIsBatch: true,
},
dataForm: {
searchForm: {
buildingName: "",
communityName: "",
gridId:""
},
caLouDongOptions:[]
caLouDongOptions:[],
optionsG:[]
};
},
methods:{
getloudongOptions(){
this.$http.post(`/opendata/cabmGrid/getCascadeMenu`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
// getloudongOptions(){
// this.$http.post(`/opendata/cabmGrid/getCascadeMenu`).then(resp => {
// if(resp.data.code === 0){
// 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.searchForm.gridId = val[val.length - 1]
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
async getGridList(type, agencyId) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: agencyId || user.agencyId, purpose: type })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
if (type === 'query') this.optionsG = res.data
else this.optionsEditG = res.data
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]
.catch(() => {
return this.$message.error('网络错误')
})
},
},
created(){
this.getloudongOptions()
// this.getloudongOptions()
this.getGridList()
},
components: {
AddOrUpdate,

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

@ -1,32 +1,34 @@
<template>
<div class="mod-axis__caRental}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
<el-select v-model="searchForm.gridId" filterable placeholder="请选择" clearable>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="房屋编号" prop="houseName">
<el-input
v-model="dataForm.houseName"
v-model="searchForm.houseName"
placeholder="房屋编号"
clearable
></el-input>
</el-form-item>
<el-form-item label="房主姓名" prop="residentName">
<el-input
v-model="dataForm.residentName"
v-model="searchForm.residentName"
placeholder="房主姓名"
clearable
></el-input>
</el-form-item>
<el-form-item label="承租人姓名" prop="renterName">
<el-input
v-model="dataForm.renterName"
v-model="searchForm.renterName"
placeholder="承租人姓名"
clearable
></el-input>
@ -171,44 +173,66 @@ export default {
deleteURL: "",
deleteIsBatch: true,
},
dataForm: {
searchForm: {
houseName: "",
residentName: "",
renterName: "",
gridId:""
},
caLouDongOptions:[]
caLouDongOptions:[],
optionsG:[]
};
},
methods:{
getloudongOptions(){
this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
// getloudongOptions(){
// this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
// if(resp.data.code === 0){
// 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.searchForm.gridId = val[val.length - 1]
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
async getGridList(type, agencyId) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: agencyId || user.agencyId, purpose: type })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
if (type === 'query') this.optionsG = res.data
else this.optionsEditG = res.data
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]
.catch(() => {
return this.$message.error('网络错误')
})
},
},
created(){
this.getloudongOptions()
// this.getloudongOptions()
this.getGridList()
},
components: {
AddOrUpdate,

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

@ -1,28 +1,30 @@
<template>
<div class="mod-axis__caResident}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
<el-select v-model="searchForm.gridId" filterable placeholder="请选择" clearable>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="dataForm.idCard" placeholder="身份证号" clearable></el-input>
<el-input v-model="searchForm.idCard" placeholder="身份证号" clearable></el-input>
</el-form-item>
<el-form-item label="姓名" prop="residentName">
<el-input
v-model="dataForm.residentName"
v-model="searchForm.residentName"
placeholder="姓名"
clearable
></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="telephone">
<el-input
v-model="dataForm.telephone"
v-model="searchForm.telephone"
placeholder="联系方式"
clearable
></el-input>
@ -182,13 +184,14 @@ export default {
deleteURL: "",
deleteIsBatch: true,
},
dataForm: {
searchForm: {
idCard: "",
residentName: "",
telephone: "",
gridId:""
},
caLouDongOptions:[]
caLouDongOptions:[],
optionsG:[]
};
},
methods:{
@ -199,34 +202,56 @@ export default {
closeBindHouse(){
this.bndingHouseVisible = false
},
getloudongOptions(){
this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
// getloudongOptions(){
// this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
// if(resp.data.code === 0){
// 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.searchForm.gridId = val[val.length - 1]
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
async getGridList(type, agencyId) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: agencyId || user.agencyId, purpose: type })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
if (type === 'query') this.optionsG = res.data
else this.optionsEditG = res.data
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]
.catch(() => {
return this.$message.error('网络错误')
})
},
},
created(){
this.getloudongOptions()
// this.getloudongOptions()
this.getGridList()
},
components: {
AddOrUpdate,

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

@ -1,28 +1,30 @@
<template>
<div class="mod-axis__caRotators}">
<el-card>
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<el-cascader
:options="caLouDongOptions"
:props="{ checkStrictly: true }"
clearable
@change="handlePartyChange">
</el-cascader>
<el-select v-model="searchForm.gridId" filterable placeholder="请选择" clearable>
<el-option
v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="dataForm.idCard" placeholder="身份证号" clearable></el-input>
<el-input v-model="searchForm.idCard" placeholder="身份证号" clearable></el-input>
</el-form-item>
<el-form-item label="姓名" prop="residentName">
<el-input
v-model="dataForm.residentName"
v-model="searchForm.residentName"
placeholder="姓名"
clearable
></el-input>
</el-form-item>
<el-form-item label="联系方式" prop="telephone">
<el-input
v-model="dataForm.telephone"
v-model="searchForm.telephone"
placeholder="联系方式"
clearable
></el-input>
@ -159,45 +161,66 @@ export default {
deleteURL: "",
deleteIsBatch: true,
},
dataForm: {
searchForm: {
idCard: "",
residentName: "",
telephone: "",
gridId:""
},
caLouDongOptions:[]
caLouDongOptions:[],
optionsG:[]
};
},
methods:{
getloudongOptions(){
this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
if(resp.data.code === 0){
this.caLouDongOptions = this.removeEmptySubOrgList(resp.data.data)
}
}).catch(error => {
this.$message.error(error)
})
// getloudongOptions(){
// this.$http.post(`/opendata/bmGrid/getCascadeMenu`).then(resp => {
// if(resp.data.code === 0){
// 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.searchForm.gridId = val[val.length - 1]
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.children) {
if (orgInfo.children.length === 0) {
orgInfo.children = undefined
async getGridList(type, agencyId) {
const { user } = await this.$store.state
console.log('user---ppp', user)
// addorupdate query
await this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: agencyId || user.agencyId, purpose: type })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.removeEmptySubOrgList(orgInfo.children)
}
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
if (type === 'query') this.optionsG = res.data
else this.optionsEditG = res.data
}
})
return orgArray;
},
handlePartyChange(val) {
console.log('val------pp', val)
this.dataForm.gridId = val[val.length - 1]
.catch(() => {
return this.$message.error('网络错误')
})
},
},
created(){
this.getloudongOptions()
// this.getloudongOptions()
this.getGridList()
},
components: {
AddOrUpdate

Loading…
Cancel
Save