503 lines
15 KiB
Vue
503 lines
15 KiB
Vue
<template>
|
||
<div class="app-container" style="max-height: 100vh; overflow-y: auto">
|
||
<el-form
|
||
:model="queryParams"
|
||
ref="queryForm"
|
||
size="small"
|
||
:inline="true"
|
||
v-show="showSearch"
|
||
label-width="68px"
|
||
>
|
||
<el-form-item label="任务编号" prop="batchTaskNumber">
|
||
<el-input
|
||
v-model="queryParams.batchTaskNumber"
|
||
placeholder="请输入任务编号"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="任务名称" prop="batchTaskName">
|
||
<el-input
|
||
v-model="queryParams.batchTaskName"
|
||
placeholder="请输入任务名称"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="执行时间" prop="nodePlanTime">
|
||
<el-date-picker
|
||
clearable
|
||
v-model="queryParams.nodePlanTime"
|
||
type="date"
|
||
value-format="yyyy-MM-dd"
|
||
placeholder="请选择执行时间"
|
||
>
|
||
</el-date-picker>
|
||
</el-form-item>
|
||
<el-form-item label="推送类型" prop="batchTaskSource">
|
||
<el-select
|
||
v-model="queryParams.batchTaskSource"
|
||
placeholder="请选择推送类型"
|
||
clearable
|
||
@change="ChangeBatchTaskSource"
|
||
>
|
||
<el-option label="短信" value="message"></el-option>
|
||
<el-option label="电话" value="telephone"></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
<el-form-item label="模板" prop="robotPublishId">
|
||
<!-- queryParams.templateId -->
|
||
<el-select
|
||
v-model="queryParams.robotPublishId"
|
||
placeholder="请选择推送类型"
|
||
clearable
|
||
>
|
||
<el-option
|
||
v-for="item in templateList"
|
||
:key="item.robotPublishId"
|
||
:label="item.templateName"
|
||
:value="item.robotPublishId"
|
||
></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
|
||
<el-form-item label="总结标签" prop="physicalExaminationLabel">
|
||
<el-input
|
||
v-model="queryParams.physicalExaminationLabel"
|
||
placeholder="请输入总结标签"
|
||
clearable
|
||
@keyup.enter.native="handleQuery"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-search"
|
||
size="mini"
|
||
@click="handleQuery"
|
||
>搜索</el-button
|
||
>
|
||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||
>重置</el-button
|
||
>
|
||
</el-form-item>
|
||
</el-form>
|
||
<el-table
|
||
v-loading="loading"
|
||
:data="batchSendTaskRecordInfoList"
|
||
@selection-change="handleSelectionChange"
|
||
style="margin-bottom: 40px"
|
||
>
|
||
<el-table-column type="selection" width="55" align="center" />
|
||
<el-table-column
|
||
label="任务编号"
|
||
align="center"
|
||
prop="batchTaskNumber"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column label="任务名称" align="center" prop="batchTaskName" />
|
||
<el-table-column
|
||
label="执行时间"
|
||
align="center"
|
||
prop="nodePlanTime"
|
||
width="180"
|
||
>
|
||
<template slot-scope="scope">
|
||
<span>{{ parseTime(scope.row.nodePlanTime, "{y}-{m}-{d}") }}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="推送类型" align="center" prop="batchTaskSource" />
|
||
<el-table-column label="模板" align="center" prop="templateName" />
|
||
<el-table-column
|
||
label="内容"
|
||
align="center"
|
||
prop="nodeContent"
|
||
show-overflow-tooltip
|
||
/>
|
||
<!-- ,已执行:EXECUTED,未执行:UNEXECUTED,执行中:EXECUTING -->
|
||
<el-table-column
|
||
label="节点任务执行状态"
|
||
align="center"
|
||
prop="nodeExecuteStatus"
|
||
/>
|
||
<el-table-column
|
||
label="总结标签"
|
||
align="center"
|
||
prop="physicalExaminationLabel"
|
||
/>
|
||
<el-table-column
|
||
label="操作"
|
||
align="center"
|
||
class-name="small-padding fixed-width"
|
||
>
|
||
<template slot-scope="scope">
|
||
<el-button
|
||
size="mini"
|
||
type="text"
|
||
icon="el-icon-view"
|
||
@click="handleUpdate(scope.row)"
|
||
v-hasPermi="['system:batchSendTaskRecordInfo:edit']"
|
||
>查看</el-button
|
||
>
|
||
<el-button
|
||
size="mini"
|
||
type="text"
|
||
icon="el-icon-delete"
|
||
@click="handleDelete(scope.row)"
|
||
v-hasPermi="['system:batchSendTaskRecordInfo:remove']"
|
||
>删除</el-button
|
||
>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
|
||
<pagination
|
||
v-show="total > 0"
|
||
:total="total"
|
||
:page.sync="queryParams.pageNum"
|
||
:limit.sync="queryParams.pageSize"
|
||
@pagination="getList"
|
||
/>
|
||
|
||
<!-- 添加或修改批量推送任务记录对话框 -->
|
||
<el-dialog
|
||
:title="title"
|
||
:visible.sync="open"
|
||
width="1000px"
|
||
append-to-body
|
||
>
|
||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||
<el-row :gutter="20">
|
||
<el-col :span="12">
|
||
<el-form-item label="任务编号" prop="batchTaskNumber">
|
||
<el-input
|
||
v-model="form.batchTaskNumber"
|
||
placeholder="请输入任务编号"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="任务名称" prop="batchTaskName">
|
||
<el-input
|
||
v-model="form.batchTaskName"
|
||
placeholder="请输入任务名称"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="模板名称" prop="templateName">
|
||
<el-input
|
||
v-model="form.templateName"
|
||
placeholder="请输入模板名称"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="模版类型" prop="batchTaskSource">
|
||
<el-select
|
||
v-model="form.batchTaskSource"
|
||
placeholder="请选择推送类型"
|
||
>
|
||
<el-option label="短信" value="message"></el-option>
|
||
<el-option label="电话" value="telephone"></el-option>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="12">
|
||
<el-form-item label="执行时间" prop="nodePlanTime">
|
||
<el-date-picker
|
||
clearable
|
||
v-model="form.nodePlanTime"
|
||
type="date"
|
||
value-format="yyyy-MM-dd"
|
||
placeholder="请选择任务计划执行时间"
|
||
>
|
||
</el-date-picker>
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
<el-form-item label="内容">
|
||
<el-input
|
||
v-model="form.nodeContent"
|
||
type="textarea"
|
||
:autosize="{ minRows: 2, maxRows: 10 }"
|
||
/>
|
||
</el-form-item>
|
||
<el-form-item label="总结标签" prop="physicalExaminationLabel">
|
||
<el-input
|
||
v-model="form.physicalExaminationLabel"
|
||
placeholder="请输入总结标签"
|
||
/>
|
||
</el-form-item>
|
||
</el-form>
|
||
<strong>人员明细</strong>
|
||
<el-table :data="form.batchSendTaskInfos">
|
||
<el-table-column
|
||
label="流水号"
|
||
align="center"
|
||
prop="sn"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column
|
||
label="任务状态"
|
||
align="center"
|
||
prop="taskStatus"
|
||
show-overflow-tooltip
|
||
>
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.taskStatus == 'SUCCESS'"> 成功 </span>
|
||
<span v-if="scope.row.taskStatus == 'FAILURE'"> 失败 </span>
|
||
<span v-if="scope.row.taskStatus == 'EXPIRED'"> 超期自动作废 </span>
|
||
<span v-if="!scope.row.taskStatus"> 待执行 </span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
label="导入批次"
|
||
align="center"
|
||
prop="importName"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||
<el-table-column
|
||
label="电话"
|
||
align="center"
|
||
prop="patientPhone"
|
||
width="110"
|
||
/>
|
||
<el-table-column label="年龄" align="center" prop="age" />
|
||
<el-table-column
|
||
label="身份证号"
|
||
align="center"
|
||
prop="cardNo"
|
||
show-overflow-tooltip
|
||
/>
|
||
<el-table-column label="人员类型" align="center" prop="personnelType">
|
||
<template slot-scope="scope">
|
||
<span v-if="scope.row.personnelType == 'IN_HOSPITAL'"> 在院 </span>
|
||
<span v-if="scope.row.personnelType == 'OUTPATIENT'"> 门诊 </span>
|
||
<span v-if="scope.row.personnelType == 'DISCHARGED'"> 出院 </span>
|
||
<span v-if="scope.row.personnelType == 'PHYSICAL_EXAMINATION'">
|
||
体检
|
||
</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column label="团体" align="center" prop="teamName" />
|
||
<el-table-column
|
||
label="科室名称"
|
||
align="center"
|
||
prop="departmentName"
|
||
/>
|
||
<el-table-column
|
||
label="就诊/出院/体检时间"
|
||
align="center"
|
||
prop="visitDate"
|
||
width="180"
|
||
>
|
||
<template slot-scope="scope">
|
||
<span>{{ parseTime(scope.row.visitDate, "{y}-{m}-{d}") }}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column
|
||
label="门诊/住院/体检号"
|
||
align="center"
|
||
prop="inHospitalNumber"
|
||
width="130"
|
||
/>
|
||
<el-table-column label="人群" align="center" prop="crowdName" />
|
||
<el-table-column
|
||
label="总结标签"
|
||
align="center"
|
||
prop="physicalExaminationLabel"
|
||
show-overflow-tooltip
|
||
/>
|
||
</el-table>
|
||
<div slot="footer" class="dialog-footer">
|
||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button> -->
|
||
<el-button @click="cancel">取 消</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import {
|
||
listBatchSendTaskRecordInfo,
|
||
getBatchSendTaskRecordInfo,
|
||
delBatchSendTaskRecordInfo,
|
||
addBatchSendTaskRecordInfo,
|
||
updateBatchSendTaskRecordInfo,
|
||
selectTemplateByType,
|
||
} from "@/api/system/batchSendTaskRecordInfo";
|
||
|
||
export default {
|
||
name: "BatchSendTaskRecordInfo",
|
||
data() {
|
||
return {
|
||
templateList: [],
|
||
// 遮罩层
|
||
loading: true,
|
||
// 选中数组
|
||
ids: [],
|
||
// 非单个禁用
|
||
single: true,
|
||
// 非多个禁用
|
||
multiple: true,
|
||
// 显示搜索条件
|
||
showSearch: true,
|
||
// 总条数
|
||
total: 0,
|
||
// 批量推送任务记录表格数据
|
||
batchSendTaskRecordInfoList: [],
|
||
// 弹出层标题
|
||
title: "",
|
||
// 是否显示弹出层
|
||
open: false,
|
||
// 查询参数
|
||
queryParams: {
|
||
pageNum: 1,
|
||
pageSize: 10,
|
||
batchTaskNumber: null,
|
||
batchTaskName: null,
|
||
taskExecuteType: null,
|
||
nodePlanTime: null,
|
||
batchTaskSource: null,
|
||
templateId: null,
|
||
templateName: null,
|
||
robotPublishId: null,
|
||
nodeContent: null,
|
||
nodeExecuteStatus: null,
|
||
physicalExaminationLabel: null,
|
||
},
|
||
// 表单参数
|
||
form: {},
|
||
// 表单校验
|
||
rules: {},
|
||
};
|
||
},
|
||
created() {
|
||
this.getList();
|
||
},
|
||
methods: {
|
||
/** 查询批量推送任务记录列表 */
|
||
getList() {
|
||
this.loading = true;
|
||
listBatchSendTaskRecordInfo(this.queryParams).then((response) => {
|
||
this.batchSendTaskRecordInfoList = response.rows;
|
||
this.total = response.total;
|
||
this.loading = false;
|
||
});
|
||
},
|
||
// 取消按钮
|
||
cancel() {
|
||
this.open = false;
|
||
this.reset();
|
||
},
|
||
// 表单重置
|
||
reset() {
|
||
this.form = {
|
||
id: null,
|
||
batchTaskNumber: null,
|
||
batchTaskName: null,
|
||
taskExecuteType: null,
|
||
nodePlanTime: null,
|
||
batchTaskSource: null,
|
||
templateId: null,
|
||
templateName: null,
|
||
robotPublishId: null,
|
||
nodeContent: null,
|
||
nodeExecuteStatus: "0",
|
||
physicalExaminationLabel: null,
|
||
delFlag: null,
|
||
createBy: null,
|
||
createTime: null,
|
||
};
|
||
this.resetForm("form");
|
||
},
|
||
/** 搜索按钮操作 */
|
||
handleQuery() {
|
||
this.queryParams.pageNum = 1;
|
||
this.getList();
|
||
},
|
||
/** 重置按钮操作 */
|
||
resetQuery() {
|
||
this.resetForm("queryForm");
|
||
this.handleQuery();
|
||
},
|
||
// 多选框选中数据
|
||
handleSelectionChange(selection) {
|
||
this.ids = selection.map((item) => item.id);
|
||
this.single = selection.length !== 1;
|
||
this.multiple = !selection.length;
|
||
},
|
||
/** 新增按钮操作 */
|
||
handleAdd() {
|
||
this.reset();
|
||
this.open = true;
|
||
this.title = "添加批量推送任务记录";
|
||
},
|
||
/** 修改按钮操作 */
|
||
handleUpdate(row) {
|
||
this.reset();
|
||
const id = row.id || this.ids;
|
||
getBatchSendTaskRecordInfo(id).then((response) => {
|
||
this.form = response.data;
|
||
this.open = true;
|
||
this.title = "任务记录详情";
|
||
});
|
||
},
|
||
/** 提交按钮 */
|
||
submitForm() {
|
||
this.$refs["form"].validate((valid) => {
|
||
if (valid) {
|
||
if (this.form.id != null) {
|
||
updateBatchSendTaskRecordInfo(this.form).then((response) => {
|
||
this.$modal.msgSuccess("修改成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
} else {
|
||
addBatchSendTaskRecordInfo(this.form).then((response) => {
|
||
this.$modal.msgSuccess("新增成功");
|
||
this.open = false;
|
||
this.getList();
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
/** 删除按钮操作 */
|
||
handleDelete(row) {
|
||
const ids = row.id || this.ids;
|
||
this.$modal
|
||
.confirm('是否确认删除批量推送任务记录编号为"' + ids + '"的数据项?')
|
||
.then(function () {
|
||
return delBatchSendTaskRecordInfo(ids);
|
||
})
|
||
.then(() => {
|
||
this.getList();
|
||
this.$modal.msgSuccess("删除成功");
|
||
})
|
||
.catch(() => {});
|
||
},
|
||
/** 导出按钮操作 */
|
||
handleExport() {
|
||
this.download(
|
||
"system/batchSendTaskRecordInfo/export",
|
||
{
|
||
...this.queryParams,
|
||
},
|
||
`batchSendTaskRecordInfo_${new Date().getTime()}.xlsx`
|
||
);
|
||
},
|
||
// 推送类型数据改变时,查询对应的模板数据
|
||
ChangeBatchTaskSource(e) {
|
||
this.queryParams.templateId = "";
|
||
let batchTaskSource = e;
|
||
selectTemplateByType({ batchTaskSource }).then((res) => {
|
||
this.templateList = res;
|
||
});
|
||
},
|
||
},
|
||
};
|
||
</script>
|