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/physical/index.vue | 119 +
dist (2).zip | 0
vue.config.js | 3
src/views/patient/SignAcontract/index.vue | 512 +++++
src/views/patient/patient/index.vue | 362 +++
src/views/knowledge/article/index.vue | 169 +
src/views/patient/SignAcontract/Review.vue | 827 ++++++++
src/views/knowledge/Medication/index.vue | 901 +++++++++
src/views/system/group/index.vue | 1473 ++++++++++++--
wx.zip | 0
package.json | 4
src/views/patient/patient/profile/index.vue | 987 ++++++++++
src/views/followvisit/discharge/index.vue | 290 ++
13 files changed, 5,221 insertions(+), 426 deletions(-)
diff --git "a/dist \0502\051.zip" "b/dist \0502\051.zip"
new file mode 100644
index 0000000..d118d32
--- /dev/null
+++ "b/dist \0502\051.zip"
Binary files differ
diff --git a/package.json b/package.json
index 7502727..7df6d38 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
"@vue/babel-plugin-jsx": "^1.1.5",
"@vue/composition-api": "^1.0.0-rc.6",
"axios": "0.24.0",
- "clipboard": "2.0.8",
+ "clipboard": "^2.0.11",
"codemirror": "^5.65.13",
"core-js": "^3.25.3",
"cos-js-sdk-v5": "^1.4.18",
@@ -61,6 +61,7 @@
"lemon-imui": "^1.7.7",
"moment": "^2.30.1",
"nprogress": "0.2.0",
+ "qrcode": "^1.5.4",
"quill": "1.3.7",
"quill-image-drop-module": "^1.0.3",
"quill-image-resize": "^3.0.9",
@@ -78,6 +79,7 @@
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-meta": "2.4.0",
+ "vue-qr": "^4.0.9",
"vue-quill-editor": "^3.0.6",
"vue-router": "3.4.9",
"vue-sweetalert2": "^5.0.11",
diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index e2b7bf9..30ff0d7 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -121,13 +121,13 @@
</el-select>
</el-form-item>
<el-form-item label="鎮h�呮爣绛�" prop="tagname">
- <el-input
- v-model="topqueryParams.tagname"
- placeholder="杈撳叆杩涜妯$硦鏌ヨ"
- maxlength="30"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
+ <el-input
+ v-model="topqueryParams.tagname"
+ placeholder="杈撳叆杩涜妯$硦鏌ヨ"
+ maxlength="30"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
<el-form-item>
<el-button
@@ -303,13 +303,13 @@
</template>
</el-table-column>
<el-table-column
- label="鏍囩"
- align="center"
- key="tagname"
- prop="tagname"
- show-overflow-tooltip
- width="180"
- />
+ label="鏍囩"
+ align="center"
+ key="tagname"
+ prop="tagname"
+ show-overflow-tooltip
+ width="180"
+ />
<el-table-column
label="闅忚浜哄憳"
align="center"
@@ -532,6 +532,11 @@
><i class="el-icon-s-order"></i>鏌ョ湅璇︽儏</span
></el-button
>
+ <el-button size="medium" type="text" @click="outPathQr(scope.row)"
+ ><span class="button-qr"
+ ><i class="el-icon-view"></i>浜岀淮鐮�</span
+ ></el-button
+ >
</template>
</el-table-column>
</el-table>
@@ -673,6 +678,55 @@
>
</span>
</el-dialog>
+ <!-- 浜岀淮鐮� -->
+ <el-dialog
+ :title="qrDialog.title"
+ :visible.sync="qrDialog.visible"
+ width="400px"
+ center
+ @close="handleQrClose"
+ >
+ <div class="qrcode-container">
+ <!-- 鍔犺浇鐘舵�� -->
+ <div v-if="qrLoading" class="qrcode-loading">
+ <i class="el-icon-loading"></i>
+ <span>浜岀淮鐮佺敓鎴愪腑...</span>
+ </div>
+
+ <!-- 鏈夋湁鏁堟暟鎹椂鏄剧ず浜岀淮鐮� -->
+ <div v-else-if="safeQrUrl" class="qrcode-content">
+ <vue-qr
+ :text="safeQrUrl"
+ :size="280"
+ :margin="10"
+ :logoSrc="qrDialog.logo"
+ :logoScale="0.2"
+ colorDark="#191a23"
+ colorLight="#ffffff"
+ ></vue-qr>
+
+ <div class="qrcode-info">
+ <p><strong>鎮h�呭鍚嶏細</strong>{{ qrDialog.patientName }}</p>
+ <p><strong>浠诲姟鍚嶇О锛�</strong>{{ qrDialog.taskName }}</p>
+ </div>
+
+ <div class="qrcode-actions">
+ <el-button type="primary" size="small" @click="downloadQrCode">
+ <i class="el-icon-download"></i> 涓嬭浇浜岀淮鐮�
+ </el-button>
+ <el-button type="success" size="small" @click="copyQrUrl">
+ <i class="el-icon-document-copy"></i> 澶嶅埗閾炬帴
+ </el-button>
+ </div>
+ </div>
+
+ <!-- 鏃犳暟鎹彁绀� -->
+ <div v-else class="qrcode-empty">
+ <i class="el-icon-warning"></i>
+ <span>鏆傛棤鏈夋晥鐨勪簩缁寸爜閾炬帴</span>
+ </div>
+ </div>
+ </el-dialog>
</div>
</template>
@@ -690,11 +744,12 @@
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-
+import VueQr from "vue-qr";
+import Clipboard from "clipboard";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect, VueQr },
data() {
return {
// 閬僵灞�
@@ -717,6 +772,7 @@
addalteropen: false,
// 淇敼鍙戦�佹椂闂村璇濇
modificationVisible: false,
+ resetQrurl: "",
// 閮ㄩ棬鍚嶇О
deptName: undefined,
// 榛樿瀵嗙爜
@@ -746,7 +802,15 @@
},
value: [],
list: [],
-
+ qrDialog: {
+ visible: false,
+ title: "闅忚浜岀淮鐮�",
+ url: "",
+ patientName: "",
+ taskName: "",
+ logo: require("@/assets/logo/logoxh.png"), // 鍙�夌殑Logo锛岃纭繚璺緞姝g‘
+ },
+ qrLoading: false,
sourcetype: [
{
value: 1,
@@ -888,8 +952,13 @@
});
if (store.getters.belongWards.length) {
- this.topqueryParams.leavehospitaldistrictcodes=[store.getters.belongWards[0].districtCode]
- this.topqueryParams.scopetype=[2,store.getters.belongWards[0].districtCode]
+ this.topqueryParams.leavehospitaldistrictcodes = [
+ store.getters.belongWards[0].districtCode,
+ ];
+ this.topqueryParams.scopetype = [
+ 2,
+ store.getters.belongWards[0].districtCode,
+ ];
}
if (this.errtype) {
this.toleadExport(2);
@@ -902,6 +971,13 @@
},
activated() {
this.getList(1);
+ },
+ computed: {
+ safeQrUrl() {
+ return this.qrDialog.url && this.qrDialog.url !== 'undefined'
+ ? this.qrDialog.url.toString()
+ : ''
+ }
},
methods: {
/** 鏌ヨ闂ㄨ瘖闅忚鏈嶅姟鍒楄〃 */
@@ -987,7 +1063,8 @@
let obj = {
pageNum: 1,
pageSize: 10,
- leavehospitaldistrictcodes: this.topqueryParams.leavehospitaldistrictcodes,
+ leavehospitaldistrictcodes:
+ this.topqueryParams.leavehospitaldistrictcodes,
sendstates: [2, 3],
leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
};
@@ -1293,6 +1370,122 @@
}
this.handleQuery();
},
+ // 鏄剧ず浜岀淮鐮佸脊妗�
+ outPathQr(row) {
+ console.log(row);
+
+ if (!row || !row.outPath || row.outPath === 'undefined') {
+ this.$message.warning('璇ヨ褰曟殏鏃犳湁鏁堢殑浜岀淮鐮侀摼鎺�')
+ return
+ }
+
+ this.qrLoading = true
+ this.qrDialog = {
+ visible: true,
+ title: `${row.sendname || '鎮h��'}鐨勯殢璁夸簩缁寸爜`,
+ url: row.outPath,
+ patientName: row.sendname || '鏈煡',
+ taskName: row.taskName || '鏈煡浠诲姟',
+ logo: require("@/assets/logo/logoxh.png"),
+ };
+ // 纭繚缁勪欢鏈夎冻澶熸椂闂存覆鏌�
+ this.$nextTick(() => {
+ this.qrLoading = false
+ })
+ },
+
+ // 浜岀淮鐮佺敓鎴愬洖璋�
+ qrCodeCallback(dataUrl, id) {
+ console.log("浜岀淮鐮佺敓鎴愭垚鍔�:", id);
+ // 杩欓噷鍙互淇濆瓨dataUrl鐢ㄤ簬鍚庣画鎿嶄綔
+ },
+
+ // 涓嬭浇浜岀淮鐮�
+ downloadQrCode() {
+ try {
+ const qrComponent = this.$refs.vueQr;
+ // 鑾峰彇浜岀淮鐮佸浘鐗囩殑URL
+ const qrImageUrl = qrComponent.$el.src;
+
+ const downloadLink = document.createElement("a");
+ downloadLink.href = qrImageUrl;
+ downloadLink.download = `闅忚浜岀淮鐮乢${
+ this.qrDialog.patientName
+ }_${new Date().getTime()}.png`;
+ document.body.appendChild(downloadLink);
+ downloadLink.click();
+ document.body.removeChild(downloadLink);
+
+ this.$message.success("浜岀淮鐮佷笅杞芥垚鍔�");
+ } catch (error) {
+ console.error("涓嬭浇澶辫触:", error);
+ this.$message.error("涓嬭浇澶辫触锛岃閲嶈瘯");
+ }
+ },
+
+ // 澶嶅埗閾炬帴
+ copyQrUrl() {
+ if (!this.qrDialog.url) {
+ this.$message.warning("鏃犳湁鏁堥摼鎺ュ彲澶嶅埗");
+ return;
+ }
+
+ // 鏂规硶1: 浣跨敤clipboard搴擄紙濡傛灉瀹夎浜嗭級
+ // this.copyWithClipboard()
+
+ // 鏂规硶2: 浣跨敤鐜颁唬娴忚鍣ㄧ殑Clipboard API
+ this.copyWithModernAPI();
+ },
+
+ // 浣跨敤鐜颁唬Clipboard API澶嶅埗
+ async copyWithModernAPI() {
+ try {
+ await navigator.clipboard.writeText(this.qrDialog.url);
+ this.$message.success("閾炬帴宸插鍒跺埌鍓创鏉�");
+ } catch (error) {
+ // 闄嶇骇鏂规
+ this.copyWithFallback();
+ }
+ },
+
+ // 鍏煎鎬ч檷绾ф柟妗�
+ copyWithFallback() {
+ const textArea = document.createElement("textarea");
+ textArea.value = this.qrDialog.url;
+ textArea.style.position = "fixed";
+ textArea.style.left = "-999999px";
+ textArea.style.top = "-999999px";
+ document.body.appendChild(textArea);
+ textArea.focus();
+ textArea.select();
+
+ try {
+ document.execCommand("copy");
+ this.$message.success("閾炬帴宸插鍒跺埌鍓创鏉�");
+ } catch (error) {
+ this.$message.warning("娴忚鍣ㄤ笉鏀寔鑷姩澶嶅埗锛岃鎵嬪姩澶嶅埗閾炬帴");
+ } finally {
+ document.body.removeChild(textArea);
+ }
+ },
+
+ // 鍏抽棴浜岀淮鐮佸脊妗�
+ handleQrClose() {
+ this.qrDialog.visible = false;
+ this.qrLoading = false
+
+ // 閲嶇疆鏁版嵁
+ setTimeout(() => {
+ this.qrDialog = {
+ visible: false,
+ title: "闅忚浜岀淮鐮�",
+ url: "",
+ patientName: "",
+ taskName: "",
+ logo: require("@/assets/logo/logoxh.png"),
+ };
+ }, 300);
+ },
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
this.topqueryParams.pageNum = null;
@@ -1457,6 +1650,12 @@
border-radius: 1px;
color: #ffffff;
}
+.button-qr {
+ background: #6c14a2;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
::v-deep.el-radio-group {
span {
@@ -1464,10 +1663,49 @@
}
}
-// 閫夐」瀛椾綋鏀惧ぇ
-// ::v-deep.el-checkbox-group {
-// span {
-// font-size: 24px;
-// }
-// }
+/* 浜岀淮鐮佸脊妗嗘牱寮� */
+.qrcode-container {
+ text-align: center;
+ padding: 10px;
+}
+
+.qrcode-wrapper {
+ margin: 0 auto 20px;
+ padding: 15px;
+ background: #f8f9fa;
+ border-radius: 8px;
+ display: inline-block;
+}
+
+.qrcode-info {
+ margin: 15px 0;
+ padding: 12px;
+ background: #f0f2f5;
+ border-radius: 6px;
+ text-align: left;
+}
+
+.qrcode-info p {
+ margin: 8px 0;
+ font-size: 14px;
+}
+
+.qrcode-actions {
+ display: flex;
+ justify-content: center;
+ gap: 12px;
+ margin-top: 20px;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 480px) {
+ .qrcode-actions {
+ flex-direction: column;
+ align-items: center;
+ }
+
+ .qrcode-actions .el-button {
+ width: 200px;
+ }
+}
</style>
diff --git a/src/views/knowledge/Medication/index.vue b/src/views/knowledge/Medication/index.vue
new file mode 100644
index 0000000..c8cdd8a
--- /dev/null
+++ b/src/views/knowledge/Medication/index.vue
@@ -0,0 +1,901 @@
+<template>
+ <div class="patient-medication-management">
+ <el-row :gutter="20">
+ <el-col :span="24" :xs="24">
+ <!-- 鎼滅储鍖哄煙 -->
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+ <el-form-item label="鎮h�呭鍚�" prop="patientName">
+ <el-input
+ v-model="queryParams.patientName"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鑽搧鍚嶇О" prop="drugName">
+ <el-input
+ v-model="queryParams.drugName"
+ placeholder="璇疯緭鍏ヨ嵂鍝佸悕绉�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鐢ㄨ嵂鐘舵��" prop="medicationStatus">
+ <el-select v-model="queryParams.medicationStatus" placeholder="璇烽�夋嫨鐘舵��" clearable style="width: 200px">
+ <el-option
+ v-for="item in statusOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" size="medium" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" size="medium" @click="resetQuery">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ plain
+ icon="el-icon-plus"
+ size="medium"
+ @click="handleAssignMedication"
+ >鍒嗛厤鐢ㄨ嵂</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-close"
+ size="medium"
+ :disabled="multiple"
+ @click="handleStopMedication"
+ >鍋滄鐢ㄨ嵂</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-delete"
+ size="medium"
+ :disabled="multiple"
+ @click="handleDelete"
+ >鍒犻櫎璁板綍</el-button>
+ </el-col>
+ </el-row>
+
+ <!-- 鏁版嵁琛ㄦ牸 -->
+ <el-table v-loading="loading" :data="medicationList" @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="50" align="center" />
+ <el-table-column label="璁板綍ID" align="center" prop="id" width="80" />
+ <el-table-column label="鎮h�呬俊鎭�" align="center" width="200">
+ <template slot-scope="scope">
+ <div class="patient-info">
+ <div class="patient-name">{{ scope.row.patientName }}</div>
+ <div class="patient-details">
+ {{ scope.row.patientAge }}宀� / {{ scope.row.patientGender === '1' ? '鐢�' : '濂�' }} / {{ scope.row.patientNo }}
+ </div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="杩囨晱淇℃伅" align="center" width="120">
+ <template slot-scope="scope">
+ <el-tag
+ v-if="scope.row.allergyHistory"
+ type="danger"
+ size="small"
+ @click="showAllergyDetail(scope.row)"
+ >鏈夎繃鏁忓彶</el-tag>
+ <span v-else class="no-allergy">鏃�</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鑽搧淇℃伅" align="center" min-width="200">
+ <template slot-scope="scope">
+ <div class="drug-info">
+ <div class="drug-name">{{ scope.row.drugName }} ({{ scope.row.drugSpecification }})</div>
+ <div class="dosage-info">{{ scope.row.dosage }} {{ scope.row.dosageUnit }} / 娆�</div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢ㄦ硶鐢ㄩ噺" align="center" width="150">
+ <template slot-scope="scope">
+ <div class="usage-info">
+ <div>{{ scope.row.frequency }}娆�/鏃�</div>
+ <div>{{ scope.row.usageMethod }}</div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢ㄨ嵂鏃堕棿" align="center" width="200">
+ <template slot-scope="scope">
+ <div class="time-info">
+ <div>寮�濮�: {{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</div>
+ <div v-if="scope.row.endTime">缁撴潫: {{ parseTime(scope.row.endTime, '{y}-{m}-{d}') }}</div>
+ <div v-else>闀挎湡鐢ㄨ嵂</div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢ㄨ嵂鐘舵��" align="center" width="100">
+ <template slot-scope="scope">
+ <el-tag
+ :type="getStatusTagType(scope.row.medicationStatus)"
+ size="small"
+ >
+ {{ getStatusText(scope.row.medicationStatus) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔鍖荤敓" align="center" width="120" prop="prescribingDoctor" />
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="200">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleUpdate(scope.row)"
+ >淇敼</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-close"
+ :class="{ 'stop-button': scope.row.medicationStatus === '1' }"
+ @click="handleSingleStop(scope.row)"
+ :disabled="scope.row.medicationStatus === '0'"
+ >{{ scope.row.medicationStatus === '1' ? '鍋滄' : '宸插仠姝�' }}</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-view"
+ @click="handleViewDetail(scope.row)"
+ >璇︽儏</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-col>
+ </el-row>
+
+ <!-- 鍒嗛厤鐢ㄨ嵂瀵硅瘽妗� -->
+ <el-dialog :title="assignTitle" :visible.sync="assignOpen" width="900px" append-to-body>
+ <el-form ref="assignForm" :model="assignForm" :rules="assignRules" label-width="100px">
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="閫夋嫨鎮h��" prop="patientId">
+ <el-select
+ v-model="assignForm.patientId"
+ placeholder="璇烽�夋嫨鎮h��"
+ filterable
+ @change="handlePatientChange"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="patient in patientOptions"
+ :key="patient.id"
+ :label="`${patient.name} (${patient.patientNo})`"
+ :value="patient.id"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎮h�呬俊鎭�">
+ <div v-if="selectedPatient" class="patient-detail">
+ <div>濮撳悕: {{ selectedPatient.name }}</div>
+ <div>骞撮緞: {{ selectedPatient.age }}宀�</div>
+ <div>鐥呭巻鍙�: {{ selectedPatient.patientNo }}</div>
+ <div v-if="selectedPatient.allergyHistory" class="allergy-warning">
+ 杩囨晱鍙�: {{ selectedPatient.allergyHistory }}
+ </div>
+ </div>
+ <span v-else class="placeholder">璇峰厛閫夋嫨鎮h��</span>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="鑽搧鍚嶇О" prop="drugId">
+ <el-select
+ v-model="assignForm.drugId"
+ placeholder="璇烽�夋嫨鑽搧"
+ filterable
+ @change="handleDrugChange"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="drug in drugOptions"
+ :key="drug.id"
+ :label="drug.name"
+ :value="drug.id"
+ >
+ <span>{{ drug.name }}</span>
+ <span style="float: right; color: #8492a6; font-size: 13px">
+ {{ drug.specification }} | 搴撳瓨: {{ drug.stock }}
+ </span>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鑽搧瑙勬牸">
+ <el-input v-model="selectedDrug.specification" readonly />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <el-form-item label="鍗曟鍓傞噺" prop="dosage">
+ <el-input-number
+ v-model="assignForm.dosage"
+ :min="0.1"
+ :max="10"
+ :step="0.1"
+ controls-position="right"
+ style="width: 100%"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鍓傞噺鍗曚綅" prop="dosageUnit">
+ <el-select v-model="assignForm.dosageUnit" style="width: 100%">
+ <el-option label="鐗�" value="鐗�" />
+ <el-option label="绮�" value="绮�" />
+ <el-option label="mg" value="mg" />
+ <el-option label="ml" value="ml" />
+ <el-option label="g" value="g" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鐢ㄨ嵂棰戞" prop="frequency">
+ <el-select v-model="assignForm.frequency" style="width: 100%">
+ <el-option label="姣忔棩1娆�" value="1" />
+ <el-option label="姣忔棩2娆�" value="2" />
+ <el-option label="姣忔棩3娆�" value="3" />
+ <el-option label="姣忔棩4娆�" value="4" />
+ <el-option label="鎸夐渶鏈嶇敤" value="0" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="鐢ㄨ嵂鏂规硶" prop="usageMethod">
+ <el-select v-model="assignForm.usageMethod" style="width: 100%">
+ <el-option label="鍙f湇" value="鍙f湇" />
+ <el-option label="闈欒剦娉ㄥ皠" value="闈欒剦娉ㄥ皠" />
+ <el-option label="鑲岃倝娉ㄥ皠" value="鑲岃倝娉ㄥ皠" />
+ <el-option label="鐨笅娉ㄥ皠" value="鐨笅娉ㄥ皠" />
+ <el-option label="澶栫敤" value="澶栫敤" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鐢ㄨ嵂鏃堕棿" prop="durationType">
+ <el-radio-group v-model="assignForm.durationType">
+ <el-radio label="1">闀挎湡鐢ㄨ嵂</el-radio>
+ <el-radio label="2">鎸囧畾鍛ㄦ湡</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-row :gutter="20" v-if="assignForm.durationType === '2'">
+ <el-col :span="12">
+ <el-form-item label="寮�濮嬫椂闂�" prop="startTime">
+ <el-date-picker
+ v-model="assignForm.startTime"
+ type="datetime"
+ placeholder="閫夋嫨寮�濮嬫椂闂�"
+ style="width: 100%"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="缁撴潫鏃堕棿" prop="endTime">
+ <el-date-picker
+ v-model="assignForm.endTime"
+ type="datetime"
+ placeholder="閫夋嫨缁撴潫鏃堕棿"
+ style="width: 100%"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-form-item label="鐢ㄨ嵂璇存槑" prop="instructions">
+ <el-input
+ type="textarea"
+ :rows="3"
+ v-model="assignForm.instructions"
+ placeholder="璇疯緭鍏ョ敤鑽敞鎰忎簨椤广�佺壒娈婅鏄庣瓑"
+ />
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitAssignForm">纭� 瀹�</el-button>
+ <el-button @click="cancelAssign">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+
+ <!-- 鍋滄鐢ㄨ嵂瀵硅瘽妗� -->
+ <el-dialog :title="stopTitle" :visible.sync="stopOpen" width="600px" append-to-body>
+ <el-form ref="stopForm" :model="stopForm" :rules="stopRules" label-width="100px">
+ <el-form-item label="鍋滄鍘熷洜" prop="stopReason">
+ <el-select v-model="stopForm.stopReason" placeholder="璇烽�夋嫨鍋滄鍘熷洜" style="width: 100%">
+ <el-option label="鐤楃▼缁撴潫" value="鐤楃▼缁撴潫" />
+ <el-option label="涓嶈壇鍙嶅簲" value="涓嶈壇鍙嶅簲" />
+ <el-option label="鐤楁晥涓嶄匠" value="鐤楁晥涓嶄匠" />
+ <el-option label="鎮h�呰姹�" value="鎮h�呰姹�" />
+ <el-option label="鍖荤敓寤鸿" value="鍖荤敓寤鸿" />
+ <el-option label="鍏朵粬鍘熷洜" value="鍏朵粬" />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="璇︾粏璇存槑" prop="stopDescription">
+ <el-input
+ type="textarea"
+ :rows="4"
+ v-model="stopForm.stopDescription"
+ placeholder="璇疯缁嗚鏄庡仠姝㈢敤鑽殑鍘熷洜鍜屾儏鍐�"
+ />
+ </el-form-item>
+
+ <el-form-item label="鍋滄鏃堕棿" prop="stopTime">
+ <el-date-picker
+ v-model="stopForm.stopTime"
+ type="datetime"
+ placeholder="閫夋嫨鍋滄鏃堕棿"
+ style="width: 100%"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ />
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitStopForm">纭� 瀹�</el-button>
+ <el-button @click="cancelStop">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { parseTime } from '@/utils/ruoyi'
+
+export default {
+ name: "PatientMedicationManagement",
+ dicts: ['sys_normal_disable'],
+ data() {
+ return {
+ // 閬僵灞�
+ loading: false,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 鐢ㄨ嵂璁板綍鏁版嵁
+medicationList: [
+ {
+ id: 1,
+ patientId: 'P1001',
+ patientName: '寮犳竻鎵�',
+ patientAge: 65,
+ patientGender: '1',
+ patientNo: '20241209001',
+ allergyHistory: '闈掗湁绱犺繃鏁�',
+ drugId: 'D1001',
+ drugName: '闃垮徃鍖规灄鑲犳憾鐗�',
+ drugSpecification: '100mg*30鐗�/鐩�',
+ dosage: 1,
+ dosageUnit: '鐗�',
+ frequency: '1',
+ usageMethod: '鍙f湇',
+ startTime: '2024-12-01 08:00:00',
+ endTime: '',
+ durationType: '1',
+ instructions: '楗悗鏈嶇敤锛屾敞鎰忚儍鑲犻亾鍙嶅簲銆傞暱鏈熸湇鐢ㄩ渶瀹氭湡妫�鏌ヨ甯歌銆�',
+ medicationStatus: '1',
+ prescribingDoctor: '鏉庢垚鐧�',
+ stopReason: '',
+ stopDescription: ''
+ },
+ {
+ id: 2,
+ patientId: 'P1001',
+ patientName: '寮犳竻鎵�',
+ patientAge: 65,
+ patientGender: '1',
+ patientNo: '20241209001',
+ allergyHistory: '闈掗湁绱犺繃鏁�',
+ drugId: 'D1002',
+ drugName: '闃挎墭浼愪粬姹�閽欑墖',
+ drugSpecification: '20mg*7鐗�/鐩�',
+ dosage: 1,
+ dosageUnit: '鐗�',
+ frequency: '1',
+ usageMethod: '鍙f湇',
+ startTime: '2024-11-20 20:00:00',
+ endTime: '',
+ durationType: '1',
+ instructions: '姣忔櫄鐫″墠鏈嶇敤銆傛敞鎰忕洃娴嬭倽鍔熻兘锛屽鏈夎倢鑲夐吀鐥涜鍙婃椂灏卞尰銆�',
+ medicationStatus: '1',
+ prescribingDoctor: '鏉庢垚鐧�',
+ stopReason: '',
+ stopDescription: ''
+ },
+ {
+ id: 3,
+ patientId: 'P2001',
+ patientName: '鐜嬭姵',
+ patientAge: 33,
+ patientGender: '0',
+ patientNo: '20241115002',
+ allergyHistory: '鏃�',
+ drugId: 'D1003',
+ drugName: '娉煎凹鏉剧墖',
+ drugSpecification: '5mg*100鐗�/鐡�',
+ dosage: 2,
+ dosageUnit: '鐗�',
+ frequency: '3',
+ usageMethod: '鍙f湇',
+ startTime: '2024-12-05 09:00:00',
+ endTime: '2024-12-20 09:00:00',
+ durationType: '2',
+ instructions: '鏃┿�佷腑銆佹櫄椁愬悗鏈嶇敤銆傞渶涓ユ牸閬靛尰鍢遍�愭笎鍑忛噺锛屼笉鍙獊鐒跺仠鑽��',
+ medicationStatus: '0',
+ prescribingDoctor: '鍒樼繆鎯�',
+ stopReason: '鐤楃▼缁撴潫',
+ stopDescription: '鏍囧噯鐤楃▼鐢ㄨ嵂瀹屾瘯锛岃灏忔澘璁℃暟宸叉仮澶嶆甯歌寖鍥淬��'
+ },
+ {
+ id: 4,
+ patientId: 'P2001',
+ patientName: '鐜嬭姵',
+ patientAge: 33,
+ patientGender: '0',
+ patientNo: '20241115002',
+ allergyHistory: '鏃�',
+ drugId: 'D1004',
+ drugName: '澶氱硸閾佸鍚堢墿鑳跺泭',
+ drugSpecification: '150mg*10绮�/鐩�',
+ dosage: 1,
+ dosageUnit: '绮�',
+ frequency: '2',
+ usageMethod: '鍙f湇',
+ startTime: '2024-12-05 09:00:00',
+ endTime: '',
+ durationType: '1',
+ instructions: '椁愬悗鏈嶇敤锛屽彲鍑忚交鑳冭偁閬撳埡婵�銆傛湇鑽悗鍙兘鍑虹幇榛戜究锛屽睘姝e父鐜拌薄銆�',
+ medicationStatus: '1',
+ prescribingDoctor: '鍒樼繆鎯�',
+ stopReason: '',
+ stopDescription: ''
+ },
+ {
+ id: 5,
+ patientId: 'P3001',
+ patientName: '鏉庝紵',
+ patientAge: 58,
+ patientGender: '1',
+ patientNo: '20241022005',
+ allergyHistory: '纾鸿兒绫昏嵂鐗╄繃鏁�',
+ drugId: 'D1005',
+ drugName: '鐩愰吀浜岀敳鍙岃儘鐗�',
+ drugSpecification: '0.5g*20鐗�/鏉�',
+ dosage: 1,
+ dosageUnit: '鐗�',
+ frequency: '2',
+ usageMethod: '鍙f湇',
+ startTime: '2024-10-22 08:00:00',
+ endTime: '',
+ durationType: '1',
+ instructions: '闅忛鎴栭鍚庣珛鍗虫湇鐢紝浠ュ噺灏戣儍鑲犻亾涓嶉�傘��',
+ medicationStatus: '1',
+ prescribingDoctor: '寮犲瓱娑�',
+ stopReason: '',
+ stopDescription: ''
+ },
+ {
+ id: 6,
+ patientId: 'P4001',
+ patientName: '璧电',
+ patientAge: 70,
+ patientGender: '1',
+ patientNo: '20241202011',
+ allergyHistory: '娴烽矞杩囨晱',
+ drugId: 'D1006',
+ drugName: '鍛嬪绫崇墖',
+ drugSpecification: '20mg*100鐗�/鐡�',
+ dosage: 1,
+ dosageUnit: '鐗�',
+ frequency: '1',
+ usageMethod: '鍙f湇',
+ startTime: '2024-12-02 07:00:00',
+ endTime: '',
+ durationType: '1',
+ instructions: '鏅ㄨ捣鏈嶇敤锛岄伩鍏嶅闂村娆¤捣澶溿�傛敞鎰忕洃娴嬬數瑙h川姘村钩銆�',
+ medicationStatus: '1',
+ prescribingDoctor: '鍚存�濈堪',
+ stopReason: '',
+ stopDescription: ''
+ },
+ {
+ id: 7,
+ patientId: 'P5001',
+ patientName: '鍛ㄥ崕',
+ patientAge: 52,
+ patientGender: '0',
+ patientNo: '20241128009',
+ allergyHistory: '鏃�',
+ drugId: 'D1007',
+ drugName: '纭濊嫰鍦板钩鎺ч噴鐗�',
+ drugSpecification: '30mg*7鐗�/鐩�',
+ dosage: 1,
+ dosageUnit: '鐗�',
+ frequency: '1',
+ usageMethod: '鍙f湇',
+ startTime: '2024-11-28 08:00:00',
+ endTime: '',
+ durationType: '1',
+ instructions: '鏁寸墖鍚炴湇锛屼笉鍙毤纰庢垨鎺板紑銆�',
+ medicationStatus: '1',
+ prescribingDoctor: '闄堟斂鍊�',
+ stopReason: '',
+ stopDescription: ''
+ }
+],
+ // 鍒嗛厤鐢ㄨ嵂寮瑰嚭灞�
+ assignOpen: false,
+ assignTitle: "",
+ // 鍋滄鐢ㄨ嵂寮瑰嚭灞�
+ stopOpen: false,
+ stopTitle: "",
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ patientName: undefined,
+ drugName: undefined,
+ medicationStatus: undefined
+ },
+ // 鍒嗛厤鐢ㄨ嵂琛ㄥ崟
+ assignForm: {},
+ // 鍋滄鐢ㄨ嵂琛ㄥ崟
+ stopForm: {},
+ // 閫変腑鎮h�呬俊鎭�
+ selectedPatient: null,
+ // 閫変腑鑽搧淇℃伅
+ selectedDrug: {},
+ // 鎮h�呴�夐」
+ patientOptions: [
+ {
+ id: 'P1001',
+ name: '寮犱笁',
+ age: 65,
+ patientNo: '20241209001',
+ allergyHistory: '闈掗湁绱犺繃鏁�'
+ }
+ ],
+ // 鑽搧閫夐」
+ drugOptions: [
+ {
+ id: 'D1001',
+ name: '闃垮徃鍖规灄',
+ specification: '100mg',
+ stock: 150
+ }
+ ],
+ // 鐘舵�侀�夐」
+ statusOptions: [
+ { value: "1", label: "鐢ㄨ嵂涓�" },
+ { value: "0", label: "宸插仠姝�" }
+ ],
+ // 琛ㄥ崟鏍¢獙
+ assignRules: {
+ patientId: [
+ { required: true, message: "璇烽�夋嫨鎮h��", trigger: "change" }
+ ],
+ drugId: [
+ { required: true, message: "璇烽�夋嫨鑽搧", trigger: "change" }
+ ],
+ dosage: [
+ { required: true, message: "璇疯緭鍏ュ崟娆″墏閲�", trigger: "blur" }
+ ],
+ frequency: [
+ { required: true, message: "璇烽�夋嫨鐢ㄨ嵂棰戞", trigger: "change" }
+ ]
+ },
+ stopRules: {
+ stopReason: [
+ { required: true, message: "璇烽�夋嫨鍋滄鍘熷洜", trigger: "change" }
+ ],
+ stopTime: [
+ { required: true, message: "璇烽�夋嫨鍋滄鏃堕棿", trigger: "change" }
+ ]
+ }
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ parseTime,
+ /** 鏌ヨ鐢ㄨ嵂璁板綍鍒楄〃 */
+ getList() {
+ this.loading = true;
+ // 妯℃嫙API璋冪敤
+ setTimeout(() => {
+ this.loading = false;
+ this.total = this.medicationList.length;
+ }, 500);
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ 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;
+ },
+ /** 鍒嗛厤鐢ㄨ嵂鎸夐挳鎿嶄綔 */
+ handleAssignMedication() {
+ this.resetAssignForm();
+ this.assignOpen = true;
+ this.assignTitle = "鍒嗛厤鐢ㄨ嵂";
+ },
+ /** 鍋滄鐢ㄨ嵂鎸夐挳鎿嶄綔 */
+ handleStopMedication() {
+ if (this.ids.length === 0) {
+ this.$modal.msgError("璇峰厛閫夋嫨瑕佸仠姝㈢殑鐢ㄨ嵂璁板綍");
+ return;
+ }
+ this.resetStopForm();
+ this.stopOpen = true;
+ this.stopTitle = "鍋滄鐢ㄨ嵂";
+ },
+ /** 鍗曚釜鍋滄鐢ㄨ嵂 */
+ handleSingleStop(row) {
+ this.ids = [row.id];
+ this.resetStopForm();
+ this.stopForm.patientName = row.patientName;
+ this.stopForm.drugName = row.drugName;
+ this.stopOpen = true;
+ this.stopTitle = `鍋滄鐢ㄨ嵂 - ${row.patientName}`;
+ },
+ /** 鎻愪氦鍒嗛厤鐢ㄨ嵂琛ㄥ崟 */
+ submitAssignForm() {
+ this.$refs["assignForm"].validate(valid => {
+ if (valid) {
+ // 妯℃嫙API璋冪敤
+ const newRecord = {
+ id: Math.max(...this.medicationList.map(item => item.id)) + 1,
+ ...this.assignForm,
+ patientName: this.selectedPatient?.name,
+ patientAge: this.selectedPatient?.age,
+ patientGender: this.selectedPatient?.gender,
+ patientNo: this.selectedPatient?.patientNo,
+ allergyHistory: this.selectedPatient?.allergyHistory,
+ drugName: this.selectedDrug?.name,
+ drugSpecification: this.selectedDrug?.specification,
+ medicationStatus: '1',
+ prescribingDoctor: '褰撳墠鐢ㄦ埛',
+ startTime: this.assignForm.startTime || new Date().toISOString().replace('T', ' ').substr(0, 19)
+ };
+
+ this.medicationList.unshift(newRecord);
+ this.total = this.medicationList.length;
+ this.$modal.msgSuccess("鍒嗛厤鎴愬姛");
+ this.assignOpen = false;
+ }
+ });
+ },
+ /** 鎻愪氦鍋滄鐢ㄨ嵂琛ㄥ崟 */
+ submitStopForm() {
+ this.$refs["stopForm"].validate(valid => {
+ if (valid) {
+ // 鏇存柊鐢ㄨ嵂璁板綍鐘舵��
+ this.medicationList.forEach(item => {
+ if (this.ids.includes(item.id)) {
+ item.medicationStatus = '0';
+ item.endTime = this.stopForm.stopTime;
+ item.stopReason = this.stopForm.stopReason;
+ item.stopDescription = this.stopForm.stopDescription;
+ }
+ });
+
+ this.$modal.msgSuccess("鍋滄鐢ㄨ嵂鎴愬姛");
+ this.stopOpen = false;
+ this.getList();
+ }
+ });
+ },
+ /** 鎮h�呴�夋嫨鍙樺寲 */
+ handlePatientChange(patientId) {
+ this.selectedPatient = this.patientOptions.find(p => p.id === patientId) || null;
+ },
+ /** 鑽搧閫夋嫨鍙樺寲 */
+ handleDrugChange(drugId) {
+ this.selectedDrug = this.drugOptions.find(d => d.id === drugId) || {};
+ },
+ /** 鏌ョ湅璇︽儏 */
+ handleViewDetail(row) {
+ this.$alert(
+ `<div>
+ <p><strong>鎮h�呬俊鎭細</strong>${row.patientName} (${row.patientNo})</p>
+ <p><strong>鑽搧淇℃伅锛�</strong>${row.drugName} ${row.drugSpecification}</p>
+ <p><strong>鐢ㄦ硶鐢ㄩ噺锛�</strong>${row.dosage}${row.dosageUnit}/娆★紝${row.frequency}娆�/鏃ワ紝${row.usageMethod}</p>
+ <p><strong>鐢ㄨ嵂鏃堕棿锛�</strong>${this.parseTime(row.startTime, '{y}-{m}-{d}')} - ${row.endTime ? this.parseTime(row.endTime, '{y}-{m}-{d}') : '闀挎湡'}</p>
+ <p><strong>鐢ㄨ嵂璇存槑锛�</strong>${row.instructions || '鏃�'}</p>
+ ${row.allergyHistory ? `<p><strong>杩囨晱鍙诧細</strong><span style="color: red">${row.allergyHistory}</span></p>` : ''}
+ </div>`,
+ "鐢ㄨ嵂璇︽儏",
+ {
+ dangerouslyUseHTMLString: true,
+ customClass: "medication-detail-dialog",
+ }
+ );
+ },
+ /** 鏄剧ず杩囨晱鍙茶鎯� */
+ showAllergyDetail(row) {
+ if (row.allergyHistory) {
+ this.$alert(`鎮h�� ${row.patientName} 鐨勮繃鏁忓彶锛�${row.allergyHistory}`, "杩囨晱鍙茶鎯�", {
+ confirmButtonText: "纭畾"
+ });
+ }
+ },
+ /** 鑾峰彇鐘舵�佹爣绛剧被鍨� */
+ getStatusTagType(status) {
+ const statusMap = {
+ '1': 'success', // 鐢ㄨ嵂涓�
+ '0': 'info' // 宸插仠姝�
+ };
+ return statusMap[status] || 'info';
+ },
+ /** 鑾峰彇鐘舵�佹枃鏈� */
+ getStatusText(status) {
+ const statusMap = {
+ '1': '鐢ㄨ嵂涓�',
+ '0': '宸插仠姝�'
+ };
+ return statusMap[status] || '鏈煡';
+ },
+ /** 閲嶇疆鍒嗛厤鐢ㄨ嵂琛ㄥ崟 */
+ resetAssignForm() {
+ this.assignForm = {
+ patientId: undefined,
+ drugId: undefined,
+ dosage: 1,
+ dosageUnit: '鐗�',
+ frequency: '3',
+ usageMethod: '鍙f湇',
+ durationType: '1',
+ startTime: new Date().toISOString().replace('T', ' ').substr(0, 19),
+ endTime: undefined,
+ instructions: ''
+ };
+ this.selectedPatient = null;
+ this.selectedDrug = {};
+ this.resetForm("assignForm");
+ },
+ /** 閲嶇疆鍋滄鐢ㄨ嵂琛ㄥ崟 */
+ resetStopForm() {
+ this.stopForm = {
+ stopReason: '',
+ stopDescription: '',
+ stopTime: new Date().toISOString().replace('T', ' ').substr(0, 19)
+ };
+ this.resetForm("stopForm");
+ },
+ /** 鍙栨秷鍒嗛厤鐢ㄨ嵂 */
+ cancelAssign() {
+ this.assignOpen = false;
+ this.resetAssignForm();
+ },
+ /** 鍙栨秷鍋滄鐢ㄨ嵂 */
+ cancelStop() {
+ this.stopOpen = false;
+ this.resetStopForm();
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+.patient-medication-management {
+ padding: 20px;
+}
+
+.patient-info {
+ text-align: left;
+ .patient-name {
+ font-weight: bold;
+ margin-bottom: 4px;
+ }
+ .patient-details {
+ font-size: 12px;
+ color: #909399;
+ }
+}
+
+.drug-info {
+ text-align: left;
+ .drug-name {
+ font-weight: bold;
+ margin-bottom: 4px;
+ }
+ .dosage-info {
+ font-size: 12px;
+ color: #67C23A;
+ }
+}
+
+.usage-info, .time-info {
+ font-size: 12px;
+ line-height: 1.4;
+}
+
+.allergy-warning {
+ color: #F56C6C;
+ font-size: 12px;
+}
+
+.no-allergy {
+ color: #909399;
+ font-style: italic;
+}
+
+.patient-detail {
+ font-size: 12px;
+ line-height: 1.6;
+ padding: 8px;
+ background: #f5f7fa;
+ border-radius: 4px;
+}
+
+.placeholder {
+ color: #c0c4cc;
+ font-style: italic;
+}
+
+.stop-button {
+ color: #E6A23C;
+ &:hover {
+ color: #f56c6c;
+ }
+}
+
+::v-deep .medication-detail-dialog {
+ width: 500px;
+}
+</style>
diff --git a/src/views/knowledge/article/index.vue b/src/views/knowledge/article/index.vue
index 587ad77..2f830f9 100644
--- a/src/views/knowledge/article/index.vue
+++ b/src/views/knowledge/article/index.vue
@@ -212,68 +212,105 @@
// 鎬绘潯鏁�
total: 0,
// 鏂囩珷琛ㄦ牸鏁版嵁
- articleList: [
- {
- id: 1,
- title: "濡備綍鎻愰珮鍓嶇寮�鍙戞晥鐜�",
- category: "1",
- coverImage: "https://pic.rmb.bdstatic.com/bjh/news/5e5f1b3e7b1a8a7f8a3d6a7d3a6a7d3a.jpeg",
- author: "寮犱笁",
- publishTime: "2023-05-10 09:30:00",
- views: 1250,
- status: "1",
- summary: "鏈枃浠嬬粛浜嗗嚑绉嶆彁楂樺墠绔紑鍙戞晥鐜囩殑鏂规硶鍜屽伐鍏�",
- content: "<p>鍓嶇寮�鍙戞晥鐜囩殑鎻愬崌瀵逛簬椤圭洰杩涘害鑷冲叧閲嶈...</p>"
- },
- {
- id: 2,
- title: "Vue3鏂扮壒鎬цВ鏋�",
- category: "2",
- coverImage: "https://pic.rmb.bdstatic.com/bjh/news/8e5f1b3e7b1a8a7f8a3d6a7d3a6a7d3a.jpeg",
- author: "鏉庡洓",
- publishTime: "2023-05-15 14:20:00",
- views: 3200,
- status: "1",
- summary: "璇︾粏瑙f瀽Vue3鐨勬柊鐗规�у拰浣跨敤鍦烘櫙",
- content: "<p>Vue3甯︽潵浜嗚澶氫护浜哄叴濂嬬殑鏂扮壒鎬�...</p>"
- },
- {
- id: 3,
- title: "Element UI浣跨敤鎶�宸�",
- category: "3",
- coverImage: "https://pic.rmb.bdstatic.com/bjh/news/9e5f1b3e7b1a8a7f8a3d6a7d3a6a7d3a.jpeg",
- author: "鐜嬩簲",
- publishTime: "2023-05-20 10:15:00",
- views: 890,
- status: "0",
- summary: "鍒嗕韩涓�浜汦lement UI鐨勯珮绾т娇鐢ㄦ妧宸�",
- content: "<p>Element UI浣滀负娴佽鐨刄I妗嗘灦锛屾湁璁稿瀹炵敤鎶�宸�...</p>"
- },
- {
- id: 4,
- title: "鍓嶇鎬ц兘浼樺寲鎸囧崡",
- category: "1",
- coverImage: "https://pic.rmb.bdstatic.com/bjh/news/7e5f1b3e7b1a8a7f8a3d6a7d3a6a7d3a.jpeg",
- author: "璧靛叚",
- publishTime: "2023-05-25 16:45:00",
- views: 4500,
- status: "1",
- summary: "鍏ㄩ潰鐨勫墠绔�ц兘浼樺寲鏂规硶鍜屽疄璺�",
- content: "<p>鎬ц兘浼樺寲鏄墠绔紑鍙戜腑姘告亽鐨勮瘽棰�...</p>"
- },
- {
- id: 5,
- title: "TypeScript鍏ラ棬鏁欑▼",
- category: "2",
- coverImage: "https://pic.rmb.bdstatic.com/bjh/news/6e5f1b3e7b1a8a7f8a3d6a7d3a6a7d3a.jpeg",
- author: "閽变竷",
- publishTime: "2023-06-01 11:10:00",
- views: 2100,
- status: "1",
- summary: "浠庨浂寮�濮嬪涔燭ypeScript",
- content: "<p>TypeScript浣滀负JavaScript鐨勮秴闆嗚秺鏉ヨ秺鍙楁杩�...</p>"
- }
- ],
+ // 鏇挎崲鍘熸湁鐨刟rticleList鏁版嵁
+articleList: [
+ {
+ id: 1,
+ title: "绯栧翱鐥呯鐞嗘柊杩涘睍锛氫釜鎬у寲娌荤枟鏂规鐨勭爺绌朵笌搴旂敤",
+ category: "1",
+ coverImage: "https://example.com/images/diabetes-management.jpg",
+ author: "鏉庢垚鐧�",
+ publishTime: "2024-11-15 09:30:00",
+ views: 3250,
+ status: "1",
+ summary: "鏈枃缁艰堪浜嗚繎骞存潵绯栧翱鐥呬釜鎬у寲娌荤枟鐨勬渶鏂扮爺绌舵垚鏋滐紝閲嶇偣鍒嗘瀽浜嗗熀浜庢偅鑰呭熀鍥犵壒寰佺殑瀹氬埗鍖栨不鐤楁柟妗堛��",
+ content: "<p>闅忕潃绮惧噯鍖荤枟鐨勫彂灞曪紝绯栧翱鐥呮不鐤楁浠庢爣鍑嗗寲鍚戜釜鎬у寲杞彉...</p>"
+ },
+ {
+ id: 2,
+ title: "蹇冭绠$柧鐥呴闃诧細浠庨闄╄瘎浼板埌鏃╂湡骞查",
+ category: "2",
+ coverImage: "https://example.com/images/cardiovascular-prevention.jpg",
+ author: "鍒樼繆鎯�",
+ publishTime: "2024-11-10 14:20:00",
+ views: 4280,
+ status: "1",
+ summary: "鎺㈣蹇冭绠$柧鐥呯殑鏂板瀷椋庨櫓璇勪及宸ュ叿鍜屾棭鏈熷共棰勭瓥鐣ワ紝涓轰复搴婂疄璺垫彁渚涙寚瀵笺��",
+ content: "<p>蹇冭绠$柧鐥呬粛鐒舵槸鍏ㄧ悆涓昏鐨勬浜″師鍥狅紝鏃╂湡棰勯槻鑷冲叧閲嶈...</p>"
+ },
+ {
+ id: 3,
+ title: "鑲跨槫鍏嶇柅娌荤枟鐨勪笉鑹弽搴旂鐞嗕笌搴斿绛栫暐",
+ category: "3",
+ coverImage: "https://example.com/images/immunotherapy-side-effects.jpg",
+ author: "寮犲瓱娑�",
+ publishTime: "2024-11-05 10:15:00",
+ views: 2890,
+ status: "0",
+ summary: "绯荤粺鍒嗘瀽鍏嶇柅妫�鏌ョ偣鎶戝埗鍓傛不鐤椾腑甯歌鐨勪笉鑹弽搴斿強鍏朵复搴婄鐞嗘柟妗堛��",
+ content: "<p>鍏嶇柅娌荤枟涓鸿偪鐦ゆ偅鑰呭甫鏉ュ笇鏈涳紝浣嗗叾鐙壒鐨勪笉鑹弽搴旈渶瑕佺壒鍒叧娉�...</p>"
+ },
+ {
+ id: 4,
+ title: "浜哄伐鏅鸿兘鍦ㄥ尰瀛﹀奖鍍忚瘖鏂腑鐨勫簲鐢ㄤ笌鎸戞垬",
+ category: "4",
+ coverImage: "https://example.com/images/ai-medical-imaging.jpg",
+ author: "鍚存�濈堪",
+ publishTime: "2024-10-28 16:45:00",
+ views: 5120,
+ status: "1",
+ summary: "鍥為【AI鎶�鏈湪CT銆丮RI绛夊尰瀛﹀奖鍍忓垎鏋愪腑鐨勬渶鏂拌繘灞曞強涓村簥搴旂敤浠峰�笺��",
+ content: "<p>浜哄伐鏅鸿兘鎶�鏈鍦ㄩ噸濉戝尰瀛﹀奖鍍忚瘖鏂殑鏍煎眬...</p>"
+ },
+ {
+ id: 5,
+ title: "鎱㈡�х柤鐥涚殑鑽墿娌荤枟涓庨潪鑽墿骞查缁煎悎绠$悊",
+ category: "1",
+ coverImage: "https://example.com/images/chronic-pain-management.jpg",
+ author: "闄堟斂鍊�",
+ publishTime: "2024-10-22 11:10:00",
+ views: 1950,
+ status: "1",
+ summary: "鍩轰簬寰瘉鍖诲璇佹嵁锛屾彁鍑烘參鎬х柤鐥涚殑缁煎悎绠$悊鏂规锛屽钩琛$枟鏁堜笌瀹夊叏鎬с��",
+ content: "<p>鎱㈡�х柤鐥涗弗閲嶅奖鍝嶆偅鑰呯敓娲昏川閲忥紝闇�瑕佸妯″紡缁煎悎娌荤枟...</p>"
+ },
+ {
+ id: 6,
+ title: "鍎跨鍛煎惛閬撴劅鏌撶殑璇婄枟瑙勮寖鏇存柊瑙h",
+ category: "2",
+ coverImage: "https://example.com/images/pediatric-respiratory.jpg",
+ author: "閭撹瘲娑�",
+ publishTime: "2024-10-18 13:25:00",
+ views: 3670,
+ status: "1",
+ summary: "缁撳悎鏈�鏂颁复搴婃寚鍗楋紝璇︾粏瑙h鍎跨鍛煎惛閬撴劅鏌撶殑璇婃柇鏍囧噯鍜屾不鐤楀師鍒欍��",
+ content: "<p>鍎跨鍛煎惛閬撴劅鏌撴槸鍎跨甯歌鐥咃紝瑙勮寖璇婄枟瀵归鍚庤嚦鍏抽噸瑕�...</p>"
+ },
+ {
+ id: 7,
+ title: "绮剧鍗敓鏁板瓧鐤楁硶鐨勭幇鐘朵笌鏈潵鍙戝睍",
+ category: "3",
+ coverImage: "https://example.com/images/digital-mental-health.jpg",
+ author: "榛勭洓鐜�",
+ publishTime: "2024-10-12 15:30:00",
+ views: 2430,
+ status: "2",
+ summary: "鎺㈣鏁板瓧鎶�鏈湪绮剧蹇冪悊鐤剧梾娌荤枟涓殑搴旂敤鍓嶆櫙鍜岄潰涓寸殑鎸戞垬銆�",
+ content: "<p>鏁板瓧鐤楁硶涓虹簿绁炲崼鐢熼鍩熷甫鏉ヤ簡鏂扮殑娌荤枟妯″紡...</p>"
+ },
+ {
+ id: 8,
+ title: "鑰佸勾缁煎悎璇勪及鍦ㄤ复搴婂疄璺典腑鐨勫疄鏂借矾寰�",
+ category: "4",
+ coverImage: "https://example.com/images/geriatric-assessment.jpg",
+ author: "鐜嬫仼榫�",
+ publishTime: "2024-10-05 08:45:00",
+ views: 1780,
+ status: "1",
+ summary: "绯荤粺浠嬬粛鑰佸勾缁煎悎璇勪及鐨勫缁村害鍐呭鍙婂叾鍦ㄨ�佸勾鎮h�呯鐞嗕腑鐨勪环鍊笺��",
+ content: "<p>闅忕潃浜哄彛鑰侀緞鍖栵紝鑰佸勾缁煎悎璇勪及鎴愪负鑰佸勾鍖诲鐨勯噸瑕佸伐鍏�...</p>"
+ }
+],
// 寮瑰嚭灞傛爣棰�
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
@@ -308,10 +345,10 @@
},
// 鏂囩珷鍒嗙被閫夐」
categoryOptions: [
- { value: "1", label: "鎶�鏈枃绔�" },
- { value: "2", label: "鏁欑▼鎸囧崡" },
- { value: "3", label: "缁忛獙鍒嗕韩" },
- { value: "4", label: "琛屼笟璧勮" }
+ { value: "1", label: "涓村簥鐮旂┒" },
+ { value: "2", label: "璇婄枟鎸囧崡" },
+ { value: "3", label: "鑽墿杩涘睍" },
+ { value: "4", label: "鎶�鏈墠娌�" }
],
// 鐘舵�侀�夐」
statusOptions: [
diff --git a/src/views/patient/SignAcontract/Review.vue b/src/views/patient/SignAcontract/Review.vue
new file mode 100644
index 0000000..1415166
--- /dev/null
+++ b/src/views/patient/SignAcontract/Review.vue
@@ -0,0 +1,827 @@
+<template>
+ <div class="contract-review-page">
+ <!-- 绛涢�夋潯浠� -->
+ <el-card class="search-card" shadow="never">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
+ <el-row :gutter="20">
+ <el-col :span="6">
+ <el-form-item label="鎮h�呭鍚�" prop="patientName">
+ <el-input
+ v-model="queryParams.patientName"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ clearable
+ @keyup.enter="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="瀹℃牳鐘舵��" prop="reviewStatus">
+ <el-select v-model="queryParams.reviewStatus" placeholder="璇烽�夋嫨鐘舵��" clearable>
+ <el-option label="寰呭鏍�" value="0" />
+ <el-option label="瀹℃牳閫氳繃" value="1" />
+ <el-option label="瀹℃牳椹冲洖" value="2" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鐢宠鏃堕棿" prop="applyDate">
+ <el-date-picker
+ v-model="queryParams.applyDate"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" @click="resetQuery">閲嶇疆</el-button>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </el-card>
+
+ <!-- 缁熻淇℃伅 -->
+ <el-row :gutter="20" class="stats-row">
+ <el-col :span="8">
+ <el-card shadow="hover">
+ <div class="stat-item">
+ <div class="stat-number">{{ stats.pending }}</div>
+ <div class="stat-label">寰呭鏍哥敵璇�</div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="8">
+ <el-card shadow="hover">
+ <div class="stat-item">
+ <div class="stat-number" style="color: #67C23A;">{{ stats.approved }}</div>
+ <div class="stat-label">宸查�氳繃瀹℃牳</div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="8">
+ <el-card shadow="hover">
+ <div class="stat-item">
+ <div class="stat-number" style="color: #F56C6C;">{{ stats.rejected }}</div>
+ <div class="stat-label">宸查┏鍥炵敵璇�</div>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
+
+ <!-- 瀹℃牳鍒楄〃 -->
+ <el-card shadow="never">
+ <el-table
+ v-loading="loading"
+ :data="reviewList"
+ style="width: 100%"
+ :default-sort="{prop: 'applyTime', order: 'descending'}"
+ >
+ <el-table-column label="鎮h�呬俊鎭�" min-width="200" fixed>
+ <template slot-scope="scope">
+ <div class="patient-info">
+ <div class="patient-name">{{ scope.row.patientName }}</div>
+ <div class="patient-detail">
+ {{ scope.row.gender }} | {{ scope.row.age }}宀� | {{ scope.row.phone }}
+ </div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢宠濂楅" min-width="150">
+ <template slot-scope="scope">
+ <el-tag :type="getPackageType(scope.row.servicePackageId)">
+ {{ scope.row.servicePackage }}
+ </el-tag>
+ <div style="font-size: 12px; color: #666; margin-top: 4px;">
+ 鍛ㄦ湡: {{ scope.row.contractPeriod }}骞�
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍖呭惈鏈嶅姟" min-width="200">
+ <template slot-scope="scope">
+ <el-tooltip effect="dark" :content="scope.row.services.join('銆�')" placement="top">
+ <span>{{ scope.row.services.slice(0, 2).join('銆�') }}绛墈{ scope.row.services.length }}椤�</span>
+ </el-tooltip>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐢宠鏃堕棿" prop="applyTime" width="160" sortable />
+ <el-table-column label="鏈熸湜鍖荤敓" prop="expectDoctor" width="120" />
+ <el-table-column label="鐗规畩瑕佹眰" min-width="200">
+ <template slot-scope="scope">
+ <span v-if="scope.row.specialRequirements" :title="scope.row.specialRequirements">
+ {{ scope.row.specialRequirements.substring(0, 30) }}...
+ </span>
+ <span v-else style="color: #999;">鏃犵壒娈婅姹�</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="瀹℃牳鐘舵��" width="100">
+ <template slot-scope="scope">
+ <el-tag :type="getReviewStatusType(scope.row.reviewStatus)" effect="dark">
+ {{ getReviewStatusText(scope.row.reviewStatus) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="瀹℃牳淇℃伅" min-width="180">
+ <template slot-scope="scope">
+ <div v-if="scope.row.reviewStatus !== 0">
+ <div style="font-size: 12px;">瀹℃牳浜�: {{ scope.row.reviewer }}</div>
+ <div style="font-size: 12px;">鏃堕棿: {{ scope.row.reviewTime }}</div>
+ <div v-if="scope.row.reviewStatus === 2" style="color: #f56c6c; font-size: 12px;">
+ 鍘熷洜: {{ scope.row.rejectReason }}
+ </div>
+ </div>
+ <span v-else style="color: #999;">寰呭鏍�</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="180" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ v-if="scope.row.reviewStatus === 0"
+ size="mini"
+ type="primary"
+ @click="handleReview(scope.row, 1)"
+ >閫氳繃</el-button>
+ <el-button
+ v-if="scope.row.reviewStatus === 0"
+ size="mini"
+ type="danger"
+ @click="handleReview(scope.row, 2)"
+ >椹冲洖</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleView(scope.row)"
+ >璇︽儏</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-card>
+
+ <!-- 瀹℃牳瀵硅瘽妗� -->
+ <el-dialog
+ :title="reviewForm.reviewStatus === 1 ? '瀹℃牳閫氳繃纭' : '瀹℃牳椹冲洖纭'"
+ :visible.sync="reviewDialogVisible"
+ width="500px"
+ >
+ <el-form :model="reviewForm" ref="reviewFormRef" label-width="100px">
+ <el-form-item
+ v-if="reviewForm.reviewStatus === 2"
+ label="椹冲洖鍘熷洜"
+ prop="rejectReason"
+ :rules="[{ required: true, message: '璇疯緭鍏ラ┏鍥炲師鍥�', trigger: 'blur' }]"
+ >
+ <el-input
+ type="textarea"
+ :rows="3"
+ v-model="reviewForm.rejectReason"
+ placeholder="璇疯緭鍏ラ┏鍥炵殑鍏蜂綋鍘熷洜锛屼究浜庢偅鑰呬簡瑙f儏鍐�"
+ maxlength="200"
+ show-word-limit
+ />
+ </el-form-item>
+ <el-form-item label="鍒嗛厤鍖荤敓" prop="assignDoctor">
+ <el-select v-model="reviewForm.assignDoctor" placeholder="璇烽�夋嫨璐熻矗鍖荤敓" clearable>
+ <el-option
+ v-for="doctor in availableDoctors"
+ :key="doctor.id"
+ :label="doctor.name"
+ :value="doctor.id"
+ >
+ <span>{{ doctor.name }}</span>
+ <span style="float: right; color: #8492a6; font-size: 13px">
+ {{ doctor.department }}
+ </span>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="澶囨敞淇℃伅">
+ <el-input
+ type="textarea"
+ :rows="2"
+ v-model="reviewForm.remark"
+ placeholder="鍙~鍐欓澶栫殑澶囨敞淇℃伅锛堝彲閫夛級"
+ maxlength="100"
+ />
+ </el-form-item>
+ </el-form>
+ <div slot="footer">
+ <el-button @click="reviewDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="submitReview">纭畾</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+export default {
+ name: 'ContractReview',
+ data() {
+ return {
+ loading: false,
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ patientName: undefined,
+ reviewStatus: undefined,
+ applyDate: undefined
+ },
+ total: 0,
+ reviewList: [],
+ reviewDialogVisible: false,
+ reviewForm: {
+ id: undefined,
+ reviewStatus: 1,
+ rejectReason: undefined,
+ assignDoctor: undefined,
+ remark: undefined
+ },
+ currentRow: null,
+ stats: {
+ pending: 0,
+ approved: 0,
+ rejected: 0
+ },
+ availableDoctors: [
+ { id: '1', name: '鐜嬪尰鐢�', department: '鍐呯' },
+ { id: '2', name: '鏉庡尰鐢�', department: '鑰佸勾绉�' },
+ { id: '3', name: '寮犲尰鐢�', department: '濡囦骇绉�' },
+ { id: '4', name: '鍒樺尰鐢�', department: '鍎跨' },
+ { id: '5', name: '闄堝尰鐢�', department: '鍏ㄧ' }
+ ],
+ servicePackages: {
+ '1': { name: '鍩虹鍋ュ悍绠$悊鍖�', color: 'info' },
+ '2': { name: '鎱㈡�х梾绠$悊鍖�', color: 'success' },
+ '3': { name: '鑰佸勾浜哄仴搴峰寘', color: 'warning' },
+ '4': { name: '瀛曚骇濡囦繚鍋ュ寘', color: 'danger' },
+ '5': { name: '鍎跨淇濆仴鍖�', color: 'primary' }
+ },
+ rules: {
+ rejectReason: [
+ { required: true, message: '椹冲洖鍘熷洜涓嶈兘涓虹┖', trigger: 'blur' }
+ ],
+ assignDoctor: [
+ { required: true, message: '璇烽�夋嫨鍒嗛厤鍖荤敓', trigger: 'change' }
+ ]
+ }
+ }
+ },
+ created() {
+ this.getList()
+ this.calculateStats()
+ },
+ methods: {
+//浼樺寲鍚庣殑妯℃嫙鏁版嵁鐢熸垚鏂规硶
+generateMockData() {
+ const mockData = []
+
+ // 浣跨敤鎮ㄦ彁渚涚殑鐪熷疄濮撳悕鍒楄〃
+ const patientNames = [
+ '鏉庤倗鑺�', '鍗㈡湪浠�', '鏉庢垚鐧�', '鏂瑰厗鐜�', '鍒樼繆鎯�', '涓佹眽鑷�', '鍚翠匠鐟�', '鑸掔豢鐝�',
+ '鍛ㄧ櫧鑺�', '寮犲Э濡�', '寮犺櫣浼�', '鍛ㄧ惣鐜�', '鍊�¤姵', '閮吹濡�', '鏉ㄤ僵鑺�', '榛勬枃鏃�',
+ '榛勭洓鐜�', '閮戜附闈�', '璁告櫤浜�', '寮犲瓱娑�', '鏉庡皬鐖�', '鐜嬫仼榫�', '鏈辨斂寤�', '閭撹瘲娑�',
+ '闄堟斂鍊�', '鍚翠繆浼�', '闃Θ瀛�', '缈佹儬鐝�', '鍚存�濈堪', '鏋椾僵鐜�'
+ ]
+
+ const specialReqs = [
+ '甯屾湜鍖荤敓鑳藉畾鏈熶笂闂ㄦ鏌�',
+ '闇�瑕佸懆鏈椂闂存鐨勬湇鍔�',
+ '瀵硅嵂鐗╂湁杩囨晱鍙诧紝闇�鐗瑰埆娉ㄦ剰',
+ '琛屽姩涓嶄究锛岄渶瑕佷笂闂ㄦ湇鍔�',
+ '鏃犵壒娈婅姹�',
+ '闇�瑕佽嫳璇湇鍔℃敮鎸�',
+ '鏈夐珮琛�鍘嬬梾鍙诧紝闇�閲嶇偣鍏虫敞',
+ '闇�瑕佸畾鏈熻绯栫洃娴嬫湇鍔�',
+ '甯屾湜鏈夊浐瀹氱殑瀹跺涵鍖荤敓',
+ '闇�瑕佸績鐞嗙枏瀵兼湇鍔�'
+ ]
+
+ const rejectReasons = [
+ '璧勬枡涓嶅畬鏁达紝璇疯ˉ鍏呭仴搴锋。妗�',
+ '涓嶇鍚堝綋鍓嶇绾︽潯浠�',
+ '閫夋嫨鐨勫尰鐢熸。鏈熷凡婊�',
+ '鏈嶅姟濂楅涓庣梾鎯呬笉鍖归厤',
+ '骞撮緞涓嶇鍚堝椁愯姹�',
+ '璇疯ˉ鍏呭畬鏁寸殑鐥呭彶璧勬枡'
+ ]
+
+ // 鐢熸垚绾�30鏉℃暟鎹紙涓庡鍚嶆暟閲忓尮閰嶏級
+ for (let i = 0; i < patientNames.length; i++) {
+ const packageId = (i % 5) + 1 + ''
+ const reviewStatus = i % 3 // 0:寰呭鏍�, 1:閫氳繃, 2:椹冲洖
+ const applyDate = this.generateRandomDate('2024-10-01', '2024-12-08')
+
+ // 鐢熸垚鏇寸湡瀹炵殑鐢佃瘽鍙风爜
+ const phonePrefix = ['138', '139', '150', '151', '152', '186', '187', '188']
+ const phone = `${phonePrefix[i % phonePrefix.length]}${this.padNumber(1000 + i * 37, 4)}${this.padNumber(i % 100, 2)}`
+
+ // 鐢熸垚鍚堢悊鐨勫勾榫勶紙0-80宀侊級
+ const age = i % 80
+ const gender = i % 2 === 0 ? '鐢�' : '濂�'
+
+ mockData.push({
+ id: `A${2024000 + i}`,
+ patientName: patientNames[i],
+ gender: gender,
+ age: age,
+ phone: phone,
+ servicePackageId: packageId,
+ servicePackage: this.servicePackages[packageId].name,
+ services: this.getServicesByPackage(packageId),
+ contractPeriod: [1, 2][i % 2],
+ applyTime: `${applyDate} ${this.padNumber(8 + (i % 10), 2)}:${this.padNumber(i % 60, 2)}:${this.padNumber(i % 60, 2)}`,
+ expectDoctor: ['鐜嬪尰鐢�', '鏉庡尰鐢�', '寮犲尰鐢�', '鍒樺尰鐢�', '闄堝尰鐢�'][i % 5],
+ specialRequirements: specialReqs[i % specialReqs.length],
+ reviewStatus: reviewStatus,
+ reviewer: reviewStatus !== 0 ? ['绠$悊鍛�', '绯荤粺绠$悊鍛�', '瀹℃牳涓撳憳'][i % 3] : '',
+ reviewTime: reviewStatus !== 0 ?
+ `${this.addDays(applyDate, 1 + (i % 3))} 14:${this.padNumber(i % 60, 2)}:00` : '',
+ rejectReason: reviewStatus === 2 ? rejectReasons[i % rejectReasons.length] : ''
+ })
+ }
+
+ return mockData
+},
+
+// 鏍规嵁濂楅鑾峰彇鏈嶅姟鍒楄〃
+getServicesByPackage(packageId) {
+ const servicesMap = {
+ '1': ['骞村害鍋ュ悍璇勪及', '鍦ㄧ嚎鍋ュ悍鍜ㄨ', '鍋ュ悍妗f绠$悊', '瀹氭湡鍋ュ悍鎻愰啋'],
+ '2': ['涓撳睘鍖荤敓鏈嶅姟', '鐢ㄨ嵂鎸囧绠$悊', '瀹氭湡闅忚鐩戞祴', '涓�у寲搴峰璁″垝', '绱ф�ュ尰鐤楀挩璇�'],
+ '3': ['璺屽�掗闄╄瘎浼�', '搴峰璁粌鎸囧', '鐢ㄨ嵂瀹夊叏绠$悊', '瀹氭湡涓婇棬璁胯', '绱ф�ヨ仈绯绘湇鍔�', '蹇冪悊鍋ュ悍鍏虫��'],
+ '4': ['瀛曟湡鍋ュ悍绠$悊', '浜у悗搴峰鎸囧', '鏂扮敓鍎挎姢鐞嗗挩璇�', '钀ュ吇鑶抽寤鸿', '蹇冪悊鎯呯华鏀寔'],
+ '5': ['鐢熼暱鍙戣偛鐩戞祴', '鐤嫍鎺ョ绠$悊', '甯歌鐥呴槻娌�', '钀ュ吇鎸囧', '鏃╂湡鏁欒偛鍜ㄨ']
+ }
+ return servicesMap[packageId] || []
+},
+
+// 杈呭姪鏂规硶锛氱敓鎴愰殢鏈烘棩鏈�
+generateRandomDate(start, end) {
+ const startDate = new Date(start).getTime()
+ const endDate = new Date(end).getTime()
+ const randomTime = startDate + Math.random() * (endDate - startDate)
+ return new Date(randomTime).toISOString().split('T')[0]
+},
+
+// 杈呭姪鏂规硶锛氭坊鍔犲ぉ鏁�
+addDays(date, days) {
+ const result = new Date(date)
+ result.setDate(result.getDate() + days)
+ return result.toISOString().split('T')[0]
+},
+
+// 杈呭姪鏂规硶锛氭暟瀛楄ˉ闆�
+padNumber(num, length) {
+ return num.toString().padStart(length, '0')
+},
+
+ // 鑾峰彇瀹℃牳鍒楄〃 [1](@ref)
+ async getList() {
+ this.loading = true
+ try {
+ await new Promise(resolve => setTimeout(resolve, 500))
+
+ const allData = this.generateMockData()
+ let filteredData = allData.filter(item => {
+ if (this.queryParams.patientName &&
+ !item.patientName.includes(this.queryParams.patientName)) {
+ return false
+ }
+ if (this.queryParams.reviewStatus !== undefined &&
+ item.reviewStatus !== parseInt(this.queryParams.reviewStatus)) {
+ return false
+ }
+ if (this.queryParams.applyDate && this.queryParams.applyDate.length === 2) {
+ const applyDate = item.applyTime.split(' ')[0]
+ if (applyDate < this.queryParams.applyDate[0] ||
+ applyDate > this.queryParams.applyDate[1]) {
+ return false
+ }
+ }
+ return true
+ })
+
+ const start = (this.queryParams.pageNum - 1) * this.queryParams.pageSize
+ const end = start + this.queryParams.pageSize
+ this.reviewList = filteredData.slice(start, end)
+ this.total = filteredData.length
+
+ this.calculateStats()
+ } catch (error) {
+ console.error('鑾峰彇瀹℃牳鍒楄〃澶辫触:', error)
+ this.$message.error('鏁版嵁鍔犺浇澶辫触')
+ } finally {
+ this.loading = false
+ }
+ },
+
+ // 璁$畻缁熻淇℃伅
+ calculateStats() {
+ const allData = this.generateMockData()
+ this.stats.pending = allData.filter(item => item.reviewStatus === 0).length
+ this.stats.approved = allData.filter(item => item.reviewStatus === 1).length
+ this.stats.rejected = allData.filter(item => item.reviewStatus === 2).length
+ },
+
+ // 鑾峰彇瀹℃牳鐘舵�佹枃鏈� [2](@ref)
+ getReviewStatusText(status) {
+ const statusMap = { 0: '寰呭鏍�', 1: '瀹℃牳閫氳繃', 2: '瀹℃牳椹冲洖' }
+ return statusMap[status] || '鏈煡'
+ },
+
+ // 鑾峰彇瀹℃牳鐘舵�佺被鍨�
+ getReviewStatusType(status) {
+ const typeMap = { 0: 'warning', 1: 'success', 2: 'danger' }
+ return typeMap[status] || 'info'
+ },
+
+ // 鑾峰彇濂楅绫诲瀷
+ getPackageType(packageId) {
+ const typeMap = { '1': 'info', '2': 'success', '3': 'warning', '4': 'danger', '5': 'primary' }
+ return typeMap[packageId] || 'info'
+ },
+
+ // 鎼滅储鎿嶄綔 [1](@ref)
+ handleQuery() {
+ this.queryParams.pageNum = 1
+ this.getList()
+ },
+
+ // 閲嶇疆鎼滅储
+ resetQuery() {
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ patientName: undefined,
+ reviewStatus: undefined,
+ applyDate: undefined
+ }
+ this.handleQuery()
+ },
+
+ // 澶勭悊瀹℃牳鎿嶄綔 [2](@ref)
+ handleReview(row, status) {
+ this.currentRow = row
+ this.reviewForm = {
+ id: row.id,
+ reviewStatus: status,
+ rejectReason: undefined,
+ assignDoctor: undefined,
+ remark: undefined
+ }
+ this.reviewDialogVisible = true
+
+ // 娓呴櫎琛ㄥ崟楠岃瘉
+ this.$nextTick(() => {
+ if (this.$refs.reviewFormRef) {
+ this.$refs.reviewFormRef.clearValidate()
+ }
+ })
+ },
+
+ // 鎻愪氦瀹℃牳 [2,6](@ref)
+ async submitReview() {
+ try {
+ // 琛ㄥ崟楠岃瘉
+ if (this.reviewForm.reviewStatus === 2) {
+ if (!this.reviewForm.rejectReason) {
+ this.$message.error('璇峰~鍐欓┏鍥炲師鍥�')
+ return
+ }
+ }
+
+ if (!this.reviewForm.assignDoctor) {
+ this.$message.error('璇烽�夋嫨鍒嗛厤鍖荤敓')
+ return
+ }
+
+ // 妯℃嫙API璋冪敤
+ await new Promise(resolve => setTimeout(resolve, 1000))
+
+ // 鏇存柊褰撳墠琛岀殑鐘舵��
+ const currentIndex = this.reviewList.findIndex(item => item.id === this.currentRow.id)
+ if (currentIndex !== -1) {
+ this.reviewList[currentIndex].reviewStatus = this.reviewForm.reviewStatus
+ this.reviewList[currentIndex].reviewer = '褰撳墠鐢ㄦ埛'
+ this.reviewList[currentIndex].reviewTime = new Date().toLocaleString()
+ this.reviewList[currentIndex].rejectReason = this.reviewForm.rejectReason
+
+ // 濡傛灉瀹℃牳閫氳繃锛屽垎閰嶅尰鐢�
+ if (this.reviewForm.reviewStatus === 1) {
+ const doctor = this.availableDoctors.find(d => d.id === this.reviewForm.assignDoctor)
+ this.reviewList[currentIndex].expectDoctor = doctor ? doctor.name : this.reviewList[currentIndex].expectDoctor
+ }
+ }
+
+ this.$message.success(this.reviewForm.reviewStatus === 1 ? '瀹℃牳閫氳繃鎴愬姛' : '瀹℃牳椹冲洖鎴愬姛')
+ this.reviewDialogVisible = false
+ this.calculateStats() // 閲嶆柊璁$畻缁熻淇℃伅
+ } catch (error) {
+ console.error('瀹℃牳鎿嶄綔澶辫触:', error)
+ this.$message.error('瀹℃牳鎿嶄綔澶辫触')
+ }
+ },
+
+ // 鏌ョ湅璇︽儏
+ handleView(row) {
+ this.$message.info(`鏌ョ湅鎮h�� ${row.patientName} 鐨勭敵璇疯鎯卄)
+ // 瀹為檯寮�鍙戜腑璺宠浆鍒拌鎯呴〉
+ // this.$router.push({ path: '/patient/contract/apply-detail', query: { id: row.id } })
+ },
+
+ // 鎵归噺瀹℃牳閫氳繃
+ handleBatchApprove() {
+ const pendingItems = this.reviewList.filter(item => item.reviewStatus === 0)
+ if (pendingItems.length === 0) {
+ this.$message.warning('娌℃湁寰呭鏍哥殑鐢宠')
+ return
+ }
+
+ this.$confirm(`纭畾瑕佹壒閲忛�氳繃 ${pendingItems.length} 涓緟瀹℃牳鐢宠鍚楋紵`, '鎵归噺瀹℃牳', {
+ type: 'warning'
+ }).then(async () => {
+ try {
+ this.loading = true
+ // 妯℃嫙鎵归噺瀹℃牳API璋冪敤
+ await new Promise(resolve => setTimeout(resolve, 2000))
+
+ // 鏇存柊鎵�鏈夊緟瀹℃牳椤圭殑鐘舵��
+ pendingItems.forEach(item => {
+ item.reviewStatus = 1
+ item.reviewer = '褰撳墠鐢ㄦ埛'
+ item.reviewTime = new Date().toLocaleString()
+ })
+
+ this.$message.success(`鎵归噺瀹℃牳閫氳繃鎴愬姛锛屽叡澶勭悊 ${pendingItems.length} 涓敵璇穈)
+ this.calculateStats()
+ } catch (error) {
+ this.$message.error('鎵归噺瀹℃牳澶辫触')
+ } finally {
+ this.loading = false
+ }
+ })
+ },
+
+ // 瀵煎嚭瀹℃牳鏁版嵁
+ handleExport() {
+ const exportData = this.generateMockData()
+ // 瀹為檯寮�鍙戜腑杩欓噷搴旇璋冪敤瀵煎嚭API
+ console.log('瀵煎嚭鏁版嵁:', exportData)
+ this.$message.info('瀵煎嚭鍔熻兘寮�鍙戜腑锛屾暟鎹凡鎵撳嵃鍒版帶鍒跺彴')
+ }
+ },
+ watch: {
+ // 鐩戝惉瀹℃牳鐘舵�佸彉鍖栵紝鍔ㄦ�佽缃獙璇佽鍒� [6](@ref)
+ 'reviewForm.reviewStatus': function(newVal) {
+ this.$nextTick(() => {
+ if (this.$refs.reviewFormRef) {
+ this.$refs.reviewFormRef.clearValidate()
+ }
+ })
+ }
+ }
+}
+</script>
+<style lang="scss" scoped>
+.contract-review-page {
+ padding: 20px;
+ background: #f5f7fa;
+ min-height: calc(100vh - 60px);
+
+ .search-card {
+ margin-bottom: 20px;
+
+ ::v-deep .el-form-item {
+ margin-bottom: 0;
+ }
+ }
+
+ .stats-row {
+ margin-bottom: 20px;
+
+ .stat-item {
+ text-align: center;
+ padding: 20px;
+
+ .stat-number {
+ font-size: 32px;
+ font-weight: bold;
+ margin-bottom: 8px;
+ }
+
+ .stat-label {
+ font-size: 14px;
+ color: #666;
+ }
+ }
+ }
+
+ .patient-info {
+ .patient-name {
+ font-weight: 600;
+ margin-bottom: 4px;
+ color: #303133;
+ }
+
+ .patient-detail {
+ font-size: 12px;
+ color: #909399;
+ }
+ }
+
+ // 瀹℃牳鐘舵�佹牱寮�
+ .review-status {
+ padding: 4px 8px;
+ border-radius: 4px;
+ font-size: 12px;
+ font-weight: 500;
+
+ &.status-pending {
+ background: #fdf6ec;
+ color: #e6a23c;
+ }
+
+ &.status-approved {
+ background: #f0f9e8;
+ color: #67c23a;
+ }
+
+ &.status-rejected {
+ background: #fef0f0;
+ color: #f56c6c;
+ }
+ }
+
+ // 鐗规畩瑕佹眰鏂囨湰鏍峰紡
+ .special-requirements {
+ max-width: 200px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ &:hover {
+ white-space: normal;
+ overflow: visible;
+ background: white;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+ padding: 8px;
+ border-radius: 4px;
+ position: absolute;
+ z-index: 1000;
+ max-width: 300px;
+ }
+ }
+
+ // 琛ㄦ牸鏍峰紡
+ ::v-deep .el-table {
+ .el-table__header-wrapper {
+ th {
+ background-color: #f5f7fa;
+ color: #606266;
+ font-weight: 600;
+ }
+ }
+
+ .el-table__body {
+ tr {
+ transition: all 0.3s ease;
+
+ &:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+ }
+
+ &.pending-row {
+ background: #fdf6ec !important;
+
+ &:hover {
+ background: #faf2e6 !important;
+ }
+ }
+ }
+ }
+ }
+
+ // 瀹℃牳瀵硅瘽妗嗘牱寮�
+ .review-dialog {
+ ::v-deep .el-dialog {
+ border-radius: 8px;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+ }
+
+ .dialog-footer {
+ text-align: right;
+ margin-top: 20px;
+ }
+ }
+
+ // 鎿嶄綔鎸夐挳鏍峰紡
+ .action-buttons {
+ display: flex;
+ gap: 8px;
+
+ .el-button {
+ padding: 7px 12px;
+ border-radius: 4px;
+ font-size: 12px;
+
+ &.approve-btn {
+ background: #67c23a;
+ border-color: #67c23a;
+ color: white;
+
+ &:hover {
+ background: #5daf34;
+ border-color: #5daf34;
+ }
+ }
+
+ &.reject-btn {
+ background: #f56c6c;
+ border-color: #f56c6c;
+ color: white;
+
+ &:hover {
+ background: #e65c5c;
+ border-color: #e65c5c;
+ }
+ }
+
+ &.detail-btn {
+ color: #409eff;
+ border-color: #409eff;
+
+ &:hover {
+ background: #ecf5ff;
+ }
+ }
+ }
+ }
+
+ // 鎵归噺鎿嶄綔鏍�
+ .batch-actions {
+ background: #ecf5ff;
+ padding: 12px 20px;
+ margin-bottom: 16px;
+ border-radius: 4px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .batch-info {
+ color: #409eff;
+ font-size: 14px;
+ }
+ }
+
+ // 绌虹姸鎬佹牱寮�
+ .empty-state {
+ text-align: center;
+ padding: 40px 20px;
+ color: #909399;
+
+ .empty-icon {
+ font-size: 48px;
+ margin-bottom: 16px;
+ opacity: 0.5;
+ }
+
+ .empty-text {
+ font-size: 14px;
+ }
+ }
+
+ // 鍝嶅簲寮忚璁�
+ @media (max-width: 768px) {
+ padding: 10px;
+
+ .stats-row {
+ .el-col {
+ margin-bottom: 10px;
+ }
+ }
+
+ .action-buttons {
+ flex-direction: column;
+ }
+
+ .batch-actions {
+ flex-direction: column;
+ gap: 10px;
+ align-items: stretch;
+ }
+ }
+}
+</style>
diff --git a/src/views/patient/SignAcontract/index.vue b/src/views/patient/SignAcontract/index.vue
new file mode 100644
index 0000000..32c6166
--- /dev/null
+++ b/src/views/patient/SignAcontract/index.vue
@@ -0,0 +1,512 @@
+<template>
+ <div class="signed-patient-page">
+ <!-- 鎼滅储绛涢�夊尯鍩� -->
+ <el-card class="search-card" shadow="never">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px">
+ <el-row :gutter="20">
+ <el-col :span="6">
+ <el-form-item label="鎮h�呭鍚�" prop="patientName">
+ <el-input
+ v-model="queryParams.patientName"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ clearable
+ @keyup.enter="handleQuery"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="绛剧害鐘舵��" prop="contractStatus">
+ <el-select v-model="queryParams.contractStatus" placeholder="璇烽�夋嫨鐘舵��" clearable>
+ <el-option label="姝e父鏈嶅姟涓�" value="1" />
+ <el-option label="鍗冲皢鍒版湡" value="2" />
+ <el-option label="宸插埌鏈�" value="3" />
+ <el-option label="宸茬粓姝�" value="4" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鏈嶅姟濂楅" prop="servicePackage">
+ <el-select v-model="queryParams.servicePackage" placeholder="璇烽�夋嫨濂楅" clearable>
+ <el-option label="鍩虹鍋ュ悍绠$悊鍖�" value="1" />
+ <el-option label="鎱㈡�х梾绠$悊鍖�" value="2" />
+ <el-option label="鑰佸勾浜哄仴搴峰寘" value="3" />
+ <el-option label="瀛曚骇濡囦繚鍋ュ寘" value="4" />
+ <el-option label="鍎跨淇濆仴鍖�" value="5" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" @click="resetQuery">閲嶇疆</el-button>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ </el-card>
+
+ <!-- 缁熻淇℃伅鍗$墖 -->
+ <el-row :gutter="20" class="stats-row">
+ <el-col :span="6">
+ <el-card class="stats-card" shadow="hover">
+ <div class="stats-content">
+ <div class="stats-number">{{ stats.total }}</div>
+ <div class="stats-label">鎬荤绾︽偅鑰�</div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="6">
+ <el-card class="stats-card" shadow="hover">
+ <div class="stats-content">
+ <div class="stats-number" style="color: #67C23A;">{{ stats.active }}</div>
+ <div class="stats-label">姝e父鏈嶅姟涓�</div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="6">
+ <el-card class="stats-card" shadow="hover">
+ <div class="stats-content">
+ <div class="stats-number" style="color: #E6A23C;">{{ stats.expiring }}</div>
+ <div class="stats-label">鍗冲皢鍒版湡</div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="6">
+ <el-card class="stats-card" shadow="hover">
+ <div class="stats-content">
+ <div class="stats-number" style="color: #F56C6C;">{{ stats.expired }}</div>
+ <div class="stats-label">宸插埌鏈�/缁堟</div>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
+
+ <!-- 鏁版嵁琛ㄦ牸 -->
+ <el-card shadow="never">
+ <el-table
+ v-loading="loading"
+ :data="patientList"
+ @selection-change="handleSelectionChange"
+ style="width: 100%"
+ :default-sort="{prop: 'signDate', order: 'descending'}"
+ >
+ <el-table-column type="selection" width="55" />
+ <el-table-column label="鎮h�呬俊鎭�" min-width="180" fixed>
+ <template slot-scope="scope">
+ <div class="patient-info">
+ <div class="patient-name">{{ scope.row.patientName }}</div>
+ <div class="patient-detail">
+ {{ scope.row.gender }} | {{ scope.row.age }}宀� | {{ scope.row.phone }}
+ </div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="韬唤璇佸彿" prop="idCard" width="180" />
+ <el-table-column label="绛剧害鍖荤敓" prop="doctorName" width="120" />
+ <el-table-column label="鏈嶅姟濂楅" min-width="150">
+ <template slot-scope="scope">
+ <el-tag :type="getPackageType(scope.row.servicePackageId)">
+ {{ scope.row.servicePackage }}
+ </el-tag>
+ <div style="font-size: 12px; color: #666; margin-top: 4px;">
+ 鍛ㄦ湡: {{ scope.row.contractPeriod }}骞�
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍖呭惈鏈嶅姟" min-width="200">
+ <template slot-scope="scope">
+ <el-tooltip effect="dark" :content="scope.row.services.join('銆�')" placement="top">
+ <span>{{ scope.row.services.slice(0, 2).join('銆�') }}绛墈{ scope.row.services.length }}椤�</span>
+ </el-tooltip>
+ </template>
+ </el-table-column>
+ <el-table-column label="绛剧害鏃堕棿" prop="signDate" width="120" sortable />
+ <el-table-column label="鍒版湡鏃堕棿" prop="expireDate" width="120" />
+ <el-table-column label="鍓╀綑澶╂暟" width="100">
+ <template slot-scope="scope">
+ <span :class="getRemainingDaysClass(scope.row.remainingDays)">
+ {{ scope.row.remainingDays }}澶�
+ </span>
+ </template>
+ </el-table-column>
+ <el-table-column label="绛剧害鐘舵��" width="100" fixed="right">
+ <template slot-scope="scope">
+ <el-tag :type="getStatusType(scope.row.contractStatus)" effect="dark">
+ {{ getStatusText(scope.row.contractStatus) }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="200" fixed="right">
+ <template slot-scope="scope">
+ <el-button size="mini" type="text" @click="handleView(scope.row)">璇︽儏</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleRenew(scope.row)"
+ :disabled="scope.row.contractStatus === 1"
+ >缁害</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleTerminate(scope.row)"
+ :disabled="scope.row.contractStatus === 4"
+ style="color: #F56C6C;"
+ >缁堟</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-card>
+ </div>
+</template>
+
+<script>
+export default {
+ name: 'SignedPatientList',
+ data() {
+ return {
+ loading: false,
+ ids: [],
+ stats: {
+ total: 0,
+ active: 0,
+ expiring: 0,
+ expired: 0
+ },
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ patientName: undefined,
+ contractStatus: undefined,
+ servicePackage: undefined
+ },
+ total: 0,
+ patientList: [],
+ // 鏈嶅姟濂楅閰嶇疆
+ servicePackages: {
+ '1': {
+ name: '鍩虹鍋ュ悍绠$悊鍖�',
+ services: ['骞村害鍋ュ悍璇勪及', '鍦ㄧ嚎鍋ュ悍鍜ㄨ', '鍋ュ悍妗f绠$悊', '瀹氭湡鍋ュ悍鎻愰啋'],
+ price: 0,
+ color: 'info'
+ },
+ '2': {
+ name: '鎱㈡�х梾绠$悊鍖�',
+ services: ['涓撳睘鍖荤敓鏈嶅姟', '鐢ㄨ嵂鎸囧绠$悊', '瀹氭湡闅忚鐩戞祴', '涓�у寲搴峰璁″垝', '绱ф�ュ尰鐤楀挩璇�'],
+ price: 299,
+ color: 'success'
+ },
+ '3': {
+ name: '鑰佸勾浜哄仴搴峰寘',
+ services: ['璺屽�掗闄╄瘎浼�', '搴峰璁粌鎸囧', '鐢ㄨ嵂瀹夊叏绠$悊', '瀹氭湡涓婇棬璁胯', '绱ф�ヨ仈绯绘湇鍔�', '蹇冪悊鍋ュ悍鍏虫��'],
+ price: 499,
+ color: 'warning'
+ },
+ '4': {
+ name: '瀛曚骇濡囦繚鍋ュ寘',
+ services: ['瀛曟湡鍋ュ悍绠$悊', '浜у悗搴峰鎸囧', '鏂扮敓鍎挎姢鐞嗗挩璇�', '钀ュ吇鑶抽寤鸿', '蹇冪悊鎯呯华鏀寔'],
+ price: 399,
+ color: 'danger'
+ },
+ '5': {
+ name: '鍎跨淇濆仴鍖�',
+ services: ['鐢熼暱鍙戣偛鐩戞祴', '鐤嫍鎺ョ绠$悊', '甯歌鐥呴槻娌�', '钀ュ吇鎸囧', '鏃╂湡鏁欒偛鍜ㄨ'],
+ price: 199,
+ color: 'primary'
+ }
+ }
+ }
+ },
+ created() {
+ this.getList()
+ this.calculateStats()
+ },
+ methods: {
+ // 鐢熸垚鏇寸湡瀹炵殑妯℃嫙鏁版嵁
+ // 绮剧畝鍚庣殑妯℃嫙鏁版嵁鐢熸垚鏂规硶
+// 浼樺寲鍚庣殑妯℃嫙鏁版嵁鐢熸垚鏂规硶
+generateMockData() {
+ const mockData = []
+
+ // 浣跨敤鎮ㄦ彁渚涚殑鐪熷疄濮撳悕鍒楄〃
+ const patientNames = [
+ '鏉庤倗鑺�', '鍗㈡湪浠�', '鏉庢垚鐧�', '鏂瑰厗鐜�', '鍒樼繆鎯�', '涓佹眽鑷�', '鍚翠匠鐟�', '鑸掔豢鐝�',
+ '鍛ㄧ櫧鑺�', '寮犲Э濡�', '寮犺櫣浼�', '鍛ㄧ惣鐜�', '鍊�¤姵', '閮吹濡�', '鏉ㄤ僵鑺�', '榛勬枃鏃�',
+ '榛勭洓鐜�', '閮戜附闈�', '璁告櫤浜�', '寮犲瓱娑�', '鏉庡皬鐖�', '鐜嬫仼榫�', '鏈辨斂寤�', '閭撹瘲娑�',
+ '闄堟斂鍊�', '鍚翠繆浼�', '闃Θ瀛�', '缈佹儬鐝�', '鍚存�濈堪', '鏋椾僵鐜�'
+ ]
+
+ const doctors = ['鐜嬪尰鐢�', '鏉庡尰鐢�', '寮犲尰鐢�', '鍒樺尰鐢�', '闄堝尰鐢�']
+ const cities = ['鍖椾含甯�', '涓婃捣甯�', '骞垮窞甯�', '娣卞湷甯�', '鏉窞甯�', '鍗椾含甯�', '鎴愰兘甯�']
+ const areas = ['鏈濋槼鍖�', '娴锋穩鍖�', '娴︿笢鏂板尯', '榛勬郸鍖�', '澶╂渤鍖�', '绂忕敯鍖�', '瑗挎箹鍖�']
+
+ // 鐢熸垚绾�20鏉℃暟鎹�
+ for (let i = 0; i < patientNames.length; i++) {
+ const packageId = (i % 5) + 1 + ''
+ const packageInfo = this.servicePackages[packageId]
+
+ // 鐢熸垚鏇村悎鐞嗙殑绛剧害鏃堕棿锛堣繃鍘�1骞村唴锛�
+ const signDate = this.generateRandomDate('2023-12-01', '2024-11-30')
+ const contractPeriod = [1, 2][i % 2] // 1骞存垨2骞村悎鍚�
+ const expireDate = this.addYears(signDate, contractPeriod)
+ const remainingDays = this.calculateRemainingDays(expireDate)
+ const contractStatus = this.getContractStatus(expireDate, remainingDays)
+
+ // 鐢熸垚鏇寸湡瀹炵殑鐢佃瘽鍙风爜鍜岃韩浠借瘉鍙�
+ const phonePrefix = ['138', '139', '150', '151', '152', '186', '187', '188']
+ const phone = `${phonePrefix[i % phonePrefix.length]}${this.padNumber(1000 + i * 37, 4)}${this.padNumber(i % 100, 2)}`
+
+ // 鐢熸垚鍚堢悊鐨勫勾榫勶紙20-80宀侊級
+ const age = 20 + (i % 60)
+ const birthYear = new Date().getFullYear() - age
+ const idCard = `11010${birthYear}${this.padNumber(1 + (i % 12), 2)}${this.padNumber(1 + (i % 28), 2)}${this.padNumber(i % 1000, 3)}X`
+
+ mockData.push({
+ id: `P${2024000 + i}`,
+ patientName: patientNames[i],
+ gender: i % 2 === 0 ? '鐢�' : '濂�',
+ age: age,
+ phone: phone,
+ idCard: idCard,
+ doctorName: doctors[i % doctors.length],
+ servicePackageId: packageId,
+ servicePackage: packageInfo.name,
+ services: packageInfo.services,
+ contractPeriod: contractPeriod,
+ signDate: signDate,
+ expireDate: expireDate,
+ remainingDays: remainingDays,
+ contractStatus: contractStatus,
+ address: `${cities[i % cities.length]}${areas[i % areas.length]}${this.generateStreet(i)}` // 鏂板鍦板潃瀛楁
+ })
+ }
+
+ return mockData
+},
+
+// 鏂板杈呭姪鏂规硶锛氱敓鎴愯閬撳湴鍧�
+generateStreet(index) {
+ const streets = [
+ '涓北璺�123鍙�', '浜烘皯璺�456鍙�', '瑙f斁璺�789鍙�', '寤鸿璺�101鍙�', '鍜屽钩璺�202鍙�',
+ '鏂板崕璺�303鍙�', '鍏夋槑璺�404鍙�', '骞哥璺�505鍙�', '鍥㈢粨璺�606鍙�', '鏂囨槑璺�707鍙�'
+ ]
+ return streets[index % streets.length]
+},
+
+ // 杈呭姪鏂规硶
+ generateRandomDate(start, end) {
+ const startDate = new Date(start).getTime()
+ const endDate = new Date(end).getTime()
+ const randomTime = startDate + Math.random() * (endDate - startDate)
+ return new Date(randomTime).toISOString().split('T')[0]
+ },
+
+ addYears(date, years) {
+ const result = new Date(date)
+ result.setFullYear(result.getFullYear() + years)
+ return result.toISOString().split('T')[0]
+ },
+
+ calculateRemainingDays(expireDate) {
+ const today = new Date()
+ const expire = new Date(expireDate)
+ const diffTime = expire - today
+ return Math.ceil(diffTime / (1000 * 60 * 60 * 24))
+ },
+
+ getContractStatus(expireDate, remainingDays) {
+ if (remainingDays < 0) return 3 // 宸插埌鏈�
+ if (remainingDays <= 30) return 2 // 鍗冲皢鍒版湡
+ return 1 // 姝e父鏈嶅姟涓�
+ },
+
+ padNumber(num, length) {
+ return num.toString().padStart(length, '0')
+ },
+
+ // 鑾峰彇鎮h�呭垪琛�
+ async getList() {
+ this.loading = true
+ try {
+ // 妯℃嫙API璋冪敤寤惰繜
+ await new Promise(resolve => setTimeout(resolve, 500))
+
+ const allData = this.generateMockData()
+ // 绠�鍗曠殑鏈湴绛涢��
+ let filteredData = allData.filter(item => {
+ if (this.queryParams.patientName &&
+ !item.patientName.includes(this.queryParams.patientName)) {
+ return false
+ }
+ if (this.queryParams.contractStatus &&
+ item.contractStatus !== parseInt(this.queryParams.contractStatus)) {
+ return false
+ }
+ if (this.queryParams.servicePackage &&
+ item.servicePackageId !== this.queryParams.servicePackage) {
+ return false
+ }
+ return true
+ })
+
+ // 鍒嗛〉澶勭悊
+ const start = (this.queryParams.pageNum - 1) * this.queryParams.pageSize
+ const end = start + this.queryParams.pageSize
+ this.patientList = filteredData.slice(start, end)
+ this.total = filteredData.length
+
+ this.calculateStats()
+ } catch (error) {
+ console.error('鑾峰彇鏁版嵁澶辫触:', error)
+ this.$message.error('鏁版嵁鍔犺浇澶辫触')
+ } finally {
+ this.loading = false
+ }
+ },
+
+ // 璁$畻缁熻淇℃伅
+ calculateStats() {
+ const allData = this.generateMockData()
+ this.stats.total = allData.length
+ this.stats.active = allData.filter(item => item.contractStatus === 1).length
+ this.stats.expiring = allData.filter(item => item.contractStatus === 2).length
+ this.stats.expired = allData.filter(item => item.contractStatus === 3).length
+ },
+
+ // 鐘舵�佺浉鍏虫柟娉�
+ getStatusText(status) {
+ const statusMap = { 1: '姝e父鏈嶅姟涓�', 2: '鍗冲皢鍒版湡', 3: '宸插埌鏈�', 4: '宸茬粓姝�' }
+ return statusMap[status] || '鏈煡'
+ },
+
+ getStatusType(status) {
+ const typeMap = { 1: 'success', 2: 'warning', 3: 'danger', 4: 'info' }
+ return typeMap[status] || 'info'
+ },
+
+ getPackageType(packageId) {
+ const typeMap = { '1': 'info', '2': 'success', '3': 'warning', '4': 'danger', '5': 'primary' }
+ return typeMap[packageId] || 'info'
+ },
+
+ getRemainingDaysClass(days) {
+ if (days < 0) return 'expired'
+ if (days <= 30) return 'expiring'
+ return 'normal'
+ },
+
+ // 鎿嶄綔鏂规硶
+ handleQuery() {
+ this.queryParams.pageNum = 1
+ this.getList()
+ },
+
+ resetQuery() {
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ patientName: undefined,
+ contractStatus: undefined,
+ servicePackage: undefined
+ }
+ this.handleQuery()
+ },
+
+ handleSelectionChange(selection) {
+ this.ids = selection.map(item => item.id)
+ },
+
+ handleView(row) {
+ this.$message.info(`鏌ョ湅鎮h�� ${row.patientName} 鐨勮鎯卄)
+ // 瀹為檯寮�鍙戜腑璺宠浆鍒拌鎯呴〉
+ // this.$router.push({ path: '/patient/contract/detail', query: { id: row.id } })
+ },
+
+ handleRenew(row) {
+ this.$confirm(`纭畾瑕佷负鎮h�� ${row.patientName} 鍔炵悊缁害鍚楋紵`, '鎻愮ず', {
+ type: 'warning'
+ }).then(() => {
+ this.$message.success('缁害鎿嶄綔鎴愬姛')
+ })
+ },
+
+ handleTerminate(row) {
+ this.$confirm(`纭畾瑕佺粓姝笌 ${row.patientName} 鐨勭绾﹀叧绯诲悧锛熸鎿嶄綔涓嶅彲鎾ら攢銆俙, '璀﹀憡', {
+ type: 'error',
+ confirmButtonText: '纭畾缁堟',
+ cancelButtonText: '鍙栨秷'
+ }).then(() => {
+ this.$message.success('绛剧害鍏崇郴宸茬粓姝�')
+ this.getList()
+ })
+ }
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.signed-patient-page {
+ padding: 20px;
+
+ .search-card {
+ margin-bottom: 20px;
+ }
+
+ .stats-row {
+ margin-bottom: 20px;
+
+ .stats-card {
+ .stats-content {
+ text-align: center;
+ padding: 10px;
+
+ .stats-number {
+ font-size: 28px;
+ font-weight: bold;
+ color: #409EFF;
+ margin-bottom: 8px;
+ }
+
+ .stats-label {
+ font-size: 14px;
+ color: #666;
+ }
+ }
+ }
+ }
+
+ .patient-info {
+ .patient-name {
+ font-weight: 600;
+ margin-bottom: 4px;
+ }
+
+ .patient-detail {
+ font-size: 12px;
+ color: #666;
+ }
+ }
+
+ .expired {
+ color: #F56C6C;
+ font-weight: bold;
+ }
+
+ .expiring {
+ color: #E6A23C;
+ font-weight: bold;
+ }
+
+ .normal {
+ color: #67C23A;
+ }
+}
+</style>
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index 270fb81..3092bca 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -73,20 +73,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <!-- <el-form-item label="鎮h�呰寖鍥�" prop="tagId">
+ <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>
+ <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
v-model="queryParams.telcode"
@@ -313,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"
@@ -738,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>
<!-- 椋庨櫓绫诲瀷 -->
@@ -846,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: "鎶ょ収" },
@@ -970,6 +1142,7 @@
queryParams: {
pageNum: 1,
allhosp: "0",
+ sex: 1,
pageSize: 10,
searchscope: 2,
notrequiredFlag: 0,
@@ -1031,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�呭垪琛� */
@@ -1090,8 +1267,76 @@
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;
@@ -1131,7 +1376,7 @@
pageSize: 10,
searchscope: 2,
};
- this.handleQuery();
+ this.handleQuery();
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
@@ -1148,12 +1393,12 @@
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
- const userIds = row.id || this.ids;
- particularpatient(userIds).then((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() {
@@ -1223,23 +1468,20 @@
},
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;
@@ -1345,6 +1587,18 @@
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;
// margin: 20px;
diff --git a/src/views/patient/patient/profile/index.vue b/src/views/patient/patient/profile/index.vue
index df9c840..73e600f 100644
--- a/src/views/patient/patient/profile/index.vue
+++ b/src/views/patient/patient/profile/index.vue
@@ -212,6 +212,316 @@
</el-form-item>
</el-col>
</el-row>
+ <!-- 绛涙煡鎽樿妯″潡 -->
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <div class="screening-summary">
+ <div class="summary-header">
+ <i class="el-icon-search"></i>
+ <span>绛涙煡鎽樿</span>
+ <div
+ style="
+ margin-left: auto;
+ display: flex;
+ align-items: center;
+ "
+ >
+ <el-button
+ type="primary"
+ size="mini"
+ @click="addScreening"
+ >
+ <i class="el-icon-plus"></i> 鏂板
+ </el-button>
+ <el-button
+ type="text"
+ size="mini"
+ @click="refreshScreeningData"
+ style="margin-left: 10px"
+ >
+ <i class="el-icon-refresh"></i> 鍒锋柊
+ </el-button>
+ </div>
+ </div>
+ <div class="summary-content">
+ <el-table
+ :data="screeningSummaryData"
+ border
+ size="mini"
+ height="200"
+ v-loading="screeningLoading"
+ >
+ <el-table-column
+ prop="screeningType"
+ label="绛涙煡绫诲瀷"
+ width="100"
+ >
+ <template slot-scope="scope">
+ <el-tag
+ :type="getScreeningTagType(scope.row.screeningType)"
+ >
+ {{ scope.row.screeningType }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="screeningDate"
+ label="绛涙煡鏃ユ湡"
+ width="100"
+ >
+ <template slot-scope="scope">
+ {{ formatTime(scope.row.screeningDate) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="result" label="缁撴灉" width="80">
+ <template slot-scope="scope">
+ <el-tag
+ :type="
+ scope.row.result === '姝e父'
+ ? 'success'
+ : scope.row.result === '寮傚父'
+ ? 'danger'
+ : 'warning'
+ "
+ size="small"
+ >
+ {{ scope.row.result }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="details"
+ label="璇︾粏缁撴灉"
+ min-width="120"
+ >
+ <template slot-scope="scope">
+ <el-tooltip
+ :content="scope.row.details"
+ placement="top"
+ v-if="
+ scope.row.details && scope.row.details.length > 10
+ "
+ >
+ <span
+ >{{ scope.row.details.substring(0, 10) }}...</span
+ >
+ </el-tooltip>
+ <span v-else>{{ scope.row.details }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="150" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ type="primary"
+ size="mini"
+ @click="editScreening(scope.$index, scope.row)"
+ >
+ 缂栬緫
+ </el-button>
+ <el-button
+ type="danger"
+ size="mini"
+ @click="deleteScreening(scope.$index, scope.row)"
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="summary-stats">
+ <el-row :gutter="10">
+ <el-col :span="8">
+ <div class="stat-item">
+ <div class="stat-value" style="color: #67c23a">
+ {{ screeningStats.normal }}
+ </div>
+ <div class="stat-label">姝e父</div>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="stat-item">
+ <div class="stat-value" style="color: #e6a23c">
+ {{ screeningStats.abnormal }}
+ </div>
+ <div class="stat-label">寮傚父</div>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="stat-item">
+ <div class="stat-value" style="color: #f56c6c">
+ {{ screeningStats.critical }}
+ </div>
+ <div class="stat-label">鍗辨��</div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+ </div>
+ </el-col>
+
+ <!-- 鎱㈢梾鎽樿妯″潡 -->
+ <el-col :span="12">
+ <div class="chronic-disease-summary">
+ <div class="summary-header">
+ <i class="el-icon-document"></i>
+ <span>鎱㈢梾鎽樿</span>
+ <div
+ style="
+ margin-left: auto;
+ display: flex;
+ align-items: center;
+ "
+ >
+ <el-button
+ type="primary"
+ size="mini"
+ @click="addChronicDisease"
+ >
+ <i class="el-icon-plus"></i> 鏂板
+ </el-button>
+ <el-button
+ type="text"
+ size="mini"
+ @click="refreshChronicData"
+ style="margin-left: 10px"
+ >
+ <i class="el-icon-refresh"></i> 鍒锋柊
+ </el-button>
+ </div>
+ </div>
+ <div class="summary-content">
+ <el-table
+ :data="chronicDiseaseData"
+ border
+ size="mini"
+ height="200"
+ v-loading="chronicLoading"
+ >
+ <el-table-column
+ prop="diseaseName"
+ label="鐤剧梾鍚嶇О"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <el-tag
+ :type="getDiseaseTagType(scope.row.diseaseName)"
+ >
+ {{ scope.row.diseaseName }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="diagnoseDate"
+ label="纭瘖鏃ユ湡"
+ width="100"
+ >
+ <template slot-scope="scope">
+ {{ formatTime(scope.row.diagnoseDate) }}
+ </template>
+ </el-table-column>
+ <el-table-column prop="status" label="鐘舵��" width="80">
+ <template slot-scope="scope">
+ <el-tag
+ :type="
+ scope.row.status === '绋冲畾'
+ ? 'success'
+ : scope.row.status === '娲诲姩鏈�'
+ ? 'warning'
+ : 'danger'
+ "
+ size="small"
+ >
+ {{ scope.row.status }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="currentTreatment"
+ label="褰撳墠娌荤枟"
+ min-width="120"
+ >
+ <template slot-scope="scope">
+ <el-tooltip
+ :content="scope.row.currentTreatment"
+ placement="top"
+ v-if="
+ scope.row.currentTreatment &&
+ scope.row.currentTreatment.length > 10
+ "
+ >
+ <span
+ >{{
+ scope.row.currentTreatment.substring(0, 10)
+ }}...</span
+ >
+ </el-tooltip>
+ <span v-else>{{ scope.row.currentTreatment }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" width="150" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ type="primary"
+ size="mini"
+ @click="editChronicDisease(scope.$index, scope.row)"
+ >
+ 缂栬緫
+ </el-button>
+ <el-button
+ type="danger"
+ size="mini"
+ @click="
+ deleteChronicDisease(scope.$index, scope.row)
+ "
+ >
+ 鍒犻櫎
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div class="summary-stats">
+ <el-row :gutter="10">
+ <el-col :span="6">
+ <div class="stat-item">
+ <div class="stat-value" style="color: #67c23a">
+ {{ chronicStats.stable }}
+ </div>
+ <div class="stat-label">绋冲畾</div>
+ </div>
+ </el-col>
+ <el-col :span="6">
+ <div class="stat-item">
+ <div class="stat-value" style="color: #e6a23c">
+ {{ chronicStats.active }}
+ </div>
+ <div class="stat-label">娲诲姩鏈�</div>
+ </div>
+ </el-col>
+ <el-col :span="6">
+ <div class="stat-item">
+ <div class="stat-value" style="color: #f56c6c">
+ {{ chronicStats.severe }}
+ </div>
+ <div class="stat-label">涓ラ噸</div>
+ </div>
+ </el-col>
+ <el-col :span="6">
+ <div class="stat-item">
+ <div class="stat-value" style="color: #909399">
+ {{ chronicStats.total }}
+ </div>
+ <div class="stat-label">鎬绘暟</div>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+ </div>
+ </el-col>
+ </el-row>
</el-form>
</div>
</div>
@@ -923,7 +1233,147 @@
</div>
</div> -->
</div>
+ <!-- 绛涙煡鎽樿缂栬緫瀵硅瘽妗� -->
+ <el-dialog
+ :title="screeningEditing ? '缂栬緫绛涙煡璁板綍' : '鏂板绛涙煡璁板綍'"
+ :visible.sync="screeningDialogVisible"
+ width="600px"
+ >
+ <el-form :model="screeningForm" label-width="100px">
+ <el-form-item label="绛涙煡绫诲瀷" prop="screeningType" required>
+ <el-select
+ v-model="screeningForm.screeningType"
+ placeholder="璇烽�夋嫨绛涙煡绫诲瀷"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in screeningTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="绛涙煡鏃ユ湡" prop="screeningDate" required>
+ <el-date-picker
+ v-model="screeningForm.screeningDate"
+ type="datetime"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ placeholder="閫夋嫨绛涙煡鏃ユ湡"
+ style="width: 100%"
+ >
+ </el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="绛涙煡缁撴灉" prop="result" required>
+ <el-select
+ v-model="screeningForm.result"
+ placeholder="璇烽�夋嫨缁撴灉"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in resultOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="璇︾粏缁撴灉" prop="details">
+ <el-input
+ type="textarea"
+ :rows="3"
+ v-model="screeningForm.details"
+ placeholder="璇疯緭鍏ヨ缁嗙粨鏋滀俊鎭�"
+ >
+ </el-input>
+ </el-form-item>
+ </el-form>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="screeningDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="saveScreening">纭畾</el-button>
+ </div>
+ </el-dialog>
+
+ <!-- 鎱㈢梾鎽樿缂栬緫瀵硅瘽妗� -->
+ <el-dialog
+ :title="chronicEditing ? '缂栬緫鎱㈢梾璁板綍' : '鏂板鎱㈢梾璁板綍'"
+ :visible.sync="chronicDialogVisible"
+ width="600px"
+ >
+ <el-form :model="chronicForm" label-width="100px">
+ <el-form-item label="鐤剧梾鍚嶇О" prop="diseaseName" required>
+ <el-select
+ v-model="chronicForm.diseaseName"
+ placeholder="璇烽�夋嫨鐤剧梾鍚嶇О"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in diseaseOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="纭瘖鏃ユ湡" prop="diagnoseDate" required>
+ <el-date-picker
+ v-model="chronicForm.diagnoseDate"
+ type="date"
+ value-format="yyyy-MM-dd"
+ placeholder="閫夋嫨纭瘖鏃ユ湡"
+ style="width: 100%"
+ >
+ </el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="褰撳墠鐘舵��" prop="status" required>
+ <el-select
+ v-model="chronicForm.status"
+ placeholder="璇烽�夋嫨鐘舵��"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in statusOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item label="褰撳墠娌荤枟" prop="currentTreatment">
+ <el-input
+ type="textarea"
+ :rows="2"
+ v-model="chronicForm.currentTreatment"
+ placeholder="璇疯緭鍏ュ綋鍓嶆不鐤楁柟妗�"
+ >
+ </el-input>
+ </el-form-item>
+
+ <el-form-item label="闅忚璁″垝" prop="followUpPlan">
+ <el-input
+ v-model="chronicForm.followUpPlan"
+ placeholder="璇疯緭鍏ラ殢璁胯鍒�"
+ >
+ </el-input>
+ </el-form-item>
+ </el-form>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="chronicDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="saveChronicDisease">纭畾</el-button>
+ </div>
+ </el-dialog>
<el-dialog :title="titletb" :visible.sync="AddanumberVisible">
<el-form :model="numberform" label-width="100px">
<el-form-item label="濮撳悕">
@@ -984,7 +1434,7 @@
</el-date-picker> -->
<el-date-picker
v-model="borninfoform.generatedTime"
- value-format="yyyy-MM-dd HH:mm:ss"
+ value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="閫夋嫨鏃ユ湡鏃堕棿"
>
@@ -1065,6 +1515,24 @@
sonactiveName: "inhospital", //鍋ュ悍鐩戞祴瀵艰埅
sontwoactiveName: "weight", //鍖荤枟妗f瀵艰埅
dynamicTags: [],
+ // 绛涙煡鎽樿鐩稿叧鏁版嵁
+ screeningLoading: false,
+ screeningSummaryData: [],
+ screeningStats: {
+ normal: 0,
+ abnormal: 0,
+ critical: 0,
+ },
+
+ // 鎱㈢梾鎽樿鐩稿叧鏁版嵁
+ chronicLoading: false,
+ chronicDiseaseData: [],
+ chronicStats: {
+ stable: 0,
+ active: 0,
+ severe: 0,
+ total: 0,
+ },
borninforules: {
height: [
{ required: true, message: "韬暱涓嶈兘涓虹┖", trigger: "blur" },
@@ -1166,6 +1634,58 @@
xtechartdom: {},
tzechartdom: {},
tableData: [],
+ // 绛涙煡鎽樿缂栬緫鐩稿叧
+ screeningEditing: false,
+ screeningEditIndex: -1,
+ screeningEditTemp: {},
+ screeningDialogVisible: false,
+ screeningForm: {
+ screeningType: "",
+ screeningDate: "",
+ result: "姝e父",
+ details: "",
+ },
+
+ // 鎱㈢梾鎽樿缂栬緫鐩稿叧
+ chronicEditing: false,
+ chronicEditIndex: -1,
+ chronicEditTemp: {},
+ chronicDialogVisible: false,
+ chronicForm: {
+ diseaseName: "",
+ diagnoseDate: "",
+ status: "绋冲畾",
+ currentTreatment: "",
+ followUpPlan: "",
+ },
+
+ // 绛涢�夐�夐」
+ resultOptions: [
+ { label: "姝e父", value: "姝e父" },
+ { label: "寮傚父", value: "寮傚父" },
+ { label: "鍗辨��", value: "鍗辨��" },
+ ],
+
+ statusOptions: [
+ { label: "绋冲畾", value: "绋冲畾" },
+ { label: "娲诲姩鏈�", value: "娲诲姩鏈�" },
+ { label: "涓ラ噸", value: "涓ラ噸" },
+ ],
+
+ screeningTypeOptions: [
+ { label: "蹇冭绠�", value: "蹇冭绠�" },
+ { label: "绯栧翱鐥�", value: "绯栧翱鐥�" },
+ { label: "鑲跨槫鏍囧織", value: "鑲跨槫鏍囧織" },
+ { label: "鑲惧姛鑳�", value: "鑲惧姛鑳�" },
+ { label: "鍛煎惛绯荤粺", value: "鍛煎惛绯荤粺" },
+ ],
+
+ diseaseOptions: [
+ { label: "楂樿鍘�", value: "楂樿鍘�" },
+ { label: "2鍨嬬硸灏跨梾", value: "2鍨嬬硸灏跨梾" },
+ { label: "鍐犲績鐥�", value: "鍐犲績鐥�" },
+ { label: "鎱㈡�ц偩鐥�", value: "鎱㈡�ц偩鐥�" },
+ ],
tableDatalist: [
{
id: 12,
@@ -1277,6 +1797,9 @@
this.id = this.$route.query.id;
this.getuserinfo();
this.gettabList();
+ // 鍒濆鍖栫瓫鏌ュ拰鎱㈢梾鏁版嵁
+ this.initScreeningData();
+ this.initChronicDiseaseData();
},
methods: {
@@ -1306,6 +1829,147 @@
}
});
}
+ },
+ /** 绛涙煡鎽樿 - 鏂板 */
+ addScreening() {
+ this.screeningEditing = false;
+ this.screeningEditIndex = -1;
+ this.screeningForm = {
+ screeningType: "",
+ screeningDate: new Date().toISOString().split("T")[0] + " 09:00:00",
+ result: "姝e父",
+ details: "",
+ };
+ this.screeningDialogVisible = true;
+ },
+
+ /** 绛涙煡鎽樿 - 缂栬緫 */
+ editScreening(index, row) {
+ this.screeningEditing = true;
+ this.screeningEditIndex = index;
+ this.screeningForm = { ...row };
+ this.screeningDialogVisible = true;
+ },
+
+ /** 绛涙煡鎽樿 - 淇濆瓨 */
+ saveScreening() {
+ if (
+ !this.screeningForm.screeningType ||
+ !this.screeningForm.screeningDate
+ ) {
+ this.$message.error("璇峰~鍐欏繀濉瓧娈�");
+ return;
+ }
+
+ if (this.screeningEditing) {
+ // 缂栬緫鐜版湁璁板綍
+ this.screeningSummaryData.splice(this.screeningEditIndex, 1, {
+ ...this.screeningForm,
+ id: this.screeningSummaryData[this.screeningEditIndex].id,
+ });
+ this.$message.success("绛涙煡璁板綍淇敼鎴愬姛");
+ } else {
+ // 鏂板璁板綍
+ const newRecord = {
+ id: Date.now(), // 涓存椂ID
+ ...this.screeningForm,
+ riskLevel: this.getRiskLevelByResult(this.screeningForm.result),
+ };
+ this.screeningSummaryData.unshift(newRecord);
+ this.$message.success("绛涙煡璁板綍鏂板鎴愬姛");
+ }
+
+ this.calculateScreeningStats();
+ this.screeningDialogVisible = false;
+ },
+
+ /** 绛涙煡鎽樿 - 鍒犻櫎 */
+ deleteScreening(index, row) {
+ this.$confirm("纭畾瑕佸垹闄よ繖鏉$瓫鏌ヨ褰曞悧锛�", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ this.screeningSummaryData.splice(index, 1);
+ this.calculateScreeningStats();
+ this.$message.success("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+
+ /** 鏍规嵁缁撴灉鑾峰彇椋庨櫓绛夌骇 */
+ getRiskLevelByResult(result) {
+ const riskMap = {
+ 姝e父: "low",
+ 寮傚父: "medium",
+ 鍗辨��: "critical",
+ };
+ return riskMap[result] || "low";
+ },
+ /** 鎱㈢梾鎽樿 - 鏂板 */
+ addChronicDisease() {
+ this.chronicEditing = false;
+ this.chronicEditIndex = -1;
+ this.chronicForm = {
+ diseaseName: "",
+ diagnoseDate: new Date().toISOString().split("T")[0],
+ status: "绋冲畾",
+ currentTreatment: "",
+ followUpPlan: "姣忔湀澶嶈瘖涓�娆�",
+ };
+ this.chronicDialogVisible = true;
+ },
+
+ /** 鎱㈢梾鎽樿 - 缂栬緫 */
+ editChronicDisease(index, row) {
+ this.chronicEditing = true;
+ this.chronicEditIndex = index;
+ this.chronicForm = { ...row };
+ this.chronicDialogVisible = true;
+ },
+
+ /** 鎱㈢梾鎽樿 - 淇濆瓨 */
+ saveChronicDisease() {
+ if (!this.chronicForm.diseaseName || !this.chronicForm.diagnoseDate) {
+ this.$message.error("璇峰~鍐欏繀濉瓧娈�");
+ return;
+ }
+
+ if (this.chronicEditing) {
+ // 缂栬緫鐜版湁璁板綍
+ this.chronicDiseaseData.splice(this.chronicEditIndex, 1, {
+ ...this.chronicForm,
+ id: this.chronicDiseaseData[this.chronicEditIndex].id,
+ });
+ this.$message.success("鎱㈢梾璁板綍淇敼鎴愬姛");
+ } else {
+ // 鏂板璁板綍
+ const newRecord = {
+ id: Date.now(), // 涓存椂ID
+ ...this.chronicForm,
+ };
+ this.chronicDiseaseData.unshift(newRecord);
+ this.$message.success("鎱㈢梾璁板綍鏂板鎴愬姛");
+ }
+
+ this.calculateChronicStats();
+ this.chronicDialogVisible = false;
+ },
+
+ /** 鎱㈢梾鎽樿 - 鍒犻櫎 */
+ deleteChronicDisease(index, row) {
+ this.$confirm("纭畾瑕佸垹闄よ繖鏉℃參鐥呰褰曞悧锛�", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ this.chronicDiseaseData.splice(index, 1);
+ this.calculateChronicStats();
+ this.$message.success("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
},
checkAgeExists(newAge) {
// 鍋囪宸叉湁鏁版嵁瀛樺偍鍦� this.existingData 涓�
@@ -1341,6 +2005,232 @@
});
// 鑱旂郴淇℃伅
this.getcontactlist();
+ },
+ /** 鍒濆鍖栫瓫鏌ユ憳瑕佹暟鎹� */
+ initScreeningData() {
+ // 妯℃嫙绛涙煡鎽樿鏁版嵁[1,4](@ref)
+ this.screeningSummaryData = [
+ {
+ id: 1,
+ screeningType: "蹇冭绠�",
+ screeningDate: "2024-11-15 09:00:00",
+ result: "寮傚父",
+ details: "蹇冪數鍥炬樉绀篠T娈靛帇浣庯紝寤鸿杩涗竴姝ユ鏌�",
+ riskLevel: "high",
+ },
+ {
+ id: 2,
+ screeningType: "绯栧翱鐥�",
+ screeningDate: "2024-11-10 14:30:00",
+ result: "姝e父",
+ details: "绌鸿吂琛�绯�5.6mmol/L锛岀硸鍖栬绾㈣泲鐧�5.8%",
+ riskLevel: "low",
+ },
+ {
+ id: 3,
+ screeningType: "鑲跨槫鏍囧織",
+ screeningDate: "2024-11-05 10:15:00",
+ result: "鍗辨��",
+ details: "CEA 15.2ng/mL锛屽缓璁珛鍗充笓绉戝氨璇�",
+ riskLevel: "critical",
+ },
+ {
+ id: 4,
+ screeningType: "鑲惧姛鑳�",
+ screeningDate: "2024-10-28 16:20:00",
+ result: "寮傚父",
+ details: "鑲岄厫娓呴櫎鐜囧亸浣庯紝eGFR 55mL/min",
+ riskLevel: "medium",
+ },
+ {
+ id: 5,
+ screeningType: "鍛煎惛绯荤粺",
+ screeningDate: "2024-10-20 11:00:00",
+ result: "姝e父",
+ details: "鑲哄姛鑳芥鏌ユ湭瑙佹槑鏄惧紓甯�",
+ riskLevel: "low",
+ },
+ ];
+
+ // 璁$畻缁熻淇℃伅
+ this.calculateScreeningStats();
+ },
+
+ /** 璁$畻绛涙煡缁熻淇℃伅 */
+ calculateScreeningStats() {
+ this.screeningStats = {
+ normal: this.screeningSummaryData.filter(
+ (item) => item.result === "姝e父"
+ ).length,
+ abnormal: this.screeningSummaryData.filter(
+ (item) => item.result === "寮傚父"
+ ).length,
+ critical: this.screeningSummaryData.filter(
+ (item) => item.result === "鍗辨��"
+ ).length,
+ };
+ },
+
+ /** 鍒濆鍖栨參鐥呮憳瑕佹暟鎹� */
+ initChronicDiseaseData() {
+ // 妯℃嫙鎱㈢梾鎽樿鏁版嵁[2,5](@ref)
+ this.chronicDiseaseData = [
+ {
+ id: 1,
+ diseaseName: "楂樿鍘�",
+ diagnoseDate: "2020-03-15",
+ status: "绋冲畾",
+ currentTreatment: "姘ㄦ隘鍦板钩 5mg qd锛屽畾鏈熺洃娴嬭鍘�",
+ followUpPlan: "姣忔湀澶嶈瘖涓�娆�",
+ },
+ {
+ id: 2,
+ diseaseName: "2鍨嬬硸灏跨梾",
+ diagnoseDate: "2019-08-20",
+ status: "娲诲姩鏈�",
+ currentTreatment: "浜岀敳鍙岃儘 500mg bid锛岃儼宀涚礌娉ㄥ皠",
+ followUpPlan: "姣忎袱鍛ㄥ璇婁竴娆�",
+ },
+ {
+ id: 3,
+ diseaseName: "鍐犲績鐥�",
+ diagnoseDate: "2021-05-10",
+ status: "绋冲畾",
+ currentTreatment: "闃垮徃鍖规灄 100mg qd锛岄樋鎵樹紣浠栨眬 20mg qd",
+ followUpPlan: "姣忓搴﹀璇婁竴娆�",
+ },
+ {
+ id: 4,
+ diseaseName: "鎱㈡�ц偩鐥�",
+ diagnoseDate: "2022-01-30",
+ status: "涓ラ噸",
+ currentTreatment: "鎺у埗琛�鍘嬨�佽绯栵紝浣庤泲鐧介ギ椋�",
+ followUpPlan: "姣忔湀涓撶闅忚",
+ },
+ ];
+
+ // 璁$畻缁熻淇℃伅
+ this.calculateChronicStats();
+ },
+
+ /** 璁$畻鎱㈢梾缁熻淇℃伅 */
+ calculateChronicStats() {
+ this.chronicStats = {
+ stable: this.chronicDiseaseData.filter((item) => item.status === "绋冲畾")
+ .length,
+ active: this.chronicDiseaseData.filter(
+ (item) => item.status === "娲诲姩鏈�"
+ ).length,
+ severe: this.chronicDiseaseData.filter((item) => item.status === "涓ラ噸")
+ .length,
+ total: this.chronicDiseaseData.length,
+ };
+ },
+
+ /** 鑾峰彇绛涙煡绫诲瀷鏍囩鏍峰紡 */
+ getScreeningTagType(type) {
+ const typeMap = {
+ 蹇冭绠�: "danger",
+ 绯栧翱鐥�: "warning",
+ 鑲跨槫鏍囧織: "danger",
+ 鑲惧姛鑳�: "warning",
+ 鍛煎惛绯荤粺: "success",
+ };
+ return typeMap[type] || "info";
+ },
+
+ /** 鑾峰彇鐤剧梾鍚嶇О鏍囩鏍峰紡 */
+ getDiseaseTagType(diseaseName) {
+ const diseaseMap = {
+ 楂樿鍘�: "warning",
+ "2鍨嬬硸灏跨梾": "danger",
+ 鍐犲績鐥�: "danger",
+ 鎱㈡�ц偩鐥�: "danger",
+ };
+ return diseaseMap[diseaseName] || "info";
+ },
+
+ /** 鏌ョ湅绛涙煡璇︽儏 */
+ viewScreeningDetail(row) {
+ this.$alert(
+ `<div>
+ <p><strong>绛涙煡绫诲瀷锛�</strong>${row.screeningType}</p>
+ <p><strong>绛涙煡鏃ユ湡锛�</strong>${this.formatTime(row.screeningDate)}</p>
+ <p><strong>绛涙煡缁撴灉锛�</strong><el-tag type="${
+ row.result === "姝e父"
+ ? "success"
+ : row.result === "寮傚父"
+ ? "danger"
+ : "warning"
+ }">${row.result}</el-tag></p>
+ <p><strong>璇︾粏缁撴灉锛�</strong>${row.details}</p>
+ <p><strong>椋庨櫓璇勪及锛�</strong>${this.getRiskLevelText(
+ row.riskLevel
+ )}</p>
+ </div>`,
+ "绛涙煡璇︽儏",
+ {
+ dangerouslyUseHTMLString: true,
+ customClass: "detail-dialog",
+ }
+ );
+ },
+
+ /** 鏌ョ湅鎱㈢梾璇︽儏 */
+ viewChronicDetail(row) {
+ this.$alert(
+ `<div>
+ <p><strong>鐤剧梾鍚嶇О锛�</strong>${row.diseaseName}</p>
+ <p><strong>纭瘖鏃ユ湡锛�</strong>${this.formatTime(row.diagnoseDate)}</p>
+ <p><strong>褰撳墠鐘舵�侊細</strong><el-tag type="${
+ row.status === "绋冲畾"
+ ? "success"
+ : row.status === "娲诲姩鏈�"
+ ? "warning"
+ : "danger"
+ }">${row.status}</el-tag></p>
+ <p><strong>褰撳墠娌荤枟锛�</strong>${row.currentTreatment}</p>
+ <p><strong>闅忚璁″垝锛�</strong>${row.followUpPlan}</p>
+ </div>`,
+ "鎱㈢梾璇︽儏",
+ {
+ dangerouslyUseHTMLString: true,
+ customClass: "detail-dialog",
+ }
+ );
+ },
+
+ /** 鑾峰彇椋庨櫓绛夌骇鏂囨湰 */
+ getRiskLevelText(level) {
+ const levelMap = {
+ low: "浣庨闄�",
+ medium: "涓闄�",
+ high: "楂橀闄�",
+ critical: "鍗辨��",
+ };
+ return levelMap[level] || "鏈煡";
+ },
+
+ /** 鍒锋柊绛涙煡鏁版嵁 */
+ refreshScreeningData() {
+ this.screeningLoading = true;
+ // 妯℃嫙寮傛鍔犺浇
+ setTimeout(() => {
+ this.initScreeningData();
+ this.screeningLoading = false;
+ this.$message.success("绛涙煡鏁版嵁宸插埛鏂�");
+ }, 1000);
+ },
+
+ /** 鍒锋柊鎱㈢梾鏁版嵁 */
+ refreshChronicData() {
+ this.chronicLoading = true;
+ // 妯℃嫙寮傛鍔犺浇
+ setTimeout(() => {
+ this.initChronicDiseaseData();
+ this.chronicLoading = false;
+ this.$message.success("鎱㈢梾鏁版嵁宸插埛鏂�");
+ }, 1000);
},
// 淇濆瓨鎮h�呮。妗�
savefile() {
@@ -2370,6 +3260,81 @@
}
}
}
+.screening-summary,
+.chronic-disease-summary {
+ background: #ffffff;
+ border: 1px solid #e6e6e6;
+ border-radius: 4px;
+ margin-bottom: 20px;
+
+ .summary-header {
+ display: flex;
+ align-items: center;
+ padding: 12px 15px;
+ background: #f5f7fa;
+ border-bottom: 1px solid #e6e6e6;
+ font-weight: 600;
+ color: #333;
+
+ i {
+ margin-right: 8px;
+ color: #409eff;
+ }
+ }
+
+ .summary-content {
+ padding: 15px;
+
+ .summary-stats {
+ margin-top: 15px;
+ padding-top: 15px;
+ border-top: 1px dashed #e6e6e6;
+
+ .stat-item {
+ text-align: center;
+
+ .stat-value {
+ font-size: 24px;
+ font-weight: bold;
+ margin-bottom: 5px;
+ }
+
+ .stat-label {
+ font-size: 12px;
+ color: #909399;
+ }
+ }
+ }
+ }
+}
+
+/* 璇︽儏瀵硅瘽妗嗘牱寮� */
+:deep(.detail-dialog) {
+ .el-message-box__message {
+ p {
+ margin: 10px 0;
+ line-height: 1.6;
+ }
+
+ strong {
+ color: #333;
+ min-width: 80px;
+ display: inline-block;
+ }
+ }
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 1200px) {
+ .screening-summary,
+ .chronic-disease-summary {
+ .summary-content {
+ .el-table {
+ font-size: 12px;
+ }
+ }
+ }
+}
.xinz-inf {
font-size: 18px;
// white-space: nowrap;
@@ -2470,4 +3435,24 @@
::v-deep.el-table .warning-row {
background: oldlace;
}
+/* 鎿嶄綔鎸夐挳缁勬牱寮� */
+.summary-header .el-button-group {
+ margin-left: auto;
+}
+
+/* 瀵硅瘽妗嗚〃鍗曟牱寮� */
+.el-dialog .el-form-item {
+ margin-bottom: 20px;
+}
+
+/* 缁熻鏁板瓧鏍峰紡浼樺寲 */
+.stat-item {
+ cursor: pointer;
+ transition: all 0.3s;
+}
+
+.stat-item:hover {
+ background-color: #f5f7fa;
+ border-radius: 4px;
+}
</style>
diff --git a/src/views/patient/physical/index.vue b/src/views/patient/physical/index.vue
index 2d49c44..eb49521 100644
--- a/src/views/patient/physical/index.vue
+++ b/src/views/patient/physical/index.vue
@@ -78,7 +78,27 @@
placeholder="璇烽�夋嫨浠诲姟鍚嶇О"
></el-input>
</el-form-item>
+ <el-form-item label="寰楀垎鍖洪棿">
+ <el-input
+ v-model="topqueryParams.scoreStart"
+ placeholder="寮�濮嬪垎"
+ style="width: 100px"
+ ></el-input>
+ <span style="margin: 0 10px">-</span>
+ <el-input
+ v-model="topqueryParams.scoreEnd"
+ placeholder="缁撴潫鍒�"
+ style="width: 100px"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="绛旀鏌ヨ">
+ <el-input
+ v-model="topqueryParams.detailResult"
+ placeholder="璇疯緭鍏ョ瓟妗堝叧閿瘝"
+ style="width: 200px"
+ ></el-input>
+ </el-form-item>
<el-form-item label="鍑洪櫌鏃堕棿">
<el-date-picker
v-model="dateRange"
@@ -133,6 +153,19 @@
>
</el-form-item>
</el-form>
+ <el-row :gutter="10" style="margin-bottom: 15px;">
+ <!-- <el-col :span="24">
+ <span style="margin-right: 10px; font-size: 14px; color: #606266;">蹇�熼�夋嫨锛�</span>
+ <el-button-group>
+ <el-button size="mini" @click="quickScoreRange('excellent')">浼樼(90-100)</el-button>
+ <el-button size="mini" @click="quickScoreRange('good')">鑹ソ(80-89)</el-button>
+ <el-button size="mini" @click="quickScoreRange('medium')">涓瓑(70-79)</el-button>
+ <el-button size="mini" @click="quickScoreRange('pass')">鍙婃牸(60-69)</el-button>
+ <el-button size="mini" @click="quickScoreRange('fail')">涓嶅強鏍�(0-59)</el-button>
+ <el-button size="mini" @click="resetScoreQuery">閲嶇疆</el-button>
+ </el-button-group>
+ </el-col> -->
+</el-row>
<el-divider></el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@@ -269,6 +302,17 @@
:options="dict.type.sys_suggest"
:value="scope.row.suggest"
/>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="寰楀垎"
+ align="center"
+ key="score"
+ prop="score"
+ width="100"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.score || "-" }}</span>
</template>
</el-table-column>
<el-table-column
@@ -765,6 +809,9 @@
pageSize: 10,
serviceType: 1,
searchscope: 3,
+ scoreStart: undefined, // 寰楀垎寮�濮�
+ scoreEnd: undefined, // 寰楀垎缁撴潫
+ detailResult: undefined, // 缁撴灉鏌ヨ
scopetype: [],
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
@@ -850,6 +897,8 @@
methods: {
/** 鏌ヨ闂ㄨ瘖闅忚鏈嶅姟鍒楄〃 */
getList(refresh) {
+ // 澶勭悊寰楀垎鍖洪棿鏌ヨ閫昏緫
+ this.handleScoreQuery();
// 榛樿鍏ㄩ儴
if (this.topqueryParams.searchscope == 3) {
this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
@@ -869,6 +918,7 @@
getTaskservelist(this.topqueryParams).then((response) => {
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
+
if (refresh) {
this.cardlist[0].value =
Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
@@ -906,6 +956,47 @@
this.total = response.total;
});
},
+ /** 寰楀垎鍖洪棿蹇�熼�夋嫨 */
+ quickScoreRange(range) {
+ const ranges = {
+ 'excellent': { start: 90, end: 100 },
+ 'good': { start: 80, end: 89 },
+ 'medium': { start: 70, end: 79 },
+ 'pass': { start: 60, end: 69 },
+ 'fail': { start: 0, end: 59 }
+ };
+
+ if (ranges[range]) {
+ this.topqueryParams.scoreStart = ranges[range].start;
+ this.topqueryParams.scoreEnd = ranges[range].end;
+ this.handleQuery();
+ }
+ },
+ /** 澶勭悊寰楀垎鍖洪棿鏌ヨ */
+ handleScoreQuery() {
+ // 楠岃瘉寰楀垎鍖洪棿杈撳叆
+ if (this.topqueryParams.scoreStart && isNaN(this.topqueryParams.scoreStart)) {
+ this.$message.warning('寮�濮嬪垎蹇呴』涓烘暟瀛�');
+ this.topqueryParams.scoreStart = undefined;
+ return;
+ }
+
+ if (this.topqueryParams.scoreEnd && isNaN(this.topqueryParams.scoreEnd)) {
+ this.$message.warning('缁撴潫鍒嗗繀椤讳负鏁板瓧');
+ this.topqueryParams.scoreEnd = undefined;
+ return;
+ }
+
+ // 纭繚寮�濮嬪垎涓嶅ぇ浜庣粨鏉熷垎
+ if (this.topqueryParams.scoreStart && this.topqueryParams.scoreEnd) {
+ if (parseFloat(this.topqueryParams.scoreStart) > parseFloat(this.topqueryParams.scoreEnd)) {
+ this.$message.warning('寮�濮嬪垎涓嶈兘澶т簬缁撴潫鍒�');
+ // 浜ゆ崲鍊�
+ [this.topqueryParams.scoreStart, this.topqueryParams.scoreEnd] =
+ [this.topqueryParams.scoreEnd, this.topqueryParams.scoreStart];
+ }
+ }
+ },
// 鏌ョ湅闂ㄨ瘖闅忚璇︽儏
Referencequestion(row) {
this.previewVisible = true;
@@ -1013,6 +1104,11 @@
this.single = selection.length != 1;
this.multiple = !selection.length;
},
+ resetScoreQuery() {
+ this.topqueryParams.scoreStart = undefined;
+ this.topqueryParams.scoreEnd = undefined;
+ this.topqueryParams.detailResult = undefined;
+ },
//鍒犻櫎閫夐」
handleClose(tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
@@ -1222,7 +1318,30 @@
font-size: 23px;
}
}
+/* 寰楀垎鍖洪棿杈撳叆妗嗘牱寮� */
+.score-range-input {
+ display: flex;
+ align-items: center;
+ .score-separator {
+ margin: 0 10px;
+ color: #909399;
+ }
+}
+
+/* 缁撴灉鏍囩鏍峰紡 */
+.result-tag {
+ margin: 2px;
+}
+
+/* 蹇�熼�夋嫨鎸夐挳鏍峰紡 */
+.quick-score-buttons {
+ margin-bottom: 15px;
+
+ .el-button-group {
+ margin-left: 10px;
+ }
+}
.uploading {
margin-top: 20px;
margin: 20px;
diff --git a/src/views/system/group/index.vue b/src/views/system/group/index.vue
index af86dae..2d39039 100644
--- a/src/views/system/group/index.vue
+++ b/src/views/system/group/index.vue
@@ -5,7 +5,14 @@
<el-tab-pane label="鍥㈤槦绠$悊" name="team">
<el-row :gutter="20">
<el-col :span="24" :xs="24">
- <el-form :model="teamQueryParams" ref="teamQueryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+ <el-form
+ :model="teamQueryParams"
+ ref="teamQueryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="68px"
+ >
<el-form-item label="鍥㈤槦鍚嶇О" prop="name">
<el-input
v-model="teamQueryParams.name"
@@ -16,7 +23,12 @@
/>
</el-form-item>
<el-form-item label="鍥㈤槦鐘舵��" prop="status">
- <el-select v-model="teamQueryParams.status" placeholder="璇烽�夋嫨鐘舵��" clearable style="width: 200px">
+ <el-select
+ v-model="teamQueryParams.status"
+ placeholder="璇烽�夋嫨鐘舵��"
+ clearable
+ style="width: 200px"
+ >
<el-option
v-for="item in teamStatusOptions"
:key="item.value"
@@ -26,8 +38,19 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="medium" @click="handleTeamQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="medium" @click="resetTeamQuery">閲嶇疆</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleTeamQuery"
+ >鎼滅储</el-button
+ >
+ <el-button
+ icon="el-icon-refresh"
+ size="medium"
+ @click="resetTeamQuery"
+ >閲嶇疆</el-button
+ >
</el-form-item>
</el-form>
@@ -39,56 +62,104 @@
icon="el-icon-plus"
size="medium"
@click="handleTeamAdd"
- >鏂板鍥㈤槦</el-button>
+ >鏂板鍥㈤槦</el-button
+ >
</el-col>
</el-row>
- <el-table v-loading="teamLoading" :data="filteredTeamList" @selection-change="handleTeamSelectionChange">
+ <el-table
+ v-loading="teamLoading"
+ :data="filteredTeamList"
+ @selection-change="handleTeamSelectionChange"
+ >
<el-table-column type="selection" width="50" align="center" />
- <el-table-column label="鍥㈤槦ID" align="center" prop="id" width="80" />
- <el-table-column label="鍥㈤槦鍚嶇О" align="center" prop="name" :show-overflow-tooltip="true" />
- <el-table-column label="鍥㈤槦缁勯暱" align="center" prop="leader" width="120" />
- <el-table-column label="鍥㈤槦鎴愬憳" align="center" prop="memberCount" width="100">
- <template slot-scope="scope">
- <el-tag>{{ (scope.row.members || []).length }}浜�</el-tag>
- </template>
-</el-table-column>
- <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="160">
+ <el-table-column
+ label="鍥㈤槦ID"
+ align="center"
+ prop="id"
+ width="80"
+ />
+ <el-table-column
+ label="鍥㈤槦鍚嶇О"
+ align="center"
+ prop="name"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍥㈤槦缁勯暱"
+ align="center"
+ prop="leader"
+ width="120"
+ />
+ <el-table-column
+ label="鍥㈤槦鎴愬憳"
+ align="center"
+ prop="memberCount"
+ width="100"
+ >
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+ <el-tag>{{ (scope.row.members || []).length }}浜�</el-tag>
</template>
</el-table-column>
- <el-table-column label="鍥㈤槦鐘舵��" align="center" prop="status" width="100">
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ align="center"
+ prop="createTime"
+ width="160"
+ >
<template slot-scope="scope">
- <dict-tag :options="teamStatusOptions" :value="scope.row.status"/>
+ <span>{{
+ parseTime(scope.row.createTime, "{y}-{m}-{d}")
+ }}</span>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="180">
+ <el-table-column
+ label="鍥㈤槦鐘舵��"
+ align="center"
+ prop="status"
+ width="100"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="teamStatusOptions"
+ :value="scope.row.status"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ class-name="small-padding fixed-width"
+ width="180"
+ >
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleTeamDetail(scope.row)"
- >璇︽儏</el-button>
+ >璇︽儏</el-button
+ >
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleTeamUpdate(scope.row)"
- >缂栬緫</el-button>
+ >缂栬緫</el-button
+ >
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleTeamDelete(scope.row)"
- >鍒犻櫎</el-button>
+ >鍒犻櫎</el-button
+ >
</template>
</el-table-column>
</el-table>
<pagination
- v-show="teamTotal>0"
+ v-show="teamTotal > 0"
:total="teamTotal"
:page.sync="teamQueryParams.pageNum"
:limit.sync="teamQueryParams.pageSize"
@@ -102,7 +173,14 @@
<el-tab-pane label="浜哄憳鍒嗙粍" name="member">
<el-row :gutter="20">
<el-col :span="24" :xs="24">
- <el-form :model="memberQueryParams" ref="memberQueryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+ <el-form
+ :model="memberQueryParams"
+ ref="memberQueryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="68px"
+ >
<el-form-item label="鎴愬憳濮撳悕" prop="name">
<el-input
v-model="memberQueryParams.name"
@@ -113,7 +191,12 @@
/>
</el-form-item>
<el-form-item label="鎵�灞炲洟闃�" prop="teamId">
- <el-select v-model="memberQueryParams.teamId" placeholder="璇烽�夋嫨鍥㈤槦" clearable style="width: 200px">
+ <el-select
+ v-model="memberQueryParams.teamId"
+ placeholder="璇烽�夋嫨鍥㈤槦"
+ clearable
+ style="width: 200px"
+ >
<el-option
v-for="item in teamList"
:key="item.id"
@@ -123,7 +206,12 @@
</el-select>
</el-form-item>
<el-form-item label="鎴愬憳鐘舵��" prop="status">
- <el-select v-model="memberQueryParams.status" placeholder="璇烽�夋嫨鐘舵��" clearable style="width: 200px">
+ <el-select
+ v-model="memberQueryParams.status"
+ placeholder="璇烽�夋嫨鐘舵��"
+ clearable
+ style="width: 200px"
+ >
<el-option
v-for="item in memberStatusOptions"
:key="item.value"
@@ -133,8 +221,19 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="medium" @click="handleMemberQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="medium" @click="resetMemberQuery">閲嶇疆</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleMemberQuery"
+ >鎼滅储</el-button
+ >
+ <el-button
+ icon="el-icon-refresh"
+ size="medium"
+ @click="resetMemberQuery"
+ >閲嶇疆</el-button
+ >
</el-form-item>
</el-form>
@@ -146,7 +245,8 @@
icon="el-icon-plus"
size="medium"
@click="handleMemberAdd"
- >鏂板鎴愬憳</el-button>
+ >鏂板鎴愬憳</el-button
+ >
</el-col>
<el-col :span="1.5">
<el-button
@@ -156,50 +256,105 @@
size="medium"
:disabled="multiple"
@click="handleMemberDelete"
- >鍒犻櫎</el-button>
+ >鍒犻櫎</el-button
+ >
</el-col>
</el-row>
- <el-table v-loading="memberLoading" :data="filteredMemberList" @selection-change="handleMemberSelectionChange">
+ <el-table
+ v-loading="memberLoading"
+ :data="filteredMemberList"
+ @selection-change="handleMemberSelectionChange"
+ >
<el-table-column type="selection" width="50" align="center" />
- <el-table-column label="鎴愬憳ID" align="center" prop="id" width="80" />
- <el-table-column label="鎴愬憳濮撳悕" align="center" prop="name" :show-overflow-tooltip="true" />
- <el-table-column label="鎵�灞炲洟闃�" align="center" prop="teamName" width="150" />
- <el-table-column label="鑱屼綅" align="center" prop="position" width="120" />
- <el-table-column label="鑱旂郴鐢佃瘽" align="center" prop="phone" width="150" />
- <el-table-column label="閭" align="center" prop="email" width="200" />
- <el-table-column label="褰撳墠宸ュ崟" align="center" prop="currentWorkOrder" width="120">
+ <el-table-column
+ label="鎴愬憳ID"
+ align="center"
+ prop="id"
+ width="80"
+ />
+ <el-table-column
+ label="鎴愬憳濮撳悕"
+ align="center"
+ prop="name"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鎵�灞炲洟闃�"
+ align="center"
+ prop="teamName"
+ width="150"
+ />
+ <el-table-column
+ label="鑱屼綅"
+ align="center"
+ prop="position"
+ width="120"
+ />
+ <el-table-column
+ label="鑱旂郴鐢佃瘽"
+ align="center"
+ prop="phone"
+ width="150"
+ />
+ <el-table-column
+ label="閭"
+ align="center"
+ prop="email"
+ width="200"
+ />
+ <el-table-column
+ label="褰撳墠宸ュ崟"
+ align="center"
+ prop="currentWorkOrder"
+ width="120"
+ >
<template slot-scope="scope">
<el-tag :type="scope.row.currentWorkOrder ? '' : 'info'">
- {{ scope.row.currentWorkOrder || '绌洪棽' }}
+ {{ scope.row.currentWorkOrder || "绌洪棽" }}
</el-tag>
</template>
</el-table-column>
- <el-table-column label="鎴愬憳鐘舵��" align="center" prop="status" width="100">
+ <el-table-column
+ label="鎴愬憳鐘舵��"
+ align="center"
+ prop="status"
+ width="100"
+ >
<template slot-scope="scope">
- <dict-tag :options="memberStatusOptions" :value="scope.row.status"/>
+ <dict-tag
+ :options="memberStatusOptions"
+ :value="scope.row.status"
+ />
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="180">
+ <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ class-name="small-padding fixed-width"
+ width="180"
+ >
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleMemberUpdate(scope.row)"
- >缂栬緫</el-button>
+ >缂栬緫</el-button
+ >
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleMemberDelete(scope.row)"
- >鍒犻櫎</el-button>
+ >鍒犻櫎</el-button
+ >
</template>
</el-table-column>
</el-table>
<pagination
- v-show="memberTotal>0"
+ v-show="memberTotal > 0"
:total="memberTotal"
:page.sync="memberQueryParams.pageNum"
:limit.sync="memberQueryParams.pageSize"
@@ -213,7 +368,14 @@
<el-tab-pane label="宸ュ崟鎸囨淳" name="workOrder">
<el-row :gutter="20">
<el-col :span="24" :xs="24">
- <el-form :model="workOrderQueryParams" ref="workOrderQueryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+ <el-form
+ :model="workOrderQueryParams"
+ ref="workOrderQueryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="68px"
+ >
<el-form-item label="宸ュ崟缂栧彿" prop="id">
<el-input
v-model="workOrderQueryParams.id"
@@ -224,7 +386,12 @@
/>
</el-form-item>
<el-form-item label="宸ュ崟鐘舵��" prop="status">
- <el-select v-model="workOrderQueryParams.status" placeholder="璇烽�夋嫨鐘舵��" clearable style="width: 200px">
+ <el-select
+ v-model="workOrderQueryParams.status"
+ placeholder="璇烽�夋嫨鐘舵��"
+ clearable
+ style="width: 200px"
+ >
<el-option
v-for="item in workOrderStatusOptions"
:key="item.value"
@@ -234,7 +401,12 @@
</el-select>
</el-form-item>
<el-form-item label="澶勭悊浜�" prop="assignee">
- <el-select v-model="workOrderQueryParams.assignee" placeholder="璇烽�夋嫨澶勭悊浜�" clearable style="width: 200px">
+ <el-select
+ v-model="workOrderQueryParams.assignee"
+ placeholder="璇烽�夋嫨澶勭悊浜�"
+ clearable
+ style="width: 200px"
+ >
<el-option
v-for="item in memberList"
:key="item.id"
@@ -244,8 +416,19 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="medium" @click="handleWorkOrderQuery">鎼滅储</el-button>
- <el-button icon="el-icon-refresh" size="medium" @click="resetWorkOrderQuery">閲嶇疆</el-button>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleWorkOrderQuery"
+ >鎼滅储</el-button
+ >
+ <el-button
+ icon="el-icon-refresh"
+ size="medium"
+ @click="resetWorkOrderQuery"
+ >閲嶇疆</el-button
+ >
</el-form-item>
</el-form>
@@ -257,64 +440,133 @@
icon="el-icon-plus"
size="medium"
@click="handleWorkOrderAdd"
- >鏂板缓宸ュ崟</el-button>
+ >鏂板缓宸ュ崟</el-button
+ >
</el-col>
</el-row>
- <el-table v-loading="workOrderLoading" :data="filteredWorkOrderList" @selection-change="handleWorkOrderSelectionChange">
+ <el-table
+ v-loading="workOrderLoading"
+ :data="filteredWorkOrderList"
+ @selection-change="handleWorkOrderSelectionChange"
+ >
<el-table-column type="selection" width="50" align="center" />
- <el-table-column label="宸ュ崟缂栧彿" align="center" prop="id" width="120" />
- <el-table-column label="宸ュ崟鏍囬" align="center" prop="title" :show-overflow-tooltip="true" />
- <el-table-column label="浼樺厛绾�" align="center" prop="priority" width="100">
+ <el-table-column
+ label="宸ュ崟缂栧彿"
+ align="center"
+ prop="id"
+ width="120"
+ />
+ <el-table-column
+ label="宸ュ崟鏍囬"
+ align="center"
+ prop="title"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="浼樺厛绾�"
+ align="center"
+ prop="priority"
+ width="100"
+ >
<template slot-scope="scope">
- <el-tag :type="scope.row.priority === '1' ? 'danger' : scope.row.priority === '2' ? 'warning' : ''">
- {{ scope.row.priority === '1' ? '楂�' : scope.row.priority === '2' ? '涓�' : '浣�' }}
+ <el-tag
+ :type="
+ scope.row.priority === '1'
+ ? 'danger'
+ : scope.row.priority === '2'
+ ? 'warning'
+ : ''
+ "
+ >
+ {{
+ scope.row.priority === "1"
+ ? "楂�"
+ : scope.row.priority === "2"
+ ? "涓�"
+ : "浣�"
+ }}
</el-tag>
</template>
</el-table-column>
- <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="160">
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ align="center"
+ prop="createTime"
+ width="160"
+ >
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+ <span>{{
+ parseTime(scope.row.createTime, "{y}-{m}-{d}")
+ }}</span>
</template>
</el-table-column>
- <el-table-column label="鎴鏃堕棿" align="center" prop="deadline" width="160">
+ <el-table-column
+ label="鎴鏃堕棿"
+ align="center"
+ prop="deadline"
+ width="160"
+ >
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.deadline, '{y}-{m}-{d}') }}</span>
+ <span>{{
+ parseTime(scope.row.deadline, "{y}-{m}-{d}")
+ }}</span>
</template>
</el-table-column>
- <el-table-column label="澶勭悊浜�" align="center" prop="assigneeName" width="120" />
- <el-table-column label="宸ュ崟鐘舵��" align="center" prop="status" width="120">
+ <el-table-column
+ label="澶勭悊浜�"
+ align="center"
+ prop="assigneeName"
+ width="120"
+ />
+ <el-table-column
+ label="宸ュ崟鐘舵��"
+ align="center"
+ prop="status"
+ width="120"
+ >
<template slot-scope="scope">
- <dict-tag :options="workOrderStatusOptions" :value="scope.row.status"/>
+ <dict-tag
+ :options="workOrderStatusOptions"
+ :value="scope.row.status"
+ />
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="180">
+ <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ class-name="small-padding fixed-width"
+ width="180"
+ >
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleWorkOrderUpdate(scope.row)"
- >缂栬緫</el-button>
+ >缂栬緫</el-button
+ >
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleWorkOrderDelete(scope.row)"
- >鍒犻櫎</el-button>
+ >鍒犻櫎</el-button
+ >
<el-button
size="mini"
type="text"
icon="el-icon-s-promotion"
@click="handleAssignWorkOrder(scope.row)"
v-if="scope.row.status === '0'"
- >鎸囨淳</el-button>
+ >鎸囨淳</el-button
+ >
</template>
</el-table-column>
</el-table>
<pagination
- v-show="workOrderTotal>0"
+ v-show="workOrderTotal > 0"
:total="workOrderTotal"
:page.sync="workOrderQueryParams.pageNum"
:limit.sync="workOrderQueryParams.pageSize"
@@ -326,19 +578,37 @@
</el-tabs>
<!-- 鍥㈤槦璇︽儏瀵硅瘽妗� -->
- <el-dialog :title="teamDialogTitle" :visible.sync="teamDialogVisible" width="70%" append-to-body>
+ <el-dialog
+ :title="teamDialogTitle"
+ :visible.sync="teamDialogVisible"
+ width="70%"
+ append-to-body
+ >
<el-descriptions :column="2" border>
- <el-descriptions-item label="鍥㈤槦ID">{{ currentTeam.id }}</el-descriptions-item>
- <el-descriptions-item label="鍥㈤槦鍚嶇О">{{ currentTeam.name }}</el-descriptions-item>
- <el-descriptions-item label="鍥㈤槦缁勯暱">{{ currentTeam.leader }}</el-descriptions-item>
-<el-descriptions-item label="鍥㈤槦鎴愬憳">{{ (currentTeam.members || []).length }}浜�</el-descriptions-item> <el-descriptions-item label="鍒涘缓鏃堕棿">{{ parseTime(currentTeam.createTime, '{y}-{m}-{d} {h}:{i}') }}</el-descriptions-item>
+ <el-descriptions-item label="鍥㈤槦ID">{{
+ currentTeam.id
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鍥㈤槦鍚嶇О">{{
+ currentTeam.name
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鍥㈤槦缁勯暱">{{
+ currentTeam.leader
+ }}</el-descriptions-item>
+ <el-descriptions-item label="鍥㈤槦鎴愬憳"
+ >{{ (currentTeam.members || []).length }}浜�</el-descriptions-item
+ >
+ <el-descriptions-item label="鍒涘缓鏃堕棿">{{
+ parseTime(currentTeam.createTime, "{y}-{m}-{d} {h}:{i}")
+ }}</el-descriptions-item>
<el-descriptions-item label="鍥㈤槦鐘舵��">
- <dict-tag :options="teamStatusOptions" :value="currentTeam.status"/>
+ <dict-tag :options="teamStatusOptions" :value="currentTeam.status" />
</el-descriptions-item>
- <el-descriptions-item label="鍥㈤槦鎻忚堪" :span="2">{{ currentTeam.description || '鏃�' }}</el-descriptions-item>
+ <el-descriptions-item label="鍥㈤槦鎻忚堪" :span="2">{{
+ currentTeam.description || "鏃�"
+ }}</el-descriptions-item>
</el-descriptions>
- <div class="team-members" style="margin-top: 20px;">
+ <div class="team-members" style="margin-top: 20px">
<div class="headline">
<div class="basics">鍥㈤槦鎴愬憳</div>
</div>
@@ -351,19 +621,22 @@
<el-table-column prop="currentWorkOrder" label="褰撳墠宸ュ崟" width="150">
<template slot-scope="scope">
<el-tag :type="scope.row.currentWorkOrder ? '' : 'info'">
- {{ scope.row.currentWorkOrder || '绌洪棽' }}
+ {{ scope.row.currentWorkOrder || "绌洪棽" }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="status" label="鎴愬憳鐘舵��" width="100">
<template slot-scope="scope">
- <dict-tag :options="memberStatusOptions" :value="scope.row.status"/>
+ <dict-tag
+ :options="memberStatusOptions"
+ :value="scope.row.status"
+ />
</template>
</el-table-column>
</el-table>
</div>
- <div class="team-work-orders" style="margin-top: 20px;">
+ <div class="team-work-orders" style="margin-top: 20px">
<div class="headline">
<div class="basics">鍥㈤槦宸ュ崟</div>
</div>
@@ -373,38 +646,90 @@
<el-table-column prop="title" label="宸ュ崟鏍囬" />
<el-table-column prop="priority" label="浼樺厛绾�" width="100">
<template slot-scope="scope">
- <el-tag :type="scope.row.priority === '1' ? 'danger' : scope.row.priority === '2' ? 'warning' : ''">
- {{ scope.row.priority === '1' ? '楂�' : scope.row.priority === '2' ? '涓�' : '浣�' }}
+ <el-tag
+ :type="
+ scope.row.priority === '1'
+ ? 'danger'
+ : scope.row.priority === '2'
+ ? 'warning'
+ : ''
+ "
+ >
+ {{
+ scope.row.priority === "1"
+ ? "楂�"
+ : scope.row.priority === "2"
+ ? "涓�"
+ : "浣�"
+ }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="assigneeName" label="澶勭悊浜�" width="120" />
<el-table-column prop="status" label="宸ュ崟鐘舵��" width="120">
<template slot-scope="scope">
- <dict-tag :options="workOrderStatusOptions" :value="scope.row.status"/>
+ <dict-tag
+ :options="workOrderStatusOptions"
+ :value="scope.row.status"
+ />
</template>
</el-table-column>
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="160">
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+ <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column prop="deadline" label="鎴鏃堕棿" width="160">
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.deadline, '{y}-{m}-{d}') }}</span>
+ <span>{{ parseTime(scope.row.deadline, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
</el-table>
</div>
-
+ <!-- 鍦ㄥ洟闃熻鎯呭璇濇鐨勫洟闃熸垚鍛樿〃鏍煎悗娣诲姞浜岀淮鐮佸尯鍩� -->
+ <div class="team-qrcode" style="margin-top: 20px">
+ <div class="headline">
+ <div class="basics">鍥㈤槦浜岀淮鐮�</div>
+ </div>
+ <el-divider></el-divider>
+ <div class="qrcode-container">
+ <vue-qr
+ :text="teamQRContent"
+ :size="200"
+ :margin="10"
+ colorDark="#409EFF"
+ :logoScale="0.2"
+ :logoSrc="logoUrl"
+ ></vue-qr>
+ <div class="qrcode-actions">
+ <el-button size="mini" @click="downloadQRCode"
+ >涓嬭浇浜岀淮鐮�</el-button
+ >
+ <el-button size="mini" type="primary" @click="refreshQRCode"
+ >鍒锋柊</el-button
+ >
+ </div>
+ <p class="qrcode-tip">鎵弿浜岀淮鐮佹煡鐪嬪洟闃熶俊鎭紙鏈夋晥鏈�24灏忔椂锛�</p>
+ </div>
+ </div>
<div slot="footer" class="dialog-footer">
<el-button @click="teamDialogVisible = false">鍏� 闂�</el-button>
</div>
</el-dialog>
<!-- 鏂板/缂栬緫鍥㈤槦瀵硅瘽妗� -->
- <el-dialog :title="teamFormTitle" :visible.sync="teamFormVisible" width="50%" append-to-body>
- <el-form ref="teamForm" :model="teamForm" :rules="teamRules" label-width="80px">
+ <el-dialog
+ :title="teamFormTitle"
+ :visible.sync="teamFormVisible"
+ width="50%"
+ append-to-body
+ >
+ <el-form
+ ref="teamForm"
+ :model="teamForm"
+ :rules="teamRules"
+ label-width="80px"
+ >
<el-row>
<el-col :span="24">
<el-form-item label="鍥㈤槦鍚嶇О" prop="name">
@@ -430,7 +755,8 @@
v-for="dict in teamStatusOptions"
:key="dict.value"
:label="dict.value"
- >{{dict.label}}</el-radio>
+ >{{ dict.label }}</el-radio
+ >
</el-radio-group>
</el-form-item>
</el-col>
@@ -442,14 +768,19 @@
:titles="['鍙�夋垚鍛�', '鍥㈤槦鎴愬憳']"
:props="{
key: 'id',
- label: 'name'
+ label: 'name',
}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="鍥㈤槦鎻忚堪" prop="description">
- <el-input type="textarea" :rows="3" v-model="teamForm.description" placeholder="璇疯緭鍏ュ洟闃熸弿杩�" />
+ <el-input
+ type="textarea"
+ :rows="3"
+ v-model="teamForm.description"
+ placeholder="璇疯緭鍏ュ洟闃熸弿杩�"
+ />
</el-form-item>
</el-col>
</el-row>
@@ -461,17 +792,33 @@
</el-dialog>
<!-- 鏂板/缂栬緫鎴愬憳瀵硅瘽妗� -->
- <el-dialog :title="memberFormTitle" :visible.sync="memberFormVisible" width="50%" append-to-body>
- <el-form ref="memberForm" :model="memberForm" :rules="memberRules" label-width="80px">
+ <el-dialog
+ :title="memberFormTitle"
+ :visible.sync="memberFormVisible"
+ width="50%"
+ append-to-body
+ >
+ <el-form
+ ref="memberForm"
+ :model="memberForm"
+ :rules="memberRules"
+ label-width="80px"
+ >
<el-row>
<el-col :span="12">
<el-form-item label="鎴愬憳濮撳悕" prop="name">
- <el-input v-model="memberForm.name" placeholder="璇疯緭鍏ユ垚鍛樺鍚�" />
+ <el-input
+ v-model="memberForm.name"
+ placeholder="璇疯緭鍏ユ垚鍛樺鍚�"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鎵�灞炲洟闃�" prop="teamId">
- <el-select v-model="memberForm.teamId" placeholder="璇烽�夋嫨鎵�灞炲洟闃�">
+ <el-select
+ v-model="memberForm.teamId"
+ placeholder="璇烽�夋嫨鎵�灞炲洟闃�"
+ >
<el-option
v-for="item in teamList"
:key="item.id"
@@ -483,12 +830,18 @@
</el-col>
<el-col :span="12">
<el-form-item label="鑱屼綅" prop="position">
- <el-input v-model="memberForm.position" placeholder="璇疯緭鍏ヨ亴浣�" />
+ <el-input
+ v-model="memberForm.position"
+ placeholder="璇疯緭鍏ヨ亴浣�"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鑱旂郴鐢佃瘽" prop="phone">
- <el-input v-model="memberForm.phone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
+ <el-input
+ v-model="memberForm.phone"
+ placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -503,7 +856,8 @@
v-for="dict in memberStatusOptions"
:key="dict.value"
:label="dict.value"
- >{{dict.label}}</el-radio>
+ >{{ dict.label }}</el-radio
+ >
</el-radio-group>
</el-form-item>
</el-col>
@@ -516,17 +870,33 @@
</el-dialog>
<!-- 鏂板/缂栬緫宸ュ崟瀵硅瘽妗� -->
- <el-dialog :title="workOrderFormTitle" :visible.sync="workOrderFormVisible" width="60%" append-to-body>
- <el-form ref="workOrderForm" :model="workOrderForm" :rules="workOrderRules" label-width="80px">
+ <el-dialog
+ :title="workOrderFormTitle"
+ :visible.sync="workOrderFormVisible"
+ width="60%"
+ append-to-body
+ >
+ <el-form
+ ref="workOrderForm"
+ :model="workOrderForm"
+ :rules="workOrderRules"
+ label-width="80px"
+ >
<el-row>
<el-col :span="24">
<el-form-item label="宸ュ崟鏍囬" prop="title">
- <el-input v-model="workOrderForm.title" placeholder="璇疯緭鍏ュ伐鍗曟爣棰�" />
+ <el-input
+ v-model="workOrderForm.title"
+ placeholder="璇疯緭鍏ュ伐鍗曟爣棰�"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="浼樺厛绾�" prop="priority">
- <el-select v-model="workOrderForm.priority" placeholder="璇烽�夋嫨浼樺厛绾�">
+ <el-select
+ v-model="workOrderForm.priority"
+ placeholder="璇烽�夋嫨浼樺厛绾�"
+ >
<el-option
v-for="item in priorityOptions"
:key="item.value"
@@ -549,7 +919,12 @@
</el-col>
<el-col :span="24">
<el-form-item label="宸ュ崟鍐呭" prop="content">
- <el-input type="textarea" :rows="4" v-model="workOrderForm.content" placeholder="璇疯緭鍏ュ伐鍗曞唴瀹�" />
+ <el-input
+ type="textarea"
+ :rows="4"
+ v-model="workOrderForm.content"
+ placeholder="璇疯緭鍏ュ伐鍗曞唴瀹�"
+ />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -559,13 +934,17 @@
v-for="dict in workOrderStatusOptions"
:key="dict.value"
:label="dict.value"
- >{{dict.label}}</el-radio>
+ >{{ dict.label }}</el-radio
+ >
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="workOrderForm.status === '1'">
<el-form-item label="澶勭悊浜�" prop="assignee">
- <el-select v-model="workOrderForm.assignee" placeholder="璇烽�夋嫨澶勭悊浜�">
+ <el-select
+ v-model="workOrderForm.assignee"
+ placeholder="璇烽�夋嫨澶勭悊浜�"
+ >
<el-option
v-for="item in memberList"
:key="item.id"
@@ -584,13 +963,22 @@
</el-dialog>
<!-- 鎸囨淳宸ュ崟瀵硅瘽妗� -->
- <el-dialog title="鎸囨淳宸ュ崟" :visible.sync="assignDialogVisible" width="40%" append-to-body>
+ <el-dialog
+ title="鎸囨淳宸ュ崟"
+ :visible.sync="assignDialogVisible"
+ width="40%"
+ append-to-body
+ >
<el-form :model="assignForm" label-width="80px">
<el-form-item label="宸ュ崟鏍囬">
<el-input v-model="assignForm.title" disabled />
</el-form-item>
<el-form-item label="澶勭悊浜�" prop="assignee">
- <el-select v-model="assignForm.assignee" placeholder="璇烽�夋嫨澶勭悊浜�" style="width: 100%">
+ <el-select
+ v-model="assignForm.assignee"
+ placeholder="璇烽�夋嫨澶勭悊浜�"
+ style="width: 100%"
+ >
<el-option
v-for="item in availableMembers"
:key="item.id"
@@ -600,7 +988,11 @@
</el-select>
</el-form-item>
<el-form-item label="浼樺厛绾�" prop="priority">
- <el-select v-model="assignForm.priority" placeholder="璇烽�夋嫨浼樺厛绾�" style="width: 100%">
+ <el-select
+ v-model="assignForm.priority"
+ placeholder="璇烽�夋嫨浼樺厛绾�"
+ style="width: 100%"
+ >
<el-option
v-for="item in priorityOptions"
:key="item.value"
@@ -628,83 +1020,205 @@
</template>
<script>
-import { parseTime } from '@/utils/ruoyi'
+import { parseTime } from "@/utils/ruoyi";
+import VueQr from "vue-qr";
export default {
name: "TeamManagement",
- dicts: ['sys_normal_disable', 'sys_user_sex'],
+ dicts: ["sys_normal_disable", "sys_user_sex"],
+ components: { VueQr },
data() {
return {
// 褰撳墠婵�娲荤殑鏍囩椤�
- activeTab: 'team',
+ activeTab: "team",
// 鏄剧ず鎼滅储鏉′欢
showSearch: true,
// 鍥㈤槦绠$悊鐩稿叧鏁版嵁
teamLoading: false,
- multiple: false, // 杩欓噷娣诲姞
+ multiple: false, // 杩欓噷娣诲姞
+ // 鏇挎崲鍘熸湁鐨則eamList鏁版嵁
teamList: [
{
id: 1,
- name: "鍓嶇寮�鍙戝洟闃�",
- leader: "寮犱笁",
+ name: "蹇冭绠″唴绉戝洟闃�",
+ leader: "鏉庢垚鐧�",
members: [
- { id: 1, name: "寮犱笁", position: "鍓嶇缁勯暱", phone: "13800138001", email: "zhangsan@example.com", currentWorkOrder: "WO20230001", status: "1" },
- { id: 2, name: "鏉庡洓", position: "楂樼骇鍓嶇", phone: "13800138002", email: "lisi@example.com", currentWorkOrder: "", status: "1" },
- { id: 3, name: "鐜嬩簲", position: "鍓嶇寮�鍙�", phone: "13800138003", email: "wangwu@example.com", currentWorkOrder: "WO20230002", status: "1" }
+ {
+ id: 1,
+ name: "鏉庢垚鐧�",
+ position: "涓讳换鍖诲笀",
+ phone: "13800138001",
+ email: "lichengbai@hospital.com",
+ currentWorkOrder: "MED20230001",
+ status: "1",
+ },
+ {
+ id: 2,
+ name: "鍒樼繆鎯�",
+ position: "鍓富浠诲尰甯�",
+ phone: "13800138002",
+ email: "liuyihui@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ {
+ id: 3,
+ name: "寮犲瓱娑�",
+ position: "涓绘不鍖诲笀",
+ phone: "13800138003",
+ email: "zhangmenghan@hospital.com",
+ currentWorkOrder: "MED20230002",
+ status: "1",
+ },
+ {
+ id: 9,
+ name: "鍚存�濈堪",
+ position: "浣忛櫌鍖诲笀",
+ phone: "13800138009",
+ email: "wusihan@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
],
- createTime: "2023-01-15 09:30:00",
+ createTime: "2024-01-15 09:30:00",
status: "1",
- description: "璐熻矗鍏徃鎵�鏈夊墠绔」鐩殑寮�鍙戝拰缁存姢"
+ description: "璐熻矗蹇冭绠$柧鐥呯殑璇婃柇銆佹不鐤楀拰鎵嬫湳锛屾搮闀垮啝蹇冪梾浠嬪叆娌荤枟",
},
{
id: 2,
- name: "鍚庣寮�鍙戝洟闃�",
- leader: "璧靛叚",
+ name: "鑲跨槫绉戞不鐤楀洟闃�",
+ leader: "闄堟斂鍊�",
members: [
- { id: 4, name: "璧靛叚", position: "鍚庣缁勯暱", phone: "13800138004", email: "zhaoliu@example.com", currentWorkOrder: "WO20230003", status: "1" },
- { id: 5, name: "閽变竷", position: "楂樼骇鍚庣", phone: "13800138005", email: "qianqi@example.com", currentWorkOrder: "", status: "1" },
- { id: 6, name: "瀛欏叓", position: "鍚庣寮�鍙�", phone: "13800138006", email: "sunba@example.com", currentWorkOrder: "", status: "1" }
+ {
+ id: 4,
+ name: "闄堟斂鍊�",
+ position: "鑲跨槫绉戜富浠�",
+ phone: "13800138004",
+ email: "chenzhengqian@hospital.com",
+ currentWorkOrder: "MED20230003",
+ status: "1",
+ },
+ {
+ id: 5,
+ name: "閭撹瘲娑�",
+ position: "鏀剧枟鍖诲笀",
+ phone: "13800138005",
+ email: "dengshihan@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ {
+ id: 6,
+ name: "榛勭洓鐜�",
+ position: "鍖栫枟鍖诲笀",
+ phone: "13800138006",
+ email: "huangshengmei@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
],
- createTime: "2023-01-20 14:20:00",
+ createTime: "2024-02-10 14:20:00",
status: "1",
- description: "璐熻矗鍏徃鎵�鏈夊悗绔湇鍔$殑寮�鍙戝拰缁存姢"
+ description: "涓撴敞浜庤偪鐦ょ殑缁煎悎娌荤枟锛屽寘鎷寲鐤椼�佹斁鐤楀拰闈跺悜娌荤枟",
},
{
id: 3,
- name: "娴嬭瘯鍥㈤槦",
- leader: "鍛ㄤ節",
+ name: "鍎跨璇婄枟鍥㈤槦",
+ leader: "鐜嬫仼榫�",
members: [
- { id: 7, name: "鍛ㄤ節", position: "娴嬭瘯缁忕悊", phone: "13800138007", email: "zhoujiu@example.com", currentWorkOrder: "WO20230004", status: "1" },
- { id: 8, name: "鍚村崄", position: "娴嬭瘯宸ョ▼甯�", phone: "13800138008", email: "wushi@example.com", currentWorkOrder: "", status: "1" }
+ {
+ id: 7,
+ name: "鐜嬫仼榫�",
+ position: "鍎跨涓讳换",
+ phone: "13800138007",
+ email: "wagenlong@hospital.com",
+ currentWorkOrder: "MED20230004",
+ status: "1",
+ },
+ {
+ id: 8,
+ name: "鏈辨斂寤�",
+ position: "鍎跨鍖诲笀",
+ phone: "13800138008",
+ email: "zhuzhengting@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ {
+ id: 10,
+ name: "鏋椾僵鐜�",
+ position: "鍎跨鎶ゅ+闀�",
+ phone: "13800138010",
+ email: "linpeiling@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
],
- createTime: "2023-02-10 10:15:00",
+ createTime: "2024-03-05 10:15:00",
status: "1",
- description: "璐熻矗鍏徃鎵�鏈夐」鐩殑娴嬭瘯宸ヤ綔"
- }
+ description: "璐熻矗鍎跨甯歌鐥呫�佸鍙戠梾鐨勮瘖鐤楀拰棰勯槻淇濆仴宸ヤ綔",
+ },
+ {
+ id: 4,
+ name: "鎬ヨ瘖鎶㈡晳鍥㈤槦",
+ leader: "鍚翠繆浼�",
+ members: [
+ {
+ id: 11,
+ name: "鍚翠繆浼�",
+ position: "鎬ヨ瘖绉戜富浠�",
+ phone: "13800138011",
+ email: "wujunbo@hospital.com",
+ currentWorkOrder: "MED20230005",
+ status: "1",
+ },
+ {
+ id: 12,
+ name: "闃Θ瀛�",
+ position: "鎬ヨ瘖鍖诲笀",
+ phone: "13800138012",
+ email: "ruanxinxue@hospital.com",
+ currentWorkOrder: "MED20230006",
+ status: "1",
+ },
+ {
+ id: 13,
+ name: "缈佹儬鐝�",
+ position: "鎬ヨ瘖鎶ゅ+",
+ phone: "13800138013",
+ email: "wenghuizhu@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ ],
+ createTime: "2024-03-20 16:45:00",
+ status: "1",
+ description: "24灏忔椂寰呭懡锛岃礋璐f�ュ嵄閲嶇棁鎮h�呯殑鎶㈡晳鍜屾不鐤�",
+ },
],
+ teamTotal: 4,
teamQueryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
- status: undefined
+ status: undefined,
},
- teamTotal: 3,
teamStatusOptions: [
{ value: "0", label: "绂佺敤" },
- { value: "1", label: "鍚敤" }
+ { value: "1", label: "鍚敤" },
],
teamDialogVisible: false,
teamDialogTitle: "",
currentTeam: {
- id: undefined,
- name: undefined,
- leader: undefined,
- members: [], // 纭繚鏈夐粯璁ょ┖鏁扮粍
- createTime: undefined,
- status: undefined,
- description: undefined
- },
+ id: undefined,
+ name: undefined,
+ leader: undefined,
+ members: [], // 纭繚鏈夐粯璁ょ┖鏁扮粍
+ createTime: undefined,
+ status: undefined,
+ description: undefined,
+ },
teamFormVisible: false,
teamFormTitle: "",
teamForm: {
@@ -713,43 +1227,213 @@
leader: undefined,
members: [],
status: "1",
- description: undefined
+ description: undefined,
},
teamRules: {
name: [
- { required: true, message: "鍥㈤槦鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "鍥㈤槦鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
],
leader: [
- { required: true, message: "鍥㈤槦缁勯暱涓嶈兘涓虹┖", trigger: "change" }
+ { required: true, message: "鍥㈤槦缁勯暱涓嶈兘涓虹┖", trigger: "change" },
],
status: [
- { required: true, message: "鍥㈤槦鐘舵�佷笉鑳戒负绌�", trigger: "change" }
- ]
+ { required: true, message: "鍥㈤槦鐘舵�佷笉鑳戒负绌�", trigger: "change" },
+ ],
},
-
+ // 浜岀淮鐮佺浉鍏虫暟鎹�
+ teamQRContent: "127.0.0.1:8093/wt?p=0BE9L3C2u",
+ logoUrl: require("@/assets/logo/logoxh.png"), // 鍖婚櫌logo
+ currentQRCodeUrl: "",
// 浜哄憳鍒嗙粍鐩稿叧鏁版嵁
memberLoading: false,
+ // 鏇挎崲鍘熸湁鐨刴emberList鏁版嵁
memberList: [
- { id: 1, name: "寮犱笁", teamId: 1, teamName: "鍓嶇寮�鍙戝洟闃�", position: "鍓嶇缁勯暱", phone: "13800138001", email: "zhangsan@example.com", currentWorkOrder: "WO20230001", status: "1" },
- { id: 2, name: "鏉庡洓", teamId: 1, teamName: "鍓嶇寮�鍙戝洟闃�", position: "楂樼骇鍓嶇", phone: "13800138002", email: "lisi@example.com", currentWorkOrder: "", status: "1" },
- { id: 3, name: "鐜嬩簲", teamId: 1, teamName: "鍓嶇寮�鍙戝洟闃�", position: "鍓嶇寮�鍙�", phone: "13800138003", email: "wangwu@example.com", currentWorkOrder: "WO20230002", status: "1" },
- { id: 4, name: "璧靛叚", teamId: 2, teamName: "鍚庣寮�鍙戝洟闃�", position: "鍚庣缁勯暱", phone: "13800138004", email: "zhaoliu@example.com", currentWorkOrder: "WO20230003", status: "1" },
- { id: 5, name: "閽变竷", teamId: 2, teamName: "鍚庣寮�鍙戝洟闃�", position: "楂樼骇鍚庣", phone: "13800138005", email: "qianqi@example.com", currentWorkOrder: "", status: "1" },
- { id: 6, name: "瀛欏叓", teamId: 2, teamName: "鍚庣寮�鍙戝洟闃�", position: "鍚庣寮�鍙�", phone: "13800138006", email: "sunba@example.com", currentWorkOrder: "", status: "1" },
- { id: 7, name: "鍛ㄤ節", teamId: 3, teamName: "娴嬭瘯鍥㈤槦", position: "娴嬭瘯缁忕悊", phone: "13800138007", email: "zhoujiu@example.com", currentWorkOrder: "WO20230004", status: "1" },
- { id: 8, name: "鍚村崄", teamId: 3, teamName: "娴嬭瘯鍥㈤槦", position: "娴嬭瘯宸ョ▼甯�", phone: "13800138008", email: "wushi@example.com", currentWorkOrder: "", status: "1" }
+ // 蹇冭绠″唴绉戝洟闃熸垚鍛�
+ {
+ id: 1,
+ name: "鏉庢垚鐧�",
+ teamId: 1,
+ teamName: "蹇冭绠″唴绉戝洟闃�",
+ position: "涓讳换鍖诲笀",
+ phone: "13800138001",
+ email: "lichengbai@hospital.com",
+ currentWorkOrder: "MED20230001",
+ status: "1",
+ },
+ {
+ id: 2,
+ name: "鍒樼繆鎯�",
+ teamId: 1,
+ teamName: "蹇冭绠″唴绉戝洟闃�",
+ position: "鍓富浠诲尰甯�",
+ phone: "13800138002",
+ email: "liuyihui@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ {
+ id: 3,
+ name: "寮犲瓱娑�",
+ teamId: 1,
+ teamName: "蹇冭绠″唴绉戝洟闃�",
+ position: "涓绘不鍖诲笀",
+ phone: "13800138003",
+ email: "zhangmenghan@hospital.com",
+ currentWorkOrder: "MED20230002",
+ status: "1",
+ },
+ {
+ id: 9,
+ name: "鍚存�濈堪",
+ teamId: 1,
+ teamName: "蹇冭绠″唴绉戝洟闃�",
+ position: "浣忛櫌鍖诲笀",
+ phone: "13800138009",
+ email: "wusihan@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+
+ // 鑲跨槫绉戞不鐤楀洟闃熸垚鍛�
+ {
+ id: 4,
+ name: "闄堟斂鍊�",
+ teamId: 2,
+ teamName: "鑲跨槫绉戞不鐤楀洟闃�",
+ position: "鑲跨槫绉戜富浠�",
+ phone: "13800138004",
+ email: "chenzhengqian@hospital.com",
+ currentWorkOrder: "MED20230003",
+ status: "1",
+ },
+ {
+ id: 5,
+ name: "閭撹瘲娑�",
+ teamId: 2,
+ teamName: "鑲跨槫绉戞不鐤楀洟闃�",
+ position: "鏀剧枟鍖诲笀",
+ phone: "13800138005",
+ email: "dengshihan@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ {
+ id: 6,
+ name: "榛勭洓鐜�",
+ teamId: 2,
+ teamName: "鑲跨槫绉戞不鐤楀洟闃�",
+ position: "鍖栫枟鍖诲笀",
+ phone: "13800138006",
+ email: "huangshengmei@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+
+ // 鍎跨璇婄枟鍥㈤槦鎴愬憳
+ {
+ id: 7,
+ name: "鐜嬫仼榫�",
+ teamId: 3,
+ teamName: "鍎跨璇婄枟鍥㈤槦",
+ position: "鍎跨涓讳换",
+ phone: "13800138007",
+ email: "wagenlong@hospital.com",
+ currentWorkOrder: "MED20230004",
+ status: "1",
+ },
+ {
+ id: 8,
+ name: "鏈辨斂寤�",
+ teamId: 3,
+ teamName: "鍎跨璇婄枟鍥㈤槦",
+ position: "鍎跨鍖诲笀",
+ phone: "13800138008",
+ email: "zhuzhengting@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ {
+ id: 10,
+ name: "鏋椾僵鐜�",
+ teamId: 3,
+ teamName: "鍎跨璇婄枟鍥㈤槦",
+ position: "鍎跨鎶ゅ+闀�",
+ phone: "13800138010",
+ email: "linpeiling@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+
+ // 鎬ヨ瘖鎶㈡晳鍥㈤槦鎴愬憳
+ {
+ id: 11,
+ name: "鍚翠繆浼�",
+ teamId: 4,
+ teamName: "鎬ヨ瘖鎶㈡晳鍥㈤槦",
+ position: "鎬ヨ瘖绉戜富浠�",
+ phone: "13800138011",
+ email: "wujunbo@hospital.com",
+ currentWorkOrder: "MED20230005",
+ status: "1",
+ },
+ {
+ id: 12,
+ name: "闃Θ瀛�",
+ teamId: 4,
+ teamName: "鎬ヨ瘖鎶㈡晳鍥㈤槦",
+ position: "鎬ヨ瘖鍖诲笀",
+ phone: "13800138012",
+ email: "ruanxinxue@hospital.com",
+ currentWorkOrder: "MED20230006",
+ status: "1",
+ },
+ {
+ id: 13,
+ name: "缈佹儬鐝�",
+ teamId: 4,
+ teamName: "鎬ヨ瘖鎶㈡晳鍥㈤槦",
+ position: "鎬ヨ瘖鎶ゅ+",
+ phone: "13800138013",
+ email: "wenghuizhu@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+
+ // 鍏朵粬鍖荤枟浜哄憳
+ {
+ id: 14,
+ name: "鏂瑰厗鐜�",
+ teamId: 1,
+ teamName: "蹇冭绠″唴绉戝洟闃�",
+ position: "蹇冪數鎶�甯�",
+ phone: "13800138014",
+ email: "fangzhaoyu@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
+ {
+ id: 15,
+ name: "涓佹眽鑷�",
+ teamId: 2,
+ teamName: "鑲跨槫绉戞不鐤楀洟闃�",
+ position: "鐥呯悊鍖诲笀",
+ phone: "13800138015",
+ email: "dinghanzhen@hospital.com",
+ currentWorkOrder: "",
+ status: "1",
+ },
],
+ memberTotal: 15,
memberQueryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
teamId: undefined,
- status: undefined
+ status: undefined,
},
- memberTotal: 8,
memberStatusOptions: [
{ value: "0", label: "绂佺敤" },
- { value: "1", label: "鍚敤" }
+ { value: "1", label: "鍚敤" },
],
memberFormVisible: false,
memberFormTitle: "",
@@ -760,57 +1444,135 @@
position: undefined,
phone: undefined,
email: undefined,
- status: "1"
+ status: "1",
},
memberRules: {
name: [
- { required: true, message: "鎴愬憳濮撳悕涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "鎴愬憳濮撳悕涓嶈兘涓虹┖", trigger: "blur" },
],
teamId: [
- { required: true, message: "鎵�灞炲洟闃熶笉鑳戒负绌�", trigger: "change" }
+ { required: true, message: "鎵�灞炲洟闃熶笉鑳戒负绌�", trigger: "change" },
],
position: [
- { required: true, message: "鑱屼綅涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "鑱屼綅涓嶈兘涓虹┖", trigger: "blur" },
],
phone: [
- { required: true, message: "鑱旂郴鐢佃瘽涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "鑱旂郴鐢佃瘽涓嶈兘涓虹┖", trigger: "blur" },
],
email: [
{ required: true, message: "閭涓嶈兘涓虹┖", trigger: "blur" },
- { type: 'email', message: '璇疯緭鍏ユ纭殑閭鍦板潃', trigger: ['blur', 'change'] }
+ {
+ type: "email",
+ message: "璇疯緭鍏ユ纭殑閭鍦板潃",
+ trigger: ["blur", "change"],
+ },
],
status: [
- { required: true, message: "鎴愬憳鐘舵�佷笉鑳戒负绌�", trigger: "change" }
- ]
+ { required: true, message: "鎴愬憳鐘舵�佷笉鑳戒负绌�", trigger: "change" },
+ ],
},
// 宸ュ崟鎸囨淳鐩稿叧鏁版嵁
workOrderLoading: false,
+ // 鏇挎崲鍘熸湁鐨剋orkOrderList鏁版嵁
workOrderList: [
- { id: "WO20230001", title: "棣栭〉鏀圭増闇�姹傚紑鍙�", priority: "1", createTime: "2023-03-01 09:30:00", deadline: "2023-03-15 18:00:00", assignee: 1, assigneeName: "寮犱笁", status: "1", content: "瀹屾垚棣栭〉鏀圭増鐨勬墍鏈夊墠绔紑鍙戝伐浣�" },
- { id: "WO20230002", title: "鐢ㄦ埛涓績鎺ュ彛寮�鍙�", priority: "2", createTime: "2023-03-05 14:20:00", deadline: "2023-03-20 18:00:00", assignee: 3, assigneeName: "鐜嬩簲", status: "1", content: "寮�鍙戠敤鎴蜂腑蹇冪浉鍏虫帴鍙�" },
- { id: "WO20230003", title: "璁㈠崟绯荤粺鎬ц兘浼樺寲", priority: "1", createTime: "2023-03-10 10:15:00", deadline: "2023-03-25 18:00:00", assignee: 4, assigneeName: "璧靛叚", status: "1", content: "浼樺寲璁㈠崟绯荤粺鎬ц兘锛屾彁楂樺搷搴旈�熷害" },
- { id: "WO20230004", title: "鏀粯鍔熻兘娴嬭瘯", priority: "3", createTime: "2023-03-15 16:45:00", deadline: "2023-03-30 18:00:00", assignee: 7, assigneeName: "鍛ㄤ節", status: "1", content: "瀹屾垚鏀粯鍔熻兘鐨勫叏闈㈡祴璇�" },
- { id: "WO20230005", title: "鏁版嵁鎶ヨ〃寮�鍙�", priority: "2", createTime: "2023-03-20 11:10:00", deadline: "2023-04-05 18:00:00", assignee: undefined, assigneeName: undefined, status: "0", content: "寮�鍙戞暟鎹粺璁℃姤琛ㄥ姛鑳�" }
+ {
+ id: "MED20230001",
+ title: "鍐犲績鐥呮偅鑰匬CI鎵嬫湳瀹夋帓",
+ priority: "1",
+ createTime: "2024-11-01 09:30:00",
+ deadline: "2024-11-05 18:00:00",
+ assignee: 1,
+ assigneeName: "鏉庢垚鐧�",
+ status: "1",
+ content:
+ "涓哄啝蹇冪梾鎮h�呭畨鎺掔粡鐨啝鐘跺姩鑴変粙鍏ユ不鐤楁墜鏈紝闇�瑕佹湳鍓嶈瘎浼板拰鍑嗗",
+ },
+ {
+ id: "MED20230002",
+ title: "楂樿鍘嬫偅鑰呰嵂鐗╂不鐤楁柟妗堣皟鏁�",
+ priority: "2",
+ createTime: "2024-11-03 14:20:00",
+ deadline: "2024-11-08 18:00:00",
+ assignee: 3,
+ assigneeName: "寮犲瓱娑�",
+ status: "1",
+ content: "鏍规嵁鎮h�呰鍘嬬洃娴嬬粨鏋滐紝璋冩暣闄嶅帇鑽墿缁勫悎鍜屽墏閲�",
+ },
+ {
+ id: "MED20230003",
+ title: "鑲虹檶鎮h�呭寲鐤楀懆鏈熷畨鎺�",
+ priority: "1",
+ createTime: "2024-11-05 10:15:00",
+ deadline: "2024-11-10 18:00:00",
+ assignee: 4,
+ assigneeName: "闄堟斂鍊�",
+ status: "1",
+ content: "鍒跺畾鑲虹檶鎮h�呮柊涓�鏈熷寲鐤楁柟妗堬紝鍖呮嫭鑽墿閫夋嫨鍜屽墏閲忚绠�",
+ },
+ {
+ id: "MED20230004",
+ title: "鍎跨鑲虹値鎮h�呰瘖鐤楁柟妗�",
+ priority: "2",
+ createTime: "2024-11-08 16:45:00",
+ deadline: "2024-11-12 18:00:00",
+ assignee: 7,
+ assigneeName: "鐜嬫仼榫�",
+ status: "1",
+ content: "涓哄効绔ヨ偤鐐庢偅鑰呭埗瀹氫釜鎬у寲娌荤枟鏂规锛屽寘鎷姉鐢熺礌閫夋嫨鍜岄浘鍖栨不鐤�",
+ },
+ {
+ id: "MED20230005",
+ title: "鎬ヨ瘖鑳哥棝鎮h�呭揩閫熻瘎浼�",
+ priority: "1",
+ createTime: "2024-11-10 11:10:00",
+ deadline: "2024-11-10 23:00:00",
+ assignee: 11,
+ assigneeName: "鍚翠繆浼�",
+ status: "1",
+ content: "瀵规�ヨ瘖鑳哥棝鎮h�呰繘琛屽揩閫熻瘎浼帮紝鎺掗櫎鎬ユ�у績鑲屾姝诲彲鑳�",
+ },
+ {
+ id: "MED20230006",
+ title: "澶栦激鎮h�呮竻鍒涚紳鍚堝鐞�",
+ priority: "2",
+ createTime: "2024-11-12 13:25:00",
+ deadline: "2024-11-12 20:00:00",
+ assignee: 12,
+ assigneeName: "闃Θ瀛�",
+ status: "1",
+ content: "澶勭悊鎬ヨ瘖澶栦激鎮h�呯殑浼ゅ彛娓呭垱鍜岀紳鍚堝伐浣�",
+ },
+ {
+ id: "MED20230007",
+ title: "绯栧翱鐥呮偅鑰呰儼宀涚礌璋冩暣",
+ priority: "2",
+ createTime: "2024-11-15 08:45:00",
+ deadline: "2024-11-20 18:00:00",
+ assignee: undefined,
+ assigneeName: undefined,
+ status: "0",
+ content: "鏍规嵁鎮h�呰绯栫洃娴嬫暟鎹紝璋冩暣鑳板矝绱犵敤閲忓拰娉ㄥ皠鏂规",
+ },
],
+ workOrderTotal: 7,
workOrderQueryParams: {
pageNum: 1,
pageSize: 10,
id: undefined,
status: undefined,
- assignee: undefined
+ assignee: undefined,
},
- workOrderTotal: 5,
workOrderStatusOptions: [
{ value: "0", label: "寰呮寚娲�" },
{ value: "1", label: "杩涜涓�" },
{ value: "2", label: "宸插畬鎴�" },
- { value: "3", label: "宸插彇娑�" }
+ { value: "3", label: "宸插彇娑�" },
],
priorityOptions: [
{ value: "1", label: "楂�" },
{ value: "2", label: "涓�" },
- { value: "3", label: "浣�" }
+ { value: "3", label: "浣�" },
],
workOrderFormVisible: false,
workOrderFormTitle: "",
@@ -822,24 +1584,24 @@
deadline: undefined,
assignee: undefined,
status: "0",
- content: undefined
+ content: undefined,
},
workOrderRules: {
title: [
- { required: true, message: "宸ュ崟鏍囬涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "宸ュ崟鏍囬涓嶈兘涓虹┖", trigger: "blur" },
],
priority: [
- { required: true, message: "浼樺厛绾т笉鑳戒负绌�", trigger: "change" }
+ { required: true, message: "浼樺厛绾т笉鑳戒负绌�", trigger: "change" },
],
deadline: [
- { required: true, message: "鎴鏃堕棿涓嶈兘涓虹┖", trigger: "change" }
+ { required: true, message: "鎴鏃堕棿涓嶈兘涓虹┖", trigger: "change" },
],
content: [
- { required: true, message: "宸ュ崟鍐呭涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "宸ュ崟鍐呭涓嶈兘涓虹┖", trigger: "blur" },
],
status: [
- { required: true, message: "宸ュ崟鐘舵�佷笉鑳戒负绌�", trigger: "change" }
- ]
+ { required: true, message: "宸ュ崟鐘舵�佷笉鑳戒负绌�", trigger: "change" },
+ ],
},
// 鎸囨淳宸ュ崟鐩稿叧鏁版嵁
@@ -849,30 +1611,44 @@
title: undefined,
assignee: undefined,
priority: "2",
- deadline: undefined
- }
+ deadline: undefined,
+ },
};
+ },
+ // 鍦╳atch涓坊鍔犵洃鎺�
+ watch: {
+ teamDialogVisible(newVal) {
+ if (newVal) {
+ // 瀵硅瘽妗嗘樉绀烘椂閲嶆柊鐢熸垚浜岀淮鐮�
+ this.$nextTick(() => {
+ setTimeout(() => {
+ this.generateTeamQRContent(this.currentTeam);
+ }, 100);
+ });
+ }
+ },
+
},
computed: {
// 鍥㈤槦鎴愬憳閫夐」锛堢敤浜庣┛姊锛�
memberOptions() {
- return this.memberList.map(member => ({
+ return this.memberList.map((member) => ({
key: member.id,
label: member.name,
- disabled: member.status === "0"
+ disabled: member.status === "0",
}));
},
// 杩囨护鍚庣殑鍥㈤槦鍒楄〃
filteredTeamList() {
let list = [...this.teamList];
if (this.teamQueryParams.name) {
- list = list.filter(item =>
+ list = list.filter((item) =>
item.name.includes(this.teamQueryParams.name)
);
}
if (this.teamQueryParams.status) {
- list = list.filter(item =>
- item.status === this.teamQueryParams.status
+ list = list.filter(
+ (item) => item.status === this.teamQueryParams.status
);
}
return list;
@@ -881,18 +1657,18 @@
filteredMemberList() {
let list = [...this.memberList];
if (this.memberQueryParams.name) {
- list = list.filter(item =>
+ list = list.filter((item) =>
item.name.includes(this.memberQueryParams.name)
);
}
if (this.memberQueryParams.teamId) {
- list = list.filter(item =>
- item.teamId === this.memberQueryParams.teamId
+ list = list.filter(
+ (item) => item.teamId === this.memberQueryParams.teamId
);
}
if (this.memberQueryParams.status) {
- list = list.filter(item =>
- item.status === this.memberQueryParams.status
+ list = list.filter(
+ (item) => item.status === this.memberQueryParams.status
);
}
return list;
@@ -901,18 +1677,18 @@
filteredWorkOrderList() {
let list = [...this.workOrderList];
if (this.workOrderQueryParams.id) {
- list = list.filter(item =>
+ list = list.filter((item) =>
item.id.includes(this.workOrderQueryParams.id)
);
}
if (this.workOrderQueryParams.status) {
- list = list.filter(item =>
- item.status === this.workOrderQueryParams.status
+ list = list.filter(
+ (item) => item.status === this.workOrderQueryParams.status
);
}
if (this.workOrderQueryParams.assignee) {
- list = list.filter(item =>
- item.assignee === this.workOrderQueryParams.assignee
+ list = list.filter(
+ (item) => item.assignee === this.workOrderQueryParams.assignee
);
}
return list;
@@ -920,17 +1696,17 @@
// 鍥㈤槦宸ュ崟锛堢敤浜庡洟闃熻鎯咃級
teamWorkOrders() {
if (!this.currentTeam.id) return [];
- const teamMemberIds = this.currentTeam.members.map(member => member.id);
- return this.workOrderList.filter(order =>
+ const teamMemberIds = this.currentTeam.members.map((member) => member.id);
+ return this.workOrderList.filter((order) =>
teamMemberIds.includes(order.assignee)
);
},
// 鍙敤鎴愬憳锛堢敤浜庡伐鍗曟寚娲撅級
availableMembers() {
- return this.memberList.filter(member =>
- member.status === "1" && !member.currentWorkOrder
+ return this.memberList.filter(
+ (member) => member.status === "1" && !member.currentWorkOrder
);
- }
+ },
},
methods: {
// 瑙f瀽鏃堕棿
@@ -947,6 +1723,113 @@
handleTeamQuery() {
this.teamQueryParams.pageNum = 1;
},
+ // 鏌ョ湅鍥㈤槦璇︽儏鏃剁敓鎴愪簩缁寸爜
+ handleTeamDetail(row) {
+ this.currentTeam = row;
+ this.teamDialogTitle = "鍥㈤槦璇︽儏 - " + row.name;
+ this.teamDialogVisible = true;
+
+ // 浣跨敤nextTick纭繚DOM娓叉煋瀹屾垚
+ this.$nextTick(() => {
+ // 鐢熸垚涓存椂浜岀淮鐮佸唴瀹�
+ this.generateTeamQRContent(row);
+ });
+ },
+
+ // 鐢熸垚鍥㈤槦浜岀淮鐮佸唴瀹�
+ generateTeamQRContent(team) {
+ const timestamp = new Date().getTime();
+ const expireTime = timestamp + 24 * 60 * 60 * 1000; // 24灏忔椂鏈夋晥鏈�
+
+ const qrData = {
+ teamId: team.id,
+ teamName: team.name,
+ leader: team.leader,
+ memberCount: team.members.length,
+ timestamp: timestamp,
+ expireTime: expireTime,
+ type: "team_info",
+ };
+
+ // 纭繚鍐呭鏄瓧绗︿覆鏍煎紡
+ this.teamQRContent = "127.0.0.1:8093/wt?p=0BE9L3C2u";
+ console.log("鐢熸垚鐨勪簩缁寸爜鍐呭:", this.teamQRContent);
+ },
+
+ // 浜岀淮鐮佺敓鎴愬洖璋�
+ onQRCodeGenerated(dataURL, id) {
+ if (dataURL) {
+ this.currentQRCodeUrl = dataURL;
+ console.log("浜岀淮鐮佺敓鎴愭垚鍔�");
+ } else {
+ console.error("浜岀淮鐮佺敓鎴愬け璐�");
+ // 澶囩敤鏂规锛氫娇鐢╭rcode.js鐢熸垚
+ this.generateQRCodeWithQRCodeJS();
+ }
+ },
+ // 澶囩敤鐢熸垚鏂规
+ generateQRCodeWithQRCodeJS() {
+ const QRCode = require("qrcode");
+ if (this.teamQRContent) {
+ QRCode.toDataURL(
+ this.teamQRContent,
+ {
+ width: 200,
+ height: 200,
+ margin: 2,
+ color: {
+ dark: "#409EFF",
+ light: "#FFFFFF",
+ },
+ },
+ (err, url) => {
+ if (err) {
+ console.error("澶囩敤浜岀淮鐮佺敓鎴愬け璐�:", err);
+ return;
+ }
+ this.currentQRCodeUrl = url;
+ console.log("澶囩敤浜岀淮鐮佺敓鎴愭垚鍔�");
+ }
+ );
+ }
+ },
+ // 涓嬭浇浜岀淮鐮�
+ downloadQRCode() {
+ if (!this.currentQRCodeUrl) {
+ this.$message.warning("璇峰厛鐢熸垚浜岀淮鐮�");
+ return;
+ }
+
+ const a = document.createElement("a");
+ const event = new MouseEvent("click");
+
+ a.download = `鍥㈤槦浜岀淮鐮乢${
+ this.currentTeam.name
+ }_${new Date().getTime()}.png`;
+ a.href = this.currentQRCodeUrl;
+ a.dispatchEvent(event);
+ },
+
+ // 鍒锋柊浜岀淮鐮�
+ refreshQRCode() {
+ this.generateTeamQRContent(this.currentTeam);
+ this.$message.success("浜岀淮鐮佸凡鍒锋柊");
+ },
+
+ // 鍦ㄥ伐鍗曡鎯呬腑涔熷彲浠ユ坊鍔犱簩缁寸爜鍔熻兘
+ handleWorkOrderDetail(row) {
+ // 鐢熸垚宸ュ崟浜岀淮鐮�
+ const qrData = {
+ workOrderId: row.id,
+ title: row.title,
+ priority: row.priority,
+ status: row.status,
+ timestamp: new Date().getTime(),
+ type: "work_order",
+ };
+
+ this.workOrderQRContent = JSON.stringify(qrData);
+ },
// 閲嶇疆鍥㈤槦鎼滅储
resetTeamQuery() {
this.resetForm("teamQueryForm");
@@ -954,15 +1837,9 @@
},
// 鍥㈤槦澶氶��
handleTeamSelectionChange(selection) {
- this.ids = selection.map(item => item.id);
+ this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
- },
- // 鏌ョ湅鍥㈤槦璇︽儏
- handleTeamDetail(row) {
- this.currentTeam = row;
- this.teamDialogTitle = "鍥㈤槦璇︽儏 - " + row.name;
- this.teamDialogVisible = true;
},
// 鏂板鍥㈤槦
handleTeamAdd() {
@@ -973,56 +1850,65 @@
// 淇敼鍥㈤槦
handleTeamUpdate(row) {
this.resetTeamForm();
- const team = this.teamList.find(item => item.id === row.id);
+ const team = this.teamList.find((item) => item.id === row.id);
this.teamForm = Object.assign({}, team);
- this.teamForm.members = team.members.map(member => member.id);
+ this.teamForm.members = team.members.map((member) => member.id);
this.teamFormTitle = "淇敼鍥㈤槦";
this.teamFormVisible = true;
},
// 鍒犻櫎鍥㈤槦
handleTeamDelete(row) {
const teamIds = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎鍥㈤槦鍚嶇О涓�"' + row.name + '"鐨勬暟鎹」锛�').then(() => {
- // 妯℃嫙鍒犻櫎鍥㈤槦
- this.teamList = this.teamList.filter(item => item.id !== teamIds);
- this.teamTotal = this.teamList.length;
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鍥㈤槦鍚嶇О涓�"' + row.name + '"鐨勬暟鎹」锛�')
+ .then(() => {
+ // 妯℃嫙鍒犻櫎鍥㈤槦
+ this.teamList = this.teamList.filter((item) => item.id !== teamIds);
+ this.teamTotal = this.teamList.length;
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
},
// 鎻愪氦鍥㈤槦琛ㄥ崟
submitTeamForm() {
- this.$refs["teamForm"].validate(valid => {
+ this.$refs["teamForm"].validate((valid) => {
if (valid) {
if (this.teamForm.id != null) {
// 妯℃嫙淇敼鍥㈤槦
- const index = this.teamList.findIndex(item => item.id === this.teamForm.id);
+ const index = this.teamList.findIndex(
+ (item) => item.id === this.teamForm.id
+ );
if (index !== -1) {
- const leader = this.memberList.find(member => member.id === this.teamForm.leader);
- const members = this.memberList.filter(member =>
+ const leader = this.memberList.find(
+ (member) => member.id === this.teamForm.leader
+ );
+ const members = this.memberList.filter((member) =>
this.teamForm.members.includes(member.id)
);
this.teamList.splice(index, 1, {
...this.teamForm,
- leader: leader ? leader.name : '',
- members: members
+ leader: leader ? leader.name : "",
+ members: members,
});
}
this.$modal.msgSuccess("淇敼鎴愬姛");
} else {
// 妯℃嫙鏂板鍥㈤槦
- const newId = Math.max(...this.teamList.map(item => item.id)) + 1;
- const leader = this.memberList.find(member => member.id === this.teamForm.leader);
- const members = this.memberList.filter(member =>
+ const newId = Math.max(...this.teamList.map((item) => item.id)) + 1;
+ const leader = this.memberList.find(
+ (member) => member.id === this.teamForm.leader
+ );
+ const members = this.memberList.filter((member) =>
this.teamForm.members.includes(member.id)
);
this.teamList.unshift({
...this.teamForm,
id: newId,
- leader: leader ? leader.name : '',
+ leader: leader ? leader.name : "",
members: members,
- createTime: new Date().toLocaleString()
+ createTime: new Date().toLocaleString(),
});
this.teamTotal = this.teamList.length;
this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -1039,7 +1925,7 @@
leader: undefined,
members: [],
status: "1",
- description: undefined
+ description: undefined,
};
this.resetForm("teamForm");
},
@@ -1068,7 +1954,7 @@
},
// 鎴愬憳澶氶��
handleMemberSelectionChange(selection) {
- this.ids = selection.map(item => item.id);
+ this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -1081,7 +1967,7 @@
// 淇敼鎴愬憳
handleMemberUpdate(row) {
this.resetMemberForm();
- const member = this.memberList.find(item => item.id === row.id);
+ const member = this.memberList.find((item) => item.id === row.id);
this.memberForm = Object.assign({}, member);
this.memberFormTitle = "淇敼鎴愬憳";
this.memberFormVisible = true;
@@ -1089,37 +1975,49 @@
// 鍒犻櫎鎴愬憳
handleMemberDelete(row) {
const memberIds = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎鎴愬憳濮撳悕涓�"' + row.name + '"鐨勬暟鎹」锛�').then(() => {
- // 妯℃嫙鍒犻櫎鎴愬憳
- this.memberList = this.memberList.filter(item => item.id !== memberIds);
- this.memberTotal = this.memberList.length;
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鎴愬憳濮撳悕涓�"' + row.name + '"鐨勬暟鎹」锛�')
+ .then(() => {
+ // 妯℃嫙鍒犻櫎鎴愬憳
+ this.memberList = this.memberList.filter(
+ (item) => item.id !== memberIds
+ );
+ this.memberTotal = this.memberList.length;
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
},
// 鎻愪氦鎴愬憳琛ㄥ崟
submitMemberForm() {
- this.$refs["memberForm"].validate(valid => {
+ this.$refs["memberForm"].validate((valid) => {
if (valid) {
if (this.memberForm.id != null) {
// 妯℃嫙淇敼鎴愬憳
- const index = this.memberList.findIndex(item => item.id === this.memberForm.id);
+ const index = this.memberList.findIndex(
+ (item) => item.id === this.memberForm.id
+ );
if (index !== -1) {
- const team = this.teamList.find(item => item.id === this.memberForm.teamId);
+ const team = this.teamList.find(
+ (item) => item.id === this.memberForm.teamId
+ );
this.memberList.splice(index, 1, {
...this.memberForm,
- teamName: team ? team.name : ''
+ teamName: team ? team.name : "",
});
}
this.$modal.msgSuccess("淇敼鎴愬姛");
} else {
// 妯℃嫙鏂板鎴愬憳
- const newId = Math.max(...this.memberList.map(item => item.id)) + 1;
- const team = this.teamList.find(item => item.id === this.memberForm.teamId);
+ const newId =
+ Math.max(...this.memberList.map((item) => item.id)) + 1;
+ const team = this.teamList.find(
+ (item) => item.id === this.memberForm.teamId
+ );
this.memberList.unshift({
...this.memberForm,
id: newId,
- teamName: team ? team.name : '',
- currentWorkOrder: ''
+ teamName: team ? team.name : "",
+ currentWorkOrder: "",
});
this.memberTotal = this.memberList.length;
this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -1137,7 +2035,7 @@
position: undefined,
phone: undefined,
email: undefined,
- status: "1"
+ status: "1",
};
this.resetForm("memberForm");
},
@@ -1166,7 +2064,7 @@
},
// 宸ュ崟澶氶��
handleWorkOrderSelectionChange(selection) {
- this.ids = selection.map(item => item.id);
+ this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -1179,7 +2077,7 @@
// 淇敼宸ュ崟
handleWorkOrderUpdate(row) {
this.resetWorkOrderForm();
- const workOrder = this.workOrderList.find(item => item.id === row.id);
+ const workOrder = this.workOrderList.find((item) => item.id === row.id);
this.workOrderForm = Object.assign({}, workOrder);
this.workOrderFormTitle = "缂栬緫宸ュ崟";
this.workOrderFormVisible = true;
@@ -1187,12 +2085,17 @@
// 鍒犻櫎宸ュ崟
handleWorkOrderDelete(row) {
const workOrderIds = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎宸ュ崟鏍囬涓�"' + row.title + '"鐨勬暟鎹」锛�').then(() => {
- // 妯℃嫙鍒犻櫎宸ュ崟
- this.workOrderList = this.workOrderList.filter(item => item.id !== workOrderIds);
- this.workOrderTotal = this.workOrderList.length;
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎宸ュ崟鏍囬涓�"' + row.title + '"鐨勬暟鎹」锛�')
+ .then(() => {
+ // 妯℃嫙鍒犻櫎宸ュ崟
+ this.workOrderList = this.workOrderList.filter(
+ (item) => item.id !== workOrderIds
+ );
+ this.workOrderTotal = this.workOrderList.length;
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
},
// 鎸囨淳宸ュ崟
handleAssignWorkOrder(row) {
@@ -1201,34 +2104,43 @@
title: row.title,
assignee: undefined,
priority: row.priority,
- deadline: row.deadline
+ deadline: row.deadline,
};
this.assignDialogVisible = true;
},
// 鎻愪氦宸ュ崟琛ㄥ崟
submitWorkOrderForm() {
- this.$refs["workOrderForm"].validate(valid => {
+ this.$refs["workOrderForm"].validate((valid) => {
if (valid) {
if (this.workOrderForm.id != null) {
// 妯℃嫙淇敼宸ュ崟
- const index = this.workOrderList.findIndex(item => item.id === this.workOrderForm.id);
+ const index = this.workOrderList.findIndex(
+ (item) => item.id === this.workOrderForm.id
+ );
if (index !== -1) {
- const assignee = this.memberList.find(member => member.id === this.workOrderForm.assignee);
+ const assignee = this.memberList.find(
+ (member) => member.id === this.workOrderForm.assignee
+ );
this.workOrderList.splice(index, 1, {
...this.workOrderForm,
- assigneeName: assignee ? assignee.name : undefined
+ assigneeName: assignee ? assignee.name : undefined,
});
}
this.$modal.msgSuccess("淇敼鎴愬姛");
} else {
// 妯℃嫙鏂板宸ュ崟
- const newId = "WO" + new Date().getFullYear() + (Math.floor(Math.random() * 90000) + 10000);
- const assignee = this.memberList.find(member => member.id === this.workOrderForm.assignee);
+ const newId =
+ "WO" +
+ new Date().getFullYear() +
+ (Math.floor(Math.random() * 90000) + 10000);
+ const assignee = this.memberList.find(
+ (member) => member.id === this.workOrderForm.assignee
+ );
this.workOrderList.unshift({
...this.workOrderForm,
id: newId,
assigneeName: assignee ? assignee.name : undefined,
- createTime: new Date().toLocaleString()
+ createTime: new Date().toLocaleString(),
});
this.workOrderTotal = this.workOrderList.length;
this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -1247,7 +2159,7 @@
deadline: undefined,
assignee: undefined,
status: "0",
- content: undefined
+ content: undefined,
};
this.resetForm("workOrderForm");
},
@@ -1264,9 +2176,13 @@
}
// 妯℃嫙鎸囨淳宸ュ崟
- const index = this.workOrderList.findIndex(item => item.id === this.assignForm.id);
+ const index = this.workOrderList.findIndex(
+ (item) => item.id === this.assignForm.id
+ );
if (index !== -1) {
- const assignee = this.memberList.find(member => member.id === this.assignForm.assignee);
+ const assignee = this.memberList.find(
+ (member) => member.id === this.assignForm.assignee
+ );
if (assignee) {
// 鏇存柊宸ュ崟鐘舵��
this.workOrderList.splice(index, 1, {
@@ -1275,15 +2191,17 @@
assigneeName: assignee.name,
priority: this.assignForm.priority,
deadline: this.assignForm.deadline,
- status: "1"
+ status: "1",
});
// 鏇存柊鎴愬憳褰撳墠宸ュ崟
- const memberIndex = this.memberList.findIndex(member => member.id === this.assignForm.assignee);
+ const memberIndex = this.memberList.findIndex(
+ (member) => member.id === this.assignForm.assignee
+ );
if (memberIndex !== -1) {
this.memberList.splice(memberIndex, 1, {
...this.memberList[memberIndex],
- currentWorkOrder: this.assignForm.id
+ currentWorkOrder: this.assignForm.id,
});
}
@@ -1291,8 +2209,8 @@
this.assignDialogVisible = false;
}
}
- }
- }
+ },
+ },
};
</script>
@@ -1319,7 +2237,7 @@
}
.avatar-uploader ::v-deep .el-upload:hover {
- border-color: #409EFF;
+ border-color: #409eff;
}
.avatar-uploader-icon {
@@ -1337,7 +2255,8 @@
display: block;
}
-.team-members, .team-work-orders {
+.team-members,
+.team-work-orders {
margin-top: 20px;
}
</style>
diff --git a/vue.config.js b/vue.config.js
index 401a4d4..3c92596 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -38,7 +38,8 @@
// target: `http://192.168.168.60:8095`,
// target: `http://192.168.144.34:8095`,
// target: `http://220.66.136.101:8095`,
- target:`http://localhost:8095`,
+ target: `http://192.168.100.10:8099`,
+ // target:`http://localhost:8095`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
diff --git a/wx.zip b/wx.zip
new file mode 100644
index 0000000..20d0ec1
--- /dev/null
+++ b/wx.zip
Binary files differ
--
Gitblit v1.9.3