任务管理 删除

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

@ -280,6 +280,15 @@
<el-switch style="width: 220px" class="switchStyle" v-model="timeSignshow" active-color="#1890ff" inactive-color="#5AC1A1" active-text="全部" inactive-text="待办" @change="changeswitch"/>
</el-form-item> -->
</SearchFilter>
</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">
<el-table
@ -793,6 +802,12 @@
createActualTimeTask,
getPhoneDialVideo,
} from "@/api/system/followup";
import {
taskManagement,
batchDeleteTask
} from "@/api/manage/taskmanagement";
import { usergetList } from "@/api/unitconfig/patientConfiguration";
import { getAge } from "@/utils/age";
import { selectAgencyList, getAgencyList } from "@/api/manage/selectAgencyList";
@ -1265,7 +1280,7 @@
/** 查询患者管理任务执行记录列表 */
getList() {
this.loading = true;
manualFollowUpList(this.queryParams).then((response) => {
taskManagement(this.queryParams).then((response) => {
if (
this.queryParams.phoneDialMethod == "AI" &&
this.queryParams.nodeExecuteStatus == "UNEXECUTED"
@ -1476,7 +1491,8 @@
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map((item) => item.manageRouteNodeId);
this.single = selection.length !== 1;
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) {
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
.confirm(
'是否确认删除?'
)
.then(function () {
return delTaskExecuteRecord(ids);
return batchDeleteTask(ids);
})
.then(() => {
this.getList();
@ -1574,16 +1579,6 @@
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"system/taskExecuteRecord/export",
{
...this.queryParams,
},
`taskExecuteRecord_${new Date().getTime()}.xlsx`
);
},
//
getMaxTableHeight() {
const windowInnerHeight = window.innerHeight; //
@ -1880,4 +1875,3 @@
height: 0px !important;
}
</style>