jiangyy 3 years ago
parent
commit
d4376261fe
  1. 315
      src/views/components/resiChangeRecord.vue
  2. 705
      src/views/components/resiChangeTransfer.vue
  3. 10
      src/views/components/resiForm.vue
  4. 267
      src/views/components/resiSearch.vue
  5. 906
      src/views/modules/base/resi.vue
  6. 229
      src/views/modules/plugins/change/resideathAdd.vue

315
src/views/components/resiChangeRecord.vue

@ -1,96 +1,114 @@
<template>
<div class="g-main">
<el-table :data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="typeName"
header-align="center"
align="center"
label="变更类型"
width="80">
<el-table
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
style="width: 100%"
>
<el-table-column
label="序号"
header-align="center"
align="center"
type="index"
width="50"
></el-table-column>
<el-table-column
prop="typeName"
header-align="center"
align="center"
label="变更类型"
width="80"
>
</el-table-column>
<el-table-column prop="reason"
header-align="center"
align="center"
label="原因"
show-overflow-tooltip
min-width="120">
<el-table-column
prop="reason"
header-align="center"
align="center"
label="原因"
show-overflow-tooltip
min-width="120"
>
</el-table-column>
<el-table-column prop="changeTime"
header-align="center"
align="center"
label="变更时间"
width="160">
<el-table-column
prop="changeTime"
header-align="center"
align="center"
label="变更时间"
width="160"
>
</el-table-column>
<el-table-column prop="beforeChangeName"
header-align="center"
align="center"
label="变更前"
show-overflow-tooltip
width="230">
<el-table-column
prop="beforeChangeName"
header-align="center"
align="center"
label="变更前"
show-overflow-tooltip
width="230"
>
</el-table-column>
<el-table-column prop="afterChangeName"
header-align="center"
align="center"
label="变更后"
show-overflow-tooltip
min-width="230">
<el-table-column
prop="afterChangeName"
header-align="center"
align="center"
label="变更后"
show-overflow-tooltip
min-width="230"
>
</el-table-column>
<el-table-column prop="operatorName"
header-align="center"
align="center"
label="操作人"
width="80">
<el-table-column
prop="operatorName"
header-align="center"
align="center"
label="操作人"
width="80"
>
</el-table-column>
<el-table-column prop="createdTime"
header-align="center"
align="center"
label="调整时间"
width="160">
<el-table-column
prop="createdTime"
header-align="center"
align="center"
label="调整时间"
width="160"
>
</el-table-column>
<el-table-column prop="remark"
header-align="center"
align="center"
label="备注"
show-overflow-tooltip
min-width="120">
<el-table-column
prop="remark"
header-align="center"
align="center"
label="备注"
show-overflow-tooltip
min-width="120"
>
</el-table-column>
</el-table>
<div>
<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">
<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"
>
</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 () {
data() {
return {
loading: false,
total: 0,
@ -99,62 +117,53 @@ export default {
tableLoading: false,
tableData: [],
icUserId: '',
}
icUserId: "",
};
},
async mounted () {
},
async mounted() {},
methods: {
async initForm (row) {
this.icUserId = row.icResiUserId
async initForm(row) {
this.icUserId = row.resiId;
//
await this.loadTable()
await this.loadTable();
},
handleSearch () {
this.loadTable()
handleSearch() {
this.loadTable();
},
async loadTable() {
this.tableLoading = true;
async loadTable () {
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)
initDate() {
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,96 +180,102 @@ 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) {
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()
handleSizeChange(val) {
this.pageSize = val;
this.pageNo = 1;
this.loadTable();
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
handleCurrentChange(val) {
this.pageNo = val;
this.loadTable();
},
//
startLoading () {
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
loading.close();
}
}
},
},
computed: {
tableHeight () {
return (this.clientHeight - 460)
tableHeight() {
return this.clientHeight - 460;
},
rowHeight () {
return (this.clientHeight - 200) + 'px'
rowHeight() {
return this.clientHeight - 200 + "px";
},
...mapGetters(['clientHeight'])
},
watch: {
...mapGetters(["clientHeight"]),
},
watch: {},
props: {
serviceType: {
type: String,
default: ''
}
}
}
default: "",
},
},
};
</script>
<style lang="scss" scoped >
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/list-main.scss";
</style>

705
src/views/components/resiChangeTransfer.vue

@ -1,142 +1,153 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<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">
<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">
<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"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="选择日期"
class="u-edit-width-normal"
:clearable="false">
<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"
>
</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"
v-model="agencyIdArray"
class="u-edit-width-normal"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
<template v-if="dataForm.type === 'in'">
<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>
</el-form-item>
<el-form-item label="所属家庭"
prop="villageId">
<el-form-item label="所属家庭" prop="villageId">
<div>
<el-select v-model.trim="dataForm.villageId"
placeholder="请选择小区"
clearable
class="u-edit-width-normal"
@change="handleChangeCommunity($event)">
<el-option v-for="item in communityList"
:key="item.value"
:label="item.label"
:value="item.value">
<el-select
v-model.trim="dataForm.villageId"
placeholder="请选择小区"
clearable
class="u-edit-width-normal"
@change="handleChangeCommunity($event)"
>
<el-option
v-for="item in communityList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div style="margin-top:5px">
<el-select v-model.trim="dataForm.buildId"
placeholder="楼号"
clearable
class="u-edit-width-build"
@change="handleChangeBuilding($event)">
<el-option v-for="item in buildingList"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="margin-top: 5px">
<el-select
v-model.trim="dataForm.buildId"
placeholder="楼号"
clearable
class="u-edit-width-build"
@change="handleChangeBuilding($event)"
>
<el-option
v-for="item in buildingList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model.trim="dataForm.unitId"
placeholder="单元"
clearable
style="margin-left: 10px;"
class="u-edit-width-build"
@change="handleChangeUnit($event)">
<el-option v-for="item in unitList"
:key="item.value"
:label="item.label"
:value="item.value">
<el-select
v-model.trim="dataForm.unitId"
placeholder="单元"
clearable
style="margin-left: 10px"
class="u-edit-width-build"
@change="handleChangeUnit($event)"
>
<el-option
v-for="item in unitList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model.trim="dataForm.homeId"
placeholder="房号"
clearable
style="margin-left: 10px;"
class="u-edit-width-build"
@change="handleChangeHome($event)">
<el-option v-for="item in roomList"
:key="item.value"
:label="item.label"
:value="item.value">
<el-select
v-model.trim="dataForm.homeId"
placeholder="房号"
clearable
style="margin-left: 10px"
class="u-edit-width-build"
@change="handleChangeHome($event)"
>
<el-option
v-for="item in roomList"
:key="item.value"
:label="item.label"
: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"
:autosize="{ minRows: 2, maxRows: 7}"
:rows="5"
resize="none"
class="u-edit-width-normal"
placeholder='请输入外迁详细地址'
v-model="dataForm.address">
<div v-if="dataForm.type === 'out'">
<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"
>
</el-input>
</el-form-item>
</div>
<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">
<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"
>
</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"
size="small"
class="diy-button--blue"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
<el-button size="small" @click="handleCancle"> </el-button>
<el-button
type="primary"
size="small"
class="diy-button--blue"
:disabled="btnDisable"
@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 () {
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,320 +226,303 @@ 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 () {
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) {
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
this.dataForm.customerId = this.customerId;
this.dataForm.idCard = row.idNum;
this.dataForm.mobile = row.mobile;
await this.loadHouseInfo(row.HOME_ID_VALUE)
await this.loadHouseInfo(row.homeId);
this.dataForm.name = row.NAME
this.dataForm.gender = row.GENDER
this.dataForm.age = ''
await this.loadRootAgency()
await this.getAgencylist()
this.dataForm.name = row.name;
this.dataForm.gender = row.gender;
this.dataForm.age = "";
await this.loadRootAgency();
await this.getAgencylist();
},
async loadHouseInfo (homeIdValue) {
const url = "/gov/org/ichouse/" + homeIdValue
const { data, code, msg } = await requestGet(url)
async loadHouseInfo(homeIdValue) {
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 }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (res.data) {
this.rootAgency = res.data
}
}).catch(() => { })
async loadRootAgency() {
await this.$http
.post("/gov/org/agency/customerrootagency/" + this.customerId)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
if (res.data) {
this.rootAgency = res.data;
}
})
.catch(() => {});
},
async getAgencylist () {
const url = '/gov/org/customeragency/rootagencygridtree'
async getAgencylist() {
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
resolveAgencyTree(treeData) {
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 = ''
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 = "";
},
async loadCommunityList () {
const url = '/gov/org/icneighborhood/neighborhoodoption'
async loadCommunityList() {
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);
}
},
async handleChangeCommunity (id) {
async handleChangeCommunity(id) {
//
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) {
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);
}
},
async handleChangeUnit (id) {
async handleChangeUnit(id) {
//
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);
}
},
async handleChangeHome (id) {
async handleChangeHome(id) {
//
this.roomList.find((item) => {
if (item.value === id) {
this.dataForm.homeName = item.label
this.dataForm.homeName = item.label;
}
})
});
},
async handleComfirm () {
this.btnDisable = true
async handleComfirm() {
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 () {
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 () {
@ -550,54 +543,52 @@ export default {
// }
// },
handleCancle () {
this.resetData()
this.$emit('dialogCancle')
handleCancle() {
this.resetData();
this.$emit("dialogCancle");
},
resetData () {
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 () {
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
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)

267
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" 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 :inline="true" class="header_form_box" :model="form" :label-width="'100px'">
<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="结束时间">
</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="选择日期">
</el-date-picker>
</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>
class="u-item-width-daterange"
placeholder="开始日期">
</el-date-picker>
<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>
<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>
</template>
</div>
</div>
</el-form-item>
<el-form-item prop="agencyIdArray">
</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-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>
</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 }) => {
@ -677,28 +718,28 @@ export default {
return this.$message.error('网络错误')
})
},
getGridList() {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getGridList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'addorupdate' })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getValiheList() {
const { user } = this.$store.state
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();

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

File diff suppressed because it is too large

229
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"
:inline="true"
:model="dataForm"
label-width="90px"
:rules="dataRule"
class="m-form">
<div class="dialog-h-content scroll-h m-edit">
<el-form
ref="ref_form"
:inline="true"
:model="dataForm"
label-width="150px"
:rules="dataRule"
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"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
placeholder="选择日期"
:clearable="false">
<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"
>
</el-date-picker>
</el-form-item>
<div class="item-textarea">
<el-form-item label="死亡原因"
style="display: block"
prop="blacklistReason">
<el-input type="textarea"
resize="none"
class="u-item-width-daterange"
placeholder='请输入死亡原因'
v-model="dataForm.blacklistReason">
<el-form-item
label="死亡原因"
style="display: block"
prop="blacklistReason"
>
<el-input
type="textarea"
resize="none"
class="u-edit-width-normal"
placeholder="请输入死亡原因"
v-model="dataForm.blacklistReason"
>
</el-input>
</el-form-item>
</div>
@ -51,162 +54,126 @@
<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"
class="diy-button--blue"
:loading="btnDisable"
@click="handleComfirm"> </el-button>
<el-button size="small" class="" @click="handleCancle"> </el-button>
<el-button
size="small"
class="diy-button--blue"
:loading="btnDisable"
@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 () {
data() {
return {
btnDisable: false,
dataForm: {
blacklistReason: '',
deathDate: '',
name: "",
gridName: "",
blacklistReason: "",
deathDate: "",
},
}
},
components: {
},
mounted () {
};
},
components: {},
mounted() {},
computed: {
dataRule () {
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) {
async initForm(row) {
this.customerId = localStorage.getItem("customerId");
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
async handleComfirm() {
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 () {
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')
handleCancle() {
this.resetData();
this.$emit("dialogCancle");
},
resetData () {
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 () {
startLoading() {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading () {
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