Browse Source

删除/批量删除/变更记录

V1.0
mk 3 years ago
parent
commit
0cf0654a55
  1. 74
      src/views/components/resiInfo.vue
  2. 15
      src/views/modules/base/resi.vue

74
src/views/components/resiInfo.vue

@ -829,12 +829,8 @@
<el-table
class="m-table-item"
:data="tableData"
v-loading="tableLoading"
border
style="width: 100%"
:height="tableHeight"
@select-all="selectAll"
@selection-change="selectionChange"
>
<el-table-column
@ -845,19 +841,19 @@
width="50"
>
</el-table-column>
<el-table-column
v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="left"
:show-overflow-tooltip="true"
:width="item.width || ''"
>
<template slot-scope="scope">
<span >{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
<el-table-column
v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="left"
:show-overflow-tooltip="true"
:width="item.width || ''"
>
<template slot-scope="scope">
<span >{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
@ -879,18 +875,19 @@ export default {
},
data () {
return {
tableData:[],//
resiDetailObj:{},
activeName:0,
eduInfoDto:{},
tableHeader: [
{ columnName: "name", label: "变更类型", width: 80 },
{ columnName: "birthday", label: "原因", width: 150 },
{ columnName: "gender", label: "变更时间", width: 150 },
{ columnName: "gridName", label: "变更前" , width: 200 },
{ columnName: "homeName", label: "变更后" , width: 200 },
{ columnName: "idNum", label: "操作人", width: 80 },
{ columnName: "categoryInfo", label: "调整时间", width: 150 },
{ columnName: "mobile", label: "备注", width: 100 },
{ columnName: "typeName", label: "变更类型", width: 80 },
{ columnName: "reason", label: "原因", width: 150 },
{ columnName: "createdTime", label: "变更时间", width: 150 },
{ columnName: "beforeChangeName", label: "变更前" , width: 200 },
{ columnName: "afterChangeName", label: "变更后" , width: 200 },
{ columnName: "operatorName", label: "操作人", width: 80 },
{ columnName: "changeTime", label: "调整时间", width: 150 },
{ columnName: "remark", label: "备注", width: 100 },
],
hobbyInfoObj:{},
residentReligionObj:{},
@ -1149,6 +1146,17 @@ export default {
})
},
handleFilterSpan(row, item) {
let _val = "";
if (item.itemType === "radio" && item.options.length > 0) {
item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label;
});
if (row[item.columnName] == "0") return (_val = "");
}
return _val || row[item.columnName];
},
handleClick(tab){
if(tab.index==0){
this.getEducation()
@ -1162,7 +1170,6 @@ export default {
this.getdisabilityNation()
this.getillnessNation()
this.getchronicNation()
this.getHealthInfoDetailById()
}else if (tab.index == 4){
this.getResidentWorkInfoObj()
@ -1202,6 +1209,8 @@ export default {
this.getResidentDeathRecord()
}else if (tab.index == 18){
this.getResidentMoveOutRecord()
}else if (tab.index == 19){
this.getChangeRecordDetailById()
}
},
async getEduInfoDtoObj(){
@ -1216,7 +1225,18 @@ export default {
console.log(error);
}
},
async getChangeRecordDetailById(){
try {
const {data} = await this.$http.post(`/actual/base/residentChangeRecord/getChangeRecordDetailById/${this.resiId}`)
if(data.data == null){
this.eduInfoDto = []
}else{
this.tableData = data.data
}
} catch (error) {
console.log(error);
}
},
//
async getResidentHobbyInfoObj(){
try {

15
src/views/modules/base/resi.vue

@ -771,7 +771,6 @@ export default {
},
selectionChange(selection) {
this.selection = selection;
if (selection.length === this.tableData.length) {
this.selAllFlag = true;
this.isIndeterminate = false;
@ -1262,13 +1261,9 @@ export default {
this.submitAdd(_baseForm);
},
handleDel(row) {
let params = {
formCode: "resi_base_info",
userIds: [row.icResiUserId],
};
console.log("row1", row);
this.$http
.post("/epmetuser/icresiuser/delete", params)
.post("/actual/base/residentBaseInfo/batchdel", [row.resiId])
.then(({ data: res }) => {
console.log("row2", row);
if (res.code !== 0) {
@ -1560,13 +1555,9 @@ export default {
async deleteresiBatch() {
if (this.selection.length === 0)
return this.$message.error("请选择之后进行操作");
let userIds = this.selection.map((item) => item.icResiUserId);
let params = {
formCode: "resi_base_info",
userIds,
};
let userIds = this.selection.map((item) => item.resiId);
this.$http
.post("/epmetuser/icresiuser/delete", params)
.post("/actual/base/residentBaseInfo/batchdel", userIds)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

Loading…
Cancel
Save