BUG 29587

This commit is contained in:
aixianling
2022-05-12 18:26:57 +08:00
parent 2004368c90
commit 6835f1da50

View File

@@ -1,67 +1,73 @@
<template> <template>
<ai-list class="AppPetitionManage"> <ai-list class="bmList">
<ai-title slot="title" title="楼栋管理" isShowBottomBorder /> <ai-title slot="title" title="楼栋管理" isShowBottomBorder/>
<template #left> <template #left>
<ai-tree-menu title="楼栋管理" @search="(v) => $refs.gridTree.filter(v)"> <ai-tree-menu title="楼栋管理" @search="(v) => $refs.gridTree.filter(v)">
<el-tree :data="treeData" ref="gridTree" :filter-node-method="handleTreeFilter" @node-click="handleSelectGrid" highlight-current node-key="id" :props="{ label: 'name', children: 'children' }" /> <el-tree :data="treeData" ref="gridTree" :filter-node-method="handleTreeFilter" @node-click="handleSelectGrid" highlight-current node-key="id"
</ai-tree-menu> :props="{ label: 'name', children: 'children' }"/>
</template> </ai-tree-menu>
<template #content> </template>
<ai-search-bar bottomBorder> <template #content>
<template slot="left"> <ai-search-bar bottomBorder>
<!-- 定位状态 --> <template slot="left">
<ai-select v-model="search.locationStatus" placeholder="定位状态" clearable :selectList="$dict.getDict('BuildLocationStatus')" @change=";(page.current = 1), getList()"></ai-select> <!-- 定位状态 -->
<ai-select v-model="search.locationStatus" placeholder="定位状态" clearable :selectList="$dict.getDict('BuildLocationStatus')"
@change=";(page.current = 1), getList()"></ai-select>
</template>
<!-- 搜索 -->
<template slot="right">
<el-input v-model="search.managerName" size="small" placeholder="楼栋号/楼长/联系方式" clearable v-throttle="() => {page.current = 1, getList()}"
@clear=";(page.current = 1), (search.managerName = ''), getList()" suffix-icon="iconfont iconSearch"/>
</template>
</ai-search-bar>
<ai-search-bar style="margin-top: 16px;">
<template slot="left">
<el-button icon="iconfont iconAdd" type="primary" size="small" @click="onAdd('')" :disabled="!isAdd">添加</el-button>
<el-button icon="iconfont iconDelete" size="small" @click="removeAll" :disabled="ids.length == 0">删除</el-button>
</template>
<!-- 导入导出 -->
<template #right>
<ai-import :instance="instance" :dict="dict" type="appcommunitybuildinginfo" :importParams="{ areaId: user.info && user.info.areaId }" name="楼栋管理"
@success="getList()">
<el-button icon="iconfont iconImport">导入</el-button>
</ai-import>
<ai-download :instance="instance" url="/app/appcommunitybuildinginfo/listExport" :params="param" fileName="楼栋管理模板" :disabled="tableData.length == 0">
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
</ai-download>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="total" ref="aitableex" style="margin-top: 20px;" :current.sync="page.current"
:size.sync="page.size" @getList="getList" @selection-change="(v) => (ids = v.map((e) => e.id))">
<el-table-column slot="locationStatus" label="定位状态" align="center">
<template slot-scope="{ row }">
<span style="color:red" v-if="row.locationStatus == 0">{{ dict.getLabel('BuildLocationStatus', row.locationStatus) }}</span>
<span style="color:green" v-if="row.locationStatus == 1">{{ dict.getLabel('BuildLocationStatus', row.locationStatus) }}</span>
</template> </template>
</el-table-column>
<!-- 搜索 --> <el-table-column slot="options" label="操作" align="center" width="240px" fixed="right">
<template slot="right"> <div class="table-options" slot-scope="{ row }">
<el-input v-model="search.managerName" size="small" placeholder="楼栋号/楼长/联系方式" clearable v-throttle="() => {page.current = 1, getList()}" @clear=";(page.current = 1), (search.managerName = ''), getList()" suffix-icon="iconfont iconSearch" /> <el-button type="text" @click="onAdd(row.id)">编辑</el-button>
</template> <el-button type="text" @click="remove(row.id)">删除</el-button>
</ai-search-bar> <el-button type="text" @click="toBuildMsg(row)">房屋信息</el-button>
<el-button type="text"
<ai-search-bar style="margin-top: 16px;"> @click="$router.push({ name: '63', query: { communityId: row.communityId, buildingId: row.id, unitNum: 1, buildingNumber: row.buildingNumber } })">
<template slot="left"> 楼栋模型
<el-button icon="iconfont iconAdd" type="primary" size="small" @click="onAdd('')" :disabled="!isAdd">添加 </el-button> </el-button>
<el-button icon="iconfont iconDelete" size="small" @click="removeAll" :disabled="ids.length == 0">删除 </el-button> </div>
</template> </el-table-column>
</ai-table>
<!-- 导入导出 --> </template>
<template #right>
<ai-import :instance="instance" :dict="dict" type="appcommunitybuildinginfo" :importParams="{ areaId: user.info && user.info.areaId }" name="楼栋管理" @success="getList()">
<el-button icon="iconfont iconImport">导入</el-button>
</ai-import>
<ai-download :instance="instance" url="/app/appcommunitybuildinginfo/listExport" :params="param" fileName="楼栋管理模板" :disabled="tableData.length == 0">
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
</ai-download>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="total" ref="aitableex" style="margin-top: 20px;" :current.sync="page.current" :size.sync="page.size" @getList="getList" @selection-change="(v) => (ids = v.map((e) => e.id))">
<el-table-column slot="locationStatus" label="定位状态" align="center">
<template slot-scope="{ row }">
<span style="color:red" v-if="row.locationStatus == 0">{{ dict.getLabel('BuildLocationStatus', row.locationStatus) }}</span>
<span style="color:green" v-if="row.locationStatus == 1">{{ dict.getLabel('BuildLocationStatus', row.locationStatus) }}</span>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" align="center" width="240px" fixed="right">
<div class="table-options" slot-scope="{ row }">
<el-button type="text" @click="onAdd(row.id)">编辑</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
<el-button type="text" @click="toBuildMsg(row)">房屋信息</el-button>
<el-button type="text" @click="$router.push({ name: '63', query: { communityId: row.communityId, buildingId: row.id, unitNum: 1, buildingNumber: row.buildingNumber } })">
楼栋模型
</el-button>
</div>
</el-table-column>
</ai-table>
</template>
</ai-list> </ai-list>
</template> </template>
<script> <script>
import { mapState } from 'vuex' import {mapState} from 'vuex'
export default { export default {
name: 'List', name: 'List',
@@ -86,7 +92,7 @@ export default {
id: '', id: '',
ids: [], ids: [],
colConfigs: [ colConfigs: [
{ type: 'selection' }, {type: 'selection'},
{ {
prop: 'communityName', prop: 'communityName',
label: '小区名称', label: '小区名称',
@@ -96,26 +102,26 @@ export default {
label: '楼栋号', label: '楼栋号',
align: 'center', align: 'center',
}, },
{ prop: 'unitNumber', label: '单元数', align: 'center' }, {prop: 'unitNumber', label: '单元数', align: 'center'},
{ {
prop: 'layerNumber', prop: 'layerNumber',
label: '最高层数', label: '最高层数',
align: 'center', align: 'center',
}, },
{ prop: 'householdNumber', label: '每层户数', align: 'center' }, {prop: 'householdNumber', label: '每层户数', align: 'center'},
{ {
prop: 'houseNum', prop: 'houseNum',
label: '实有户数', label: '实有户数',
align: 'center', align: 'center',
}, },
{ prop: 'residentNum', label: '实有人口', align: 'center' }, {prop: 'residentNum', label: '实有人口', align: 'center'},
{ {
prop: 'managerName', prop: 'managerName',
label: '楼栋长名', label: '楼栋长名',
align: 'center', align: 'center',
}, },
{ prop: 'managerPhone', label: '楼栋长联系方式', align: 'center', width: '150' }, {prop: 'managerPhone', label: '楼栋长联系方式', align: 'center', width: '150'},
{ slot: 'locationStatus' }, {slot: 'locationStatus'},
{ {
slot: 'options', slot: 'options',
label: '操作', label: '操作',
@@ -169,20 +175,20 @@ export default {
getList() { getList() {
this.instance this.instance
.post(`/app/appcommunitybuildinginfo/list`, null, { .post(`/app/appcommunitybuildinginfo/list`, null, {
params: { params: {
...this.page, ...this.page,
...this.search, ...this.search,
communityId: this.communityId, communityId: this.communityId,
areaId: this.areaId, areaId: this.areaId,
}, },
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.tableData = res.data.records this.tableData = res.data.records
this.total = res.data.total this.total = res.data.total
} }
}) })
}, },
// 添加 // 添加
@@ -245,7 +251,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.AppPetitionManage { .bmList {
height: 100%; height: 100%;
.ai-detail { .ai-detail {
@@ -284,7 +290,7 @@ export default {
background: transparent; background: transparent;
.el-tree-node__expand-icon.is-leaf { .el-tree-node__expand-icon.is-leaf {
color: transparent!important; color: transparent !important;
} }
.el-tree-node__content > .el-tree-node__expand-icon { .el-tree-node__content > .el-tree-node__expand-icon {
@@ -316,8 +322,9 @@ export default {
color: #fff; color: #fff;
} }
width: 100%;
background: #2266FF; background: #2266FF;
span { span {
color: #fff; color: #fff;
} }