|
|
@ -176,9 +176,30 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="" width="100" label="公众号消息推送" >已推送 |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
fixed="right" |
|
|
|
label="操作" |
|
|
|
width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button @click="handelCLickShowCheckPassword(scope.row)" type="text" size="small">编辑</el-button> |
|
|
|
<el-button type="text" @click="deleteBatch(scope.row)" size="small">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-dialog width="800px" :center="true" title="密码验证" :visible.sync="showCheckPassword" :modal-append-to-body="false" :close-on-click-modal="true" |
|
|
|
:close-on-press-escape="true"> |
|
|
|
<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> |
|
|
|
<!--分页条--> |
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChange" |
|
|
@ -242,6 +263,22 @@ export default { |
|
|
|
children: "subAgencyList", |
|
|
|
checkStrictly: true, |
|
|
|
}, |
|
|
|
showCheckPassword:false, |
|
|
|
checkPasswordFrom: { |
|
|
|
password: "", |
|
|
|
}, |
|
|
|
checkPasswordRulse: { |
|
|
|
password: [ |
|
|
|
{ required: true, message: "请输入密码", trigger: "blur" }, |
|
|
|
{ |
|
|
|
min: 6, |
|
|
|
max: 18, |
|
|
|
message: "长度在 6 到 18 个字符", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//表格数据 |
|
|
|
selectedPersonListIds: [], // 选中的名单id列表 |
|
|
@ -249,6 +286,96 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//编辑 |
|
|
|
async handelCLickShowCheckPassword(row) { |
|
|
|
console.log(row); |
|
|
|
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); |
|
|
|
} |
|
|
|
}, |
|
|
|
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); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleAdd() { |
|
|
|
this.$router.push({ name: "add-resi" }); |
|
|
|
}, |
|
|
|
//删除 |
|
|
|
deleteBatch(row) { |
|
|
|
console.log(row); |
|
|
|
if (this.personList.length > 0) { |
|
|
|
this.$confirm("删除之后无法恢复,确认删除?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
console.log(row); |
|
|
|
this.deleteresiBatch(row); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
if (err == "cancel") { |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$message.warning("请先选择要删除的居民"); |
|
|
|
} |
|
|
|
}, |
|
|
|
async deleteresiBatch(row) { |
|
|
|
console.log(row); |
|
|
|
let userIds = row.id; |
|
|
|
this.$http |
|
|
|
.post("/actual/base/findPersonList/deleteFindPersonByPolicyId/"+userIds) |
|
|
|
.then(({ data: res }) => { |
|
|
|
console.log(res); |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.handleSearch(); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 行选中事件 |
|
|
|
* @returns {Promise<void>} |
|
|
|