From b819d4835170b190807f8c7c2a7937549ebf16de Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Thu, 9 Nov 2023 13:59:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=A3=E8=80=85=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/basic/sicker/prescribeApi.js | 18 + src/api/basic/sicker/skPersonApi.js | 10 + src/store/modules/permission.js | 4 +- src/views/basic/sicker/skPerson.js | 109 ++++++ src/views/basic/sicker/skPerson.vue | 438 +++++++---------------- src/views/components/prescribe/index.js | 69 ++++ src/views/components/prescribe/index.vue | 7 + 7 files changed, 345 insertions(+), 310 deletions(-) create mode 100644 src/api/basic/sicker/prescribeApi.js create mode 100644 src/api/basic/sicker/skPersonApi.js create mode 100644 src/views/basic/sicker/skPerson.js create mode 100644 src/views/components/prescribe/index.js create mode 100644 src/views/components/prescribe/index.vue diff --git a/src/api/basic/sicker/prescribeApi.js b/src/api/basic/sicker/prescribeApi.js new file mode 100644 index 00000000..0d083c4b --- /dev/null +++ b/src/api/basic/sicker/prescribeApi.js @@ -0,0 +1,18 @@ +import axios from "@/utils/request" + + +export function page(query) { + return axios({ + url: "/udiwms/basic/sk/prescribe/filter", + method: "get", + params: query + }); +} + +export function detail(query) { + return axios({ + url: "/udiwms/basic/sk/prescribe/detail", + method: "get", + params: query + }); +} diff --git a/src/api/basic/sicker/skPersonApi.js b/src/api/basic/sicker/skPersonApi.js new file mode 100644 index 00000000..05ee3ca9 --- /dev/null +++ b/src/api/basic/sicker/skPersonApi.js @@ -0,0 +1,10 @@ +import axios from "@/utils/request" + + +export function page(query) { + return axios({ + url: "/udiwms/basic/sk/sicker/filter", + method: "get", + params: query + }); +} diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index acf853a4..521d96d1 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -123,11 +123,11 @@ export function filterDynamicRoutes(routes) { export const loadView = (view) => { if (process.env.NODE_ENV === 'development') { - return (resolve) => require([`@/views/${view}`], resolve) + return (resolve) => require([`@/views/${view}.vue`], resolve) } else { // 使用 import 实现生产环境的路由懒加载 // return () => import(`@/views/${view}`) - return (resolve) => require([`@/views/${view}`], resolve) + return (resolve) => require([`@/views/${view}.vue`], resolve) } } diff --git a/src/views/basic/sicker/skPerson.js b/src/views/basic/sicker/skPerson.js new file mode 100644 index 00000000..75373d85 --- /dev/null +++ b/src/views/basic/sicker/skPerson.js @@ -0,0 +1,109 @@ +import {page} from "@/api/basic/sicker/skPersonApi"; +import {detail, page as prescribePage} from "@/api/basic/sicker/prescribeApi"; + +let query = { + name: "", + code: "", + adNum: "", + page: 1, + limit: 10 +} + +let prescribeQuery = { + sickerCode: '', + page: 1, + limit: 10 +} + +export default { + data() { + return { + fullscreenLoading:false, + showSearch: true, + filterQuery: {...query}, + editType: "", + formVisible: false, + selectFormVisible: false, + loading: false, + formName: "", + total: 0, + list: [], + // =============患者================= + showSickerDialog:false, + sicker:null, + // =============患者end================ + // ============处方============= + sickerInfo:null, + showPrescribeDetailDialog:false, + prescribeLoading: false, + prescribeList: [], + prescribeTotal: 0, + prescribeQuery: {...prescribeQuery}, + prescribeDetail: null + // ============处方end============= + }; + } + , + mounted() { + }, + created() { + this.getList() + }, + methods: { + onReset() { + this.filterQuery = {...query} + this.getList() + }, + onSubmit() { + this.filterQuery.page = 1; + this.getList() + }, + getList() { + this.loading = true + page(this.filterQuery).then(res => { + this.loading = false + this.list = res.data.list || [] + this.total = res.data.total || 0 + }).catch(() => { + this.loading = false + this.list = [] + this.total = 0 + this.roles = [] + }); + }, + sickerClick(row) { + this.sickerInfo={...row} + this.prescribeQuery = {...prescribeQuery} + this.prescribeQuery.sickerCode = row.code + this.prescribeLoading = true + prescribePage(this.prescribeQuery).then(res => { + this.prescribeLoading = false + this.prescribeList = res.data.list || [] + this.prescribeTotal = res.data.total || 0 + }).catch(()=>{ + this.prescribeLoading = false + this.prescribeList = [] + this.prescribeTotal = 0 + }) + }, + showSickerInfo(row){ + this.sicker = {...row} + this.showSickerDialog = true + }, + showPrescribeDetail(row){ + this.fullscreenLoading = true + detail({prescribeCode:row.code}).then(res=>{ + this.fullscreenLoading = false + if(res.code!=20000){ + this.$message.error(res.message) + return + } + this.prescribeDetail = res.data + this.showPrescribeDetailDialog = true + }).catch (() => { + this.fullscreenLoading = false + this.$message.error("数据加载失败") + }) + } + } +} diff --git a/src/views/basic/sicker/skPerson.vue b/src/views/basic/sicker/skPerson.vue index 982cf63a..de1a024c 100644 --- a/src/views/basic/sicker/skPerson.vue +++ b/src/views/basic/sicker/skPerson.vue @@ -1,42 +1,46 @@ - - - - - - + + + + + + - - - + + + - - - 重置 - 查询 - 新增 - + + + + 显示/隐藏搜索栏 + 重置 + 查询 + + - - - - - - - - + + + + + + + + - 编辑 - 删除 + 患者详情 @@ -46,316 +50,134 @@ :total="total" :limit.sync="filterQuery.limit" :page.sync="filterQuery.page" - @pagination="handleCurrentChange" + @pagination="getList" > - - - - 新增产品 - - - - - - - - - - - - + + {{ '处方信息' + (sickerInfo ? '--' + sickerInfo.name + `(${sickerInfo.code})` : "") }} + + + + + + + + - + {{ scope.row.amount ? '¥' + scope.row.amount : "--" }} - - - + + + - 编辑 - - 保存 + 查看 - 移除 - + + {{ sicker.name }} + {{ sicker.code }} + {{ sicker.gender || "--" }} + {{ sicker.age || "--" }} + {{ sicker.adNum || "--" }} + + + + 关闭 + + - + 患者信息 + + + {{ prescribeDetail.sicker.name }} + {{ prescribeDetail.sicker.code }} + {{ prescribeDetail.sicker.gender || "--" }} + {{ prescribeDetail.sicker.age || "--" }} + + 处方信息 + + + + + {{ prescribeDetail.code }} + {{ prescribeDetail.createDr }} + {{ prescribeDetail.deptName }} + {{ + prescribeDetail.amount ? '¥' + prescribeDetail.amount : "--" + }} + + {{ prescribeDetail.prescribeDate }} + + + {{ prescribeDetail.diagnosis }} + + + + + + + + + + + + + + + + + + + + + + 关闭 + + - - + diff --git a/src/views/components/prescribe/index.js b/src/views/components/prescribe/index.js new file mode 100644 index 00000000..6d964b7d --- /dev/null +++ b/src/views/components/prescribe/index.js @@ -0,0 +1,69 @@ +import {detail, page} from "@/api/basic/sicker/prescribeApi"; + +let prescribeQuery = { + sickerCode: '', + page: 1, + limit: 10 +} + +export default { + data() { + return { + fullscreenLoading:false, + // ============处方============= + sickerInfo:null, + showPrescribeDetailDialog:false, + prescribeLoading: false, + prescribeList: [], + prescribeTotal: 0, + prescribeQuery: {...prescribeQuery}, + prescribeDetail: null + // ============处方end============= + }; + } + , + mounted() { + }, + created() { + this.getList() + }, + methods: { + onReset() { + this.filterQuery = {...query} + this.getList() + }, + onSubmit() { + this.filterQuery.page = 1; + this.getList() + }, + getList() { + this.prescribeQuery = {...prescribeQuery} + this.prescribeQuery.sickerCode = this.sickerInfo?.code + this.prescribeLoading = true + page(this.prescribeQuery).then(res => { + this.prescribeLoading = false + this.prescribeList = res.data.list || [] + this.prescribeTotal = res.data.total || 0 + }).catch(()=>{ + this.prescribeLoading = false + this.prescribeList = [] + this.prescribeTotal = 0 + }) + }, + showPrescribeDetail(row){ + this.fullscreenLoading = true + detail({prescribeCode:row.code}).then(res=>{ + this.fullscreenLoading = false + if(res.code!=20000){ + this.$message.error(res.message) + return + } + this.prescribeDetail = res.data + this.showPrescribeDetailDialog = true + }).catch (() => { + this.fullscreenLoading = false + this.$message.error("数据加载失败") + }) + } + } +} diff --git a/src/views/components/prescribe/index.vue b/src/views/components/prescribe/index.vue new file mode 100644 index 00000000..013e2584 --- /dev/null +++ b/src/views/components/prescribe/index.vue @@ -0,0 +1,7 @@ + + + + + + +