From 5df476ae693d7577c7a0031ae12c67558b9832a7 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期六, 12 九月 2026 10:48:10 +0800
Subject: [PATCH] 测试完成
---
src/views/patient/questionnaire/index.vue | 219 +++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 166 insertions(+), 53 deletions(-)
diff --git a/src/views/patient/questionnaire/index.vue b/src/views/patient/questionnaire/index.vue
index 7a084eb..3bd0506 100644
--- a/src/views/patient/questionnaire/index.vue
+++ b/src/views/patient/questionnaire/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="leftvlue" style="margin-bottom: 20px">
+ <!-- <div class="leftvlue" style="margin-bottom: 20px">
<el-row :gutter="10">
<el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
<el-card
@@ -61,7 +61,12 @@
</div>
</el-col>
</el-row>
- </div>
+ </div> -->
+ <statistics-cards
+ :cardlist="cardlist"
+ :show-extra="false"
+ :show-warning-condition="false"
+ />
<el-row :gutter="20">
<!--鐢ㄦ埛鏁版嵁-->
<el-form
@@ -103,6 +108,8 @@
v-model="topqueryParams.scopetype"
placeholder="榛樿鍏ㄩ儴"
:options="sourcetype"
+ filterable
+ clearable
:props="{ expandTrigger: 'hover' }"
@change="handleChange"
></el-cascader>
@@ -137,7 +144,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -219,7 +226,7 @@
width="120"
>
<template slot-scope="scope">
- <el-tooltip
+ <el-tooltip
class="item"
effect="dark"
:content="scope.row.remark"
@@ -250,7 +257,54 @@
key="remark"
prop="remark" -->
/>
-
+<el-table-column
+ label="浠诲姟鐘舵��"
+ align="center"
+ key="sendstate"
+ prop="sendstate"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <el-tooltip
+ class="item"
+ effect="dark"
+ :content="scope.row.remark"
+ placement="top-start"
+ >
+ <div v-if="scope.row.sendstate == 1">
+ <el-tag type="primary" :disable-transitions="false"
+ >琛ㄥ崟宸查鍙�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 2">
+ <el-tag type="primary" :disable-transitions="false"
+ >寰呴殢璁�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 3">
+ <el-tag type="success" :disable-transitions="false"
+ >琛ㄥ崟宸插彂閫�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 4">
+ <el-tag type="info" :disable-transitions="false">涓嶆墽琛�</el-tag>
+ </div>
+ <div v-if="scope.row.sendstate == 5">
+ <el-tag type="danger" :disable-transitions="false"
+ >鍙戦�佸け璐�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 6">
+ <el-tag type="success" :disable-transitions="false"
+ >宸插畬鎴�</el-tag
+ >
+ </div>
+ <div v-if="scope.row.sendstate == 7">
+ <el-tag type="danger" :disable-transitions="false">瓒呮椂</el-tag>
+ </div>
+ </el-tooltip>
+ </template>
+ </el-table-column>
<el-table-column
label="澶勭悊鎰忚"
align="center"
@@ -391,7 +445,7 @@
prop="templatename"
width="200"
/>
- <el-table-column
+ <el-table-column
label="浠诲姟鐘舵��"
align="center"
key="sendstate"
@@ -499,7 +553,7 @@
size="medium"
type="text"
@click="followupvisit(scope.row)"
- v-hasPermi="['system:user:edit']"
+
><span class="button-bb"
><i class="el-icon-s-promotion"></i></span
></el-button>
@@ -514,7 +568,7 @@
size="medium"
type="text"
@click="handlestop(scope.row)"
- v-hasPermi="['system:user:edit']"
+
><span class="button-sc"><i class="el-icon-delete"></i></span
></el-button>
</el-tooltip> -->
@@ -679,13 +733,15 @@
} from "@/api/system/user";
import { getTaskservelist } from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
+import StatisticsCards from "@/components/StatisticsCards";
+
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Discharge",
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
- components: { Treeselect },
+ components: { Treeselect, StatisticsCards },
data() {
return {
// 閬僵灞�
@@ -694,6 +750,8 @@
ids: [],
// 闈炲崟涓鐢�
single: true,
+ jgvalue: 0,
+
// 闈炲涓鐢�
multiple: true,
// 鏄剧ず鎼滅储鏉′欢
@@ -721,7 +779,6 @@
},
dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
inputVisible: false,
- ycvalue: "",
yfsvalue: "",
inputValue: "",
preachform: "",
@@ -737,6 +794,7 @@
},
value: [],
list: [],
+ orgname: "",
sourcetype: [
{
@@ -794,15 +852,6 @@
name: "鎮h�呮湇鍔℃�婚噺",
value: 0,
},
-
- {
- name: "鏃犻渶闅忚",
- value: 0,
- },
- {
- name: "闇�闅忚",
- value: 0,
- },
{
name: "寰呴殢璁�",
value: 0,
@@ -828,7 +877,7 @@
pageSize: 10,
serviceType: 7,
searchscope: 3,
- sendstate:2,
+ sendstate: 2,
scopetype: [],
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
@@ -836,7 +885,7 @@
propss: { multiple: true },
options: [],
- topicoptions: [
+ topicoptions: [
{
value: null,
label: "鍏ㄩ儴",
@@ -873,6 +922,9 @@
},
],
errtype: "",
+ ycvalue: 0,
+ jgvalue: 0,
+
leavehospitaldistrictcode: "",
serviceState: [],
checkboxlist: [],
@@ -887,6 +939,8 @@
this.errtype = this.$route.query.errtype;
this.leavehospitaldistrictcode =
this.$route.query.leavehospitaldistrictcode;
+ this.orgname = localStorage.getItem("orgname");
+
this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
return {
label: dept.deptName,
@@ -913,48 +967,65 @@
},
methods: {
/** 鏌ヨ闂ㄨ瘖闅忚鏈嶅姟鍒楄〃 */
- getList(refresh) {
+ async getList(refresh) {
// 榛樿鍏ㄩ儴
- if (this.topqueryParams.searchscope == 3) {
- this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
- (obj) => obj.deptCode
+ this.applyDeptWardScope();
+ if (this.endOut == 0 && !this.topqueryParams.endSendDateTime) {
+ this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
+ this.getEndOfDay()
);
- this.topqueryParams.leavehospitaldistrictcodes =
- store.getters.belongWards.map((obj) => obj.districtCode);
}
+
// 鎺ュ彈寮傚父璺宠浆
if (this.errtype) {
this.topqueryParams.leavehospitaldistrictcodes.push(
this.leavehospitaldistrictcode
);
- console.log(this.topqueryParams.leavehospitaldistrictcodes, "11");
}
+
this.loading = true;
- if (this.topqueryParams.leavehospitaldistrictcodes[0]&&this.topqueryParams.leaveldeptcodes[0]) {
- this.topqueryParams.deptOrDistrict=2;
- }else{
- this.topqueryParams.deptOrDistrict=1;
+
+ if (
+ this.topqueryParams.leavehospitaldistrictcodes[0] &&
+ this.topqueryParams.leaveldeptcodes[0]
+ ) {
+ this.topqueryParams.deptOrDistrict = 2;
+ } else {
+ this.topqueryParams.deptOrDistrict = 1;
}
if (!this.followupAuthority()) {
this.$message.warning("鏈厤缃瀹�/鐥呭尯鐩稿叧鏉冮檺涓嶅彲鏌ヨ");
+ this.loading = false;
return Promise.reject(new Error("鏃犳潈闄愭煡璇�"));
}
- getTaskservelist(this.topqueryParams).then((response) => {
+
+ try {
+ const response = await getTaskservelist(this.topqueryParams);
+
+ // 鉁� 绗竴姝ワ細鍏堥攣瀹氭仮澶嶇姸鎬�
+ this.isRestoring = true;
+
+ // 鉁� 绗簩姝ワ細鍐嶆洿鏂版暟鎹紙杩欎細瑙﹀彂 selection-change锛屼絾琚攣浣忎簡锛�
this.userList = response.rows[0].serviceSubtaskList;
this.total = response.total;
+
+ // 鉁� 绗笁姝ワ細鎭㈠閫変腑鐘舵��
+ // this.restoreSelection();
+ this.$nextTick(() => {
+ this.restoreSelection();
+ });
+
+ // 鉁� 绗洓姝ワ細澶勭悊鍏朵粬鏁版嵁
if (refresh) {
this.cardlist[0].value =
Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
- // this.cardlist[1].value = response.rows[0].wzx;
- this.cardlist[1].value = response.rows[0].wxsf || 0;
- this.ycvalue = response.rows[0].yc;
- this.cardlist[2].value = response.rows[0].xsf || 0;
- this.cardlist[3].value = response.rows[0].dsf || 0;
- this.cardlist[4].value = response.rows[0].ywc || 0;
+ this.cardlist[1].value = response.rows[0].dsf || 0;
+ this.cardlist[2].value = response.rows[0].ywc || 0;
this.yfsvalue = response.rows[0].yfs;
}
- this.loading = false;
+
+ // 鉁� 绗簲姝ワ細澶勭悊 preachform 绛夊叾浠栨暟鎹�
this.userList.forEach((item) => {
let idArray = null;
if (item.endtime) {
@@ -962,23 +1033,65 @@
}
if (item.preachform) {
- if (item.endtime) {
- item.preachformson = item.preachform;
- idArray = item.preachform.split(",");
- }
+ item.preachformson = item.preachform;
+ idArray = item.preachform.split(",");
item.preachform = idArray.map((value) => {
- // 鏌ユ壘id瀵瑰簲鐨勫璞�
const item = this.checkboxlist.find(
(item) => item.value == value
);
- // 濡傛灉鎵惧埌瀵瑰簲鐨刬d锛岃繑鍥瀕abel鍊硷紝鍚﹀垯杩斿洖null
return item ? item.label : null;
});
}
+ if (item.currentPreachform) {
+ item.currentPreachform = this.checkboxlist.find(
+ (item) => item.value == item.currentPreachform
+ )?.value;
+ console.log(item.currentPreachform, "mi");
+ }
});
+
this.total = response.total;
+ this.loading = false;
+
+ // 鉁� 绗叚姝ワ細瑙i攣
+ this.$nextTick(() => {
+ this.isRestoring = false;
+ });
+ } catch (error) {
+ console.error("鑾峰彇鍒楄〃澶辫触:", error);
+ this.loading = false;
+ this.isRestoring = false;
+ }
+ },
+ applyDeptWardScope() {
+ const value = this.topqueryParams.scopetype || [];
+ const deptCodes = [];
+ const wardCodes = [];
+ let isAll = false;
+
+ value.forEach((item) => {
+ const type = item[0];
+ if (type == 3) {
+ isAll = true;
+ } else if (type == 1) {
+ deptCodes.push(item[item.length - 1]);
+ } else if (type == 2) {
+ wardCodes.push(item[item.length - 1]);
+ }
});
+
+ // 閫変簡鍏ㄩ儴 鎴� 鏈�夋嫨 鈫� 鐢ㄦ埛鍏ㄩ儴绉戝/鐥呭尯
+ if (isAll || (!deptCodes.length && !wardCodes.length)) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ } else {
+ this.topqueryParams.leaveldeptcodes = deptCodes;
+ this.topqueryParams.leavehospitaldistrictcodes = wardCodes;
+ }
},
// 鏌ョ湅褰卞儚闅忚璇︽儏
Referencequestion(row) {
@@ -1109,7 +1222,7 @@
pageSize: 10,
serviceType: 7,
searchscope: 2,
- sendstate:2,
+ sendstate: 2,
};
this.handleQuery(1);
},
@@ -1248,9 +1361,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.type == 1) {
- type = 1;
- }
+ if (row.type == 1) {
+ type = 1;
+ }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1387,11 +1500,11 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #F2F8FF;
- color: #324A9B;
+ background: #f2f8ff;
+ color: #324a9b;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #3664D9;
+ background: #3664d9;
color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
--
Gitblit v1.9.3