jiangyy 3 years ago
parent
commit
d4376261fe
  1. 211
      src/views/components/resiChangeRecord.vue
  2. 561
      src/views/components/resiChangeTransfer.vue
  3. 10
      src/views/components/resiForm.vue
  4. 223
      src/views/components/resiSearch.vue
  5. 504
      src/views/modules/base/resi.vue
  6. 187
      src/views/modules/plugins/change/resideathAdd.vue

211
src/views/components/resiChangeRecord.vue

@ -1,94 +1,112 @@
<template>
<div class="g-main">
<el-table :data="tableData"
<el-table
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%">
<el-table-column label="序号"
style="width: 100%"
>
<el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="typeName"
width="50"
></el-table-column>
<el-table-column
prop="typeName"
header-align="center"
align="center"
label="变更类型"
width="80">
width="80"
>
</el-table-column>
<el-table-column prop="reason"
<el-table-column
prop="reason"
header-align="center"
align="center"
label="原因"
show-overflow-tooltip
min-width="120">
min-width="120"
>
</el-table-column>
<el-table-column prop="changeTime"
<el-table-column
prop="changeTime"
header-align="center"
align="center"
label="变更时间"
width="160">
width="160"
>
</el-table-column>
<el-table-column prop="beforeChangeName"
<el-table-column
prop="beforeChangeName"
header-align="center"
align="center"
label="变更前"
show-overflow-tooltip
width="230">
width="230"
>
</el-table-column>
<el-table-column prop="afterChangeName"
<el-table-column
prop="afterChangeName"
header-align="center"
align="center"
label="变更后"
show-overflow-tooltip
min-width="230">
min-width="230"
>
</el-table-column>
<el-table-column prop="operatorName"
<el-table-column
prop="operatorName"
header-align="center"
align="center"
label="操作人"
width="80">
width="80"
>
</el-table-column>
<el-table-column prop="createdTime"
<el-table-column
prop="createdTime"
header-align="center"
align="center"
label="调整时间"
width="160">
width="160"
>
</el-table-column>
<el-table-column prop="remark"
<el-table-column
prop="remark"
header-align="center"
align="center"
label="备注"
show-overflow-tooltip
min-width="120">
min-width="120"
>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[10, 20, 50]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
:total="total"
>
</el-pagination>
</div>
</div>
</template>
<script>
import util from '@js/util.js';
import util from "@js/util.js";
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; // Loading
let loading //
let loading; //
export default {
data() {
return {
@ -99,62 +117,53 @@ export default {
tableLoading: false,
tableData: [],
icUserId: '',
}
icUserId: "",
};
},
async mounted () {
},
async mounted() {},
methods: {
async initForm(row) {
this.icUserId = row.icResiUserId
this.icUserId = row.resiId;
//
await this.loadTable()
await this.loadTable();
},
handleSearch() {
this.loadTable()
this.loadTable();
},
async loadTable() {
this.tableLoading = true
this.tableLoading = true;
const url = "/epmetuser/icuserchangerecord/list"
const url = "/epmetuser/icuserchangerecord/list";
let params = {
icUserId: this.icUserId,
pageSize: this.pageSize,
pageNo: this.pageNo,
};
}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.total = data.total;
this.tableData = data.list;
} else {
this.$message.error(msg)
this.$message.error(msg);
}
this.tableLoading = false
this.tableLoading = false;
},
//
initDate() {
let yesterday = new Date((new Date).getTime() - 24 * 60 * 60 * 1000)
let yesterday = new Date(new Date().getTime() - 24 * 60 * 60 * 1000);
let year = yesterday.getFullYear()
let month = yesterday.getMonth() + 1 //
let day = yesterday.getDate() //
let year = yesterday.getFullYear();
let month = yesterday.getMonth() + 1; //
let day = yesterday.getDate(); //
let days = new Date(year, month, 0);
days = days.getDate(); //
@ -171,95 +180,101 @@ export default {
day2 = days2;
}
if (month2 < 10) {
month2 = '0' + month2;
month2 = "0" + month2;
}
if (month < 10) {
month = '0' + month;
month = "0" + month;
}
if (day < 10) {
day = '0' + day;
day = "0" + day;
}
if (day2 < 10) {
day2 = '0' + day2;
day2 = "0" + day2;
}
let t2 = year2 + '-' + month2 + '-' + day2;
let t1 = year + '-' + month + '-' + day;
let t2 = year2 + "-" + month2 + "-" + day2;
let t1 = year + "-" + month + "-" + day;
// let t3 = formate(t2, style);
this.formData.startTime = t2 + ' 00:00:00'
this.formData.endTime = t1 + ' 23:59:59'
this.formData.startTime = t2 + " 00:00:00";
this.formData.endTime = t1 + " 23:59:59";
this.timeRange = [t2, t1]
this.timeRange = [t2, t1];
},
handleTimeChange(time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-')
const endTimeArray = util.dateFormatter(time[1], 'date').split('-')
this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00'
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
const startTimeArray = util.dateFormatter(time[0], "date").split("-");
const endTimeArray = util.dateFormatter(time[1], "date").split("-");
this.formData.startTime =
startTimeArray[0] +
"-" +
startTimeArray[1] +
"-" +
startTimeArray[2] +
" 00:00:00";
this.formData.endTime =
endTimeArray[0] +
"-" +
endTimeArray[1] +
"-" +
endTimeArray[2] +
" 23:59:59";
// this.startTimeShow = startTimeArray[0] + '' + startTimeArray[1] + '' + startTimeArray[2] + ''
// this.endTimeShow = endTimeArray[0] + '' + endTimeArray[1] + '' + endTimeArray[2] + ''
} else {
this.formData.startTime = ''
this.formData.endTime = ''
this.formData.startTime = "";
this.formData.endTime = "";
// this.startTimeShow = ''
// this.endTimeShow = ''
}
this.loadTable()
this.loadTable();
},
handleSizeChange(val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange(val) {
this.pageNo = val
this.loadTable()
this.pageNo = val;
this.loadTable();
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
loading.close();
}
},
},
computed: {
tableHeight() {
return (this.clientHeight - 460)
return this.clientHeight - 460;
},
rowHeight() {
return (this.clientHeight - 200) + 'px'
return this.clientHeight - 200 + "px";
},
...mapGetters(['clientHeight'])
},
watch: {
...mapGetters(["clientHeight"]),
},
watch: {},
props: {
serviceType: {
type: String,
default: ''
}
}
}
default: "",
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";

