From d0ec9165edd35e56fbed20eccee9143e835163f3 Mon Sep 17 00:00:00 2001 From: WXL (wul) <wl_5969728@163.com> Date: 星期三, 24 九月 2025 16:18:20 +0800 Subject: [PATCH] 测试完成 --- vue.config.js | 2 src/views/followvisit/record/detailpage/index.vue | 30 src/views/patient/patient/outpatient.vue | 25 src/views/sfstatistics/percentage/satisfaction.vue | 1489 +++++++++++++++++++++++++++++++++++++++++++++++++ src/components/SortCheckbox/index.vue | 138 ++++ src/views/knowledge/education/compilequer/index.vue | 84 + src/views/followvisit/discharge/index.vue | 24 7 files changed, 1,718 insertions(+), 74 deletions(-) diff --git a/src/components/SortCheckbox/index.vue b/src/components/SortCheckbox/index.vue index 1a93e31..19f8c9a 100644 --- a/src/components/SortCheckbox/index.vue +++ b/src/components/SortCheckbox/index.vue @@ -18,11 +18,22 @@ <div v-if="selectedOrder.length > 0" class="selection-order-display"> <span class="order-label">鏈嶅姟鎵ц椤哄簭锛�</span> <span - v-for="(value, index) in selectedOrder" - :key="value" + v-for="(item, index) in selectedOrder" + :key="item.value" class="order-item" > - {{ getSelectedIndex(index) }}.{{ getLabelByValue(value) }} + {{ getSelectedIndex(index) }}.{{ getLabelByValue(item.value) }} + <el-tooltip content="璁剧疆琛ュ伩鏃堕棿" placement="top"> + <el-input-number + v-model="item.compensateTime" + :min="0" + :max="60" + size="mini" + controls-position="right" + class="compensate-time-input" + @change="handleCompensateTimeChange(item.value, $event)" + /> + </el-tooltip> <span v-if="index < selectedOrder.length - 1">銆�</span> </span> </div> @@ -52,42 +63,88 @@ type: String, default: "label", }, + // 鏂板锛氶粯璁よˉ鍋挎椂闂� + defaultCompensateTime: { + type: Number, + default: 0, + }, }, data() { return { checkedValues: [], - selectedOrder: [], + selectedOrder: [], // 鐜板湪鏍煎紡涓� [{value, compensateTime}] }; }, watch: { value: { immediate: true, handler(newVal) { - if (JSON.stringify(newVal) !== JSON.stringify(this.checkedValues)) { - this.checkedValues = [...newVal]; - this.selectedOrder = [...newVal]; + if ( + Array.isArray(newVal) && + newVal.length > 0 && + typeof newVal[0] === "object" + ) { + // 1. 浼犲叆鐨勬槸瀵硅薄鏁扮粍 [{ sort, preachform, compensateTime }] + this.checkedValues = newVal.map((item) => item.preachform); // 鎻愬彇 preachform 缁勬垚閫変腑鍊兼暟缁� + // 鏋勫缓 selectedOrder锛屼紭鍏堜娇鐢ㄤ紶鍏ョ殑 compensateTime锛屽惁鍒欑敤榛樿鍊� + this.selectedOrder = newVal.map((item) => ({ + value: item.preachform, + compensateTime: item.hasOwnProperty("compensateTime") + ? item.compensateTime + : this.defaultCompensateTime, + })); + } else { + // 2. 浼犲叆鐨勬槸瀛楃涓叉暟缁� (濡� ["1", "3", "4"]锛屽吋瀹逛箣鍓嶇殑鐢ㄦ硶) + if (JSON.stringify(newVal) !== JSON.stringify(this.checkedValues)) { + this.checkedValues = [...newVal]; + // 鏋勫缓鎴栨洿鏂� selectedOrder锛屼繚鐣欏凡鏈夌殑 compensateTime + const newOrder = []; + newVal.forEach((value) => { + const existingItem = this.selectedOrder.find( + (item) => item.value === value + ); + if (existingItem) { + newOrder.push(existingItem); + } else { + newOrder.push({ + value, + compensateTime: this.defaultCompensateTime, + }); + } + }); + this.selectedOrder = newOrder; + } } }, + deep: true // 寤鸿娣诲姞 deep: true 浠ョ‘淇濆璞℃暟缁勫唴鐨勫彉鍖栬兘琚崟鑾� }, checkedValues(newVal, oldVal) { + // 澶勭悊閫変腑椤圭殑鍙樺寲 const added = newVal.filter((item) => !oldVal.includes(item)); const removed = oldVal.filter((item) => !newVal.includes(item)); added.forEach((value) => { - if (!this.selectedOrder.includes(value)) { - this.selectedOrder.push(value); + if (!this.selectedOrder.find((item) => item.value === value)) { + this.selectedOrder.push({ + value, + compensateTime: this.defaultCompensateTime, + }); } }); removed.forEach((value) => { - const index = this.selectedOrder.indexOf(value); + const index = this.selectedOrder.findIndex( + (item) => item.value === value + ); if (index > -1) { this.selectedOrder.splice(index, 1); } }); + // 鏇存柊鐖剁粍浠剁殑 v-model 缁戝畾鍊硷紙閫変腑鍊兼暟缁勶級 this.$emit("input", [...newVal]); - this.$emit("change", [...newVal], [...this.selectedOrder]); + // 瑙﹀彂 change 浜嬩欢锛屼紶閫掑畬鏁寸殑涓氬姟鏁版嵁 + this.emitChangeEvent(); }, }, methods: { @@ -98,9 +155,7 @@ return typeof option === "object" ? option[this.labelKey] : option; }, getLabelByValue(value) { - const option = this.options.find( - (opt) => this.getValue(opt) === value - ); + const option = this.options.find((opt) => this.getValue(opt) === value); return option ? this.getLabel(option) : value; }, getSelectedIndex(index) { @@ -110,12 +165,42 @@ return `(${index + 1})`; } }, - getSelectionOrder() { - return [...this.selectedOrder]; + // 澶勭悊琛ュ伩鏃堕棿鍙樺寲 + handleCompensateTimeChange(value, newTime) { + const item = this.selectedOrder.find((item) => item.value === value); + if (item) { + item.compensateTime = newTime; + // 琛ュ伩鏃堕棿鍙樺寲鏃讹紝鍙Е鍙� change 浜嬩欢锛屼笉瑙﹀姩 v-model + this.emitChangeEvent(); + } }, + // 鍙戝皠鍙樺寲浜嬩欢 + emitChangeEvent() { + // 杞崲鏁版嵁鏍煎紡涓虹埗缁勪欢闇�瑕佺殑鏍煎紡 + const outputData = this.selectedOrder.map((item, index) => ({ + sort: index + 1, + preachform: item.value, + compensateTime: item.compensateTime, + })); + this.$emit("change", outputData); // 鍙戝皠 change 浜嬩欢锛屼紶閫掑畬鏁存暟鎹� + }, + // 鑾峰彇褰撳墠閫夋嫨椤哄簭鍜岃ˉ鍋挎椂闂� + getSelectionOrder() { + return this.selectedOrder.map((item, index) => ({ + sort: index + 1, + preachform: item.value, + compensateTime: item.compensateTime, + })); + }, + // 璁剧疆閫夋嫨椤哄簭鍜岃ˉ鍋挎椂闂� setSelectionOrder(orderedValues) { - this.selectedOrder = [...orderedValues]; - this.checkedValues = [...orderedValues]; + this.selectedOrder = orderedValues.map((item) => ({ + value: item.preachform, + compensateTime: item.compensateTime || this.defaultCompensateTime, + })); + + this.checkedValues = orderedValues.map((item) => item.preachform); + this.emitChangeEvent(); }, }, }; @@ -139,6 +224,9 @@ background-color: #f5f7fa; border-radius: 4px; border: 1px solid #ebeef5; + display: flex; + flex-wrap: wrap; + align-items: center; } .order-label { @@ -150,6 +238,14 @@ .order-item { color: #409eff; font-weight: 500; + display: inline-flex; + align-items: center; + margin-right: 8px; +} + +.compensate-time-input { + width: 90px; + margin-left: 8px; } /* 鍝嶅簲寮忚璁★細灏忓睆骞曟椂鎹㈣ */ @@ -160,6 +256,12 @@ .selection-order-display { padding: 8px; + flex-direction: column; + align-items: flex-start; + } + + .order-item { + margin-bottom: 8px; } } </style> diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue index f220ce4..cf10bf3 100644 --- a/src/views/followvisit/discharge/index.vue +++ b/src/views/followvisit/discharge/index.vue @@ -249,10 +249,7 @@ <el-col :span="1.5"> <div class="documentf"> <div class="document"> - <el-button - type="primary" - size="medium" - @click="affiliation()" + <el-button type="primary" size="medium" @click="affiliation()" >鏈汉鎵�灞炴湇鍔�</el-button > </div> @@ -327,6 +324,15 @@ }}</span></el-button > </template> + </el-table-column> + <el-table-column + label="璇婃柇鍚嶇О" + align="center" + key="leavediagname" + prop="leavediagname" + width="120" + :show-overflow-tooltip="true" + > </el-table-column> <el-table-column label="浠诲姟鐘舵��" @@ -509,16 +515,6 @@ key="leavehospitaldistrictname" prop="leavehospitaldistrictname" width="120" - > - </el-table-column> - - <el-table-column - label="璇婃柇鍚嶇О" - align="center" - key="leavediagname" - prop="leavediagname" - width="120" - :show-overflow-tooltip="true" > </el-table-column> diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue index 3d96308..aec86ff 100644 --- a/src/views/followvisit/record/detailpage/index.vue +++ b/src/views/followvisit/record/detailpage/index.vue @@ -52,7 +52,7 @@ <el-table :data="logsheetlist" :row-class-name="tableRowClassName" - :max-height="350" + :max-height="350" style="width: 100%" @selection-change="handleSelectionChange" > @@ -737,6 +737,24 @@ </el-row> <el-row :gutter="20"> <el-col :span="12" + ><el-form-item label="鎬у埆" prop="telcode"> + <el-select v-model="userform.sex" placeholder="璇烽�夋嫨"> + <el-option label="鐢�" :value="1"> </el-option> + <el-option label="濂�" :value="2"> </el-option> + </el-select> </el-form-item + ></el-col> + <el-col :span="12"> + <el-form-item label="骞撮緞" prop="name"> + <el-input + v-model="userform.age" + placeholder="璇疯緭鍏ュ鍚�" + maxlength="20" + ></el-input> </el-form-item + ></el-col> + </el-row> + + <el-row :gutter="20"> + <el-col :span="12" ><el-form-item label="鑱旂郴鏂瑰紡" prop="telcode"> <el-input v-model="userform.telcode" @@ -755,6 +773,16 @@ </el-row> <el-row :gutter="20"> <el-col :span="24"> + <el-form-item label="璇婃柇鍚嶇О" prop="name"> + <el-input + v-model="form.leavediagname" + placeholder="璇疯緭鍏ヨ瘖鏂�" + maxlength="50" + ></el-input> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="20"> + <el-col :span="24"> <el-form-item label="鍑虹敓鍦�" prop="birthplace"> <el-input v-model="userform.birthplace" diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue index 7d0db6e..7a7e4c9 100644 --- a/src/views/knowledge/education/compilequer/index.vue +++ b/src/views/knowledge/education/compilequer/index.vue @@ -206,9 +206,20 @@ </el-select> </el-form-item> <el-form-item label="閫傜敤鐤剧梾" prop="region"> - <el-button type="warning" @click="$refs.child.handleAddpatient()" - >娣诲姞鐤剧梾</el-button + <div style="margin-bottom: 10px"> + <el-button type="warning" @click="$refs.child.handleAddpatient()" + >娣诲姞鐤剧梾璇婃柇</el-button + > + </div> + <el-tag + v-for="tag in displayedTags" + :key="tag.icdid" + type="warning" + :disable-transitions="false" > + {{ tag.icdname }} + </el-tag> + <el-tag v-if="hasMore" type="info">+{{ remaining }} more</el-tag> </el-form-item> <el-form-item label="閫傜敤闄㈠尯" prop="region"> <el-select @@ -253,7 +264,7 @@ </el-form-item> </el-form> </div> - <!-- 瀹f暀鍐呭 --> + <!-- 瀹f暀鍐呭 --> <div v-if="Editprogress == 2"> <el-row :gutter="20"> <el-col :span="4"> @@ -292,8 +303,12 @@ <div> <el-button @click="laststep('ruleForm')">涓婁竴姝�</el-button> - <el-button type="success" @click="Departmenttreatment('ruleForm')">淇濆瓨</el-button> - <el-button type="warning" @click="Departmenttreatment('ruleForm')">鍙﹀瓨鏂扮増鏈�</el-button> + <el-button type="success" @click="Departmenttreatment('ruleForm')" + >淇濆瓨</el-button + > + <el-button type="warning" @click="Departmenttreatment('ruleForm')" + >鍙﹀瓨鏂扮増鏈�</el-button + > <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button> </div> </div> @@ -311,7 +326,7 @@ <script> import { Editor, Toolbar } from "@wangeditor/editor-for-vue"; -import '@wangeditor/editor/dist/css/style.css'; +import "@wangeditor/editor/dist/css/style.css"; import axios from "axios"; import { getToken } from "@/utils/auth"; @@ -322,6 +337,7 @@ addrichText, getlibraryinfo, getillnesslist, + getillness, } from "@/api/AiCentre/index"; import OptionalForm from "@/components/OptionalForm"; import { listDept } from "@/api/system/dept"; @@ -333,7 +349,7 @@ components: { OptionalForm, Editor, Toolbar }, data() { return { - // 缂栬緫鍣ㄥ疄渚� + // 缂栬緫鍣ㄥ疄渚� editorRef: null, // 缂栬緫鍣ㄥ唴瀹� @@ -341,7 +357,7 @@ // 缂栬緫鍣ㄦā寮� mode: "default", - +fileList:[], // 宸ュ叿鏍忛厤缃� toolbarConfig: { excludeKeys: [ @@ -350,7 +366,7 @@ "uploadVideo", "emotion", "codeBlock", - ] + ], }, // 缂栬緫鍣ㄩ厤缃� @@ -364,7 +380,7 @@ maxNumberOfFiles: 1, allowedFileTypes: ["image/*"], headers: { - Authorization: "Bearer " + getToken() + Authorization: "Bearer " + getToken(), }, customUpload: async (file, insertFn) => { try { @@ -376,9 +392,9 @@ formData, { headers: { - "Content-Type": "multipart/form-data", - Authorization: "Bearer " + getToken() - } + // "Content-Type": "multipart/form-data", + Authorization: "Bearer " + getToken(), + }, } ); @@ -394,13 +410,13 @@ console.error("鍥剧墖涓婁紶澶辫触", error); this.$message.error("鍥剧墖涓婁紶澶辫触"); } - } - } - } + }, + }, + }, }, // 涓婁紶閰嶇疆 headers: { - Authorization: "Bearer " + getToken() + Authorization: "Bearer " + getToken(), }, uploadImgUrlword: process.env.VUE_APP_BASE_API + "/common/uploadShow", @@ -417,7 +433,7 @@ preachname: "", preachcontent: "", isAvailable: "", - suitway: [] + suitway: [], }, // 鍏朵粬鏁版嵁 @@ -430,13 +446,13 @@ variablelist: [ { variatename: "濮撳悕", variate: "${name}", default: 1 }, { variatename: "鐢佃瘽", variate: "${phone}", default: 1 }, - { variatename: "鐥呮儏", variate: "${illness}", default: 1 } + { variatename: "鐥呮儏", variate: "${illness}", default: 1 }, ], props: { multiple: true, value: "deptId", - label: "deptName" + label: "deptName", }, fileName: "", //鏂囦欢鍚� inputVisible: false, @@ -493,7 +509,6 @@ ], addvalue: "娣诲姞棰樼洰", - // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, @@ -527,25 +542,39 @@ // }, content(newVal) { // 鍐呭鍙樺寲鏃惰Е鍙戯紝鍙互鍦ㄨ繖閲屽鐞嗚嚜鍔ㄤ繚瀛樼瓑閫昏緫 - this.$emit('content-change', newVal) - } + this.$emit("content-change", newVal); + }, }, beforeDestroy() { const editor = this.editor; if (editor == null) return; editor.destroy(); // 缁勪欢閿�姣佹椂锛屽強鏃堕攢姣佺紪杈戝櫒 }, + computed: { + displayedTags() { + // 杩斿洖鍓�10涓猼ag + return this.illnesslist.slice(0, 10); + }, + hasMore() { + // 鍒ゆ柇鏄惁鏈夋洿澶氱殑tag + return this.illnesslist.length > 10; + }, + remaining() { + // 璁$畻鍓╀綑鐨則ag鏁伴噺 + return this.illnesslist.length - 10; + }, + }, methods: { onCreated(editor) { this.editor = Object.seal(editor); // 涓�瀹氳鐢� Object.seal()锛屽惁鍒欎細鎶ラ敊 }, // 缂栬緫鍣ㄥ垱寤哄洖璋� - handleEditorCreated(editor) { + handleEditorCreated(editor) { this.editorRef = editor; console.log("缂栬緫鍣ㄥ凡鍒涘缓", editor); }, - // 閿�姣佺紪杈戝櫒 + // 閿�姣佺紪杈戝櫒 destroyEditor() { if (this.editorRef) { this.editorRef.destroy(); @@ -1011,7 +1040,8 @@ // }, // 鑾峰彇杩滅▼鍐呭 Getmissioncontent(url) { - axios.get(url) + axios + .get(url) .then((response) => { this.content = response.data; }) @@ -1023,7 +1053,7 @@ }, // 鐢熷懡鍛ㄦ湡閽╁瓙 beforeUnmount() { - this.destroyEditor() + this.destroyEditor(); }, }; </script> diff --git a/src/views/patient/patient/outpatient.vue b/src/views/patient/patient/outpatient.vue index 81c38ae..bb43741 100644 --- a/src/views/patient/patient/outpatient.vue +++ b/src/views/patient/patient/outpatient.vue @@ -740,8 +740,7 @@ pageSize: 10, searchscope: 3, scopetype: [], - leaveldeptcodes: [], - leavehospitaldistrictcodes: [], + deptcodes: [], }, // 琛ㄥ崟鏍¢獙 rules: { @@ -818,11 +817,11 @@ getList() { this.loading = true; if (this.queryParams.searchscope == 3) { - this.queryParams.leaveldeptcodes = store.getters.belongDepts.map( + this.queryParams.deptcodes = store.getters.belongDepts.map( (obj) => obj.deptCode ); - this.queryParams.leavehospitaldistrictcodes = - store.getters.belongWards.map((obj) => obj.districtCode); + // this.queryParams.leavehospitaldistrictcodes = + // store.getters.belongWards.map((obj) => obj.districtCode); } if (this.dateRange) { this.queryParams.beginTime = this.dateRange[0]; @@ -855,16 +854,16 @@ handleChange(value) { let type = value[0]; let code = value.slice(-1)[0]; - this.queryParams.leavehospitaldistrictcodes = []; - this.queryParams.leaveldeptcodes = []; + // this.queryParams.leavehospitaldistrictcodes = []; + this.queryParams.deptcodes = []; if (type == 1) { - this.queryParams.leaveldeptcodes.push(code); - this.queryParams.leavehospitaldistrictcodes = []; + this.queryParams.deptcodes.push(code); + // this.queryParams.leavehospitaldistrictcodes = []; this.queryParams.searchscope = 1; } else if (type == 2) { - this.queryParams.leavehospitaldistrictcodes.push(code); - this.queryParams.leaveldeptcodes = []; + // this.queryParams.leavehospitaldistrictcodes.push(code); + this.queryParams.deptcodes = []; this.queryParams.searchscope = 2; } else { this.queryParams.searchscope = 3; @@ -939,8 +938,8 @@ pageSize: 10, searchscope: 3, scopetype: [], - leaveldeptcodes: [], - leavehospitaldistrictcodes: [], + deptcodes: [], + // leavehospitaldistrictcodes: [], }; this.handleQuery(); }, diff --git a/src/views/sfstatistics/percentage/satisfaction.vue b/src/views/sfstatistics/percentage/satisfaction.vue new file mode 100644 index 0000000..b9ced80 --- /dev/null +++ b/src/views/sfstatistics/percentage/satisfaction.vue @@ -0,0 +1,1489 @@ +<template> + <div class="Questionnairemanagement"> + <div class="leftvlue"> + <div class="leftvlue-bg"> + <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="98px" + > + <el-form-item label="缁熻绫诲瀷" prop="userName"> + <el-select + v-model="queryParams.statisticaltype" + placeholder="璇烽�夋嫨缁熻绫诲瀷" + > + <el-option + v-for="item in Statisticallist" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + <el-select + style="margin-left: 10px" + v-if="queryParams.statisticaltype == 1" + v-model="queryParams.leavehospitaldistrictcodes" + size="medium" + multiple + filterable + placeholder="璇烽�夋嫨鐥呭尯" + > + <el-option + v-for="item in flatArrayhospit" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + <el-select + v-else-if="queryParams.statisticaltype == 2" + v-model="queryParams.deptcodes" + size="medium" + multiple + filterable + placeholder="璇烽�夋嫨绉戝" + > + <el-option + v-for="item in flatArraydept" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + + <el-form-item label="缁熻棰樼洰" prop="userName"> + <el-select + v-model="queryParams.serviceType" + multiple + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item + label-width="200" + label="闅忚鏃堕棿鑼冨洿" + prop="userName" + > + <el-date-picker + v-model="queryParams.dateRange" + value-format="yyyy-MM-dd" + type="daterange" + range-separator="鑷�" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + > + </el-date-picker> + </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-col :span="19"> + <el-button + type="warning" + plain + icon="el-icon-download" + size="medium" + @click="handleExport" + >瀵煎嚭</el-button + > + <el-button + type="primary" + plain + icon="el-icon-data-line" + size="medium" + @click="showChartDialog" + >缁熻瓒嬪娍鍥�</el-button + > + </el-col> + </el-form> + <el-table + v-loading="loading" + :data="userList" + :border="true" + @selection-change="handleSelectionChange" + @row-click="handleRowClick" + @expand-change="handleRowClick" + :row-key="getRowKey" + :expand-row-keys="expands" + > + <el-table-column + label="鍑洪櫌鐥呭尯" + align="center" + sortable + key="leavehospitaldistrictname" + prop="leavehospitaldistrictname" + :show-overflow-tooltip="true" + /> + <el-table-column + label="绉戝" + align="center" + key="deptname" + prop="deptname" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鍑洪櫌浜烘" + align="center" + key="dischargeCount" + prop="dischargeCount" + > + </el-table-column> + + <el-table-column + label="鏃犻渶闅忚浜烘" + align="center" + key="nonFollowUp" + prop="nonFollowUp" + > + </el-table-column> + <el-table-column + label="搴旈殢璁夸汉娆�" + align="center" + key="followUpNeeded" + prop="followUpNeeded" + > + </el-table-column> + <el-table-column + label="闅忚鐜�" + align="center" + key="followUpRate" + prop="followUpRate" + > + <!-- <template slot-scope="scope"> + <span + >{{ + (Number(scope.row.followUpRate) * 100).toFixed(2) + }}%</span + > + </template> --> + </el-table-column> + <el-table-column + label="鍙婃椂鐜�" + align="center" + key="rate" + prop="rate" + > + <template slot-scope="scope"> + <el-button + size="medium" + type="text" + @click="Seedetails(scope.row)" + ><span class="button-zx" + >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span + ></el-button + > + </template> + </el-table-column> + <el-table-column + label="婊℃剰搴﹂鐩�婚噺" + align="center" + key="manual" + prop="manual" + > + </el-table-column> + <el-table-column + label="婊℃剰搴﹀~鎶ラ噺" + align="center" + key="sms" + prop="sms" + > + </el-table-column> + <el-table-column + label="瀹屾垚姣旂巼" + align="center" + key="rate" + prop="rate" + > + <template slot-scope="scope"> + <el-button + size="medium" + type="text" + @click="Seedetails(scope.row)" + ><span class="button-zx" + >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span + ></el-button + > + </template> + </el-table-column> + <el-table-column + label="鎿嶄綔" + align="center" + fixed="right" + width="300" + class-name="small-padding fixed-width" + > + <template slot-scope="scope"> + <el-button size="medium" type="text" @click="Seedetails(scope.row)" + ><span class="button-zx" + ><i class="el-icon-s-order"></i>鏌ョ湅璇︽儏</span + ></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> + </div> + </div> + <!-- 缁熻瓒嬪娍鍥惧脊绐� --> + <el-dialog + title="闅忚缁熻瓒嬪娍鍥�" + :visible.sync="chartDialogVisible" + width="80%" + :close-on-click-modal="false" + > + <div class="chart-container"> + <el-row :gutter="20"> + <el-col :span="12"> + <div class="chart-title">闅忚鐘舵�佸垎甯�</div> + <div id="pieChart" style="width: 100%; height: 400px"></div> + </el-col> + <el-col :span="12"> + <div class="chart-title">闅忚瓒嬪娍鍒嗘瀽</div> + <div id="barLineChart" style="width: 100%; height: 400px"></div> + </el-col> + </el-row> + </div> + </el-dialog> + <el-dialog + title="鏈強鏃堕殢璁挎偅鑰呮湇鍔�" + :visible.sync="SeedetailsVisible" + v-loading="Seedloading" + width="70%" + :close-on-click-modal="false" + > + <div class="examine-jic"> + <div class="jic-value"> + <el-row :gutter="20"> + <!--鐢ㄦ埛鏁版嵁--> + <el-form + :model="patientqueryParams" + ref="queryForm" + size="small" + :inline="true" + label-width="98px" + > + <el-form-item label="鎮h�咃細"> + <el-input + v-model="patientqueryParams.name" + @keyup.enter.native="handleQuery" + ></el-input> + </el-form-item> + <el-form-item label="鎮h�呰瘖鏂細"> + <el-input + v-model="patientqueryParams.leavediagname" + @keyup.enter.native="handleQuery" + ></el-input> + </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> + <!-- 閫夋嫨鎮h�呭垪琛� --> + <el-table :data="logsheetlist" style="width: 100%"> + <el-table-column + prop="sendname" + align="center" + label="濮撳悕" + width="100" + > + </el-table-column> + <el-table-column + prop="taskName" + align="center" + width="200" + show-overflow-tooltip + label="浠诲姟鍚嶇О" + > + </el-table-column> + <el-table-column + prop="sendstate" + align="center" + width="200" + label="浠诲姟鐘舵��" + > + <template slot-scope="scope"> + <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> + </template> + </el-table-column> + <el-table-column + prop="visitTime" + align="center" + label="搴旈殢璁挎椂闂�" + width="200" + show-overflow-tooltip + > + </el-table-column> + <el-table-column + prop="finishtime" + align="center" + label="闅忚瀹屾垚鏃堕棿" + width="200" + show-overflow-tooltip + > + </el-table-column> + <el-table-column + label="鍑洪櫌鏃ユ湡" + width="200" + align="center" + key="endtime" + prop="endtime" + > + <template slot-scope="scope"> + <span>{{ formatTime(scope.row.endtime) }}</span> + </template></el-table-column + > + <el-table-column + label="璐d换鎶ゅ+" + width="120" + align="center" + key="nurseName" + prop="nurseName" + /> + <el-table-column + label="涓绘不鍖荤敓" + width="120" + align="center" + key="drname" + prop="drname" + /> + + <el-table-column + label="缁撴灉鐘舵��" + align="center" + key="excep" + prop="excep" + width="120" + > + <template slot-scope="scope"> + <dict-tag + :options="dict.type.sys_yujing" + :value="scope.row.excep" + /> + </template> + </el-table-column> + <el-table-column + label="澶勭悊鎰忚" + align="center" + key="suggest" + prop="suggest" + width="120" + > + <template slot-scope="scope"> + <dict-tag + :options="dict.type.sys_suggest" + :value="scope.row.suggest" + /> + </template> + </el-table-column> + + <el-table-column + prop="templatename" + align="center" + label="鏈嶅姟妯℃澘" + width="200" + show-overflow-tooltip + > + </el-table-column> + <el-table-column + prop="remark" + align="center" + label="鏈嶅姟璁板綍" + width="200" + show-overflow-tooltip + > + </el-table-column> + + <el-table-column + prop="bankcardno" + align="center" + label="鍛煎彨鐘舵��" + width="210" + > + </el-table-column> + <el-table-column + label="鎿嶄綔" + fixed="right" + align="center" + width="200" + class-name="small-padding fixed-width" + > + <template slot-scope="scope"> + <el-button + size="medium" + type="text" + @click="SeedetailsgGo(scope.row)" + ><span class="button-zx" + ><i class="el-icon-s-order"></i>鏌ョ湅</span + ></el-button + > + </template> + </el-table-column> + </el-table> + </el-row> + <pagination + v-show="patienttotal > 0 && this.patientqueryParams.allhosp != 6" + :total="patienttotal" + :page.sync="patientqueryParams.pn" + :limit.sync="patientqueryParams.ps" + @pagination="Seedetails" + /> + </div> + </div> + </el-dialog> + </div> +</template> + +<script> +import { + toamendtag, + addapitag, + deletetag, + changetagcategory, +} from "@/api/system/label"; +import store from "@/store"; +import { getSfStatistics, selectTimelyRate } from "@/api/system/user"; + +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; +const shortcuts = [ + { + text: "浠婂ぉ", + onClick(picker) { + picker.$emit("pick", new Date()); + }, + }, + { + text: "鏄ㄥぉ", + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() - 3600 * 1000 * 24); + picker.$emit("pick", date); + }, + }, + { + text: "涓�鍛ㄥ墠", + onClick(picker) { + const date = new Date(); + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit("pick", date); + }, + }, +]; +export default { + name: "Percentage", + dicts: ["sys_normal_disable", "sys_user_sex"], + components: { Treeselect }, + data() { + return { + topactiveName: "Local", //椤堕儴閫夋嫨 + activeName: "first", //渚ц竟閫夋嫨 + expands: [], + // 閬僵灞� + loading: false, + Seedloading: false, + chartDialogVisible: false, + pieChart: null, + barLineChart: null, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + idds: "", //鍒嗙被id + // 鎬绘潯鏁� + total: 0, + flatArrayhospit: [], + flatArraydept: [], + patienttotal: 0, + logsheetlist: [], + Statisticallist: [ + { + label: "鐥呭尯缁熻", + value: 1, + }, + { + label: "绉戝缁熻", + value: 2, + }, + ], + patientqueryParams: { + pn: 1, + ps: 10, + }, + amendtag: false, //鏄惁淇敼绫诲埆 + lstamendtag: false, //鏄惁淇敼鏍囩 + scavisible: false, //鍒犻櫎寮规 + deleteVisible: false, //鍒嗙被鍒犻櫎寮规 + deletefenl: "楂樿鍘�", //鍒犻櫎椤� + //淇敼娣诲姞鏍囩寮规鏁版嵁 + tagform: { + isupload: "", + tagname: "", + tagcategoryid: "", + tagdescription: "", + }, + classifyform: { + categoryname: "", + }, + // 鏍囩琛ㄦ牸鏁版嵁 + userList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏃ユ湡鑼冨洿 + dateRange: [], + // 宀椾綅閫夐」 + postOptions: [], + // 瑙掕壊閫夐」 + roleOptions: [], + // 瀛樺偍鎵�鏈夌瀹や唬鐮� + allDeptCodes: [], + // 瀛樺偍鎵�鏈夌梾鍖轰唬鐮� + allWardCodes: [], + // 琛ㄥ崟鍙傛暟 + form: {}, + forms: { + name: "", + }, + numberlb: 22, + dialogFormVisible: false, //娣诲姞銆佷慨鏀圭被鍒脊妗� + lstamendtagVisible: false, //娣诲姞銆佷慨鏀规爣绛惧脊妗� + goQRCodeVisible: false, //浜岀淮鐮佸脊妗� + sidecolumnval: "", //绫诲埆鎼滅储 + propss: { multiple: true }, + SeedetailsVisible: false, + options: store.getters.tasktypes, + pickerOptions: { + disabledDate(time) { + return time.getTime() < Date.now() - 3600 * 1000 * 24; + }, + shortcuts: shortcuts, + }, + pickerOptionsa: { + disabledDate(time) { + return time.getTime() > Date.now(); + }, + shortcuts: shortcuts, + }, + // 鏌ヨ鏍囩鍒楄〃鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + serviceType: [2], + dateRange: [], + statisticaltype: 1, + leavehospitaldistrictcodes: ["all"], // 榛樿閫変腑鍏ㄩ儴鐥呭尯 + deptcodes: [], // 榛樿閫変腑鍏ㄩ儴绉戝 + }, + // 鍒椾俊鎭� + columns: [ + { key: 0, label: `鏍囩缂栧彿`, visible: true }, + { key: 1, label: `鏍囩鍚嶇О`, visible: true }, + { key: 2, label: `鏍囩鏄电О`, visible: true }, + { key: 3, label: `閮ㄩ棬`, visible: true }, + { key: 4, label: `鎵嬫満鍙风爜`, visible: true }, + { key: 5, label: `鐘舵�乣, visible: true }, + { key: 6, label: `鍒涘缓鏃堕棿`, visible: true }, + ], + }; + }, + watch: {}, + created() { + this.getDeptTree(); + this.getList(); + }, + + methods: { + /** 鏌ヨ鏍囩鍒楄〃 */ + getList() { + // 澶勭悊鏌ヨ鍙傛暟 + const params = { + ...this.queryParams, + // 濡傛灉閫夋嫨浜�"鍏ㄩ儴"锛屽垯浼犳墍鏈夌梾鍖�/绉戝浠g爜 + leavehospitaldistrictcodes: + this.queryParams.leavehospitaldistrictcodes.includes("all") + ? this.allWardCodes + : this.queryParams.leavehospitaldistrictcodes, + deptcodes: this.queryParams.deptcodes.includes("all") + ? this.allDeptCodes + : this.queryParams.deptcodes, + }; + + // 绉婚櫎鍙兘瀛樺湪鐨�"all"鍊� + delete params.leavehospitaldistrictcodes.all; + delete params.deptcodes.all; + getSfStatistics(params).then((response) => { + console.log(response); + // this.total = response.total; + this.userList = response.data; + }); + }, + getRowKey(row) { + return row.statisticaltype === 1 + ? row.leavehospitaldistrictcode + : row.deptcode; + }, + + // 澶勭悊琛岀偣鍑诲睍寮� + handleRowClick(row) { + console.log(row, "row"); + + // 濡傛灉宸茬粡灞曞紑鍒欐敹璧� + if (this.expands.includes(this.getRowKey(row))) { + this.expands = []; + return; + } + // 澶勭悊鏌ヨ鍙傛暟 + const params = { + ...this.queryParams, + // 濡傛灉閫夋嫨浜�"鍏ㄩ儴"锛屽垯浼犳墍鏈夌梾鍖�/绉戝浠g爜 + leavehospitaldistrictcodes: [row.leavehospitaldistrictcode], + drcode: "1", + }; + // 濡傛灉璇ヨ杩樻病鏈夊姞杞藉尰鐢熸暟鎹紝鍒欏姞杞� + if (!row.doctorStats) { + this.loading = true; + getSfStatistics(params).then((res) => { + this.$set(row, "doctorStats", res.data); + this.expands = [this.getRowKey(row)]; + this.loading = false; + }); + } else { + this.expands = [this.getRowKey(row)]; + } + }, + /** 淇敼鏍囩 */ + handleUpdate(row) { + console.log(row, "淇敼鏍囩"); + this.lstamendtagVisible = true; + this.lstamendtag = true; + this.tagform = { + isupload: row.isupload, + tagname: row.tagname, + tagcategoryid: row.tagcategoryid, + tagdescription: row.tagdescription, + tagid: row.tagid, + }; + }, + // 鑾峰彇绉戝鏍� + getDeptTree() { + // 绉戝鍒楄〃 + this.flatArraydept = store.getters.belongDepts.map((dept) => { + return { + label: dept.deptName, + value: dept.deptCode, + }; + }); + // 瀛樺偍鎵�鏈夌瀹や唬鐮� + this.allDeptCodes = store.getters.belongDepts.map( + (dept) => dept.deptCode + ); + + // 鐥呭尯鍒楄〃 + this.flatArrayhospit = store.getters.belongWards.map((ward) => { + return { + label: ward.districtName, + value: ward.districtCode, + }; + }); + + // 瀛樺偍鎵�鏈夌梾鍖轰唬鐮� + this.allWardCodes = store.getters.belongWards.map( + (ward) => ward.districtCode + ); + this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" }); + this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" }); + }, + flattenArray(multiArray) { + let result = []; + + // 閫掑綊鍑芥暟锛岀敤浜庡皢澶氱骇鏁扮粍杞崲涓轰竴缁存暟缁勶紝鍙寘鍚渶搴曞眰鐨勫厓绱� + function flatten(element) { + // 濡傛灉褰撳墠鍏冪礌鏈夊瓙鍏冪礌锛岀户缁�掑綊 + if (element.children && element.children.length > 0) { + element.children.forEach((child) => flatten(child)); + } else { + // 鍏嬮殕鍏冪礌浠ラ伩鍏嶄慨鏀瑰師濮嬫暟鎹� + let item = JSON.parse(JSON.stringify(element)); + result.push(item); // 灏嗘渶搴曞眰鐨勫厓绱犳坊鍔犲埌缁撴灉鏁扮粍 + } + } + + // 浠庨《灞傚厓绱犲紑濮嬮�掑綊 + multiArray.forEach((element) => flatten(element)); + return result; // 杩斿洖鍙寘鍚渶搴曞眰鍏冪礌鐨勪竴缁存暟缁� + }, + addladeltag() { + this.lstamendtagVisible = true; + this.lstamendtag = false; + this.tagform = { + isupload: "", + tagname: "", + tagcategoryid: "", + tagdescription: "", + tagid: "", + }; + }, + Seedetails(row) { + this.SeedetailsVisible = true; + this.Seedloading = true; + this.patientqueryParams.starttime = this.parseTime( + this.queryParams.dateRange[0] + ); + this.patientqueryParams.endtime = this.parseTime( + this.queryParams.dateRange[1] + ); + this.patientqueryParams.deptcode = row.deptcode; + selectTimelyRate(this.patientqueryParams).then((response) => { + this.logsheetlist = response.data.detail; + this.patienttotal = response.data.total; + this.Seedloading = false; + }); + }, + SeedetailsgGo(row) { + this.SeedetailsVisible = false; + let type = ""; + if (row.preachformson && row.preachformson.includes("3")) { + type = 1; + } + setTimeout(() => { + this.$router.push({ + path: "/followvisit/record/detailpage/", + query: { + taskid: row.taskid, + patid: row.patid, + id: row.id, + Voicetype: type, + // visitCount: this.topqueryParams.visitCount, + }, + }); + }, 300); + }, + // 娣诲姞/淇敼鏍囩 + Maintenancetag() { + if (this.lstamendtag) { + toamendtag(this.addDateRange(this.tagform)).then((response) => { + console.log(response); + this.getList(); + }); + } else { + addapitag(this.addDateRange(this.tagform)).then((response) => { + console.log(response); + this.getList(); + }); + } + this.tagform = { + isupload: "", + tagname: "", + tagcategoryid: "", + tagdescription: "", + tagid: "", + }; + }, + routerErr(row) { + console.log(row, "璺宠浆寮傚父"); + this.$router.push({ + path: "/followvisit/discharge", + query: { + errtype: 1, + leavehospitaldistrictcode: row.leavehospitaldistrictcode, + }, + }); + }, + + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + userId: undefined, + deptId: undefined, + userName: undefined, + nickName: undefined, + password: undefined, + phonenumber: undefined, + email: undefined, + sex: undefined, + status: "0", + remark: undefined, + postIds: [], + roleIds: [], + }; + this.resetForm("form"); + }, + // 鏍囩鐘舵�佷慨鏀� + handleStatusChange(row) { + console.log(row.isupload); + let text = row.isupload === "0" ? "鍚敤" : "鍋滅敤"; + this.$modal + .confirm('纭瑕�"' + text + '""' + row.tagname + '"鏍囩鍚楋紵') + .then(function () { + return changetagcategory(row.tagid, row.isupload); + }) + .then(() => { + this.$modal.msgSuccess(text + "鎴愬姛"); + }) + .catch(function () { + row.isupload = row.isupload === "0" ? "1" : "0"; + }); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + if (!this.queryParams.dateRange) this.queryParams.dateRange = []; + if (this.queryParams.statisticaltype == 1) { + this.queryParams.deptcodes = []; + } else if (this.queryParams.statisticaltype == 2) { + this.queryParams.leavehospitaldistrictcodes = []; + } + console.log(this.queryParams.dateRange); + + this.queryParams.startTime = this.parseTime( + this.queryParams.dateRange[0] + ); + this.queryParams.endTime = this.parseTime(this.queryParams.dateRange[1]); + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.queryParams.dateRange = []; + this.queryParams.leavehospitaldistrictcodes = []; + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.tagid); + this.single = selection.length != 1; + this.multiple = !selection.length; + }, + + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + console.log(row, "鍒犻櫎寮圭獥"); + const tagids = row.tagid || this.ids; + console.log(tagids); + const tagname = row.tagname; + this.$modal + .confirm( + tagname + ? '鏄惁纭鍒犻櫎鏍囩鍚嶇О涓�"' + tagname + '"鐨勬暟鎹」锛�' + : "鏄惁纭鍒犻櫎閫変腑鐨勬暟鎹」锛�" + ) + .then(function () { + return deletetag(tagids); + }) + .then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }) + .catch(() => {}); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download( + "smartor/serviceSubtask/getSfStatisticsExport", + { + ...this.queryParams, + }, + `user_${new Date().getTime()}.xlsx` + ); + }, + // 鏄剧ず鍥捐〃寮圭獥 + + showChartDialog() { + this.chartDialogVisible = true; + this.$nextTick(() => { + this.initPieChart(); + this.initBarLineChart(); + }); + }, + // 鍦╩ethods涓慨鏀圭粺璁℃柟娉� + showChartDialog() { + this.chartDialogVisible = true; + this.$nextTick(() => { + console.log(this.userList, "this.userList"); + + this.initCharts(); + }); + }, + + // 鏂板鍒濆鍖栧浘琛ㄦ柟娉� + initCharts() { + this.initPieChart(); + this.initBarLineChart(); + }, + + // 鍒濆鍖栭ゼ鍥� + initPieChart() { + const echarts = require("echarts"); + const pieDom = document.getElementById("pieChart"); + if (!pieDom) return; + + if (this.pieChart) { + this.pieChart.dispose(); + } + + this.pieChart = echarts.init(pieDom); + + // 璁$畻楗煎浘鏁版嵁 + const followUpData = { + pending: 0, + success: 0, + fail: 0, + }; + + this.userList.forEach((item) => { + followUpData.pending += item.pendingFollowUp || 0; + followUpData.success += item.followUpSuccess || 0; + followUpData.fail += item.followUpFail || 0; + }); + + // 浣跨敤鏇寸編瑙傜殑棰滆壊鏂规 + const pieOption = { + title: { + text: "闅忚鐘舵�佸垎甯�", + left: "center", + textStyle: { + color: "#333", + fontSize: 16, + }, + }, + tooltip: { + trigger: "item", + formatter: "{a} <br/>{b}: {c} ({d}%)", + }, + legend: { + orient: "vertical", + left: "left", + data: ["寰呴殢璁�", "闅忚鎴愬姛", "闅忚澶辫触"], + textStyle: { + color: "#666", + }, + }, + color: ["#FF9D4D", "#36B37E", "#FF5C5C"], // 鏂扮殑閰嶈壊鏂规 + series: [ + { + name: "闅忚鐘舵��", + type: "pie", + radius: ["40%", "70%"], + avoidLabelOverlap: true, + itemStyle: { + borderRadius: 10, + borderColor: "#fff", + borderWidth: 2, + }, + label: { + show: true, + formatter: "{b}: {c} ({d}%)", + color: "#333", + }, + emphasis: { + label: { + show: true, + fontSize: "18", + fontWeight: "bold", + }, + itemStyle: { + shadowBlur: 10, + shadowOffsetX: 0, + shadowColor: "rgba(0, 0, 0, 0.5)", + }, + }, + data: [ + { + value: followUpData.pending, + name: "寰呴殢璁�", + }, + { + value: followUpData.success, + name: "闅忚鎴愬姛", + }, + { + value: followUpData.fail, + name: "闅忚澶辫触", + }, + ], + }, + ], + }; + + this.pieChart.setOption(pieOption); + window.addEventListener("resize", this.resizePieChart); + }, + + // 鍒濆鍖栨煴鐘舵姌绾垮浘 + initBarLineChart() { + const echarts = require("echarts"); + const barDom = document.getElementById("barLineChart"); + if (!barDom) return; + + if (this.barLineChart) { + this.barLineChart.dispose(); + } + + this.barLineChart = echarts.init(barDom); + + // 鍑嗗鏁版嵁 + const categories = this.userList.map( + (item) => item.leavehospitaldistrictname || item.deptname + ); + + const dischargeData = this.userList.map( + (item) => item.dischargeCount || 0 + ); + const followUpData = this.userList.map( + (item) => item.followUpNeeded || 0 + ); + + // 鏂板涓ゆ潯鎶樼嚎鏁版嵁 + const followUpRateData = this.userList.map((item) => { + if (!item.followUpRate) return 0; + // 鍘绘帀鐧惧垎鍙峰苟杞负鏁板瓧 + const rateStr = String(item.followUpRate).replace("%", ""); + return parseFloat(rateStr) || 0; + }); + + const timelyRateData = this.userList.map((item) => + item.rate ? (Number(item.rate) * 100).toFixed(2) : 0 + ); + + const option = { + title: { + text: "绉戝/鐥呭尯闅忚瓒嬪娍", + left: "center", + textStyle: { + color: "#333", + fontSize: 16, + }, + }, + tooltip: { + trigger: "axis", + axisPointer: { + type: "cross", + crossStyle: { + color: "#999", + }, + }, + }, + legend: { + data: ["鍑洪櫌浜烘", "搴旈殢璁夸汉娆�", "闅忚鐜�(%)", "鍙婃椂鐜�(%)"], + top: "bottom", + textStyle: { + color: "#666", + }, + }, + color: ["#5470C6", "#91CC75", "#EE6666", "#9A60B4"], // 鏂板绱壊鐢ㄤ簬鍙婃椂鐜� + xAxis: { + type: "category", + data: categories, + axisLabel: { + interval: 0, + rotate: 30, + color: "#666", + }, + axisLine: { + lineStyle: { + color: "#ddd", + }, + }, + }, + yAxis: [ + { + type: "value", + name: "浜烘", + min: 0, + axisLabel: { + color: "#666", + }, + axisLine: { + lineStyle: { + color: "#ddd", + }, + }, + splitLine: { + lineStyle: { + color: "#f0f0f0", + }, + }, + }, + { + type: "value", + name: "鐧惧垎姣�(%)", + min: 0, + max: 100, + axisLabel: { + color: "#666", + formatter: "{value}%", + }, + axisLine: { + lineStyle: { + color: "#ddd", + }, + }, + splitLine: { + show: false, + }, + }, + ], + series: [ + { + name: "鍑洪櫌浜烘", + type: "bar", + barWidth: "25%", + data: dischargeData, + itemStyle: { + borderRadius: [4, 4, 0, 0], + }, + }, + { + name: "搴旈殢璁夸汉娆�", + type: "bar", + barWidth: "25%", + data: followUpData, + itemStyle: { + borderRadius: [4, 4, 0, 0], + }, + }, + { + name: "闅忚鐜�(%)", + type: "line", + yAxisIndex: 1, + data: followUpRateData, + symbolSize: 8, + lineStyle: { + width: 3, + }, + markLine: { + silent: true, + data: [ + { + yAxis: 80, + lineStyle: { + color: "#EE6666", + type: "dashed", + }, + // label: { + // position: 'end', + // formatter: '鐩爣80%' + // } + }, + ], + }, + }, + { + name: "鍙婃椂鐜�(%)", + type: "line", + yAxisIndex: 1, + data: timelyRateData, + symbolSize: 8, + lineStyle: { + width: 3, + type: "dotted", // 浣跨敤铏氱嚎鍖哄垎 + }, + markLine: { + silent: true, + data: [ + { + yAxis: 90, + lineStyle: { + color: "#9A60B4", + type: "dashed", + }, + // label: { + // position: 'end', + // formatter: '鐩爣90%' + // } + }, + ], + }, + }, + ], + grid: { + top: "15%", + left: "3%", + right: "4%", + bottom: "15%", + containLabel: true, + }, + }; + + this.barLineChart.setOption(option); + window.addEventListener("resize", this.resizeBarLineChart); + }, + + // 鍥捐〃鍝嶅簲寮忚皟鏁存柟娉� + resizePieChart() { + if (this.pieChart) { + this.pieChart.resize(); + } + }, + + resizeBarLineChart() { + if (this.barLineChart) { + this.barLineChart.resize(); + } + }, + + // 鍦ㄧ粍浠堕攢姣佹椂娓呯悊 + beforeDestroy() { + // 绉婚櫎浜嬩欢鐩戝惉 + window.removeEventListener("resize", this.resizePieChart); + window.removeEventListener("resize", this.resizeBarLineChart); + + // 閿�姣佸浘琛ㄥ疄渚� + if (this.pieChart) { + this.pieChart.dispose(); + this.pieChart = null; + } + if (this.barLineChart) { + this.barLineChart.dispose(); + this.barLineChart = null; + } + }, + }, +}; +</script> + +<style lang="scss" scoped> +.sidecolumn { + width: 180px; + min-height: 100vh; + text-align: center; + // display: flex; + margin-top: 20px; + margin: 20px; + padding: 30px; + background: #edf1f7; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); + .sidecolumn-top { + display: flex; + justify-content: space-between; + .top-wj { + font-size: 20px; + } + .top-tj { + font-size: 18px; + + color: rgb(0, 89, 255); + cursor: pointer; + } + } + .center-ss { + margin-top: 30px; + .input-with-select { + height: 40px !important; + } + } + .bottom-fl { + margin-top: 30px; + display: center !important; + } +} +.qrcode-dialo { + text-align: center; + // display: flex; + margin: 20px; + padding: 30px; + background: #edf1f7; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); + .qrcode-text { + font-size: 20px; + span { + margin-left: 20px; + } + } + .qrcode-img { + width: 300px; + height: 400px; + } +} +::v-deep.el-tabs--left, +.el-tabs--right { + overflow: hidden; + align-items: center; + display: flex; +} +::v-deep.el-input--medium .el-input__inner { + height: 40px !important; +} +::v-deep.el-tabs--right .el-tabs__active-bar.is-right { + height: 40px; + width: 5px; + left: 0; +} +::v-deep.el-tabs--right .el-tabs__item.is-right { + display: block; + text-align: left; + font-size: 20px; +} + +.leftvlue { + // display: flex; + // flex: 1; + // width: 80%; + // margin-top: 20px; + margin: 20px; + padding: 30px; + background: #ffff; + border: 1px solid #dcdfe6; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), + 0 0 6px 0 rgba(0, 0, 0, 0.04); + .mulsz { + font-size: 20px; + } +} +/* 浣胯鏈夋墜鍨嬫寚閽� */ +.el-table__row { + cursor: pointer; +} +/* 鍐呭眰鍖荤敓琛ㄦ牸鏍峰紡 */ +.inner-table { + // 琛ㄥご鑳屾櫙鑹� + ::v-deep .el-table__header-wrapper { + background-color: #f0f7ff !important; + + th { + background-color: #f0f7ff !important; + } + } + + // 琛ㄦ牸琛岃儗鏅壊 + ::v-deep .el-table__body-wrapper { + tr { + background-color: #f9fbfe !important; + + &:hover { + background-color: #e6f1ff !important; + } + } + } + + // 杈规棰滆壊 + ::v-deep .el-table--border { + border-color: #d9e8ff !important; + + td, + th { + border-color: #d9e8ff !important; + } + } + + // 鏂戦┈绾规晥鏋� + ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td { + background-color: #f5f9ff !important; + } +} +/* 灞曞紑琛屾牱寮� */ +.el-table__expanded-cell { + padding: 10px 0 !important; + background: #f8f8f8; +} +.document { + width: 100px; + height: 50px; +} +.documentf { + display: flex; + justify-content: flex-end; +} +.button-text { + color: rgb(70, 204, 238); +} +.button-textck { + color: rgb(39, 167, 67); +} +.button-textxg { + color: rgb(35, 81, 233); +} +.button-textsc { + color: rgb(235, 23, 23); +} +</style> diff --git a/vue.config.js b/vue.config.js index 9c1e761..4874dd6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,7 +36,7 @@ // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { // target: `https://www.health-y.cn/lssf`, - // target: `http://192.168.100.158:8095`, + // target: `http://192.168.100.126:8095`, target: `http://192.168.100.10:8096`, // target:`http://localhost:8095`, // target:`http://35z1t16164.qicp.vip`, -- Gitblit v1.9.3