|
@@ -2,7 +2,7 @@ |
|
|
<div class="app-container"> |
|
|
<div class="app-container"> |
|
|
<vxe-grid ref="gridRef" v-bind="gridConfig"> |
|
|
<vxe-grid ref="gridRef" v-bind="gridConfig"> |
|
|
<template #toolbar_button_d="{ $grid }"> |
|
|
<template #toolbar_button_d="{ $grid }"> |
|
|
<vxe-button status="success" icon="vxe-icon-add" class="mr-10" @click="onAdd"> |
|
|
|
|
|
|
|
|
<vxe-button status="primary" icon="vxe-icon-add" class="mr-10" @click="onAdd"> |
|
|
新增治疗方案 |
|
|
新增治疗方案 |
|
|
</vxe-button> |
|
|
</vxe-button> |
|
|
<vxe-button |
|
|
<vxe-button |
|
@@ -24,14 +24,15 @@ |
|
|
:multiple="false" |
|
|
:multiple="false" |
|
|
:limit="1" |
|
|
:limit="1" |
|
|
:show-file-list="false" |
|
|
:show-file-list="false" |
|
|
|
|
|
:http-request="handleUpload" |
|
|
auto-upload |
|
|
auto-upload |
|
|
> |
|
|
> |
|
|
<vxe-button status="primary" icon="vxe-icon-upload" class="mr-10"> |
|
|
|
|
|
|
|
|
<vxe-button status="success" icon="vxe-icon-upload" class="mr-10"> |
|
|
批量导入数据 |
|
|
批量导入数据 |
|
|
</vxe-button> |
|
|
</vxe-button> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
<a :href="exportTemplateUrl" download="批量导入治疗方案模版.xlsx"> |
|
|
<a :href="exportTemplateUrl" download="批量导入治疗方案模版.xlsx"> |
|
|
<vxe-button status="success" icon="vxe-icon-download" class="mr-10"> |
|
|
|
|
|
|
|
|
<vxe-button status="danger" icon="vxe-icon-download" class="mr-10"> |
|
|
下载数据模板 |
|
|
下载数据模板 |
|
|
</vxe-button> |
|
|
</vxe-button> |
|
|
</a> |
|
|
</a> |
|
@@ -58,9 +59,11 @@ |
|
|
:id="editId" |
|
|
:id="editId" |
|
|
:getTableList="getTableList" |
|
|
:getTableList="getTableList" |
|
|
/> |
|
|
/> |
|
|
|
|
|
<ImportResultPopup ref="importResult" /> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import ImportResultPopup from "@/components/ImportResultPopup"; |
|
|
import AddTherapeuticDialog from "./components/AddTherapeuticDialog.vue"; |
|
|
import AddTherapeuticDialog from "./components/AddTherapeuticDialog.vue"; |
|
|
import { commonGridConfig2 } from "@/config/vxeGrid"; |
|
|
import { commonGridConfig2 } from "@/config/vxeGrid"; |
|
|
import { getAllHospital } from "@/api/dictManage/hosp"; |
|
|
import { getAllHospital } from "@/api/dictManage/hosp"; |
|
@@ -70,6 +73,7 @@ import { |
|
|
getTherapeuticListApi, |
|
|
getTherapeuticListApi, |
|
|
delTherapeuticApi, |
|
|
delTherapeuticApi, |
|
|
batchDelTherapeuticApi, |
|
|
batchDelTherapeuticApi, |
|
|
|
|
|
bathImportTherapeuticApi, |
|
|
} from "@/api/dictManage/therapeutic"; |
|
|
} from "@/api/dictManage/therapeutic"; |
|
|
import { diseasePageList } from "@/api/dictManage/disease"; |
|
|
import { diseasePageList } from "@/api/dictManage/disease"; |
|
|
import { to } from "await-to-js"; |
|
|
import { to } from "await-to-js"; |
|
@@ -78,6 +82,7 @@ export default { |
|
|
components: { |
|
|
components: { |
|
|
TreeDept, |
|
|
TreeDept, |
|
|
AddTherapeuticDialog, |
|
|
AddTherapeuticDialog, |
|
|
|
|
|
ImportResultPopup, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@@ -255,6 +260,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
deptOptions: [], |
|
|
deptOptions: [], |
|
|
|
|
|
uploading: false, |
|
|
visible: false, |
|
|
visible: false, |
|
|
editId: null, |
|
|
editId: null, |
|
|
}; |
|
|
}; |
|
@@ -358,6 +364,21 @@ export default { |
|
|
}) |
|
|
}) |
|
|
.catch(() => {}); |
|
|
.catch(() => {}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 导入 |
|
|
|
|
|
async handleUpload({ file }) { |
|
|
|
|
|
this.uploading = true; |
|
|
|
|
|
try { |
|
|
|
|
|
const res = await bathImportTherapeuticApi(file); |
|
|
|
|
|
if (res.data.successSize > 0) { |
|
|
|
|
|
// 刷新 |
|
|
|
|
|
this.getTableList(); |
|
|
|
|
|
} |
|
|
|
|
|
this.$refs.importResult.open(res.data); |
|
|
|
|
|
} finally { |
|
|
|
|
|
this.$refs.upload.clearFiles(); |
|
|
|
|
|
this.uploading = false; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
// 批量删除 |
|
|
// 批量删除 |
|
|
onBatchDel() { |
|
|
onBatchDel() { |
|
|
this.$modal.confirm("是否确认批量删除?").then(async () => { |
|
|
this.$modal.confirm("是否确认批量删除?").then(async () => { |
|
|