Browse Source

房屋管理代码调整

feature
jiangyuying 2 years ago
parent
commit
d29f133122
  1. 4
      src/js/columns/constants/index.js
  2. 6
      src/views/components/resiSearch.vue
  3. 480
      src/views/dataBoard/renfang/resi/list.vue
  4. 540
      src/views/modules/base/community/buildTable.vue
  5. 141
      src/views/modules/base/community/communityForm.vue
  6. 1302
      src/views/modules/base/community/communityTable copy.vue
  7. 528
      src/views/modules/base/community/communityTable.vue
  8. 88
      src/views/modules/base/community/roomDetail.vue
  9. 49
      src/views/modules/base/community/roomForm.vue
  10. 541
      src/views/modules/base/community/roomTable.vue
  11. 142
      src/views/modules/base/resi.vue
  12. 33
      src/views/modules/base/residentManagement/louzhang/addForm.vue
  13. 24
      src/views/modules/base/residentManagement/louzhang/louzhangList.vue

4
src/js/columns/constants/index.js

@ -52,10 +52,10 @@ export const healthStatusList = [
export const dormitoryTypeList = [
{
label: '楼长',
value: 1
value: '1'
},
{
label: '单元长',
value: 0
value: '0'
}
]

6
src/views/components/resiSearch.vue

@ -382,7 +382,9 @@ export default {
villageId: '',
buildId: '',
unitId: '',
homeId: ''
homeId: '',
level: '',
orgType: ''
},
GRID_ID: '',
tempFormList,
@ -706,6 +708,8 @@ export default {
"agencyId"
);
this.level = this.sarr[this.sarr.length - 1].level
this.form.level = this.sarr[this.sarr.length - 1].level
this.getValiheList()
},
getLastItem (list, vals, key) {

480
src/views/dataBoard/renfang/resi/list.vue

@ -1,41 +1,33 @@
<template>
<div class="g-pgi">
<!-- 组织路由 -->
<cpt-bread
:separator="'/'"
@tap="handleClickBreadItem"
:breadList="breadList"
></cpt-bread>
<div class="m-title">
<img
class="title_img"
src="@/assets/images/index/list-logo.png"
alt
/>
<div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div>
</div>
<div class="g-listbox">
<cpt-tb
:col-list="colList"
:loading="loading"
:header="header"
:list="list"
:total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange"
@operate="showInfo"
></cpt-tb>
</div>
<resi-details
@close="displayedResiId = ''"
:resi-id="displayedResiId"
v-if="displayedResiId"
/>
</div>
<div class="g-pgi">
<!-- 组织路由 -->
<cpt-bread :separator="'/'"
@tap="handleClickBreadItem"
:breadList="breadList"></cpt-bread>
<div class="m-title">
<img class="title_img"
src="@/assets/images/index/list-logo.png"
alt />
<div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div>
</div>
<div class="g-listbox">
<cpt-tb :col-list="colList"
:loading="loading"
:header="header"
:list="list"
:total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange"
@operate="showInfo"></cpt-tb>
</div>
<resi-details @close="displayedResiId = ''"
:resi-id="displayedResiId"
v-if="displayedResiId" />
</div>
</template>
<script>
@ -46,213 +38,213 @@ import { requestPostBi } from "@/js/dai/request-bipass";
import getQueryPara from "dai-js/modules/getQueryPara";
export default {
name: "resi-list",
components: {
cptTb,
cptBread,
resiDetails,
},
data() {
return {
breadList: [
{
type: "back",
meta: {
title: "人房总览",
},
},
{
meta: {
title: "居民列表",
},
},
],
tableTitle: "居民列表",
searchName: "",
orgLevel: "",
org_id: "",
resiType: "", //
loading: true,
pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1,
total: 0,
srcTableData: [],
list: [],
colList: [
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "15%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "10%",
},
],
header: [
"序号",
"姓名",
"所属网格",
"所属房屋",
"联系电话",
"证件号",
"性别",
"出生日期",
"操作",
],
displayedResiId: "",
};
},
activated() {
this.org_id = getQueryPara("org_id");
this.resiType = getQueryPara("type");
const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表";
this.pageNo = 1;
this.getList();
this.getCount();
},
methods: {
handleClickBreadItem({ item }) {
if (item.type == "back") {
this.$router.back();
}
},
handleSearch() {},
showInfo(index) {
let item = this.srcTableData[index];
this.displayedResiId = item.user_id;
},
handlePageNoChange(pageNo) {
this.pageNo = pageNo;
this.getList();
},
handleSizeChange(pageSize) {
localStorage.setItem('dataBoard_PageSize', pageSize);
this.pageSize = pageSize;
this.getList();
},
async getList() {
const { org_id, resiType, pageNo, pageSize } = this;
this.loading = true;
const url = "resident_list";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: resiType,
pageNo,
pageSize,
},
},
{
// mockId: 60069169,
}
);
this.loading = false;
if (code === 0) {
this.srcTableData = data;
// this.total = data.total;
this.list = data.map((item, index) => {
return [
index + 1,
item.user_name ? item.user_name : "--",
item.grid ? item.grid : "--",
item.house ? item.house : "--",
item.telephone ? item.telephone : "--",
item.idcard ? item.idcard : "--",
item.gender ? item.gender : "--",
item.birthday ? item.birthday : "--",
{ type: "operate", list: ["查看"] },
];
});
} else {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, resiType, pageNo, pageSize } = this;
const url = "resident_list_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: resiType,
pageNo,
pageSize,
},
},
{
// mockId: 63070408,
}
);
if (code === 0) {
this.total = parseInt(data[0].count);
} else {
this.$message.error(msg);
}
},
},
destroyed() {
console.log("我已经离开了!");
},
name: "resi-list",
components: {
cptTb,
cptBread,
resiDetails,
},
data () {
return {
breadList: [
{
type: "back",
meta: {
title: "人房总览",
},
},
{
meta: {
title: "居民列表",
},
},
],
tableTitle: "居民列表",
searchName: "",
orgLevel: "",
org_id: "",
resiType: "", //
loading: true,
pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1,
total: 0,
srcTableData: [],
list: [],
colList: [
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "15%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "10%",
},
],
header: [
"序号",
"姓名",
"所属网格",
"所属房屋",
"联系电话",
"证件号",
"性别",
"出生日期",
"操作",
],
displayedResiId: "",
};
},
activated () {
this.org_id = getQueryPara("org_id");
this.resiType = getQueryPara("type");
const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表";
this.pageNo = 1;
this.getList();
this.getCount();
},
methods: {
handleClickBreadItem ({ item }) {
if (item.type == "back") {
this.$router.back();
}
},
handleSearch () { },
showInfo (index) {
let item = this.srcTableData[index];
this.displayedResiId = item.user_id;
},
handlePageNoChange (pageNo) {
this.pageNo = pageNo;
this.getList();
},
handleSizeChange (pageSize) {
localStorage.setItem('dataBoard_PageSize', pageSize);
this.pageSize = pageSize;
this.getList();
},
async getList () {
const { org_id, resiType, pageNo, pageSize } = this;
this.loading = true;
const url = "resident_list";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: resiType,
pageNo,
pageSize,
},
},
{
// mockId: 60069169,
}
);
this.loading = false;
if (code === 0) {
this.srcTableData = data;
// this.total = data.total;
this.list = data.map((item, index) => {
return [
index + 1,
item.user_name ? item.user_name : "--",
item.grid ? item.grid : "--",
item.house ? item.house : "--",
item.telephone ? item.telephone : "--",
item.idcard ? item.idcard : "--",
item.gender ? item.gender : "--",
item.birthday ? item.birthday : "--",
{ type: "operate", list: ["查看"] },
];
});
} else {
this.$message.error(msg);
}
},
async getCount () {
const { org_id, resiType, pageNo, pageSize } = this;
const url = "resident_list_total";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type: resiType,
pageNo,
pageSize,
},
},
{
// mockId: 63070408,
}
);
if (code === 0) {
this.total = parseInt(data[0].count);
} else {
this.$message.error(msg);
}
},
},
destroyed () {
console.log("我已经离开了!");
},
};
</script>

540
src/views/modules/base/community/buildTable.vue

