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