’患者导入菜单新增手动导入功能‘

This commit is contained in:
coderxqt 2026-05-13 10:40:03 +08:00
parent f56f614d6d
commit 43a43fdf6d
2 changed files with 564 additions and 114 deletions

View File

@ -59,3 +59,29 @@ export function addDialTime(data) {
data data
}) })
} }
// 手动导入请求列表
export function patientInfoImportList(data) {
return request({
url: '/system/externalImport/externalImports',
method: 'post',
data
})
}
// 科室筛选框集合
export function deptSelectList() {
return request({
url: '/system/department/getDepartmentList',
method: 'get',
})
}
// 生成导入信息
export function CreategenerateImport(data) {
return request({
url: '/manage/patientInfoimportmain/manuallyCreate',
method: 'post',
data
})
}

View File

@ -1,25 +1,63 @@
<template> <template>
<div class="app-container" ref="layout"> <div class="app-container" ref="layout">
<div ref="topform" class="form"> <div ref="topform" class="form">
<SearchFilter :labelWidths="310" :widths="70" size="small" @search="handleQuery" @handleRules="getList" <SearchFilter
patientUploadButtonVisible="true" @reset="resetQuery" @minShowCtrol="getMaxTableHeight" v-show="showSearch"> :labelWidths="310"
:widths="70"
size="small"
@search="handleQuery"
@handleRules="getList"
patientUploadButtonVisible="true"
@reset="resetQuery"
@minShowCtrol="getMaxTableHeight"
v-show="showSearch"
>
<el-form-item label="导入日期" prop="" label-width="90px"> <el-form-item label="导入日期" prop="" label-width="90px">
<el-date-picker v-model="createTime" type="daterange" range-separator="" start-placeholder="开始日期" <el-date-picker
style="width: 220px" value-format="yyyy-MM-dd" end-placeholder="结束日期"> v-model="createTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
style="width: 220px"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="流水号" prop="sn" label-width="90px"> <el-form-item label="流水号" prop="sn" label-width="90px">
<el-input v-model="queryParams.sn" placeholder="请输入流水号" style="width: 220px" clearable> <el-input
v-model="queryParams.sn"
placeholder="请输入流水号"
style="width: 220px"
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="批次名称" prop="importName" label-width="90px"> <el-form-item label="批次名称" prop="importName" label-width="90px">
<el-input v-model="queryParams.importName" placeholder="请输入批次名称" style="width: 220px" clearable> <el-input
v-model="queryParams.importName"
placeholder="请输入批次名称"
style="width: 220px"
clearable
>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="医院" prop="" label-width="90px"> <el-form-item label="医院" prop="" label-width="90px">
<el-select v-model="queryParams.hospitalAgencyId" filterable placeholder="请选择医院" style="width: 220px" <el-select
clearable @clear="clearhospitalAgency" @change="changehospitalAgency"> v-model="queryParams.hospitalAgencyId"
<el-option v-for="item in hospitalAgencylist" :key="item.id" :label="item.agencyName" :value="item.id"> filterable
placeholder="请选择医院"
style="width: 220px"
clearable
@clear="clearhospitalAgency"
@change="changehospitalAgency"
>
<el-option
v-for="item in hospitalAgencylist"
:key="item.id"
:label="item.agencyName"
:value="item.id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -32,9 +70,17 @@
</el-form-item> --> </el-form-item> -->
</SearchFilter> </SearchFilter>
</div> </div>
<!-- <div ref="mb8" class="mb8"> <div ref="mb8" class="mb8" style="margin-left: 5px">
<el-row :gutter="10" class=""> <el-row :gutter="10" class="">
<el-col :span="1.5"> <el-button
type="primary"
plain
icon="el-icon-upload2"
size="mini"
@click="handleManualImport"
>手动导入</el-button
>
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['manage:blacklist:add']">新增</el-button> v-hasPermi="['manage:blacklist:add']">新增</el-button>
</el-col> </el-col>
@ -50,12 +96,16 @@
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['manage:blacklist:export']">导出</el-button> v-hasPermi="['manage:blacklist:export']">导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row> </el-row>
</div> --> </div>
<div ref="table"> <div ref="table">
<el-table :max-height="maxTableHeight" v-loading="loading" :data="PatientInfoImportBatchlist" <el-table
@selection-change="handleSelectionChange"> :max-height="maxTableHeight"
v-loading="loading"
:data="PatientInfoImportBatchlist"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column label="序号" type="index" width="50" align="center" /> <el-table-column label="序号" type="index" width="50" align="center" />
<el-table-column label="流水号" prop="sn" align="center"> <el-table-column label="流水号" prop="sn" align="center">
@ -73,28 +123,56 @@
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button size="mini" type="text" @click="handleUpdate(scope.row)" <!-- <el-button size="mini" type="text" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:blacklist:edit']">修改</el-button> v-hasPermi="['manage:blacklist:edit']">修改</el-button>
<el-button size="mini" type="text" @click="handleDelete(scope.row)" <el-button size="mini" type="text" @click="handleDelete(scope.row)"
v-hasPermi="['manage:blacklist:remove']">删除</el-button> --> v-hasPermi="['manage:blacklist:remove']">删除</el-button> -->
<el-button size="mini" type="text" @click="handOutbound(scope.row)">外呼</el-button> <el-button size="mini" type="text" @click="handOutbound(scope.row)"
<el-button size="mini" type="text" @click="ljhandOutbound(scope.row)">立即外呼</el-button> >外呼</el-button
<el-button size="mini" type="text" @click="handsn(scope.row)">明细</el-button> >
<el-button size="mini" type="text" @click="handleDelete(scope.row)">删除</el-button> <el-button
size="mini"
type="text"
@click="ljhandOutbound(scope.row)"
>立即外呼</el-button
>
<el-button size="mini" type="text" @click="handsn(scope.row)"
>明细</el-button
>
<el-button size="mini" type="text" @click="handleDelete(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" /> --> :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
<myPagination v-show="total > 0" :total="total" :pageSize="queryParams.pageSize" <myPagination
:indexFromWrap="queryParams.pageNum" @updateCPage="updateCPage"></myPagination> v-show="total > 0"
<el-dialog title="立即外呼" :visible.sync="open" width="500px" append-to-body> :total="total"
:pageSize="queryParams.pageSize"
:indexFromWrap="queryParams.pageNum"
@updateCPage="updateCPage"
></myPagination>
<el-dialog
title="立即外呼"
:visible.sync="open"
width="500px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="任务名称" prop="manageRouteName"> <el-form-item label="任务名称" prop="manageRouteName">
<el-input v-model="form.manageRouteName" placeholder="请输入任务名称" /> <el-input
v-model="form.manageRouteName"
placeholder="请输入任务名称"
/>
</el-form-item> </el-form-item>
<el-descriptions title="上次外呼数据简介" /> <el-descriptions title="上次外呼数据简介" />
<el-form-item label="流水号" prop="sn"> <el-form-item label="流水号" prop="sn">
@ -104,10 +182,10 @@
</el-form-item> </el-form-item>
<el-form-item label="任务节点类型" prop="taskNodeType"> <el-form-item label="任务节点类型" prop="taskNodeType">
<div class="formdiv"> <div class="formdiv">
{{ form.taskNodeType == 'PHONE_OUTBOUND' ? '电话外呼' : '' }} {{ form.taskNodeType == "PHONE_OUTBOUND" ? "电话外呼" : "" }}
{{ form.taskNodeType == 'QUESTIONNAIRE_SCALE' ? '问卷量表' : '' }} {{ form.taskNodeType == "QUESTIONNAIRE_SCALE" ? "问卷量表" : "" }}
{{ form.taskNodeType == 'PROPAGANDA_ARTICLE' ? '宣教文案' : '' }} {{ form.taskNodeType == "PROPAGANDA_ARTICLE" ? "宣教文案" : "" }}
{{ form.taskNodeType == 'TEXT_REMIND' ? '文字提醒' : '' }} {{ form.taskNodeType == "TEXT_REMIND" ? "文字提醒" : "" }}
</div> </div>
</el-form-item> </el-form-item>
<span v-if="form.taskNodeType == 'PHONE_OUTBOUND'"> <span v-if="form.taskNodeType == 'PHONE_OUTBOUND'">
@ -118,8 +196,8 @@
</el-form-item> </el-form-item>
<el-form-item label="推送方式" prop="phoneDialMethod"> <el-form-item label="推送方式" prop="phoneDialMethod">
<div class="formdiv"> <div class="formdiv">
{{ form.phoneDialMethod == 'COMMON' ? '人工电话' : '' }} {{ form.phoneDialMethod == "COMMON" ? "人工电话" : "" }}
{{ form.phoneDialMethod == 'AI' ? '自动外呼' : '' }} {{ form.phoneDialMethod == "AI" ? "自动外呼" : "" }}
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="重播次数" prop="phoneRedialTimes"> <el-form-item label="重播次数" prop="phoneRedialTimes">
@ -141,13 +219,17 @@
</el-form-item> </el-form-item>
<el-form-item label="推送方式" prop="phoneDialMethod"> <el-form-item label="推送方式" prop="phoneDialMethod">
<div class="formdiv"> <div class="formdiv">
{{ form.phoneDialMethod == '' ? '小程序问卷' : '' }} {{ form.phoneDialMethod == "" ? "小程序问卷" : "" }}
{{ form.phoneDialMethod == 'AI' ? 'AI自动外呼' : '' }} {{ form.phoneDialMethod == "AI" ? "AI自动外呼" : "" }}
{{ form.phoneDialMethod == 'COMMON' ? '人工随访' : '' }} {{ form.phoneDialMethod == "COMMON" ? "人工随访" : "" }}
</div> </div>
</el-form-item> </el-form-item>
</span> </span>
<el-form-item v-if="form.taskNodeType == 'PROPAGANDA_ARTICLE'" label="宣教模板" prop="taskNodeType"> <el-form-item
v-if="form.taskNodeType == 'PROPAGANDA_ARTICLE'"
label="宣教模板"
prop="taskNodeType"
>
<div class="formdiv"> <div class="formdiv">
{{ form.propagandaTitle }} {{ form.propagandaTitle }}
</div> </div>
@ -158,19 +240,228 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog
title="手动导入"
:visible.sync="manualImportDialog"
width="80%"
append-to-body
>
<div style="display: flex; flex-direction: column; height: 600px">
<div style="flex: 0 0 auto">
<el-form :inline="true" :model="manualImportQuery" size="small">
<el-form-item label="所属科室名称">
<el-select
v-model="manualImportQuery.departmentNameList"
multiple
filterable
clearable
placeholder="请选择科室名称"
>
<el-option
v-for="(item, index) in deptSelectData"
:key="index"
:label="item.departmentName"
:value="item.departmentName"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="就诊方式">
<el-select
v-model="manualImportQuery.visitMethod"
placeholder="请选择就诊方式"
style="width: 200px"
clearable
@change="handleVisitMethodChange"
>
<el-option label="门诊" value="1" />
<el-option label="住院" value="2" />
</el-select>
</el-form-item>
<el-form-item label="就诊时间">
<el-date-picker
v-model="visitTimeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
style="width: 300px"
:disabled="manualImportQuery.visitMethod == '2'"
/>
</el-form-item>
<el-form-item label="出院日期">
<el-date-picker
v-model="dischargeTimeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
style="width: 300px"
:disabled="manualImportQuery.visitMethod == '1'"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleManualSearch"
>搜索</el-button
>
<el-button @click="handleManualReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<div style="flex: 1; overflow: auto">
<el-table
:data="manualImportList"
style="width: 100%"
height="100%"
v-loading="manualImportLoading"
@selection-change="DiahandleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column
label="患者姓名"
align="center"
prop="patientName"
/>
<el-table-column
label="患者电话"
align="center"
prop="phone"
show-overflow-tooltip
/>
<el-table-column
label="年龄"
align="center"
prop="age"
width="50"
/>
<el-table-column
label="身份证号"
align="center"
prop="cardNo"
show-overflow-tooltip
/>
<el-table-column
label="性别"
align="center"
prop="sex"
width="50"
/>
<el-table-column
label="所属科室名称"
align="center"
prop="departmentName"
/>
<el-table-column
label="就诊编号"
align="center"
prop="visitCode"
show-overflow-tooltip
/>
<el-table-column label="就诊方式" align="center" prop="visitMethod">
<template slot-scope="scope">
<span>{{
scope.row.visitMethod === "1" ? "门诊" : "住院"
}}</span>
</template>
</el-table-column>
<el-table-column
label="就诊时间"
align="center"
prop="visitDate"
width="100"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.visitDate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
label="入院时间"
align="center"
prop="admissionTime"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.admissionTime, "{y}-{m}-{d}")
}}</span>
</template>
</el-table-column>
<el-table-column
label="出院时间"
align="center"
prop="dischargeTime"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.dischargeTime, "{y}-{m}-{d}")
}}</span>
</template>
</el-table-column>
<el-table-column
label="主要诊断"
align="center"
prop="mainDiagnosis"
/>
<el-table-column
label="出院方式"
align="center"
prop="dischargeMethod"
/>
<el-table-column
label="患者健康状况"
align="center"
prop="healthState"
/>
<el-table-column
label="数据获取时间"
align="center"
prop="dataGetTime"
width="100"
>
<template slot-scope="scope">
<span>{{
parseTime(scope.row.dataGetTime, "{y}-{m}-{d}")
}}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="generateImportInfo()"
>生成导入信息</el-button
>
<el-button @click="manualImportDialog = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { patientInfoImportBatchlist, updateSn, outboundConfirmation, directOutbound } from "@/api/manage/patientInfoImport"; import {
import { selectAgencyList, getDepartmentList, getAgencyList } from "@/api/manage/selectAgencyList"; patientInfoImportBatchlist,
import SearchFilter from '../../components/SearchForm.vue' updateSn,
outboundConfirmation,
directOutbound,
patientInfoImportList,
deptSelectList,
CreategenerateImport,
} from "@/api/manage/patientInfoImport";
import {
selectAgencyList,
getDepartmentList,
getAgencyList,
} from "@/api/manage/selectAgencyList";
import SearchFilter from "../../components/SearchForm.vue";
import { getAgencytype } from "@/api/system/agency"; import { getAgencytype } from "@/api/system/agency";
export default { export default {
name: "Importlist", name: "Importlist",
components: { SearchFilter }, components: { SearchFilter },
data() { data() {
return { return {
deptSelectData: [],
manualImportLoading: false,
maxTableHeight: undefined, maxTableHeight: undefined,
//list //list
hospitalAgencylist: [], hospitalAgencylist: [],
@ -180,6 +471,8 @@ export default {
loading: true, loading: true,
// //
ids: [], ids: [],
//
selectionList: [],
// //
single: true, single: true,
// //
@ -194,6 +487,8 @@ export default {
title: "", title: "",
// //
open: false, open: false,
//
manualImportDialog: false,
createTime: "", createTime: "",
// //
queryParams: { queryParams: {
@ -206,6 +501,17 @@ export default {
sn: "", sn: "",
importName: "", importName: "",
}, },
//
manualImportQuery: {
departmentNameList: [],
visitMethod: "1",
visitDateStart: "",
visitDateEnd: "",
dischargeDateStart: "",
dischargeDateEnd: "",
},
//
manualImportList: [],
// //
form: {}, form: {},
// //
@ -213,9 +519,9 @@ export default {
// //
rules: { rules: {
manageRouteName: [ manageRouteName: [
{ required: true, message: '请输入任务名称', trigger: 'change' } { required: true, message: "请输入任务名称", trigger: "change" },
], ],
} },
}; };
}, },
created() { created() {
@ -223,8 +529,37 @@ export default {
this.getList(); this.getList();
}, },
mounted() { mounted() {
this.getMaxTableHeight() this.getMaxTableHeight();
this.screenChange() this.screenChange();
},
computed: {
visitTimeRange: {
get() {
const { visitDateStart, visitDateEnd } = this.manualImportQuery;
return visitDateStart || visitDateEnd
? [visitDateStart, visitDateEnd]
: [];
},
set(value) {
this.manualImportQuery.visitDateStart =
value && value[0] ? value[0] : "";
this.manualImportQuery.visitDateEnd = value && value[1] ? value[1] : "";
},
},
dischargeTimeRange: {
get() {
const { dischargeDateStart, dischargeDateEnd } = this.manualImportQuery;
return dischargeDateStart || dischargeDateEnd
? [dischargeDateStart, dischargeDateEnd]
: [];
},
set(value) {
this.manualImportQuery.dischargeDateStart =
value && value[0] ? value[0] : "";
this.manualImportQuery.dischargeDateEnd =
value && value[1] ? value[1] : "";
},
},
}, },
methods: { methods: {
// / // /
@ -238,6 +573,49 @@ export default {
}, },
}); });
}, },
//
handleManualImport() {
this.manualImportDialog = true;
this.handleManualSearch();
deptSelectList().then((res) => {
this.deptSelectData = res.data;
});
},
//
handleManualSearch() {
this.manualImportLoading = true;
patientInfoImportList(this.manualImportQuery).then((response) => {
this.manualImportLoading = false;
this.manualImportList = response;
});
},
//
handleManualReset() {
this.manualImportQuery = {
departmentNameList: [],
visitMethod: "",
visitDateStart: "",
visitDateEnd: "",
dischargeDateStart: "",
dischargeDateEnd: "",
};
this.handleManualSearch();
},
//
handleVisitMethodChange(value) {
if (value === "1") {
this.manualImportQuery.dischargeDateStart = "";
this.manualImportQuery.dischargeDateEnd = "";
} else if (value === "2") {
this.manualImportQuery.visitDateStart = "";
this.manualImportQuery.visitDateEnd = "";
} else {
this.manualImportQuery.visitDateStart = "";
this.manualImportQuery.visitDateEnd = "";
this.manualImportQuery.dischargeDateStart = "";
this.manualImportQuery.dischargeDateEnd = "";
}
},
// //
handOutbound(row) { handOutbound(row) {
this.$router.push({ this.$router.push({
@ -245,10 +623,10 @@ export default {
query: { query: {
path: "/patient/patientinfoimport", path: "/patient/patientinfoimport",
// signPatientRecordId: row.id, // signPatientRecordId: row.id,
sn: row.sn ? row.sn : '', sn: row.sn ? row.sn : "",
patientName: row.patientName ? row.patientName : '', patientName: row.patientName ? row.patientName : "",
departmentId: row.departmentId ? row.departmentId : '', departmentId: row.departmentId ? row.departmentId : "",
departmentName: row.departmentName ? row.departmentName : '', departmentName: row.departmentName ? row.departmentName : "",
}, },
}); });
}, },
@ -265,47 +643,51 @@ export default {
var dictType = "redial_times"; var dictType = "redial_times";
getAgencytype(dictType).then((res) => { getAgencytype(dictType).then((res) => {
this.optionslisttime = res.data; this.optionslisttime = res.data;
outboundConfirmation().then(res => { outboundConfirmation().then((res) => {
if (res.data) { if (res.data) {
this.form = res.data; this.form = res.data;
this.$set(this.form, 'sn', row.sn + '') this.$set(this.form, "sn", row.sn + "");
this.open = true; this.open = true;
} else { } else {
this.$modal.msgError("暂无最新外呼数据,请先进行手动外呼"); this.$modal.msgError("暂无最新外呼数据,请先进行手动外呼");
} }
}) });
}); });
}, },
Calloutimmediately() { Calloutimmediately() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
directOutbound(this.form).then(res => { directOutbound(this.form).then((res) => {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}) });
} }
}) });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
// const ids = row.id || this.ids; // const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除?').then(() => { this.$modal
return updateSn(row.sn); .confirm("是否确认删除?")
}).then(() => { .then(() => {
this.getList(); return updateSn(row.sn);
this.$modal.msgSuccess("删除成功"); })
}).catch(() => { }); .then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}, },
updateCPage(index, size) { updateCPage(index, size) {
this.queryParams.pageNum = index this.queryParams.pageNum = index;
this.queryParams.pageSize = size this.queryParams.pageSize = size;
this.getList(); this.getList();
}, },
/** 查询 */ /** 查询 */
getList() { getList() {
this.loading = true; this.loading = true;
patientInfoImportBatchlist(this.queryParams).then(response => { patientInfoImportBatchlist(this.queryParams).then((response) => {
this.PatientInfoImportBatchlist = response.rows; this.PatientInfoImportBatchlist = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -344,54 +726,61 @@ export default {
campusAgencyId: null, campusAgencyId: null,
sn: "", sn: "",
importName: "", importName: "",
} };
this.createTime = ''; this.createTime = "";
// this.resetForm("queryForm"); // this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
},
DiahandleSelectionChange(selection) {
this.selectionList = selection;
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('manage/blacklist/export', { this.download(
...this.queryParams "manage/blacklist/export",
}, `blacklist_${new Date().getTime()}.xlsx`) {
...this.queryParams,
},
`blacklist_${new Date().getTime()}.xlsx`
);
}, },
//list //list
selectAgencyinfo() { selectAgencyinfo() {
let query = { let query = {
agencyStatus: 'ON', agencyStatus: "ON",
nodeType: 'HOSPITAL', nodeType: "HOSPITAL",
} };
selectAgencyList(query).then(res => { selectAgencyList(query).then((res) => {
this.hospitalAgencylist = res.data this.hospitalAgencylist = res.data;
}) });
}, },
// //
getAgencyListinfo(nodeType, id, type) { getAgencyListinfo(nodeType, id, type) {
let query = { let query = {
nodeType: nodeType, nodeType: nodeType,
};
if (nodeType == "HOSPITAL") {
query.hospitalId = id;
} else if (nodeType == "CAMPUS") {
query.campusId = id;
} }
if (nodeType == 'HOSPITAL') { getAgencyList(query).then((res) => {
query.hospitalId = id
} else if (nodeType == 'CAMPUS') {
query.campusId = id
}
getAgencyList(query).then(res => {
// if (type) { // if (type) {
if (nodeType == 'HOSPITAL') { if (nodeType == "HOSPITAL") {
this.campusAgencylist = res.data.campusList; this.campusAgencylist = res.data.campusList;
} }
// } // }
}) });
}, },
// //
changehospitalAgency(id, type, typetwo) { changehospitalAgency(id, type, typetwo) {
this.getAgencyListinfo('HOSPITAL', id, type) this.getAgencyListinfo("HOSPITAL", id, type);
// let query = { // let query = {
// agencyStatus: 'ON', // agencyStatus: 'ON',
// nodeType: 'CAMPUS', // nodeType: 'CAMPUS',
@ -400,71 +789,106 @@ export default {
// selectAgencyList(query).then(res => { // selectAgencyList(query).then(res => {
if (type) { if (type) {
if (!typetwo) { if (!typetwo) {
this.form.campusAgencyId = null this.form.campusAgencyId = null;
} }
} else { } else {
this.queryParams.campusAgencyId = null this.queryParams.campusAgencyId = null;
} }
// }) // })
}, },
// //
changecampusAgency(id, type, typetwo) { changecampusAgency(id, type, typetwo) {
this.getAgencyListinfo('CAMPUS', id, type) this.getAgencyListinfo("CAMPUS", id, type);
}, },
// //
clearhospitalAgency(type) { clearhospitalAgency(type) {
if (type) { if (type) {
this.form.campusAgencyId = null this.form.campusAgencyId = null;
this.form.departmentId = null this.form.departmentId = null;
this.form.wardId = null this.form.wardId = null;
} else { } else {
this.queryParams.campusAgencyId = null this.queryParams.campusAgencyId = null;
this.queryParams.departmentId = null this.queryParams.departmentId = null;
this.queryParams.wardId = null this.queryParams.wardId = null;
} }
}, },
// //
clearcampusAgency(type) { clearcampusAgency(type) {
if (type) { if (type) {
this.form.departmentId = null this.form.departmentId = null;
this.form.wardId = null this.form.wardId = null;
this.getAgencyListinfo('HOSPITAL', this.form.hospitalAgencyId, type) this.getAgencyListinfo("HOSPITAL", this.form.hospitalAgencyId, type);
} else { } else {
this.queryParams.departmentId = null this.queryParams.departmentId = null;
this.queryParams.wardId = null this.queryParams.wardId = null;
this.getAgencyListinfo('HOSPITAL', this.queryParams.hospitalAgencyId) this.getAgencyListinfo("HOSPITAL", this.queryParams.hospitalAgencyId);
} }
}, },
// //
getMaxTableHeight() { getMaxTableHeight() {
const windowInnerHeight = window.innerHeight // const windowInnerHeight = window.innerHeight; //
const layoutDiv = this.$refs.layout const layoutDiv = this.$refs.layout;
const formDiv = this.$refs.topform const formDiv = this.$refs.topform;
const mb8Div = this.$refs.mb8 const mb8Div = this.$refs.mb8;
this.maxTableHeight = this.maxTableHeight =
windowInnerHeight - 134 - windowInnerHeight -
134 -
this.getBoxPadding(layoutDiv) - this.getBoxPadding(layoutDiv) -
this.getBoxHeight(mb8Div) - this.getBoxHeight(mb8Div) -
this.getBoxHeight(formDiv) this.getBoxHeight(formDiv);
}, },
// resize // resize
screenChange() { screenChange() {
// resizeresize // resizeresize
window.addEventListener('resize', this.getMaxTableHeight, true) window.addEventListener("resize", this.getMaxTableHeight, true);
// //
// //
// beforeDestroy // beforeDestroy
this.$once('hook:beforeDestroy', () => { this.$once("hook:beforeDestroy", () => {
window.removeEventListener('resize', this.getMaxTableHeight, true) window.removeEventListener("resize", this.getMaxTableHeight, true);
}) });
}, },
} //
generateImportInfo() {
if (this.selectionList.length === 0) {
this.$modal.msgWarning("请至少选择一条数据进行导入");
return;
}
this.$prompt("请输入导入批次名称", "提示", {
confirmButtonText: "确认导入",
cancelButtonText: "取消",
inputValidator: (value) => {
if (!value || value.trim() === "") {
return "导入批次名称不能为空";
}
return true;
},
})
.then(({ value }) => {
CreategenerateImport({
externalImports: this.selectionList,
importName: value,
}).then((res) => {
console.log(res);
this.$modal.msgSuccess("导入成功");
this.manualImportDialog = false;
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "输入取消",
});
});
},
},
}; };
</script> </script>
<style> <style>
.formdiv { .formdiv {
width: 340px; width: 340px;
border: 1px solid #DCDFE6; border: 1px solid #dcdfe6;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
font-size: 14px; font-size: 14px;