561
src/views/components/resiChangeTransfer.vue

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

10
src/views/components/resiForm.vue

@ -974,6 +974,7 @@ export default {
homeId: '', //id
name:'', //
nation:'', //
remark:'', //
localResidenceFlag:'', //
birthday:'', //
idNum:'', //
@ -1151,9 +1152,16 @@ export default {
methods: {
submit_from(){
var flag = false
this.$refs.formId.validate(v=>{
this.validateFlag = v
flag = v
})
if(flag){
return this.form
}
return this.form
},
getAllNation(){
@ -1500,7 +1508,7 @@ export default {
const _id = this.form.idNum.substr(0, 6)
const { sex, birth, age } = computedCard(this.form.idNum)
this.form.birthday = birth
this.form.gender = sex == 1 ? '1' : '0'
this.form.gender = sex == 1 ? '1' : '2'
this.form.oldPeopleFlag = age >= 60 ? 1 : 0
// this.form.IS_BDHJ = huji == _id ? '1' : ''
this.validateIdcard(this.form.idNum)

223
src/views/components/resiSearch.vue

@ -2,63 +2,84 @@
<div class="resi-container">
<!-- <el-card class="resi-card"> -->
<div class="g-main">
<el-form :inline="true" class="header_form_box" :model="form" :label-width="'100px'">
<el-form :inline="true" class="header_form_box" v-for="(item, index) in sliceList(itemList, 4)"
:class="boxHeight ? 'm-form-box-height-auto' : 'm-form-box-height'" :key="index">
<el-form-item v-for="n in item" :key="n.id">
<div class="resi-cell">
<div style="width:100px;text-align: right;padding-right:14px ;">{{ n.label }}:</div>
<div class="resi-cell-value" :class="n.itemType === 'radio' && 'resi-cell-value-radio'">
<el-input v-if="n.itemType === 'input' || n.itemType === 'textarea'" v-model.trim="form[n.columnName]"
class="u-item-width-normal" size="small" clearable placeholder="请输入内容">
</el-input>
<template v-else-if="n.itemType == 'inputRange'">
<!-- <el-input
v-model.trim="form[n.columnName]"
class="resi-cell-input"
<el-form-item label="居民姓名" >
<el-input v-model="form.name" placeholder="请输入" size="small" class="u-item-width-normal" clearable ></el-input>
</el-form-item>
<el-form-item label="联系电话" >
<el-input v-model="form.mobile" size="small" placeholder="请输入" class="u-item-width-normal" clearable ></el-input>
</el-form-item>
<el-form-item label="证件号" >
<el-input v-model="form.idNum" size="small" placeholder="请输入" class="u-item-width-normal" clearable ></el-input>
</el-form-item>
<el-form-item label="居民性别" >
<el-select v-model="form.gender" class="u-item-width-normal" clearable size="small">
<el-option label='男' value='1'> </el-option>
<el-option label='女' value='2'> </el-option>
</el-select>
</el-form-item>
<el-form-item label="出生日期" >
<el-date-picker
v-model="form.birthdayStart"
type="date"
size="small"
clearable
placeholder="请输入内容"
/> -->
<inputRange style="height:37px;" v-model="form[n.columnName]" :type="n.validType" @change="handleAgeChange" />
</template>
<template v-else-if="n.itemType === 'datepicker'">
<el-date-picker v-if="n.queryType === 'daterange'" v-model.trim="timer.startPickerTime"
:picker-options="startPickerOptions" type="date" align="right" unlink-panels placeholder="开始时间"
class="u-item-width-daterange" style="margin-right:34px;" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
</el-date-picker>
<el-date-picker v-if="n.queryType === 'daterange'" v-model.trim="timer.endPickerTime"
:picker-options="endPickerOptions" class="u-item-width-daterange data-tag" size="small" type="date"
value-format="yyyy-MM-dd" value="yyyy-MM-dd" placeholder="结束时间">
class="u-item-width-daterange"
placeholder="开始日期">
</el-date-picker>
<el-date-picker v-else v-model.trim="form[n.columnName]" class="resi-cell-input" type="inputRange"
size="small" clearable format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择日期">
<span class="u-data-tag"></span>
<el-date-picker
v-model="form.birthdayEnd"
type="date"
size="small"
class="u-item-width-daterange u-data-tag"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="居民年龄" >
<el-input v-model="form.ageStart" class="u-item-width-normal" placeholder="请输入" clearable size="small">
</el-input>
</el-form-item>
<el-form-item label="文化程度" >
<el-select v-model="form.cultureLevel" class="u-item-width-normal" clearable size="small">
<template v-for="item in Education" >
<el-option :label='item.label' :value='item.value'> </el-option>
</template>
<el-select v-else-if="n.itemType === 'select' || n.itemType === 'radio'" v-model.trim="form[n.columnName]"
placeholder="请选择" size="small" clearable class="u-item-width-normal"
:collapse-tags="n.multiSelect == 1 ? true : false" :multiple="n.multiSelect == 1 ? true : false">
<el-option v-for="item in n.options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="本地户籍" >
<el-select v-model="form.localResidenceFlag" class="u-item-width-normal" clearable size="small">
<el-option label='是' value='1'> </el-option>
<el-option label='否' value='0'> </el-option>
</el-select>
<el-cascader v-else-if="n.itemType === 'cascader'" v-model.trim="form[n.columnName]" :options="n.options"
:props="{ checkStrictly: true }" clearable size="small" class="resi-cell-select">
</el-cascader>
<template v-else-if="n.itemType === 'checkbox'">
<el-checkbox-group v-model="form[n.columnName]">
<el-checkbox v-for="ns in n.options" :key="ns.value" :label="ns.value">{{ ns.label }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="居民类别">
<el-select v-model="form.categoryKey" collapse-tags multiple class="u-item-width-normal" clearable size="small">
<template v-for="item in resiClass" >
<el-option :label='item.label' :value='item.value'> </el-option>
</template>
</div>
</div>
</el-select>
</el-form-item>
<el-form-item label="人户状况" >
<el-select v-model="form.householdSituation" class="u-item-width-normal" clearable size="small">
<template v-for="item in household" >
<el-option :label='item.label' :value='item.value'> </el-option>
</template>
</el-select>
</el-form-item>
<el-form-item label="民族" >
<el-select v-model="form.nation" class="u-item-width-normal" clearable size="small">
<template v-for="item in nation" >
<el-option :label='item.label' :value='item.value'> </el-option>
</template>
</el-select>
</el-form-item>
<el-form-item prop="agencyIdArray">
<span style="width:100px;text-align: right;padding-right:14px;display: inline-block; " >所属组织:</span>
<el-cascader class="u-item-width-normal" ref="myCascader" v-model="agencyIdArray" :options="orgOptions"
<el-cascader class="u-item-width-normal" size="small" ref="myCascader" v-model="agencyIdArray" :options="orgOptions"
:props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency"></el-cascader>
</el-form-item>
<el-form-item prop="VILLAGE_ID" >
<div class="resi-cell">
<div class="resi-cell-value">
@ -88,7 +109,9 @@
</div>
</div>
</el-form-item>
<el-form-item label="备注" >
<el-input v-model="form.remark" placeholder="请输入" size="small" class="u-item-width-normal" clearable ></el-input>
</el-form-item>
</el-form>
</div>
@ -104,7 +127,7 @@
<smart-search-rule ref="ref_rule" :formType="formType"></smart-search-rule>
</el-col>
</el-row>
<el-row v-if="isArrow" class="resi-search">
<!-- <el-row v-if="isArrow" class="resi-search">
<el-col :span="24">
<el-button type="primary" size="small" plain class="diy-button--blue"
@ -116,7 +139,7 @@
@click="boxHeight = !boxHeight">{{ boxHeight ? '收起' : '展开' }}<i
:class="boxHeight ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i></el-button>
</el-col>
</el-row>
</el-row> -->
</div>
</template>
@ -185,7 +208,26 @@ export default {
}
})
let constForm = {
...form,
name:'',
mobile:'',
idNum:'',
birthdayStart:'',
birthdayEnd:'',
ageStart:'',
ageEnd:'',
gender:'',
cultureLevel:'',
localResidenceFlag:'',
householdSituation:'',
nation:'',
agencyId:'',
buildId:'',
homeId:'',
unitId:'',
gridId:'',
villageId:'',
categoryKey:[],
remark:'',
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
@ -228,20 +270,16 @@ export default {
agencyIdArray: [],
value: '',
// 1
Education:[],
nation:[],
household:[],
resiClass:[],
itemList,
fixedList: [],
fixedForm: {
AGENCY_ID: '',
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
},
constForm,
form: {
...form,
AGENCY_ID: '',
agencyId : '',
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
@ -282,7 +320,7 @@ export default {
},
queryType: {
'AGENCY_ID': 'like'
'agencyId ': 'like'
},
showSmartSearchForm: false,
@ -447,7 +485,11 @@ export default {
// console.log('formcccc---', this.form)
this.getOrgTreeList()
this.getGridList()
this.getEducation()
this.getValiheList()
this.getDictList()
this.getHousehold()
this.getResident()
if (this.columnName) this.handleChangeForm(this.columnName)
},
methods: {
@ -577,14 +619,14 @@ export default {
if (obj) {
if (obj.level === 'grid') {
this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.AGENCY_ID = ''
this.form.agencyId = ''
} else {
this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.GRID_ID = ''
}
} else {
this.form.AGENCY_ID = ''
this.form.agencyId = ''
this.form.GRID_ID = ''
}
@ -661,7 +703,6 @@ export default {
})
},
getOrgTreeList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.then(({ data: res }) => {
@ -680,7 +721,7 @@ export default {
getGridList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'addorupdate' })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -698,7 +739,7 @@ export default {
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', {
gridId: this.form.GRID_ID,
agencyId: this.form.AGENCY_ID,
agencyId: this.form.agencyId ,
// agencyId: user.agencyId
})
.then(({ data: res }) => {
@ -762,6 +803,58 @@ export default {
return this.$message.error('网络错误')
})
},
getTreeData (data) {
if (!Array.isArray(data)) return [];
let arr = data.map((item) => {
let _item = {};
if (item.children) {
if (item.children.length === 0)
_item = { ...item, children: undefined };
else _item = { ...item, children: this.getTreeData(item.children) };
} else {
_item = { ...item };
}
return _item;
});
return arr;
},
async getEducation(){
try {
let { data } = await this.$http.post('sys/dict/data/education',{formCode: "resi_base_info"})
data.data = this.getTreeData(data.data)
this.Education = data.data
console.log(this.Education);
} catch (error) {
console.log(error,'获取民族字典');
}
},
async getDictList(){
try {
const { data } = await this.$http.post('sys/dict/data/nation',{formCode: "resi_base_info"})
this.nation = data.data
} catch (error) {
console.log(error,'获取民族字典');
}
},
async getHousehold(){
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'household_situation'})
this.household = data.data
} catch (error) {
console.log(error,'获取人户状况字典');
}
},
async getResident(){
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'resident_category'})
this.resiClass = data.data
} catch (error) {
console.log(error,'获取配偶情况字典');
}
},
computedBirth(age) {
let now = new Date();
let nowYear = now.getFullYear();

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

@ -39,21 +39,43 @@
<img v-else
src="../../../assets/img/arrow-down.png" />
</div> -->
<resi-search ref="myResiSearch" />
<el-row class="resi-search">
<el-col :span="24">
<el-button size="small"
class="diy-button--blue"
@click="handleSearchFrom">查询</el-button>
<!-- -->
<el-button style="margin-left:10px"
size="small"
class="diy-button--white"
@click="">重置</el-button>
<!-- resetSearchForm -->
</el-col>
</el-row>
</div>
<div class="m-table">
<div class="div_btn">
<div class="div_btn_left">
<el-button v-if="btnAuths.ic_resi_add"
<el-button
v-if="btnAuths.ic_resi_add"
size="small"
@click="handleAdd"
class="diy-button--blue"
icon="el-icon-plus"> 新增</el-button>
<el-button v-if="btnAuths.ic_resi_export"
icon="el-icon-plus"
>
新增</el-button
>
<el-button
v-if="btnAuths.ic_resi_export"
style="margin-left: 10px"
size="small"
@click="diyExport"
class="diy-button--white">导出</el-button>
class="diy-button--white"
>导出</el-button
>
<!-- <el-button v-if="btnAuths.ic_resi_import"
style="margin-left:10px"
@ -80,23 +102,29 @@
:loading="importLoading">{{ importBtnTitle }}</el-button>
</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"
size="small"
@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"
size="small"
@click="deleteBatch"
class="diy-button--white">批量删除</el-button>
class="diy-button--white"
>批量删除</el-button
>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
</div>
</div>
<el-table ref="ref_table"
<el-table
ref="ref_table"
class="m-table-item"
:data="tableData"
v-loading="tableLoading"
@ -104,123 +132,152 @@
style="width: 100%"
:height="tableHeight"
@select-all="selectAll"
@selection-change="selectionChange">
<el-table-column type="selection"
@selection-change="selectionChange"
>
<el-table-column
type="selection"
fixed="left"
align="left"
:selectable="checkSelect"
width="55" />
<el-table-column label="序号"
align="center"
:selectable="checkSelectable"
width="50"
/>
<el-table-column
label="序号"
type="index"
fixed="left"
align="left"
width="50">
width="50"
>
</el-table-column>
<el-table-column v-for="item in tableHeader"
<el-table-column
v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="left"
:show-overflow-tooltip="true"
:width="item.width || computedWidth(item.label, item.itemType)">
<!-- :width="item.itemType === 'radio' ? computedWidth(item.label) : 180" -->
:width="item.width || ''"
>
<template slot-scope="scope">
<a v-if="item.columnName == 'NAME' && btnAuths.ic_resi_view"
<a
v-if="item.columnName == 'NAME' && btnAuths.ic_resi_view"
class="name-a"
>
{{ handleFilterSpan(scope.row, item) }}
</a>
<div v-else-if="item.columnName == 'gender'">
{{scope.row.gender == 1 ? '男' : '女' }}
{{ scope.row.gender == 1 ? "男" : "女" }}
</div>
<div v-else-if="item.columnName == 'birthday'">
{{ scope.row.birthday.substr(0, 10) }}
</div>
<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 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>
<span v-else>{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
<el-table-column fixed="right"
label="操作"
align="left"
width="260">
<el-table-column fixed="right" label="操作" align="center" width="200">
<template slot-scope="scope">
<!-- <el-button @click="handleLook(scope.row)"
<el-button
v-if="btnAuths.ic_resi_view"
type="text"
class="div-table-button--blue"
size="small"
class="btn-color-look">查看</el-button> -->
@click="handleLook(scope.row)"
>查看</el-button
>
<!-- <el-button v-if="btnAuths.ic_resi_change_rec"
@click="handleChangeRecord(scope.row)"
type="text"
class="div-table-button--orange"
size="small">变更记录</el-button> -->
<template v-if="filterEdit(scope.row.ORG_ID)">
<el-button v-if="btnAuths.ic_resi_update"
<template v-if="filterEdit(scope.row.agencyId)">
<el-button
v-if="btnAuths.ic_resi_update"
style="margin-right: 10px"
@click="handleEdit(scope.row)"
class="div-table-button--blue"
size="small"
type="text"
>编辑</el-button>
<el-popconfirm v-if="btnAuths.ic_resi_del"
>编辑</el-button
>
<el-popconfirm
v-if="btnAuths.ic_resi_del"
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>
</template>
<el-dropdown
trigger="click"
style="margin-left: 10px"
@command="(command) => handelRegister(command, scope.row)"
>
<el-button
type="text"
class="div-table-button--blue"
size="small" @click="handleLook(scope.row)">查看</el-button>
<el-button
size="small"
type="text"
class="div-table-button--blue f-right10"
size="small">编辑</el-button>
<el-dropdown trigger="click" @command="handelRegister">
<span class=" div-table-button--blue">
登记<i class="el-icon-arrow-down el-icon--right"></i>
</span>
style="font-size: 10px"
>
</el-button
>
<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>
</template>
</template>
</el-table-column>
</el-table>
<div class="div-flex">
<div class="div_del">
<!-- <el-checkbox :indeterminate="isIndeterminate"
v-model="selAllFlag"
: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"
<div class="m-page">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
:total="total"
>
</el-pagination>
</div>
</div>
</div>
<el-dialog :title="formName === '社区居民基本信息录入表'?'新增居民':formName"
<el-dialog
:title="formName === '社区居民基本信息录入表' ? '新增居民' : formName"
:visible.sync="dialogVisible"
width="986px"
top="5vh"
@ -228,13 +285,16 @@
append-to-body
class="dialog-h"
:close-on-click-modal="false"
:before-close="handlerCancle">
:before-close="handlerCancle"
>
<div class="dialog-h-content scroll-h">
<resi-form v-if="dialogVisible"
<resi-form
v-if="dialogVisible"
ref="baseForm"
:fixed="true"
:form-list="formList"
@changegroup="handleChangeGroup" />
@changegroup="handleChangeGroup"
/>
<!-- <div v-if="dialogVisible"
class="resi-other">
<div class="tabs-other-info">
@ -257,18 +317,28 @@
</div>
<div class="resi-btns">
<el-button size="small"
@click="handlerReset" class="diy-button--common">重置</el-button>
<el-button size="small"
@click="handlerCancle" class="diy-button--common">取消</el-button>
<el-button type="primary"
<el-button size="small" @click="handlerReset" class="diy-button--common"
>重置</el-button
>
<el-button
size="small"
@click="handlerCancle"
class="diy-button--common"
>取消</el-button
>
<el-button
type="primary"
size="small"
:loading="btnLoading"
@click="handleSUbmit" class="diy-button--blue">保存</el-button>
@click="handleSUbmit"
class="diy-button--blue"
>保存</el-button
>
</div>
</el-dialog>
<el-dialog :title="formName"
<el-dialog
:title="formName"
:visible.sync="dialogEditVisible"
width="986px"
top="5vh"
@ -276,9 +346,11 @@
append-to-body
class="dialog-h"
:close-on-click-modal="false"
:before-close="handlerEditCancle">
:before-close="handlerEditCancle"
>
<div class="dialog-h-content scroll-h">
<edit-resi v-if="dialogEditVisible"
<edit-resi
v-if="dialogEditVisible"
ref="baseForm"
:disabled="disabled"
:editUserId="editUserId"
@ -286,18 +358,20 @@
:fixed="true"
:form-list="formList"
:agency-id="editAgencyId"
@changegroup="handleChangeGroup" />
<div v-if="dialogEditVisible"
class="resi-other">
@changegroup="handleChangeGroup"
/>
<div v-if="dialogEditVisible" class="resi-other">
<div class="resi-other-title">其他</div>
<div class="tabs-other-info">
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in tabsList"
:key="item.groupId"
:label="item.label"
:name="'group' + item.groupId">
<edit-resi :ref="'group' + item.groupId"
:name="'group' + item.groupId"
>
<edit-resi
:ref="'group' + item.groupId"
:columns="3"
:support-add="item.supportAdd"
:form-id="item.columnName"
@ -305,40 +379,49 @@
:form-list="item.itemList"
:disabled="disabled"
:label-width="'140px'"
:agency-id="editAgencyId" />
:agency-id="editAgencyId"
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<div class="resi-btns">
<el-button size="small"
@click="handlerEditCancle">取消</el-button>
<el-button v-if="!disabled"
<el-button size="small" @click="handlerEditCancle">取消</el-button>
<el-button
v-if="!disabled"
type="primary"
size="small"
:loading="btnLoading"
@click="handleEditSUbmit">提交</el-button>
@click="handleEditSUbmit"
>提交</el-button
>
</div>
</el-dialog>
<!-- 变更记录 -->
<el-dialog :visible.sync="changeRecordShow"
<el-dialog
:visible.sync="changeRecordShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'变更记录'"
width="1150px"
top="5vh"
@closed="diaClose">
@closed="diaClose"
>
<resi-change-record ref="ref_changerecord"></resi-change-record>
</el-dialog>
<el-dialog :visible.sync="diyDialog"
<el-dialog
:visible.sync="diyDialog"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="1150px"
top="5vh"
class="dialog-h">
<diy-info v-if="diyDialog"
class="dialog-h"
>
<diy-info
v-if="diyDialog"
ref="ref_diy"
:list="exportList"
:search="{
@ -347,40 +430,50 @@
pageSize: pageSize,
conditions: conditions,
}"
@close="handleDiyClose"></diy-info>
@close="handleDiyClose"
></diy-info>
</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"
:userId="lookInfo.userId"
:gridName="lookInfo.gridName"
:detailTitle="'居民详情'"
@close="handleCancleLook" />
@close="handleCancleLook"
/>
<baobiao ref="baobiao" />
<!-- 迁出登记 -->
<el-dialog :visible.sync="tranferShow"
<el-dialog
:visible.sync="tranferShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'迁出登记'"
width="950px"
width="620px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<resi-change-transfer ref="ref_change_transfer"
@dialogCancle="transferClose"></resi-change-transfer>
@closed="diaClose"
>
<resi-change-transfer
ref="ref_change_transfer"
@dialogCancle="transferClose"
></resi-change-transfer>
</el-dialog>
<!-- 死亡登记 -->
<el-dialog :visible.sync="deathShow"
<el-dialog
:visible.sync="deathShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'死亡登记'"
width="950px"
width="620px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<resideath-add ref="ref_death"
:resideathAddObj="resideathAddObj1"
@dialogCancle="deathClose"></resideath-add>
@closed="diaClose"
>
<resideath-add ref="ref_death" @dialogCancle="deathClose"></resideath-add>
</el-dialog>
</div>
</template>
@ -395,7 +488,6 @@ import { mapGetters } from "vuex";
import resiTransfer from "../../components/resiTransfer.vue";
import resiChangeRecord from "../../components/resiChangeRecord.vue";
import peopleMore from "@/views/modules/shequ/cpts/people-more";
import baobiao from "@/views/modules/cpts/baobiao";
import diyInfo from "./diyInfo.vue";
@ -462,7 +554,13 @@ export default {
formName: "",
formList: [],
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: "姓名", width: 150 },
{ columnName: "birthday", label: "生日", width: 150 },
{ columnName: "gender", label: "性别", width: 80 },
{ columnName: "gridName", label: "所属网格" },
{ columnName: "homeName", label: "所属房屋" },
{ columnName: "idNum", label: "证件号", width: 200 },
{ columnName: "mobile", label: "联系电话", width: 150 },
],
tabsList: [],
selection: [],
@ -476,25 +574,27 @@ export default {
userId: "",
gridName: "",
},
editUserId: '',
editUserId: "",
displayedBaobiaoBtn: false,
btnAuths: {
ic_resi_add: false, //
ic_resi_import: false, //
ic_resi_export: false, //
ic_resi_batch_del: false, //
ic_resi_smart_import: false, //
ic_resi_del: false, //
ic_resi_view: false, //
ic_resi_update: false, //
ic_resi_change_rec: false, //
ic_resi_view_real_data: false, //
ic_resi_add: true, //
ic_resi_import: true, //
ic_resi_export: true, //
ic_resi_batch_del: true, //
ic_resi_smart_import: true, //
ic_resi_del: true, //
ic_resi_view: true, //
ic_resi_update: true, //
ic_resi_change_rec: true, //
ic_resi_view_real_data: true, //
},
};
},
props: {},
async activated() {
console.log("this.$route.query---", this.$route.query);
if (this.$route.query && this.$route.query.columnName) {
@ -504,6 +604,7 @@ export default {
console.log("defaultCategotyKey----", this.defaultCategotyKey);
}
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() {
@ -512,6 +613,7 @@ export default {
return this.$store.state.inIframe ? h : _h;
},
},
async created() {
this.updateBtnAuths();
@ -520,15 +622,14 @@ export default {
this.defaultCategotyKey = query.columnName;
}
// await this.getFormList()
// console.log('this.$refs.resiSearch', this)
this.getTableData()
this.getTableData();
this.pageLoading = true;
console.log("storeoooo----0000", this.$store);
},
async mounted() {
// this.$nextTick(() => {
// this.tableHeight = document.documentElement.clientHeight - this.$refs.resiSearch.$el.offsetHeight - 280 + 'px'
@ -544,6 +645,7 @@ export default {
},
});
},
methods: {
//
updateBtnAuths() {
@ -554,8 +656,16 @@ export default {
});
}
},
handelRegister(row){
handelRegister(command, row) {
console.log(command);
console.log(row);
if (command == "bgjl") {
this.handleChangeRecord(row);
} else if (command == "swdj") {
this.handleDeath(row);
} else if (command == "qcdj") {
this.handleChangeTransfer(row);
}
},
reportForm() {
this.$refs.baobiao.init({
@ -573,22 +683,26 @@ export default {
},
});
},
checkSelect (row, index) {
return row.isChecked;
handleSearchFrom(){
console.log(this.$refs.myResiSearch.form);
},
//
checkSelectable(row, index) {
return this.filterEdit(row.agencyId);
},
//
async handleChangeTransfer(row) {
this.tranferShow = true;
await nextTick(200);
this.$refs.ref_change_transfer.initForm(row)
this.$refs.ref_change_transfer.initForm(row);
},
//
//
async handleDeath(row) {
console.log("=====", row);
this.deathShow = true;
await nextTick(200);
this.$refs.ref_death.initForm(row)
this.resideathAddObj1 = { name: row.NAME, GRID_ID: row.GRID_ID }
this.$refs.ref_death.initForm(row);
},
//
@ -631,6 +745,7 @@ export default {
},
filterEdit(id) {
const { user } = this.$store.state;
// return true; //
return id === user.agencyId;
},
selectionChange(selection) {
@ -715,7 +830,6 @@ export default {
return _val || row[item.columnName];
},
resetSearchForm(formName) {
// for(const n in this.form) {
// this.form[n] = ''
@ -922,7 +1036,7 @@ export default {
console.log(tab, event);
},
async handleLook(row) {
console.log();
console.log(row);
this.lookInfo.userId = row.icResiUserId;
this.lookInfo.gridName = row.GRID_ID;
this.showedPeopleMoreInfo = true;
@ -939,7 +1053,7 @@ export default {
async handleEdit(row) {
this.disabled = false;
this.editAgencyId = row.ORG_ID;
this.editUserId = row.icResiUserId
this.editUserId = row.icResiUserId;
await this.getFormList("edit");
await this.getrowInfo(row.icResiUserId);
},
@ -1049,33 +1163,50 @@ export default {
},
async handleSUbmit() {
this.$refs.baseForm.submit_from()
for (const key of this.$refs.baseForm) {
if(typeof key == "Object"){
console.log(key);
const _baseForm = this.$refs.baseForm.submit_from();
_baseForm.partyFlag = parseInt(_baseForm.partyFlag),//
_baseForm.subsistenceAllowanceFlag = parseInt(_baseForm.subsistenceAllowanceFlag), //
_baseForm.ensureHouseFlag = parseInt(_baseForm.ensureHouseFlag), //
_baseForm.unemployedFlag = parseInt(_baseForm.unemployedFlag),//
_baseForm.fertileWomanFlag = parseInt(_baseForm.fertileWomanFlag), //
_baseForm.veteranFlag = parseInt(_baseForm.veteranFlag), //退
_baseForm.unitedFrontFlag = parseInt(_baseForm.unitedFrontFlag),//
_baseForm.petitionOfficerFlag = parseInt(_baseForm.petitionOfficerFlag),//访
_baseForm.volunteerFlag = parseInt(_baseForm.volunteerFlag), //
_baseForm.bereavedPersonFlag = parseInt(_baseForm.bereavedPersonFlag), //
_baseForm.tenantFlag = parseInt(_baseForm.tenantFlag), //
_baseForm.floatingFlag = parseInt(_baseForm.floatingFlag),//
_baseForm.specialCrowdFlag = parseInt(_baseForm.specialCrowdFlag),//
_baseForm.oldPeopleFlag = parseInt(_baseForm.oldPeopleFlag), //
_baseForm.emptyNesterFlag = parseInt(_baseForm.emptyNesterFlag), //
_baseForm.liveAloneFlag = parseInt(_baseForm.liveAloneFlag), //
_baseForm.disabledFlag = parseInt(_baseForm.disabledFlag), //
_baseForm.dementedFlag = parseInt(_baseForm.dementedFlag), //
_baseForm.disabilityFlag = parseInt(_baseForm.disabilityFlag),//
_baseForm.seriousIllnessFlag = parseInt(_baseForm.seriousIllnessFlag), //
_baseForm.chronicDiseaseFlag = parseInt(_baseForm.chronicDiseaseFlag) //
if(_baseForm.hobbyInfoDto.hobbyCode = []) {
_baseForm.hobbyInfoDto.hobbyCode = ''
} else {
_baseForm.hobbyInfoDto.hobbyCode.forEach(element => {
_baseForm.hobbyInfoDto.hobbyCode = _baseForm.hobbyInfoDto.hobbyCode + ',' + element
});
}
if(_baseForm.volunteerDto.volunteerCategory = []) {
_baseForm.volunteerDto.volunteerCategory = ''
} else {
_baseForm.volunteerDto.volunteerCategory.forEach(element => {
_baseForm.volunteerDto.volunteerCategory = _baseForm.volunteerDto.volunteerCategory + ',' + element
});
}
// console.log(this,$refs.baseForm);
// const arr = await this.formetForm();
// this.$refs.baseForm.tabsList.forEach(item=>{
// if(item.id){
// console.log(item.id);
// }
// })
// console.log(this.$refs.baseForm.tabsList);
// if(this.$refs.baseForm.form.hobbyInfoDto.hobbyCode.length != 0 || this.$refs.baseForm.form.volunteerDto.volunteerCategory.length != 0 ||this.$refs.baseForm.form.specialDto.specialCategoryCode.length != 0){
// this.$refs.baseForm.form.hobbyInfoDto.hobbyCode = this.$refs.baseForm.form.hobbyInfoDto.hobbyCode.join(',')
// this.$refs.baseForm.form.volunteerDto.volunteerCategory = this.$refs.baseForm.form.volunteerDto.volunteerCategory.join(',')
// this.$refs.baseForm.form.specialDto.specialCategoryCode = this.$refs.baseForm.form.specialDto.specialCategoryCode.join(',')
// }else {
// this.$refs.baseForm.form.hobbyInfoDto.hobbyCode = ''
// this.$refs.baseForm.form.volunteerDto.volunteerCategory=''
// this.$refs.baseForm.form.specialDto.specialCategoryCode = ''
// }
// this.submitAdd(this.$refs.baseForm.form);
console.log(this.$refs.baseForm.form);
// this.dialogVisible = false;
if(_baseForm.specialDto.specialCategoryCode = []) {
_baseForm.specialDto.specialCategoryCode = ''
} else {
_baseForm.specialDto.specialCategoryCode.forEach(element => {
_baseForm.specialDto.specialCategoryCode = _baseForm.specialDto.specialCategoryCode + ',' + element
});
}
this.submitAdd(_baseForm)
},
handleDel(row) {
let params = {
@ -1160,23 +1291,29 @@ export default {
});
this.btnLoading = false;
},
async getTableData() {
try {
let params = {
pageNo: this.currentPage,
pageSize: this.pageSize,
};
// this.tableLoading = true;
const { data } = await this.$http.post("/actual/base/residentBaseInfo/page", params)
this.tableData =data.data.list
console.log(this.tableData);
console.log(data,'data');
} catch (error) {
console.log(error);
}
this.tableLoading = true;
const { data, code, msg } = await requestPost(
"/actual/base/residentBaseInfo/page",
params
);
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) {
let params = {
formCode: "resi_base_info",
@ -1185,8 +1322,6 @@ export default {
this.$http
.post("/epmetuser/icresiuser/detail", params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
@ -1288,6 +1423,7 @@ export default {
});
return arr;
},
async getFormList(type) {
await this.$http
.post("/oper/customize/icform/getcustomerform", {
@ -1298,7 +1434,7 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log(res.data, 'res.data');
console.log(res.data, "res.data");
console.log("获取详情成功getFormList");
let { itemList, groupList, formName } = res.data;
this.formName = formName;
@ -1423,8 +1559,6 @@ export default {
margin-right: 0;
}
.tabs-other-info {
// ::v-deep .el-tabs__nav-wrap::after,
::v-deep .el-tabs__active-bar_active {
background-color: #0055d7;
@ -1439,15 +1573,14 @@ export default {
color: #666666;
border-radius: 2px;
&:hover {
color: #0056D6;
color: #0056d6;
}
}
::v-deep .el-tabs__item.is-active {
color: #0056D6;
color: #0056d6;
}
::v-deep .el-tabs__active-bar {
background-color: #0056D6;
background-color: #0056d6;
}
.resi-container .resi-card {
position: relative;
@ -1508,9 +1641,7 @@ export default {
display: block;
}
}
</style>
<style lang="scss" scoped>
.resi-card-table {
margin-top: 20px;
}
@ -1568,5 +1699,8 @@ export default {
.div_del {
margin-top: 15px;
}
.m-page {
margin-left: auto;
}
}
</style>

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

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

Loading…
Cancel
Save