From 5319d5b95497b5b546947ac340c14c71e5b54ca6 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 10 十二月 2025 09:57:58 +0800
Subject: [PATCH] 测试完成
---
src/views/patient/patient/index.vue | 473 ++++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 352 insertions(+), 121 deletions(-)
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index ecdbad6..3092bca 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -1,7 +1,7 @@
<template>
<div class="Questionnairemanagement">
<!-- 宸︿晶鏍� -->
- <div class="sidecolumn">
+ <!-- <div class="sidecolumn">
<div class="sidecolumn-top">
<div class="top-wj">鍖婚櫌鎮h��</div>
</div>
@@ -12,13 +12,12 @@
v-model="queryParams.allhosp"
@tab-click="handleClick"
>
- <!-- <el-tab-pane label="鎮h�呭垪琛�" name="0"></el-tab-pane> -->
<el-tab-pane label="鍑哄叆闄㈡偅鑰�" name="1"></el-tab-pane>
<el-tab-pane label="闂ㄨ瘖鎮h��" name="2"></el-tab-pane>
<el-tab-pane label="浣撴鎮h��" name="3"></el-tab-pane>
</el-tabs>
</div>
- </div>
+ </div> -->
<!-- 鍙充晶鏁版嵁 -->
<div class="leftvlue">
@@ -58,49 +57,6 @@
v-show="showSearch"
label-width="98px"
>
- <!-- <el-form-item label="闄㈠尯" prop="userName">
- <el-select v-model="queryParams.value1" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item> -->
- <!-- <el-form-item label="绉戝/鐥呭尯" prop="userName">
- <el-select v-model="queryParams.value2" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item> -->
- <el-form-item
- label-width="138px"
- label="涓绘不鍖荤敓"
- prop="userName"
- >
- <el-input
- v-model="queryParams.drname"
- placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
- maxlength="30"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
-
- <el-form-item label="闂ㄨ瘖缂栧彿" prop="visitno">
- <el-input
- v-model="queryParams.visitno"
- placeholder="璇疯緭鍏ョ紪鍙�"
- maxlength="30"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
<el-form-item label="鎮h�呭鍚�" prop="name">
<el-input
v-model="queryParams.name"
@@ -109,19 +65,29 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鎮h�呰寖鍥�" prop="tagId">
+ <el-form-item label="鎮h�呮爣绛�" prop="tagname">
+ <el-input
+ v-model="queryParams.tagname"
+ placeholder="杈撳叆杩涜妯$硦鏌ヨ"
+ maxlength="30"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鎮h�呮�у埆" prop="tagId">
<el-select
- v-model="queryParams.searchscope"
- placeholder="璇烽�夋嫨鎮h�呰寖鍥�"
+ v-model="queryParams.sex"
+ placeholder="璇烽�夋嫨鎮h�呮�у埆"
>
- <el-option
- v-for="item in source"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
+ <el-option label="鐢�" :value="1"> </el-option>
+ <el-option label="濂�" :value="2"> </el-option>
</el-select>
+ </el-form-item>
+ <el-form-item label="鎮h�呭勾榫�" prop="telcode">
+ <el-input
+ v-model="queryParams.age"
+ placeholder="璇疯緭鍏ユ煡璇㈠勾榫�"
+ @keyup.enter.native="handleQuery"
+ />
</el-form-item>
<el-form-item label="鑱旂郴鐢佃瘽" prop="telcode">
<el-input
@@ -219,13 +185,6 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
- <!-- <el-table-column
- fixed
- label="搴忓彿"
- align="center"
- key="id"
- prop="id"
- /> -->
<el-table-column
fixed
label="濮撳悕"
@@ -233,6 +192,14 @@
key="name"
prop="name"
/>
+ <el-table-column
+ label="鎮h�呯紪鍙�"
+ align="center"
+ key="patientno"
+ prop="patientno"
+ width="180"
+ />
+
<el-table-column label="鎬у埆" align="center" key="sex" prop="sex">
<template slot-scope="scope">
<span>{{ scope.row.sex == 1 ? "鐢�" : "濂�" }}</span>
@@ -243,8 +210,16 @@
align="center"
key="age"
prop="age"
- width="60"
- />
+ width="160"
+ >
+ <template slot-scope="scope">
+ <span v-if="scope.row.age"
+ >{{ scope.row.age }}{{ scope.row.ageUnit }}</span
+ ><span v-if="scope.row.age2"
+ >{{ scope.row.age2 }}{{ scope.row.ageUnit2 }}</span
+ >
+ </template>
+ </el-table-column>
<el-table-column
label="鍑虹敓骞存湀"
align="center"
@@ -340,14 +315,14 @@
><i class="el-icon-edit"></i>鎮h�呰繃婊�</span
></el-button
>
- <!-- <el-button
+ <el-button
size="medium"
type="text"
- @click="Distributionservice(scope.row)"
+ @click="openContractDialog(scope.row)"
><span class="button-textxg"
- ><i class="el-icon-menu"></i>鏈嶅姟</span
+ ><i class="el-icon-menu"></i>鎮h�呯绾�</span
></el-button
- > -->
+ >
<!-- <el-button
size="medium"
type="text"
@@ -765,20 +740,123 @@
</div>
</el-dialog>
<!-- 璺宠浆鏈嶅姟瀵硅瘽妗� -->
- <el-dialog title="閫夋嫨鏈嶅姟绫诲瀷" :visible.sync="serviceVisible">
- <el-card class="box-card">
- <el-radio-group v-model="serviceradio">
- <el-radio :label="1">瀹f暀闅忚</el-radio>
- <el-radio :label="2">闂ㄨ瘖鏈嶅姟</el-radio>
- <el-radio :label="3">鍑洪櫌鏈嶅姟</el-radio>
- <el-radio :label="4">澶嶈瘖鏈嶅姟</el-radio>
- <el-radio :label="5">浣撴閫氱煡</el-radio>
- <el-radio :label="6">闂嵎鏈嶅姟</el-radio>
+ <!-- 绠�鍖栫増鎮h�呯绾﹀璇濇 -->
+ <el-dialog
+ title="鎮h�呯绾︽湇鍔�"
+ :visible.sync="contractDialogVisible"
+ width="600px"
+ >
+ <!-- 姝ラ鎸囩ず鍣� -->
+ <el-steps
+ :active="contractStep"
+ align-center
+ simple
+ style="margin-bottom: 20px"
+ >
+ <el-step title="閫夋嫨鏈嶅姟" icon="el-icon-document"></el-step>
+ <el-step title="纭绛剧害" icon="el-icon-finished"></el-step>
+ </el-steps>
+
+ <!-- 姝ラ1: 鏈嶅姟閫夋嫨 -->
+ <div v-if="contractStep === 1" class="step-content">
+ <h4>璇蜂负 {{ currentPatient.name }} 閫夋嫨绛剧害鏈嶅姟濂楅锛�</h4>
+
+ <el-radio-group
+ v-model="tempContractData.servicePackage"
+ style="width: 100%"
+ >
+ <el-row :gutter="16">
+ <el-col :span="8" v-for="pkg in servicePackages" :key="pkg.id">
+ <el-card
+ :class="[
+ 'package-card',
+ { active: tempContractData.servicePackage === pkg.id },
+ ]"
+ @click.native="tempContractData.servicePackage = pkg.id"
+ shadow="hover"
+ style="margin-bottom: 16px; cursor: pointer"
+ >
+ <div style="text-align: center">
+ <h4>{{ pkg.name }}</h4>
+ <p style="color: #666; font-size: 12px; margin: 8px 0">
+ {{ pkg.description }}
+ </p>
+ <p style="color: #e6a23c; font-weight: bold">
+ {{ pkg.price > 0 ? `楼${pkg.price}/骞碻 : "鍏嶈垂" }}
+ </p>
+ <el-tag
+ v-for="feature in pkg.features"
+ :key="feature"
+ size="mini"
+ style="margin: 2px"
+ type="info"
+ >{{ feature }}</el-tag
+ >
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
</el-radio-group>
- </el-card>
+
+ <el-form label-width="80px" style="margin-top: 20px">
+ <el-form-item label="绛剧害鍛ㄦ湡">
+ <el-select
+ v-model="tempContractData.contractPeriod"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option label="1骞�" :value="1"></el-option>
+ <el-option label="2骞�" :value="2"></el-option>
+ <el-option label="3骞�" :value="3"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="澶囨敞淇℃伅">
+ <el-input
+ type="textarea"
+ :rows="2"
+ v-model="tempContractData.remark"
+ placeholder="鍙~鍐欑壒娈婂仴搴烽渶姹傛垨澶囨敞淇℃伅"
+ ></el-input>
+ </el-form-item>
+ </el-form>
+ </div>
+
+ <!-- 姝ラ2: 绛剧害纭 -->
+ <div v-if="contractStep === 2" class="step-content">
+ <el-card>
+ <h4>绛剧害淇℃伅纭</h4>
+ <el-descriptions :column="1" border>
+ <el-descriptions-item label="鎮h�呭鍚�">{{
+ currentPatient.name
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鎮h�呯紪鍙�">{{
+ currentPatient.patientno
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鏈嶅姟濂楅">
+ {{ getSelectedPackage().name }}
+ </el-descriptions-item>
+ <el-descriptions-item label="绛剧害鍛ㄦ湡"
+ >{{ tempContractData.contractPeriod }}骞�</el-descriptions-item
+ >
+ <el-descriptions-item label="绛剧害鏃ユ湡">{{
+ new Date().toLocaleDateString()
+ }}</el-descriptions-item>
+ <el-descriptions-item label="澶囨敞淇℃伅">{{
+ tempContractData.remark || "鏃�"
+ }}</el-descriptions-item>
+ </el-descriptions>
+ </el-card>
+ </div>
+
<div slot="footer" class="dialog-footer">
- <el-button @click="serviceVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="CreateService">鍒涘缓鏈嶅姟</el-button>
+ <el-button @click="prevStep" v-if="contractStep > 1">涓婁竴姝�</el-button>
+ <el-button @click="closeContractDialog">鍙栨秷</el-button>
+ <el-button
+ type="primary"
+ @click="nextStep"
+ :disabled="contractStep === 1 && !tempContractData.servicePackage"
+ >
+ {{ contractStep === 2 ? "纭绛剧害" : "涓嬩竴姝�" }}
+ </el-button>
</div>
</el-dialog>
<!-- 椋庨櫓绫诲瀷 -->
@@ -873,20 +951,87 @@
serviceradio: 1,
distributeVisible: false,
RiskVisible: false,
- tasktopic: "5", //鏂板绫诲瀷
+ tasktopic: "2", //鏂板绫诲瀷
Riskradio: 1,
RiskObj: {},
// 鏌ヨ鍙傛暟
topqueryParams: {
pageNum: 1,
pageSize: 10,
+ type: 2,
userName: undefined,
tagid: undefined,
topic: undefined,
},
// 鏃ユ湡鑼冨洿
dateRange: [],
- taskoptions: [],
+ contractDialogVisible: false, // 鎺у埗绛剧害瀵硅瘽妗嗘樉绀�
+ contractStep: 1, // 绛剧害姝ラ锛�1-閫夋嫨鏈嶅姟 2-纭淇℃伅
+ currentPatient: {}, // 褰撳墠绛剧害鐨勬偅鑰呬俊鎭�
+ tempContractData: {
+ // 涓存椂瀛樺偍鐨勭绾︽暟鎹�
+ servicePackage: null, // 閫変腑鐨勬湇鍔″椁�
+ contractPeriod: 1, // 绛剧害鍛ㄦ湡锛堝勾锛�
+ remark: "", // 澶囨敞淇℃伅
+ },
+ // 妯℃嫙鏁版嵁锛氬彲閫夌殑绛剧害鏈嶅姟濂楅
+ servicePackages: [
+ {
+ id: 1,
+ name: "鍩虹鍋ュ悍绠$悊鍖�",
+ description: "鍖呭惈瀹氭湡鍋ュ悍璇勪及銆佸熀鏈挩璇�",
+ price: 0,
+ features: ["骞村害鍋ュ悍璇勪及", "鍦ㄧ嚎鍜ㄨ"],
+ },
+ {
+ id: 2,
+ name: "鎱㈡�х梾绠$悊鍖�",
+ description: "涓撲负鎱㈡�х梾鎮h�呰璁�",
+ price: 299,
+ features: ["涓撳睘鍖荤敓", "鐢ㄨ嵂鎻愰啋", "瀹氭湡闅忚"],
+ },
+ {
+ id: 3,
+ name: "鑰佸勾浜哄仴搴峰寘",
+ description: "鍏虫敞鑰佸勾浜哄仴搴烽棶棰�",
+ price: 499,
+ features: ["璺屽�掗闄╄瘎浼�", "搴峰鎸囧", "绱ф�ヨ仈绯�"],
+ },
+ ],
+ taskoptions: [
+ // {
+ // value: "1",
+ // label: "鐩戞祴璇勪及",
+ // },
+ {
+ value: "2",
+ label: "鍑洪櫌闅忚",
+ },
+ {
+ value: "3",
+ label: "闂ㄨ瘖闅忚",
+ },
+ {
+ value: "4",
+ label: "瀹f暀鍏虫��",
+ },
+ {
+ value: "5",
+ label: "澶嶈瘖绠$悊",
+ },
+ // {
+ // value: "6",
+ // label: "婊℃剰搴﹁皟鏌�",
+ // },
+ {
+ value: "7",
+ label: "鎮h�呮姤鍛�",
+ },
+ {
+ value: "8",
+ label: "鍏朵粬閫氱煡",
+ },
+ ],
paperstypes: [
{ papersname: "韬唤璇�" },
{ papersname: "鎶ょ収" },
@@ -996,9 +1141,12 @@
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
- allhosp: "1",
+ allhosp: "0",
+ sex: 1,
pageSize: 10,
searchscope: 2,
+ notrequiredFlag: 0,
+ tagname: "",
idcardno: undefined,
name: undefined,
status: undefined,
@@ -1056,8 +1204,12 @@
created() {
this.getList();
this.gettabList();
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
//鑾峰彇宸茬瓫閫夊悗鐨勫彲閫変换鍔$被鍨�
- this.taskoptions = store.getters.Serviceauthority;
},
methods: {
/** 鏌ヨ鎮h�呭垪琛� */
@@ -1115,12 +1267,80 @@
this.loading = false;
});
},
- Distributionservice(row) {
- this.serviceVisible = true;
+ openContractDialog(row) {
+ this.currentPatient = { ...row }; // 璁剧疆褰撳墠鎮h��
+ this.contractDialogVisible = true;
+ this.contractStep = 1;
+ // 閲嶇疆琛ㄥ崟鏁版嵁
+ this.tempContractData = {
+ servicePackage: null,
+ contractPeriod: 1,
+ remark: "",
+ };
+ },
+ // 涓嬩竴姝ユ搷浣�
+ nextStep() {
+ if (this.contractStep < 2) {
+ this.contractStep++;
+ } else {
+ this.submitContract();
+ }
+ },
+
+ // 涓婁竴姝ユ搷浣�
+ prevStep() {
+ if (this.contractStep > 1) {
+ this.contractStep--;
+ }
+ },
+ // 鑾峰彇閫変腑鐨勬湇鍔″椁愪俊鎭�
+ getSelectedPackage() {
+ return (
+ this.servicePackages.find(
+ (pkg) => pkg.id === this.tempContractData.servicePackage
+ ) || {}
+ );
+ },
+
+ // 妯℃嫙鎻愪氦绛剧害淇℃伅
+ submitContract() {
+ // 杩欓噷鏄墠绔ā鎷熸搷浣滐紝瀹為檯寮�鍙戜腑搴旈�氳繃API鎻愪氦鏁版嵁
+ const contractInfo = {
+ patientId: this.currentPatient.id,
+ patientName: this.currentPatient.name,
+ package: this.getSelectedPackage(),
+ period: this.tempContractData.contractPeriod,
+ signDate: new Date().toISOString().split("T")[0],
+ remark: this.tempContractData.remark,
+ };
+
+ console.log("妯℃嫙绛剧害鏁版嵁:", contractInfo);
+
+ // 妯℃嫙鎴愬姛鎻愮ず
+ this.$message.success(
+ `宸叉垚鍔熶负 ${this.currentPatient.name} 绛剧害 ${
+ this.getSelectedPackage().name
+ }`
+ );
+
+ // 鍏抽棴瀵硅瘽妗�
+ this.closeContractDialog();
+
+ // 鍙互鍦ㄨ繖閲岃Е鍙戝叾浠栨搷浣滐紝濡傚埛鏂版偅鑰呭垪琛ㄧ瓑
+ },
+ // 鍏抽棴瀵硅瘽妗嗗苟閲嶇疆鐘舵��
+ closeContractDialog() {
+ this.contractDialogVisible = false;
+ this.contractStep = 1;
+ this.tempContractData = {
+ servicePackage: null,
+ contractPeriod: 1,
+ remark: "",
+ };
},
RiskMarker(row) {
this.RiskVisible = true;
- this.RiskObj=row;
+ this.RiskObj = row;
},
// 鍙栨秷鎸夐挳
@@ -1150,8 +1370,12 @@
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
this.dateRange = [];
- this.resetForm("queryForm");
- this.$refs.tree.setCurrentKey(null);
+ this.queryParams = {
+ pageNum: 1,
+ allhosp: "0",
+ pageSize: 10,
+ searchscope: 2,
+ };
this.handleQuery();
},
// 澶氶�夋閫変腑鏁版嵁
@@ -1169,13 +1393,12 @@
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
- const userIds = row.id || this.ids;
- particularpatient(userIds).then((response) => {
- console.log(response);
- this.form = response.data;
- });
- this.amendtag = true;
- this.Labelchange = true;
+ // const userIds = row.id || this.ids;
+ // particularpatient(userIds).then((response) => {
+ // this.form = response.data;
+ // });
+ // this.amendtag = true;
+ // this.Labelchange = true;
},
//淇敼/鏂板鎮h��
submitForm() {
@@ -1232,37 +1455,33 @@
});
},
RiskService() {
-
this.RiskObj.visitFlag = this.Risklist.join(", ");
this.RiskObj.visitType = this.Riskradio;
alterpatient(this.RiskObj).then((res) => {
- if (res.code==200) {
+ if (res.code == 200) {
this.getList();
- this.Risklist=[];
- this.Riskradio=1;
+ this.Risklist = [];
+ this.Riskradio = 1;
this.$modal.msgSuccess("寮傚父璁板綍鎴愬姛");
}
});
},
distribute() {
this.distributeVisible = true;
- if (this.tasktopic == 1) {
- this.topqueryParams.type = 3;
- } else if (this.tasktopic == 2) {
- this.topqueryParams.type = 1;
- } else if (this.tasktopic == 3) {
- this.topqueryParams.type = 1;
- } else if (this.tasktopic == 4) {
- this.topqueryParams.type = 1;
+ if (
+ this.tasktopic == 2 ||
+ this.tasktopic == 3 ||
+ this.tasktopic == 1 ||
+ this.tasktopic == 7 ||
+ this.tasktopic == 6
+ ) {
+ this.topqueryParams.type = "2";
+ } else if (this.tasktopic == 4 || this.tasktopic == 8) {
+ this.topqueryParams.type = "3";
} else if (this.tasktopic == 5) {
- this.topqueryParams.type = 1;
- } else if (this.tasktopic == 6) {
- this.topqueryParams.type = 2;
+ this.topqueryParams.type = "1";
}
- this.topqueryParams.typename = this.findLabelByValue(
- this.taskoptions,
- this.tasktopic
- );
+ this.topqueryParams.serviceType = Number(this.tasktopic);
getTasklist(this.topqueryParams).then((response) => {
this.taskuserList = response.rows;
this.tasktotal = response.total;
@@ -1329,9 +1548,9 @@
</script>
<style lang="scss" scoped>
-.Questionnairemanagement {
- display: flex;
-}
+// .Questionnairemanagement {
+// display: flex;
+// }
.sidecolumn {
width: 180px;
min-height: 100vh;
@@ -1367,6 +1586,18 @@
margin-top: 30px;
display: center !important;
}
+}
+.package-card.active {
+ border-color: #409EFF;
+ background-color: #f0f9ff;
+}
+
+.step-content {
+ min-height: 300px;
+}
+
+.dialog-footer {
+ text-align: right;
}
.preview-left {
margin: 20px;
@@ -1411,8 +1642,8 @@
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
.leftvlue {
- width: 80%;
- margin-top: 10px;
+ width: 100%;
+ // margin-top: 10px;
}
.leftvlue-bg {
// display: flex;
--
Gitblit v1.9.3