|
|
|
|
@ -190,6 +190,7 @@
|
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
|
<el-dropdown-item command="handleYg">场所员工</el-dropdown-item>
|
|
|
|
|
<el-dropdown-item command="handleFzr">场所负责人</el-dropdown-item>
|
|
|
|
|
<el-dropdown-item command="handleFw">关联房屋</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown>
|
|
|
|
|
</template>
|
|
|
|
|
@ -406,6 +407,75 @@
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="关联房屋" :visible.sync="csfw.visible" width="1000px" append-to-body>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="csfwAdd"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-table v-loading="csfw.loading" :data="csfw.list" border>
|
|
|
|
|
<el-table-column label="房屋名称" align="center" prop="fwName" />
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="120px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="csfwUpdate(scope.row)"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="csfwDelete(scope.row)"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改关联房屋对话框 -->
|
|
|
|
|
<el-dialog :title="csfw.title" :visible.sync="csfw.open" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="csfwForm" :model="csfw.form" :rules="csfw.rules" label-width="100px">
|
|
|
|
|
<el-form-item label="房屋" prop="fwName">
|
|
|
|
|
<el-input readonly
|
|
|
|
|
placeholder="请选择房屋"
|
|
|
|
|
v-model="csfw.form.fwName">
|
|
|
|
|
<el-button slot="append" icon="el-icon-search" @click="fwxxSelect"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="csfwSubmit">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="选择房屋信息" :visible.sync="fwxx.visible" width="900px" append-to-body>
|
|
|
|
|
<el-alert title="双击选择房屋" type="warning" :closable="false"></el-alert>
|
|
|
|
|
<el-table v-loading="fwxx.loading" :data="fwxx.list" border @cell-dblclick="fwxxDblclick">
|
|
|
|
|
<el-table-column label="所属网格" align="center" prop="deptName" />
|
|
|
|
|
<el-table-column label="户主姓名" align="center" prop="ownerName" />
|
|
|
|
|
<el-table-column label="身份证号" align="center" prop="cardId" />
|
|
|
|
|
<el-table-column label="小区名称" align="center" prop="houseName" />
|
|
|
|
|
<el-table-column label="楼栋名称" align="center" prop="ldName" />
|
|
|
|
|
<el-table-column label="单元" align="center" prop="unit" />
|
|
|
|
|
<el-table-column label="门牌号" align="center" prop="doorNo" />
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="fwxx.total>0"
|
|
|
|
|
:total="fwxx.total"
|
|
|
|
|
:page.sync="fwxx.queryParams.pageNum"
|
|
|
|
|
:limit.sync="fwxx.queryParams.pageSize"
|
|
|
|
|
@pagination="getlistHouseinfo"
|
|
|
|
|
/>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -413,6 +483,8 @@
|
|
|
|
|
import { listCsmanage, getCsmanage, delCsmanage, addCsmanage, updateCsmanage } from "@/api/szxc/csmanage";
|
|
|
|
|
import { listEmplyees } from "@/api/szxc/emplyees";
|
|
|
|
|
import { listResponse } from "@/api/szxc/response";
|
|
|
|
|
import { listCs_fw, getCs_fw, delCs_fw, addCs_fw, updateCs_fw } from "@/api/szxc/cs_fw";
|
|
|
|
|
import { listHouseinfo } from "@/api/szxc/houseinfo";
|
|
|
|
|
import { deptTreeSelect } from "@/api/system/user";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
@ -492,7 +564,46 @@ export default {
|
|
|
|
|
// 选中信息
|
|
|
|
|
selectedRow: null,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
// 场所房屋关联信息
|
|
|
|
|
csfw: {
|
|
|
|
|
visible: false,
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: false,
|
|
|
|
|
// 查询列表
|
|
|
|
|
list: [],
|
|
|
|
|
// 选中信息
|
|
|
|
|
selectedRow: null,
|
|
|
|
|
// 弹出框
|
|
|
|
|
open: false,
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: '',
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
cardNum: [
|
|
|
|
|
{required: true, message: "银行卡号不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// 房屋信息
|
|
|
|
|
fwxx: {
|
|
|
|
|
visible: false,
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: false,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams:{
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10
|
|
|
|
|
},
|
|
|
|
|
// 查询列表
|
|
|
|
|
list: [],
|
|
|
|
|
// 选中数据
|
|
|
|
|
selectRow: null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
@ -634,6 +745,9 @@ export default {
|
|
|
|
|
case "handleFzr":
|
|
|
|
|
this.handleFzr(row);
|
|
|
|
|
break;
|
|
|
|
|
case "handleFw":
|
|
|
|
|
this.handleFw(row);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
@ -670,6 +784,95 @@ export default {
|
|
|
|
|
this.csfzr.list = response.rows
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 场所房屋信息
|
|
|
|
|
handleFw(row){
|
|
|
|
|
this.csfw.selectedRow = row
|
|
|
|
|
this.csfw.visible = true;
|
|
|
|
|
this.getlistCs_fw()
|
|
|
|
|
},
|
|
|
|
|
/** 查询场所房屋关联列表 */
|
|
|
|
|
getlistCs_fw() {
|
|
|
|
|
this.csfw.loading = true;
|
|
|
|
|
listCs_fw(this.queryParams).then(response => {
|
|
|
|
|
this.csfw.list = response.rows;
|
|
|
|
|
this.csfw.total = response.total;
|
|
|
|
|
this.csfw.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 添加房屋
|
|
|
|
|
csfwAdd(){
|
|
|
|
|
this.resetForm("csfwForm");
|
|
|
|
|
this.csfw.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
csId: this.csfw.selectedRow.id,
|
|
|
|
|
fwId: null,
|
|
|
|
|
fwName: null
|
|
|
|
|
};
|
|
|
|
|
this.csfw.title = '添加房屋';
|
|
|
|
|
this.csfw.open = true;
|
|
|
|
|
},
|
|
|
|
|
/** 修改房屋按钮操作 */
|
|
|
|
|
csfwUpdate(row) {
|
|
|
|
|
this.csfw.form = row;
|
|
|
|
|
this.csfw.title = '修改房屋';
|
|
|
|
|
this.csfw.open = true;
|
|
|
|
|
},
|
|
|
|
|
/** 删除房屋按钮操作 */
|
|
|
|
|
csfwDelete(row) {
|
|
|
|
|
this.$modal.confirm('是否确认删除房屋为【"' + row.fwName + '"】的数据项?').then(function() {
|
|
|
|
|
return delCs_fw(row.id);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getlistCs_fw();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
// 添加提交房屋
|
|
|
|
|
csfwSubmit(){
|
|
|
|
|
this.$refs["csfwForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.csfw.form.id != null) {
|
|
|
|
|
updateCs_fw(this.csfw.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.csfw.open = false;
|
|
|
|
|
this.getlistCs_fw();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.csfw.form.defaultCard = '1'
|
|
|
|
|
addCs_fw(this.csfw.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.csfw.open = false;
|
|
|
|
|
this.getlistCs_fw();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 点击选择房屋
|
|
|
|
|
fwxxSelect(){
|
|
|
|
|
this.fwxx.visible = true;
|
|
|
|
|
this.getlistHouseinfo()
|
|
|
|
|
},
|
|
|
|
|
/** 查询房屋信息列表 */
|
|
|
|
|
getlistHouseinfo() {
|
|
|
|
|
this.fwxx.loading = true;
|
|
|
|
|
listHouseinfo(this.fwxx.queryParams).then(response => {
|
|
|
|
|
this.fwxx.list = response.rows;
|
|
|
|
|
this.fwxx.total = response.total;
|
|
|
|
|
this.fwxx.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 房屋信息查询
|
|
|
|
|
fwxxQuery(){
|
|
|
|
|
this.fwxx.queryParams.pageNum = 1;
|
|
|
|
|
this.getlistHouseinfo();
|
|
|
|
|
},
|
|
|
|
|
// 房屋选择 选中数据
|
|
|
|
|
fwxxDblclick(row) {
|
|
|
|
|
this.fwxx.selectRow = row;
|
|
|
|
|
this.csfw.form.fwId = row.id;
|
|
|
|
|
this.csfw.form.fwName = row.houseName;
|
|
|
|
|
this.fwxx.visible = false
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|