@ -3,75 +3,143 @@
<div class="u-table-btn2">
<div class="u-table-btn2-left">
<el-button style="" class="diy-button--blue" icon="el-icon-plus" size="small" :disabled="addDisabled"
@click="handleAdd">新增楼栋</el-button>
<el-button style=""
class="diy-button--blue"
icon="el-icon-plus"
size="small"
:disabled="addDisabled"
@click="handleAdd">新增楼栋</el-button>
<div class="u-btn-upload" v-if="showImportBtn">
<div class="u-btn-upload"
v-if="showImportBtn">
<el-popover popper-class="btn-popper" placement="bottom" width="20" trigger="hover">
<el-popover popper-class="btn-popper"
placement="bottom"
width="20"
trigger="hover">
<div class="table-more-btn">
<el-upload :headers="$getElUploadHeaders()" style="text-align: center" ref="upload_building"
:multiple='false' :show-file-list='false' :before-upload="((file) => { beforeUpload(file, 'building') })"
action="" accept=".xls,.xlsx" :http-request="(() => { uploadFile('building') })">
<el-button style="" size="small" type="text" class="diy-button--other">导入楼栋数据</el-button>
<el-upload :headers="$getElUploadHeaders()"
style="text-align: center"
ref="upload_building"
:multiple='false'
:show-file-list='false'
:before-upload="((file) => { beforeUpload(file, 'building') })"
action=""
accept=".xls,.xlsx"
:http-request="(() => { uploadFile('building') })">
<el-button style=""
size="small"
type="text"
class="diy-button--other">导入楼栋数据</el-button>
</el-upload>
</div>
<div class="table-more-btn">
<el-upload :headers="$getElUploadHeaders()" style="text-align: center" ref="upload_room" :multiple='false'
:show-file-list='false' :before-upload="((file) => { beforeUpload(file, 'room') })" action=""
accept=".xls,.xlsx" :http-request="(() => { uploadFile('room') })">
<el-button size="small" type="text" class="diy-button--other">导入房屋数据</el-button>
<el-upload :headers="$getElUploadHeaders()"
style="text-align: center"
ref="upload_room"
:multiple='false'
:show-file-list='false'
:before-upload="((file) => { beforeUpload(file, 'room') })"
action=""
accept=".xls,.xlsx"
:http-request="(() => { uploadFile('room') })">
<el-button size="small"
type="text"
class="diy-button--other">导入房屋数据</el-button>
</el-upload>
</div>
<el-button size="small" style="float:right" class="diy-button--white" slot="reference">导入<i
class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-button size="small"
style="float:right"
class="diy-button--white"
slot="reference">导入<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover>
</div>
<el-button style="margin-left:10px" class="diy-button--white" size="small" @click="handleExport">导出</el-button>
<el-button style="margin-left:10px" class="diy-button--white" size="small" @click="deleteBatch">批量删除</el-button>
<el-button style="margin-left:10px"
class="diy-button--white"
size="small"
@click="handleExport">导出</el-button>
<el-button style="margin-left:10px"
class="diy-button--white"
size="small"
@click="deleteBatch">批量删除</el-button>
</div>
<div>
<el-popover popper-class="btn-popper" placement="bottom" style="margin-left: 10px" width="20" trigger="hover">
<el-popover popper-class="btn-popper"
placement="bottom"
style="margin-left: 10px"
width="20"
trigger="hover">
<div class="table-more-btn">
<el-button :headers="$getElUploadHeaders()" style="" class="diy-button--other" size="small" type="text"
@click="handleExportModule('community')">下载小区模板</el-button>
<el-button :headers="$getElUploadHeaders()"
style=""
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('community')">下载小区模板</el-button>
</div>
<!-- v-if="showImportBtn" -->
<div class="table-more-btn">
<el-button :headers="$getElUploadHeaders()" style="" class="diy-button--other" size="small" type="text"
@click="handleExportModule('building')">下载楼栋模板</el-button>
<el-button :headers="$getElUploadHeaders()"
style=""
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('building')">下载楼栋模板</el-button>
</div>
<!-- v-if="showImportBtn" -->
<div class="table-more-btn">
<el-button :headers="$getElUploadHeaders()" style="" class="diy-button--other" size="small" type="text"
@click="handleExportModule('room')">下载房屋模板</el-button>
<el-button :headers="$getElUploadHeaders()"
style=""
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('room')">下载房屋模板</el-button>
</div>
<div class="table-more-btn">
<el-button style="" class="diy-button--other" size="small" type="text" :disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
<el-button style=""
class="diy-button--other"
size="small"
type="text"
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
</div>
<div v-if="displayedBaobiaoBtn" class="table-more-btn">
<el-button size="small" type="text" class="diy-button--other" @click="reportForm">智能填报</el-button>
<div v-if="displayedBaobiaoBtn"
class="table-more-btn">
<el-button size="small"
type="text"
class="diy-button--other"
@click="reportForm">智能填报</el-button>
</div>
<el-button size="small" style="float:right" class="diy-button--white" slot="reference">更多<i
class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-button size="small"
style="float:right"
class="diy-button--white"
slot="reference">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover>
</div>
</div>
<div class="m-table-item">
<el-table ref="ref_table" :data="tableData" border @sort-change="handleSortOrderChange"
:show-overflow-tooltip="true" :height="tableHeight" v-loading="tableLoading" style="width: 100%"
@select-all="selectAll" @selection-change="selectionChange">
<el-table-column type="selection" :selectable="checkSelect" width="55">
<el-table ref="ref_table"
:data="tableData"
border
@sort-change="handleSortOrderChange"
:show-overflow-tooltip="true"
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column>
<!-- <el-table-column fixed="left"
width="70"
@ -82,80 +150,168 @@
:index="indexMethod">
</el-table-column> -->
<el-table-column prop="buildingName" fixed="left" label="楼栋名称" header-align="left" align="left" min-width="180">
<el-table-column prop="buildingName"
fixed="left"
label="楼栋名称"
header-align="left"
align="left"
min-width="180">
<template slot-scope="scope">
<a class="name-a" @click="handleToNextLevel(scope.row)">
<a class="name-a"
@click="handleToNextLevel(scope.row)">
{{ scope.row.buildingName }}
</a>
</template>
</el-table-column>
<el-table-column prop="neighborHoodName" label="所属小区" header-align="left" align="left" min-width="160">
<el-table-column prop="neighborHoodName"
label="所属小区"
header-align="left"
align="left"
min-width="160">
</el-table-column>
<el-table-column prop="buildingType" label="楼栋类型" header-align="left" align="left" width="90">
<el-table-column prop="buildingType"
label="楼栋类型"
header-align="left"
align="left"
width="90">
</el-table-column>
<el-table-column prop="buildingLeaderName" label="楼长姓名" header-align="left" align="left" min-width="90">
<el-table-column prop="buildingLeaderName"
label="楼长姓名"
header-align="left"
align="left"
min-width="90">
</el-table-column>
<el-table-column prop="buildingLeaderMobile" label="楼长电话" header-align="left" align="left" min-width="110">
<el-table-column prop="buildingLeaderMobile"
label="楼长电话"
header-align="left"
align="left"
min-width="110">
</el-table-column>
<el-table-column prop="totalUnitNum" header-align="left" align="left" label="单元数">
<el-table-column prop="totalUnitNum"
header-align="left"
align="left"
label="单元数">
</el-table-column>
<el-table-column prop="totalFloorNum" header-align="left" align="left" label="层数">
<el-table-column prop="totalFloorNum"
header-align="left"
align="left"
label="层数">
</el-table-column>
<el-table-column prop="realTotalHouseNum" header-align="left" align="left" width="90" label="实际录入">
<el-table-column prop="realTotalHouseNum"
header-align="left"
align="left"
width="90"
label="实际录入">
</el-table-column>
<el-table-column prop="totalHouseNum" header-align="left" align="left" label="总户数">
<el-table-column prop="totalHouseNum"
header-align="left"
align="left"
label="总户数">
</el-table-column>
<el-table-column prop="sort" sortable="custom" header-align="left" align="left" min-width="100" label="排序">
<el-table-column prop="sort"
sortable="custom"
header-align="left"
align="left"
min-width="100"
label="排序">
<template slot-scope="scope">
<div @click="handleEditSort(scope.row)">
<span v-if="!scope.row.isChange">{{ scope.row.sort }}</span>
<el-input-number v-else @change="handleChangeSort(scope.row)" v-model="scope.row.sort" class="item_width_4"
size="small" :min="0" :max="9999" label="描述文字"></el-input-number>
<el-input-number v-else
@change="handleChangeSort(scope.row)"
v-model="scope.row.sort"
class="item_width_4"
size="small"
:min="0"
:max="9999"
label="描述文字"></el-input-number>
</div>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="220" header-align="center" align="center" class="operate">
<el-table-column label="操作"
fixed="right"
width="220"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="scope.row.showBtn" type="text" class="div-table-button--blue" size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button v-if="scope.row.showBtn" type="text" class="div-table-button--blue" size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" v-if="formShow" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" top="5vh" width="670px" class="dialog-h" @closed="diaClose">
<build-form ref="ref_form" @dialogCancle="addFormCancle" @dialogOk="addFormOk"></build-form>
<el-dialog :visible.sync="formShow"
v-if="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
top="5vh"
width="670px"
class="dialog-h"
@closed="diaClose">
<build-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></build-form>
</el-dialog>
<!-- 详情弹出框 -->
<el-dialog :visible.sync="detailShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="'楼栋详情'"
top="5vh" width="670px" class="dialog-h" @closed="detailFormCancle">
<build-detail ref="ref_form_detail" @diaDetailClose="detailFormCancle"></build-detail>
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'楼栋详情'"
top="5vh"
width="670px"
class="dialog-h"
@closed="detailFormCancle">
<build-detail ref="ref_form_detail"
@diaDetailClose="detailFormCancle"></build-detail>
</el-dialog>
<!-- 导出弹出框 -->
<el-dialog :visible.sync="diyDialog" :close-on-click-modal="false" :close-on-press-escape="false" width="1150px"
title="导出模板" top="5vh" class="dialog-h">
<community-export-info v-if="diyDialog" ref="ref_diy" :list="exportList" :search="{
<el-dialog :visible.sync="diyDialog"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="1150px"
title="导出模板"
top="5vh"
class="dialog-h">
<community-export-info v-if="diyDialog"
ref="ref_diy"
:list="exportList"
:search="{
formCode: 'community_info',
pageNo: pageNo,
pageSize: pageSize,
conditions:queryConditions
}" :orgId="agencyObj.id" @close="handleDiyClose"></community-export-info>
}"
:orgId="agencyObj.id"
@close="handleDiyClose"></community-export-info>
</el-dialog>
<baobiao ref="baobiao" />
</div>
@ -171,10 +327,11 @@ import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import baobiao from "@/views/modules/cpts/baobiao";
import communityExportInfo from "./communityExportInfo.vue";
import util from "@/js/util";
let loading //
export default {
data() {
data () {
return {
searchHeight: 190,//
importBuildingLoading: false,
@ -205,7 +362,7 @@ export default {
displayedBaobiaoBtn: false,
queryConditions:[]
queryConditions: []
}
},
components: {
@ -214,7 +371,7 @@ export default {
BuildDetail,
communityExportInfo
},
async mounted() {
async mounted () {
// this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
// elseParams: {
// categoryKeys: ['house_info'], categoryKey: 'house_info',
@ -223,7 +380,7 @@ export default {
this.getQueryConditions()
},
computed: {
tableHeight() {
tableHeight () {
let height = this.searchHeight + 270
return this.$store.state.inIframe ? this.clientHeight - height + this.iframeHeight : this.clientHeight - height
@ -233,7 +390,7 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
reportForm() {
reportForm () {
let paramMap = {
pageSize: this.pageSize,
pageNo: this.pageNo,
@ -255,10 +412,10 @@ export default {
})
},
indexMethod(index) {
indexMethod (index) {
return index + 1;
},
handleSortOrderChange(value) {
handleSortOrderChange (value) {
this.sortType = value.order === 'ascending' ? 'asc' : 'desc'
this.loadTable()
@ -268,7 +425,7 @@ export default {
// },
handleEditSort(row) {
handleEditSort (row) {
if (!row.isChange) {
row.isChange = true
}
@ -276,7 +433,7 @@ export default {
},
async handleChangeSort(row, index) {
async handleChangeSort (row, index) {
// row.isChange = false
let params = {
@ -304,17 +461,17 @@ export default {
},
checkSelect(row, index) {
let isChecked = false;
if (row.showBtn) { //
isChecked = true
} else {
isChecked = false
}
checkSelect (row, index) {
let isChecked = true;
// if (row.showBtn) { //
// isChecked = true
// } else {
// isChecked = false
// }
return isChecked
},
async loadTable(fromTree, treeObj) {
async loadTable (fromTree, treeObj) {
this.addDisabled = true
this.tableLoading = true
if (fromTree) {
@ -346,10 +503,10 @@ export default {
// item.sort = item.sort.toFixed(2)
item.isChange = false
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true
// item.showBtn = true
this.validTableDataNum++
} else {
item.showBtn = false
// item.showBtn = false
}
});
@ -362,12 +519,12 @@ export default {
this.tableLoading = false
},
diaClose() {
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},
async handleDetail(row) {
async handleDetail (row) {
// this.formTitle = ''
// this.formShow = true
// const _data = await this.detail(row)
@ -383,12 +540,12 @@ export default {
})
},
detailFormCancle() {
detailFormCancle () {
this.$refs.ref_form_detail.diaDestroy()
this.detailShow = false
},
handleAdd() {
handleAdd () {
this.formTitle = '新增楼栋'
this.formShow = true
this.$nextTick(() => {
@ -397,7 +554,7 @@ export default {
})
},
async handleEdit(row) {
async handleEdit (row) {
this.formTitle = '修改楼栋'
this.formShow = true
const _data = await this.detail(row)
@ -406,52 +563,30 @@ export default {
})
},
handleToNextLevel(row) {
handleToNextLevel (row) {
this.$emit('toNextLevel', row, 'building')
},
addFormCancle() {
addFormCancle () {
this.formShow = false
},
addFormOk() {
addFormOk () {
this.formShow = false
this.loadTable()
this.$emit('refreshTree')
},
deleteBatch() {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的楼栋?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteCommunityBatch()
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
} else {
this.$message.warning('请先选择要删除的楼栋')
}
},
selectAll(selection) {
selectAll (selection) {
this.selection = selection
},
selectionChange(selection) {
selectionChange (selection) {
this.selection = selection
},
async handleDelete(row) {
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
@ -459,78 +594,85 @@ export default {
type: "warning"
})
.then(() => {
this.deleteBuild(row)
let ids = [row.buildingId];
this.deleteBuild(ids, false)
})
.catch(err => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
},
async deleteCommunityBatch() {
let ids = []
this.selection.forEach(element => {
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的楼栋?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
let ids = [];
console.log(this.selection);
this.selection.forEach((element) => {
ids.push(element.buildingId);
});
//
this.deleteBuild(ids, false)
})
.catch(err => {
if (err == "cancel") {
ids.push(element.buildingId)
});
}
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds"
});
} else {
this.$message.warning('请先选择要删除的楼栋')
}
},
async deleteBuild (ids, forceDelete) {
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds";
let params = {
forceDelete: forceDelete,
type: 'building',
ids: ids
}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
message: "删除成功",
});
this.$emit('refreshTree')
this.loadTable()
} else if (code > 8000) {
this.$message({
showClose: true,
message: msg,
duration: 0
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
},
.then(() => {
async deleteBuild(row) {
const url = "/actual/base/communityBuilding/deleteBuilding"
this.deleteBuild(ids, true);
})
.catch((err) => {
if (err == "cancel") {
let params = {
buildingId: row.buildingId
}
}
});
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
// this.$message.error(msg)
this.$message.error(msg);
}
},
async detail(row) {
async detail (row) {
const url = "/actual/base/communityBuilding/getBuildingDetail/" + row.buildingId
@ -544,7 +686,7 @@ export default {
},
//
async handleExport() {
async handleExport () {
//
// let title = this.agencyObj.label
// title = title + ''
@ -569,7 +711,7 @@ export default {
await this.getExportList();
},
async getExportList(type) {
async getExportList (type) {
const url = "/oper/customize/icformitemgroup/list";
let params = {
formCode: "community_info",
@ -594,35 +736,35 @@ export default {
}
},
async getQueryConditions() {
let params = {
formCode: "community_info",
customerId: this.$store.state.user.customerId,
};
const { data } = await this.$http.post(
"/oper/customize/icform/queryItems",
params
);
if (data.code === 0) {
this.queryConditions = data.data.map((item) => {
return {
...item,
humpName: util.capitalToHump(item.columnName),
};
});
console.log(this.queryConditions);
} else {
this.$message.error(data.msg);
}
},
handleDiyClose() {
async getQueryConditions () {
let params = {
formCode: "community_info",
customerId: this.$store.state.user.customerId,
};
const { data } = await this.$http.post(
"/oper/customize/icform/queryItems",
params
);
if (data.code === 0) {
this.queryConditions = data.data.map((item) => {
return {
...item,
humpName: util.capitalToHump(item.columnName),
};
});
console.log(this.queryConditions);
} else {
this.$message.error(data.msg);
}
},
handleDiyClose () {
this.diyDialog = false;
},
//
download(data, fileName) {
download (data, fileName) {
if (!data) {
return
}
@ -647,7 +789,7 @@ export default {
},
handleExportModule(type) {
handleExportModule (type) {
let title = ''
let url = ""
@ -680,7 +822,7 @@ export default {
},
//
handleExportYihuyidang() {
handleExportYihuyidang () {
this.yihuyidangDisabled = true
let title = this.agencyObj.label
title = title + '-一户一档'
@ -719,7 +861,7 @@ export default {
//
beforeUpload(file, type) {
beforeUpload (file, type) {
this.files = file;
const isText = file.type === 'application/vnd.ms-excel'
@ -737,11 +879,11 @@ export default {
},
//
handleExceed(files, fileList) {
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
},
async uploadFile(type) {
async uploadFile (type) {
if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false
@ -817,7 +959,7 @@ export default {
},
showMessage(msg) {
showMessage (msg) {
this.$alert(msg, '操作结果', {
confirmButtonText: '关闭',
callback: action => {
@ -827,18 +969,18 @@ export default {
});
},
handleSizeChange(val) {
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
@ -846,7 +988,7 @@ export default {
})
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
@ -856,7 +998,7 @@ export default {
watch: {
'$store.state.sidebarFold': {
handler(newVal, oldVal) {
handler (newVal, oldVal) {
if (newVal) {//
this.searchHeight = 155

141
src/views/modules/base/community/communityForm.vue

@ -9,24 +9,22 @@
label-width="150px"
class="g-edit-form">
<el-form-item label="所属组织"
<el-form-item v-if="formType==='edit'"
label="所属网格"
style="display: block">
<span>{{ dataForm.agencyName }}</span>
<span>{{ dataForm.agencyName+'-'+dataForm.gridName }}</span>
</el-form-item>
<el-form-item label="所属网格"
<el-form-item v-if="formType==='add'"
label="所属组织"
prop="gridId"
style="display: block">
<el-select class="u-edit-width-normal"
v-model="dataForm.gridId"
placeholder="请选择"
clearable>
<el-option v-for="(item,index) in gridList"
@click.native="handleSelGrid(index)"
:key="item.gridId"
:label="item.gridName"
:value="item.gridId">
</el-option>
</el-select>
<el-cascader ref="ref_cascader_agency"
class="u-edit-width-normal"
v-model="dataForm.gridId"
@change="handleChangeAngency"
:props="props"
clearable />
</el-form-item>
<el-form-item label="小区名称"
@ -202,7 +200,7 @@
<script>
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { requestPost, requestGet } from '@/js/dai/request'
import daiMap from "@/utils/dai-map";
var map
var search
@ -218,8 +216,6 @@ export default {
resultList: [],
loading: false,
gridList: [],
propertyList: [],
btnDisable: false,
@ -227,6 +223,7 @@ export default {
quartersType: '0',
propertyId: '',
dataForm: {
// cascaderId: '',
neighborHoodName: '', // 50
agencyId: '', // ID
agencyName: '',
@ -250,20 +247,94 @@ export default {
},
keyWords: '',
agencyObj: {}
agencyObj: {},
//
props: {
checkStrictly: true,
emitPath: false,
// children: 'subAgencyList',
// label: 'agencyName',
// value: 'agencyId',
lazy: true,
lazyLoad: this.lazyLoadAgency
},
userAgencyId: '',
}
},
components: {},
async created () {
this.user = this.$store.state.user;
this.userAgencyId = this.user.agencyId;
await this.loadAgency()
await this.loadGrid()
await this.loadProperty()
},
methods: {
handleSelGrid (index) {
this.dataForm.gridName = this.gridList[index].gridName
lazyLoadAgency (node, resolve) {
setTimeout(() => {
this.getAgency(node, resolve)
}, 200)
},
async getAgency (node, resolve) {
const url = "/gov/org/agency/dynamicOrgTreeWithDepth"
console.log('级联', node.value)
let params = {
rootOrgId: node.value ? node.value : '',
leafDepth: 1
}
const { data, code, msg } = await requestGet(url, params)
let array = []
if (node.value) {//
array = data.children.length > 0 ? data.children : []
} else {
array = [data]
}
if (code === 0) {
const nodes = array.map(item => ({
value: item.id, //
label: item.name,
level: item.agencyLevel,
orgType: item.orgType,
leaf: node.level >= 4 // 5
}))
resolve(nodes)
} else {
this.$message.error(msg)
}
},
handleChangeAngency (val) {
let selAgency = this.$refs.ref_cascader_agency.getCheckedNodes()[0]
console.log('选择的组织', selAgency)
if (selAgency.data) {
if (selAgency.data.orgType !== 'grid') {
this.dataForm.gridId = ''
this.dataForm.agencyId = ''
this.$message.info('请选择网格')
return false
} else {
this.dataForm.gridId = val
this.dataForm.agencyId = selAgency.parent.value
}
} else {
this.dataForm.gridId = ''
this.dataForm.agencyId = ''
}
},
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
@ -289,11 +360,11 @@ export default {
// map.setMarker(this.dataForm.latitude, this.dataForm.longitude);
// }
if (agencyObj.level == 'grid') {
console.log(agencyObj)
this.dataForm.gridId = agencyObj.id
this.dataForm.gridName = agencyObj.label
}
// if (agencyObj.level == 'grid') {
// console.log(agencyObj)
// this.dataForm.gridId = agencyObj.id
// this.dataForm.gridName = agencyObj.label
// }
},
// init
initMap (latitude, longitude) {
@ -401,22 +472,7 @@ export default {
this.$message.error(msg)
}
},
//
async loadGrid () {
const url = '/gov/org/grid/allgridsnopermission'
// const url = "https://epmet-dev.elinkservice.cn:7082/api/apimock-v2/95518686fa128a53f64c678906848062/gov/org/grid/allgrids"
let params = {
agencyId: this.dataForm.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.gridList = data
} else {
this.$message.error(msg)
}
},
//
async loadProperty () {
const url = '/actual/base/communityPropertyManagement/listPropertyManagements'
@ -462,6 +518,7 @@ export default {
}
},
async addCommunity () {
console.log('dataForm', this.dataForm)
let url = ''
if (this.formType === 'add') {
@ -587,7 +644,7 @@ export default {
{ required: true, message: '所属组织不能为空', trigger: 'blur' }
],
gridId: [
{ required: true, message: '所属网格不能为空', trigger: 'blur' }
{ required: true, message: '所属组织不能为空', trigger: 'blur' }
],
coding: [
{ required: true, message: '小区编码不能为空', trigger: 'blur' }

1302
src/views/modules/base/community/communityTable copy.vue

File diff suppressed because it is too large

528
src/views/modules/base/community/communityTable.vue

@ -2,56 +2,99 @@
<div class="m-table">
<div class="u-table-btn2">
<div class="u-table-btn2-left">
<el-button style="" size="small" type="primary " icon="el-icon-plus" @click="handleAdd">新增小区</el-button>
<div v-if="showImportBtn" class="u-btn-upload">
<el-popover v-if="showImportBtn" popper-class="btn-popper" placement="bottom" width="20" trigger="click">
<el-button style=""
size="small"
type="primary "
icon="el-icon-plus"
@click="handleAdd">新增小区</el-button>
<div v-if="showImportBtn"
class="u-btn-upload">
<el-popover v-if="showImportBtn"
popper-class="btn-popper"
placement="bottom"
width="20"
trigger="click">
<div class="table-more-btn">
<el-upload :headers="$getElUploadHeaders()" ref="upload_community" style="text-align: center"
:multiple="false" :show-file-list="false" :before-upload="(file) => {
<el-upload :headers="$getElUploadHeaders()"
ref="upload_community"
style="text-align: center"
:multiple="false"
:show-file-list="false"
:before-upload="(file) => {
beforeUpload(file, 'community');
}
" action="" accept=".xls,.xlsx" :http-request="() => {
"
action=""
accept=".xls,.xlsx"
:http-request="() => {
uploadFile('community');
}
">
<el-button size="small" type="text" class="diy-button--other">导入小区数据</el-button>
<el-button size="small"
type="text"
class="diy-button--other">导入小区数据</el-button>
</el-upload>
</div>
<div class="table-more-btn">
<el-upload :headers="$getElUploadHeaders()" style="text-align: center" ref="upload_building"
:multiple="false" :show-file-list="false" :before-upload="(file) => {
<el-upload :headers="$getElUploadHeaders()"
style="text-align: center"
ref="upload_building"
:multiple="false"
:show-file-list="false"
:before-upload="(file) => {
beforeUpload(file, 'building');
}
" action="" accept=".xls,.xlsx" :http-request="() => {
"
action=""
accept=".xls,.xlsx"
:http-request="() => {
uploadFile('building');
}
">
<el-button size="small" type="text" class="diy-button--other">导入楼栋数据</el-button>
<el-button size="small"
type="text"
class="diy-button--other">导入楼栋数据</el-button>
</el-upload>
</div>
<div class="table-more-btn">
<el-upload :headers="$getElUploadHeaders()" style="text-align: center" ref="upload_room" :multiple="false"
:show-file-list="false" :before-upload="(file) => {
<el-upload :headers="$getElUploadHeaders()"
style="text-align: center"
ref="upload_room"
:multiple="false"
:show-file-list="false"
:before-upload="(file) => {
beforeUpload(file, 'room');
}
" action="" accept=".xls,.xlsx" :http-request="() => {
"
action=""
accept=".xls,.xlsx"
:http-request="() => {
uploadFile('room');
}
">
<el-button size="small" type="text" class="diy-button--other">导入房屋数据</el-button>
<el-button size="small"
type="text"
class="diy-button--other">导入房屋数据</el-button>
</el-upload>
</div>
<el-button size="small" style="float: right" class="diy-button--white" slot="reference">导入<i
class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-button size="small"
style="float: right"
class="diy-button--white"
slot="reference">导入<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover>
</div>
<el-button style="margin-left: 10px" class="diy-button--white" size="small"
@click="handleExportOpen">导出</el-button>
<el-button style="margin-left: 10px"
class="diy-button--white"
size="small"
@click="handleExportOpen">导出</el-button>
<el-button style="margin-left: 10px" class="diy-button--white" size="small" @click="deleteBatch">批量删除</el-button>
<el-button style="margin-left: 10px"
class="diy-button--white"
size="small"
@click="deleteBatch">批量删除</el-button>
<!-- <el-button style=";margin-left:10px"
class="diy-button--export"
@ -60,19 +103,34 @@
@click="handleExportYihuyidang()">导出一户一档</el-button> -->
</div>
<div>
<el-popover popper-class="btn-popper" placement="bottom" style="margin-left: 10px" width="20" trigger="click">
<div v-if="showImportBtn" class="table-more-btn">
<el-button class="diy-button--other" size="small" type="text"
@click="handleExportModule('community')">下载小区模板</el-button>
<el-popover popper-class="btn-popper"
placement="bottom"
style="margin-left: 10px"
width="20"
trigger="click">
<div v-if="showImportBtn"
class="table-more-btn">
<el-button class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('community')">下载小区模板</el-button>
</div>
<div v-if="showImportBtn" class="table-more-btn">
<el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
@click="handleExportModule('building')">下载楼栋模板</el-button>
<div v-if="showImportBtn"
class="table-more-btn">
<el-button :headers="$getElUploadHeaders()"
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('building')">下载楼栋模板</el-button>
</div>
<div v-if="showImportBtn" class="table-more-btn">
<el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
@click="handleExportModule('room')">下载房屋模板</el-button>
<div v-if="showImportBtn"
class="table-more-btn">
<el-button :headers="$getElUploadHeaders()"
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('room')">下载房屋模板</el-button>
</div>
<!-- <div
v-if="
@ -105,8 +163,12 @@
>补全小程序小区码</el-button
>
</div> -->
<div v-if="displayedBaobiaoBtn" class="table-more-btn">
<el-button size="small" type="text" class="diy-button--other" @click="reportForm">智能填报</el-button>
<div v-if="displayedBaobiaoBtn"
class="table-more-btn">
<el-button size="small"
type="text"
class="diy-button--other"
@click="reportForm">智能填报</el-button>
</div>
<!-- <div
v-if="agencyObj.level == 'community'"
@ -120,27 +182,51 @@
>社区二维码</el-button
>
</div> -->
<el-button size="small" style="float: right" class="diy-button--white" slot="reference">更多<i
class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-button size="small"
style="float: right"
class="diy-button--white"
slot="reference">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover>
</div>
</div>
<div class="m-table-item">
<el-table ref="ref_table" :data="tableData" border :height="tableHeight" v-loading="tableLoading"
style="width: 100%" :show-overflow-tooltip="true" @select-all="selectAll" @selection-change="selectionChange">
<el-table-column type="selection" :selectable="checkSelect" width="55">
<el-table ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%"
:show-overflow-tooltip="true"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column>
<el-table-column prop="neighborHoodName" label="小区名称" header-align="left" align="left" min-width="100">
<el-table-column prop="neighborHoodName"
label="小区名称"
header-align="left"
align="left"
min-width="100">
<template slot-scope="scope">
<a class="name-a" @click="handleToNextLevel(scope.row)">
<a class="name-a"
@click="handleToNextLevel(scope.row)">
{{ scope.row.neighborHoodName }}
</a>
</template>
</el-table-column>
<el-table-column prop="agencyName" label="所属组织" header-align="left" align="left" min-width="100">
<el-table-column prop="agencyName"
label="所属组织"
header-align="left"
align="left"
min-width="100">
</el-table-column>
<el-table-column prop="gridName" label="所属网格" header-align="left" align="left" min-width="120">
<el-table-column prop="gridName"
label="所属网格"
header-align="left"
align="left"
min-width="120">
</el-table-column>
<!-- <el-table-column prop="总单元数"
label="所属网格"
@ -150,37 +236,84 @@
label="所属网格"
min-width="80">
</el-table-column> -->
<el-table-column prop="address" label="详细地址" header-align="left" align="left" min-width="180">
<el-table-column prop="address"
label="详细地址"
header-align="left"
align="left"
min-width="180">
</el-table-column>
<el-table-column label="操作" fixed="right" width="220" header-align="center" align="center" class="operate">
<el-table-column label="操作"
fixed="right"
width="220"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="scope.row.showBtn" type="text" class="div-table-button--blue" size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button v-if="scope.row.showBtn" type="text" class="div-table-button--blue" size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<!-- <el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--blue"
size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button v-if="scope.row.showBtn"
type="text"
class="div-table-button--blue"
size="small"
@click="handleDelete(scope.row)">删除</el-button> -->
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 详情弹出框 -->
<el-dialog :visible.sync="detailShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="'小区详情'"
width="920px" top="5vh" class="dialog-h" @closed="detailFormCancle">
<community-detail ref="ref_form_detail" @diaDetailClose="detailFormCancle"></community-detail>
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'小区详情'"
width="920px"
top="5vh"
class="dialog-h"
@closed="detailFormCancle">
<community-detail ref="ref_form_detail"
@diaDetailClose="detailFormCancle"></community-detail>
</el-dialog>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" v-if="formShow" :close-on-click-modal="false" :close-on-press-escape="false"
:title="formTitle" width="670px" top="5vh" class="dialog-h" @closed="diaClose">
<community-form ref="ref_form" @dialogCancle="addFormCancle" @dialogOk="addFormOk"></community-form>
<el-dialog :visible.sync="formShow"
v-if="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="670px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<community-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></community-form>
</el-dialog>
<!-- <el-dialog title="导出"
@ -204,14 +337,24 @@
</el-dialog> -->
<el-dialog :visible.sync="diyDialog" :close-on-click-modal="false" :close-on-press-escape="false" width="1150px"
title="导出模板" top="5vh" class="dialog-h">
<community-export-info v-if="diyDialog" ref="ref_diy" :list="exportList" :search="{
<el-dialog :visible.sync="diyDialog"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="1150px"
title="导出模板"
top="5vh"
class="dialog-h">
<community-export-info v-if="diyDialog"
ref="ref_diy"
:list="exportList"
:search="{
formCode: 'community_info',
pageNo: pageNo,
pageSize: pageSize,
conditions:queryConditions
}" :orgId="treeObj.id" @close="handleDiyClose"></community-export-info>
}"
:orgId="treeObj.id"
@close="handleDiyClose"></community-export-info>
</el-dialog>
<baobiao ref="baobiao" />
@ -268,7 +411,7 @@ export default {
},
},
data() {
data () {
return {
searchHeight: 190, //
// tableHeight: 0,
@ -320,7 +463,7 @@ export default {
},
computed: {
tableHeight() {
tableHeight () {
console.log(this.searchHeight);
let height = this.searchHeight + 270;
return this.$store.state.inIframe
@ -331,7 +474,7 @@ export default {
...mapGetters(["clientHeight", "iframeHeight"]),
},
watch: {
selection(val) {
selection (val) {
if (val.length > 0) {
this.showDeletBtn = true;
} else {
@ -339,7 +482,7 @@ export default {
}
},
"$store.state.sidebarFold": {
handler(newVal, oldVal) {
handler (newVal, oldVal) {
if (newVal) {
//
this.searchHeight = 155;
@ -358,9 +501,9 @@ export default {
communityExportInfo,
},
activated() { },
activated () { },
async mounted() {
async mounted () {
this.customerId = localStorage.getItem("customerId");
this.displayedBaobiaoBtn = await this.$refs.baobiao.existsTemplate({
elseParams: {
@ -371,31 +514,31 @@ export default {
},
methods: {
async getQueryConditions() {
let params = {
formCode: "community_info",
customerId: this.$store.state.user.customerId,
};
const { data } = await this.$http.post(
"/oper/customize/icform/queryItems",
params
);
if (data.code === 0) {
this.queryConditions = data.data.map((item) => {
return {
...item,
humpName: util.capitalToHump(item.columnName),
};
});
console.log(this.queryConditions);
} else {
this.$message.error(data.msg);
}
async getQueryConditions () {
let params = {
formCode: "community_info",
customerId: this.$store.state.user.customerId,
};
const { data } = await this.$http.post(
"/oper/customize/icform/queryItems",
params
);
if (data.code === 0) {
this.queryConditions = data.data.map((item) => {
return {
...item,
humpName: util.capitalToHump(item.columnName),
};
});
console.log(this.queryConditions);
} else {
this.$message.error(data.msg);
}
},
reportForm() {
reportForm () {
let paramMap = {
pageSize: this.pageSize,
pageNo: this.pageNo,
@ -418,7 +561,7 @@ export default {
},
});
},
async loadTable(fromTree, treeObj) {
async loadTable (fromTree, treeObj) {
this.treeObj = { ...treeObj }
@ -475,10 +618,10 @@ export default {
this.total = data.total;
data.list.forEach((item) => {
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true;
// item.showBtn = true;
this.validTableDataNum++;
} else {
item.showBtn = false;
// item.showBtn = false;
}
});
this.tableData = data.list;
@ -488,23 +631,23 @@ export default {
this.tableLoading = false;
},
checkSelect(row, index) {
let isChecked = false;
if (row.showBtn) {
//
isChecked = true;
} else {
isChecked = false;
}
checkSelect (row, index) {
let isChecked = true;
// if (row.showBtn) {
// //
// isChecked = true;
// } else {
// isChecked = false;
// }
return isChecked;
},
diaClose() {
diaClose () {
this.$refs.ref_form.resetData();
this.formShow = false;
},
async handleDetail(row) {
async handleDetail (row) {
// this.formTitle = ''
// this.formShow = true
// const _data = await this.detail(row)
@ -520,14 +663,14 @@ export default {
});
},
handleAdd() {
handleAdd () {
this.formTitle = "新增小区";
this.formShow = true;
this.$nextTick(() => {
this.$refs.ref_form.initForm("add", null, this.agencyObj);
});
},
async detail(row) {
async detail (row) {
const url =
"/actual/base/communityQuarters/getQuartersDetail/" +
row.neighborHoodId;
@ -541,7 +684,7 @@ export default {
}
},
//
async handleYhymInfo() {
async handleYhymInfo () {
this.yhymLoading = true;
const url = "/gov/org/house/createBatchHouseCodeAndUrl";
@ -568,7 +711,7 @@ export default {
}
},
//
async createBatchNeiQrUrl() {
async createBatchNeiQrUrl () {
this.xcxmLoading = true;
const url = "/gov/org/neighborhood/createBatchNeiQrUrl";
@ -594,7 +737,7 @@ export default {
this.$message.error(msg);
}
},
async handleEdit(row) {
async handleEdit (row) {
this.formTitle = "修改小区";
this.formShow = true;
const _data = await this.detail(row);
@ -603,24 +746,50 @@ export default {
});
},
handleToNextLevel(row) {
handleToNextLevel (row) {
this.$emit("toNextLevel", row, "community");
},
addFormCancle() {
addFormCancle () {
this.formShow = false;
},
detailFormCancle() {
detailFormCancle () {
this.$refs.ref_form_detail.diaDestroy();
this.detailShow = false;
},
addFormOk() {
addFormOk () {
this.formShow = false;
this.loadTable();
this.$emit("refreshTree");
},
deleteBatch() {
selectAll (selection) {
this.selection = selection;
},
selectionChange (selection) {
this.selection = selection;
},
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let ids = [row.neighborHoodId];
//
this.deleteCommunity(ids, false);
})
.catch((err) => {
if (err == "cancel") {
}
});
},
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的小区?", "提示", {
confirmButtonText: "确定",
@ -628,7 +797,15 @@ export default {
type: "warning",
})
.then(() => {
this.deleteCommunityBatch();
let ids = [];
console.log(this.selection);
this.selection.forEach((element) => {
ids.push(element.neighborHoodId);
});
//
this.deleteCommunity(ids, false);
})
.catch((err) => {
if (err == "cancel") {
@ -642,45 +819,14 @@ export default {
this.$message.warning("请先选择要删除的小区");
}
},
selectAll(selection) {
this.selection = selection;
},
selectionChange(selection) {
this.selection = selection;
},
async handleDelete(row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteCommunity(row);
})
.catch((err) => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
},
async deleteCommunityBatch() {
let ids = [];
console.log(this.selection);
this.selection.forEach((element) => {
ids.push(element.neighborHoodId);
});
async deleteCommunity (ids, forceDelete) {
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds";
let params = {
type: "neighborHood",
ids: ids,
};
forceDelete: forceDelete,
type: 'neighborHood',
ids: ids
}
const { data, code, msg } = await requestPost(url, params);
@ -691,39 +837,31 @@ export default {
});
this.$emit("refreshTree");
this.loadTable();
} else if (code > 8000) {
this.$message({
showClose: true,
message: msg,
duration: 0,
});
this.$emit("refreshTree");
this.loadTable();
} else {
this.$message.error(msg);
}
},
async deleteCommunity(row) {
const url = "/actual/base/communityQuarters/deleteQuarters";
let params = {
neighborHoodId: row.neighborHoodId,
};
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteCommunity(ids, true);
})
.catch((err) => {
if (err == "cancel") {
}
});
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "删除成功",
});
this.$emit("refreshTree");
this.loadTable();
} else {
// this.$message.error(msg);
this.$message.error(msg);
}
},
async handleDownQr(row, type) {
async handleDownQr (row, type) {
let title = row.label + "二维码.png";
// const url = window.SITE_CONFIG['apiURL'] + `/gov/org/icneighborhood/createQrCode/${row.neighborHoodId}`
const url = "/gov/org/agency/create-qrcode";
@ -748,10 +886,10 @@ export default {
});
},
//
async handleExportOpen() {
async handleExportOpen () {
await this.getExportList();
},
async getExportList(type) {
async getExportList (type) {
const url = "/oper/customize/icformitemgroup/list";
let params = {
formCode: "community_info",
@ -776,7 +914,7 @@ export default {
}
},
//
async handleExport() {
async handleExport () {
let title = this.agencyObj.label;
title = title + "—小区列表";
@ -797,15 +935,15 @@ export default {
}
);
},
handleDiyClose() {
handleDiyClose () {
this.diyDialog = false;
},
handleClose(done) {
handleClose (done) {
this.diyDialog = false;
},
//
download(data, downFileName) {
download (data, downFileName) {
if (!data) {
return;
}
@ -829,7 +967,7 @@ export default {
}
},
handleExportModule(type) {
handleExportModule (type) {
let title = "";
let url = "";
if (type === "community") {
@ -858,7 +996,7 @@ export default {
},
//
handleExportYihuyidang() {
handleExportYihuyidang () {
this.yihuyidangDisabled = true;
let title = this.agencyObj.label;
title = title + "-一户一档";
@ -900,7 +1038,7 @@ export default {
//
handleExportYihuyima() {
handleExportYihuyima () {
this.exportBtn = true;
this.yihuyimaDisabled = true;
let title = this.agencyObj.label;
@ -929,7 +1067,7 @@ export default {
},
//
beforeUpload(file, type) {
beforeUpload (file, type) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
@ -948,11 +1086,11 @@ export default {
}
},
//
handleExceed(files, fileList) {
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`);
},
async uploadFile(type) {
async uploadFile (type) {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
@ -1033,7 +1171,7 @@ export default {
);
},
showMessage(msg) {
showMessage (msg) {
this.$alert(msg, "操作结果", {
confirmButtonText: "关闭",
callback: (action) => {
@ -1042,18 +1180,18 @@ export default {
},
});
},
handleSizeChange(val) {
handleSizeChange (val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable(this.treeObj);
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.loadTable(this.treeObj);
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -1061,7 +1199,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();

88
src/views/modules/base/community/roomDetail.vue

@ -35,6 +35,10 @@
<span class="u-info-title u-info-title-80">房屋状态</span>
<span>{{ dataForm.rentName ? dataForm.rentName : "--" }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title u-info-title-80">家庭标签</span>
<span>{{ dataForm.familyTagShow ? dataForm.familyTagShow : "--" }}</span>
</div>
<div class="m-info-prop">
<span class="u-info-title u-info-title-80">房主姓名</span>
<span>{{ dataForm.ownerName ? dataForm.ownerName : "--" }}</span>
@ -44,8 +48,14 @@
<span class="info-mingan">{{
dataForm.ownerPhone ? dataForm.ownerPhone : "--"
}}</span>
<img v-show="showFlagMobileBtn &&dataForm.ownerPhone" src="../../../../assets/img/yanjing1.png" alt="" style="margin-left: 10px">
<img v-show="!showFlagMobileBtn" src="../../../../assets/img/yanjing2.png" alt="" style="margin-left: 10px">
<img v-show="showFlagMobileBtn &&dataForm.ownerPhone"
src="../../../../assets/img/yanjing1.png"
alt=""
style="margin-left: 10px">
<img v-show="!showFlagMobileBtn"
src="../../../../assets/img/yanjing2.png"
alt=""
style="margin-left: 10px">
<el-button v-if="view_real_data && dataForm.ownerPhone"
type="text"
class="div-table-button--blue"
@ -57,8 +67,16 @@
<span class="info-mingan">{{
dataForm.ownerIdCard ? dataForm.ownerIdCard : "--"
}}</span>
<img v-show="showFlagIdCardBtn &&dataForm.ownerIdCard" src="../../../../assets/img/yanjing1.png" alt="" width="14px" style="margin-left: 10px">
<img v-show="!showFlagIdCardBtn" src="../../../../assets/img/yanjing2.png" alt="" width="14px" style="margin-left: 10px">
<img v-show="showFlagIdCardBtn &&dataForm.ownerIdCard"
src="../../../../assets/img/yanjing1.png"
alt=""
width="14px"
style="margin-left: 10px">
<img v-show="!showFlagIdCardBtn"
src="../../../../assets/img/yanjing2.png"
alt=""
width="14px"
style="margin-left: 10px">
<el-button v-if="view_real_data && dataForm.ownerIdCard"
type="text"
class="div-table-button--blue"
@ -133,14 +151,23 @@ export default {
sysCoding: "",
neighborHoodName: "",
buildingName: "",
familyTags: [],
familyTagShow: ''
},
showFlagIdCardBtn:true,
showFlagMobileBtn:true,
showFlagIdCardBtn: true,
showFlagMobileBtn: true,
keyWords: "",
dicts: {
family_tag: []
}, //
};
},
components: {},
async created () {
await this.getDicts();
},
mounted () { },
methods: {
@ -170,16 +197,16 @@ export default {
if (type === "phone") {
this.$set(this.dataForm, "ownerPhone", data.ownerPhone);
this.showFlagMobileBtn = !this.showFlagMobileBtn
if(this.showFlagMobileBtn){
this.$set(this.dataForm, 'ownerPhone', data.ownerPhone.substr(0,3) +'****'+ data.ownerPhone.substr(7,4) )
}
if (this.showFlagMobileBtn) {
this.$set(this.dataForm, 'ownerPhone', data.ownerPhone.substr(0, 3) + '****' + data.ownerPhone.substr(7, 4))
}
}
if (type === "idcard") {
this.$set(this.dataForm, "ownerIdCard", data.ownerIdCard);
this.showFlagIdCardBtn = !this.showFlagIdCardBtn
if(this.showFlagIdCardBtn){
this.$set(this.dataForm, 'ownerIdCard', data.ownerIdCard.substr(0,11) +'****'+ data.ownerIdCard.substr(16,2) )
}
if (this.showFlagIdCardBtn) {
this.$set(this.dataForm, 'ownerIdCard', data.ownerIdCard.substr(0, 11) + '****' + data.ownerIdCard.substr(16, 2))
}
}
} else {
this.$message.error(msg);
@ -196,14 +223,47 @@ export default {
if (code === 0) {
// debugger
this.dataForm = { ...data };
console.log(data);
this.houseType = this.dataForm.houseType;
this.purpose = this.dataForm.purpose;
this.rentFlag = parseInt(this.dataForm.rentFlag);
if (this.dataForm.familyTags.length > 0) {
let array = []
this.dataForm.familyTags.forEach(onetag => {
this.dicts.family_tag.forEach(onedic => {
if (onetag === onedic.value) {
array.push(onedic.label)
}
});
});
this.dataForm.familyTagShow = array.join(',')
}
} else {
this.$message.error(msg);
}
},
async getDicts () {
try {
const dictTypes = ["family_tag"]; // dictType
const requests = dictTypes.map((dictType) => {
return this.$http.post("sys/dict/data/dictlist", {
dictType: dictType,
});
});
const results = await Promise.all(requests);
results.forEach((result, index) => {
if (result.data.code === 0) {
this.dicts[dictTypes[index]].push(...result.data.data);
} else {
console.log(`获取${dictTypes[index]}字典失败: ${result.msg}`);
}
});
} catch (error) {
console.log("获取字典失败: ", error);
}
},
resetData () {
this.houseId = ""; //ID

49
src/views/modules/base/community/roomForm.vue

@ -138,6 +138,16 @@
</el-radio-group>
</el-form-item>
<el-form-item label="家庭标签"
prop="rentFlag"
style="display: block">
<el-checkbox-group v-model="dataForm.familyTags"
@change="changeFamily">
<el-checkbox v-for="item in dicts.family_tag"
:label="item.value"
:key="item.value">{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="房主姓名"
prop="ownerName"
@ -221,8 +231,12 @@ export default {
remark: '',
// realPerson: 0,
coding: '',
sysCoding: ''
sysCoding: '',
familyTags: []//
},
dicts: {
family_tag: []
}, //
keyWords: '',
agencyObj: {},
@ -233,6 +247,9 @@ export default {
mounted () {
},
async created () {
await this.getDicts();
},
methods: {
@ -382,6 +399,33 @@ export default {
},
//
changeFamily (val) {
},
async getDicts () {
try {
const dictTypes = ["family_tag"]; // dictType
const requests = dictTypes.map((dictType) => {
return this.$http.post("sys/dict/data/dictlist", {
dictType: dictType,
});
});
const results = await Promise.all(requests);
results.forEach((result, index) => {
if (result.data.code === 0) {
this.dicts[dictTypes[index]].push(...result.data.data);
} else {
console.log(`获取${dictTypes[index]}字典失败: ${result.msg}`);
}
});
} catch (error) {
console.log("获取字典失败: ", error);
}
},
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
@ -406,7 +450,8 @@ export default {
ownerIdCard: '', //
remark: '', //
coding: '',
sysCoding: ''
sysCoding: '',
familyTags: []
}
},

541
src/views/modules/base/community/roomTable.vue

@ -3,74 +3,130 @@
<div class="u-table-btn2">
<div class="u-table-btn2-left">
<!-- v-show="btnAuths.ic_house_add" -->
<el-button v-if="agencyObj.level === 'building' || source !== 'search'" class="diy-button--blue"
icon="el-icon-plus" size="small" :disabled="addDisabled" @click="handleAdd">新增房屋</el-button>
<el-button v-if="agencyObj.level === 'building' || source !== 'search'"
class="diy-button--blue"
icon="el-icon-plus"
size="small"
:disabled="addDisabled"
@click="handleAdd">新增房屋</el-button>
<div class="u-btn-upload" v-if="showImportBtn">
<div class="u-btn-upload"
v-if="showImportBtn">
<el-popover popper-class="btn-popper" placement="bottom" width="20" trigger="hover">
<el-popover popper-class="btn-popper"
placement="bottom"
width="20"
trigger="hover">
<div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" -->
<el-upload ref="upload" :multiple="false" style="text-align: center" :show-file-list="false"
:before-upload="beforeUpload" action="" accept=".xls,.xlsx" :limit="1" :on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="" size="small" type="text" class="diy-button--other">导入房屋数据</el-button>
<el-upload ref="upload"
:multiple="false"
style="text-align: center"
:show-file-list="false"
:before-upload="beforeUpload"
action=""
accept=".xls,.xlsx"
:limit="1"
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style=""
size="small"
type="text"
class="diy-button--other">导入房屋数据</el-button>
</el-upload>
</div>
<el-button size="small" style="float:right" class="diy-button--white" slot="reference">导入<i
class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-button size="small"
style="float:right"
class="diy-button--white"
slot="reference">导入<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover>
</div>
<!-- v-if="btnAuths.ic_house_export" -->
<el-button style="float: left; margin-left: 10px" class="diy-button--white" size="small"
@click="handleExport">导出</el-button>
<el-button style="float: left; margin-left: 10px"
class="diy-button--white"
size="small"
@click="handleExport">导出</el-button>
<!-- v-if="btnAuths.ic_house_batch_del" -->
<el-button style="float: left; margin-left: 10px" class="diy-button--white" size="small"
@click="deleteBatch">批量删除</el-button>
<el-button style="float: left; margin-left: 10px"
class="diy-button--white"
size="small"
@click="deleteBatch">批量删除</el-button>
</div>
<div>
<el-popover popper-class="btn-popper" placement="bottom" style="margin-left: 10px" width="20" trigger="hover">
<el-popover popper-class="btn-popper"
placement="bottom"
style="margin-left: 10px"
width="20"
trigger="hover">
<div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" -->
<el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
@click="handleExportModule('community')">下载小区模板</el-button>
<el-button :headers="$getElUploadHeaders()"
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('community')">下载小区模板</el-button>
</div>
<div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" -->
<el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
@click="handleExportModule('building')">下载楼栋模板</el-button>
<el-button :headers="$getElUploadHeaders()"
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('building')">下载楼栋模板</el-button>
</div>
<div class="table-more-btn">
<!-- v-if="btnAuths.ic_house_import" -->
<el-button :headers="$getElUploadHeaders()" class="diy-button--other" size="small" type="text"
@click="handleExportModule('room')">下载房屋模板</el-button>
<el-button :headers="$getElUploadHeaders()"
class="diy-button--other"
size="small"
type="text"
@click="handleExportModule('room')">下载房屋模板</el-button>
</div>
<!-- v-if="btnAuths.ic_house_export_yhyd" -->
<div class="table-more-btn">
<el-button style="" class="diy-button--other" size="small" type="text" :disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
<el-button style=""
class="diy-button--other"
size="small"
type="text"
:disabled="yihuyidangDisabled"
@click="handleExportYihuyidang()">导出一户一档</el-button>
</div>
<!-- btnAuths.ic_house_smart_import && -->
<div v-if="displayedBaobiaoBtn" class="table-more-btn">
<el-button size="small" class="diy-button--other" type="text" @click="reportForm">智能填报</el-button>
<div v-if="displayedBaobiaoBtn"
class="table-more-btn">
<el-button size="small"
class="diy-button--other"
type="text"
@click="reportForm">智能填报</el-button>
</div>
<el-button size="small" style="float:right" class="diy-button--white" slot="reference">更多<i
class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-button size="small"
style="float:right"
class="diy-button--white"
slot="reference">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
</el-popover>
</div>
</div>
<div class="m-table-item">
<el-table ref="ref_table" :data="tableData" v-loading="tableLoading" @sort-change="handleSortOrderChange" border
:height="tableHeight" style="width: 100%" @select-all="selectAll" @selection-change="selectionChange">
<el-table-column type="selection" :selectable="checkSelect" width="55">
<el-table ref="ref_table"
:data="tableData"
v-loading="tableLoading"
@sort-change="handleSortOrderChange"
border
:height="tableHeight"
style="width: 100%"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
:selectable="checkSelect"
width="55">
</el-table-column>
<!-- <el-table-column fixed="left"
width="70"
@ -81,82 +137,183 @@
:index="indexMethod">
</el-table-column> -->
<el-table-column prop="houseNameShow" header-align="left" align="left" label="房屋名称" fixed="left" min-width="160">
<el-table-column prop="houseNameShow"
header-align="left"
align="left"
label="房屋名称"
fixed="left"
min-width="160">
</el-table-column>
<el-table-column prop="neighborHoodName" label="所属小区" header-align="left" align="left" min-width="150">
<el-table-column prop="neighborHoodName"
label="所属小区"
header-align="left"
align="left"
min-width="150">
</el-table-column>
<el-table-column prop="buildingName" label="所属楼栋" header-align="left" align="left" width="90">
<el-table-column prop="buildingName"
label="所属楼栋"
header-align="left"
align="left"
width="90">
</el-table-column>
<el-table-column prop="unitNum" label="单元号" header-align="left" align="left" width="80">
<el-table-column prop="unitNum"
label="单元号"
header-align="left"
align="left"
width="80">
</el-table-column>
<el-table-column prop="doorName" label="门牌号" header-align="left" align="left" width="80">
<el-table-column prop="doorName"
label="门牌号"
header-align="left"
align="left"
width="80">
</el-table-column>
<el-table-column prop="houseType" label="类型" header-align="left" align="left" width="70">
<el-table-column prop="houseType"
label="类型"
header-align="left"
align="left"
width="70">
</el-table-column>
<el-table-column prop="purpose" label="用途" header-align="left" align="left" width="70">
<el-table-column prop="purpose"
label="用途"
header-align="left"
align="left"
width="70">
</el-table-column>
<el-table-column prop="rentFlag" label="房屋状态" header-align="left" align="left" width="90">
<el-table-column prop="rentFlag"
label="房屋状态"
header-align="left"
align="left"
width="90">
</el-table-column>
<el-table-column prop="ownerName" label="房主姓名" header-align="left" align="left" width="90">
<el-table-column prop="ownerName"
label="房主姓名"
header-align="left"
align="left"
width="90">
</el-table-column>
<el-table-column prop="ownerPhone" label="联系方式" header-align="left" align="left" width="110">
<el-table-column prop="ownerPhone"
label="联系方式"
header-align="left"
align="left"
width="110">
</el-table-column>
<el-table-column prop="ownerIdCard" label="证件号" header-align="left" align="left" width="170">
<el-table-column prop="ownerIdCard"
label="证件号"
header-align="left"
align="left"
width="170">
</el-table-column>
<el-table-column prop="remark" label="备注" header-align="left" align="left" width="170">
<el-table-column prop="remark"
label="备注"
header-align="left"
align="left"
width="170">
</el-table-column>
<el-table-column prop="sort" sortable="custom" min-width="100" header-align="left" align="left" label="排序">
<el-table-column prop="sort"
sortable="custom"
min-width="100"
header-align="left"
align="left"
label="排序">
<template slot-scope="scope">
<div @click="handleEditSort(scope.row)">
<span v-if="!scope.row.isChange">{{ scope.row.sort }}</span>
<!-- :precision="2" -->
<el-input-number v-else @change="handleChangeSort(scope.row)" v-model="scope.row.sort" class="item_width_4"
size="small" :min="0" :max="9999" label="描述文字"></el-input-number>
<el-input-number v-else
@change="handleChangeSort(scope.row)"
v-model="scope.row.sort"
class="item_width_4"
size="small"
:min="0"
:max="9999"
label="描述文字"></el-input-number>
</div>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="220" header-align="center" align="center" class="operate">
<el-table-column label="操作"
fixed="right"
width="220"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<!-- v-if="btnAuths.ic_house_view" -->
<el-button type="text" class="div-table-button--blue" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<!-- btnAuths.ic_house_update && -->
<el-button v-if="scope.row.showBtn" type="text" class="div-table-button--blue" size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleEdit(scope.row)">编辑</el-button>
<!-- btnAuths.ic_house_del && -->
<el-button v-if="scope.row.showBtn" type="text" class="div-table-button--blue" size="small"
@click="handleDelete(scope.row)">删除</el-button>
<el-button type="text"
class="div-table-button--blue"
size="small"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total">
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="formTitle"
width="670px" top="5vh" class="dialog-h" @closed="diaClose">
<room-form ref="ref_form" @dialogCancle="addFormCancle" @dialogOk="addFormOk"></room-form>
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="670px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<room-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"></room-form>
</el-dialog>
<!-- 详情弹出框 -->
<el-dialog :visible.sync="detailShow" :close-on-click-modal="false" :close-on-press-escape="false" :title="'查看房屋'"
width="820px" top="5vh" class="dialog-h" @closed="detailFormCancle">
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'查看房屋'"
width="820px"
top="5vh"
class="dialog-h"
@closed="detailFormCancle">
<!-- :view_real_data="btnAuths.ic_house_view_real_data" -->
<room-detail ref="ref_form_detail" @diaDetailClose="detailFormCancle"></room-detail>
<room-detail ref="ref_form_detail"
@diaDetailClose="detailFormCancle"></room-detail>
</el-dialog>
<el-dialog :visible.sync="diyDialog" :close-on-click-modal="false" :close-on-press-escape="false" width="1150px"
title="导出模板" top="5vh" class="dialog-h">
<community-export-info v-if="diyDialog" ref="ref_diy" :list="exportList" :search="{
<el-dialog :visible.sync="diyDialog"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="1150px"
title="导出模板"
top="5vh"
class="dialog-h">
<community-export-info v-if="diyDialog"
ref="ref_diy"
:list="exportList"
:search="{
formCode: 'community_info',
pageNo: pageNo,
pageSize: pageSize,
conditions:queryConditions
}" :orgId="agencyObj.id" @close="handleDiyClose"></community-export-info>
}"
:orgId="agencyObj.id"
@close="handleDiyClose"></community-export-info>
</el-dialog>
<baobiao ref="baobiao" />
</div>
@ -170,10 +327,11 @@ import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // Loading
import baobiao from "@/views/modules/cpts/baobiao";
import communityExportInfo from "./communityExportInfo.vue";
import util from "@/js/util";
let loading; //
export default {
data() {
data () {
return {
searchHeight: 190,//
source: "tree", //
@ -234,7 +392,7 @@ export default {
ic_house_view_real_data: false, //
},
diyDialog: false,
queryConditions:[]
queryConditions: []
};
},
components: {
@ -243,7 +401,7 @@ export default {
roomDetail,
communityExportInfo
},
async mounted() {
async mounted () {
this.updateBtnAuths();
this.getQueryConditions()
@ -255,7 +413,7 @@ export default {
// });
},
computed: {
tableHeight() {
tableHeight () {
console.log(this.searchHeight)
let height = this.searchHeight + 270
return this.$store.state.inIframe ? this.clientHeight - height + this.iframeHeight : this.clientHeight - height
@ -266,7 +424,7 @@ export default {
},
methods: {
//
updateBtnAuths() {
updateBtnAuths () {
let rot = this.$route;
if (Array.isArray(rot.meta.btns)) {
rot.meta.btns.forEach((item) => {
@ -275,7 +433,7 @@ export default {
}
},
reportForm() {
reportForm () {
let paramMap = {
pageSize: this.pageSize,
pageNo: this.pageNo,
@ -303,25 +461,25 @@ export default {
});
},
indexMethod(index) {
indexMethod (index) {
return index + 1;
},
handleSortOrderChange(value) {
handleSortOrderChange (value) {
this.sortType = value.order === "ascending" ? "asc" : "desc";
this.loadTable();
},
handleSortChange(value) {
handleSortChange (value) {
this.sortType = value.order === "ascending" ? "asc" : "desc";
this.loadTable();
},
handleEditSort(row) {
handleEditSort (row) {
if (!row.isChange) {
row.isChange = true;
}
},
async handleChangeSort(row, index) {
async handleChangeSort (row, index) {
// row.isChange = false
let params = {
@ -344,20 +502,20 @@ export default {
}
},
checkSelect(row, index) {
let isChecked = false;
if (row.showBtn) {
//
isChecked = true;
} else {
isChecked = false;
}
checkSelect (row, index) {
let isChecked = true;
// if (row.showBtn) {
// //
// isChecked = true;
// } else {
// isChecked = false;
// }
return isChecked;
},
loadTreeFromSearch() { },
loadTreeFromSearch () { },
async loadTable(source, treeObj) {
async loadTable (source, treeObj) {
this.source = source;
this.tableLoading = true;
this.addDisabled = true
@ -424,10 +582,10 @@ export default {
item.doorName;
if (item.agencyId === this.staffAgencyId) {
item.showBtn = true;
// item.showBtn = true;
this.validTableDataNum++;
} else {
item.showBtn = false;
// item.showBtn = false;
}
});
this.tableData = data.list;
@ -438,12 +596,12 @@ export default {
this.tableLoading = false;
},
diaClose() {
diaClose () {
this.$refs.ref_form.resetData();
this.formShow = false;
},
handleDetail(row) {
handleDetail (row) {
this.detailShow = true;
// const _data = await this.detail(row)
@ -452,12 +610,12 @@ export default {
});
},
detailFormCancle() {
detailFormCancle () {
// this.$refs.ref_form_detail.diaDestroy()
this.detailShow = false;
},
handleAdd() {
handleAdd () {
this.formTitle = "新增房屋";
this.formShow = true;
this.$nextTick(() => {
@ -465,7 +623,7 @@ export default {
});
},
handleEdit(row) {
handleEdit (row) {
this.formTitle = "修改房屋";
this.formShow = true;
this.$nextTick(() => {
@ -473,52 +631,34 @@ export default {
});
},
addFormCancle() {
addFormCancle () {
this.formShow = false;
},
addFormOk() {
addFormOk () {
this.formShow = false;
this.loadTable();
this.$emit('refreshTree')
},
deleteBatch() {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的房屋?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteCommunityBatch();
})
.catch((err) => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
} else {
this.$message.warning("请先选择要删除的房屋");
}
},
selectAll(selection) {
selectAll (selection) {
this.selection = selection;
},
selectionChange(selection) {
selectionChange (selection) {
this.selection = selection;
},
async handleDelete(row) {
async handleDelete (row) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteRoom(row);
let ids = [row.houseId];
//
this.deleteRoom(ids, false)
})
.catch((err) => {
if (err == "cancel") {
@ -530,18 +670,43 @@ export default {
});
},
async deleteCommunityBatch() {
let ids = [];
this.selection.forEach((element) => {
ids.push(element.houseId);
});
deleteBatch () {
if (this.selection.length > 0) {
this.$confirm("确认删除选择的房屋?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let ids = [];
console.log(this.selection);
this.selection.forEach((element) => {
ids.push(element.houseId);
});
//
this.deleteRoom(ids, false)
})
.catch((err) => {
if (err == "cancel") {
// this.$message({
// type: "info",
// message: ""
// });
}
});
} else {
this.$message.warning("请先选择要删除的房屋");
}
},
async deleteRoom (ids, forceDelete) {
const url = "/actual/base/communityHouse/deleteCommunityInfoByIds";
let params = {
type: "house",
ids: ids,
};
forceDelete: forceDelete,
type: 'house',
ids: ids
}
const { data, code, msg } = await requestPost(url, params);
@ -552,42 +717,34 @@ export default {
});
this.$emit("refreshTree");
this.loadTable();
} else if (code > 8000) {
this.$message({
showClose: true,
message: msg,
duration: 0,
});
this.$emit("refreshTree");
this.loadTable();
} else {
this.$message.error(msg);
}
},
async deleteRoom(row) {
const url = "/actual/base/communityHouse/deleteHouse";
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = {
houseId: row.houseId,
};
this.deleteRoom(ids, true);
})
.catch((err) => {
if (err == "cancel") {
}
});
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.$message({
type: "success",
message: "删除成功",
});
this.$emit("refreshTree");
this.loadTable();
} else {
// this.$message.error(msg);
this.$message.error(msg);
}
},
//
async handleExport() {
async handleExport () {
// let title = this.agencyObj.label;
// title = title + "";
@ -641,7 +798,7 @@ export default {
// );
await this.getExportList();
},
async getExportList(type) {
async getExportList (type) {
const url = "/oper/customize/icformitemgroup/list";
let params = {
formCode: "community_info",
@ -665,34 +822,34 @@ export default {
this.$message.error(msg);
}
},
async getQueryConditions() {
let params = {
formCode: "community_info",
customerId: this.$store.state.user.customerId,
};
const { data } = await this.$http.post(
"/oper/customize/icform/queryItems",
params
);
if (data.code === 0) {
this.queryConditions = data.data.map((item) => {
return {
...item,
humpName: util.capitalToHump(item.columnName),
};
});
console.log(this.queryConditions);
} else {
this.$message.error(data.msg);
}
async getQueryConditions () {
let params = {
formCode: "community_info",
customerId: this.$store.state.user.customerId,
};
const { data } = await this.$http.post(
"/oper/customize/icform/queryItems",
params
);
if (data.code === 0) {
this.queryConditions = data.data.map((item) => {
return {
...item,
humpName: util.capitalToHump(item.columnName),
};
});
console.log(this.queryConditions);
} else {
this.$message.error(data.msg);
}
},
handleDiyClose() {
handleDiyClose () {
this.diyDialog = false;
},
//
download(data, fileName) {
download (data, fileName) {
if (!data) {
return;
}
@ -716,7 +873,7 @@ export default {
}
},
handleExportModule(type) {
handleExportModule (type) {
let title = ''
let url = ""
@ -749,7 +906,7 @@ export default {
},
//
handleExportYihuyidang() {
handleExportYihuyidang () {
this.yihuyidangDisabled = true;
let title = this.agencyObj.label;
title = title + "-一户一档";
@ -809,7 +966,7 @@ export default {
);
},
//
beforeUpload(file) {
beforeUpload (file) {
this.files = file;
const isText = file.type === "application/vnd.ms-excel";
@ -826,11 +983,11 @@ export default {
}
},
//
handleExceed(files, fileList) {
handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`);
},
async uploadFile() {
async uploadFile () {
if (this.fileName == "") {
this.$message.warning("请选择要上传的文件!");
return false;
@ -884,7 +1041,7 @@ export default {
);
},
showMessage(msg) {
showMessage (msg) {
this.$alert(msg, "操作结果", {
confirmButtonText: "关闭",
callback: (action) => {
@ -894,18 +1051,18 @@ export default {
});
},
handleSizeChange(val) {
handleSizeChange (val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.loadTable();
},
//
startLoading() {
startLoading () {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
@ -913,7 +1070,7 @@ export default {
});
},
//
endLoading() {
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close();
@ -921,7 +1078,7 @@ export default {
},
},
watch: {
selection(val) {
selection (val) {
if (val.length > 0) {
this.showDeletBtn = true;
} else {
@ -929,7 +1086,7 @@ export default {
}
},
'$store.state.sidebarFold': {
handler(newVal, oldVal) {
handler (newVal, oldVal) {
if (newVal) {//
this.searchHeight = 155

142
src/views/modules/base/resi.vue

@ -6,7 +6,8 @@
? 'm-form-box-height-auto'
: 'm-form-box-height'
">
<resi-search ref="myResiSearch" @handleSearchFrom="handleSearchFrom" />
<resi-search ref="myResiSearch"
@handleSearchFrom="handleSearchFrom" />
</section>
<el-row class="resi-search">
<el-col :span="24">
@ -18,7 +19,7 @@
plain
class="f-right5 diy-button--white"
@click="resetSearchForm">重置</el-button>
<el-button type="text"
size="small"
style="margin-left: 10px"
@ -141,7 +142,7 @@
}}
</div>
<div v-else-if="item.columnName == 'categoryInfo'">
<template v-if="scope.row.categoryInfo" >
<template v-if="scope.row.categoryInfo">
<div class="resiCategoryInfoBox">
{{
scope.row.categoryInfo.bereavedPersonFlag ==
@ -149,106 +150,106 @@
? "特扶人员 "
: ""
}}
{{
{{
scope.row.categoryInfo.chronicDiseaseFlag ==
1
? "慢病 "
: ""
}}
{{
{{
scope.row.categoryInfo.dementedFlag == 1
? "失智老人 "
: ""
}}
{{
{{
scope.row.categoryInfo.disabilityFlag == 1
? "残疾 "
: ""
}}
{{
{{
scope.row.categoryInfo.disabledFlag == 1
? "失能老人 "
: ""
}}
{{
{{
scope.row.categoryInfo.emptyNesterFlag == 1
? "空巢老人 "
: ""
}}
{{
{{
scope.row.categoryInfo.ensureHouseFlag == 1
? "保障房人员 "
: ""
}}
{{
{{
scope.row.categoryInfo.fertileWomanFlag == 1
? "育龄妇女 "
: ""
}}
{{
{{
scope.row.categoryInfo.floatingFlag == 1
? "流动人口 "
: ""
}}
{{
{{
scope.row.categoryInfo.liveAloneFlag == 1
? "独居老人 "
: ""
}}
{{
{{
scope.row.categoryInfo.oldPeopleFlag == 1
? "老年人 "
: ""
}}
{{
{{
scope.row.categoryInfo.partyFlag == 1
? "党员 "
: ""
}}
{{
{{
scope.row.categoryInfo
.petitionOfficerFlag == 1
? "信访人员 "
: ""
}}
{{
{{
scope.row.categoryInfo.seriousIllnessFlag ==
1
? "大病 "
: ""
}}
{{
{{
scope.row.categoryInfo.specialCrowdFlag == 1
? "特殊人群 "
: ""
}}
{{
{{
scope.row.categoryInfo
.subsistenceAllowanceFlag == 1
? "低保人员 "
: ""
}}
{{
{{
scope.row.categoryInfo.tenantFlag == 1
? "租户 "
: ""
}}
{{
{{
scope.row.categoryInfo.unemployedFlag == 1
? "失业 "
: ""
}}
{{
{{
scope.row.categoryInfo.unitedFrontFlag == 1
? "统战人员 "
: ""
}}
{{
{{
scope.row.categoryInfo.veteranFlag == 1
? "退役军人 "
: ""
}}
{{
{{
scope.row.categoryInfo.volunteerFlag == 1
? "志愿者 "
: ""
@ -510,16 +511,16 @@ export default {
tableData: [],
searchList: [],
exportList: [],
editTableName: {},
formName: "",
tableHeader: [
{ columnName: "name", label: "姓名", width: 80 },
{ columnName: "birthday", label: "生日", width: 100 },
{ columnName: "gender", label: "性别", width: 50 },
{ columnName: "agencyName", label: "所属组织",width:150 },
{ columnName: "gridName", label: "所属网格",width:150 },
{ columnName: "homeName", label: "所属房屋",width:150 },
{ columnName: "agencyName", label: "所属组织", width: 150 },
{ columnName: "gridName", label: "所属网格", width: 150 },
{ columnName: "homeName", label: "所属房屋", width: 150 },
{ columnName: "idNum", label: "证件号", width: 170 },
{ columnName: "categoryInfo", label: "居民分类" },
{ columnName: "mobile", label: "联系电话", width: 110 },
@ -553,7 +554,7 @@ export default {
},
category: this.$route.query.category,
searchForm:{},
searchForm: {},
};
},
@ -623,32 +624,33 @@ export default {
},
handleSearchFrom (type) {
// 使
const { categoryKey, agencyId, level } = this.$refs.myResiSearch.form;
//
let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form));
// categoryKey
if (Array.isArray(categoryKey) && categoryKey.length) {
_obj.categoryKey = categoryKey.join(",");
} else {
_obj.categoryKey = "";
}
const { categoryKey, agencyId, level } = this.$refs.myResiSearch.form;
//
let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form));
// categoryKey
if (Array.isArray(categoryKey) && categoryKey.length) {
_obj.categoryKey = categoryKey.join(",");
} else {
_obj.categoryKey = "";
}
// agencyId
if (Array.isArray(agencyId) && agencyId.length) {
_obj.agencyId = agencyId[agencyId.length - 1];
} else {
_obj.agencyId = "";
}
// agencyId
if (Array.isArray(agencyId) && agencyId.length) {
_obj.agencyId = agencyId[agencyId.length - 1];
} else {
_obj.agencyId = "";
}
_obj.level = level || ''; // 使
if(type){
this.currentPage = 1
}
this.getTableData(_obj);
this.searchForm = _obj;
// form
this.$refs.myResiSearch.form.categoryKey = categoryKey;
this.$refs.myResiSearch.form.agencyId = agencyId;
_obj.level = level || ''; // 使
_obj.orgType = level || ''; // 使
if (type) {
this.currentPage = 1
}
this.getTableData(_obj);
this.searchForm = _obj;
// form
this.$refs.myResiSearch.form.categoryKey = categoryKey;
this.$refs.myResiSearch.form.agencyId = agencyId;
},
//
// checkSelectable (row, index) {
@ -693,7 +695,7 @@ export default {
handleDiyClose () {
this.diyDialog = false;
},
async diyExport () {
await this.getExportList();
console.log(this.$refs['']);
@ -776,7 +778,7 @@ export default {
this.handleSearchFrom()
},
handleCurrentChange (val) {
this.currentPage = val;
this.handleSearchFrom()
@ -1051,7 +1053,7 @@ export default {
}
this.tabsList = [...list];
},
async handleEditSUbmit () {
this.handleSUbmit();
},
@ -1213,7 +1215,7 @@ export default {
pageSize: this.pageSize,
...obj,
};
this.tableLoading = true;
const { data } = await this.$http.post(
"/actual/base/residentBaseInfo/page",
@ -1327,16 +1329,16 @@ export default {
$route: {
handler: function (newVal, oldVal) {
if (newVal.name == "base-resi") {
this.$nextTick(()=>{
if( newVal.params.category){
this.$refs.myResiSearch.form.categoryKey = []
this.$refs.myResiSearch.form.categoryKey.push(newVal.params.category)
this.handleSearchFrom()
}else{
this.$refs.myResiSearch.form.categoryKey = []
this.getTableData()
}
})
this.$nextTick(() => {
if (newVal.params.category) {
this.$refs.myResiSearch.form.categoryKey = []
this.$refs.myResiSearch.form.categoryKey.push(newVal.params.category)
this.handleSearchFrom()
} else {
this.$refs.myResiSearch.form.categoryKey = []
this.getTableData()
}
})
}
},
deep: true,
@ -1523,10 +1525,10 @@ export default {
}
}
}
.resiCategoryInfoBox{
.resiCategoryInfoBox {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-wrap: normal;
white-space: nowrap;
text-overflow: ellipsis;
word-wrap: normal;
}
</style>

33
src/views/modules/base/residentManagement/louzhang/addForm.vue

@ -121,6 +121,7 @@
:options="optionsRange"
@change="handleChangeRange"
:props="props"
:disabled="formType==='detail'"
clearable />
</el-form-item>
@ -182,7 +183,6 @@ export default {
mobile: "",
idNum: "",
dormitoryType: "",
rangeList: []
},
@ -193,13 +193,8 @@ export default {
name: [{ required: true, message: "姓名不能为空", trigger: "change" }],
mobile: [{ required: true, message: "联系电话不能为空", trigger: "change" }],
idNum: [{ required: true, message: "身份证号不能为空", trigger: "change" }],
dormitoryType: [
{ required: true, message: "类型不能为空", trigger: "change" },
],
rangeList: [
{ required: true, message: "管理范围不能为空", trigger: "change" },
],
dormitoryType: [{ required: true, message: "类型不能为空", trigger: "change" }],
rangeList: [{ required: true, message: "管理范围不能为空", trigger: "change" }],
},
};
@ -208,10 +203,7 @@ export default {
watch: {},
components: {},
async created () {
},
async created () { },
async mounted () {
this.startLoading();
await this.endLoading();
@ -230,7 +222,8 @@ export default {
},
async getDetail (categorizedResiId) {
const url = `/actual/base/resiCategorized/disability/detail/${categorizedResiId}`;
const url = `/actual/base/resiCategorized/buildingUnitChief/detail/${categorizedResiId}`;
const { data, code, msg } = await requestGet(url);
if (code === 0) {
console.log(data);
@ -256,15 +249,7 @@ export default {
handleChangeRange (val) {
console.log('改变范围', val)
// this.sarr = []
// const map = new Map();
// this.getLastItem(
// this.orgOptions,
// val,
// "agencyId"
// );
// this.level = this.sarr[this.sarr.length - 1].level
// this.getValiheList()
},
getGridList () {
const { user } = this.$store.state
@ -319,8 +304,8 @@ export default {
console.log(this.formData);
const url =
this.formType === "edit"
? "/actual/base/resiCategorized/disability/update"
: "/actual/base/resiCategorized/disability/create";
? "/actual/base/resiCategorized/buildingUnitChief//update"
: "/actual/base/resiCategorized/buildingUnitChief//create";
const { data, code, msg } = await requestPost(url, this.formData);
if (code === 0) {

24
src/views/modules/base/residentManagement/louzhang/louzhangList.vue

@ -149,7 +149,7 @@
<el-button style="margin-left: 10px"
class="diy-button--blue"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
@click="handleExportModule">下载模板</el-button>
</div>
<el-table :data="tableData"
@ -203,9 +203,9 @@
<template slot-scope="scope">
<span>{{
scope.row.gender
? scope.row.gender == "0"
? scope.row.gender == "1"
? "楼长"
: scope.row.gender == "1"
: scope.row.gender == "0"
? "单元长"
: "--"
: "--"
@ -325,8 +325,8 @@ export default {
},
computed: {
maxTableHeight () {
const h = this.clientHeight - this.searchH - 330 + this.iframeHeight;
const _h = this.clientHeight - 330 - this.searchH;
const h = this.clientHeight - this.searchH - 270 + this.iframeHeight;
const _h = this.clientHeight - 270 - this.searchH;
return this.$store.state.inIframe ? h : _h;
},
...mapGetters(["clientHeight", "iframeHeight"]),
@ -501,7 +501,7 @@ export default {
type: "warning",
})
.then(() => {
this.cancelFuwu([row.categorizedResiId]);
this.deleteBatch([row.categorizedResiId]);
})
.catch((err) => {
if (err == "cancel") {
@ -513,8 +513,8 @@ export default {
});
},
//
async cancelFuwu (id) {
const url = "/actual/base/resiCategorized/disability/deleteBatch";
async deleteBatch (id) {
const url = "/actual/base/resiCategorized/buildingUnitChief/deleteBatch";
const { data, code, msg } = await requestPost(url, id);
if (code === 0) {
this.$message.success("删除成功!");
@ -526,7 +526,7 @@ export default {
//
async getTableData () {
this.tableLoading = true;
const url = "/actual/base/resiCategorized/disability/page";
const url = "/actual/base/resiCategorized/buildingUnitChief/page";
const { pageSize, pageNo, formData } = this;
const { data, code, msg } = await requestPost(url, {
pageSize,
@ -543,7 +543,7 @@ export default {
},
//
async handleExport () {
const url = "/actual/base/resiCategorized/disability/export";
const url = "/actual/base/resiCategorized/buildingUnitChief/export";
const { pageSize, pageNo, formData } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
@ -581,7 +581,7 @@ export default {
//
async handleExportModule () {
let url =
"/actual/base/resiCategorized/disability/downloadImportTemplate";
"/actual/base/resiCategorized/buildingUnitChief/downloadImportTemplate";
let params = {};
await this.$http({
method: "get",
@ -702,7 +702,7 @@ export default {
type: "warning",
})
.then(() => {
this.cancelFuwu(this.multiSelection.map((e) => e.categorizedResiId));
this.deleteBatch(this.multiSelection.map((e) => e.categorizedResiId));
})
.catch((err) => {
console.error(err);

Loading…
Cancel
Save