市北互联平台前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

241 lines
7.3 KiB

3 years ago
<template>
3 years ago
<div class="mod-axis__caLoudong}">
<el-card>
<el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属网格" prop="gridId">
<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>
3 years ago
<el-form-item label="楼宇名称" prop="buildingName">
<el-input
v-model="searchForm.buildingName"
3 years ago
placeholder="楼宇名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="小区(单位)名称" prop="communityName">
<el-input
v-model="searchForm.communityName"
3 years ago
placeholder="小区(单位)名称"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getDataList()">{{ $t("query") }}</el-button>
</el-form-item>
<!-- <el-form-item>
3 years ago
<el-button v-if="$hasPermission('axis:caResident:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('axis:caResident:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item> -->
3 years ago
</el-form>
</el-card>
<el-card shadow="never" class="aui-card--fill">
<el-table
v-loading="dataListLoading"
:data="dataList"
border
@selection-change="dataListSelectionChangeHandle"
style="width: 100%"
>
<el-table-column
type="selection"
header-align="center"
align="center"
width="50"
></el-table-column>
<el-table-column
:show-overflow-tooltip="true"
prop="streetName"
label="街道"
header-align="center"
align="center">
</el-table-column>
<el-table-column
prop="comName"
label="社区"
header-align="center"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
prop="gridName"
label="网格"
header-align="center"
align="center"
:show-overflow-tooltip="true">
</el-table-column>
3 years ago
<el-table-column
prop="buildingName"
label="楼宇名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="buildingUse"
label="用途分类"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="buildingAddr"
label="所处位置"
header-align="center"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="communityName"
label="小区(单位)名称"
header-align="center"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="layerCount"
label="楼层数"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="unitCount"
label="单元数"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="roomCount"
label="总房屋数"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="elevatorCount"
label="电梯数量"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="buildingPmc"
label="物业公司"
header-align="center"
align="center"
></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" align="center" width="100">
<template slot-scope="scope">
<el-button
type="text"
class="div-table-button--detail"
size="small"
@click="addOrUpdateHandle(scope.row.buildingId)"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
>
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
></add-or-update>
</el-card>
</div>
3 years ago
</template>
<script>
3 years ago
import mixinViewModule from "@/mixins/view-post";
import AddOrUpdate from "./caloudong-add-or-update";
3 years ago
export default {
3 years ago
mixins: [mixinViewModule],
3 years ago
data() {
3 years ago
return {
mixinViewModuleOptions: {
3 years ago
getDataListURL: "/opendata/caLoudong/getPage",
3 years ago
getDataListIsPage: true,
3 years ago
deleteURL: "",
deleteIsBatch: true,
3 years ago
},
searchForm: {
3 years ago
buildingName: "",
communityName: "",
gridId:""
3 years ago
},
caLouDongOptions:[],
optionsG:[]
3 years ago
};
3 years ago
},
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)
// })
// },
// 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]
},
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 {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
if (type === 'query') this.optionsG = res.data
else this.optionsEditG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
},
created(){
// this.getloudongOptions()
this.getGridList('query')
},
3 years ago
components: {
3 years ago
AddOrUpdate,
},
};
3 years ago
</script>