Browse Source

修改bug 38 人房信息—居民管理—迁入记录

V1.0
luyan 3 years ago
parent
commit
69fd6298b6
  1. 41
      src/views/modules/base/huji/immigration/index.vue

41
src/views/modules/base/huji/immigration/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="g-main"> <div class="g-main">
<div ref="searchForm" class="m-search"> <div class="m-search">
<el-form :inline="true" :model="fmData" :label-width="'100px'"> <el-form ref="searchForm" :inline="true" :model="fmData" :label-width="'100px'">
<el-form-item prop="gridId" label="所属网格"> <el-form-item prop="gridId" label="所属网格">
<el-select <el-select
v-model.trim="fmData.gridId" v-model.trim="fmData.gridId"
@ -137,6 +137,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
class="u-item-width-daterange2" class="u-item-width-daterange2"
:picker-options="pickerOptions"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -549,6 +550,12 @@ export default {
searchH: 0, searchH: 0,
changeRecordShow: false, changeRecordShow: false,
pickerOptions: {
disabledDate: time => {
//
return time.getTime() > Date.now() - 8.64e6;
}
},
}; };
}, },
computed: { computed: {
@ -571,7 +578,6 @@ export default {
}, },
watch: { watch: {
rangeTime: function (val) { rangeTime: function (val) {
console.log("val----", val);
if (Array.isArray(val) && val.length == 2) { if (Array.isArray(val) && val.length == 2) {
this.fmData.startTime = val[0]; this.fmData.startTime = val[0];
this.fmData.endTime = val[1]; this.fmData.endTime = val[1];
@ -585,9 +591,7 @@ export default {
this.getGridList(); this.getGridList();
this.getValiheList(); this.getValiheList();
this.getTableData(); this.getTableData();
this.searchH = this.$refs.searchForm.offsetHeight + 290; this.searchH = this.$refs.searchForm.offsetHeight + 290;
console.log("searchH----", this.$refs.searchForm.offsetHeight);
}, },
methods: { methods: {
diaClose() { diaClose() {
@ -596,9 +600,7 @@ export default {
// //
async handleChangeRecord(row) { async handleChangeRecord(row) {
this.changeRecordShow = true; this.changeRecordShow = true;
await nextTick(200); await nextTick(200);
this.$refs.ref_changerecord.initForm(row); this.$refs.ref_changerecord.initForm(row);
}, },
handleClearVillage() { handleClearVillage() {
@ -615,7 +617,6 @@ export default {
this.fmData.homeId = ""; this.fmData.homeId = "";
}, },
handleChangeGrid(val) { handleChangeGrid(val) {
console.log("val", val);
this.fmData.villageId = ""; this.fmData.villageId = "";
this.fmData.buildId = ""; this.fmData.buildId = "";
this.fmData.unitId = ""; this.fmData.unitId = "";
@ -623,20 +624,17 @@ export default {
this.getValiheList(); this.getValiheList();
}, },
handleChangeV(val) { handleChangeV(val) {
console.log("val", val);
this.fmData.buildId = ""; this.fmData.buildId = "";
this.fmData.unitId = ""; this.fmData.unitId = "";
this.fmData.homeId = ""; this.fmData.homeId = "";
this.getBuildList(); this.getBuildList();
}, },
handleChangeB(val) { handleChangeB(val) {
console.log("val", val);
this.fmData.unitId = ""; this.fmData.unitId = "";
this.fmData.homeId = ""; this.fmData.homeId = "";
this.getUniList(); this.getUniList();
}, },
handleChangeD(val) { handleChangeD(val) {
console.log("val", val);
this.fmData.homeId = ""; this.fmData.homeId = "";
this.getHouseList(); this.getHouseList();
}, },
@ -652,7 +650,6 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log("获取查询详情成功", res.data);
this.optionsG = res.data; this.optionsG = res.data;
} }
}) })
@ -672,7 +669,6 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log("获取查询详情成功", res.data);
this.optionsV = res.data; this.optionsV = res.data;
} }
}) })
@ -689,7 +685,6 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log("获取查询详情成功", res.data);
this.optionsB = res.data; this.optionsB = res.data;
} }
}) })
@ -706,7 +701,6 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log("获取查询详情成功", res.data);
this.optionsD = res.data; this.optionsD = res.data;
} }
}) })
@ -723,7 +717,6 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log("获取查询详情成功", res.data);
this.optionsH = res.data; this.optionsH = res.data;
} }
}) })
@ -750,7 +743,6 @@ export default {
.split(";")[1] .split(";")[1]
.split("=")[1] .split("=")[1]
); );
console.log("filename", fileName);
let blob = new Blob([res.data], { let blob = new Blob([res.data], {
type: "application/vnd.ms-excel", type: "application/vnd.ms-excel",
}); });
@ -766,7 +758,6 @@ export default {
} else this.$message.error("下载失败"); } else this.$message.error("下载失败");
}) })
.catch((err) => { .catch((err) => {
console.log("err", err);
return this.$message.error("网络错误"); return this.$message.error("网络错误");
}); });
}, },
@ -815,14 +806,12 @@ export default {
formData formData
) )
.then((res) => { .then((res) => {
console.log("res-up", res);
if (res.data.code == 0 && res.data.msg == "success") { if (res.data.code == 0 && res.data.msg == "success") {
// this.$message.success('') // this.$message.success('')
this.getTableData(); this.getTableData();
} else this.$message.error(res.data.msg); } else this.$message.error(res.data.msg);
}) })
.catch((err) => { .catch((err) => {
console.log("失败", err);
file.onError(); // file.onError(); //
// this.$message.error('') // this.$message.error('')
}); });
@ -855,13 +844,11 @@ export default {
}, },
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val}`);
this.pageSize = val; this.pageSize = val;
window.localStorage.setItem("pageSize", val); window.localStorage.setItem("pageSize", val);
this.getTableData(); this.getTableData();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.pageNo = val; this.pageNo = val;
this.getTableData(); this.getTableData();
}, },
@ -870,18 +857,18 @@ export default {
this.formShow = false; this.formShow = false;
}, },
handleSearch(val) { handleSearch(val) {
console.log(this.fmData);
this.pageNo = 1; this.pageNo = 1;
this.getTableData(); this.getTableData();
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.handleChangeGrid();
this.rangeTime = [];
this.handleSearch(); this.handleSearch();
}, },
async handleAdd() { async handleAdd() {
this.formShow = true; this.formShow = true;
await nextTick(); await nextTick();
console.log(this.$refs);
this.$refs.eleEditForm.initForm("add"); this.$refs.eleEditForm.initForm("add");
}, },
@ -899,7 +886,6 @@ export default {
}, },
}) })
.then((res) => { .then((res) => {
console.log("res----dddd", res);
// this.download(res.data, title + '.xls') // this.download(res.data, title + '.xls')
// this.getTemplateList() // this.getTemplateList()
@ -910,7 +896,6 @@ export default {
this.formatData(res); this.formatData(res);
}) })
.catch((err) => { .catch((err) => {
console.log("err", err);
this.exportLoading = false; this.exportLoading = false;
return this.$message.error("网络错误"); return this.$message.error("网络错误");
}); });
@ -951,12 +936,10 @@ export default {
try { try {
const jsonData = JSON.parse(fileReader.result); // const jsonData = JSON.parse(fileReader.result); //
// //
console.log("jsonData---1", jsonData);
return this.$message.error(jsonData.msg); return this.$message.error(jsonData.msg);
} catch (err) { } catch (err) {
// //
// //
console.log("errr-----", err, this);
this.downloadFile(res); this.downloadFile(res);
} }
}; };
@ -1019,7 +1002,6 @@ export default {
}, },
async handleDel(rowData, rowIndex) { async handleDel(rowData, rowIndex) {
console.log(rowData, rowIndex);
const url = "/actual/base/residentMoveInRecord/deleteById"; const url = "/actual/base/residentMoveInRecord/deleteById";
const { tableData } = this; const { tableData } = this;
@ -1058,7 +1040,6 @@ export default {
...fmData, ...fmData,
}); });
if (code === 0) { if (code === 0) {
console.log("列表请求成功!!!!!!!!!!!!!!");
this.total = data.total || 0; this.total = data.total || 0;
this.tableData = data.list this.tableData = data.list
? data.list.map((item) => { ? data.list.map((item) => {

Loading…
Cancel
Save