任务管理 删除

This commit is contained in:
shidongli 2025-01-21 16:12:40 +08:00
parent b60047306d
commit bc37303345
2 changed files with 99 additions and 87 deletions

View File

@ -0,0 +1,18 @@
import request from '@/utils/request'
// 删除
export function batchDeleteTask(query) {
return request({
url: '/manage/signroute/batchDeleteTask',
method: 'post',
data: query
})
}
// 查询列表
export function taskManagement(query) {
return request({
url: '/manage/signroute/taskManagement',
method: 'get',
params: query
})
}

View File

@ -281,6 +281,15 @@
</el-form-item> --> </el-form-item> -->
</SearchFilter> </SearchFilter>
</div> </div>
<div ref="mb8" class="mb8">
<el-row :gutter="10" class="">
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['manage:preHospitalized:remove']">删除</el-button>
</el-col>
</el-row>
</div>
<div ref="table"> <div ref="table">
<el-table <el-table
:max-height="maxTableHeight" :max-height="maxTableHeight"
@ -793,6 +802,12 @@
createActualTimeTask, createActualTimeTask,
getPhoneDialVideo, getPhoneDialVideo,
} from "@/api/system/followup"; } from "@/api/system/followup";
import {
taskManagement,
batchDeleteTask
} from "@/api/manage/taskmanagement";
import { usergetList } from "@/api/unitconfig/patientConfiguration"; import { usergetList } from "@/api/unitconfig/patientConfiguration";
import { getAge } from "@/utils/age"; import { getAge } from "@/utils/age";
import { selectAgencyList, getAgencyList } from "@/api/manage/selectAgencyList"; import { selectAgencyList, getAgencyList } from "@/api/manage/selectAgencyList";
@ -1265,7 +1280,7 @@
/** 查询患者管理任务执行记录列表 */ /** 查询患者管理任务执行记录列表 */
getList() { getList() {
this.loading = true; this.loading = true;
manualFollowUpList(this.queryParams).then((response) => { taskManagement(this.queryParams).then((response) => {
if ( if (
this.queryParams.phoneDialMethod == "AI" && this.queryParams.phoneDialMethod == "AI" &&
this.queryParams.nodeExecuteStatus == "UNEXECUTED" this.queryParams.nodeExecuteStatus == "UNEXECUTED"
@ -1476,7 +1491,8 @@
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map((item) => item.manageRouteNodeId);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -1538,35 +1554,24 @@
}, },
}); });
}, },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateTaskExecuteRecord(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTaskExecuteRecord(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; console.log(row.manageRouteNodeId)
var ids=[]
if(row.manageRouteNodeId){
ids.push(row.manageRouteNodeId)
}else if(this.ids){
ids=this.ids
}
// const ids = row.manageRouteNodeId || this.ids;
this.$modal this.$modal
.confirm( .confirm(
'是否确认删除?' '是否确认删除?'
) )
.then(function () { .then(function () {
return delTaskExecuteRecord(ids); return batchDeleteTask(ids);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
@ -1574,16 +1579,6 @@
}) })
.catch(() => {}); .catch(() => {});
}, },
/** 导出按钮操作 */
handleExport() {
this.download(
"system/taskExecuteRecord/export",
{
...this.queryParams,
},
`taskExecuteRecord_${new Date().getTime()}.xlsx`
);
},
// //
getMaxTableHeight() { getMaxTableHeight() {
const windowInnerHeight = window.innerHeight; // const windowInnerHeight = window.innerHeight; //
@ -1880,4 +1875,3 @@
height: 0px !important; height: 0px !important;
} }
</style> </style>