mk 1 year ago
parent
commit
2894958d71
  1. 69
      src/views/modules/base/organization/organization.vue
  2. 121
      src/views/modules/base/virtualResi.vue

69
src/views/modules/base/organization/organization.vue

@ -100,6 +100,8 @@
label="联系人"></el-table-column> label="联系人"></el-table-column>
<el-table-column prop="mobile" <el-table-column prop="mobile"
label="联系人电话"></el-table-column> label="联系人电话"></el-table-column>
<el-table-column prop="sort"
label="排序"></el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
align="center" align="center"
class-name="small-padding fixed-width"> class-name="small-padding fixed-width">
@ -323,6 +325,8 @@
width="850" width="850"
:before-close="handleClose" destroy-on-close> :before-close="handleClose" destroy-on-close>
<el-form label-width="120px" <el-form label-width="120px"
ref="addGridForm"
:model="GridForm"
:rules="rules"> :rules="rules">
<el-form-item label="网格名称" <el-form-item label="网格名称"
prop="gridName"> prop="gridName">
@ -349,6 +353,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="sort">
<el-input-number v-model="GridForm.sort" :min="1" :max="50" label="排序"></el-input-number>
</el-form-item>
<el-form-item label="联系人" <el-form-item label="联系人"
prop="GridContacts"> prop="GridContacts">
<el-input v-model.trim="GridForm.contacts" <el-input v-model.trim="GridForm.contacts"
@ -1198,6 +1206,7 @@ export default {
longitude: "", // longitude: "", //
latitude: "", // latitude: "", //
centerAddress: "", centerAddress: "",
sort: 1,
}, },
// //
agencyForm: { agencyForm: {
@ -1630,33 +1639,39 @@ export default {
}, },
// //
async submitGrid () { async submitGrid () {
const url = "/gov/org/grid/addgrid"; debugger
this.$refs.addGridForm.validate(async (result) => {
let params = { if (result === true) {
agencyId: this.GridForm.agencyId, const url = "/gov/org/grid/addgrid";
gridName: this.GridForm.gridName,
contacts: this.GridForm.contacts, let params = {
mobile: this.GridForm.mobile, agencyId: this.GridForm.agencyId,
code: this.GridForm.code, gridName: this.GridForm.gridName,
manageDistrict: this.GridForm.manageDistrict, contacts: this.GridForm.contacts,
gridType: this.GridForm.gridType, mobile: this.GridForm.mobile,
latitude: this.lat, code: this.GridForm.code,
longitude: this.lng, sort: this.GridForm.sort,
}; manageDistrict: this.GridForm.manageDistrict,
gridType: this.GridForm.gridType,
const { data, code, msg } = await requestPost(url, params); latitude: this.lat,
longitude: this.lng,
if (code === 0) { };
this.$message.success("添加成功");
this.dialogVisibleGrid = false; const { data, code, msg } = await requestPost(url, params);
this.GridForm = [];
this.getAgencyList(); if (code === 0) {
this.getDepartmentList(); this.$message.success("添加成功");
this.getGridList(); this.dialogVisibleGrid = false;
this.getAgencyStaffListData(); this.GridForm = [];
} else { this.getAgencyList();
this.$message.error(msg); this.getDepartmentList();
} this.getGridList();
this.getAgencyStaffListData();
} else {
this.$message.error(msg);
}
}
})
}, },
async submitPeo () { async submitPeo () {

121
src/views/modules/base/virtualResi.vue

@ -240,7 +240,7 @@
<template v-if="filterEdit(scope.row.agencyId)"> <template v-if="filterEdit(scope.row.agencyId)">
<el-button v-if="btnAuths.ic_resi_update" style="margin-right: 10px" <el-button v-if="btnAuths.ic_resi_update" style="margin-right: 10px"
@click="handleEdit(scope.row)" size="small" type="text">编辑</el-button> @click="handelCLickShowCheckPassword(scope.row)" size="small" type="text">编辑</el-button>
<el-popconfirm v-if="btnAuths.ic_resi_del" title="删除之后无法回复,确认删除?" <el-popconfirm v-if="btnAuths.ic_resi_del" title="删除之后无法回复,确认删除?"
@onConfirm="handleDel(scope.row)"> @onConfirm="handleDel(scope.row)">
@ -292,19 +292,6 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="居民详情" :visible.sync="dialogVisible2" width="986px" top="5vh" append-to-body class="dialog-h"
:close-on-click-modal="false" :before-close="() => {
this.dialogVisible2 = false;
}
">
<div class="dialog-h-content scroll-h">
<resi-info v-if="dialogVisible2" ref="resiInfo" :fixed="true" :resi-id="lookResiId" />
</div>
<div class="resi-btns">
<el-button size="small" class="diy-button--white" plain @click="dialogVisible2 = false">关闭</el-button>
</div>
</el-dialog>
<!-- 变更记录 --> <!-- 变更记录 -->
<el-dialog :visible.sync="changeRecordShow" :close-on-click-modal="false" :close-on-press-escape="false" <el-dialog :visible.sync="changeRecordShow" :close-on-click-modal="false" :close-on-press-escape="false"
@ -331,6 +318,19 @@
width="620px" top="5vh" class="dialog-h" @closed="diaClose"> width="620px" top="5vh" class="dialog-h" @closed="diaClose">
<resideath-add ref="ref_death" @dialogCancle="deathClose"></resideath-add> <resideath-add ref="ref_death" @dialogCancle="deathClose"></resideath-add>
</el-dialog> </el-dialog>
<!-- 密码验证 -->
<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>
</div> </div>
</template> </template>
@ -380,8 +380,7 @@ export default {
dialogEditVisible: false, dialogEditVisible: false,
dialogVisible: false, dialogVisible: false,
formType: 'add', formType: 'add',
//
dialogVisible2: false,
lookResiId: "", lookResiId: "",
uploadUlr: uploadUlr:
@ -441,6 +440,11 @@ export default {
category: this.$route.query.category, category: this.$route.query.category,
searchForm: {}, searchForm: {},
showCheckPassword:false,
checkPasswordFrom: {
password: "",
},
}; };
}, },
@ -864,19 +868,82 @@ export default {
console.log(tab, event); console.log(tab, event);
}, },
//
async handleLook(row) { async handleLook(row) {
this.lookResiId = row.resiId; this.lookResiId = row.resiId;
this.dialogVisible2 = true; let {
}, agencyId,
gridId,
gridName,
gender,
homeId,
homeName,
name,
resiId,
} = row;
this.$store.dispatch("saveData", {
agencyId,
gridId,
gridName,
gender,
homeId,
homeName,
name,
resiId,
});
this.$router.push({ name: "jumin-huaxiang" });
this.$store.state.contentTabs = this.$store.state.contentTabs.map(
(item) => {
if (item.name === "jumin-huaxiang") {
return { ...item, title: name };
}
return item;
}
);
},
// //
async handleEdit(row) { async handelCLickShowCheckPassword(row) {
this.editUserId = row.resiId; const url = `/actual/base/residentCategoryUpdateInfo/isUpdater/${row.resiId}`;
this.formName = "编辑居民"; const { data, code, msg } = await requestPost(url);
this.formType = 'edit' if(code==0){
this.dialogVisible = true; if(data==true){
await this.residentBaseInfo(); 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);
}
}, },
// //
residentBaseInfo() { residentBaseInfo() {

Loading…
Cancel
Save