Browse Source

居民列表页

V1.0
dai 3 years ago
parent
commit
1ac1c8056f
  1. 561
      src/views/components/resiChangeTransfer.vue
  2. 419
      src/views/modules/base/resi.vue
  3. 187
      src/views/modules/plugins/change/resideathAdd.vue

561
src/views/components/resiChangeTransfer.vue

@ -1,142 +1,153 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<el-form ref="ref_form" <el-form
ref="ref_form"
:inline="false" :inline="false"
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
label-width="150px" label-width="150px"
class="g-edit-form"> class="g-edit-form"
>
<el-form-item label="当前组织" <el-form-item label="当前组织" style="display: block">
style="display: block">
<span>{{ gridName }}</span> <span>{{ gridName }}</span>
</el-form-item> </el-form-item>
<el-form-item label="姓名" <el-form-item label="姓名" style="display: block">
style="display: block">
<span>{{ dataForm.name }}</span> <span>{{ dataForm.name }}</span>
</el-form-item> </el-form-item>
<el-form-item label="迁出时间" <el-form-item label="迁出时间" prop="outOfTime">
prop="outOfTime"> <el-date-picker
<el-date-picker v-model="dataForm.outOfTime" v-model="dataForm.outOfTime"
type="date" type="date"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="选择日期" placeholder="选择日期"
class="u-edit-width-normal" class="u-edit-width-normal"
:clearable="false"> :clearable="false"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="迁出类型" <el-form-item label="迁出类型" prop="type" style="display: block">
prop="type"
style="display: block">
<el-radio-group v-model="dataForm.type"> <el-radio-group v-model="dataForm.type">
<el-radio :label="'in'">{{
<el-radio :label="'in'">{{'迁往'+rootAgency.organizationName+'内其他区域'}}</el-radio> "迁往" + rootAgency.organizationName + "内其他区域"
}}</el-radio>
<el-radio :label="'out'">其他</el-radio> <el-radio :label="'out'">其他</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<template v-if="dataForm.type === 'in'"> <template v-if="dataForm.type === 'in'">
<el-form-item label="迁出至" <el-form-item label="迁出至" prop="agencyId">
prop='agencyId'> <el-cascader
<el-cascader ref="myCascader" ref="myCascader"
v-model="agencyIdArray" v-model="agencyIdArray"
class="u-edit-width-normal" class="u-edit-width-normal"
:key="iscascaderShow" :key="iscascaderShow"
:options="casOptions" :options="casOptions"
:props="optionProps" :props="optionProps"
@change="handleChangeAgency" @change="handleChangeAgency"
clearable></el-cascader> clearable
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="所属家庭" <el-form-item label="所属家庭" prop="villageId">
prop="villageId">
<div> <div>
<el-select
<el-select v-model.trim="dataForm.villageId" v-model.trim="dataForm.villageId"
placeholder="请选择小区" placeholder="请选择小区"
clearable clearable
class="u-edit-width-normal" class="u-edit-width-normal"
@change="handleChangeCommunity($event)"> @change="handleChangeCommunity($event)"
<el-option v-for="item in communityList" >
<el-option
v-for="item in communityList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div style="margin-top: 5px"> <div style="margin-top: 5px">
<el-select
<el-select v-model.trim="dataForm.buildId" v-model.trim="dataForm.buildId"
placeholder="楼号" placeholder="楼号"
clearable clearable
class="u-edit-width-build" class="u-edit-width-build"
@change="handleChangeBuilding($event)"> @change="handleChangeBuilding($event)"
<el-option v-for="item in buildingList" >
<el-option
v-for="item in buildingList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model.trim="dataForm.unitId" <el-select
v-model.trim="dataForm.unitId"
placeholder="单元" placeholder="单元"
clearable clearable
style="margin-left: 10px;" style="margin-left: 10px"
class="u-edit-width-build" class="u-edit-width-build"
@change="handleChangeUnit($event)"> @change="handleChangeUnit($event)"
<el-option v-for="item in unitList" >
<el-option
v-for="item in unitList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model.trim="dataForm.homeId" <el-select
v-model.trim="dataForm.homeId"
placeholder="房号" placeholder="房号"
clearable clearable
style="margin-left: 10px;" style="margin-left: 10px"
class="u-edit-width-build" class="u-edit-width-build"
@change="handleChangeHome($event)"> @change="handleChangeHome($event)"
<el-option v-for="item in roomList" >
<el-option
v-for="item in roomList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
<div v-if="dataForm.type === 'out'"> <div v-if="dataForm.type === 'out'">
<el-form-item label="外迁详细地址" <el-form-item label="外迁详细地址" prop="address">
prop="address"> <el-input
<el-input type="textarea" type="textarea"
:autosize="{ minRows: 2, maxRows: 7 }" :autosize="{ minRows: 2, maxRows: 7 }"
:rows="5" :rows="5"
resize="none" resize="none"
class="u-edit-width-normal" class="u-edit-width-normal"
placeholder='请输入外迁详细地址' placeholder="请输入外迁详细地址"
v-model="dataForm.address"> v-model="dataForm.address"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item label="迁出原因" <el-form-item label="迁出原因" prop="reason">
prop="reason"> <el-input
<el-input type="textarea" type="textarea"
:autosize="{ minRows: 4, maxRows: 7 }" :autosize="{ minRows: 4, maxRows: 7 }"
:rows="5" :rows="5"
resize="none" resize="none"
class="u-edit-width-normal" class="u-edit-width-normal"
placeholder='请输入迁出原因' placeholder="请输入迁出原因"
v-model="dataForm.reason"> v-model="dataForm.reason"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="" <!-- <el-form-item label=""
@ -144,31 +155,30 @@
<el-checkbox v-model="dataForm.welfareFlag">享受福利</el-checkbox> <el-checkbox v-model="dataForm.welfareFlag">享受福利</el-checkbox>
</el-form-item> --> </el-form-item> -->
</el-form> </el-form>
</div> </div>
<div class="m-edit-btn"> <div class="m-edit-btn">
<el-button size="small" <el-button size="small" @click="handleCancle"> </el-button>
@click="handleCancle"> </el-button> <el-button
<el-button type="primary" type="primary"
size="small" size="small"
class="diy-button--blue" class="diy-button--blue"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"
> </el-button
>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import util from '@js/util.js'; import util from "@js/util.js";
import { Loading } from 'element-ui' // Loading import { Loading } from "element-ui"; // Loading
import { requestPost, requestGet } from '@/js/dai/request' import { requestPost, requestGet } from "@/js/dai/request";
let loading // let loading; //
export default { export default {
data() { data() {
return { return {
btnDisable: false, btnDisable: false,
communityList: [], communityList: [],
buildingList: [], buildingList: [],
@ -176,37 +186,37 @@ export default {
roomList: [], roomList: [],
dataForm: { dataForm: {
icUserId: '', // ID icUserId: "", // ID
type: 'in',//out,in type: "in", //out,in
agencyId: '',//Id agencyId: "", //Id
gridId: '',//Id gridId: "", //Id
gridName: '', gridName: "",
villageId: '',//ID villageId: "", //ID
villageName: '', villageName: "",
buildId: '',//Id buildId: "", //Id
buildName: '', buildName: "",
unitId: '',//Id unitId: "", //Id
unitName: '', unitName: "",
homeId: '', //Id homeId: "", //Id
homeName: '', homeName: "",
transferTime: '', // transferTime: "", //
reason: '', // reason: "", //
customerId: '', customerId: "",
oldHome: '', oldHome: "",
oldDept: '', oldDept: "",
oldAddress: '', oldAddress: "",
ownerName: '', ownerName: "",
name: '', name: "",
gender: '', gender: "",
age: '', age: "",
address: '', address: "",
outOfTime: '', outOfTime: "",
welfareFlag: false welfareFlag: false,
}, },
customerId: '',//id customerId: "", //id
userId: '',//id userId: "", //id
gridName: '', gridName: "",
rootAgency: {}, rootAgency: {},
casOptions: [], casOptions: [],
@ -216,180 +226,170 @@ export default {
optionProps: { optionProps: {
multiple: false, multiple: false,
value: 'agencyId', value: "agencyId",
label: 'agencyName', label: "agencyName",
children: 'subAgencyList', children: "subAgencyList",
// checkStrictly: true // checkStrictly: true
}, },
selGrid: {}, selGrid: {},
};
}
},
components: {
},
mounted () {
}, },
components: {},
mounted() {},
computed: { computed: {
dataRule() { dataRule() {
return { return {
type: [ type: [
{ required: true, message: '操作类型不能为空', trigger: 'blur' }, { required: true, message: "操作类型不能为空", trigger: "blur" },
], ],
agencyId: [ agencyId: [
{ required: true, message: '所选组织不能为空', trigger: 'blur' } { required: true, message: "所选组织不能为空", trigger: "blur" },
], ],
villageId: [ villageId: [
{ required: true, message: '所属家庭不能为空', trigger: 'blur' } { required: true, message: "所属家庭不能为空", trigger: "blur" },
], ],
address: [ address: [
{ required: true, message: '外迁详细地址不能为空', trigger: 'blur' } { required: true, message: "外迁详细地址不能为空", trigger: "blur" },
], ],
outOfTime: [ outOfTime: [
{ required: true, message: '迁出时间不能为空', trigger: 'blur' } { required: true, message: "迁出时间不能为空", trigger: "blur" },
] ],
};
}
}, },
}, },
methods: { methods: {
async initForm(row) { async initForm(row) {
this.customerId = localStorage.getItem("customerId"); this.customerId = localStorage.getItem("customerId");
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
// this.icUserId = row.icResiUserId // this.icUserId = row.icResiUserId
this.gridName = row.GRID_ID this.gridName = row.gridName;
this.dataForm.icUserId = row.icResiUserId this.dataForm.icUserId = row.resiId;
// //
if (row.DOOR_NAME !== null && row.DOOR_NAME !== '' && row.DOOR_NAME !== undefined) { if (
this.dataForm.oldHome = row.DOOR_NAME row.homeName !== null &&
row.homeName !== "" &&
row.homeName !== undefined
) {
this.dataForm.oldHome = row.homeName;
} else { } else {
this.dataForm.oldHome = '' this.dataForm.oldHome = "";
} }
this.dataForm.customerId = this.customerId this.dataForm.customerId = this.customerId;
this.dataForm.idCard = row.ID_CARD this.dataForm.idCard = row.idNum;
this.dataForm.mobile = row.MOBILE this.dataForm.mobile = row.mobile;
await this.loadHouseInfo(row.HOME_ID_VALUE)
this.dataForm.name = row.NAME await this.loadHouseInfo(row.homeId);
this.dataForm.gender = row.GENDER
this.dataForm.age = ''
this.dataForm.name = row.name;
this.dataForm.gender = row.gender;
this.dataForm.age = "";
await this.loadRootAgency() await this.loadRootAgency();
await this.getAgencylist() await this.getAgencylist();
}, },
async loadHouseInfo(homeIdValue) { async loadHouseInfo(homeIdValue) {
const url = "/gov/org/ichouse/" + homeIdValue const url = "/gov/org/ichouse/" + homeIdValue;
const { data, code, msg } = await requestGet(url) const { data, code, msg } = await requestGet(url);
if (code === 0) { if (code === 0) {
this.dataForm.oldDept = '' this.dataForm.oldDept = "";
this.dataForm.oldAddress = data.houseName this.dataForm.oldAddress = data.houseName;
this.dataForm.ownerName = data.ownerName this.dataForm.ownerName = data.ownerName;
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
//id //id
async loadRootAgency() { async loadRootAgency() {
await this.$http
await this.$http.post('/gov/org/agency/customerrootagency/' + this.customerId).then(({ data: res }) => { .post("/gov/org/agency/customerrootagency/" + this.customerId)
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg);
} }
if (res.data) { if (res.data) {
this.rootAgency = res.data this.rootAgency = res.data;
} }
}).catch(() => { }) })
.catch(() => {});
}, },
async getAgencylist() { async getAgencylist() {
const url = "/gov/org/customeragency/rootagencygridtree";
const url = '/gov/org/customeragency/rootagencygridtree'
const params = { const params = {
agencyId: this.rootAgency.id agencyId: this.rootAgency.id,
} };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
++this.iscascaderShow ++this.iscascaderShow;
this.casOptions = [] this.casOptions = [];
this.agencyIdArray.length = [] this.agencyIdArray.length = [];
if (data) { if (data) {
let treeData = [data] let treeData = [data];
this.resolveAgencyTree(treeData) this.resolveAgencyTree(treeData);
this.casOptions.push(data) this.casOptions.push(data);
} }
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
resolveAgencyTree(treeData) { resolveAgencyTree(treeData) {
treeData.forEach(element => { treeData.forEach((element) => {
if (!element.subAgencyList || element.subAgencyList.length === 0) {//level=gridtrue if (!element.subAgencyList || element.subAgencyList.length === 0) {
//level=gridtrue
if (element.level === 'grid') { if (element.level === "grid") {
element.disabled = false element.disabled = false;
} else { } else {
element.disabled = true element.disabled = true;
} }
} else { } else {
this.resolveAgencyTree(element.subAgencyList) this.resolveAgencyTree(element.subAgencyList);
} }
}); });
}, },
handleChangeAgency() { handleChangeAgency() {
console.log(this.$refs["myCascader"].getCheckedNodes()[0].data) console.log(this.$refs["myCascader"].getCheckedNodes()[0].data);
this.selGrid = this.$refs["myCascader"].getCheckedNodes()[0].data this.selGrid = this.$refs["myCascader"].getCheckedNodes()[0].data;
this.dataForm.agencyId = this.selGrid.pid this.dataForm.agencyId = this.selGrid.pid;
this.dataForm.gridId = this.selGrid.agencyId this.dataForm.gridId = this.selGrid.agencyId;
this.dataForm.gridName = this.selGrid.agencyName this.dataForm.gridName = this.selGrid.agencyName;
this.loadCommunityList() this.loadCommunityList();
this.dataForm.villageId = ''//ID this.dataForm.villageId = ""; //ID
this.dataForm.villageName = '' this.dataForm.villageName = "";
this.dataForm.buildId = ''//Id this.dataForm.buildId = ""; //Id
this.dataForm.buildName = '' this.dataForm.buildName = "";
this.dataForm.unitId = ''//Id this.dataForm.unitId = ""; //Id
this.dataForm.unitName = '' this.dataForm.unitName = "";
this.dataForm.homeId = '' //Id this.dataForm.homeId = ""; //Id
this.dataForm.homeName = '' this.dataForm.homeName = "";
}, },
async loadCommunityList() { async loadCommunityList() {
const url = '/gov/org/icneighborhood/neighborhoodoption' const url = "/gov/org/icneighborhood/neighborhoodoption";
let params = { let params = {
gridId: this.dataForm.gridId, gridId: this.dataForm.gridId,
agencyId: this.dataForm.agencyId agencyId: this.dataForm.agencyId,
} };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.communityList = [] this.communityList = [];
this.communityList = [...data] this.communityList = [...data];
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
@ -397,56 +397,52 @@ export default {
// //
this.communityList.find((item) => { this.communityList.find((item) => {
if (item.value === id) { if (item.value === id) {
this.dataForm.villageName = item.label this.dataForm.villageName = item.label;
} }
}) });
const url = '/gov/org/icbuilding/buildingoption' const url = "/gov/org/icbuilding/buildingoption";
let params = { let params = {
neighborHoodId: this.dataForm.villageId neighborHoodId: this.dataForm.villageId,
} };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.buildingList = [] this.buildingList = [];
this.buildingList = [...data] this.buildingList = [...data];
this.dataForm.buildId = ''//Id this.dataForm.buildId = ""; //Id
this.dataForm.unitId = ''//Id this.dataForm.unitId = ""; //Id
this.dataForm.homeId = '' //Id this.dataForm.homeId = ""; //Id
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
async handleChangeBuilding(id) { async handleChangeBuilding(id) {
// //
this.buildingList.find((item) => { this.buildingList.find((item) => {
if (item.value === id) { if (item.value === id) {
this.dataForm.buildName = item.label this.dataForm.buildName = item.label;
} }
}) });
const url = '/gov/org/icbuildingunit/unitoption' const url = "/gov/org/icbuildingunit/unitoption";
let params = { let params = {
buildingId: this.dataForm.buildId buildingId: this.dataForm.buildId,
} };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.unitList = [] this.unitList = [];
this.unitList = [...data] this.unitList = [...data];
this.dataForm.unitId = ''//Id this.dataForm.unitId = ""; //Id
this.dataForm.homeId = '' //Id this.dataForm.homeId = ""; //Id
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
@ -454,24 +450,24 @@ export default {
// //
this.unitList.find((item) => { this.unitList.find((item) => {
if (item.value === id) { if (item.value === id) {
this.dataForm.unitName = item.label this.dataForm.unitName = item.label;
} }
}) });
const url = '/gov/org/ichouse/houseoption' const url = "/gov/org/ichouse/houseoption";
let params = { let params = {
unitId: this.dataForm.unitId unitId: this.dataForm.unitId,
} };
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.roomList = [] this.roomList = [];
this.roomList = [...data] this.roomList = [...data];
this.dataForm.homeId = '' //Id this.dataForm.homeId = ""; //Id
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
@ -479,57 +475,54 @@ export default {
// //
this.roomList.find((item) => { this.roomList.find((item) => {
if (item.value === id) { if (item.value === id) {
this.dataForm.homeName = item.label this.dataForm.homeName = item.label;
} }
}) });
}, },
async handleComfirm() { async handleComfirm() {
this.btnDisable = true this.btnDisable = true;
setTimeout(() => { setTimeout(() => {
this.btnDisable = false this.btnDisable = false;
}, 2000) }, 2000);
this.$refs['ref_form'].validate((valid, messageObj) => { this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) { if (!valid) {
// app.util.validateRule(messageObj) // app.util.validateRule(messageObj)
console.log('error submit!') console.log("error submit!");
} else { } else {
if (this.dataForm.type === 'in') { if (this.dataForm.type === "in") {
if (!this.dataForm.buildId) { if (!this.dataForm.buildId) {
this.$message.warning('楼栋') this.$message.warning("楼栋");
return false return false;
} }
if (!this.dataForm.unitId) { if (!this.dataForm.unitId) {
this.$message.warning('请选择单元') this.$message.warning("请选择单元");
return false return false;
} }
if (!this.dataForm.homeId) { if (!this.dataForm.homeId) {
this.$message.warning('请选择房间') this.$message.warning("请选择房间");
return false return false;
} }
} }
this.saveForm() this.saveForm();
} }
});
})
}, },
async saveForm() { async saveForm() {
// saveOutOfInfo // saveOutOfInfo
const url = '/epmetuser/changeRelocation/moveOutHome' const url = "/epmetuser/changeRelocation/moveOutHome";
let noData = new Date() let noData = new Date();
noData = util.dateFormatter(noData, 'time') noData = util.dateFormatter(noData, "time");
this.dataForm.transferTime = noData this.dataForm.transferTime = noData;
const { data, code, msg } = await requestPost(url, this.dataForm) const { data, code, msg } = await requestPost(url, this.dataForm);
if (code === 0) { if (code === 0) {
this.$message.success('操作成功') this.$message.success("操作成功");
this.handleCancle() this.handleCancle();
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
// async saveForm () { // async saveForm () {
@ -551,53 +544,51 @@ export default {
// }, // },
handleCancle() { handleCancle() {
this.resetData() this.resetData();
this.$emit('dialogCancle') this.$emit("dialogCancle");
}, },
resetData() { resetData() {
this.dataForm = { this.dataForm = {
icUserId: '', // ID icUserId: "", // ID
type: 'in',//out,in type: "in", //out,in
agencyId: '',//Id agencyId: "", //Id
gridId: '',//Id gridId: "", //Id
villageId: '',//ID villageId: "", //ID
buildId: '',//Id buildId: "", //Id
unitId: '',//Id unitId: "", //Id
homeId: '', //Id homeId: "", //Id
transferTime: '', // transferTime: "", //
reason: '', // reason: "", //
outOfTime: '', outOfTime: "",
welfareFlag: false welfareFlag: false,
} };
this.customerId = ''//id this.customerId = ""; //id
this.userId = ''//id this.userId = ""; //id
this.gridName = '' this.gridName = "";
this.rootAgency = {} this.rootAgency = {};
this.selGrid = {} this.selGrid = {};
}, },
// //
startLoading() { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: '正在加载……', // text: "正在加载……", //
background: 'rgba(0,0,0,.7)' // background: "rgba(0,0,0,.7)", //
}) });
}, },
// //
endLoading() { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close() loading.close();
}
} }
}, },
props: {} },
} props: {},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/scss/modules/management/edit-main.scss"; @import "@/assets/scss/modules/management/edit-main.scss";

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

@ -44,16 +44,23 @@
<div class="m-table"> <div class="m-table">
<div class="div_btn"> <div class="div_btn">
<div class="div_btn_left"> <div class="div_btn_left">
<el-button v-if="btnAuths.ic_resi_add" <el-button
v-if="btnAuths.ic_resi_add"
size="small" size="small"
@click="handleAdd" @click="handleAdd"
class="diy-button--blue" class="diy-button--blue"
icon="el-icon-plus"> 新增</el-button> icon="el-icon-plus"
<el-button v-if="btnAuths.ic_resi_export" >
新增</el-button
>
<el-button
v-if="btnAuths.ic_resi_export"
style="margin-left: 10px" style="margin-left: 10px"
size="small" size="small"
@click="diyExport" @click="diyExport"
class="diy-button--white">导出</el-button> class="diy-button--white"
>导出</el-button
>
<!-- <el-button v-if="btnAuths.ic_resi_import" <!-- <el-button v-if="btnAuths.ic_resi_import"
style="margin-left:10px" style="margin-left:10px"
@ -80,23 +87,29 @@
:loading="importLoading">{{ importBtnTitle }}</el-button> :loading="importLoading">{{ importBtnTitle }}</el-button>
</el-upload> --> </el-upload> -->
<el-button v-if="btnAuths.ic_resi_smart_import && displayedBaobiaoBtn" <el-button
v-if="btnAuths.ic_resi_smart_import && displayedBaobiaoBtn"
style="margin-left: 10px" style="margin-left: 10px"
size="small" size="small"
@click="reportForm" @click="reportForm"
class="diy-button--white">核对</el-button> class="diy-button--white"
>核对</el-button
>
<el-button style="margin-left:10px" <el-button
style="margin-left: 10px"
v-if="btnAuths.ic_resi_batch_del" v-if="btnAuths.ic_resi_batch_del"
size="small" size="small"
@click="deleteBatch" @click="deleteBatch"
class="diy-button--white">批量删除</el-button> class="diy-button--white"
>批量删除</el-button
>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> --> <!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
</div> </div>
</div> </div>
<el-table ref="ref_table" <el-table
ref="ref_table"
class="m-table-item" class="m-table-item"
:data="tableData" :data="tableData"
v-loading="tableLoading" v-loading="tableLoading"
@ -104,123 +117,153 @@
style="width: 100%" style="width: 100%"
:height="tableHeight" :height="tableHeight"
@select-all="selectAll" @select-all="selectAll"
@selection-change="selectionChange"> @selection-change="selectionChange"
<el-table-column type="selection" >
<el-table-column
type="selection"
fixed="left" fixed="left"
align="left" align="left"
:selectable="checkSelect" :selectable="checkSelectable"
width="55" /> width="55"
<el-table-column label="序号" />
<el-table-column
label="序号"
type="index" type="index"
fixed="left" fixed="left"
align="left" align="left"
width="50"> width="50"
>
</el-table-column> </el-table-column>
<el-table-column v-for="item in tableHeader" <el-table-column
v-for="item in tableHeader"
:key="item.columnName" :key="item.columnName"
:prop="item.columnName" :prop="item.columnName"
:label="item.label" :label="item.label"
align="left" align="left"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
:width="item.width || computedWidth(item.label, item.itemType)"> :width="item.width || computedWidth(item.label, item.itemType)"
>
<!-- :width="item.itemType === 'radio' ? computedWidth(item.label) : 180" --> <!-- :width="item.itemType === 'radio' ? computedWidth(item.label) : 180" -->
<template slot-scope="scope"> <template slot-scope="scope">
<a
<a v-if="item.columnName == 'NAME' && btnAuths.ic_resi_view" v-if="item.columnName == 'NAME' && btnAuths.ic_resi_view"
class="name-a" class="name-a"
> >
{{ handleFilterSpan(scope.row, item) }} {{ handleFilterSpan(scope.row, item) }}
</a> </a>
<div v-else-if="item.columnName == 'gender'"> <div v-else-if="item.columnName == 'gender'">
{{scope.row.gender == 1 ? '男' : '女' }} {{ scope.row.gender == 1 ? "男" : "女" }}
</div> </div>
<div v-else-if="item.columnName == 'birthday'"> <div v-else-if="item.columnName == 'birthday'">
{{ scope.row.birthday.substr(0, 10) }} {{ scope.row.birthday.substr(0, 10) }}
</div> </div>
<div v-else-if="item.columnName == 'idNum'"> <div v-else-if="item.columnName == 'idNum'">
{{`${scope.row.idNum.substr(0,11)}`+'******'+`${scope.row.idNum.substr(16,2)}` }} {{
`${scope.row.idNum.substr(0, 11)}` +
"******" +
`${scope.row.idNum.substr(16, 2)}`
}}
</div> </div>
<div v-else-if="item.columnName == 'mobile'"> <div v-else-if="item.columnName == 'mobile'">
{{`${scope.row.mobile.substr(0,3)}`+'******'+`${scope.row.mobile.substr(7,4)}` }} {{
`${scope.row.mobile.substr(0, 3)}` +
"******" +
`${scope.row.mobile.substr(7, 4)}`
}}
</div> </div>
<span v-else>{{ handleFilterSpan(scope.row, item) }}</span> <span v-else>{{ handleFilterSpan(scope.row, item) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" <el-table-column fixed="right" label="操作" align="center" width="200">
label="操作"
align="left"
width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button @click="handleLook(scope.row)" <el-button
v-if="btnAuths.ic_resi_view"
type="text" type="text"
class="div-table-button--blue"
size="small" size="small"
class="btn-color-look">查看</el-button> --> @click="handleLook(scope.row)"
>查看</el-button
>
<!-- <el-button v-if="btnAuths.ic_resi_change_rec" <template v-if="filterEdit(scope.row.agencyId)">
@click="handleChangeRecord(scope.row)" <el-button
type="text" v-if="btnAuths.ic_resi_update"
class="div-table-button--orange" style="margin-right: 10px"
size="small">变更记录</el-button> -->
<template v-if="filterEdit(scope.row.ORG_ID)">
<el-button v-if="btnAuths.ic_resi_update"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
class="div-table-button--blue" class="div-table-button--blue"
size="small" size="small"
type="text" type="text"
>编辑</el-button> >编辑</el-button
<el-popconfirm v-if="btnAuths.ic_resi_del" >
<el-popconfirm
v-if="btnAuths.ic_resi_del"
title="删除之后无法回复,确认删除?" title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)"> @onConfirm="handleDel(scope.row)"
>
<el-button
class="div-table-button--blue"
size="small"
type="text"
slot="reference"
>删除</el-button
>
</el-popconfirm> </el-popconfirm>
</template>
<el-dropdown
trigger="click"
style="margin-left: 10px"
@command="(command) => handelRegister(command, scope.row)"
>
<el-button <el-button
type="text"
class="div-table-button--blue" class="div-table-button--blue"
size="small" @click="handleLook(scope.row)">查看</el-button> size="small"
<el-button
type="text" type="text"
class="div-table-button--blue f-right10" style="font-size: 10px"
size="small">编辑</el-button> >
<el-dropdown trigger="click" @command="handelRegister"> </el-button
<span class=" div-table-button--blue"> >
登记<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item >死亡登记</el-dropdown-item> <el-dropdown-item
<el-dropdown-item >迁出登记</el-dropdown-item> v-if="btnAuths.ic_resi_change_rec"
command="bgjl"
>变更记录</el-dropdown-item
>
<el-dropdown-item
v-if="btnAuths.ic_resi_update"
command="swdj"
>死亡登记</el-dropdown-item
>
<el-dropdown-item
v-if="btnAuths.ic_resi_update"
command="qcdj"
>迁出登记</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="div-flex"> <div class="div-flex">
<div class="div_del"> <div class="m-page">
<!-- <el-checkbox :indeterminate="isIndeterminate" <el-pagination
v-model="selAllFlag" @size-change="handleSizeChange"
:disabled="selAllFlagDisabled"
@change="handleSelectAll">全选</el-checkbox>
<el-button v-if="selection.length > 0"
style="margin-left:15px"
type="danger"
size="small"
@click="deleteBatch">删除</el-button> -->
</div>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]" :page-sizes="[20, 50, 100, 200]"
:page-size="pageSize" :page-size="pageSize"
layout="sizes, prev, pager, next, total" layout="sizes, prev, pager, next, total"
:total="total"> :total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
<el-dialog :title="formName === '社区居民基本信息录入表'?'新增居民':formName" <el-dialog
:title="formName === '社区居民基本信息录入表' ? '新增居民' : formName"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="986px" width="986px"
top="5vh" top="5vh"
@ -228,13 +271,16 @@
append-to-body append-to-body
class="dialog-h" class="dialog-h"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="handlerCancle"> :before-close="handlerCancle"
>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<resi-form v-if="dialogVisible" <resi-form
v-if="dialogVisible"
ref="baseForm" ref="baseForm"
:fixed="true" :fixed="true"
:form-list="formList" :form-list="formList"
@changegroup="handleChangeGroup" /> @changegroup="handleChangeGroup"
/>
<!-- <div v-if="dialogVisible" <!-- <div v-if="dialogVisible"
class="resi-other"> class="resi-other">
<div class="tabs-other-info"> <div class="tabs-other-info">
@ -257,18 +303,28 @@
</div> </div>
<div class="resi-btns"> <div class="resi-btns">
<el-button size="small" <el-button size="small" @click="handlerReset" class="diy-button--common"
@click="handlerReset" class="diy-button--common">重置</el-button> >重置</el-button
<el-button size="small" >
@click="handlerCancle" class="diy-button--common">取消</el-button> <el-button
<el-button type="primary" size="small"
@click="handlerCancle"
class="diy-button--common"
>取消</el-button
>
<el-button
type="primary"
size="small" size="small"
:loading="btnLoading" :loading="btnLoading"
@click="handleSUbmit" class="diy-button--blue">保存</el-button> @click="handleSUbmit"
class="diy-button--blue"
>保存</el-button
>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="formName" <el-dialog
:title="formName"
:visible.sync="dialogEditVisible" :visible.sync="dialogEditVisible"
width="986px" width="986px"
top="5vh" top="5vh"
@ -276,9 +332,11 @@
append-to-body append-to-body
class="dialog-h" class="dialog-h"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="handlerEditCancle"> :before-close="handlerEditCancle"
>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<edit-resi v-if="dialogEditVisible" <edit-resi
v-if="dialogEditVisible"
ref="baseForm" ref="baseForm"
:disabled="disabled" :disabled="disabled"
:editUserId="editUserId" :editUserId="editUserId"
@ -286,18 +344,20 @@
:fixed="true" :fixed="true"
:form-list="formList" :form-list="formList"
:agency-id="editAgencyId" :agency-id="editAgencyId"
@changegroup="handleChangeGroup" /> @changegroup="handleChangeGroup"
<div v-if="dialogEditVisible" />
class="resi-other"> <div v-if="dialogEditVisible" class="resi-other">
<div class="resi-other-title">其他</div> <div class="resi-other-title">其他</div>
<div class="tabs-other-info"> <div class="tabs-other-info">
<el-tabs v-model="activeName" <el-tabs v-model="activeName" @tab-click="handleClick">
@tab-click="handleClick"> <el-tab-pane
<el-tab-pane v-for="item in tabsList" v-for="item in tabsList"
:key="item.groupId" :key="item.groupId"
:label="item.label" :label="item.label"
:name="'group' + item.groupId"> :name="'group' + item.groupId"
<edit-resi :ref="'group' + item.groupId" >
<edit-resi
:ref="'group' + item.groupId"
:columns="3" :columns="3"
:support-add="item.supportAdd" :support-add="item.supportAdd"
:form-id="item.columnName" :form-id="item.columnName"
@ -305,40 +365,49 @@
:form-list="item.itemList" :form-list="item.itemList"
:disabled="disabled" :disabled="disabled"
:label-width="'140px'" :label-width="'140px'"
:agency-id="editAgencyId" /> :agency-id="editAgencyId"
/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
</div> </div>
<div class="resi-btns"> <div class="resi-btns">
<el-button size="small" <el-button size="small" @click="handlerEditCancle">取消</el-button>
@click="handlerEditCancle">取消</el-button> <el-button
<el-button v-if="!disabled" v-if="!disabled"
type="primary" type="primary"
size="small" size="small"
:loading="btnLoading" :loading="btnLoading"
@click="handleEditSUbmit">提交</el-button> @click="handleEditSUbmit"
>提交</el-button
>
</div> </div>
</el-dialog> </el-dialog>
<!-- 变更记录 --> <!-- 变更记录 -->
<el-dialog :visible.sync="changeRecordShow" <el-dialog
:visible.sync="changeRecordShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="'变更记录'" :title="'变更记录'"
width="1150px" width="1150px"
top="5vh" top="5vh"
@closed="diaClose"> @closed="diaClose"
>
<resi-change-record ref="ref_changerecord"></resi-change-record> <resi-change-record ref="ref_changerecord"></resi-change-record>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="diyDialog"
<el-dialog
:visible.sync="diyDialog"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="1150px" width="1150px"
top="5vh" top="5vh"
class="dialog-h"> class="dialog-h"
<diy-info v-if="diyDialog" >
<diy-info
v-if="diyDialog"
ref="ref_diy" ref="ref_diy"
:list="exportList" :list="exportList"
:search="{ :search="{
@ -347,40 +416,50 @@
pageSize: pageSize, pageSize: pageSize,
conditions: conditions, conditions: conditions,
}" }"
@close="handleDiyClose"></diy-info> @close="handleDiyClose"
></diy-info>
</el-dialog> </el-dialog>
<people-more v-if="showedPeopleMoreInfo && lookInfo.userId"
<people-more
v-if="showedPeopleMoreInfo && lookInfo.userId"
:view_real_data="btnAuths.ic_resi_view_real_data" :view_real_data="btnAuths.ic_resi_view_real_data"
:userId="lookInfo.userId" :userId="lookInfo.userId"
:gridName="lookInfo.gridName" :gridName="lookInfo.gridName"
:detailTitle="'居民详情'" :detailTitle="'居民详情'"
@close="handleCancleLook" /> @close="handleCancleLook"
/>
<baobiao ref="baobiao" /> <baobiao ref="baobiao" />
<!-- 迁出登记 --> <!-- 迁出登记 -->
<el-dialog :visible.sync="tranferShow" <el-dialog
:visible.sync="tranferShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="'迁出登记'" :title="'迁出登记'"
width="950px" width="620px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="diaClose"> @closed="diaClose"
<resi-change-transfer ref="ref_change_transfer" >
@dialogCancle="transferClose"></resi-change-transfer> <resi-change-transfer
ref="ref_change_transfer"
@dialogCancle="transferClose"
></resi-change-transfer>
</el-dialog> </el-dialog>
<!-- 死亡登记 --> <!-- 死亡登记 -->
<el-dialog :visible.sync="deathShow" <el-dialog
:visible.sync="deathShow"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="'死亡登记'" :title="'死亡登记'"
width="950px" width="620px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="diaClose"> @closed="diaClose"
<resideath-add ref="ref_death" >
:resideathAddObj="resideathAddObj1" <resideath-add ref="ref_death" @dialogCancle="deathClose"></resideath-add>
@dialogCancle="deathClose"></resideath-add>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -395,7 +474,6 @@ import { mapGetters } from "vuex";
import resiTransfer from "../../components/resiTransfer.vue"; import resiTransfer from "../../components/resiTransfer.vue";
import resiChangeRecord from "../../components/resiChangeRecord.vue"; import resiChangeRecord from "../../components/resiChangeRecord.vue";
import peopleMore from "@/views/modules/shequ/cpts/people-more"; import peopleMore from "@/views/modules/shequ/cpts/people-more";
import baobiao from "@/views/modules/cpts/baobiao"; import baobiao from "@/views/modules/cpts/baobiao";
import diyInfo from "./diyInfo.vue"; import diyInfo from "./diyInfo.vue";
@ -462,7 +540,13 @@ export default {
formName: "", formName: "",
formList: [], formList: [],
tableHeader: [ tableHeader: [
{columnName:'name',label:'姓名'}, {columnName:'birthday',label:'生日'},{columnName:'gender',label:'性别'},{columnName:'gridName',label:'所属网格'},{columnName:'homeName',label:'所属房屋'},{columnName:'idNum',label:'证件号'},{columnName:'mobile',label:'联系电话'} { columnName: "name", label: "姓名" },
{ columnName: "birthday", label: "生日" },
{ columnName: "gender", label: "性别" },
{ columnName: "gridName", label: "所属网格" },
{ columnName: "homeName", label: "所属房屋" },
{ columnName: "idNum", label: "证件号" },
{ columnName: "mobile", label: "联系电话" },
], ],
tabsList: [], tabsList: [],
selection: [], selection: [],
@ -476,25 +560,27 @@ export default {
userId: "", userId: "",
gridName: "", gridName: "",
}, },
editUserId: '', editUserId: "",
displayedBaobiaoBtn: false, displayedBaobiaoBtn: false,
btnAuths: { btnAuths: {
ic_resi_add: false, // ic_resi_add: true, //
ic_resi_import: false, // ic_resi_import: true, //
ic_resi_export: false, // ic_resi_export: true, //
ic_resi_batch_del: false, // ic_resi_batch_del: true, //
ic_resi_smart_import: false, // ic_resi_smart_import: true, //
ic_resi_del: false, // ic_resi_del: true, //
ic_resi_view: false, // ic_resi_view: true, //
ic_resi_update: false, // ic_resi_update: true, //
ic_resi_change_rec: false, // ic_resi_change_rec: true, //
ic_resi_view_real_data: false, // ic_resi_view_real_data: true, //
}, },
}; };
}, },
props: {}, props: {},
async activated() { async activated() {
console.log("this.$route.query---", this.$route.query); console.log("this.$route.query---", this.$route.query);
if (this.$route.query && this.$route.query.columnName) { if (this.$route.query && this.$route.query.columnName) {
@ -504,6 +590,7 @@ export default {
console.log("defaultCategotyKey----", this.defaultCategotyKey); console.log("defaultCategotyKey----", this.defaultCategotyKey);
} }
}, },
computed: { computed: {
...mapGetters(["clientHeight", "iframeHeight"]), ...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() { tableHeight() {
@ -512,6 +599,7 @@ export default {
return this.$store.state.inIframe ? h : _h; return this.$store.state.inIframe ? h : _h;
}, },
}, },
async created() { async created() {
this.updateBtnAuths(); this.updateBtnAuths();
@ -520,15 +608,14 @@ export default {
this.defaultCategotyKey = query.columnName; this.defaultCategotyKey = query.columnName;
} }
// await this.getFormList() // await this.getFormList()
// console.log('this.$refs.resiSearch', this) // console.log('this.$refs.resiSearch', this)
this.getTableData() this.getTableData();
this.pageLoading = true; this.pageLoading = true;
console.log("storeoooo----0000", this.$store); console.log("storeoooo----0000", this.$store);
}, },
async mounted() { async mounted() {
// this.$nextTick(() => { // this.$nextTick(() => {
// this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px' // this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px'
@ -544,6 +631,7 @@ export default {
}, },
}); });
}, },
methods: { methods: {
// //
updateBtnAuths() { updateBtnAuths() {
@ -554,8 +642,16 @@ export default {
}); });
} }
}, },
handelRegister(row){ handelRegister(command, row) {
console.log(command);
console.log(row); console.log(row);
if (command == "bgjl") {
this.handleChangeRecord(row);
} else if (command == "swdj") {
this.handleDeath(row);
} else if (command == "qcdj") {
this.handleChangeTransfer(row);
}
}, },
reportForm() { reportForm() {
this.$refs.baobiao.init({ this.$refs.baobiao.init({
@ -573,22 +669,24 @@ export default {
}, },
}); });
}, },
checkSelect (row, index) {
return row.isChecked; //
checkSelectable(row, index) {
return this.filterEdit(row.agencyId);
}, },
// //
async handleChangeTransfer(row) { async handleChangeTransfer(row) {
this.tranferShow = true; this.tranferShow = true;
await nextTick(200); await nextTick(200);
this.$refs.ref_change_transfer.initForm(row) this.$refs.ref_change_transfer.initForm(row);
}, },
// //
async handleDeath(row) { async handleDeath(row) {
console.log("=====", row);
this.deathShow = true; this.deathShow = true;
await nextTick(200); await nextTick(200);
this.$refs.ref_death.initForm(row) this.$refs.ref_death.initForm(row);
this.resideathAddObj1 = { name: row.NAME, GRID_ID: row.GRID_ID }
}, },
// //
@ -631,6 +729,7 @@ export default {
}, },
filterEdit(id) { filterEdit(id) {
const { user } = this.$store.state; const { user } = this.$store.state;
return true; //
return id === user.agencyId; return id === user.agencyId;
}, },
selectionChange(selection) { selectionChange(selection) {
@ -715,7 +814,6 @@ export default {
return _val || row[item.columnName]; return _val || row[item.columnName];
}, },
resetSearchForm(formName) { resetSearchForm(formName) {
// for(const n in this.form) { // for(const n in this.form) {
// this.form[n] = '' // this.form[n] = ''
@ -922,7 +1020,7 @@ export default {
console.log(tab, event); console.log(tab, event);
}, },
async handleLook(row) { async handleLook(row) {
console.log(); console.log(row);
this.lookInfo.userId = row.icResiUserId; this.lookInfo.userId = row.icResiUserId;
this.lookInfo.gridName = row.GRID_ID; this.lookInfo.gridName = row.GRID_ID;
this.showedPeopleMoreInfo = true; this.showedPeopleMoreInfo = true;
@ -939,7 +1037,7 @@ export default {
async handleEdit(row) { async handleEdit(row) {
this.disabled = false; this.disabled = false;
this.editAgencyId = row.ORG_ID; this.editAgencyId = row.ORG_ID;
this.editUserId = row.icResiUserId this.editUserId = row.icResiUserId;
await this.getFormList("edit"); await this.getFormList("edit");
await this.getrowInfo(row.icResiUserId); await this.getrowInfo(row.icResiUserId);
}, },
@ -1049,7 +1147,7 @@ export default {
}, },
async handleSUbmit() { async handleSUbmit() {
this.$refs.baseForm.submit_from() this.$refs.baseForm.submit_from();
for (const key of this.$refs.baseForm) { for (const key of this.$refs.baseForm) {
if (typeof key == "Object") { if (typeof key == "Object") {
console.log(key); console.log(key);
@ -1160,23 +1258,29 @@ export default {
}); });
this.btnLoading = false; this.btnLoading = false;
}, },
async getTableData() { async getTableData() {
try {
let params = { let params = {
pageNo: this.currentPage, pageNo: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
}; };
// this.tableLoading = true; this.tableLoading = true;
const { data } = await this.$http.post("/actual/base/residentBaseInfo/page", params) const { data, code, msg } = await requestPost(
this.tableData =data.data.list "/actual/base/residentBaseInfo/page",
console.log(this.tableData); params
console.log(data,'data'); );
} catch (error) {
console.log(error);
}
this.tableLoading = false; this.tableLoading = false;
if (code === 0) {
this.total = data.total;
this.tableData = data.list.map((item) => {
item.isChecked = false;
return item;
});
} else {
this.$message.error(msg);
}
}, },
getrowInfo(id) { getrowInfo(id) {
let params = { let params = {
formCode: "resi_base_info", formCode: "resi_base_info",
@ -1185,8 +1289,6 @@ export default {
this.$http this.$http
.post("/epmetuser/icresiuser/detail", params) .post("/epmetuser/icresiuser/detail", params)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
@ -1288,6 +1390,7 @@ export default {
}); });
return arr; return arr;
}, },
async getFormList(type) { async getFormList(type) {
await this.$http await this.$http
.post("/oper/customize/icform/getcustomerform", { .post("/oper/customize/icform/getcustomerform", {
@ -1298,7 +1401,7 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log(res.data, 'res.data'); console.log(res.data, "res.data");
console.log("获取详情成功getFormList"); console.log("获取详情成功getFormList");
let { itemList, groupList, formName } = res.data; let { itemList, groupList, formName } = res.data;
this.formName = formName; this.formName = formName;
@ -1423,8 +1526,6 @@ export default {
margin-right: 0; margin-right: 0;
} }
.tabs-other-info { .tabs-other-info {
// ::v-deep .el-tabs__nav-wrap::after, // ::v-deep .el-tabs__nav-wrap::after,
::v-deep .el-tabs__active-bar_active { ::v-deep .el-tabs__active-bar_active {
background-color: #0055d7; background-color: #0055d7;
@ -1439,15 +1540,14 @@ export default {
color: #666666; color: #666666;
border-radius: 2px; border-radius: 2px;
&:hover { &:hover {
color: #0056D6; color: #0056d6;
} }
} }
::v-deep .el-tabs__item.is-active { ::v-deep .el-tabs__item.is-active {
color: #0056D6; color: #0056d6;
} }
::v-deep .el-tabs__active-bar { ::v-deep .el-tabs__active-bar {
background-color: #0056D6; background-color: #0056d6;
} }
.resi-container .resi-card { .resi-container .resi-card {
position: relative; position: relative;
@ -1508,9 +1608,7 @@ export default {
display: block; display: block;
} }
} }
</style>
<style lang="scss" scoped>
.resi-card-table { .resi-card-table {
margin-top: 20px; margin-top: 20px;
} }
@ -1568,5 +1666,8 @@ export default {
.div_del { .div_del {
margin-top: 15px; margin-top: 15px;
} }
.m-page {
margin-left: auto;
}
} }
</style> </style>

187
src/views/modules/plugins/change/resideathAdd.vue

@ -1,47 +1,50 @@
<template> <template>
<div> <div>
<div class="dialog-h-content scroll-h m-edit"> <div class="dialog-h-content scroll-h m-edit">
<el-form ref="ref_form" <el-form
ref="ref_form"
:inline="true" :inline="true"
:model="dataForm" :model="dataForm"
label-width="90px" label-width="150px"
:rules="dataRule" :rules="dataRule"
class="m-form"> class="g-edit-form"
>
<template> <template>
<el-form-item class="f-top24" <el-form-item class="f-top24" label="当前组织" style="display: block">
label="当前组织" {{ dataForm.gridName }}
style="display: block">
{{resideathAddObj.GRID_ID}}
</el-form-item> </el-form-item>
</template> </template>
<template> <template>
<el-form-item label="姓名" <el-form-item label="姓名" style="display: block">
style="display: block"> {{ dataForm.name }}
{{resideathAddObj.name}}
</el-form-item> </el-form-item>
</template> </template>
<el-form-item label="死亡日期" <el-form-item label="死亡日期" style="display: block" prop="deathDate">
style="display: block" <el-date-picker
prop="deathDate"> v-model="dataForm.deathDate"
<el-date-picker v-model="dataForm.deathDate" class="u-edit-width-normal"
class="u-item-width-daterange"
type="date" type="date"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="选择日期" placeholder="选择日期"
:clearable="false"> :clearable="false"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<div class="item-textarea"> <div class="item-textarea">
<el-form-item label="死亡原因" <el-form-item
label="死亡原因"
style="display: block" style="display: block"
prop="blacklistReason"> prop="blacklistReason"
<el-input type="textarea" >
<el-input
type="textarea"
resize="none" resize="none"
class="u-item-width-daterange" class="u-edit-width-normal"
placeholder='请输入死亡原因' placeholder="请输入死亡原因"
v-model="dataForm.blacklistReason"> v-model="dataForm.blacklistReason"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</div> </div>
@ -51,62 +54,52 @@
<el-checkbox v-model="dataForm.welfareFlag">享受</el-checkbox> <el-checkbox v-model="dataForm.welfareFlag">享受</el-checkbox>
</el-form-item> --> </el-form-item> -->
</el-form> </el-form>
</div> </div>
<div class="m-edit-btn"> <div class="m-edit-btn">
<el-button size="small" <el-button size="small" class="" @click="handleCancle"> </el-button>
class="" <el-button
@click="handleCancle"> </el-button> size="small"
<el-button size="small"
class="diy-button--blue" class="diy-button--blue"
:loading="btnDisable" :loading="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"
> </el-button
>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import util from '@js/util.js'; import util from "@js/util.js";
import { Loading } from 'element-ui' // Loading import { Loading } from "element-ui"; // Loading
import { requestPost, requestGet } from '@/js/dai/request' import { requestPost, requestGet } from "@/js/dai/request";
let loading // let loading; //
export default { export default {
data() { data() {
return { return {
btnDisable: false, btnDisable: false,
dataForm: { dataForm: {
blacklistReason: '', name: "",
deathDate: '', gridName: "",
}, blacklistReason: "",
deathDate: "",
}
},
components: {
}, },
mounted () { };
}, },
components: {},
mounted() {},
computed: { computed: {
dataRule() { dataRule() {
return { return {
blacklistReason: [ blacklistReason: [
{ required: true, message: '死亡原因不能为空', trigger: 'blur' }, { required: true, message: "死亡原因不能为空", trigger: "blur" },
], ],
deathDate: [ deathDate: [
{ required: true, message: '死亡日期不能为空', trigger: 'blur' } { required: true, message: "死亡日期不能为空", trigger: "blur" },
], ],
};
}
}, },
}, },
methods: { methods: {
async initForm(row) { async initForm(row) {
@ -114,99 +107,73 @@ export default {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.dataForm.idCard = row.ID_CARD this.dataForm.idCard = row.idNum;
this.dataForm.name = row.NAME this.dataForm.name = row.name;
this.dataForm.mobile = row.MOBILE this.dataForm.gridName = row.gridName;
this.dataForm.gender = row.GENDER == '女' ? '0' : row.GENDER == '男' ? '1' : '' this.dataForm.mobile = row.mobile;
this.dataForm.type = '1' this.dataForm.gender = row.gender;
this.dataForm.userId = row.icResiUserId this.dataForm.type = "1";
this.dataForm.userId = row.resiId;
}, },
async handleComfirm() { async handleComfirm() {
this.btnDisable = true this.btnDisable = true;
setTimeout(() => { setTimeout(() => {
this.btnDisable = false this.btnDisable = false;
}, 2000) }, 2000);
this.$refs['ref_form'].validate((valid, messageObj) => { this.$refs["ref_form"].validate((valid, messageObj) => {
if (!valid) { if (!valid) {
// app.util.validateRule(messageObj) // app.util.validateRule(messageObj)
console.log('error submit!') console.log("error submit!");
} else { } else {
this.saveForm();
this.saveForm()
} }
});
})
}, },
async saveForm() { async saveForm() {
const url = "/epmetuser/rentDeath/save";
const { data, code, msg } = await requestPost(url, this.dataForm);
const url = '/epmetuser/rentDeath/save'
const { data, code, msg } = await requestPost(url, this.dataForm)
if (code === 0) { if (code === 0) {
this.$message.success('操作成功') this.$message.success("操作成功");
this.handleCancle() this.handleCancle();
} else { } else {
this.$message.error(msg) this.$message.error(msg);
} }
}, },
handleCancle() { handleCancle() {
this.resetData() this.resetData();
this.$emit('dialogCancle') this.$emit("dialogCancle");
}, },
resetData() { resetData() {
this.dataForm = { this.dataForm = {
icUserId: '', // ID name: "",
type: 'in',//out,in gridName: "",
agencyId: '',//Id blacklistReason: "",
gridId: '',//Id deathDate: "",
villageId: '',//ID };
buildId: '',//Id
unitId: '',//Id
homeId: '', //Id
transferTime: '', //
reason: '', //
outOfTime: '',
welfareFlag: false
}
}, },
// //
startLoading() { startLoading() {
loading = Loading.service({ loading = Loading.service({
lock: true, // lock: true, //
text: '正在加载……', // text: "正在加载……", //
background: 'rgba(0,0,0,.7)' // background: "rgba(0,0,0,.7)", //
}) });
}, },
// //
endLoading() { endLoading() {
// clearTimeout(timer); // clearTimeout(timer);
if (loading) { if (loading) {
loading.close() loading.close();
}
} }
}, },
props: { },
resideathAddObj: { };
type: Object,
default: () => { return {} }
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/scss/modules/management/edit-main.scss"; @import "@/assets/scss/modules/management/edit-main.scss";

Loading…
Cancel
Save