|
|
@ -135,7 +135,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column fixed="right" label="操作" align="center"> |
|
|
|
<el-table-column fixed="right" label="操作" align="center" width="300"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
class="f-fc" |
|
|
@ -144,6 +144,16 @@ |
|
|
|
size="small" |
|
|
|
>查看</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
class="f-fc" |
|
|
|
@click="handelCLickShowCheckPassword(scope.row)" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
>编辑</el-button |
|
|
|
> |
|
|
|
<el-popconfirm title="删除之后无法回复,确认删除?" @onConfirm="handleDel(scope.row)"> |
|
|
|
<el-button size="small" type="text" slot="reference">删除</el-button> |
|
|
|
</el-popconfirm> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -241,7 +251,18 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-dialog title="密码验证" :visible.sync="showCheckPassword"> |
|
|
|
<el-form :model="checkPasswordFrom" :rules="checkPasswordRulse" ref="checkPasswordFrom"> |
|
|
|
<el-form-item label="密码" prop="password"> |
|
|
|
<el-input v-model.trim="checkPasswordFrom.password" autocomplete="off" type="password" placeholder="请输入当前账号密码" |
|
|
|
@keydown.native.enter="handelClickCheckPassword"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="showCheckPassword = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="handelClickCheckPassword">确 定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<resi-info |
|
|
|
v-if="showedResiInfo && currentResiId" |
|
|
|
:resi-id="currentResiId" |
|
|
@ -310,7 +331,21 @@ export default { |
|
|
|
type: "fangwu", |
|
|
|
searchKey: "", |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
checkPasswordFrom: { |
|
|
|
password: "", |
|
|
|
}, |
|
|
|
checkPasswordRulse: { |
|
|
|
password: [ |
|
|
|
{ required: true, message: "请输入密码", trigger: "blur" }, |
|
|
|
{ |
|
|
|
min: 6, |
|
|
|
max: 18, |
|
|
|
message: "长度在 6 到 18 个字符", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
typePlaceholder: { |
|
|
|
jumin: "请输入姓名或联系电话或证件号", |
|
|
|
fangwu: "请输入小区名称或楼栋名称", |
|
|
@ -396,7 +431,8 @@ export default { |
|
|
|
|
|
|
|
// 显示人员详情 |
|
|
|
showedResiInfo: false, |
|
|
|
|
|
|
|
editUserId: "", |
|
|
|
showCheckPassword: false, |
|
|
|
currentResiId: "", |
|
|
|
|
|
|
|
// 显示人员详情 |
|
|
@ -416,6 +452,7 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
|
|
|
|
maxTableHeight() { |
|
|
|
return this.$store.state.inIframe |
|
|
|
? this.clientHeight - 540 + this.iframeHeigh |
|
|
@ -436,6 +473,53 @@ export default { |
|
|
|
this.getHotHouseSearch() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleDel(row) { |
|
|
|
console.log("row1", row); |
|
|
|
this.$http |
|
|
|
.post("/actual/base/residentBaseInfo/batchdel", [row.resiId]) |
|
|
|
.then(({ data: res }) => { |
|
|
|
console.log("row2", row); |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
console.log("row3", row); |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.handleClickSearchBtn(); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log("row4", err); |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
handelClickCheckPassword() { |
|
|
|
this.$refs.checkPasswordFrom.validate((vali) => { |
|
|
|
if (vali) { |
|
|
|
this.saveCheckPassword(this.checkPasswordFrom.password); |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
async saveCheckPassword(password){ |
|
|
|
const url = `/actual/base/residentBaseInfo/getResiUserInfo/${this.editUserId}`; |
|
|
|
let parm = { |
|
|
|
password, |
|
|
|
}; |
|
|
|
const { data, code, msg } = await requestPost(url, parm); |
|
|
|
if (code === 0) { |
|
|
|
this.showCheckPassword = false; |
|
|
|
this.$router.push({ |
|
|
|
name: "edit-resi", |
|
|
|
query: { id: this.editUserId }, |
|
|
|
params: { idNum: data.idNum, mobile: data.mobile, name: data.name, nationality: data.nationality }, |
|
|
|
}); |
|
|
|
this.checkPasswordFrom.password = ""; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
async handleExport() { |
|
|
|
this.btnLoading = true; |
|
|
|
const url = this.searchData.type === 'fangwu'?"/actual/base/communityHouse/houseSearchExport":'/actual/base/residentBaseInfo/residentSearchExport'; |
|
|
@ -593,6 +677,25 @@ export default { |
|
|
|
return item; |
|
|
|
}); |
|
|
|
}, |
|
|
|
async handelCLickShowCheckPassword(row) { |
|
|
|
console.log(row); |
|
|
|
console.log(row.resiId); |
|
|
|
const url = `/actual/base/residentCategoryUpdateInfo/isUpdater/${row.resiId}`; |
|
|
|
const { data, code, msg } = await requestPost(url); |
|
|
|
if(code==0){ |
|
|
|
if(data==true){ |
|
|
|
this.editUserId = row.resiId; |
|
|
|
this.saveCheckPassword() |
|
|
|
} |
|
|
|
else{ |
|
|
|
this.editUserId = row.resiId; |
|
|
|
this.showCheckPassword = true; |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
handleSizeChangeSearchFangwu(val) { |
|
|
|
console.log(`每页 ${val} 条`); |
|
|
|