From de147dda682f8ac597bbcc8555b57acbdf45dba2 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期四, 13 十一月 2025 16:55:51 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/discharge/ClickCall copy.vue | 1258 ++
vue.config.js | 11
src/views/followvisit/zbAgain/index.vue | 58
src/views/groupManagement/PersonnelGroup/index.vue | 0
src/views/knowledge/education/compilequer/index copy.vue | 1322 ++
src/views/knowledge/questionnaire/compilequer/index.vue | 473
src/views/patient/patient/index.vue | 22
src/views/patient/medtechnician/PatientChart.vue | 55
src/components/SortCheckbox/index.vue | 289
src/views/patient/subsequent/index.vue | 18
src/views/groupManagement/serviceGroup/index.vue | 355
src/api/AiCentre/satisfaction.js | 30
src/views/followvisit/zysatisfaction/index.vue | 1967 +++
src/views/outsideChainnew.vue | 28
src/views/satisfaction.vue | 1188 ++
src/views/patient/patient/operation.vue | 2
src/views/patient/propaganda/Missionotice.vue | 3
src/utils/directives/preventReClick.js | 22
src/views/outsideChainwt.vue | 26
src/views/patient/patient/behospitalized.vue | 13
src/components/CallButton/index.vue | 113
src/store/getters.js | 125
src/views/followvisit/discharge/outpatientService.vue | 41
src/views/outsideChainxjnew.vue | 108
src/views/patient/propaganda/Missioncreation.vue | 173
src/components/CallCenterLs/index.vue | 717 +
src/utils/sipService-cs.js | 363
src/permission.js | 81
src/smartor/dataobject/dw_patouthosp_list.vue | 2
src/views/followvisit/technology/index.vue | 26
src/views/patient/physical/index.vue | 16
src/api/system/serviceGroup.js | 94
src/store/modules/user.js | 369
src/views/groupManagement/PersonnelGroup/particulars.vue | 0
src/assets/order/BHostClient.exe | 0
SLTD-WL.zip | 0
src/smartor/dataobject/dw_patouthosp_base.vue | 2
src/router/index.js | 10
src/views/followvisit/OutpatientAgain/index.vue | 1845 +++
src/assets/order/Xftp-8.0.0084p.exe | 0
src/assets/styles/element-variables.scss | 4
src/views/followvisit/discharge/js/json2.js | 506
src/views/followvisit/discharge/js/prototype.js | 4874 ++++++++
src/main.js | 2
src/views/groupManagement/PatientGroup/particulars.vue | 0
src/views/sfstatistics/percentage/index.vue | 1639 +-
src/views/patient/patient/hospital.vue | 13
src/views/knowledge/questionnaire/index.vue | 31
src/views/patient/patient/AwaitingAdmission.vue | 1257 ++
src/views/groupManagement/PatientGroup/index.vue | 0
src/views/shortmessage/healthinformation/compilequer/index.vue | 157
src/api/AiCentre/index.js | 26
src/views/followvisit/outpatient/index.vue | 16
src/views/patient/patient/physical.vue | 2
src/api/AiCentre/phoneCall.js | 20
src/views/patient/patient/outpatient.vue | 57
src/views/patient/propaganda/QuestionnaireTask.vue | 391
src/views/followvisit/mzsatisfaction/index.vue | 1976 +++
src/views/patient/propaganda/index.vue | 7
src/views/patient/patient/ExternalPatient.vue | 16
src/views/followvisit/record/detailpage/index.vue | 1062 +
src/views/knowledge/questionbank/particulars/index.vue | 4
src/views/groupManagement/serviceGroup/particulars.vue | 518
src/views/knowledge/education/compilequer/index.vue | 447
src/views/outsideChainwtnew.vue | 963 +
src/views/followvisit/complaint/index.vue | 1963 +++
src/views/followvisit/tasklist/index.vue | 113
src/api/system/user.js | 26
src/views/followvisit/discharge/js/cti-manager.js | 202
src/assets/styles/variables.scss | 2
src/views/complaint/complaintmy/index.vue | 1
src/views/followvisit/SpecificDisease/index.vue | 29
src/views/followvisit/again/index.vue | 62
src/assets/styles/sidebar.scss | 5
src/views/patient/patient/indexls.vue | 4
src/utils/sipService.js | 51
src/views/sfstatistics/percentage/satisfaction.vue | 1533 ++
src/layout/components/TagsView/index.vue | 4
src/views/knowledge/education/index.vue | 20
src/views/patient/questionnaire/index.vue | 16
src/views/followvisit/linem/index.vue | 3
src/views/followvisit/record/index.vue | 39
src/views/loginSSO.vue | 160
src/components/PatientSelection/index.vue | 585 +
src/utils/request.js | 2
src/views/system/user/index.vue | 5
src/views/followvisit/record/physical/index.vue | 25
src/views/login.vue | 33
src/views/patient/shadow/index.vue | 16
src/api/AiCentre/EChartsdata.js | 16
src/views/followvisit/discharge/ClickCall.vue | 1502 ++
src/views/patient/propaganda/particty.vue | 374
src/views/complaint/complaintlist/index.vue | 2
src/views/followvisit/discharge/js/websocket.js | 826 +
src/views/followvisit/discharge/index.vue | 203
src/views/patient/follow/index.vue | 5
96 files changed, 30,241 insertions(+), 2,799 deletions(-)
diff --git a/SLTD-WL.zip b/SLTD-WL.zip
new file mode 100644
index 0000000..3ef20a5
--- /dev/null
+++ b/SLTD-WL.zip
Binary files differ
diff --git a/src/api/AiCentre/EChartsdata.js b/src/api/AiCentre/EChartsdata.js
index 2b4d479..d6ebdb0 100644
--- a/src/api/AiCentre/EChartsdata.js
+++ b/src/api/AiCentre/EChartsdata.js
@@ -59,3 +59,19 @@
data: data,
});
}
+// 鑾峰彇orgid
+// 鍐嶆闅忚鏈嶅姟
+export function getorganization(data) {
+ return request({
+ url: "/smartor/organization/list",
+ method: "get",
+ });
+}
+// 鍙戦�佺煭淇�
+export function sendMsg(data) {
+ return request({
+ url: "/sms/send",
+ method: "post",
+ data: data
+ });
+}
diff --git a/src/api/AiCentre/index.js b/src/api/AiCentre/index.js
index a124c74..9af0b74 100644
--- a/src/api/AiCentre/index.js
+++ b/src/api/AiCentre/index.js
@@ -1,12 +1,14 @@
-export * from './indicator'
-export * from './Problemspeaking'
-export * from './Followup'
-export * from './general'
-export * from './publicity'
-export * from './Qtemplate'
-export * from './questionnaire'
-export * from './SingleTask'
-export * from './external'
-export * from './patientexternal'
-export * from './EChartsdata'
-export * from './satisfactionse'
+export * from "./indicator";
+export * from "./Problemspeaking";
+export * from "./Followup";
+export * from "./general";
+export * from "./publicity";
+export * from "./Qtemplate";
+export * from "./questionnaire";
+export * from "./SingleTask";
+export * from "./external";
+export * from "./patientexternal";
+export * from "./EChartsdata";
+export * from "./satisfactionse";
+export * from "./satisfaction";
+export * from "./phoneCall";
diff --git a/src/api/AiCentre/phoneCall.js b/src/api/AiCentre/phoneCall.js
new file mode 100644
index 0000000..f2f5124
--- /dev/null
+++ b/src/api/AiCentre/phoneCall.js
@@ -0,0 +1,20 @@
+import request from "@/utils/request";
+
+// 鍒犻櫎澶栭儴鎮h�呰〃
+export function CallgetList() {
+ return request({
+ url: "/smartor/ServiceTelInfo/getList",
+ method: "get",
+ params: {
+ orgid: localStorage.getItem("orgid"),
+ },
+ });
+}
+// 鏌ヨ澶栭儴鎮h�呰〃
+export function CallsetState(data) {
+ return request({
+ url: "/smartor/ServiceTelInfo/setState",
+ method: "get",
+ params: data,
+ });
+}
diff --git a/src/api/AiCentre/satisfaction.js b/src/api/AiCentre/satisfaction.js
new file mode 100644
index 0000000..1d72c6e
--- /dev/null
+++ b/src/api/AiCentre/satisfaction.js
@@ -0,0 +1,30 @@
+import request from "@/utils/request";
+
+// 澶栭摼鑾峰彇闅忚
+export function getScriptByCondition(data) {
+ return request({
+ url: "/smartor/servicetask/getScriptByCondition",
+ method: "post",
+ data: data
+ });
+}
+
+
+
+// 缂撳瓨闂嵎
+export function saveMYDQuestionAnswer(data) {
+ return request({
+ url: "/smartor/subtaskAnswer/saveMYDQuestionAnswer",
+ method: "post",
+ data: data
+ });
+}
+// 缂撳瓨闂嵎
+export function WLgetDept(orgid) {
+ return request({
+ url: "/getDept/" + orgid,
+ method: "get",
+ });
+}
+
+
diff --git a/src/api/system/serviceGroup.js b/src/api/system/serviceGroup.js
new file mode 100644
index 0000000..9629e20
--- /dev/null
+++ b/src/api/system/serviceGroup.js
@@ -0,0 +1,94 @@
+import request from '@/utils/request'
+
+// 鏌ヨ鏈嶅姟缁勫垪琛�
+export function listServiceGroup(query) {
+ return request({
+ url: '/system/serviceGroup/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鏌ヨ鏈嶅姟缁勮缁�
+export function getServiceGroup(groupId) {
+ return request({
+ url: '/system/serviceGroup/' + groupId,
+ method: 'get'
+ })
+}
+
+// 鏂板鏈嶅姟缁�
+export function addServiceGroup(data) {
+ return request({
+ url: '/system/serviceGroup',
+ method: 'post',
+ data: data
+ })
+}
+
+// 淇敼鏈嶅姟缁�
+export function updateServiceGroup(data) {
+ return request({
+ url: '/system/serviceGroup',
+ method: 'put',
+ data: data
+ })
+}
+
+// 鍒犻櫎鏈嶅姟缁�
+export function delServiceGroup(groupId) {
+ return request({
+ url: '/system/serviceGroup/' + groupId,
+ method: 'delete'
+ })
+}
+
+// 鏌ヨ鏈嶅姟缁勫叧鑱旂殑浠诲姟鍒楄〃
+export function getGroupTasks(groupId) {
+ return request({
+ url: '/system/serviceGroup/' + groupId + '/tasks',
+ method: 'get'
+ })
+}
+
+// 鏌ヨ鏈嶅姟缁勫叧鑱旂殑鎮h�呭垪琛�
+export function getGroupPatients(groupId) {
+ return request({
+ url: '/system/serviceGroup/' + groupId + '/patients',
+ method: 'get'
+ })
+}
+
+// 鍏宠仈浠诲姟鍒版湇鍔$粍
+export function addTaskToGroup(data) {
+ return request({
+ url: '/system/serviceGroup/tasks',
+ method: 'post',
+ data: data
+ })
+}
+
+// 浠庢湇鍔$粍绉婚櫎浠诲姟
+export function removeTaskFromGroup(groupId, taskId) {
+ return request({
+ url: '/system/serviceGroup/' + groupId + '/tasks/' + taskId,
+ method: 'delete'
+ })
+}
+
+// 鍏宠仈鎮h�呭埌鏈嶅姟缁�
+export function addPatientToGroup(data) {
+ return request({
+ url: '/system/serviceGroup/patients',
+ method: 'post',
+ data: data
+ })
+}
+
+// 浠庢湇鍔$粍绉婚櫎鎮h��
+export function removePatientFromGroup(groupId, patientId) {
+ return request({
+ url: '/system/serviceGroup/' + groupId + '/patients/' + patientId,
+ method: 'delete'
+ })
+}
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 451a5c0..79ab356 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -94,6 +94,21 @@
data: data,
});
}
+// 婊℃剰搴︽槑缁嗘煡璇�
+export function getSfStatisticsJoydetails(data) {
+ return request({
+ url: "/smartor/serviceSubtask/getSfStatisticsJoydetails",
+ method: "post",
+ data: data,
+ });
+}// 婊℃剰搴︾粺璁�
+export function getSfStatisticsJoy(data) {
+ return request({
+ url: "/smartor/serviceSubtask/getSfStatisticsJoy",
+ method: "post",
+ data: data,
+ });
+}
// 鏈強鏃舵煡璇�
export function selectTimelyRate(data) {
return request({
@@ -103,6 +118,17 @@
});
}
+// 浠诲姟闅忚鐜囩粺璁¤〃鐨勪笅閽绘槑缁�
+// sendstate = 2 寰呴殢璁� 5 寰呴殢璁垮け璐�
+// preachform = 浠诲姟褰㈠紡(1,浜哄伐 2,绾歌川 3,鐢佃瘽 4,鐭俊 5.寰俊鍏紬鍙� 6.寰俊灏忕▼搴� 7.鏀粯瀹濆皬绋嬪簭 8.鏅鸿兘鏈哄櫒浜� 9.閽夐拤)
+export function querySubtaskList(data) {
+ return request({
+ url: "/smartor/serviceSubtask/querySubtaskList",
+ method: "post",
+ data: data,
+ });
+}
+
// 鐢ㄦ埛瀵嗙爜閲嶇疆
export function updateUserPwd(oldPassword, newPassword) {
const data = {
diff --git a/src/assets/order/BHostClient.exe b/src/assets/order/BHostClient.exe
new file mode 100644
index 0000000..db7c9c7
--- /dev/null
+++ b/src/assets/order/BHostClient.exe
Binary files differ
diff --git a/src/assets/order/Xftp-8.0.0084p.exe b/src/assets/order/Xftp-8.0.0084p.exe
new file mode 100644
index 0000000..a3a2a02
--- /dev/null
+++ b/src/assets/order/Xftp-8.0.0084p.exe
Binary files differ
diff --git a/src/assets/styles/element-variables.scss b/src/assets/styles/element-variables.scss
index 6baac93..eed9294 100644
--- a/src/assets/styles/element-variables.scss
+++ b/src/assets/styles/element-variables.scss
@@ -4,8 +4,8 @@
**/
/* theme color */
-$--color-primary: #3ba2f7;
-$--color-success: #13ce66;
+$--color-primary: #3664D9;
+$--color-success: #0ABC54;
$--color-warning: #ffba00;
$--color-danger: #ff4949;
// $--color-info: #1E1E1E;
diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss
index c1008b8..36760bb 100644
--- a/src/assets/styles/sidebar.scss
+++ b/src/assets/styles/sidebar.scss
@@ -15,7 +15,7 @@
-webkit-transition: width .28s;
transition: width 0.28s;
width: $base-sidebar-width !important;
- background: -webkit-linear-gradient(bottom, #3d6df8, #5b8cff);
+ // background: -webkit-linear-gradient(bottom, #3d6df8, #5b8cff);
height: 100%;
position: fixed;
@@ -102,7 +102,8 @@
& .theme-dark .nest-menu .el-submenu>.el-submenu__title,
& .theme-dark .el-submenu .el-menu-item {
background-color: $base-sub-menu-background !important;
-
+font-size: 16px;
+font-family: 'Verdana', sans-serif;
&:hover {
background-color: $base-sub-menu-hover !important;
}
diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss
index b6400d0..c1346c2 100644
--- a/src/assets/styles/variables.scss
+++ b/src/assets/styles/variables.scss
@@ -21,7 +21,7 @@
$base-logo-light-title-color: #001529;
$base-sub-menu-background:#99baed;
-$base-sub-menu-hover:#001528;
+$base-sub-menu-hover:#5c7acd;
// 鑷畾涔夋殫鑹茶彍鍗曢鏍�
/**
diff --git a/src/components/CallButton/index.vue b/src/components/CallButton/index.vue
index 4d055cd..c839632 100644
--- a/src/components/CallButton/index.vue
+++ b/src/components/CallButton/index.vue
@@ -28,6 +28,7 @@
<script>
import sipService from "@/utils/sipService";
+import { CallsetState, CallgetList } from "@/api/AiCentre/index";
export default {
props: {
@@ -37,17 +38,20 @@
},
},
data() {
- const randomNum = Math.floor(Math.random() * 20) + 1000; // 鍐呴儴瀹氫箟
+ const randomNum = Math.floor(Math.random() * 20) + 1000; // 瀹氫箟闅忔満鍒嗘満鍙�
return {
isCalling: false,
+ randomNum: randomNum,
+ randomID: null,
callStatus: "idle", // idle, calling, connected, ended
sipStatus: "鏈繛鎺�",
sipStatusClass: "status-disconnected",
sipConfig: {
wsUrl: "wss://192.168.10.124:7443",
- sipUri: `${randomNum}` + "@192.168.10.124",
+ sipUri: "",
password: "Smartor@2023",
displayName: "Web 灏忛緳",
+ // realm: "9.208.5.18:8090",
},
};
},
@@ -61,6 +65,15 @@
};
return statusMap[this.callStatus];
},
+ countdownText() {
+ if (this.sipStatus !== "宸叉敞鍐�") return "";
+
+ const { canCall, reason } = sipService.canMakeCall();
+ if (!canCall && reason.includes("绛夊緟")) {
+ return reason;
+ }
+ return "";
+ },
callStatusClass() {
return `status-${this.callStatus}`;
},
@@ -68,13 +81,22 @@
return this.isCalling ? "閫氳瘽涓�..." : "涓�閿懠鍙�";
},
},
- mounted() {
- console.log('褰撳墠鍒嗘満鍙�',this.sipConfig);
+ created() {
+ // CallgetList();
+ },
+ async mounted() {
+ await this.CallgetList();
sipService.init(this.sipConfig);
+ // 璁剧疆鐘舵�佸洖璋�
sipService.onStatusChange = (status) => {
this.sipStatus = status.text;
this.sipStatusClass = `status-${status.type}`;
+
+ // 澶勭悊娉ㄥ唽澶辫触鍜屾柇寮�杩炴帴鎯呭喌
+ if (status.type === "failed" || status.type === "disconnected") {
+ this.overCallsetState(); // 閲婃斁鍒嗘満鍙�
+ }
};
// 鐩戝惉閫氳瘽鐘舵�佸彉鍖�
@@ -94,23 +116,98 @@
}
try {
+ // 鍏堟鏌ユ槸鍚﹀彲浠ュ懠鍙�
+ const { canCall, reason } = sipService.canMakeCall();
+ if (!canCall) {
+ const { canCall, reason } = sipService.canMakeCall();
+ //this.$message.warning(reason);
+ //return;
+ }
this.callStatus = "calling";
this.isCalling = true;
+ console.log("寮�濮嬪懠鍙細", sipService);
await sipService.makeCall(this.phoneNumber);
} catch (error) {
- console.error("鍛煎彨澶辫触:", error);
- this.callStatus = "ended";
- this.isCalling = false;
- this.$message.error(`鍛煎彨澶辫触: ${error.message}`);
+ let registrationTime = Date.now(); // 璁板綍娉ㄩ攢鎴愬姛鏃堕棿
+ console.log(registrationTime, "鍛煎彨澶辫触鏃堕棿");
+ console.error("鍛煎彨澶辫触1:", error);
+ // this.callStatus = "ended";
+ // this.isCalling = false;
+ //this.$message.error(`鍛煎彨澶辫触: ${error.message}`);
+ try {
+ // 鍏堟鏌ユ槸鍚﹀彲浠ュ懠鍙�
+ const { canCall, reason } = sipService.canMakeCall();
+ if (!canCall) {
+ const { canCall, reason } = sipService.canMakeCall();
+ }
+ this.callStatus = "calling";
+ this.isCalling = true;
+ console.log("寮�濮嬪懠鍙細", sipService);
+
+ await sipService.makeCall("0" + this.phoneNumber);
+ } catch (error) {
+ this.callStatus = "ended";
+ this.isCalling = false;
+ }
+ }
+ },
+ // 鏌ヨ鍙敤鍒嗘満鍙�
+ async CallgetList() {
+ try {
+ const res = await CallgetList();
+ this.randomNum = res.data[0].tel;
+ this.randomID = res.data[0].id;
+ // 姝g‘璁剧疆 sipUri
+ this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`;
+ this.startCallsetState();
+ } catch (error) {
+ console.error("鑾峰彇鍒嗘満鍙峰け璐�:", error);
+ // this.updateStatus("failed", "鑾峰彇鍒嗘満鍙峰け璐�");
+ }
+ },
+ async startCallsetState() {
+ try {
+ await CallsetState({ id: this.randomID, state: 1 });
+ console.log("鍒嗘満鍙风姸鎬佹洿鏂颁负浣跨敤涓�");
+ } catch (error) {
+ console.error("鏇存柊鍒嗘満鍙风姸鎬佸け璐�:", error);
}
},
+ async overCallsetState() {
+ try {
+ if (this.randomID) {
+ await CallsetState({ id: this.randomID, state: 0 });
+ console.log("鍒嗘満鍙风姸鎬佹洿鏂颁负鍙敤");
+ }
+ } catch (error) {
+ console.error("閲婃斁鍒嗘満鍙峰け璐�:", error);
+ }
+ },
endCall() {
sipService.endCall();
this.callStatus = "ended";
this.isCalling = false;
},
+ cleanupResources() {
+ // 缁撴潫閫氳瘽
+ if (this.isCalling) {
+ sipService.endCall();
+ }
+
+ // 閲婃斁鍒嗘満鍙�
+ this.overCallsetState();
+
+ // 鏂紑 SIP 杩炴帴
+ if (sipService.ua) {
+ sipService.ua.stop();
+ }
+ },
+ },
+ beforeUnmount() {
+ // 缁勪欢閿�姣佹椂纭繚閲婃斁璧勬簮
+ this.cleanupResources();
},
};
</script>
diff --git a/src/components/CallCenterLs/index.vue b/src/components/CallCenterLs/index.vue
new file mode 100644
index 0000000..1ffc805
--- /dev/null
+++ b/src/components/CallCenterLs/index.vue
@@ -0,0 +1,717 @@
+<template>
+ <div class="call-center-container">
+ <!-- 涓绘帶鍒跺尯 -->
+ <div class="control-section">
+ <div class="phone-control-card">
+ <h3 class="section-title">鐢佃瘽鎺у埗</h3>
+ <div class="input-group">
+ <div class="form-field">
+ <label class="form-label">瀹㈡埛鐢佃瘽鍙风爜</label>
+ <input
+ v-model="customerPhone"
+ type="text"
+ placeholder="璇疯緭鍏ョ數璇濆彿鐮�"
+ :disabled="isCalling"
+ class="phone-input"
+ />
+ </div>
+
+ <div class="button-group">
+ <button
+ @click="handleCall"
+ :class="['call-btn', callButtonClass]"
+ :disabled="!canMakeCall"
+ >
+ <span class="btn-icon">馃摓</span>
+ {{ callButtonText }}
+ </button>
+ <button
+ @click="handleSeatLogout"
+ :class="[
+ 'seat-btn',
+ 'logout',
+ { 'in-call': isInCall || isCalling },
+ ]"
+ :disabled="!canLogout"
+ >
+ <span class="btn-icon">馃毆</span>
+ {{ isInCall || isCalling ? "寮哄埗绛惧嚭" : "绛惧嚭" }}
+ </button>
+ <button
+ @click="handleHangup"
+ class="hangup-btn"
+ :disabled="!canHangup"
+ >
+ <span class="btn-icon">馃摰</span>
+ 鎸傛柇
+ </button>
+ </div>
+ </div>
+ </div>
+
+ <!-- 鐘舵�佹樉绀哄尯 -->
+ <div class="status-card">
+ <h3 class="section-title">鐘舵�佺洃鎺�</h3>
+ <div class="status-grid">
+ <div class="status-item">
+ <span class="status-label">搴у腑鐘舵��:</span>
+ <span :class="['status-indicator', seatStatusClass]">
+ <span class="status-dot"></span>
+ {{ seatStatusText }}
+ </span>
+ </div>
+
+ <div class="status-item">
+ <span class="status-label">閫氳瘽鐘舵��:</span>
+ <span :class="['status-indicator', callStatusClass]">
+ <span class="status-dot"></span>
+ {{ callStatusText }}
+ </span>
+ </div>
+
+ <div class="status-item" v-if="callDuration">
+ <span class="status-label">閫氳瘽鏃堕暱:</span>
+ <span class="duration-display"> 鈴憋笍 {{ callDuration }} </span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- 璋冭瘯闈㈡澘 -->
+ <div class="debug-section">
+ <el-collapse accordion>
+ <el-collapse-item name="debug">
+ <template slot="title">
+ <div class="debug-header">
+ <span class="debug-title">鍛煎彨璋冭瘯鏃ュ織</span>
+ <span class="debug-subtitle">鐐瑰嚮鏌ョ湅璇︾粏閫氳瘽淇℃伅</span>
+ </div>
+ </template>
+ <div class="debug-content">
+ <WebsocketDemo
+ ref="callComponent"
+ :customer-phone="customerPhone"
+ :auto-login="true"
+ @status-change="onSeatStatusChange"
+ @call-status="onCallStatusChange"
+ @error="onCallError"
+ class="call-component"
+ />
+ </div>
+ </el-collapse-item>
+ </el-collapse>
+ </div>
+ </div>
+</template>
+
+<script>
+import WebsocketDemo from "../../views/followvisit/discharge/ClickCall.vue";
+
+export default {
+ name: "CallCenterModal",
+ components: {
+ WebsocketDemo,
+ },
+
+ props: {
+ initialPhone: {
+ type: String,
+ default: "",
+ },
+ },
+
+ data() {
+ return {
+ customerPhone: "",
+ isSeatLoggedIn: false,
+ callStatus: "idle",
+ callStartTime: null,
+ callDuration: "00:00",
+ durationTimer: null,
+ lastError: null,
+ };
+ },
+
+ computed: {
+ isCalling() {
+ return this.callStatus === "calling";
+ },
+
+ isInCall() {
+ return this.callStatus === "connected";
+ },
+ canLogout() {
+ // 鍙湁鍦ㄥ凡绛惧叆鐘舵�佹墠鍏佽绛惧嚭锛堟棤璁烘槸鍚﹀湪閫氳瘽涓級
+ return this.isSeatLoggedIn && !this.isSeatLoggingOut;
+ },
+ canMakeCall() {
+ return (
+ this.isSeatLoggedIn &&
+ this.customerPhone &&
+ this.callStatus === "idle" &&
+ !this.lastError
+ );
+ },
+
+ canHangup() {
+ return this.isCalling || this.isInCall;
+ },
+
+ callButtonClass() {
+ if (!this.canMakeCall) return "disabled";
+ return this.isCalling ? "calling" : "idle";
+ },
+
+ callButtonText() {
+ if (this.isCalling) return "鍛煎彨涓�...";
+ if (this.isInCall) return "閫氳瘽涓�";
+ return "寮�濮嬪懠鍙�";
+ },
+
+ seatStatusClass() {
+ return this.isSeatLoggedIn ? "success" : "error";
+ },
+
+ seatStatusText() {
+ return this.isSeatLoggedIn ? "宸茬鍏�" : "鏈鍏�";
+ },
+
+ callStatusClass() {
+ switch (this.callStatus) {
+ case "connected":
+ return "success";
+ case "calling":
+ return "warning";
+ default:
+ return "idle";
+ }
+ },
+
+ callStatusText() {
+ switch (this.callStatus) {
+ case "connected":
+ return "閫氳瘽涓�";
+ case "calling":
+ return "鍛煎彨涓�";
+ default:
+ return "绌洪棽";
+ }
+ },
+ },
+
+ watch: {
+ initialPhone: {
+ immediate: true,
+ handler(newVal) {
+ if (newVal) {
+ this.customerPhone = newVal;
+ }
+ },
+ },
+ },
+
+ methods: {
+ handleCall() {
+ if (!this.canMakeCall) return;
+ this.$refs.callComponent.callout(this.customerPhone);
+ this.startCallTimer();
+ },
+ async handleSeatLogout() {
+ if (!this.canLogout) return;
+
+ try {
+ // 濡傛灉姝e湪閫氳瘽涓紝鍏堟寕鏂�
+ if (this.isInCall || this.isCalling) {
+ // 鏄剧ず纭瀵硅瘽妗�
+ const confirm = await this.$confirm(
+ "纭畾瑕佺鍑哄悧锛熺鍑哄皢缁撴潫褰撳墠閫氳瘽",
+ "鎻愮ず",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }
+ );
+ await this.handleHangup();
+ }
+ console.log(2);
+
+ // 鎵ц绛惧嚭
+ await this.$refs.callComponent.handleSeatLogout();
+ console.log(3);
+ this.isSeatLoggedIn = false;
+
+ this.$message.success("搴у腑绛惧嚭鎴愬姛");
+ } catch (error) {
+ if (error !== "cancel") {
+ // 蹇界暐鐢ㄦ埛鍙栨秷鐨勬儏鍐�
+ console.error("绛惧嚭澶辫触:", error);
+ this.$message.error("搴у腑绛惧嚭澶辫触");
+ }
+ }
+ },
+ handleHangup() {
+ this.$refs.callComponent.hangup();
+ this.stopCallTimer();
+ this.callStatus = "idle";
+ },
+
+ onSeatStatusChange(status) {
+ this.isSeatLoggedIn = status.isLoggedIn;
+
+ // 濡傛灉搴у腑绛惧嚭锛岄噸缃�氳瘽鐘舵��
+ if (!status.isLoggedIn) {
+ this.callStatus = "idle";
+ this.stopCallTimer();
+ }
+ },
+
+ onCallStatusChange(status) {
+ this.callStatus = status.status;
+ if (status.status == "connected") {
+ this.startCallTimer();
+ } else if (status.status == "idle") {
+ this.stopCallTimer();
+ }
+ },
+
+ onCallError(error) {
+ this.lastError = error;
+ this.$emit("error", error);
+ },
+
+ startCallTimer() {
+ this.callStartTime = new Date();
+ this.durationTimer = setInterval(() => {
+ if (this.callStartTime) {
+ const duration = Math.floor((new Date() - this.callStartTime) / 1000);
+ const minutes = Math.floor(duration / 60)
+ .toString()
+ .padStart(2, "0");
+ const seconds = (duration % 60).toString().padStart(2, "0");
+ this.callDuration = `${minutes}:${seconds}`;
+ }
+ }, 1000);
+ },
+
+ stopCallTimer() {
+ if (this.durationTimer) {
+ clearInterval(this.durationTimer);
+ this.durationTimer = null;
+ }
+ this.callDuration = "00:00";
+ this.callStartTime = null;
+ },
+
+ handleSeatBusy() {
+ this.$refs.callComponent.afk();
+ },
+
+ handleSeatReady() {
+ this.$refs.callComponent.online();
+ },
+
+ handleHold() {
+ this.$refs.callComponent.hold();
+ },
+
+ handleResume() {
+ this.$refs.callComponent.holdresume();
+ },
+
+ // 鎻愪緵缁欑埗缁勪欢璋冪敤鐨勬柟娉�
+ setPhoneNumber(phone) {
+ this.customerPhone = phone;
+ },
+
+ autoCall(phone) {
+ this.setPhoneNumber(phone);
+ this.$nextTick(() => {
+ this.handleCall();
+ });
+ },
+ },
+
+ beforeUnmount() {
+ this.stopCallTimer();
+
+ // 缁勪欢閿�姣佸墠灏濊瘯绛惧嚭
+ if (this.isSeatLoggedIn) {
+ this.handleSeatLogout().catch(console.error);
+ }
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.call-center-container {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+ padding: 0;
+ background: #f8fafc;
+}
+
+// 鎺у埗鍖哄煙鏍峰紡
+.control-section {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 16px;
+ padding: 20px;
+ padding-bottom: 0;
+
+ @media (max-width: 1024px) {
+ grid-template-columns: 1fr;
+ }
+}
+
+.seat-btn.logout {
+ background: linear-gradient(135deg, #f97316, #ea580c);
+ color: white;
+
+ &:hover:not(:disabled) {
+ box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
+ }
+
+ // 閫氳瘽涓殑鐗规畩鏍峰紡
+ &.in-call {
+ background: linear-gradient(135deg, #ef4444, #dc2626);
+ animation: pulse 1.5s infinite;
+
+ &:hover:not(:disabled) {
+ box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
+ }
+ }
+}
+
+// 閫氳瘽涓鍑烘寜閽殑鐗规畩鍔ㄧ敾
+@keyframes pulse-red {
+ 0% {
+ box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
+ }
+ 50% {
+ box-shadow: 0 4px 20px rgba(239, 68, 68, 0.8);
+ }
+ 100% {
+ box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
+ }
+}
+.section-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #1e293b;
+ margin-bottom: 16px;
+ display: flex;
+ align-items: center;
+
+ &::before {
+ content: "";
+ width: 3px;
+ height: 16px;
+ background: #3b82f6;
+ margin-right: 8px;
+ border-radius: 2px;
+ }
+}
+
+// 鍗$墖閫氱敤鏍峰紡
+.phone-control-card,
+.status-card {
+ background: white;
+ padding: 20px;
+ border-radius: 12px;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+ border: 1px solid #e2e8f0;
+}
+
+// 琛ㄥ崟鎺т欢鏍峰紡
+.form-field {
+ margin-bottom: 20px;
+}
+
+.form-label {
+ display: block;
+ font-weight: 500;
+ color: #475569;
+ margin-bottom: 8px;
+ font-size: 14px;
+}
+
+.phone-input {
+ width: 100%;
+ padding: 12px;
+ border: 2px solid #e2e8f0;
+ border-radius: 8px;
+ font-size: 14px;
+ transition: all 0.3s ease;
+
+ &:focus {
+ outline: none;
+ border-color: #3b82f6;
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
+ }
+
+ &:disabled {
+ background-color: #f8fafc;
+ color: #94a3b8;
+ cursor: not-allowed;
+ }
+}
+
+.button-group {
+ display: flex;
+ gap: 12px;
+ flex-wrap: wrap;
+}
+
+// 鎸夐挳鍩虹鏍峰紡
+.call-btn,
+.hangup-btn {
+ padding: 12px 28px; /* 澧炲姞鍐呰竟璺濓紝浣挎寜閽洿澶ф柟 */
+ border: none;
+ border-radius: 12px; /* 浣跨敤鏇村ぇ鐨勫渾瑙掞紝鍒涢�犫�滆嵂涓糕�濆舰 */
+ cursor: pointer;
+ font-size: 14px;
+ font-weight: 600; /* 瀛椾綋鍔犵矖 */
+ transition: all 0.3s ease; /* 骞虫粦杩囨浮鎵�鏈夊睘鎬� */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px; /* 鍥炬爣鍜屾枃瀛楃殑闂磋窛 */
+ min-width: 120px; /* 璁剧疆鏈�灏忓搴� */
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1); /* 澶氬眰闃村奖澧炲己绔嬩綋鎰� */
+}
+
+.call-btn {
+ background: linear-gradient(135deg, #10b981, #059669); /* 缁胯壊娓愬彉 */
+ color: white;
+}
+
+.call-btn:hover:not(.disabled) {
+ transform: translateY(-2px); /* 鎮仠鏃惰交寰笂娴� */
+ box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4); /* 鎮仠鏃堕槾褰辨洿鏄庢樉 */
+}
+
+.call-btn.calling {
+ background: linear-gradient(
+ 135deg,
+ #f59e0b,
+ #d97706
+ ); /* 鍛煎彨涓姸鎬佹敼涓烘鑹叉笎鍙� */
+ animation: pulse 1.5s infinite; /* 鍛煎彨涓坊鍔犲懠鍚歌剦鍐插姩鐢� */
+}
+
+.hangup-btn {
+ background: linear-gradient(135deg, #ef4444, #dc2626); /* 绾㈣壊娓愬彉 */
+ color: white;
+}
+
+.hangup-btn:hover:not(:disabled) {
+ transform: translateY(-2px);
+ box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
+}
+
+/* 绂佺敤鐘舵�� */
+.call-btn.disabled,
+.hangup-btn:disabled {
+ background: #cbd5e1 !important;
+ cursor: not-allowed;
+ transform: none !important;
+ box-shadow: none !important;
+}
+
+/* 鑴夊啿鍔ㄧ敾瀹氫箟 */
+@keyframes pulse {
+ 0% {
+ box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
+ }
+ 50% {
+ box-shadow: 0 4px 20px rgba(245, 158, 11, 0.8);
+ }
+ 100% {
+ box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
+ }
+}
+
+// 鐘舵�佹樉绀烘牱寮�
+.status-grid {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+}
+
+.status-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 12px;
+ background: #f8fafc;
+ border-radius: 8px;
+}
+
+.status-label {
+ font-size: 14px;
+ color: #475569;
+ font-weight: 500;
+}
+
+.status-indicator {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ font-size: 13px;
+ font-weight: 500;
+ padding: 4px 12px;
+ border-radius: 20px;
+}
+
+.status-dot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ animation: pulse 2s infinite;
+}
+
+.status-indicator.success {
+ background: #f0fdf4;
+ color: #059669;
+
+ .status-dot {
+ background: #059669;
+ }
+}
+
+.status-indicator.error {
+ background: #fef2f2;
+ color: #dc2626;
+
+ .status-dot {
+ background: #dc2626;
+ }
+}
+
+.status-indicator.warning {
+ background: #fffbeb;
+ color: #d97706;
+
+ .status-dot {
+ background: #f59e0b;
+ }
+}
+
+.status-indicator.idle {
+ background: #f8fafc;
+ color: #64748b;
+
+ .status-dot {
+ background: #94a3b8;
+ }
+}
+
+.duration-display {
+ font-family: "Courier New", monospace;
+ font-weight: 600;
+ color: #059669;
+ font-size: 14px;
+}
+
+// 璋冭瘯闈㈡澘鏍峰紡
+.debug-section {
+ background: white;
+ margin: 0 20px 20px;
+ padding: 20px;
+ border-radius: 12px;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.debug-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+ padding-right: 20px;
+}
+
+.debug-title {
+ font-size: 16px;
+ font-weight: 600;
+ color: #1e293b;
+ margin-bottom: 16px;
+ display: flex;
+ align-items: center;
+
+ &::before {
+ content: "";
+ width: 3px;
+ height: 16px;
+ background: #3b82f6;
+ margin-right: 8px;
+ border-radius: 2px;
+ }
+}
+
+.debug-subtitle {
+ font-size: 12px;
+ color: #64748b;
+}
+
+.debug-content {
+ padding: 0;
+}
+
+.call-component {
+ min-height: 200px;
+ border-top: 1px solid #e2e8f0;
+}
+
+// 鍔ㄧ敾瀹氫箟
+@keyframes pulse {
+ 0% {
+ opacity: 1;
+ }
+ 50% {
+ opacity: 0.5;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
+
+// 鍝嶅簲寮忚璁�
+@media (max-width: 768px) {
+ .control-section {
+ padding: 16px;
+ grid-template-columns: 1fr;
+ }
+
+ .phone-control-card,
+ .status-card {
+ padding: 16px;
+ }
+
+ .button-group {
+ flex-direction: column;
+ }
+
+ .status-item {
+ flex-direction: column;
+ gap: 8px;
+ align-items: flex-start;
+ }
+
+ .debug-section {
+ margin: 0 16px 16px;
+ }
+}
+
+@media (max-width: 480px) {
+ .call-center-container {
+ gap: 12px;
+ }
+
+ .control-section {
+ padding: 12px;
+ }
+}
+</style>
diff --git a/src/components/PatientSelection/index.vue b/src/components/PatientSelection/index.vue
new file mode 100644
index 0000000..d63746e
--- /dev/null
+++ b/src/components/PatientSelection/index.vue
@@ -0,0 +1,585 @@
+<template>
+ <div>
+ <el-dialog
+ title="娲惧彂鎮h�呴�夋嫨"
+ :visible.sync="dialogVisiblepatient"
+ width="70%"
+ :before-close="handleClosehz"
+ >
+ <div class="examine-jic">
+ <div style="margin: 0 10px 20px 10px">
+ <el-card class="box-card">
+ <el-tag
+ v-for="item in overallCase"
+ :key="item.icdid"
+ type="primary"
+ closables
+ @close="handleClose(item)"
+ >
+ {{ item.name }}
+ </el-tag>
+ <div style="margin-top: 20px; text-align: right">
+ 鍏遍�夋嫨<span
+ style="font-size: 18px; color: #409eff; margin: 0 10px"
+ >{{ overallCase.length }}</span
+ >浣嶆偅鑰�
+ </div>
+ </el-card>
+ </div>
+ <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-select
+ v-model="patientqueryParams.allhosp"
+ placeholder="璇烽�夋嫨鏂板绫诲瀷"
+ >
+ <el-option
+ v-for="item in taskoptions"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </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 label="涓绘不鍖荤敓锛�">
+ <el-input
+ v-model="patientqueryParams.drname"
+ @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
+ ref="multipleTable"
+ :data="donorchargeList"
+ tooltip-effect="dark"
+ style="width: 100%"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column
+ fixed="left"
+ class="checkall"
+ type="selection"
+ width="55"
+ >
+ </el-table-column>
+ <div v-for="(item, index) in tableLabel">
+ <el-table-column
+ v-if="item.label == '鍑洪櫌鏃ユ湡'"
+ :key="index"
+ :prop="item.prop"
+ :width="item.width"
+ :label="item.label"
+ :formatter="formatData"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.endtime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ v-if="item.label == '鎬у埆'"
+ :key="index"
+ :prop="item.prop"
+ :width="item.width"
+ :label="item.label"
+ :formatter="formatData"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.sex == 1 ? "鐢�" : "濂�" }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ v-if="item.label != '鎬у埆' && item.label != '鍑洪櫌鏃ユ湡'"
+ :key="index"
+ :prop="item.prop"
+ :width="item.width"
+ :label="item.label"
+ :formatter="formatData"
+ >
+ </el-table-column>
+ </div>
+ </el-table>
+ </el-row>
+ <pagination
+ v-show="patienttotal > 0"
+ :total="patienttotal"
+ :page.sync="patientqueryParams.pageNum"
+ :limit.sync="patientqueryParams.pageSize"
+ @pagination="handleQuery"
+ />
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="$emit('addoption')">鍙� 娑�</el-button>
+ <el-button type="primary" @click="AddDispatchpatients"
+ >纭畾娣诲姞</el-button
+ >
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import {
+ getillnesslist,
+ deltargetillness,
+ getTaskpatientQC,
+ Questionnairetaskgetson,
+ Externallist,
+ Editsingletask,
+} from "@/api/AiCentre/index";
+export default {
+ name: "Diseasetotality",
+ data() {
+ return {
+ patienttotal: 0, //
+ allpids: [],
+ // 褰撳墠椤甸�変腑鏁版嵁
+ multipleSelection: [],
+ overallpatin: [],
+ form: {},
+ patientqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ allhosp: "4",
+ pids: null,
+ },
+ donorchargeList: [],
+ donorchargeanlList: [], //妗堜緥鍒楄〃
+ taskoptions: [
+ {
+ value: "4",
+ label: "鍑洪櫌鐥呬汉",
+ },
+ {
+ value: "1",
+ label: "鍦ㄩ櫌鐥呬汉",
+ },
+ {
+ value: "2",
+ label: "闂ㄨ瘖鐥呬汉",
+ },
+ {
+ value: "3",
+ label: "浣撴鐥呬汉",
+ },
+ {
+ value: "6",
+ label: "闄㈠鎮h��",
+ },
+ {
+ value: "5",
+ label: "鎵嬫湳鐥呬汉",
+ },
+ ],
+ overallCase:[],
+ tableLabel: [
+ { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "inhosptime" },
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "鎮h�呰瘖鏂�", width: "", prop: "leavediagname" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鎬у埆", width: "", prop: "sex" },
+ { label: "骞撮緞", width: "", prop: "age" },
+ { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
+ { label: "涓绘不鍖荤敓", width: "", prop: "drname" },
+ { label: "绉戝", width: "240", prop: "dept" },
+ { label: "鐥呭尯", width: "240", prop: "leavehospitaldistrictname" },
+ ],
+ };
+ },
+
+ props: {
+ dialogVisiblepatient: {
+ type: Boolean,
+ default: () => {
+ return false;
+ },
+ },
+
+ // 5闂嵎妯℃澘銆�3闅忚妯℃澘銆�6瀹f暀
+ type: {
+ type: Number,
+ default: () => {
+ return 5;
+ },
+ },
+ },
+
+ created() {},
+
+ mounted() {
+ // this.handleAddpatient();
+ },
+
+ watch: {},
+
+ methods: {
+ // 鏁版嵁杩囨护
+ formatData(row, column, cellValue) {
+ if (column.property === "createType") {
+ if (cellValue === 1) {
+ return "鑷姩";
+ }
+ return "鎵嬪姩";
+ }
+ if (
+ column.property === "createTime" ||
+ column.property === "inhosptime"
+ ) {
+ if (cellValue === null) {
+ return "";
+ }
+ return dayjs(cellValue).format("YYYY-MM-DD ");
+ }
+ return cellValue;
+ },
+ handleClosehz() {
+ this.$emit("addoption");
+ },
+ // 閫夋嫨鏁版嵁鏍囩鍒犻櫎浜嬩欢
+ handleClose(item) {
+ console.log(item);
+ if (this.multipleSelection.indexOf(item) == -1 && !item.outid) {
+ this.overallCase.splice(this.overallCase.indexOf(item), 1);
+ } else if (item.outid) {
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + item.icd10name + '"鐨勬暟鎹」锛�')
+ .then(() => {
+ this.multipleSelection.splice(
+ this.multipleSelection.indexOf(item),
+ 1
+ );
+ deltargetillness(item.id).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ this.overallCase.splice(this.overallCase.indexOf(item), 1);
+ }
+ });
+ // 鍙栨秷鎸傝浇鐘舵��
+ this.$refs.multipleTable.toggleRowSelection(item, false);
+ })
+ .catch(() => {});
+ } else {
+ this.overallCase.splice(this.overallCase.indexOf(item), 1);
+ this.multipleSelection.splice(this.multipleSelection.indexOf(item), 1);
+ // 鍙栨秷鎸傝浇鐘舵��
+ this.$refs.multipleTable.toggleRowSelection(item, false);
+ }
+ },
+ resetQuery() {
+ this.patientqueryParams.name = null;
+ this.handleAddpatient();
+ },
+ // 瑙﹀彂鏌ヨ浜嬩欢
+ handleAddpatients() {
+ this.$emit("kkoption");
+
+ getillnesslist(this.patientqueryParams).then((res) => {
+ this.donorchargeList = res.rows;
+ this.patienttotal = res.total;
+ this.Restorecheck();
+ });
+ },
+ // 瑙﹀彂鏌ヨ浜嬩欢
+ handleAddpatient(taskid) {
+ this.$emit("kkoption");
+ if (taskid != this.taskid) {
+ this.recover();
+ }
+ if (taskid) {
+ this.taskid = taskid;
+ Questionnairetaskgetson({ taskid: this.taskid }).then((res) => {
+ if (res.code == 200) {
+ this.form = res.data;
+ this.overallpatin = this.form.patTaskRelevances.concat();
+ this.allpids = [];
+ this.overallpatin.forEach((item) => {
+ this.allpids.push(item.patid);
+ });
+ if (this.allpids[0]) {
+ this.patientqueryParams.pids = this.allpids;
+ } else {
+ this.patientqueryParams.pids = null;
+ }
+ this.handleQuery();
+ }
+ });
+ }
+ },
+ handleQuery() {
+ // 鑾峰彇澶栭儴鎮h��
+ if (this.patientqueryParams.allhosp == 6) {
+ this.Externallist();
+ return;
+ }
+ console.log(11);
+
+ if (this.patientqueryParams.allhosp == 4) {
+ this.tableLabel = [
+ // { label: "鍏ラ櫌鏃ユ湡", width: "170", prop: "starttime" },
+ { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "endtime" },
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "鎮h�呰瘖鏂�", width: "", prop: "leavediagname" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鎬у埆", width: "", prop: "sex" },
+ { label: "骞撮緞", width: "", prop: "age" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+ { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
+ { label: "鍖荤敓", width: "", prop: "drname" },
+ { label: "绉戝", width: "180", prop: "dept" },
+ { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
+ ];
+ } else if (this.patientqueryParams.allhosp == 1) {
+ this.tableLabel = [
+ { label: "鍏ラ櫌鏃ユ湡", width: "150", prop: "starttime" },
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "鎮h�呰瘖鏂�", width: "", prop: "leavediagname" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鎬у埆", width: "", prop: "sex" },
+ { label: "骞撮緞", width: "", prop: "age" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+ { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
+ { label: "鍖荤敓", width: "", prop: "drname" },
+ { label: "绉戝", width: "180", prop: "dept" },
+ { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
+ ];
+ }
+ console.log(this.patientqueryParams.allhosp);
+
+ // 鑾峰彇鎮h�呮暟鎹�
+ getTaskpatientQC(this.patientqueryParams).then((response) => {
+ this.donorchargeList = response.rows;
+ this.donorchargeList.forEach((item) => {
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+ });
+ this.Restorecheck();
+
+ this.patienttotal = response.total;
+ });
+ },
+ // 鑾峰彇澶栭儴鎮h�呭鍏ュ垪琛�
+ Externallist() {
+ this.tableLabel = [
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鎬у埆", width: "", prop: "sex" },
+ { label: "骞撮緞", width: "", prop: "age" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+ ];
+ this.patientqueryParams.pageSize = 1000;
+
+ Externallist(this.patientqueryParams).then((response) => {
+ this.donorchargeList = response.rows;
+ this.donorchargeList.forEach((item) => {
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+ });
+ // this.dialogVisiblepatient = true;
+ this.patienttotal = response.total;
+ });
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ if (this.decision) return;
+ // 鍒ゆ柇鏄惁鏈夊垹闄�
+ if (this.multipleSelection.length <= selection.length) {
+ this.multipleSelection = selection;
+ } else {
+ this.multipleSelection.forEach((item) => {
+ if (selection.includes(item)) {
+ } else {
+ if (this.multipleSelection.length == 1) {
+ this.multipleSelection = [];
+ } else {
+ this.multipleSelection.splice(
+ this.multipleSelection.indexOf(item),
+ 1
+ );
+ }
+ if (this.overallCase.length == 1) {
+ this.overallCase = [];
+ } else {
+ this.overallCase.splice(this.overallCase.indexOf(item), 1);
+ }
+ }
+ });
+ }
+ // 璧嬪�肩粰鏁翠綋閫変腑鏁扮粍
+ this.multipleSelection.forEach((item) => {
+ if (this.overallCase.every((obj) => obj.name != item.name)) {
+ item.isoperation = 1;
+ item.patid = item.id;
+ item.hospType = this.patientqueryParams.allhosp;
+ item.sfzh = item.idcardno;
+ item.deptCode = item.deptcode;
+ item.deptName = item.dept;
+ item.admindate = item.inhosptime;
+ item.diagname = item.leavediagname;
+ item.sfzh = item.idcardno;
+ if (this.patientqueryParams.allhosp == 6) {
+ item.patfrom = 1;
+ }
+ this.overallCase.push(item);
+ }
+ });
+ console.log(this.multipleSelection, "瑙﹀彂閫夋嫨鍚巑ultipleSelection");
+ },
+ // 鍒囨崲椤靛悗鎭㈠閫変腑
+ Restorecheck() {
+ console.log(this.overallCase, "this.overallCase");
+ const allid = this.overallCase.map((item) => item.name);
+ const overlap = this.donorchargeList.filter((value) => {
+ return allid.includes(value.name);
+ });
+ // 淇濇寔ids鍜屽綋鍓嶉〉闈㈢殑鍚屾鎬�
+ this.multipleSelection = overlap;
+ console.log(this.multipleSelection, "杩涘叆鍒嗛〉multipleSelection");
+
+ this.toggleSelection(overlap);
+ },
+ // 鎸傝浇閫夋嫨鐘舵��
+ toggleSelection(rows) {
+ if (rows) {
+ this.decision = true;
+ this.$nextTick(() => {
+ rows.forEach((row) => {
+ this.$refs.multipleTable.toggleRowSelection(row, true);
+ });
+ this.decision = false;
+ });
+ console.log(123);
+ } else {
+ this.$refs.multipleTable.clearSelection();
+ }
+ },
+ AddDispatchpatients() {
+ console.log(this.overallCase);
+ this.form.patTaskRelevances.push(...this.overallCase);
+ console.log(this.form.patTaskRelevances);
+ this.form.isoperation=2;
+ Editsingletask(this.form).then((res) => {
+ if (res.code == 200) {
+ if (this.form.taskid) {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ } else {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ }
+ this.recover();
+ this.$emit("addoption");
+
+ }
+ });
+ // this.dialogVisiblepatient = false;
+ // this.$emit("addoption");
+ },
+ recover() {
+ this.donorchargeList = [];
+ this.donorchargeanlList = [];
+ this.multipleSelection = [];
+ this.allpids = [];
+ this.overallpatin = [];
+ this.form = {};
+ this.patientqueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ allhosp: "4",
+ pids: null,
+ };
+ this.overallCase = [];
+ // this.dialogVisiblepatient = false;
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.examine-jic {
+ .headline {
+ font-size: 24px;
+ border-left: 5px solid #41a1be;
+ padding-left: 5px;
+ margin-bottom: 10px;
+ display: flex;
+ justify-content: space-between;
+ .Add-details {
+ font-size: 18px;
+ color: #02a7f0;
+ cursor: pointer;
+ }
+ }
+ .jic-value {
+ font-size: 20px;
+ border-top: 1px solid #a7abac;
+ padding: 10px;
+ margin-bottom: 10px;
+ .details-jic {
+ padding: 10px 15px;
+ 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);
+ .details-title {
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: 10px;
+ div:nth-child(2) {
+ color: #02a7f0;
+ cursor: pointer;
+ }
+ }
+ .details-renw {
+ background: #e4ebfc;
+ padding: 15px 5px;
+ border-radius: 5px;
+ margin-bottom: 20px;
+ }
+ }
+ }
+}
+::v-deep.el-table .el-table__header th:first-child .el-checkbox {
+ display: none;
+}
+.el-tag + .el-tag {
+ margin-left: 10px;
+ margin-bottom: 10px;
+}
+</style>
diff --git a/src/components/SortCheckbox/index.vue b/src/components/SortCheckbox/index.vue
new file mode 100644
index 0000000..4ae95f1
--- /dev/null
+++ b/src/components/SortCheckbox/index.vue
@@ -0,0 +1,289 @@
+<template>
+ <div class="ordered-checkbox-container">
+ <!-- 妯悜鎺掑垪鐨勫閫夋缁� -->
+ <el-checkbox-group
+ v-model="checkedValues"
+ class="horizontal-checkbox-group"
+ >
+ <el-checkbox
+ v-for="option in options"
+ :key="getValue(option)"
+ :label="getValue(option)"
+ >
+ {{ getLabel(option) }}
+ </el-checkbox>
+ </el-checkbox-group>
+
+ <!-- 閫変腑椤哄簭灞曠ず鍖哄煙 -->
+ <div v-if="selectedOrder.length > 0" class="selection-order-display">
+ <span class="order-label">鏈嶅姟鎵ц椤哄簭锛�</span>
+ <span
+ v-for="(item, index) in selectedOrder"
+ :key="item.value"
+ class="order-item"
+ >
+ {{ 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>
+ <div v-else class="selection-order-display">
+ <span class="order-label">鏆傛棤閫変腑椤�</span>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ name: "OrderedCheckboxGroup",
+ props: {
+ options: {
+ type: Array,
+ default: () => [],
+ },
+ value: {
+ type: Array,
+ default: () => [],
+ },
+ initialselectedOrder: {
+ type: Array,
+ default: () => [],
+ },
+ valueKey: {
+ type: String,
+ default: "value",
+ },
+ labelKey: {
+ type: String,
+ default: "label",
+ },
+ // 鏂板锛氶粯璁よˉ鍋挎椂闂�
+ defaultCompensateTime: {
+ type: Number,
+ default: 0,
+ },
+ },
+ data() {
+ return {
+ checkedValues: [],
+ selectedOrder: [], // 鐜板湪鏍煎紡涓� [{value, compensateTime}]
+ };
+ },
+ watch: {
+ value: {
+ immediate: true,
+ handler(newVal) {
+ if (
+ Array.isArray(newVal) &&
+ newVal.length > 0 &&
+ typeof newVal[0] === "object"
+ ) {
+ console.log(this.selectedOrder, "111");
+
+ // 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];
+ console.log(this.selectedOrder, "222");
+ console.log(this.newVal, "22");
+ // 鏋勫缓鎴栨洿鏂� 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.hasOwnProperty(value)
+ ? this.hasOwnProperty(value)
+ : this.defaultCompensateTime,
+ });
+ }
+ });
+ this.selectedOrder = newOrder;
+ }
+ }
+ },
+ deep: true, // 寤鸿娣诲姞 deep: true 浠ョ‘淇濆璞℃暟缁勫唴鐨勫彉鍖栬兘琚崟鑾�
+ },
+ checkedValues(newVal, oldVal) {
+ console.log(this.selectedOrder, "333");
+ // 澶勭悊閫変腑椤圭殑鍙樺寲
+ const added = newVal.filter((item) => !oldVal.includes(item));
+ const removed = oldVal.filter((item) => !newVal.includes(item));
+
+ added.forEach((value) => {
+ if (!this.selectedOrder.find((item) => item.value === value)) {
+ this.selectedOrder.push({
+ value,
+ compensateTime: this.defaultCompensateTime,
+ });
+ }
+ });
+
+ removed.forEach((value) => {
+ const index = this.selectedOrder.findIndex(
+ (item) => item.value === value
+ );
+ if (index > -1) {
+ this.selectedOrder.splice(index, 1);
+ }
+ });
+
+ // 鏇存柊鐖剁粍浠剁殑 v-model 缁戝畾鍊硷紙閫変腑鍊兼暟缁勶級
+ this.$emit("input", [...newVal]);
+ // 瑙﹀彂 change 浜嬩欢锛屼紶閫掑畬鏁寸殑涓氬姟鏁版嵁
+ this.emitChangeEvent();
+ },
+ },
+ methods: {
+ getValue(option) {
+ return typeof option === "object" ? option[this.valueKey] : option;
+ },
+ getLabel(option) {
+ return typeof option === "object" ? option[this.labelKey] : option;
+ },
+ getLabelByValue(value) {
+ const option = this.options.find((opt) => this.getValue(opt) === value);
+ return option ? this.getLabel(option) : value;
+ },
+ getSelectedIndex(index) {
+ if (index < 20) {
+ return String.fromCharCode(0x2460 + index);
+ } else {
+ return `(${index + 1})`;
+ }
+ },
+ // 澶勭悊琛ュ伩鏃堕棿鍙樺寲
+ handleCompensateTimeChange(value, newTime) {
+ const item = this.selectedOrder.find((item) => item.value === value);
+ if (item) {
+ item.compensateTime = newTime;
+ // 琛ュ伩鏃堕棿鍙樺寲鏃讹紝鍙Е鍙� change 浜嬩欢锛屼笉瑙﹀姩 v-model
+ this.emitChangeEvent();
+ }
+ },
+ hasOwnProperty(patfrom) {
+ console.log(patfrom);
+ console.log(this.initialselectedOrder);
+ // 浣跨敤find鏂规硶鏌ユ壘鍖归厤鐨勫璞�
+ const foundObject = this.initialselectedOrder.find(
+ (item) => item.preachform === patfrom
+ );
+
+ // 濡傛灉鎵惧埌瀵硅薄锛岃繑鍥炲叾compensateTime锛涘惁鍒欒繑鍥瀎alse
+ return foundObject ? foundObject.compensateTime : false;
+ },
+ // 鍙戝皠鍙樺寲浜嬩欢
+ 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.map((item) => ({
+ value: item.preachform,
+ compensateTime: item.compensateTime || this.defaultCompensateTime,
+ }));
+
+ this.checkedValues = orderedValues.map((item) => item.preachform);
+ this.emitChangeEvent();
+ },
+ },
+};
+</script>
+
+<style scoped>
+.ordered-checkbox-container {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+}
+
+.horizontal-checkbox-group {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 20px;
+}
+
+.selection-order-display {
+ padding: 12px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+ border: 1px solid #ebeef5;
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+}
+
+.order-label {
+ font-weight: bold;
+ color: #606266;
+ margin-right: 8px;
+}
+
+.order-item {
+ color: #409eff;
+ font-weight: 500;
+ display: inline-flex;
+ align-items: center;
+ margin-right: 8px;
+}
+
+.compensate-time-input {
+ width: 90px;
+ margin-left: 8px;
+}
+
+/* 鍝嶅簲寮忚璁★細灏忓睆骞曟椂鎹㈣ */
+@media (max-width: 768px) {
+ .horizontal-checkbox-group {
+ gap: 12px;
+ }
+
+ .selection-order-display {
+ padding: 8px;
+ flex-direction: column;
+ align-items: flex-start;
+ }
+
+ .order-item {
+ margin-bottom: 8px;
+ }
+}
+</style>
diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue
index cc98071..3db09b7 100644
--- a/src/layout/components/TagsView/index.vue
+++ b/src/layout/components/TagsView/index.vue
@@ -265,9 +265,9 @@
margin-right: 15px;
}
&.active {
- background-color: #42b983;
+ background-color: #3664D9;
color: #fff;
- border-color: #42b983;
+ border-color: #3664D9;
&::before {
content: '';
background: #fff;
diff --git a/src/main.js b/src/main.js
index e523ac8..1207e98 100644
--- a/src/main.js
+++ b/src/main.js
@@ -25,6 +25,8 @@
import { codemirror } from "vue-codemirror";
import "@/utils/cm-setting.js";
Vue.component("codemirror", codemirror);
+import preventReClick from '@/utils/directives/preventReClick';
+Vue.use(preventReClick);
import { Quill } from "vue-quill-editor";
window.Quill = Quill;
diff --git a/src/permission.js b/src/permission.js
index c36698f..e864e35 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -1,55 +1,68 @@
-import router from './router'
-import store from './store'
-import { Message } from 'element-ui'
-import NProgress from 'nprogress'
-import 'nprogress/nprogress.css'
-import { getToken } from '@/utils/auth'
-import { isRelogin } from '@/utils/request'
+import router from "./router";
+import store from "./store";
+import { Message } from "element-ui";
+import NProgress from "nprogress";
+import "nprogress/nprogress.css";
+import { getToken } from "@/utils/auth";
+import { isRelogin } from "@/utils/request";
-NProgress.configure({ showSpinner: false })
+NProgress.configure({ showSpinner: false });
-const whiteList = ['/login', '/auth-redirect', '/bind', '/register','/wt','/xj','/sf', '/outsideChain','/outsideChainwt','/outsideChainxj']
+const whiteList = [
+ "/login",
+ "/auth-redirect",
+ "/bind",
+ "/register",
+ "/wt",
+ "/xj",
+ "/sf",
+ "/satisfaction",
+ "/loginSSO",
+];
router.beforeEach((to, from, next) => {
- NProgress.start()
+ NProgress.start();
if (getToken()) {
- to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
+ to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
/* has token*/
- if (to.path === '/login') {
- next({ path: '/' })
- NProgress.done()
+ if (to.path === "/login") {
+ next({ path: "/" });
+ NProgress.done();
} else {
if (store.getters.roles.length === 0) {
- isRelogin.show = true
+ isRelogin.show = true;
// 鍒ゆ柇褰撳墠鐢ㄦ埛鏄惁宸叉媺鍙栧畬user_info淇℃伅
- store.dispatch('GetInfo').then(() => {
- isRelogin.show = false
- store.dispatch('GenerateRoutes').then(accessRoutes => {
- // 鏍规嵁roles鏉冮檺鐢熸垚鍙闂殑璺敱琛�
- router.addRoutes(accessRoutes) // 鍔ㄦ�佹坊鍔犲彲璁块棶璺敱琛�
- next({ ...to, replace: true }) // hack鏂规硶 纭繚addRoutes宸插畬鎴�
+ store
+ .dispatch("GetInfo")
+ .then(() => {
+ isRelogin.show = false;
+ store.dispatch("GenerateRoutes").then((accessRoutes) => {
+ // 鏍规嵁roles鏉冮檺鐢熸垚鍙闂殑璺敱琛�
+ router.addRoutes(accessRoutes); // 鍔ㄦ�佹坊鍔犲彲璁块棶璺敱琛�
+ next({ ...to, replace: true }); // hack鏂规硶 纭繚addRoutes宸插畬鎴�
+ });
})
- }).catch(err => {
- store.dispatch('LogOut').then(() => {
- Message.error(err)
- next({ path: '/' })
- })
- })
+ .catch((err) => {
+ store.dispatch("LogOut").then(() => {
+ Message.error(err);
+ next({ path: "/" });
+ });
+ });
} else {
- next()
+ next();
}
}
} else {
// 娌℃湁token
if (whiteList.indexOf(to.path) !== -1) {
// 鍦ㄥ厤鐧诲綍鐧藉悕鍗曪紝鐩存帴杩涘叆
- next()
+ next();
} else {
- next(`/login?redirect=${to.fullPath}`) // 鍚﹀垯鍏ㄩ儴閲嶅畾鍚戝埌鐧诲綍椤�
- NProgress.done()
+ next(`/login?redirect=${to.fullPath}`); // 鍚﹀垯鍏ㄩ儴閲嶅畾鍚戝埌鐧诲綍椤�
+ NProgress.done();
}
}
-})
+});
router.afterEach(() => {
- NProgress.done()
-})
+ NProgress.done();
+});
diff --git a/src/router/index.js b/src/router/index.js
index 84042a6..8fe8951 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -46,6 +46,11 @@
component: () => import('@/views/login'),
hidden: true
},
+ {
+ path: '/loginSSO',
+ component: () => import('@/views/loginSSO'),
+ hidden: true
+ },
{
path: '/sf',
component: () => import('@/views/outsideChainnew'),
@@ -62,6 +67,11 @@
hidden: true
},
{
+ path: '/satisfaction',
+ component: () => import('@/views/satisfaction'),
+ hidden: true
+ },
+ {
path: '/outsideChain',
component: () => import('@/views/outsideChain'),
hidden: true
diff --git a/src/smartor/dataobject/dw_patouthosp_base.vue b/src/smartor/dataobject/dw_patouthosp_base.vue
index afa2299..149458a 100644
--- a/src/smartor/dataobject/dw_patouthosp_base.vue
+++ b/src/smartor/dataobject/dw_patouthosp_base.vue
@@ -20,4 +20,4 @@
</el-form-item>
</el-form>
</div>
-</template>
\ No newline at end of file
+</template>
diff --git a/src/smartor/dataobject/dw_patouthosp_list.vue b/src/smartor/dataobject/dw_patouthosp_list.vue
index fcd5656..be13b64 100644
--- a/src/smartor/dataobject/dw_patouthosp_list.vue
+++ b/src/smartor/dataobject/dw_patouthosp_list.vue
@@ -21,4 +21,4 @@
</template>
<script>
-</script>
\ No newline at end of file
+</script>
diff --git a/src/store/getters.js b/src/store/getters.js
index 0b065bd..c89a97b 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -637,6 +637,131 @@
},
},
],
+ // 闅忚绫诲瀷
+ tasktypes: (state) => [
+ // {
+ // value: 16,
+ // label: "璇鹃闅忚",
+ // raw: {
+ // cssClass: "",
+ // listClass: "",
+ // },
+ // },
+
+ {
+ value: 2,
+ label: "鍑洪櫌闅忚",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 3,
+ label: "闂ㄨ瘖闅忚",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 4,
+ label: "瀹f暀鍏虫��",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 5,
+ label: "澶嶈瘖绠$悊",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 6,
+ label: "浣忛櫌婊℃剰搴�",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 1,
+ label: "鐩戞祴璇勪及",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 14,
+ label: "闂ㄨ瘖婊℃剰搴�",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 15,
+ label: "鎶曡瘔寤鸿",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 7,
+ label: "鎮h�呮姤鍛�",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+
+ {
+ value: 9,
+ label: "浣撴闅忚",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ // {
+ // value: 1",
+ // label: "鍖绘妧闅忚",
+ // raw: {
+ // cssClass: "",
+ // listClass: "",
+ // },
+ // },
+ // {
+ // value: 11,
+ // label: "褰卞儚闅忚",
+ // raw: {
+ // cssClass: "",
+ // listClass: "",
+ // },
+ // },
+ // {
+ // value: 12,
+ // label: "蹇冪數闅忚",
+ // raw: {
+ // cssClass: "",
+ // listClass: "",
+ // },
+ // },
+ {
+ value: "13",
+ label: "涓撶梾闅忚",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ ],
};
export default getters;
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index ab91acf..19ad61d 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -1,226 +1,265 @@
-import { login, logout, getInfo } from '@/api/login'
-import { getToken, setToken, removeToken } from '@/utils/auth'
+import { login, logout, getInfo } from "@/api/login";
+import { getToken, setToken, removeToken } from "@/utils/auth";
const user = {
state: {
token: getToken(),
- name: '',
- nickName:'',
- Id: '',
- avatar: '',
- hisUserId:'',
- belongWards:[],
- belongDepts:[],
+ name: "",
+ nickName: "",
+ Id: "",
+ avatar: "",
+ hisUserId: "",
+ belongWards: [],
+ belongDepts: [],
roles: [],
permissions: [],
// 鏈嶅姟绫诲瀷
- Serviceauthority: [
- {
- value: "1",
- label: "鎮h�呮姤鍛�",
- route: "followvisit/QuestionnaireTask",
- raw: {
- cssClass: "",
- listClass: "",
+ Serviceauthority: [
+ {
+ value: "1",
+ label: "鎮h�呮姤鍛�",
+ route: "followvisit/QuestionnaireTask",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
},
- },
- {
- value: "2",
- label: "蹇冪數闅忚",
- route: "followvisit/QuestionnaireTask",
- raw: {
- cssClass: "",
- listClass: "",
+ {
+ value: "2",
+ label: "蹇冪數闅忚",
+ route: "followvisit/QuestionnaireTask",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
},
- },
- {
- value: "3",
- label: "浣撴闅忚",
- route: "followvisit/particty",
- raw: {
- cssClass: "",
- listClass: "",
+ {
+ value: "3",
+ label: "浣撴闅忚",
+ route: "followvisit/particty",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
},
- },
- {
- value: "4",
- label: "瀹f暀鍏虫��",
- route: "followvisit/Missioncreation",
- raw: {
- cssClass: "",
- listClass: "",
+ {
+ value: "4",
+ label: "瀹f暀鍏虫��",
+ route: "followvisit/Missioncreation",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
},
- },
- {
- value: "5",
- label: "鍑洪櫌闅忚",
- route: "followvisit/particty",
- raw: {
- cssClass: "",
- listClass: "",
+ {
+ value: "5",
+ label: "鍑洪櫌闅忚",
+ route: "followvisit/particty",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
},
- },
- {
- value: "6",
- label: "闂ㄨ瘖闅忚",
- route: "followvisit/particty",
- raw: {
- cssClass: "",
- listClass: "",
+ {
+ value: "6",
+ label: "闂ㄨ瘖闅忚",
+ route: "followvisit/particty",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
},
- },
- {
- value: "7",
- label: "閫氱煡鏈嶅姟",
- route: "followvisit/Missioncreation",
- raw: {
- cssClass: "",
- listClass: "",
+ {
+ value: "7",
+ label: "閫氱煡鏈嶅姟",
+ route: "followvisit/Missioncreation",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
},
- },
- ],
+ ],
},
mutations: {
SET_TOKEN: (state, token) => {
- state.token = token
+ state.token = token;
},
SET_NAME: (state, name) => {
- state.name = name
+ state.name = name;
},
SET_nickNAME: (state, name) => {
- state.nickName = name
+ state.nickName = name;
},
SET_Id: (state, Id) => {
- state.Id = Id
- console.log(state.Id,'user2');
-
+ state.Id = Id;
},
SET_AVATAR: (state, avatar) => {
- state.avatar = avatar
+ state.avatar = avatar;
},
SET_ROLES: (state, roles) => {
- state.roles = roles
+ state.roles = roles;
},
SET_PERMISSIONS: (state, permissions) => {
- state.permissions = permissions
+ state.permissions = permissions;
},
SET_Serviceauthority: (state, Serviceauthority) => {
- state.Serviceauthority = Serviceauthority
+ state.Serviceauthority = Serviceauthority;
},
SET_leavehospitaldistrictcodes: (state, belongWards) => {
- state.belongWards = belongWards
+ state.belongWards = belongWards;
},
SET_hisUserId: (state, hisUserId) => {
- state.hisUserId = hisUserId
+ state.hisUserId = hisUserId;
},
SET_leaveldeptcodes: (state, belongDepts) => {
- state.belongDepts = belongDepts
- }
+ state.belongDepts = belongDepts;
+ },
},
actions: {
// 鐧诲綍
Login({ commit }, userInfo) {
- console.log(userInfo,'user info');
+ console.log(userInfo, "user info");
- const username = userInfo.username.trim()
- const password = userInfo.password
- const code = userInfo.code
+ const username = userInfo.username.trim();
+ const password = userInfo.password;
+ const code = userInfo.code;
- const orgid = userInfo.orgid
+ const orgid = userInfo.orgid;
return new Promise((resolve, reject) => {
- login(username, password, code, orgid).then(res => {
- setToken(res.token)
- commit('SET_TOKEN', res.token)
- localStorage.setItem('orgid', orgid);
- if (orgid=='47255004333112711A1001') {
- localStorage.setItem('orgname', '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�');
- localStorage.setItem('ZuHuID', '1400361376454545408');
- localStorage.setItem('deptCode', '1017');
- }else if (orgid=='47231022633110211A2101') {
- localStorage.setItem('orgname', '涓芥按甯備腑鍖婚櫌');
- localStorage.setItem('ZuHuID', '1400360867068907520');
- localStorage.setItem('deptCode', '01040201');
- }else if (orgid=='47246102433112211A2101') {
- localStorage.setItem('orgname', '缂欎簯鍘夸腑鍖诲尰闄�');
- localStorage.setItem('ZuHuID', '1429338802177000002');
- localStorage.setItem('deptCode', '');
- }else if (orgid=='47240018433118111A2101') {
- localStorage.setItem('orgname', '榫欐硥甯備腑鍖诲尰闄�');
- localStorage.setItem('ZuHuID', '1429338802177000003');
- localStorage.setItem('deptCode', '');
- }else if (orgid=='47243006833112611A2101') {
- localStorage.setItem('orgname', '搴嗗厓鍘夸腑鍖诲尰闄�');
- localStorage.setItem('ZuHuID', '1429338802177000004');
- localStorage.setItem('deptCode', '');
- }else if (orgid=='47234002X33112111A2101') {
- localStorage.setItem('orgname', '闈掔敯鍘夸腑鍖诲尰闄�');
- localStorage.setItem('ZuHuID', '1429338802177000005');
- localStorage.setItem('deptCode', '');
- }else if (orgid=='47240004533118111A1001') {
- localStorage.setItem('orgname', '榫欐硥甯備汉姘戝尰闄�');
- localStorage.setItem('ZuHuID', '1429338802177000007');
- localStorage.setItem('deptCode', '');
- }
- resolve()
- }).catch(error => {
- reject(error)
- })
- })
+ login(username, password, code, orgid)
+ .then((res) => {
+ setToken(res.token);
+ commit("SET_TOKEN", res.token);
+ localStorage.setItem("orgid", orgid);
+ if (orgid == "H41010500003") {
+ localStorage.setItem("orgname", "娌冲崡涓尰鑽ぇ瀛︾涓�闄勫睘鍖婚櫌");
+ localStorage.setItem("ZuHuID", "1400361376454545408"); // 璇锋浛鎹负瀹為檯鐨刏uHuID
+ localStorage.setItem("deptCode", "1017"); // 璇锋浛鎹负瀹為檯鐨勭瀹や唬鐮�
+ } else if (orgid == "H41082200269") {
+ localStorage.setItem("orgname", "鍗氱埍鍘夸汉姘戝尰闄�");
+ localStorage.setItem("ZuHuID", "1400360867068907520"); // 璇锋浛鎹负瀹為檯鐨刏uHuID
+ localStorage.setItem("deptCode", "01040201"); // 璇锋浛鎹负瀹為檯鐨勭瀹や唬鐮�
+ } else if (orgid == "H41078202417") {
+ localStorage.setItem("orgname", "杈夊幙甯備腑鍖婚櫌");
+ localStorage.setItem("ZuHuID", "1429338802177000002"); // 璇锋浛鎹负瀹為檯鐨刏uHuID
+ localStorage.setItem("deptCode", ""); // 璇锋浛鎹负瀹為檯鐨勭瀹や唬鐮�
+ } else if (orgid == "47255004333112711A1001") {
+ localStorage.setItem("orgname", "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�");
+ localStorage.setItem("ZuHuID", "1400361376454545408");
+ localStorage.setItem("deptCode", "1017");
+ localStorage.setItem("YongHuID", "1400466972205912064");
+ localStorage.setItem("YongHuXM", "JNRMYY");
+ } else if (orgid == "47231022633110211A2101") {
+ localStorage.setItem("orgname", "涓芥按甯備腑鍖婚櫌");
+ localStorage.setItem("ZuHuID", "1400360867068907520");
+ localStorage.setItem("deptCode", "01040201");
+ localStorage.setItem("YongHuID", "1400398571877961728");
+ localStorage.setItem("YongHuXM", "LSZYY");
+ } else if (orgid == "47246102433112211A2101") {
+ localStorage.setItem("orgname", "缂欎簯鍘夸腑鍖诲尰闄�");
+ localStorage.setItem("ZuHuID", "1429338802177000002");
+ localStorage.setItem("deptCode", "");
+ localStorage.setItem("YongHuID", "1462582201425072129");
+ localStorage.setItem("YongHuXM", "JYZYY");
+ } else if (orgid == "47240018433118111A2101") {
+ localStorage.setItem("orgname", "榫欐硥甯備腑鍖诲尰闄�");
+ localStorage.setItem("ZuHuID", "1429338802177000003");
+ localStorage.setItem("deptCode", "");
+ localStorage.setItem("YongHuID", "1462599660370661377");
+ localStorage.setItem("YongHuXM", "LQZYY");
+ } else if (orgid == "47243006833112611A2101") {
+ localStorage.setItem("orgname", "搴嗗厓鍘夸腑鍖诲尰闄�");
+ localStorage.setItem("ZuHuID", "1429338802177000004");
+ localStorage.setItem("deptCode", "");
+ localStorage.setItem("YongHuID", "1462585966286868480");
+ localStorage.setItem("YongHuXM", "QYZYY");
+ } else if (orgid == "47234002X33112111A2101") {
+ localStorage.setItem("orgname", "闈掔敯鍘夸腑鍖诲尰闄�");
+ localStorage.setItem("ZuHuID", "1429338802177000005");
+ localStorage.setItem("deptCode", "");
+ localStorage.setItem("YongHuID", "1462614919332499458");
+ localStorage.setItem("YongHuXM", "QTHCZYY");
+ } else if (orgid == "47240004533118111A1001") {
+ localStorage.setItem("orgname", "榫欐硥甯備汉姘戝尰闄�");
+ localStorage.setItem("ZuHuID", "1429338802177000007");
+ localStorage.setItem("deptCode", "");
+ localStorage.setItem("YongHuID", "1478905109432766464");
+ localStorage.setItem("YongHuXM", "LQRMYY");
+ } else if (orgid == "20001001") {
+ localStorage.setItem("orgname", "鐪佺珛鍚屽痉缈犺嫅闄㈠尯");
+ localStorage.setItem("ZuHuID", "");
+ localStorage.setItem("deptCode", "");
+ localStorage.setItem("YongHuID", "");
+ localStorage.setItem("YongHuXM", "");
+ }
+ resolve();
+ })
+ .catch((error) => {
+ reject(error);
+ });
+ });
},
// 鑾峰彇鐢ㄦ埛淇℃伅
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
- getInfo().then(res => {
-
- const user = res.user
- const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
- if (res.roles && res.roles.length > 0) { // 楠岃瘉杩斿洖鐨剅oles鏄惁鏄竴涓潪绌烘暟缁�
- commit('SET_ROLES', res.roles)
- commit('SET_PERMISSIONS', res.permissions)
- } else {
- commit('SET_ROLES', ['ROLE_DEFAULT'])
- }
- commit('SET_NAME', user.userName)
- commit('SET_nickNAME', user.nickName)
- commit('SET_Id', user.userId)
- commit('SET_hisUserId', user.hisUserId)
- commit('SET_leavehospitaldistrictcodes', user.belongWards)
- commit('SET_leaveldeptcodes', user.belongDepts)
- commit('SET_AVATAR', avatar)
- resolve(res)
- }).catch(error => {
- reject(error)
- })
- })
+ getInfo()
+ .then((res) => {
+ const user = res.user;
+ const avatar =
+ user.avatar == "" || user.avatar == null
+ ? require("@/assets/images/profile.jpg")
+ : process.env.VUE_APP_BASE_API + user.avatar;
+ if (res.roles && res.roles.length > 0) {
+ // 楠岃瘉杩斿洖鐨剅oles鏄惁鏄竴涓潪绌烘暟缁�
+ commit("SET_ROLES", res.roles);
+ commit("SET_PERMISSIONS", res.permissions);
+ } else {
+ commit("SET_ROLES", ["ROLE_DEFAULT"]);
+ }
+ commit("SET_NAME", user.userName);
+ commit("SET_nickNAME", user.nickName);
+ commit("SET_Id", user.userId);
+ commit("SET_hisUserId", user.hisUserId);
+ commit("SET_leavehospitaldistrictcodes", user.belongWards);
+ commit("SET_leaveldeptcodes", user.belongDepts);
+ commit("SET_AVATAR", avatar);
+ resolve(res);
+ })
+ .catch((error) => {
+ reject(error);
+ });
+ });
},
// 閫�鍑虹郴缁�
LogOut({ commit, state }) {
return new Promise((resolve, reject) => {
- logout(state.token).then(() => {
- commit('SET_TOKEN', '')
- commit('SET_ROLES', [])
- commit('SET_PERMISSIONS', [])
- removeToken()
- resolve()
- }).catch(error => {
- reject(error)
- })
- })
+ logout(state.token)
+ .then(() => {
+ commit("SET_TOKEN", "");
+ commit("SET_ROLES", []);
+ commit("SET_PERMISSIONS", []);
+ removeToken();
+ resolve();
+ })
+ .catch((error) => {
+ reject(error);
+ });
+ });
},
// 鍓嶇 鐧诲嚭
FedLogOut({ commit }) {
- return new Promise(resolve => {
- commit('SET_TOKEN', '')
- removeToken()
- resolve()
- })
- }
- }
-}
+ return new Promise((resolve) => {
+ commit("SET_TOKEN", "");
+ removeToken();
+ resolve();
+ });
+ },
+ },
+};
-export default user
+export default user;
diff --git a/src/utils/directives/preventReClick.js b/src/utils/directives/preventReClick.js
new file mode 100644
index 0000000..c9ac527
--- /dev/null
+++ b/src/utils/directives/preventReClick.js
@@ -0,0 +1,22 @@
+export default {
+ install(Vue) {
+ Vue.directive('preventReClick', {
+ inserted(el, binding) {
+ el.addEventListener('click', () => {
+ if (!el.disabled) {
+ el.disabled = true;
+ // 鍙互娣诲姞绂佺敤鏍峰紡锛堝彲閫夛級
+ el.style.pointerEvents = 'none';
+ el.style.opacity = '0.6';
+ // 璁惧畾鎭㈠鏃堕棿锛宐inding.value 鏄寚浠や紶鍏ョ殑鍊硷紙濡傦細v-prevent-reclick="2000"锛�
+ setTimeout(() => {
+ el.disabled = false;
+ el.style.pointerEvents = 'all';
+ el.style.opacity = '1';
+ }, binding.value || 1500); // 榛樿1.5绉�
+ }
+ });
+ }
+ });
+ }
+};
diff --git a/src/utils/request.js b/src/utils/request.js
index 71723d0..b07e281 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -110,7 +110,7 @@
}
)
.then(() => {
-
+ this.$router.replace("/login");
})
.catch(() => {
isRelogin.show = false;
diff --git a/src/utils/sipService-cs.js b/src/utils/sipService-cs.js
index 1654ccc..0cfc572 100644
--- a/src/utils/sipService-cs.js
+++ b/src/utils/sipService-cs.js
@@ -4,174 +4,259 @@
constructor() {
this.ua = null;
this.currentSession = null;
- this.onStatusChange = null; // 鐘舵�佸彉鍖栧洖璋�
- this.onCallStatusChange = null; // 鏂板閫氳瘽鐘舵�佸洖璋�
+ this.onStatusChange = null;
+ this.onCallStatusChange = null;
+ this.onIncomingCall = null;
+ this.isRegistered = false; // 鏂板娉ㄥ唽鐘舵�佹爣蹇�
+ this.registrationTime = null; // 鏂板娉ㄥ唽鎴愬姛鏃堕棿鎴�
}
- // 鍒濆鍖朣IP瀹㈡埛绔�
init(config) {
try {
- this.updateStatus("connecting", "杩炴帴涓�...");
+ this.updateStatus("connecting", "杩炴帴涓�;...");
this.ua = new JsSIP.UA({
sockets: [new JsSIP.WebSocketInterface(config.wsUrl)],
uri: config.sipUri,
password: config.password,
display_name: config.displayName,
- iceservers: [],
- // realm: config.realm,
+ iceServers: [],
register: true,
- session_expires: 180,
- sessionTimersExpires: 300, // 璁剧疆 Session-Expires=120锛堝繀椤� >= Min-SE锛�
- extraHeaders: [
- "Min-SE: 120", // 鍙�夛細鏄惧紡鍛婅瘔鏈嶅姟鍣ㄤ綘鏀寔鐨勬渶灏忓��
- ],
- register_expires: 300, // 娉ㄥ唽鏈夋晥鏈�(绉�)
- connection_recovery_min_interval: 2, // 鏈�灏忛噸杩為棿闅�
- connection_recovery_max_interval: 30, // 鏈�澶ч噸杩為棿闅�
+ sessionExpires: 1800,
+ minSessionExpires: 90,
+ register_expires: 300,
});
this.ua.start();
- // 娉ㄥ唽浜嬩欢鐩戝惉
+ // 浜嬩欢鐩戝惉
this.ua.on("registered", () => {
+ this.isRegistered = true;
+ this.registrationTime = Date.now(); // 璁板綍娉ㄥ唽鎴愬姛鏃堕棿
+ console.log(this.registrationTime, "娉ㄥ唽鏃堕棿");
+
this.updateStatus("registered", "宸叉敞鍐�");
});
this.ua.on("registrationFailed", (e) => {
+ this.isRegistered = false;
this.updateStatus("failed", `娉ㄥ唽澶辫触: ${e.cause}`);
});
- this.ua.on("disconnected", () => {
- this.updateStatus("disconnected", "杩炴帴鏂紑");
+ this.ua.on("unregistered", () => {
+ this.isRegistered = false;
+ let registrationTime = Date.now(); // 璁板綍娉ㄩ攢鎴愬姛鏃堕棿
+ console.log(registrationTime, "娉ㄩ攢鏃堕棿");
+ this.updateStatus("disconnected", "宸叉敞閿�");
});
-
- this.ua.on("connected", () => {
- this.updateStatus("connecting", "閲嶆柊杩炴帴涓�...");
- });
-
- // 鐩戝惉鏉ョ數
- this.ua.on("newRTCSession", (data) => {
- this.handleIncomingCall(data.session);
- });
+ this.ua.on("disconnected", () =>
+ this.updateStatus("disconnected", "杩炴帴鏂紑")
+ );
+ this.ua.on("connected", () =>
+ this.updateStatus("connecting", "閲嶆柊杩炴帴涓�...")
+ );
+ this.ua.on("newRTCSession", (data) =>
+ this.handleIncomingCall(data.session)
+ );
} catch (error) {
this.updateStatus("failed", `鍒濆鍖栧け璐�: ${error.message}`);
console.error("SIP鍒濆鍖栧け璐�:", error);
+ throw error;
}
}
- handleIncomingCall(session) {
- if (session.direction === "incoming") {
- console.log("鏉ョ數:", session.remote_identity.uri.toString());
- // 鍙互鍦ㄨ繖閲岃Е鍙� UI 閫氱煡
- if (this.onIncomingCall) {
- this.onIncomingCall(session);
- }
+ // 鏂板鏂规硶锛氭鏌ユ槸鍚﹀彲浠ュ懠鍙�
+ canMakeCall(minDelay = 2000) {
+ if (!this.isRegistered) {
+ return { canCall: false, reason: "SIP鏈敞鍐岋紝鏃犳硶鍛煎彨" };
}
- }
- // 鏇存柊鐘舵�佸苟閫氱煡UI
- updateStatus(type, text) {
- console.log(`SIP鐘舵�佹洿鏂�: ${type} - ${text}`);
- if (this.onStatusChange) {
- this.onStatusChange({ type, text });
- }
- }
+ const now = Date.now();
+ const timeSinceRegistration = now - this.registrationTime;
- // 涓�閿嫧鍙� - 澧炲姞娉ㄥ唽鐘舵�佹鏌�
+ if (timeSinceRegistration < minDelay) {
+ const remaining = minDelay - timeSinceRegistration;
+ return {
+ canCall: false,
+ reason: `娉ㄥ唽鎴愬姛锛岃绛夊緟 ${Math.ceil(remaining / 1000)} 绉掑悗鍐嶅懠鍙玚,
+ };
+ }
+
+ return { canCall: true, reason: "" };
+ }
makeCall(targetNumber) {
- if (!this.ua) {
- throw new Error("SIP瀹㈡埛绔湭鍒濆鍖�");
+ const { canCall, reason } = this.canMakeCall();
+ if (!canCall) {
+ return Promise.reject(new Error(reason));
}
+ return new Promise((resolve, reject) => {
+ try {
+ if (!this.ua) {
+ throw new Error("SIP瀹㈡埛绔湭鍒濆鍖�");
+ }
- if (!this.ua.isRegistered()) {
- throw new Error("SIP鏈敞鍐岋紝鏃犳硶鍛煎彨");
- }
+ if (!this.ua.isRegistered()) {
+ throw new Error("SIP鏈敞鍐岋紝鏃犳硶鍛煎彨");
+ }
- const options = {
- sessionTimers: true,
- sessionTimersExpires: 300,
- extraHeaders: [
- "Min-SE: 120",
- "Route: <sip:@192.168.100.6>",
- "Accept: application/sdp",
- "Supported: replaces, timer",
- "Allow: INVITE, ACK, BYE, CANCEL, OPTIONS",
- ],
- eventHandlers: {
- progress: (e) => {
- this.updateCallStatus("calling", "鍛煎彨涓�...");
- },
- failed: (e) => {
- this.updateCallStatus("ended", `鍛煎彨澶辫触: ${e.cause}`);
- },
- ended: (e) => {
- this.updateCallStatus("ended", "閫氳瘽缁撴潫");
- },
- confirmed: (e) => {
- this.updateCallStatus("connected", "閫氳瘽宸叉帴閫�");
- },
- },
- mediaConstraints: {
- audio: true,
- video: false,
- },
- rtcOfferConstraints: {
- offerToReceiveAudio: 1,
- offerToReceiveVideo: 0,
- mandatory: {
- OfferToReceiveAudio: true,
- OfferToReceiveVideo: false,
- },
- },
- pcConfig: {
- iceServers: [{ urls: "stun:stun.l.google.com:19302" }],
- iceTransportPolicy: "all",
- bundlePolicy: "balanced",
- rtcpMuxPolicy: "require",
- codecs: {
- audio: [
- { name: "PCMU", clockRate: 8000, payloadType: 0 },
- { name: "PCMA", clockRate: 8000, payloadType: 8 },
+ const options = {
+ sessionTimers: true,
+ sessionTimersExpires: 300,
+ extraHeaders: [
+ "Min-SE: 120",
+ "Route: <sip:@192.168.100.6>",
+ "Accept: application/sdp",
+ "Supported: replaces, timer",
+ "Allow: INVITE, ACK, BYE, CANCEL, OPTIONS",
],
- video: [],
- },
- },
- };
+ mediaConstraints: {
+ audio: true,
+ video: false,
+ },
+ rtcOfferConstraints: {
+ offerToReceiveAudio: 1,
+ offerToReceiveVideo: 0,
+ mandatory: {
+ OfferToReceiveAudio: true,
+ OfferToReceiveVideo: false,
+ },
+ },
+ eventHandlers: {
+ progress: () => this.updateCallStatus("calling", "鍛煎彨涓�..."),
+ failed: (e) => {
+ this.handleCallFailure(e, reject);
+ },
+ ended: () => this.updateCallStatus("ended", "閫氳瘽缁撴潫"),
+ confirmed: () => {
+ this.updateCallStatus("connected", "閫氳瘽宸叉帴閫�");
+ resolve();
+ },
+ },
+ pcConfig: {
+ iceServers: [{ urls: "stun:stun.l.google.com:19302" }],
+ iceTransportPolicy: "all",
+ bundlePolicy: "balanced",
+ rtcpMuxPolicy: "require",
+ codecs: {
+ audio: [
+ { name: "PCMU", clockRate: 8000, payloadType: 0 },
+ { name: "PCMA", clockRate: 8000, payloadType: 8 },
+ ],
+ video: [],
+ },
+ },
+ };
- this.currentSession = this.ua.call(
- `sip:${targetNumber}@192.168.100.6`,
- options
- );
- // 鍦ㄤ細璇濆垱寤哄悗淇敼 SDP
- this.currentSession.on("peerconnection", (pc) => {
- this.updateCallStatus('calling', '鍛煎彨涓�...');
- pc.createOffer = (offerOptions) => {
- return RTCPeerConnection.prototype.createOffer
- .call(pc, offerOptions)
- .then((offer) => {
- const modifiedSdp = offer.sdp
- .replace(/c=IN IP4 192\.168\.100\.10/g, "c=IN IP4 192.168.100.6")
- .replace(/m=audio \d+ RTP\/AVP.*/, "m=audio 7078 RTP/AVP 0 8");
- return new RTCSessionDescription({
- type: "offer",
- sdp: modifiedSdp,
- });
- });
+ this.currentSession = this.ua.call(
+ `sip:${targetNumber}@192.168.100.6`,
+ options
+ );
+ // 鍦ㄤ細璇濆垱寤哄悗淇敼 SDP
+ this.currentSession.on("peerconnection", (pc) => {
+ this.updateCallStatus("calling", "鍛煎彨涓�...");
+ pc.createOffer = (offerOptions) => {
+ return RTCPeerConnection.prototype.createOffer
+ .call(pc, offerOptions)
+ .then((offer) => {
+ const modifiedSdp = offer.sdp
+ .replace(
+ /c=IN IP4 192\.168\.100\.10/g,
+ "c=IN IP4 192.168.100.6"
+ )
+ .replace(
+ /m=audio \d+ RTP\/AVP.*/,
+ "m=audio 7078 RTP/AVP 0 8"
+ );
+ return new RTCSessionDescription({
+ type: "offer",
+ sdp: modifiedSdp,
+ });
+ });
+ };
+ });
+ this.setupPeerConnection(this.currentSession);
+ this.setupAudio(this.currentSession);
+ } catch (error) {
+ this.updateCallStatus("failed", `鍛煎彨澶辫触22: ${error.message}`);
+ reject(error);
+ }
+ });
+ }
+
+ setupPeerConnection(session) {
+ session.on("peerconnection", (pc) => {
+ const originalCreateOffer = pc.createOffer.bind(pc);
+
+ pc.createOffer = async (offerOptions) => {
+ try {
+ const offer = await originalCreateOffer(offerOptions);
+ return this.normalizeSDP(offer);
+ } catch (error) {
+ console.error("鍒涘缓Offer澶辫触:", error);
+ throw error;
+ }
};
});
- this.currentSession.on('failed', (e) => {
- this.updateCallStatus('failed', `鍛煎彨澶辫触2: ${e}`);
- });
-
- this.currentSession.on('ended', () => {
- this.updateCallStatus('ended', '閫氳瘽宸茬粨鏉�');
- });
-
- this.currentSession.on('confirmed', () => {
- this.updateCallStatus('connected', '閫氳瘽宸叉帴閫�');
- });
- this.setupAudio(this.currentSession);
}
+
+ normalizeSDP(offer) {
+ let sdp = offer.sdp;
+
+ // 鏍囧噯鍖朣DP
+ sdp = sdp.replace(/c=IN IP4.*\r\n/, "c=IN IP4 0.0.0.0\r\n");
+ sdp = sdp.replace(
+ /m=audio \d+.*\r\n/,
+ "m=audio 9 UDP/TLS/RTP/SAVPF 0 8\r\n"
+ );
+
+ // 纭繚鍖呭惈鍩烘湰缂栬В鐮佸櫒
+ if (!sdp.includes("PCMU/8000")) sdp += "a=rtpmap:0 PCMU/8000\r\n";
+ if (!sdp.includes("PCMA/8000")) sdp += "a=rtpmap:8 PCMA/8000\r\n";
+
+ // 娣诲姞蹇呰灞炴��
+ sdp += "a=rtcp-mux\r\n";
+ sdp += "a=sendrecv\r\n";
+
+ console.log("鏍囧噯鍖栧悗鐨凷DP:", sdp);
+ return new RTCSessionDescription({
+ type: offer.type,
+ sdp: sdp,
+ });
+ }
+
+ handleCallFailure(e, reject) {
+ if (e.response?.status_code === 422) {
+ const serverMinSE = e.response.headers["Min-SE"]?.[0]?.raw || "鏈煡";
+ console.error(`鏈嶅姟鍣ㄨ姹� Min-SE 鈮� ${serverMinSE}锛屽綋鍓嶈缃�: 120`);
+ }
+ console.error("鍛煎彨澶辫触璇︽儏:", {
+ cause: e.cause,
+ message: e.message,
+ response: e.response && {
+ status: e.response.status_code,
+ reason: e.response.reason_phrase,
+ },
+ });
+
+ let errorMessage = "鍛煎彨澶辫触";
+ switch (e.cause) {
+ case "Incompatible SDP":
+ errorMessage = "濯掍綋鍗忓晢澶辫触锛岃妫�鏌ョ紪瑙g爜鍣ㄩ厤缃�";
+ break;
+ case "488":
+ case "606":
+ errorMessage = "瀵规柟璁惧涓嶆敮鎸佸綋鍓嶅獟浣撻厤缃�";
+ break;
+ case "422":
+ errorMessage = "浼氳瘽鍙傛暟涓嶆弧瓒虫湇鍔″櫒瑕佹眰";
+ break;
+ default:
+ errorMessage = `鍛煎彨澶辫触3: ${e.cause || e.message}`;
+ }
+
+ this.updateCallStatus("failed55", errorMessage);
+ reject(new Error(errorMessage));
+ }
+
setupAudio(session) {
session.connection.addEventListener("addstream", (e) => {
const audioElement = document.getElementById("remoteAudio");
@@ -180,21 +265,37 @@
}
});
}
- // 鎸傛柇褰撳墠閫氳瘽
+
endCall() {
- if (this.currentSession) {
+ if (this.currentSession) {
this.currentSession.terminate();
- this.updateCallStatus('ended', '閫氳瘽宸茬粨鏉�');
+ this.updateCallStatus("ended", "閫氳瘽宸茬粨鏉�");
this.currentSession = null;
}
}
- // 鏂板鏂规硶锛氭洿鏂伴�氳瘽鐘舵��
+
+ updateStatus(type, text) {
+ console.log(`SIP鐘舵�佹洿鏂�: ${type} - ${text}`);
+ if (this.onStatusChange) {
+ this.onStatusChange({ type, text });
+ }
+ }
+
updateCallStatus(type, text) {
console.log(`閫氳瘽鐘舵�佹洿鏂�: ${type} - ${text}`);
if (this.onCallStatusChange) {
this.onCallStatusChange({ type, text });
}
}
+
+ handleIncomingCall(session) {
+ if (session.direction === "incoming") {
+ console.log("鏉ョ數:", session.remote_identity.uri.toString());
+ if (this.onIncomingCall) {
+ this.onIncomingCall(session);
+ }
+ }
+ }
}
export default new SipService();
diff --git a/src/utils/sipService.js b/src/utils/sipService.js
index baa65a9..a8ce592 100644
--- a/src/utils/sipService.js
+++ b/src/utils/sipService.js
@@ -7,6 +7,8 @@
this.onStatusChange = null;
this.onCallStatusChange = null;
this.onIncomingCall = null;
+ this.isRegistered = false; // 鏂板娉ㄥ唽鐘舵�佹爣蹇�
+ this.registrationTime = null; // 鏂板娉ㄥ唽鎴愬姛鏃堕棿鎴�
}
init(config) {
@@ -28,12 +30,25 @@
this.ua.start();
// 浜嬩欢鐩戝惉
- this.ua.on("registered", () =>
- this.updateStatus("registered", "宸叉敞鍐�56")
- );
- this.ua.on("registrationFailed", (e) =>
- this.updateStatus("failed", `娉ㄥ唽澶辫触11: ${e.cause}`)
- );
+ this.ua.on("registered", () => {
+ this.isRegistered = true;
+ this.registrationTime = Date.now(); // 璁板綍娉ㄥ唽鎴愬姛鏃堕棿
+ console.log(this.registrationTime, "娉ㄥ唽鏃堕棿");
+
+ this.updateStatus("registered", "宸叉敞鍐�");
+ });
+
+ this.ua.on("registrationFailed", (e) => {
+ this.isRegistered = false;
+ this.updateStatus("failed", `娉ㄥ唽澶辫触: ${e.cause}`);
+ });
+
+ this.ua.on("unregistered", () => {
+ this.isRegistered = false;
+ let registrationTime = Date.now(); // 璁板綍娉ㄩ攢鎴愬姛鏃堕棿
+ console.log(registrationTime, "娉ㄩ攢鏃堕棿");
+ this.updateStatus("disconnected", "宸叉敞閿�");
+ });
this.ua.on("disconnected", () =>
this.updateStatus("disconnected", "杩炴帴鏂紑")
);
@@ -49,8 +64,30 @@
throw error;
}
}
+ // 鏂板鏂规硶锛氭鏌ユ槸鍚﹀彲浠ュ懠鍙�
+ canMakeCall(minDelay = 2000) {
+ if (!this.isRegistered) {
+ return { canCall: false, reason: "SIP鏈敞鍐岋紝鏃犳硶鍛煎彨" };
+ }
+ const now = Date.now();
+ const timeSinceRegistration = now - this.registrationTime;
+
+ if (timeSinceRegistration < minDelay) {
+ const remaining = minDelay - timeSinceRegistration;
+ return {
+ canCall: false,
+ reason: `娉ㄥ唽鎴愬姛锛岃绛夊緟 ${Math.ceil(remaining / 1000)} 绉掑悗鍐嶅懠鍙玚,
+ };
+ }
+
+ return { canCall: true, reason: "" };
+ }
makeCall(targetNumber) {
+ const { canCall, reason } = this.canMakeCall();
+ if (!canCall) {
+ return Promise.reject(new Error(reason));
+ }
return new Promise((resolve, reject) => {
try {
if (!this.ua) {
@@ -165,7 +202,7 @@
errorMessage = "浼氳瘽鍙傛暟涓嶆弧瓒虫湇鍔″櫒瑕佹眰";
break;
default:
- errorMessage = `鍛煎彨澶辫触: ${e.cause || e.message}`;
+ errorMessage = `鍛煎彨澶辫触3: ${e.cause || e.message}`;
}
this.updateCallStatus("failed55", errorMessage);
diff --git a/src/views/complaint/complaintlist/index.vue b/src/views/complaint/complaintlist/index.vue
index fd0143e..fc26e66 100644
--- a/src/views/complaint/complaintlist/index.vue
+++ b/src/views/complaint/complaintlist/index.vue
@@ -80,7 +80,6 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
icon="el-icon-plus"
size="medium"
@click="handleAdd"
@@ -91,7 +90,6 @@
<el-col :span="1.5">
<el-button
type="success"
- plain
icon="el-icon-edit"
size="medium"
:disabled="single"
diff --git a/src/views/complaint/complaintmy/index.vue b/src/views/complaint/complaintmy/index.vue
index be34f6a..c8e61c2 100644
--- a/src/views/complaint/complaintmy/index.vue
+++ b/src/views/complaint/complaintmy/index.vue
@@ -51,7 +51,6 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
icon="el-icon-plus"
size="medium"
@click="handleAdd"
diff --git a/src/views/followvisit/OutpatientAgain/index.vue b/src/views/followvisit/OutpatientAgain/index.vue
new file mode 100644
index 0000000..fc7ef5f
--- /dev/null
+++ b/src/views/followvisit/OutpatientAgain/index.vue
@@ -0,0 +1,1845 @@
+<template>
+ <div class="app-container">
+ <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
+ shadow="hover"
+ :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
+ >
+ <div style="padding: 8px" @click="$router.push(item.router)">
+ <span>{{ item.name }}</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ item.value ? item.value : 0 }}
+ </div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="ysfleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>琛ㄥ崟宸插彂閫�</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ yfsvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="errleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>寮傚父</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ ycvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <el-row :gutter="20">
+ <!--鐢ㄦ埛鏁版嵁-->
+ <el-form
+ :model="topqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="98px"
+ >
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ v-model="topqueryParams.taskName"
+ placeholder="璇烽�夋嫨浠诲姟鍚嶇О"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="闂ㄨ瘖鏃堕棿">
+ <el-date-picker
+ v-model="dateRange"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ </el-form-item>
+ <el-form-item label="搴旈殢璁挎椂闂�">
+ <el-date-picker
+ v-model="dateRangefs"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="鎮h�呭鍚�" prop="sendname">
+ <el-input
+ v-model="topqueryParams.sendname"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="璇婃柇鍚嶇О" prop="leavediagname">
+ <el-input
+ v-model="topqueryParams.leavediagname"
+ placeholder="璇疯緭鍏ヨ瘖鏂悕绉�"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="鎮h�呰寖鍥�" prop="status">
+ <el-cascader
+ v-model="topqueryParams.scopetype"
+ placeholder="榛樿鍏ㄩ儴"
+ :options="sourcetype"
+ :props="{ expandTrigger: 'hover' }"
+ @change="handleChange"
+ ></el-cascader>
+ </el-form-item>
+
+ <el-form-item label="浠诲姟鐘舵��" prop="status">
+ <el-select v-model="topqueryParams.sendstate" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎺掑簭鏂瑰紡" prop="status">
+ <el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptionssort"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery(1)"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+ </el-form>
+ <el-divider></el-divider>
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-upload2"
+ size="medium"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="medium"
+ @click="handleAdd"
+ >鏂板</el-button
+ >
+ </el-col>
+
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-warning-outline"
+ size="medium"
+ @click="toleadExport(1)"
+ >鎵ц澶辫触</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-warning"
+ size="medium"
+ @click="toleadExport(2)"
+ >缁撴灉寮傚父</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="success"
+ plain
+ size="medium"
+ @click="buidegetTasklist()"
+ >寰呭姙鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="primary"
+ plain
+ size="medium"
+ @click="affiliation()"
+ >鏈汉鎵�灞炴湇鍔�</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button type="success" size="medium" @click="onthatday()"
+ >浠婃棩鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ <el-table
+ v-loading="loading"
+ :data="userList"
+ :row-class-name="tableRowClassName"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="50" align="center" />
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ fixed
+ width="150"
+ show-overflow-tooltip
+ align="center"
+ key="taskName"
+ prop="taskName"
+ />
+ <!-- <el-table-column label="搴忓彿" fixed align="center" key="id" prop="id" /> -->
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ key="sendname"
+ prop="sendname"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ gettoken360(scope.row.sfzh, scope.row.drcode, scope.row.drname)
+ "
+ ><span class="button-textsc">{{
+ scope.row.sendname
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <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>
+ </el-tooltip>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟寮傚父璇存槑"
+ width="120"
+ align="center"
+ key="remark"
+ prop="remark" -->
+ />
+
+ <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
+ label="闅忚瀹屾垚鏃堕棿"
+ sortable
+ align="center"
+ prop="finishtime"
+ width="160"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.finishtime) }}</span>
+ </template>
+ </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="搴旈殢璁挎棩鏈�"
+ width="200"
+ align="center"
+ key="longSendTime"
+ prop="longSendTime"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.longSendTime) }}</span>
+ </template></el-table-column
+ >
+ <el-table-column
+ label="涓绘不鍖荤敓"
+ width="120"
+ align="center"
+ key="drname"
+ prop="drname"
+ />
+
+ <!-- <el-table-column
+ label="闂ㄨ瘖澶╂暟"
+ width="120"
+ align="center"
+ key="endDay"
+ prop="endDay"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.endDay ? scope.row.endDay + "澶�" : "" }}</span>
+ </template>
+ </el-table-column> -->
+ <el-table-column
+ label="韬唤璇佸彿鐮�"
+ width="200"
+ align="center"
+ key="sfzh"
+ prop="sfzh"
+ />
+ <el-table-column
+ label="鑱旂郴鐢佃瘽"
+ width="200"
+ align="center"
+ key="phone"
+ prop="phone"
+ />
+ <el-table-column
+ label="璐d换鎶ゅ+"
+ width="120"
+ align="center"
+ key="nurseName"
+ prop="nurseName"
+ />
+
+ <!-- <el-table-column
+ label="鐥呭巻鍙�"
+ align="center"
+ sortable
+ key="medicalRecordNo"
+ prop="medicalRecordNo"
+ width="120"
+ /> -->
+
+ <!-- <el-table-column label="骞撮緞" align="center" key="age" prop="age" /> -->
+ <!-- <el-table-column label="鎬у埆"width="100" align="center" key="sex" prop="sex" /> -->
+ <!-- <el-table-column label="搴婂彿" align="center" key="badNo" prop="badNo" /> -->
+ <el-table-column
+ label="棣栨闅忚绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ width="120"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鏈绉戝"
+ align="center"
+ key="visitDeptName"
+ prop="visitDeptName"
+ width="120"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐥呭尯"
+ align="center"
+ 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>
+ <el-table-column
+ label="闅忚浜哄憳"
+ align="center"
+ key="updateBy"
+ prop="updateBy"
+ width="120"
+ />
+
+ <el-table-column
+ label="闂ㄨ瘖闅忚妯℃澘鍚嶇О"
+ align="center"
+ key="templatename"
+ prop="templatename"
+ width="200"
+ />
+ <el-table-column
+ label="浠诲姟鎵ц鏂瑰紡"
+ align="center"
+ key="preachform"
+ prop="preachform"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.preachform">{{ item }}銆� </span>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟鍙戦�佹祦绋�"
+ align="center"
+ key="serviceSubtaskRecordList"
+ prop="serviceSubtaskRecordList"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.serviceSubtaskRecordList"
+ >{{ item.remark }}銆�
+ </span>
+ </template>
+ </el-table-column> -->
+ <el-table-column
+ label="浠诲姟缁撴灉璇存槑"
+ width="220"
+ align="center"
+ key="remark"
+ prop="remark"
+ >
+ <template slot-scope="scope" v-if="scope.row.remark">
+ <el-tooltip
+ :content="scope.row.remark"
+ placement="top"
+ effect="dark"
+ >
+ <el-tag
+ type="warning"
+ v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
+ >{{ scope.row.remark }}</el-tag
+ >
+ <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
+ </el-tooltip>
+ </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-tooltip
+ class="item"
+ effect="dark"
+ content="鍐嶆闅忚"
+ placement="top"
+ >
+ <el-button
+ size="medium"
+ type="text"
+ v-if="scope.row.isVisitAgain!=2"
+ @click="followupvisit(scope.row)"
+ ><span class="button-bb"
+ ><i class="el-icon-s-promotion"></i>鍐嶆闅忚</span
+ ></el-button
+ >
+ </el-tooltip>
+ <el-tooltip
+ v-if="scope.row.sendstate == 1 || scope.row.sendstate == 2"
+ class="item"
+ effect="dark"
+ content="鏆傚仠鏈嶅姟"
+ placement="top"
+ >
+ <el-button
+ size="medium"
+ type="text"
+ @click="handlestop(scope.row)"
+ v-hasPermi="['system:user:edit']"
+ ><span class="button-sc"
+ ><i class="el-icon-remove-outline"></i>鏆傚仠鏈嶅姟</span
+ ></el-button
+ >
+ </el-tooltip> -->
+ <el-button size="medium" type="text" @click="Seedetails(scope.row)"
+ ><span class="button-zx"
+ ><i class="el-icon-s-order"></i>鏌ョ湅璇︽儏</span
+ ></el-button
+ >
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleUpdate(scope.row)"
+ ><span class="button-textxga"
+ ><i class="el-icon-edit"></i>鎮h�呰繃婊�</span
+ ></el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="topqueryParams.pageNum"
+ :limit.sync="topqueryParams.pageSize"
+ @pagination="getList"
+ />
+ </el-row>
+ <!-- 娣诲姞鎴栦慨鏀瑰奖鍍忛殢璁垮璇濇 -->
+ <el-dialog
+ :title="amendtag ? '淇敼鎮h�呬俊鎭�' : '鏂板鎮h��'"
+ :visible.sync="Labelchange"
+ width="900px"
+ >
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="濮撳悕" width="100" prop="name">
+ <el-input
+ v-model="form.name"
+ placeholder="璇疯緭鍏ュ鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎬у埆" width="100" prop="sex">
+ <el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆">
+ <el-option
+ v-for="dict in sextype"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="骞撮緞" prop="age">
+ <el-input
+ v-model="form.age"
+ placeholder="璇疯緭鍏ュ勾榫�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+<el-row >
+ <el-col :span="8">
+ <el-form-item label="杩囨护鍖荤敓" width="100" prop="filterDrname">
+ <el-input
+ v-model="form.filterDrname"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+ <el-button @click="cancel">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ <!-- 淇敼鍙戦�佹椂闂村璇濇 -->
+ <el-dialog
+ title="鍙戦�佹椂闂磋缃�"
+ :visible.sync="modificationVisible"
+ width="45%"
+ >
+ <div style="margin-bottom: 20px; color: red">
+ 缁熶竴淇敼褰撳ぉ鏈彂閫佺殑浠诲姟鏃堕棿
+ </div>
+
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ ref="ruleForm"
+ label-width="120px"
+ class="demo-ruleForm"
+ >
+ <el-form-item label="鍙戦�佹棩鏈�">
+ <el-date-picker
+ v-model="ruleForm.value1"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ >
+ </el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="鏃堕棿娈�" prop="type">
+ <el-checkbox-group v-model="ruleForm.type">
+ <el-checkbox label="涓婂崍" name="type"></el-checkbox>
+ <el-checkbox label="涓嬪崍" name="type"></el-checkbox>
+ <el-checkbox label="鏅氫笂" name="type"></el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ <el-form-item label="涓婂崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value2"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="涓嬪崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value3"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="鏅氫笂鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value4"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="modificationVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="modificationVisible = false"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 鍐嶆闅忚 -->
+ <el-dialog title="鎮h�呭啀娆¢殢璁�" :visible.sync="dialogFormVisible">
+ <el-form ref="zcform" :rules="zcrules" :model="zcform" label-width="80px">
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.taskName"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鎮h�呭悕绉�">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.sendname"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="骞撮緞">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.age"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="绉戝">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.deptname"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鐥呭尯">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.leavehospitaldistrictname"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="闅忚鏂瑰紡" prop="resource">
+ <el-radio-group v-model="zcform.resource">
+ <el-radio label="1">鏈梾鍖洪殢璁�</el-radio>
+ <el-radio label="2">闅忚涓績闅忚</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <!-- <el-form-item label="鍗冲埢鍙戦��">
+ <el-switch v-model="zcform.delivery"></el-switch>
+ </el-form-item> -->
+ <el-form-item label="闂ㄨ瘖鏃堕棿">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.endtime"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="闅忚瀹屾垚鏃堕棿" prop="date1">
+ <el-date-picker
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ v-model="zcform.date1"
+ style="width: 100%"
+ ></el-date-picker>
+ </el-form-item>
+ <el-form-item label="闅忚璁板綍">
+ <el-input type="textarea" v-model="zcform.remark"></el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="setupsubtask">纭鍒涘缓鏈嶅姟</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import {
+ delUser,
+ addUser,
+ updateUser,
+ resetUserPwd,
+ changeUserStatus,
+} from "@/api/system/user";
+import {
+ getTaskservelist,
+ buidegetTasklist,
+ addserviceSubtask,
+ query360PatInfo,
+} from "@/api/AiCentre/index";
+import { alterpatient, particularpatient } from "@/api/patient/homepage";
+import Treeselect from "@riophae/vue-treeselect";
+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 },
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ dialogFormVisible: false,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 鐢ㄦ埛琛ㄦ牸鏁版嵁
+ userList: null,
+ // 寮瑰嚭灞傛爣棰�
+ title: "鏂板褰卞儚闅忚",
+ // 鏄惁鏄剧ず淇敼銆佹坊鍔犲脊鍑哄眰
+ addalteropen: false,
+ // 淇敼鍙戦�佹椂闂村璇濇
+ modificationVisible: false,
+ // 閮ㄩ棬鍚嶇О
+ deptName: undefined,
+ // 榛樿瀵嗙爜
+ initPassword: undefined,
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ dateRangefs: [],
+ // 宀椾綅閫夐」
+ postOptions: [],
+ ruleForm: {
+ type: [],
+ },
+ zcform: {},
+ dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
+ inputVisible: false,
+ Labelchange: false,
+ ycvalue: "",
+ yfsvalue: "",
+ inputValue: "",
+ preachform: "",
+ previewVisible: false, //褰卞儚闅忚棰勮寮规
+ radio: "",
+ radios: [],
+ total: 0, // 鎬绘潯鏁�
+ ImportQuantity: 999, //瀵煎奖鍍忛殢璁挎暟閲�
+ //棰勮褰卞儚闅忚淇℃伅
+ previewvalue: {
+ username: "杩欎釜鍖荤敓瀵逛綘鎬庝箞鏍�",
+ },
+ value: [],
+ list: [],
+
+ sourcetype: [
+ {
+ value: 1,
+ label: "绉戝",
+ children: [],
+ },
+ {
+ value: 2,
+ label: "鐥呭尯",
+ children: [],
+ },
+ {
+ value: 3,
+ label: "鍏ㄩ儴",
+ },
+ ],
+ loading: false,
+ cardlist: [
+ {
+ name: "闂ㄨ瘖鏈嶅姟鎬婚噺",
+ value: 0,
+ },
+ // {
+ // name: "鎮h�呰繃婊�",
+ // value: 0,
+ // },
+ {
+ name: "闇�闅忚",
+ value: 0,
+ },
+ {
+ name: "鍙戦�佸け璐�",
+ value: 0,
+ },
+ {
+ name: "寰呴殢璁�",
+ value: 0,
+ },
+ // {
+ // name: "宸插彂閫�",
+ // value: 0,
+ // },
+
+ // {
+ // name: "琛ㄥ崟宸插彂閫�",
+ // value: 0,
+ // },
+ ],
+ zcrules: {
+ date1: [
+ { required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
+ ],
+ resource: [
+ { required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
+ ],
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {
+ phonenumber: "",
+ totagid: "",
+ types: "",
+ nickName: "",
+ qystatus: "",
+ btstatus: "",
+ },
+ topicoptionssort: [
+ {
+ value: 0,
+ label: "闂ㄨ瘖鏃堕棿(姝e簭)",
+ },
+ {
+ value: 1,
+ label: "闂ㄨ瘖鏃堕棿(鍊掑簭)",
+ },
+ {
+ value: 2,
+ label: "鍙戦�佹椂闂�(姝e簭)",
+ },
+ {
+ value: 3,
+ label: "鍙戦�佹椂闂�(鍊掑簭)",
+ },
+ {
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+ },
+ ],
+ // 鏌ヨ鍙傛暟
+ topqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 2,
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 闂ㄨ瘖鏃堕棿(姝e簭) 1 闂ㄨ瘖鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
+ serviceType: 3,
+ searchscope: 3,
+ visitCount: 2,
+ scopetype: [],
+ visitDeptCodes: [],
+ leaveldeptcodes:[],
+ leavehospitaldistrictcodes: [],
+ },
+ propss: { multiple: true },
+ options: [],
+
+ topicoptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 1,
+ label: "琛ㄥ崟宸查鍙�",
+ },
+ {
+ value: 2,
+ label: "寰呴殢璁�",
+ },
+ {
+ value: 3,
+ label: "琛ㄥ崟宸插彂閫�",
+ },
+ {
+ value: 4,
+ label: "涓嶆墽琛�",
+ },
+ {
+ value: 5,
+ label: "鍙戦�佸け璐�",
+ },
+ {
+ value: 6,
+ label: "宸插畬鎴�",
+ },
+ ],
+ sextype: [
+ {
+ value: 1,
+ label: "鐢�",
+ },
+ {
+ value: 2,
+ label: "濂�",
+ },
+ ],
+ topicoptionsyj: [
+ {
+ value: 1,
+ label: "寮傚父",
+ },
+ {
+ value: 0,
+ label: "姝e父",
+ },
+ ],
+ url: "http://9.208.2.190:8090/smartor/serviceExternal/query360PatInfo",
+ postData: {
+ XiaoXiTou: {
+ FaSongFCSJC: "ZJHES",
+ FaSongJGID: localStorage.getItem("orgid"),
+ FaSongJGMC: localStorage.getItem("orgname"),
+ FaSongSJ: "2025-01-09聽17:29:36",
+ FaSongXTJC: "SUIFANGXT",
+ FaSongXTMC: "闅忚绯荤粺",
+ XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
+ XiaoXiLX: "SC_LC_360STCX",
+ XiaoXiMC: "360聽瑙嗗浘鏌ヨ",
+ ZuHuID: localStorage.getItem("ZuHuID"),
+ ZuHuMC: localStorage.getItem("orgname"),
+ },
+ YeWuXX: {
+ BingRenXX: {
+ ZhengJianHM: "",
+ ZhengJianLXDM: "01",
+ ZhengJianLXMC: "灞呮皯韬唤璇�",
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ },
+ YongHuXX: {
+ XiTongID: "SUIFANGXT",
+ XiTongMC: "闅忚绯荤粺",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ idp: "lyra",
+ },
+ },
+ },
+ amendtag: false,
+ errtype: "",
+ leavehospitaldistrictcode: "",
+ serviceState: [],
+ checkboxlist: [],
+ // 琛ㄥ崟鏍¢獙
+ rules: {},
+ };
+ },
+ watch: {},
+ created() {
+ this.serviceState = store.getters.serviceState;
+ this.checkboxlist = store.getters.checkboxlist;
+ this.errtype = this.$route.query.errtype;
+ this.leavehospitaldistrictcode =
+ this.$route.query.leavehospitaldistrictcode;
+ this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
+ return {
+ label: dept.deptName,
+ value: dept.deptCode,
+ };
+ });
+ this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
+ return {
+ label: dept.districtName,
+ value: dept.districtCode,
+ };
+ });
+ if (this.errtype) {
+ this.toleadExport(2);
+ } else {
+ this.getList(1);
+ }
+ this.getConfigKey("sys.user.initPassword").then((response) => {
+ this.initPassword = response.msg;
+ });
+ },
+ activated() {
+ this.getList(1);
+ },
+ methods: {
+ /** 鏌ヨ闅忚鏈嶅姟鍒楄〃 */
+ getList(refresh) {
+ // 榛樿鍏ㄩ儴
+
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ 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.visitDeptCodes[0]&&this.topqueryParams.leaveldeptcodes[0]
+ ) {
+ this.topqueryParams.deptOrDistrict = 2;
+ } else {
+ this.topqueryParams.deptOrDistrict = 1;
+ }
+ 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);
+ // this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[1].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[2].value = response.rows[0].fssb;
+ this.cardlist[3].value = response.rows[0].dsf;
+ // this.cardlist[4].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ affiliation() {
+ this.topqueryParams.managementDoctorCode= store.getters.hisUserId;
+
+ this.getList(1);
+ },
+ onthatday() {
+ this.topqueryParams.startSendDateTime = this.getCurrentDate();
+ this.topqueryParams.endSendDateTime = this.getCurrentDate();
+ this.getList(1);
+ },
+ getCurrentDate() {
+ const now = new Date();
+ return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
+ },
+ buidegetTasklist(type) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ // 鎺ュ彈寮傚父璺宠浆
+ if (this.errtype) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(
+ this.leavehospitaldistrictcode
+ );
+ }
+ let obj = {
+ pageNum: 1,
+ pageSize: 10,
+ leavehospitaldistrictcodes:
+ this.topqueryParams.leavehospitaldistrictcodes,
+ sendstates: [2, 3],
+ visitDeptCodes: this.topqueryParams.visitDeptCodes,
+ leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
+ };
+ buidegetTasklist(obj).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);
+ this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[2].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[3].value = response.rows[0].fssb;
+ this.cardlist[4].value = response.rows[0].dsf;
+ // this.cardlist[5].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ // 鏌ョ湅闂ㄨ瘖闅忚璇︽儏
+ Referencequestion(row) {
+ this.previewVisible = true;
+ },
+ // 娣诲姞寮规鎼滅储
+ remoteMethod(query) {
+ if (query !== "") {
+ this.loading = true;
+ setTimeout(() => {
+ this.loading = false;
+ this.options = this.list.filter((item) => {
+ return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
+ });
+ }, 200);
+ } else {
+ this.options = [];
+ }
+ },
+ // 褰卞儚闅忚鐘舵�佷慨鏀�
+ handleStatusChange(row) {
+ let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
+ this.$modal
+ .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵')
+ .then(function () {
+ return changeUserStatus(row.userId, row.status);
+ })
+ .then(() => {
+ this.$modal.msgSuccess(text + "鎴愬姛");
+ })
+ .catch(function () {
+ row.status = row.status === "0" ? "1" : "0";
+ });
+ },
+
+ // 琛ㄥ崟閲嶇疆
+ 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");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery(refresh) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.visitDeptCodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ this.topqueryParams.pageNum = 1;
+ this.topqueryParams.startOutHospTime = this.dateRange[0];
+ this.topqueryParams.endOutHospTime = this.dateRange[1];
+ this.topqueryParams.startSendDateTime = this.dateRangefs[0];
+ this.topqueryParams.endSendDateTime = this.dateRangefs[1];
+ console.log("2");
+ this.getList(refresh);
+ },
+ // 鎮h�呰寖鍥村鐞�
+ handleChange(value) {
+ let type = value[0];
+ let code = value.slice(-1)[0];
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.visitDeptCodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
+ if (type == 1) {
+ this.topqueryParams.visitDeptCodes.push(code);
+ this.topqueryParams.leaveldeptcodes.push(code);
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.searchscope = 1;
+ } else if (type == 2) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(code);
+ this.topqueryParams.visitDeptCodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
+ this.topqueryParams.searchscope = 2;
+ } else {
+ this.topqueryParams.searchscope = 3;
+ }
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.dateRangefs = [];
+ this.topqueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 2,
+ sort: 2, //0 闂ㄨ瘖鏃堕棿(姝e簭) 1 闂ㄨ瘖鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
+ serviceType: 3,
+ searchscope: 3,
+ visitCount: 2,
+ scopetype: [],
+ visitDeptCodes: [],
+ leaveldeptcodes:[],
+ leavehospitaldistrictcodes: [],
+ };
+ this.handleQuery(1);
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.userId);
+ this.single = selection.length != 1;
+ this.multiple = !selection.length;
+ },
+ //鍒犻櫎閫夐」
+ handleClose(tag) {
+ this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+ },
+ //瑙﹀彂鏂板杈撳叆
+ showInput() {
+ this.inputVisible = true;
+ this.$nextTick((_) => {
+ this.$refs.saveTagInput.$refs.input.focus();
+ });
+ },
+ //鑾峰彇澶卞幓鐒︾偣瑙﹀彂
+ handleInputConfirm() {
+ let inputValue = this.inputValue;
+ if (inputValue) {
+ this.dynamicTags.push(inputValue);
+ }
+ this.inputVisible = false;
+ this.inputValue = "";
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.$router.push({
+ path: "/followvisit/QuestionnaireTask",
+ query: {
+ type: 2,
+ serviceType: 3,
+ },
+ });
+ },
+ //鎮h��360璺宠浆
+ gettoken360(sfzh, drcode, drname) {
+ // // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
+ this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
+
+ query360PatInfo(this.postData).then((res) => {
+ if (res.data.url) {
+ window.open(res.data.url, "_blank");
+ // this.linkUrl = res.data.url;
+ } else {
+ this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
+ }
+ });
+ },
+
+ /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
+ handleResetPwd(row) {
+ this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ closeOnClickModal: false,
+ inputPattern: /^.{5,20}$/,
+ inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+ })
+ .then(({ value }) => {
+ resetUserPwd(row.userId, value).then((response) => {
+ this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
+ });
+ })
+ .catch(() => {});
+ },
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.Labelchange = false;
+ this.reset();
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm: function () {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ this.form.isoperation = 2;
+ this.form.notrequiredFlag = 1;
+ alterpatient(this.form)
+ .then((response) => {
+ console.log(response);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鎮h�呰繃婊ゆ垚鍔�");
+ });
+
+ this.reset();
+ this.Labelchange = false;
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const userIds = row.userId || this.ids;
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
+ .then(function () {
+ return delUser(userIds);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴鍋滄
+ AllStop() {
+ this.$modal
+ .confirm("鏄惁鍋滄鍏ㄩ儴浠诲姟锛�")
+ .then(function () {
+ return console.log("鍋滄鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgWarning("鍋滄鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴寮�濮�
+ AllStarted() {
+ this.$modal
+ .confirm("鏄惁寮�鍚叏閮ㄤ换鍔★紵")
+ .then(function () {
+ return console.log("寮�鍚垚鍔�");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("寮�鍚垚鍔�");
+ })
+ .catch(() => {});
+ },
+ // 浠诲姟閲嶇疆
+ TaskReset() {
+ this.$modal
+ .confirm("鏄惁閲嶇疆閫変腑鐨勪换鍔¢」锛�")
+ .then(function () {
+ return console.log("閫変腑鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("閲嶇疆鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 璁剧疆鍙戦�佹椂闂�
+ Sendtimesetting() {
+ this.modificationVisible = true;
+ },
+ // 璺宠浆璇︽儏椤�
+ Seedetails(row) {
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
+ }
+ this.$router.push({
+ path: "/followvisit/record/detailpage/",
+ query: {
+ taskid: row.taskid,
+ patid: row.patid,
+ id: row.id,
+ Voicetype: type,
+ visitCount: this.topqueryParams.visitCount,
+ },
+ });
+ },
+ // 鍐嶆闅忚
+ followupvisit(row) {
+ this.zcform = row;
+ this.zcform.endtime = this.formatTime(this.zcform.endtime);
+ this.dialogFormVisible = true;
+ },
+ onSubmit() {},
+ // 鏆傚仠鏈嶅姟
+ handlestop(row) {
+ let objson = row;
+ this.$modal
+ .confirm(
+ '鏄惁纭鏆傚仠浠诲姟鍚嶇О涓�"' +
+ row.taskName +
+ '鎮h�呭悕绉颁负"' +
+ row.sendname +
+ '"鐨勬暟鎹」锛�'
+ )
+ .then(() => {
+ getTaskservelist({
+ patid: row.patid,
+ taskid: row.taskid,
+ }).then((res) => {
+ if (res.code == 200) {
+ objson.sendstate = 4;
+ objson.remark = "鏈嶅姟鏆傚仠";
+ Editsingletaskson(objson).then((res) => {
+ if (res.code) {
+ this.$modal.msgSuccess("璁板綍鎴愬姛");
+ this.getList(1);
+ }
+ });
+ }
+ });
+ })
+ .catch(() => {});
+ },
+ // 鎮h�呰繃婊よЕ鍙�
+ handleUpdate(row) {
+ particularpatient(row.patid).then((response) => {
+ this.form = response.data;
+ this.form.filterDrname = store.getters.nickName;
+ });
+ this.amendtag = true;
+ this.Labelchange = true;
+ },
+ // 渚挎嵎鎸夐挳
+ toleadExport(too) {
+ if (too == 1) {
+ this.topqueryParams.sendstate = 4;
+ this.topqueryParams.excep = null;
+ } else if (too == 2) {
+ this.topqueryParams.excep = 1;
+ }
+ this.handleQuery();
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.topqueryParams.pageNum = null;
+ this.topqueryParams.pageSize = null;
+ this.download(
+ "smartor/serviceSubtask/patItemExport",
+ {
+ ...this.topqueryParams,
+ },
+ `user_${new Date().getTime()}.xlsx`
+ );
+ },
+ // 寮傚父鍒楁覆鏌�
+ tableRowClassName({ row, rowIndex }) {
+ if (row.excep == 1) {
+ return "warning-row";
+ }
+ return "";
+ },
+ // 鍒涘缓鍐嶆闅忚鏈嶅姟
+ setupsubtask() {
+ this.$refs["zcform"].validate((valid) => {
+ if (valid) {
+ this.zcform.remark =
+ this.zcform.remark + "銆�" + this.getCurrentTime() + "銆�";
+ let form = structuredClone(this.zcform);
+ form.longSendTime = this.formatTime(form.date1);
+ form.finishtime = "";
+ if (form.resource) {
+ if (form.resource == 2) {
+ form.serviceType = 13;
+ }
+ } else {
+ this.$modal.msgError("鏈�夋嫨闅忚鏂瑰紡");
+ }
+ form.id = null;
+ form.sendstate = 2;
+ form.preachform = form.preachformson;
+ form.longTask = 0;
+ addserviceSubtask(form).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("鍒涘缓鎴愬姛");
+ } else {
+ this.$modal.msgError("鍒涘缓澶辫触");
+ }
+ this.dialogFormVisible = false;
+ });
+ }
+ });
+ },
+ getCurrentTime() {
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ const seconds = String(now.getSeconds()).padStart(2, "0");
+
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-button--primary.is-plain {
+ color: #ffffff;
+ background: #409eff;
+ border-color: #4fabe9;
+}
+
+.document {
+ // width: 100px;
+ height: 50px;
+}
+::v-deep.el-table .warning-row {
+ background: #eec4c4;
+}
+
+.documentf {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.download {
+ text-align: center;
+
+ .el-upload__tip {
+ font-size: 23px;
+ }
+
+ .el-upload__text {
+ font-size: 23px;
+ }
+}
+
+.uploading {
+ margin-top: 20px;
+ margin: 20px;
+ padding: 30px;
+ background: #ffffff;
+ 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);
+}
+
+.el-tag + .el-tag {
+ margin-left: 10px;
+}
+
+.button-new-tag {
+ margin-left: 10px;
+ height: 32px;
+ line-height: 30px;
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.input-new-tag {
+ width: 90px;
+ margin-left: 10px;
+ vertical-align: bottom;
+}
+
+.drexamine {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 30px;
+ background: #daeaf5;
+
+ img {
+ width: 100px;
+ height: 100px;
+ }
+}
+
+.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);
+
+ .topic-dev {
+ margin-bottom: 25px;
+ font-size: 20px !important;
+
+ .dev-text {
+ margin-bottom: 10px;
+ }
+ }
+}
+::v-deep.leftvlue .el-card__body {
+ background: #F2F8FF;
+ color: #324A9B;
+}
+::v-deep.leftvlue .el-card__body:hover {
+ background: #3664D9;
+ color: #fff;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+::v-deep.errleftvlue .el-card__body {
+ background: #fdd0d7;
+}
+::v-deep.errleftvlue .el-card__body:hover {
+ background: #f88d96;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+
+::v-deep.ysfleftvlue .el-card__body {
+ background: #d0fdd8;
+}
+::v-deep.ysfleftvlue .el-card__body:hover {
+ background: #8df8a4;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+.button-bb {
+ font-weight: 500;
+ background-color: #2ba05c;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-xq {
+ font-weight: 500;
+ background-color: #409eff;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-sc {
+ font-weight: 500;
+ background-color: #b3a21f;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-zx {
+ background: #4fabe9;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-textxga {
+ color: #de7897;
+}
+::v-deep.el-radio-group {
+ span {
+ font-size: 24px;
+ }
+}
+
+// 閫夐」瀛椾綋鏀惧ぇ
+// ::v-deep.el-checkbox-group {
+// span {
+// font-size: 24px;
+// }
+// }
+</style>
diff --git a/src/views/followvisit/SpecificDisease/index.vue b/src/views/followvisit/SpecificDisease/index.vue
index 424d6a5..c5131a7 100644
--- a/src/views/followvisit/SpecificDisease/index.vue
+++ b/src/views/followvisit/SpecificDisease/index.vue
@@ -138,8 +138,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -791,8 +790,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -826,7 +825,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -1017,11 +1016,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh,drcode,drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC=='涓芥按甯備腑鍖婚櫌') {
- this.postData.YeWuXX.YongHuXX.YongHuID = '1400398571877961728';
- this.postData.YeWuXX.YongHuXX.YongHuXM = 'LSZYY';
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, '_blank');
@@ -1266,14 +1264,11 @@
},
// 璺宠浆璇︽儏椤�
Seedetails(row) {
- let type = "";
+ let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1445,10 +1440,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/followvisit/again/index.vue b/src/views/followvisit/again/index.vue
index daa9a30..a6aed6b 100644
--- a/src/views/followvisit/again/index.vue
+++ b/src/views/followvisit/again/index.vue
@@ -180,8 +180,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -246,7 +245,7 @@
<div class="documentf">
<div class="document">
<el-button type="success" size="medium" @click="onthatday()"
- >褰撴棩鏈嶅姟</el-button
+ >浠婃棩鏈嶅姟</el-button
>
</div>
</div>
@@ -397,13 +396,7 @@
key="drname"
prop="drname"
/>
- <el-table-column
- label="闅忚浜哄憳"
- align="center"
- key="updateBy"
- prop="updateBy"
- width="120"
- />
+
<el-table-column
label="鍑洪櫌澶╂暟"
width="120"
@@ -483,6 +476,13 @@
:show-overflow-tooltip="true"
>
</el-table-column>
+ <el-table-column
+ label="闅忚浜哄憳"
+ align="center"
+ key="updateBy"
+ prop="updateBy"
+ width="120"
+ />
<el-table-column
label="鍑洪櫌闅忚妯℃澘鍚嶇О"
@@ -928,7 +928,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
{
@@ -983,13 +983,21 @@
value: 3,
label: "鍙戦�佹椂闂�(鍊掑簭)",
},
+ {
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+ },
],
// 鏌ヨ鍙傛暟
topqueryParams: {
pageNum: 1,
pageSize: 10,
sendstate: 2,
- sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 2,
searchscope: 3,
visitCount: 2,
@@ -1077,8 +1085,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -1197,7 +1205,6 @@
});
},
affiliation() {
-
this.topqueryParams.managementDoctorCode= store.getters.hisUserId;
this.getList(1);
@@ -1427,11 +1434,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1473,7 +1479,7 @@
.then((response) => {
console.log(response);
})
- .then(() => {
+ .then(() => {
this.getList(1);
this.$modal.msgSuccess("鎮h�呰繃婊ゆ垚鍔�");
});
@@ -1542,13 +1548,11 @@
},
// 璺宠浆璇︽儏椤�
Seedetails(row) {
- let type = "";
+ let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1774,10 +1778,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
@@ -1822,7 +1828,9 @@
border-radius: 1px;
color: #ffffff;
}
-
+.button-textxga {
+ color: #de7897;
+}
::v-deep.el-radio-group {
span {
font-size: 24px;
diff --git a/src/views/followvisit/complaint/index.vue b/src/views/followvisit/complaint/index.vue
new file mode 100644
index 0000000..116f649
--- /dev/null
+++ b/src/views/followvisit/complaint/index.vue
@@ -0,0 +1,1963 @@
+<template>
+ <div class="app-container">
+ <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
+ shadow="hover"
+ :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
+ >
+ <div style="padding: 8px" @click="$router.push(item.router)">
+ <span>{{ item.name }}</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ item.value ? item.value : 0 }}
+ </div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="ysfleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>琛ㄥ崟宸插彂閫�</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ yfsvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="errleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>寮傚父</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ ycvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <el-row :gutter="20">
+ <!--鐢ㄦ埛鏁版嵁-->
+ <el-form
+ :model="topqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="98px"
+ >
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ v-model="topqueryParams.taskName"
+ placeholder="璇烽�夋嫨浠诲姟鍚嶇О"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="鍑洪櫌鏃堕棿">
+ <el-date-picker
+ v-model="dateRange"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ </el-form-item>
+
+
+ <el-form-item label="鎮h�呭鍚�" prop="sendname">
+ <el-input
+ v-model="topqueryParams.sendname"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="璇婃柇鍚嶇О" prop="leavediagname">
+ <el-input
+ v-model="topqueryParams.leavediagname"
+ placeholder="璇疯緭鍏ヨ瘖鏂悕绉�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="闅忚浜哄憳" prop="updateBy">
+ <el-input
+ v-model="topqueryParams.updateBy"
+ placeholder="璇疯緭鍏ラ殢璁夸汉鍛�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="涓绘不鍖荤敓" prop="drname">
+ <el-input
+ v-model="topqueryParams.drname"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="缁忕鍖荤敓" prop="managementDoctor">
+ <el-input
+ v-model="topqueryParams.managementDoctor"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="鎮h�呰寖鍥�" prop="status">
+ <el-cascader
+ v-model="topqueryParams.scopetype"
+ placeholder="榛樿鍏ㄩ儴"
+ :options="sourcetype"
+ :props="{ expandTrigger: 'hover' }"
+ @change="handleChange"
+ ></el-cascader>
+ </el-form-item>
+
+ <el-form-item label="浠诲姟鐘舵��" prop="status">
+ <el-select v-model="topqueryParams.sendstate" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎺掑簭鏂瑰紡" prop="status">
+ <el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptionssort"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery(1)"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+ </el-form>
+ <el-divider></el-divider>
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-upload2"
+ size="medium"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="medium"
+ @click="handleAdd"
+ >鏂板</el-button
+ >
+ </el-col>
+
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-warning-outline"
+ size="medium"
+ @click="toleadExport(1)"
+ >鎵ц澶辫触</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-warning"
+ size="medium"
+ @click="toleadExport(2)"
+ >缁撴灉寮傚父</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="success"
+ plain
+ size="medium"
+ @click="buidegetTasklist()"
+ >寰呭姙鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="primary"
+ plain
+ size="medium"
+ @click="affiliation()"
+ >鏈汉鎵�灞炴湇鍔�</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button type="success" size="medium" @click="onthatday()"
+ >浠婃棩鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+
+ </el-row>
+ <el-table
+ v-loading="loading"
+ ref="userform"
+ :data="userList"
+ :row-class-name="tableRowClassName"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="50" align="center" />
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ fixed
+ width="150"
+ show-overflow-tooltip
+ align="center"
+ key="taskName"
+ prop="taskName"
+ />
+ <!-- <el-table-column label="搴忓彿" fixed align="center" key="id" prop="id" /> -->
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ key="sendname"
+ prop="sendname"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ gettoken360(scope.row.sfzh, scope.row.drcode, scope.row.drname)
+ "
+ ><span class="button-textsc">{{
+ scope.row.sendname
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <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>
+ </el-tooltip>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟寮傚父璇存槑"
+ width="120"
+ align="center"
+ key="remark"
+ prop="remark" -->
+ />
+
+ <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
+ label="闅忚瀹屾垚鏃堕棿"
+ sortable
+ align="center"
+ prop="finishtime"
+ width="160"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.finishtime) }}</span>
+ </template>
+ </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="涓绘不鍖荤敓"
+ width="120"
+ align="center"
+ key="drname"
+ prop="drname"
+ />
+
+ <el-table-column
+ label="缁忕鍖荤敓"
+ align="center"
+ key="managementDoctor"
+ prop="managementDoctor"
+ width="120"
+ />
+ <el-table-column
+ label="鍑洪櫌澶╂暟"
+ width="120"
+ align="center"
+ key="endDay"
+ prop="endDay"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.endDay ? scope.row.endDay + "澶�" : "" }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="韬唤璇佸彿鐮�"
+ width="200"
+ align="center"
+ key="sfzh"
+ prop="sfzh"
+ />
+ <el-table-column
+ label="鑱旂郴鐢佃瘽"
+ width="200"
+ align="center"
+ key="phone"
+ prop="phone"
+ />
+ <el-table-column
+ label="璐d换鎶ゅ+"
+ width="120"
+ align="center"
+ key="nurseName"
+ prop="nurseName"
+ />
+
+ <!-- <el-table-column
+ label="鐥呭巻鍙�"
+ align="center"
+ sortable
+ key="medicalRecordNo"
+ prop="medicalRecordNo"
+ width="120"
+ /> -->
+
+ <!-- <el-table-column label="骞撮緞" align="center" key="age" prop="age" /> -->
+ <!-- <el-table-column label="鎬у埆"width="100" align="center" key="sex" prop="sex" /> -->
+ <!-- <el-table-column label="搴婂彿" align="center" key="badNo" prop="badNo" /> -->
+ <el-table-column
+ label="绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ width="120"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐥呭尯"
+ align="center"
+ 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>
+ <el-table-column
+ label="闅忚浜哄憳"
+ align="center"
+ key="updateBy"
+ prop="updateBy"
+ width="120"
+ />
+
+ <el-table-column
+ label="鎶曡瘔寤鸿妯℃澘鍚嶇О"
+ align="center"
+ key="templatename"
+ prop="templatename"
+ width="200"
+ />
+ <el-table-column
+ label="浠诲姟鎵ц鏂瑰紡"
+ align="center"
+ key="preachform"
+ prop="preachform"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.preachform">{{ item }}銆� </span>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟鍙戦�佹祦绋�"
+ align="center"
+ key="serviceSubtaskRecordList"
+ prop="serviceSubtaskRecordList"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.serviceSubtaskRecordList"
+ >{{ item.remark }}銆�
+ </span>
+ </template>
+ </el-table-column> -->
+ <el-table-column
+ label="浠诲姟缁撴灉璇存槑"
+ width="220"
+ align="center"
+ key="remark"
+ prop="remark"
+ >
+ <template slot-scope="scope" v-if="scope.row.remark">
+ <el-tooltip
+ :content="scope.row.remark"
+ placement="top"
+ effect="dark"
+ >
+ <el-tag
+ type="warning"
+ v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
+ >{{ scope.row.remark }}</el-tag
+ >
+ <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
+ </el-tooltip>
+ </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-tooltip
+ class="item"
+ effect="dark"
+ content="鍐嶆闅忚"
+ placement="top"
+ >
+ <el-button
+ size="medium"
+ type="text"
+ v-if="scope.row.isVisitAgain!=2"
+ @click="followupvisit(scope.row)"
+ ><span class="button-bb"
+ ><i class="el-icon-s-promotion"></i>鍐嶆闅忚</span
+ ></el-button
+ >
+ </el-tooltip>
+ <el-tooltip
+ v-if="scope.row.sendstate == 1 || scope.row.sendstate == 2"
+ class="item"
+ effect="dark"
+ content="鏆傚仠鏈嶅姟"
+ placement="top"
+ >
+ <el-button
+ size="medium"
+ type="text"
+ @click="handlestop(scope.row)"
+ v-hasPermi="['system:user:edit']"
+ ><span class="button-sc"
+ ><i class="el-icon-remove-outline"></i>鏆傚仠鏈嶅姟</span
+ ></el-button
+ >
+ </el-tooltip> -->
+ <el-button size="medium" type="text" @click="Seedetails(scope.row)"
+ ><span class="button-zx"
+ ><i class="el-icon-s-order"></i>鏌ョ湅璇︽儏</span
+ ></el-button
+ >
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleUpdate(scope.row)"
+ ><span class="button-textxga"
+ ><i class="el-icon-edit"></i>鎮h�呰繃婊�</span
+ ></el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="topqueryParams.pageNum"
+ :limit.sync="topqueryParams.pageSize"
+ @pagination="getList"
+ />
+ </el-row>
+ <!-- 婊℃剰搴﹀脊妗� -->
+ <el-dialog
+ title="闅忚婊℃剰搴﹁瘎鍒�"
+ :visible.sync="scoreDialogVisible"
+ width="80%"
+ :close-on-click-modal="false"
+ >
+ <el-table :data="selectedRows" border style="width: 100%">
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ prop="sendname"
+ />
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ width="180"
+ align="center"
+ prop="taskName"
+ />
+ <!-- 鏂板璇勫垎鍒� -->
+ <el-table-column
+ label="鐪熷疄鎬�(20)"
+ align="center"
+ key="authenticity"
+ prop="authenticity"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.authenticity"
+ :min="0"
+ :max="20"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="涓�鍛ㄥ唴瀹屾垚(20)"
+ align="center"
+ key="weekFinish"
+ prop="weekFinish"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.weekFinish"
+ :min="0"
+ :max="20"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="瑙勮寖鎬�(10)"
+ align="center"
+ key="standard"
+ prop="standard"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.standard"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍙婃椂鎬�(10)"
+ align="center"
+ key="timeliness"
+ prop="timeliness"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.timeliness"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="瀹f暀鎯呭喌(10)"
+ align="center"
+ key="library"
+ prop="library"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.library"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鐜婊℃剰搴�(10)"
+ align="center"
+ key="environment"
+ prop="environment"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.environment"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍖荤敓婊℃剰搴�(10)"
+ align="center"
+ key="doctorSatisfaction"
+ prop="doctorSatisfaction"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.doctorSatisfaction"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎶ゅ+婊℃剰搴�(10)"
+ align="center"
+ key="nurseSatisfaction"
+ prop="nurseSatisfaction"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.nurseSatisfaction"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎬诲垎"
+ align="center"
+ key="total"
+ prop="total"
+ fixed="right"
+ >
+ <template slot-scope="scope">
+ <span>{{ calculateTotal(scope.row) }}</span>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="scoreDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="saveScores">淇濆瓨</el-button>
+ </div>
+ </el-dialog>
+ <!-- 娣诲姞鎴栦慨鏀瑰奖鍍忛殢璁垮璇濇 -->
+ <el-dialog
+ :title="amendtag ? '淇敼鎮h�呬俊鎭�' : '鏂板鎮h��'"
+ :visible.sync="Labelchange"
+ width="900px"
+ >
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="濮撳悕" width="100" prop="name">
+ <el-input
+ v-model="form.name"
+ placeholder="璇疯緭鍏ュ鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎬у埆" width="100" prop="sex">
+ <el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆">
+ <el-option
+ v-for="dict in sextype"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="骞撮緞" prop="age">
+ <el-input
+ v-model="form.age"
+ placeholder="璇疯緭鍏ュ勾榫�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row >
+ <el-col :span="8">
+ <el-form-item label="杩囨护鍖荤敓" width="100" prop="filterDrname">
+ <el-input
+ v-model="form.filterDrname"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+ <el-button @click="cancel">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ <!-- 淇敼鍙戦�佹椂闂村璇濇 -->
+ <el-dialog
+ title="鍙戦�佹椂闂磋缃�"
+ :visible.sync="modificationVisible"
+ width="45%"
+ >
+ <div style="margin-bottom: 20px; color: red">
+ 缁熶竴淇敼褰撳ぉ鏈彂閫佺殑浠诲姟鏃堕棿
+ </div>
+
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ ref="ruleForm"
+ label-width="120px"
+ class="demo-ruleForm"
+ >
+ <el-form-item label="鍙戦�佹棩鏈�">
+ <el-date-picker
+ v-model="ruleForm.value1"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ >
+ </el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="鏃堕棿娈�" prop="type">
+ <el-checkbox-group v-model="ruleForm.type">
+ <el-checkbox label="涓婂崍" name="type"></el-checkbox>
+ <el-checkbox label="涓嬪崍" name="type"></el-checkbox>
+ <el-checkbox label="鏅氫笂" name="type"></el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ <el-form-item label="涓婂崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value2"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="涓嬪崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value3"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="鏅氫笂鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value4"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="modificationVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="modificationVisible = false"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 鍐嶆闅忚 -->
+
+ </div>
+</template>
+
+<script>
+import {
+ delUser,
+ addUser,
+ updateUser,
+ resetUserPwd,
+ changeUserStatus,
+} from "@/api/system/user";
+import {
+ getTaskservelist,
+ buidegetTasklist,
+ addserviceSubtask,
+ query360PatInfo,
+ addsatisfaction,
+} from "@/api/AiCentre/index";
+import { alterpatient, particularpatient } from "@/api/patient/homepage";
+import Treeselect from "@riophae/vue-treeselect";
+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 },
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 鐢ㄦ埛琛ㄦ牸鏁版嵁
+ userList: null,
+ // 寮瑰嚭灞傛爣棰�
+ title: "鏂板褰卞儚闅忚",
+ // 鏄惁鏄剧ず淇敼銆佹坊鍔犲脊鍑哄眰
+ addalteropen: false,
+ // 淇敼鍙戦�佹椂闂村璇濇
+ modificationVisible: false,
+ // 閮ㄩ棬鍚嶇О
+ deptName: undefined,
+ // 榛樿瀵嗙爜
+ initPassword: undefined,
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ dateRangefs: [],
+ // 宀椾綅閫夐」
+ postOptions: [],
+ ruleForm: {
+ type: [],
+ },
+ zcform: {},
+ dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
+ inputVisible: false,
+ Labelchange: false,
+ ycvalue: "",
+ yfsvalue: "",
+ inputValue: "",
+ preachform: "",
+ previewVisible: false, //褰卞儚闅忚棰勮寮规
+ radio: "",
+ radios: [],
+ previewtype: 2, //棰勮褰卞儚闅忚绫诲瀷
+ total: 0, // 鎬绘潯鏁�
+ // 婊℃剰搴﹁皟鏌ユ暟鎹�
+ scoreDialogVisible: false,
+ selectedRows: [],
+
+ value: [],
+ list: [],
+
+ sourcetype: [
+ {
+ value: 1,
+ label: "绉戝",
+ children: [],
+ },
+ {
+ value: 2,
+ label: "鐥呭尯",
+ children: [],
+ },
+ {
+ value: 3,
+ label: "鍏ㄩ儴",
+ },
+ ],
+ loading: false,
+ cardlist: [
+ {
+ name: "鏈嶅姟鎬婚噺",
+ value: 0,
+ },
+ // {
+ // name: "鎮h�呰繃婊�",
+ // value: 0,
+ // },
+ {
+ name: "闇�闅忚",
+ value: 0,
+ },
+ {
+ name: "鍙戦�佸け璐�",
+ value: 0,
+ },
+ {
+ name: "寰呴殢璁�",
+ value: 0,
+ },
+ // {
+ // name: "宸插彂閫�",
+ // value: 0,
+ // },
+
+ // {
+ // name: "琛ㄥ崟宸插彂閫�",
+ // value: 0,
+ // },
+ ],
+ zcrules: {
+ date1: [
+ { required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
+ ],
+ resource: [
+ { required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
+ ],
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {
+ phonenumber: "",
+ totagid: "",
+ types: "",
+ nickName: "",
+ qystatus: "",
+ btstatus: "",
+ },
+ topicoptionssort: [
+ {
+ value: 0,
+ label: "鍑洪櫌鏃堕棿(姝e簭)",
+ },
+ {
+ value: 1,
+ label: "鍑洪櫌鏃堕棿(鍊掑簭)",
+ },
+ {
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+ },
+ ],
+ // 鏌ヨ鍙傛暟
+ topqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 6,
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
+ serviceType: 15,
+ searchscope: 3,
+ visitCount: 1,
+ scopetype: [],
+ leaveldeptcodes: [],
+ leavehospitaldistrictcodes: [],
+ },
+ propss: { multiple: true },
+ options: [],
+
+ topicoptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 1,
+ label: "琛ㄥ崟宸查鍙�",
+ },
+ {
+ value: 2,
+ label: "寰呴殢璁�",
+ },
+ {
+ value: 3,
+ label: "琛ㄥ崟宸插彂閫�",
+ },
+ {
+ value: 4,
+ label: "涓嶆墽琛�",
+ },
+ {
+ value: 5,
+ label: "鍙戦�佸け璐�",
+ },
+ {
+ value: 6,
+ label: "宸插畬鎴�",
+ },
+ ],
+ sextype: [
+ {
+ value: 1,
+ label: "鐢�",
+ },
+ {
+ value: 2,
+ label: "濂�",
+ },
+ ],
+ topicoptionsyj: [
+ {
+ value: 1,
+ label: "寮傚父",
+ },
+ {
+ value: 0,
+ label: "姝e父",
+ },
+ ],
+ url: "http://9.208.2.190:8090/smartor/serviceExternal/query360PatInfo",
+ postData: {
+ XiaoXiTou: {
+ FaSongFCSJC: "ZJHES",
+ FaSongJGID: localStorage.getItem("orgid"),
+ FaSongJGMC: localStorage.getItem("orgname"),
+ FaSongSJ: "2025-01-09聽17:29:36",
+ FaSongXTJC: "SUIFANGXT",
+ FaSongXTMC: "闅忚绯荤粺",
+ XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
+ XiaoXiLX: "SC_LC_360STCX",
+ XiaoXiMC: "360聽瑙嗗浘鏌ヨ",
+ ZuHuID: localStorage.getItem("ZuHuID"),
+ ZuHuMC: localStorage.getItem("orgname"),
+ },
+ YeWuXX: {
+ BingRenXX: {
+ ZhengJianHM: "",
+ ZhengJianLXDM: "01",
+ ZhengJianLXMC: "灞呮皯韬唤璇�",
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ },
+ YongHuXX: {
+ XiTongID: "SUIFANGXT",
+ XiTongMC: "闅忚绯荤粺",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ idp: "lyra",
+ },
+ },
+ },
+ amendtag: false,
+ errtype: "",
+ leavehospitaldistrictcode: "",
+ serviceState: [],
+ checkboxlist: [],
+ // 琛ㄥ崟鏍¢獙
+ rules: {},
+ };
+ },
+ watch: {},
+ created() {
+ this.serviceState = store.getters.serviceState;
+ this.checkboxlist = store.getters.checkboxlist;
+ this.errtype = this.$route.query.errtype;
+ this.leavehospitaldistrictcode =
+ this.$route.query.leavehospitaldistrictcode;
+ this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
+ return {
+ label: dept.deptName,
+ value: dept.deptCode,
+ };
+ });
+ this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
+ return {
+ label: dept.districtName,
+ value: dept.districtCode,
+ };
+ });
+ if (this.errtype) {
+ this.toleadExport(2);
+ } else {
+ this.getList(1);
+ }
+ this.getConfigKey("sys.user.initPassword").then((response) => {
+ this.initPassword = response.msg;
+ });
+ },
+ activated() {
+ this.getList(1);
+ },
+ methods: {
+ /** 鏌ヨ闅忚鏈嶅姟鍒楄〃 */
+ getList(refresh) {
+ // 榛樿鍏ㄩ儴
+
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ 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;
+ }
+ 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);
+ // this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[1].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[2].value = response.rows[0].fssb;
+ this.cardlist[3].value = response.rows[0].dsf;
+ // this.cardlist[4].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ affiliation() {
+ this.topqueryParams.managementDoctorCode= store.getters.hisUserId;
+
+ this.getList(1);
+ },
+ onthatday() {
+ this.topqueryParams.startSendDateTime = this.getCurrentDate();
+ this.topqueryParams.endSendDateTime = this.getCurrentDate();
+ this.getList(1);
+ },
+ getCurrentDate() {
+ const now = new Date();
+ return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
+ },
+ buidegetTasklist(type) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ // 鎺ュ彈寮傚父璺宠浆
+ if (this.errtype) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(
+ this.leavehospitaldistrictcode
+ );
+ }
+ let obj = {
+ pageNum: 1,
+ pageSize: 10,
+ leavehospitaldistrictcodes:
+ this.topqueryParams.leavehospitaldistrictcodes,
+ sendstates: [2, 3],
+ leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
+ };
+ buidegetTasklist(obj).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);
+ this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[2].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[3].value = response.rows[0].fssb;
+ this.cardlist[4].value = response.rows[0].dsf;
+ // this.cardlist[5].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ // 鏌ョ湅闂ㄨ瘖闅忚璇︽儏
+ Referencequestion(row) {
+ this.previewVisible = true;
+ },
+ // 娣诲姞寮规鎼滅储
+ remoteMethod(query) {
+ if (query !== "") {
+ this.loading = true;
+ setTimeout(() => {
+ this.loading = false;
+ this.options = this.list.filter((item) => {
+ return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
+ });
+ }, 200);
+ } else {
+ this.options = [];
+ }
+ },
+ // 褰卞儚闅忚鐘舵�佷慨鏀�
+ handleStatusChange(row) {
+ let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
+ this.$modal
+ .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵')
+ .then(function () {
+ return changeUserStatus(row.userId, row.status);
+ })
+ .then(() => {
+ this.$modal.msgSuccess(text + "鎴愬姛");
+ })
+ .catch(function () {
+ row.status = row.status === "0" ? "1" : "0";
+ });
+ },
+
+ // 琛ㄥ崟閲嶇疆
+ 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");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery(refresh) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ this.topqueryParams.pageNum = 1;
+ this.topqueryParams.startOutHospTime = this.dateRange[0];
+ this.topqueryParams.endOutHospTime = this.dateRange[1];
+ this.topqueryParams.startSendDateTime = this.dateRangefs[0];
+ this.topqueryParams.endSendDateTime = this.dateRangefs[1];
+ this.getList(refresh);
+ },
+ // 鎮h�呰寖鍥村鐞�
+ handleChange(value) {
+ let type = value[0];
+ let code = value.slice(-1)[0];
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
+ if (type == 1) {
+ this.topqueryParams.leaveldeptcodes.push(code);
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.searchscope = 1;
+ } else if (type == 2) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(code);
+ this.topqueryParams.leaveldeptcodes = [];
+ this.topqueryParams.searchscope = 2;
+ } else {
+ this.topqueryParams.searchscope = 3;
+ }
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.dateRangefs = [];
+ this.topqueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 6,
+ sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
+ serviceType: 15,
+ searchscope: 3,
+ visitCount: 1,
+ scopetype: [],
+ leaveldeptcodes: [],
+ leavehospitaldistrictcodes: [],
+ };
+ this.handleQuery(1);
+ },
+ handleSelectionChange(rows) {
+ this.selectedRows = rows.map((row) => {
+ // 鍒濆鍖栬瘎鍒嗗瓧娈�
+ return {
+ ...row,
+ authenticity: row.authenticity || 0,
+ weekFinish: row.weekFinish || 0,
+ standard: row.standard || 0,
+ timeliness: row.timeliness || 0,
+ library: row.library || 0,
+ environment: row.environment || 0,
+ doctorSatisfaction: row.doctorSatisfaction || 0,
+ nurseSatisfaction: row.nurseSatisfaction || 0,
+ };
+ });
+
+ if (this.selectedRows.length > 0) {
+ this.multiple = false;
+ } else {
+ this.multiple = true;
+ }
+ },
+
+ // 璁$畻鎬诲垎
+ calculateTotal(row) {
+ return (
+ (row.authenticity || 0) +
+ (row.weekFinish || 0) +
+ (row.standard || 0) +
+ (row.timeliness || 0) +
+ (row.library || 0) +
+ (row.environment || 0) +
+ (row.doctorSatisfaction || 0) +
+ (row.nurseSatisfaction || 0)
+ );
+ },
+
+ // 淇濆瓨璇勫垎
+ saveScores() {
+ this.selectedRows.forEach((item) => {
+ item.createBy = null;
+ item.patName = item.sendname;
+ item.hospitaldistrictname = item.leavehospitaldistrictname;
+ });
+ addsatisfaction(this.selectedRows).then((res) => {
+ if (res.code == 200) {
+ this.$message.success("璇勫垎淇濆瓨鎴愬姛");
+ this.scoreDialogVisible = false;
+ this.selectedRows=[];
+ this.$refs.userform.clearSelection()
+ } else {
+ this.$modal.msgWarning("璇勫垎淇濆瓨澶辫触");
+ this.scoreDialogVisible = false;
+ this.selectedRows=[];
+ this.$refs.userform.clearSelection()
+ }
+ });
+ // 杩欓噷鍙互娣诲姞淇濆瓨閫昏緫锛屽璋冪敤API淇濆瓨璇勫垎
+ },
+ //鍒犻櫎閫夐」
+ handleClose(tag) {
+ this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+ },
+ //瑙﹀彂鏂板杈撳叆
+ showInput() {
+ this.inputVisible = true;
+ this.$nextTick((_) => {
+ this.$refs.saveTagInput.$refs.input.focus();
+ });
+ },
+ //鑾峰彇澶卞幓鐒︾偣瑙﹀彂
+ handleInputConfirm() {
+ let inputValue = this.inputValue;
+ if (inputValue) {
+ this.dynamicTags.push(inputValue);
+ }
+ this.inputVisible = false;
+ this.inputValue = "";
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.$router.push({
+ path: "/followvisit/QuestionnaireTask",
+ query: {
+ type: 2,
+ serviceType: 15,
+ },
+ });
+ },
+ //鎮h��360璺宠浆
+ gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
+ this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
+
+ query360PatInfo(this.postData).then((res) => {
+ if (res.data.url) {
+ window.open(res.data.url, "_blank");
+ // this.linkUrl = res.data.url;
+ } else {
+ this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
+ }
+ });
+ },
+
+ /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
+ handleResetPwd(row) {
+ this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ closeOnClickModal: false,
+ inputPattern: /^.{5,20}$/,
+ inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+ })
+ .then(({ value }) => {
+ resetUserPwd(row.userId, value).then((response) => {
+ this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
+ });
+ })
+ .catch(() => {});
+ },
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.Labelchange = false;
+ this.reset();
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm: function () {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ this.form.isoperation = 2;
+ this.form.notrequiredFlag = 1;
+ alterpatient(this.form)
+ .then((response) => {
+ console.log(response);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鎮h�呰繃婊ゆ垚鍔�");
+ });
+
+ this.reset();
+ this.Labelchange = false;
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const userIds = row.userId || this.ids;
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
+ .then(function () {
+ return delUser(userIds);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴鍋滄
+ AllStop() {
+ this.$modal
+ .confirm("鏄惁鍋滄鍏ㄩ儴浠诲姟锛�")
+ .then(function () {
+ return console.log("鍋滄鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgWarning("鍋滄鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴寮�濮�
+ AllStarted() {
+ this.$modal
+ .confirm("鏄惁寮�鍚叏閮ㄤ换鍔★紵")
+ .then(function () {
+ return console.log("寮�鍚垚鍔�");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("寮�鍚垚鍔�");
+ })
+ .catch(() => {});
+ },
+ // 浠诲姟閲嶇疆
+ TaskReset() {
+ this.$modal
+ .confirm("鏄惁閲嶇疆閫変腑鐨勪换鍔¢」锛�")
+ .then(function () {
+ return console.log("閫変腑鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("閲嶇疆鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 璁剧疆鍙戦�佹椂闂�
+ Sendtimesetting() {
+ this.modificationVisible = true;
+ },
+ // 璺宠浆璇︽儏椤�
+ Seedetails(row) {
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
+ }
+ this.$router.push({
+ path: "/followvisit/record/detailpage/",
+ query: {
+ taskid: row.taskid,
+ patid: row.patid,
+ id: row.id,
+ Voicetype: type,
+ visitCount: this.topqueryParams.visitCount,
+ },
+ });
+ },
+
+ onSubmit() {},
+ // 鏆傚仠鏈嶅姟
+ handlestop(row) {
+ let objson = row;
+ this.$modal
+ .confirm(
+ '鏄惁纭鏆傚仠浠诲姟鍚嶇О涓�"' +
+ row.taskName +
+ '鎮h�呭悕绉颁负"' +
+ row.sendname +
+ '"鐨勬暟鎹」锛�'
+ )
+ .then(() => {
+ getTaskservelist({
+ patid: row.patid,
+ taskid: row.taskid,
+ }).then((res) => {
+ if (res.code == 200) {
+ objson.sendstate = 4;
+ objson.remark = "鏈嶅姟鏆傚仠";
+ Editsingletaskson(objson).then((res) => {
+ if (res.code) {
+ this.$modal.msgSuccess("璁板綍鎴愬姛");
+ this.getList(1);
+ }
+ });
+ }
+ });
+ })
+ .catch(() => {});
+ },
+ // 鎮h�呰繃婊よЕ鍙�
+ handleUpdate(row) {
+ particularpatient(row.patid).then((response) => {
+ this.form = response.data;
+ this.form.filterDrname = store.getters.nickName;
+ });
+ this.amendtag = true;
+ this.Labelchange = true;
+ },
+ // 渚挎嵎鎸夐挳
+ toleadExport(too) {
+ if (too == 1) {
+ this.topqueryParams.sendstate = 4;
+ this.topqueryParams.excep = null;
+ } else if (too == 2) {
+ this.topqueryParams.excep = 1;
+ }
+ this.handleQuery();
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.topqueryParams.pageNum = null;
+ this.topqueryParams.pageSize = null;
+ this.download(
+ "smartor/serviceSubtask/patItemExport",
+ {
+ ...this.topqueryParams,
+ },
+ `user_${new Date().getTime()}.xlsx`
+ );
+ },
+ // 寮傚父鍒楁覆鏌�
+ tableRowClassName({ row, rowIndex }) {
+ if (row.excep == 1) {
+ return "warning-row";
+ }
+ return "";
+ },
+
+ getCurrentTime() {
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ const seconds = String(now.getSeconds()).padStart(2, "0");
+
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-button--primary.is-plain {
+ color: #ffffff;
+ background: #409eff;
+ border-color: #4fabe9;
+}
+
+.document {
+ // width: 100px;
+ height: 50px;
+}
+::v-deep.el-table .warning-row {
+ background: #eec4c4;
+}
+
+.documentf {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.download {
+ text-align: center;
+
+ .el-upload__tip {
+ font-size: 23px;
+ }
+
+ .el-upload__text {
+ font-size: 23px;
+ }
+}
+
+.uploading {
+ margin-top: 20px;
+ margin: 20px;
+ padding: 30px;
+ background: #ffffff;
+ 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);
+}
+
+.el-tag + .el-tag {
+ margin-left: 10px;
+}
+
+.button-new-tag {
+ margin-left: 10px;
+ height: 32px;
+ line-height: 30px;
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.input-new-tag {
+ width: 90px;
+ margin-left: 10px;
+ vertical-align: bottom;
+}
+
+.drexamine {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 30px;
+ background: #daeaf5;
+
+ img {
+ width: 100px;
+ height: 100px;
+ }
+}
+
+.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);
+
+ .topic-dev {
+ margin-bottom: 25px;
+ font-size: 20px !important;
+
+ .dev-text {
+ margin-bottom: 10px;
+ }
+ }
+}
+::v-deep.leftvlue .el-card__body {
+ background: #F2F8FF;
+ color: #324A9B;
+}
+::v-deep.leftvlue .el-card__body:hover {
+ background: #3664D9;
+ color: #fff;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+::v-deep.errleftvlue .el-card__body {
+ background: #fdd0d7;
+}
+::v-deep.errleftvlue .el-card__body:hover {
+ background: #f88d96;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+
+::v-deep.ysfleftvlue .el-card__body {
+ background: #d0fdd8;
+}
+::v-deep.ysfleftvlue .el-card__body:hover {
+ background: #8df8a4;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+.button-bb {
+ font-weight: 500;
+ background-color: #2ba05c;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-xq {
+ font-weight: 500;
+ background-color: #409eff;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-sc {
+ font-weight: 500;
+ background-color: #b3a21f;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-zx {
+ background: #4fabe9;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+
+::v-deep.el-radio-group {
+ span {
+ font-size: 24px;
+ }
+}
+.purple-button {
+ background-color: #7e22ce;
+ border-color: #7e22ce;
+ color: #fff;
+}
+
+.purple-button:hover,
+.purple-button:focus {
+ background-color: #9333ea;
+ border-color: #9333ea;
+}
+
+.purple-button:active {
+ background-color: #6b21a8;
+ border-color: #6b21a8;
+}
+.button-textxga {
+ color: #de7897;
+}
+.purple-button.is-disabled {
+ background-color: #d8b4fe;
+ border-color: #d8b4fe;
+ opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
+}
+// 閫夐」瀛椾綋鏀惧ぇ
+// ::v-deep.el-checkbox-group {
+// span {
+// font-size: 24px;
+// }
+// }
+</style>
diff --git a/src/views/followvisit/discharge/ClickCall copy.vue b/src/views/followvisit/discharge/ClickCall copy.vue
new file mode 100644
index 0000000..bb2b2e0
--- /dev/null
+++ b/src/views/followvisit/discharge/ClickCall copy.vue
@@ -0,0 +1,1258 @@
+<template>
+ <div class="websocket-demo">
+ <div>
+ <h3>Websocket鎺ュ彛娴嬭瘯DEMO</h3>
+ <div class="config-area">
+ <div class="input-group">
+ <label>CTI_WS_URL</label>
+ <input
+ type="text"
+ v-model="config.cti_ws_url"
+ placeholder="ws://40.78.0.169:6688"
+ />
+
+ <label>鍧愬腑宸ュ彿</label>
+ <input type="text" v-model="config.seatname" placeholder="8000" />
+
+ <label>鍧愬腑鍒嗘満</label>
+ <input type="text" v-model="config.seatnum" placeholder="8000" />
+
+ <label>瀵嗙爜</label>
+ <input type="text" v-model="config.password" placeholder="123456" />
+ </div>
+
+ <div class="input-group">
+ <label>澶栫嚎鍙风爜</label>
+ <input type="text" v-model="config.phone" placeholder="10086" />
+
+ <label>UUID</label>
+ <input type="text" v-model="config.uuid" />
+
+ <label>鍏朵粬鍧愬腑</label>
+ <input type="text" v-model="config.other" placeholder="8001" />
+
+ <label>鎶�鑳界粍</label>
+ <input type="text" v-model="config.group" placeholder="a3" />
+
+ <label>澶栧懠鍙傛暟id</label>
+ <input type="text" v-model="config.paramid" placeholder="3" />
+ </div>
+ </div>
+
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <div class="button-area">
+ <!-- 绗竴琛屾寜閽� -->
+ <div class="button-row">
+ <button @click="seatlogin">绛惧叆</button>
+ <button @click="seatlogout">绛惧嚭</button>
+ <button @click="afk">绀哄繖</button>
+ <button @click="online">绀洪棽</button>
+ <button @click="pickup">浠g瓟</button>
+ </div>
+
+ <!-- 绗簩琛屾寜閽� -->
+ <div class="button-row">
+ <button @click="hangup">鎸傛満</button>
+ <button @click="callout">澶栧懠</button>
+ <button @click="transfer">閫氳瘽杞Щ</button>
+ <button @click="transferresume">閫氳瘽杞Щ鏀跺洖</button>
+ <button @click="hold">閫氳瘽淇濇寔</button>
+ <button @click="holdresume">閫氳瘽淇濇寔鏀跺洖</button>
+ <button @click="remove">閫氳瘽寮烘媶</button>
+ <button @click="insert">閫氳瘽寮烘彃</button>
+ <button @click="monitor">鐩戝惉</button>
+ <button @click="monitor_to_talk">鐩戝惉杞�氳瘽</button>
+ <button @click="monitor_end">鐩戝惉缁撴潫</button>
+ <button @click="choosecall">閫夋嫨</button>
+ <button @click="replacecall">浠f帴</button>
+ <button @click="three">涓夋柟閫氳瘽</button>
+ </div>
+
+ <!-- 绗笁琛屾寜閽� -->
+ <div class="button-row">
+ <button @click="handoff_ready">鍜ㄨ寮�濮�</button>
+ <button @click="handoff_call">鍜ㄨ鍛煎彨</button>
+ <button @click="handoff_resume">鍜ㄨ鏀跺洖</button>
+ <button @click="handoff_transfer">鍜ㄨ杞Щ</button>
+ <button @click="handoff_three">鍜ㄨ涓夋柟</button>
+ <button @click="record_start">寮�濮嬮�氳瘽褰曢煶</button>
+ <button @click="record_stop">鍋滄閫氳瘽褰曢煶</button>
+ </div>
+
+ <!-- 绗洓琛屾寜閽� -->
+ <div class="button-row">
+ <button @click="openseatlist">鎵撳紑鍧愬腑鐘舵��</button>
+ <button @click="closeseatlist">鍏抽棴鍧愬腑鐘舵��</button>
+ <button @click="openqueues">鎵撳紑闃熷垪淇℃伅</button>
+ <button @click="closequeues">鍏抽棴闃熷垪淇℃伅</button>
+ <button @click="opencalllist">鎵撳紑閫氳瘽淇℃伅</button>
+ <button @click="closecalllist">鍏抽棴閫氳瘽淇℃伅</button>
+ <button @click="openroutelist">鎵撳紑璺敱淇℃伅</button>
+ <button @click="closeroutelist">鍏抽棴璺敱淇℃伅</button>
+ </div>
+
+ <!-- 绗簲琛屾寜閽� -->
+ <div class="button-row">
+ <button @click="seatlist">鑾峰彇鍧愬腑淇℃伅</button>
+ <button @click="queues">鑾峰彇闃熷垪淇℃伅</button>
+ <button @click="calllist">鑾峰彇閫氳瘽淇℃伅</button>
+ <button @click="routelist">鑾峰彇璺敱淇℃伅</button>
+ <button @click="batch">鑾峰彇澶栧懠鍙傛暟淇℃伅</button>
+ <button @click="batch_start">寮�濮嬪鍛间换鍔�</button>
+ <button @click="batch_stop">鍋滄澶栧懠浠诲姟</button>
+ </div>
+ </div>
+
+ <!-- 鏃ュ織鏄剧ず鍖哄煙 -->
+ <h3>鍗忚鏃ュ織鍖�<button @click="testclear">娓呴櫎</button></h3>
+ <div id="msg" class="log-area">{{ logs }}</div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { CallsetState, CallgetList } from "@/api/AiCentre/index";
+
+export default {
+ name: "WebsocketDemo",
+
+ data() {
+ return {
+ config: {
+ cti_ws_url: "wss://9.208.2.190:8092/cal-api/",
+ seatname: "8000",
+ seatnum: "8000",
+ password: "123456",
+ phone: "10086",
+ uuid: "",
+ other: "8001",
+ group: "a3",
+ paramid: "3",
+ },
+ randomNum: "",
+ randomID: "",
+ logs: "",
+ ws: null,
+ isConnected: false,
+ };
+ },
+
+ mounted() {
+ this.CallgetList();
+ this.initializeWebSocket();
+ },
+
+ beforeUnmount() {
+ this.disconnectWebSocket();
+ },
+
+ methods: {
+ // 鍒濆鍖朩ebSocket杩炴帴
+ initializeWebSocket() {
+ try {
+ // 鏍规嵁褰撳墠椤甸潰鍗忚鑷姩閫夋嫨WS鍗忚
+ const isHttps = window.location.protocol === "https:";
+ this.config.cti_ws_url = isHttps
+ ? "wss://9.208.2.190:8092/cal-api/"
+ : "ws://40.78.0.169:6688";
+
+ if (typeof window.WebSocket === "undefined") {
+ this.addLog("閿欒: 娴忚鍣ㄤ笉鏀寔WebSocket");
+ return;
+ }
+
+ this.connectWebSocket();
+ } catch (error) {
+ this.addLog(`鍒濆鍖朩ebSocket閿欒: ${error.message}`);
+ // 灏濊瘯浣跨敤澶囩敤鍦板潃
+ this.config.cti_ws_url = "wss://9.208.2.190:8092/cal-api/";
+ setTimeout(() => this.connectWebSocket(), 2000);
+ }
+ },
+ // 鏌ヨ鍙敤鍒嗘満鍙�
+ async CallgetList() {
+ try {
+ const res = await CallgetList();
+ this.randomNum = res.data[0].tel;
+ this.randomID = res.data[0].id;
+ // 姝g‘璁剧疆 sipUri
+ this.config.seatname = randomNum;
+ this.config.seatnum = randomNum;
+ this.startCallsetState();
+ } catch (error) {
+ console.error("鑾峰彇搴у腑鍙峰け璐�:", error);
+ // this.updateStatus("failed", "鑾峰彇搴у腑鍙峰け璐�");
+ }
+ },
+ //浣跨敤搴у腑鍙�
+ async startCallsetState() {
+ try {
+ await CallsetState({ id: this.randomID, state: 1 });
+ console.log("搴у腑鍙风姸鎬佹洿鏂颁负浣跨敤涓�");
+ } catch (error) {
+ console.error("鏇存柊搴у腑鍙风姸鎬佸け璐�:", error);
+ }
+ },
+ //閲婃斁搴у腑鍙�
+ async overCallsetState() {
+ try {
+ if (this.randomID) {
+ await CallsetState({ id: this.randomID, state: 0 });
+ console.log("搴у腑鍙风姸鎬佹洿鏂颁负鍙敤");
+ }
+ } catch (error) {
+ console.error("閲婃斁搴у腑鍙峰け璐�:", error);
+ }
+ },
+ // 杩炴帴WebSocket
+ connectWebSocket() {
+ if (this.ws && this.ws.readyState === WebSocket.OPEN) {
+ this.addLog("WebSocket宸茶繛鎺�");
+ return;
+ }
+
+ try {
+ let wsUrl = this.config.cti_ws_url;
+ // 纭繚HTTPS椤甸潰浣跨敤WSS
+ if (
+ window.location.protocol === "https:" &&
+ wsUrl.startsWith("ws://")
+ ) {
+ wsUrl = wsUrl.replace("ws://", "wss://");
+ }
+
+ this.ws = new WebSocket(wsUrl);
+
+ this.ws.onopen = () => {
+ this.isConnected = true;
+ this.addLog("WebSocket杩炴帴鎴愬姛");
+ };
+
+ this.ws.onmessage = (event) => {
+ this.handleWebSocketMessage(event);
+ };
+
+ this.ws.onclose = (event) => {
+ this.isConnected = false;
+ this.addLog(`WebSocket杩炴帴鍏抽棴: ${event.code} ${event.reason}`);
+ // 鑷姩閲嶈繛
+ setTimeout(() => this.connectWebSocket(), 3000);
+ };
+
+ this.ws.onerror = (error) => {
+ this.addLog(`WebSocket閿欒: ${error.message}`);
+ // 灏濊瘯澶囩敤URL
+ if (!wsUrl.includes("9.208.2.190")) {
+ this.config.cti_ws_url = "wss://9.208.2.190:8092/cal-api/";
+ setTimeout(() => this.connectWebSocket(), 3000);
+ }
+ };
+ } catch (error) {
+ this.addLog(`杩炴帴WebSocket澶辫触: ${error.message}`);
+ // 灏濊瘯澶囩敤URL
+ this.config.cti_ws_url = "wss://9.208.2.190:8092/cal-api/";
+ setTimeout(() => this.connectWebSocket(), 3000);
+ }
+ },
+
+ // 澶勭悊WebSocket娑堟伅
+ handleWebSocketMessage(event) {
+ const reader = new FileReader();
+ reader.onloadend = (e) => {
+ const message = reader.result;
+ this.addLog(`鏀跺埌娑堟伅: ${message}`);
+
+ try {
+ const obj = JSON.parse(message);
+
+ // 澶勭悊蹇冭烦鍖�
+ if (obj.cmd === "system" && obj.action === "keepalive") {
+ this.keepalive(obj.seatname, obj.seatnum);
+ }
+
+ // 鑷姩璁剧疆UUID
+ if (obj.cmd === "control" && obj.action === "tp_callin") {
+ this.config.uuid = obj.uuid;
+ this.addLog(`鑷姩璁剧疆UUID: ${obj.uuid}`);
+ }
+ } catch (error) {
+ this.addLog(`娑堟伅瑙f瀽閿欒: ${error.message}`);
+ }
+ };
+ reader.readAsText(event.data);
+ },
+
+ // 鏂紑WebSocket杩炴帴
+ disconnectWebSocket() {
+ if (this.ws) {
+ this.ws.close();
+ this.ws = null;
+ this.isConnected = false;
+ this.addLog("WebSocket宸叉柇寮�");
+ }
+ },
+
+ // 鍙戦�乄ebSocket娑堟伅
+ sendWebSocketMessage(message) {
+ if (!this.isConnected || !this.ws) {
+ this.addLog("閿欒: WebSocket鏈繛鎺�");
+ return false;
+ }
+
+ try {
+ const messageStr =
+ typeof message === "string" ? message : JSON.stringify(message);
+ this.ws.send(messageStr);
+ this.addLog(`鍙戦�佹秷鎭�: ${messageStr}`);
+ return true;
+ } catch (error) {
+ this.addLog(`鍙戦�佹秷鎭け璐�: ${error.message}`);
+ return false;
+ }
+ },
+
+ // 楠岃瘉鍙傛暟
+ validateParams(params, requiredFields) {
+ for (const field of requiredFields) {
+ if (!params[field] || params[field].toString().trim() === "") {
+ this.addLog(`閿欒: ${field} 涓嶈兘涓虹┖`);
+ return false;
+ }
+ }
+ return true;
+ },
+
+ // ==================== WebSocket.js 鍔熻兘鏁村悎 ====================
+
+ // 绛惧叆
+ seatlogin() {
+ const { seatname, seatnum, password, cti_ws_url } = this.config;
+
+ if (
+ !this.validateParams({ seatname, seatnum }, ["seatname", "seatnum"])
+ ) {
+ return;
+ }
+
+ // 閲嶆柊杩炴帴WebSocket锛堝師js鏂囦欢涓殑閫昏緫锛�
+ this.connectWebSocket();
+ setTimeout(() => {
+ const protocol = {
+ cmd: "system",
+ action: "seatlogin",
+ seatname: seatname,
+ seatnum: seatnum,
+ password: password,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ }, 1000);
+ },
+
+ // 绛惧嚭
+ seatlogout() {
+ const { seatname, seatnum } = this.config;
+
+ if (
+ !this.validateParams({ seatname, seatnum }, ["seatname", "seatnum"])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "seatlogout",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ this.ws.close();
+ },
+
+ // 绀哄繖
+ afk() {
+ const { seatname, seatnum } = this.config;
+
+ if (
+ !this.validateParams({ seatname, seatnum }, ["seatname", "seatnum"])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "afk",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 绀洪棽
+ online() {
+ const { seatname, seatnum } = this.config;
+
+ if (
+ !this.validateParams({ seatname, seatnum }, ["seatname", "seatnum"])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "online",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 浠g瓟
+ pickup() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "pickup",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎸傛満
+ hangup() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "hangup",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 澶栧懠
+ callout() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "callout",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽杞Щ
+ transfer() {
+ const { seatname, seatnum, phone, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, phone, uuid }, [
+ "seatnum",
+ "phone",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "transfer",
+ uuid: uuid,
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽杞Щ鏀跺洖
+ transferresume() {
+ const { seatname, seatnum, phone, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, phone, uuid }, [
+ "seatnum",
+ "phone",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "transferresume",
+ uuid: uuid,
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽淇濇寔
+ hold() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "hold",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽淇濇寔鏀跺洖
+ holdresume() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "holdresume",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽寮烘媶
+ remove() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "remove",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽寮烘彃
+ insert() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "insert",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鐩戝惉
+ monitor() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "monitor",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鐩戝惉杞�氳瘽
+ monitor_to_talk() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "monitor_to_talk",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鐩戝惉缁撴潫
+ monitor_end() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "monitor_end",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫夋嫨閫氳瘽
+ choosecall() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "choosecall",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 浠f帴
+ replacecall() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "replacecall",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 涓夋柟閫氳瘽
+ three() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "three",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ寮�濮�
+ handoff_ready() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_ready",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ鍛煎彨
+ handoff_call() {
+ const { seatname, seatnum, other, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, other, uuid }, [
+ "seatnum",
+ "other",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_call",
+ uuid: uuid,
+ phone: other,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ鏀跺洖
+ handoff_resume() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_resume",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ杞Щ
+ handoff_transfer() {
+ const { seatname, seatnum, other, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, other, uuid }, [
+ "seatnum",
+ "other",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_transfer",
+ uuid: uuid,
+ phone: other,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ涓夋柟
+ handoff_three() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_three",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 寮�濮嬮�氳瘽褰曢煶
+ record_start() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "record_start",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍋滄閫氳瘽褰曢煶
+ record_stop() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "record_stop",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑鍧愬腑鐘舵��
+ openseatlist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "openseatlist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴鍧愬腑鐘舵��
+ closeseatlist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closeseatlist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑闃熷垪淇℃伅
+ openqueues() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "openqueues",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴闃熷垪淇℃伅
+ closequeues() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closequeues",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑閫氳瘽淇℃伅
+ opencalllist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "opencalllist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴閫氳瘽淇℃伅
+ closecalllist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closecalllist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑璺敱淇℃伅
+ openroutelist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "openroutelist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴璺敱淇℃伅
+ closeroutelist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closeroutelist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇鍧愬腑淇℃伅
+ seatlist() {
+ const { group } = this.config;
+
+ if (!this.validateParams({ group }, ["group"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "seatlist",
+ group: group,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇闃熷垪淇℃伅
+ queues() {
+ const protocol = {
+ cmd: "status",
+ action: "queues",
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇閫氳瘽淇℃伅
+ calllist() {
+ const protocol = {
+ cmd: "status",
+ action: "calllist",
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇璺敱淇℃伅
+ routelist() {
+ const protocol = {
+ cmd: "status",
+ action: "routelist",
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇澶栧懠鍙傛暟淇℃伅
+ batch() {
+ const { paramid } = this.config;
+
+ if (!this.validateParams({ paramid }, ["paramid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "batch",
+ paramid: paramid,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 寮�濮嬪鍛间换鍔�
+ batch_start() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "batch_start",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍋滄澶栧懠浠诲姟
+ batch_stop() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "batch_stop",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 蹇冭烦鍖�
+ keepalive(seatname, seatnum) {
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "keepalive",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 娓呴櫎鏃ュ織
+ testclear() {
+ this.logs = "";
+ this.addLog("鏃ュ織宸叉竻闄�");
+ },
+
+ // 娣诲姞鏃ュ織
+ addLog(message) {
+ const timestamp = new Date().toLocaleTimeString();
+ this.logs += `[${timestamp}] ${message}\n`;
+
+ // 闄愬埗鏃ュ織闀垮害锛岄槻姝㈠唴瀛樻孩鍑�
+ const logLines = this.logs.split("\n");
+ if (logLines.length > 100) {
+ this.logs = logLines.slice(-50).join("\n");
+ }
+ },
+ },
+};
+</script>
+
+<style scoped>
+.websocket-demo {
+ font-family: Arial, sans-serif;
+ padding: 20px;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+.config-area {
+ margin-bottom: 20px;
+ padding: 15px;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ background-color: #f9f9f9;
+}
+
+.input-group {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 10px;
+ margin-bottom: 10px;
+}
+
+.input-group label {
+ font-weight: bold;
+ min-width: 80px;
+}
+
+.input-group input {
+ padding: 5px 10px;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ width: 120px;
+}
+
+.button-area {
+ margin-bottom: 20px;
+}
+
+.button-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 5px;
+ margin-bottom: 10px;
+}
+
+.button-row button {
+ padding: 8px 15px;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ background-color: #f0f0f0;
+ cursor: pointer;
+ transition: background-color 0.3s;
+ font-size: 12px;
+}
+
+.button-row button:hover {
+ background-color: #e0e0e0;
+}
+
+.button-row button:active {
+ background-color: #d0d0d0;
+ transform: translateY(1px);
+}
+
+.log-area {
+ height: 300px;
+ overflow-y: auto;
+ border: 1px solid #ccc;
+ padding: 10px;
+ background-color: #f5f5f5;
+ white-space: pre-wrap;
+ font-family: "Courier New", monospace;
+ font-size: 12px;
+ line-height: 1.4;
+}
+
+h3 {
+ color: #333;
+ border-bottom: 2px solid #eee;
+ padding-bottom: 10px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+h3 button {
+ padding: 5px 10px;
+ font-size: 12px;
+ background-color: #f0f0f0;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ cursor: pointer;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .websocket-demo {
+ padding: 10px;
+ }
+
+ .input-group {
+ flex-direction: column;
+ align-items: flex-start;
+ }
+
+ .input-group input {
+ width: 100%;
+ }
+
+ .button-row {
+ flex-direction: column;
+ }
+
+ .button-row button {
+ width: 100%;
+ margin-bottom: 5px;
+ }
+}
+</style>
diff --git a/src/views/followvisit/discharge/ClickCall.vue b/src/views/followvisit/discharge/ClickCall.vue
new file mode 100644
index 0000000..446b130
--- /dev/null
+++ b/src/views/followvisit/discharge/ClickCall.vue
@@ -0,0 +1,1502 @@
+<template>
+ <div class="websocket-demo">
+ <div>
+ <h3>Websocket鍛煎彨涓績鎺ュ彛</h3>
+ <div class="config-area">
+ <div class="status-indicator">
+ <span :class="['status-dot', connectionStatus]"></span>
+ 杩炴帴鐘舵��: {{ connectionText }}
+ <span :class="['status-dot', seatStatus]"></span>
+ 搴у腑鐘舵��: {{ seatStatusText }}
+ </div>
+
+ <div class="input-group">
+ <label>CTI_WS_URL</label>
+ <input
+ type="text"
+ v-model="config.cti_ws_url"
+ placeholder="wss://your-server.com"
+ />
+
+ <label>鍧愬腑宸ュ彿</label>
+ <input
+ type="text"
+ v-model="config.seatname"
+ :placeholder="randomNum"
+ />
+
+ <label>鍧愬腑鍒嗘満</label>
+ <input
+ type="text"
+ v-model="config.seatnum"
+ :placeholder="randomNum"
+ />
+
+ <label>瀵嗙爜</label>
+ <input type="text" v-model="config.password" placeholder="123456" />
+ </div>
+
+ <div class="input-group">
+ <label>澶栫嚎鍙风爜</label>
+ <input
+ type="text"
+ v-model="customerPhone"
+ placeholder="璇疯緭鍏ョ數璇濆彿鐮�"
+ />
+
+ <label>鎶�鑳界粍</label>
+ <input type="text" v-model="config.group" placeholder="a3" />
+ </div>
+ </div>
+
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <div class="button-area">
+ <div class="button-row">
+ <button
+ @click="handleSeatLogin"
+ :disabled="!isConnected || isSeatLoggedIn"
+ >
+ 绛惧叆
+ </button>
+ <button @click="handleSeatLogout" :disabled="!isSeatLoggedIn">
+ 绛惧嚭
+ </button>
+ <button @click="callout" :disabled="!isSeatLoggedIn">澶栧懠</button>
+ <button @click="hangup" :disabled="!isSeatLoggedIn">鎸傛満</button>
+ </div>
+
+ <div class="button-row">
+ <button @click="afk" :disabled="!isSeatLoggedIn">绀哄繖</button>
+ <button @click="online" :disabled="!isSeatLoggedIn">绀洪棽</button>
+ <button @click="hold" :disabled="!isSeatLoggedIn">淇濇寔</button>
+ <button @click="holdresume" :disabled="!isSeatLoggedIn">
+ 鍙栨秷淇濇寔
+ </button>
+ </div>
+ </div>
+
+ <!-- 鏃ュ織鏄剧ず鍖哄煙 -->
+ <h3>鍗忚鏃ュ織鍖� <button @click="testclear">娓呴櫎</button></h3>
+ <div class="log-area">{{ logs }}</div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { CallsetState, CallgetList } from "@/api/AiCentre/index";
+
+export default {
+ name: "WebsocketDemo",
+ emits: ["status-change", "call-status", "error"],
+
+ props: {
+ customerPhone: {
+ type: String,
+ default: "",
+ },
+ autoLogin: {
+ type: Boolean,
+ default: true,
+ },
+ },
+
+ data() {
+ return {
+ config: {
+ cti_ws_url: "",
+ seatname: "",
+ seatnum: "",
+ password: "123456",
+ phone: "",
+ uuid: "",
+ other: "8001",
+ group: "a3",
+ paramid: "3",
+ },
+ randomNum: "",
+ randomID: "",
+ logs: "",
+ ws: null,
+ isConnected: false,
+ isSeatLoggedIn: false,
+ currentCallStatus: "idle", // idle, calling, connected
+ seatResourceAcquired: false,
+ reconnectAttempts: 0,
+ maxReconnectAttempts: 5,
+ heartbeatTimer: null,
+ };
+ },
+
+ computed: {
+ connectionStatus() {
+ return this.isConnected ? "connected" : "disconnected";
+ },
+ connectionText() {
+ return this.isConnected ? "宸茶繛鎺�" : "鏈繛鎺�";
+ },
+ seatStatus() {
+ return this.isSeatLoggedIn ? "logged-in" : "logged-out";
+ },
+ seatStatusText() {
+ return this.isSeatLoggedIn ? "宸茬鍏�" : "鏈鍏�";
+ },
+ },
+
+ watch: {
+ customerPhone(newVal) {
+ this.config.phone = newVal;
+ },
+ isSeatLoggedIn(newVal) {
+ this.$emit("status-change", {
+ isLoggedIn: newVal,
+ seatNumber: this.config.seatnum,
+ status: newVal ? "ready" : "offline",
+ });
+ },
+ },
+
+ async mounted() {
+ await this.initializeSeatResource();
+ this.initializeWebSocket();
+ },
+
+ beforeUnmount() {
+ this.cleanup();
+ },
+
+ methods: {
+ // 鍒濆鍖朩ebSocket杩炴帴
+ initializeWebSocket() {
+ try {
+ const isHttps = window.location.protocol === "https:";
+ this.config.cti_ws_url = isHttps
+ ? "wss://9.208.2.190:8092/cal-api/"
+ : "ws://40.78.0.169:6688";
+
+ if (typeof window.WebSocket === "undefined") {
+ this.addLog("閿欒: 娴忚鍣ㄤ笉鏀寔WebSocket");
+ return;
+ }
+
+ this.connectWebSocket();
+ } catch (error) {
+ this.addLog(`鍒濆鍖朩ebSocket閿欒: ${error.message}`);
+ setTimeout(() => this.connectWebSocket(), 2000);
+ }
+ },
+ // 鍒濆鍖栧骇甯彿璧勬簮
+ async initializeSeatResource() {
+ try {
+ const res = await CallgetList();
+ if (res.data && res.data.length > 0) {
+ // this.randomNum = res.data[0].tel;
+ // this.randomID = res.data[0].id;
+ this.randomNum = 8000;
+ this.randomID = 8000;
+ // 璁剧疆榛樿搴у腑鍙�
+ this.config.seatname = this.randomNum;
+ this.config.seatnum = this.randomNum;
+
+ // 绔嬪嵆鍗犵敤搴у腑鍙疯祫婧�
+ await this.startCallsetState();
+ this.seatResourceAcquired = true;
+ this.addLog(`搴у腑鍙疯祫婧愯幏鍙栨垚鍔�: ${this.randomNum}`);
+ }
+ } catch (error) {
+ console.error("鑾峰彇搴у腑鍙峰け璐�:", error);
+ this.addLog("閿欒: 鑾峰彇搴у腑鍙疯祫婧愬け璐�");
+ this.$emit("error", { type: "seat_acquisition_failed", error });
+ }
+ },
+ // 鍗犵敤搴у腑鍙�
+ async startCallsetState() {
+ try {
+ await CallsetState({ id: this.randomID, state: 1 });
+ this.addLog("搴у腑鍙风姸鎬佹洿鏂颁负浣跨敤涓�");
+ } catch (error) {
+ console.error("鏇存柊搴у腑鍙风姸鎬佸け璐�:", error);
+ throw error;
+ }
+ },
+
+ // 閲婃斁搴у腑鍙�
+ async releaseSeatResource() {
+ if (this.seatResourceAcquired && this.randomID) {
+ try {
+ await CallsetState({ id: this.randomID, state: 0 });
+ this.addLog("搴у腑鍙疯祫婧愬凡閲婃斁");
+ this.seatResourceAcquired = false;
+ } catch (error) {
+ console.error("閲婃斁搴у腑鍙峰け璐�:", error);
+ }
+ }
+ },
+ // 杩炴帴WebSocket
+ // 杩炴帴WebSocket
+ connectWebSocket() {
+ if (this.ws && this.ws.readyState === WebSocket.OPEN) {
+ return;
+ }
+
+ if (this.reconnectAttempts >= this.maxReconnectAttempts) {
+ this.addLog("閿欒: 杈惧埌鏈�澶ч噸杩炴鏁帮紝鍋滄閲嶈繛");
+ return;
+ }
+
+ try {
+ let wsUrl = this.config.cti_ws_url;
+ if (
+ window.location.protocol === "https:" &&
+ wsUrl.startsWith("ws://")
+ ) {
+ wsUrl = wsUrl.replace("ws://", "wss://");
+ }
+
+ this.ws = new WebSocket(wsUrl);
+
+ this.ws.onopen = () => {
+ this.isConnected = true;
+ this.reconnectAttempts = 0;
+ this.addLog("WebSocket杩炴帴鎴愬姛");
+ this.startHeartbeat();
+
+ // 杩炴帴鎴愬姛鍚庤嚜鍔ㄧ鍏�
+ if (this.autoLogin && this.seatResourceAcquired) {
+ setTimeout(() => this.handleSeatLogin(), 500);
+ }
+ };
+
+ this.ws.onmessage = (event) => {
+ this.handleWebSocketMessage(event);
+ };
+
+ this.ws.onclose = (event) => {
+ this.isConnected = false;
+ this.isSeatLoggedIn = false;
+ this.stopHeartbeat();
+ this.addLog(`WebSocket杩炴帴鍏抽棴: ${event.code} ${event.reason}`);
+
+ // 鑷姩閲嶈繛
+ if (this.reconnectAttempts < this.maxReconnectAttempts) {
+ this.reconnectAttempts++;
+ setTimeout(() => this.connectWebSocket(), 3000);
+ }
+ };
+
+ this.ws.onerror = (error) => {
+ this.addLog(`WebSocket閿欒: ${error.message}`);
+ };
+ } catch (error) {
+ this.addLog(`杩炴帴WebSocket澶辫触: ${error.message}`);
+ setTimeout(() => this.connectWebSocket(), 3000);
+ }
+ },
+
+ // 澶勭悊WebSocket娑堟伅
+ handleWebSocketMessage(event) {
+ try {
+ // 妫�鏌ユ暟鎹被鍨嬶細鍙兘鏄瓧绗︿覆鎴朆lob
+ if (event.data instanceof Blob) {
+ // 澶勭悊浜岃繘鍒舵暟鎹紙Blob锛�
+ const reader = new FileReader();
+ reader.onload = () => {
+ try {
+ const textData = reader.result;
+ this.addLog(`鏀跺埌Blob娑堟伅: ${textData}`);
+ this.processWebSocketData(textData);
+ } catch (error) {
+ this.addLog(`Blob鏁版嵁澶勭悊閿欒: ${error.message}`);
+ }
+ };
+ reader.readAsText(event.data);
+ } else if (typeof event.data === "string") {
+ // 鐩存帴澶勭悊鏂囨湰鏁版嵁
+ this.addLog(`鏀跺埌鏂囨湰娑堟伅: ${event.data}`);
+ this.processWebSocketData(event.data);
+ } else {
+ this.addLog(`鏈煡鏁版嵁绫诲瀷: ${typeof event.data}`);
+ }
+ } catch (error) {
+ this.addLog(`娑堟伅澶勭悊閿欒: ${error.message}`);
+ }
+ },
+ // 涓撻棬澶勭悊瑙f瀽鍚庣殑WebSocket鏁版嵁
+ processWebSocketData(messageText) {
+ console.log(messageText,'娑堟伅1');
+
+ try {
+ const obj = JSON.parse(messageText);
+ console.log(obj,'娑堟伅2');
+
+ // 澶勭悊蹇冭烦鍖�
+ if (obj.cmd === "system" && obj.action === "keepalive") {
+ this.keepalive(obj.seatname, obj.seatnum);
+ }
+ // 澶勭悊鎸傛柇
+ if (obj.action === "calloutend") {
+ this.hangup();
+ }
+
+ // 澶勭悊绛惧叆鍝嶅簲
+ if (obj.cmd === "system" && obj.action === "seatlogin") {
+ this.isSeatLoggedIn = true;
+ this.addLog("搴у腑绛惧叆鎴愬姛");
+ this.$emit("status-change", {
+ isLoggedIn: true,
+ seatNumber: this.config.seatnum,
+ status: "ready",
+ });
+ }
+
+ // 澶勭悊绛惧嚭鍝嶅簲
+ if (obj.cmd === "system" && obj.action === "seatlogout") {
+ this.isSeatLoggedIn = false;
+ this.addLog("搴у腑绛惧嚭鎴愬姛");
+ this.$emit("status-change", {
+ isLoggedIn: false,
+ status: "offline",
+ });
+ }
+
+ // 鑷姩璁剧疆UUID锛堟潵鐢典簨浠讹級
+ if (obj.cmd === "control" && obj.action === "tp_callin") {
+ this.config.uuid = obj.uuid;
+ this.addLog(`鑷姩璁剧疆UUID: ${obj.uuid}`);
+ this.$emit("call-status", {
+ status: "incoming",
+ uuid: obj.uuid,
+ phone: obj.phone || "鏈煡鍙风爜",
+ });
+ }
+
+ // 澶勭悊澶栧懠鍝嶅簲
+ if (obj.cmd === "control" && obj.action === "callout") {
+ this.$emit("call-status", {
+ status: obj.status || "calling",
+ uuid: obj.uuid,
+ phone: this.config.phone,
+ });
+ }
+
+ // 澶勭悊鎸傛満鍝嶅簲
+ if (obj.cmd === "control" && obj.action === "hangup") {
+ this.$emit("call-status", {
+ status: "idle",
+ uuid: obj.uuid,
+ });
+ }
+
+ // 澶勭悊閫氳瘽鐘舵�佸彉鍖�
+ if (obj.cmd === "control" && obj.status) {
+ this.handleCallStatusChange(obj);
+ }
+ } catch (error) {
+ this.addLog(`JSON瑙f瀽閿欒: ${error.message}, 鍘熷鏁版嵁: ${messageText}`);
+ }
+ },
+ // 澶勭悊鍛煎彨鐘舵�佸彉鍖�
+ handleCallStatusChange(obj) {
+ const statusMap = {
+ ringing: "鎸搩涓�",
+ connected: "閫氳瘽涓�",
+ held: "宸蹭繚鎸�",
+ ended: "閫氳瘽缁撴潫",
+ };
+
+ this.addLog(`閫氳瘽鐘舵��: ${statusMap[obj.status] || obj.status}`);
+ this.$emit("call-status", {
+ status: obj.status,
+ uuid: obj.uuid,
+ phone: obj.phone || this.config.phone,
+ });
+ },
+ // 寮�濮嬪績璺虫娴�
+ startHeartbeat() {
+ this.heartbeatTimer = setInterval(() => {
+ if (this.isConnected && this.isSeatLoggedIn) {
+ this.keepalive(this.config.seatname, this.config.seatnum);
+ }
+ }, 30000); // 30绉掑績璺�
+ },
+
+ // 鍋滄蹇冭烦妫�娴�
+ stopHeartbeat() {
+ if (this.heartbeatTimer) {
+ clearInterval(this.heartbeatTimer);
+ this.heartbeatTimer = null;
+ }
+ },
+ // 搴у腑绛惧叆
+ async handleSeatLogin() {
+ if (!this.seatResourceAcquired) {
+ this.addLog("閿欒: 鏈幏鍙栧骇甯彿璧勬簮锛屾棤娉曠鍏�");
+ return;
+ }
+
+ const { seatname, seatnum, password } = this.config;
+ if (!seatname || !seatnum) {
+ this.addLog("閿欒: 搴у腑宸ュ彿鍜屽垎鏈哄彿涓嶈兘涓虹┖");
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "seatlogin",
+ seatname: seatname,
+ seatnum: seatnum,
+ password: password,
+ timestamp: Date.now(),
+ };
+
+ this.sendWebSocketMessage(protocol);
+ },
+ // 搴у腑绛惧嚭
+ async handleSeatLogout() {
+ const { seatname, seatnum } = this.config;
+
+ const protocol = {
+ cmd: "system",
+ action: "seatlogout",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+
+ if (this.sendWebSocketMessage(protocol)) {
+ this.isSeatLoggedIn = false;
+ // 寤惰繜閲婃斁璧勬簮锛岀‘淇濈鍑哄畬鎴�
+ setTimeout(() => this.releaseSeatResource(), 1000);
+ }
+ },
+ // 鏂紑WebSocket杩炴帴
+ disconnectWebSocket() {
+ if (this.ws) {
+ this.ws.close();
+ this.ws = null;
+ this.isConnected = false;
+ this.addLog("WebSocket宸叉柇寮�");
+ }
+ },
+
+ // 鍙戦�乄ebSocket娑堟伅
+ sendWebSocketMessage(message) {
+ if (!this.isConnected || !this.ws) {
+ this.addLog("閿欒: WebSocket鏈繛鎺�");
+ return false;
+ }
+
+ try {
+ const messageStr =
+ typeof message === "string" ? message : JSON.stringify(message);
+ this.ws.send(messageStr);
+ this.addLog(`鍙戦�佹秷鎭�: ${messageStr}`);
+ return true;
+ } catch (error) {
+ this.addLog(`鍙戦�佹秷鎭け璐�: ${error.message}`);
+ return false;
+ }
+ },
+
+ // 楠岃瘉鍙傛暟
+ validateParams(params, requiredFields) {
+ for (const field of requiredFields) {
+ if (!params[field] || params[field].toString().trim() === "") {
+ this.addLog(`閿欒: ${field} 涓嶈兘涓虹┖`);
+ return false;
+ }
+ }
+ return true;
+ },
+
+ // ==================== WebSocket.js 鍔熻兘鏁村悎 ====================
+
+ // 绛惧叆
+ seatlogin() {
+ const { seatname, seatnum, password, cti_ws_url } = this.config;
+
+ if (
+ !this.validateParams({ seatname, seatnum }, ["seatname", "seatnum"])
+ ) {
+ return;
+ }
+
+ // 閲嶆柊杩炴帴WebSocket锛堝師js鏂囦欢涓殑閫昏緫锛�
+ this.connectWebSocket();
+ setTimeout(() => {
+ const protocol = {
+ cmd: "system",
+ action: "seatlogin",
+ seatname: seatname,
+ seatnum: seatnum,
+ password: password,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ }, 1000);
+ },
+
+ // 绛惧嚭
+ seatlogout() {
+ const { seatname, seatnum } = this.config;
+
+ if (
+ !this.validateParams({ seatname, seatnum }, ["seatname", "seatnum"])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "seatlogout",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ this.ws.close();
+ },
+
+ // 绀哄繖
+ afk() {
+ const protocol = {
+ cmd: "system",
+ action: "afk",
+ seatname: this.config.seatname,
+ seatnum: this.config.seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 绀洪棽
+ online() {
+ const protocol = {
+ cmd: "system",
+ action: "online",
+ seatname: this.config.seatname,
+ seatnum: this.config.seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 浠g瓟
+ pickup() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "pickup",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎸傛満
+ hangup() {
+ const protocol = {
+ cmd: "control",
+ action: "hangup",
+ seatname: this.config.seatname,
+ seatnum: this.config.seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 澶栧懠鎿嶄綔
+ async callout(phoneNumber = null) {
+ const phone = phoneNumber || this.customerPhone || this.config.phone;
+ if (!phone) {
+ this.addLog("閿欒: 琚彨鍙风爜涓嶈兘涓虹┖");
+ this.$emit("error", { type: "phone_number_required" });
+ return;
+ }
+
+ if (!this.isSeatLoggedIn) {
+ this.addLog("閿欒: 搴у腑鏈鍏ワ紝鏃犳硶澶栧懠");
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "callout",
+ phone: phone,
+ seatname: this.config.seatname,
+ seatnum: this.config.seatnum,
+ timestamp: Date.now(),
+ };
+
+ this.sendWebSocketMessage(protocol);
+ this.$emit("call-status", { status: "calling", phone });
+ },
+ // 娓呯悊璧勬簮
+ cleanup() {
+ this.stopHeartbeat();
+ if (this.ws) {
+ this.ws.close();
+ this.ws = null;
+ }
+ this.releaseSeatResource();
+ },
+ // 閫氳瘽杞Щ
+ transfer() {
+ const { seatname, seatnum, phone, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, phone, uuid }, [
+ "seatnum",
+ "phone",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "transfer",
+ uuid: uuid,
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽杞Щ鏀跺洖
+ transferresume() {
+ const { seatname, seatnum, phone, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, phone, uuid }, [
+ "seatnum",
+ "phone",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "transferresume",
+ uuid: uuid,
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽淇濇寔
+ hold() {
+ const protocol = {
+ cmd: "control",
+ action: "hold",
+ uuid: this.config.uuid,
+ seatname: this.config.seatname,
+ seatnum: this.config.seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽淇濇寔鏀跺洖
+ holdresume() {
+ const protocol = {
+ cmd: "control",
+ action: "holdresume",
+ uuid: this.config.uuid,
+ seatname: this.config.seatname,
+ seatnum: this.config.seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽寮烘媶
+ remove() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "remove",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫氳瘽寮烘彃
+ insert() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "insert",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鐩戝惉
+ monitor() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "monitor",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鐩戝惉杞�氳瘽
+ monitor_to_talk() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "monitor_to_talk",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鐩戝惉缁撴潫
+ monitor_end() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "monitor_end",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 閫夋嫨閫氳瘽
+ choosecall() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "choosecall",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 浠f帴
+ replacecall() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "replacecall",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 涓夋柟閫氳瘽
+ three() {
+ const { seatname, seatnum, phone } = this.config;
+
+ if (!this.validateParams({ seatnum, phone }, ["seatnum", "phone"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "three",
+ phone: phone,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ寮�濮�
+ handoff_ready() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_ready",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ鍛煎彨
+ handoff_call() {
+ const { seatname, seatnum, other, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, other, uuid }, [
+ "seatnum",
+ "other",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_call",
+ uuid: uuid,
+ phone: other,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ鏀跺洖
+ handoff_resume() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_resume",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ杞Щ
+ handoff_transfer() {
+ const { seatname, seatnum, other, uuid } = this.config;
+
+ if (
+ !this.validateParams({ seatnum, other, uuid }, [
+ "seatnum",
+ "other",
+ "uuid",
+ ])
+ ) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_transfer",
+ uuid: uuid,
+ phone: other,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍜ㄨ涓夋柟
+ handoff_three() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "handoff_three",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 寮�濮嬮�氳瘽褰曢煶
+ record_start() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "record_start",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍋滄閫氳瘽褰曢煶
+ record_stop() {
+ const { seatname, seatnum, uuid } = this.config;
+
+ if (!this.validateParams({ seatnum, uuid }, ["seatnum", "uuid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "control",
+ action: "record_stop",
+ uuid: uuid,
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑鍧愬腑鐘舵��
+ openseatlist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "openseatlist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴鍧愬腑鐘舵��
+ closeseatlist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closeseatlist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑闃熷垪淇℃伅
+ openqueues() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "openqueues",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴闃熷垪淇℃伅
+ closequeues() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closequeues",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑閫氳瘽淇℃伅
+ opencalllist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "opencalllist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴閫氳瘽淇℃伅
+ closecalllist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closecalllist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鎵撳紑璺敱淇℃伅
+ openroutelist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "openroutelist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍏抽棴璺敱淇℃伅
+ closeroutelist() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "closeroutelist",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇鍧愬腑淇℃伅
+ seatlist() {
+ const { group } = this.config;
+
+ if (!this.validateParams({ group }, ["group"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "seatlist",
+ group: group,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇闃熷垪淇℃伅
+ queues() {
+ const protocol = {
+ cmd: "status",
+ action: "queues",
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇閫氳瘽淇℃伅
+ calllist() {
+ const protocol = {
+ cmd: "status",
+ action: "calllist",
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇璺敱淇℃伅
+ routelist() {
+ const protocol = {
+ cmd: "status",
+ action: "routelist",
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鑾峰彇澶栧懠鍙傛暟淇℃伅
+ batch() {
+ const { paramid } = this.config;
+
+ if (!this.validateParams({ paramid }, ["paramid"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "status",
+ action: "batch",
+ paramid: paramid,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 寮�濮嬪鍛间换鍔�
+ batch_start() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "batch_start",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 鍋滄澶栧懠浠诲姟
+ batch_stop() {
+ const { seatname, seatnum } = this.config;
+
+ if (!this.validateParams({ seatnum }, ["seatnum"])) {
+ return;
+ }
+
+ const protocol = {
+ cmd: "system",
+ action: "batch_stop",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ keepalive(seatname, seatnum) {
+ const protocol = {
+ cmd: "system",
+ action: "keepalive",
+ seatname: seatname,
+ seatnum: seatnum,
+ timestamp: Date.now(),
+ };
+ this.sendWebSocketMessage(protocol);
+ },
+
+ // 娓呴櫎鏃ュ織
+ testclear() {
+ this.logs = "";
+ this.addLog("鏃ュ織宸叉竻闄�");
+ },
+
+ // 娣诲姞鏃ュ織
+ addLog(message) {
+ const timestamp = new Date().toLocaleTimeString();
+ this.logs += `[${timestamp}] ${message}\n`;
+
+ // 闄愬埗鏃ュ織闀垮害锛岄槻姝㈠唴瀛樻孩鍑�
+ const logLines = this.logs.split("\n");
+ if (logLines.length > 100) {
+ this.logs = logLines.slice(-50).join("\n");
+ }
+ },
+ },
+};
+</script>
+
+<style scoped>
+.status-indicator {
+ margin-bottom: 15px;
+ padding: 10px;
+ background: #f5f5f5;
+ border-radius: 4px;
+ display: flex;
+ align-items: center;
+ gap: 10px;
+}
+
+.status-dot {
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ display: inline-block;
+}
+
+.status-dot.connected {
+ background-color: #52c41a;
+}
+
+.status-dot.disconnected {
+ background-color: #f5222d;
+}
+
+.status-dot.logged-in {
+ background-color: #1890ff;
+}
+
+.status-dot.logged-out {
+ background-color: #d9d9d9;
+}
+
+.button-row button:disabled {
+ opacity: 0.6;
+ cursor: not-allowed;
+}
+
+.config-area {
+ margin-bottom: 20px;
+}
+
+.input-group {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+ margin-bottom: 10px;
+}
+
+.input-group label {
+ font-weight: bold;
+ min-width: 80px;
+}
+
+.input-group input {
+ padding: 5px 10px;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ width: 120px;
+}
+
+.button-area {
+ margin-bottom: 20px;
+}
+
+.button-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 5px;
+ margin-bottom: 10px;
+}
+
+.log-area {
+ height: 200px;
+ overflow-y: auto;
+ border: 1px solid #ccc;
+ padding: 10px;
+ background: #f5f5f5;
+ white-space: pre-wrap;
+ font-family: monospace;
+}
+.websocket-demo {
+ font-family: Arial, sans-serif;
+ padding: 20px;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+.config-area {
+ margin-bottom: 20px;
+ padding: 15px;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ background-color: #f9f9f9;
+}
+
+.input-group {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: 10px;
+ margin-bottom: 10px;
+}
+
+.input-group label {
+ font-weight: bold;
+ min-width: 80px;
+}
+
+.input-group input {
+ padding: 5px 10px;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ width: 120px;
+}
+
+.button-area {
+ margin-bottom: 20px;
+}
+
+.button-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 5px;
+ margin-bottom: 10px;
+}
+
+.button-row button {
+ padding: 8px 15px;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ background-color: #f0f0f0;
+ cursor: pointer;
+ transition: background-color 0.3s;
+ font-size: 12px;
+}
+
+.button-row button:hover {
+ background-color: #e0e0e0;
+}
+
+.button-row button:active {
+ background-color: #d0d0d0;
+ transform: translateY(1px);
+}
+
+.log-area {
+ height: 300px;
+ overflow-y: auto;
+ border: 1px solid #ccc;
+ padding: 10px;
+ background-color: #f5f5f5;
+ white-space: pre-wrap;
+ font-family: "Courier New", monospace;
+ font-size: 12px;
+ line-height: 1.4;
+}
+
+h3 {
+ color: #333;
+ border-bottom: 2px solid #eee;
+ padding-bottom: 10px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+h3 button {
+ padding: 5px 10px;
+ font-size: 12px;
+ background-color: #f0f0f0;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ cursor: pointer;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .websocket-demo {
+ padding: 10px;
+ }
+
+ .input-group {
+ flex-direction: column;
+ align-items: flex-start;
+ }
+
+ .input-group input {
+ width: 100%;
+ }
+
+ .button-row {
+ flex-direction: column;
+ }
+
+ .button-row button {
+ width: 100%;
+ margin-bottom: 5px;
+ }
+}
+</style>
diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index f6c83ed..5380922 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -120,7 +120,29 @@
placeholder="璇疯緭鍏ラ殢璁夸汉鍛�"
></el-input>
</el-form-item>
-
+ <el-form-item label="涓绘不鍖荤敓" prop="drname">
+ <el-input
+ v-model="topqueryParams.drname"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="缁忕鍖荤敓" prop="managementDoctor">
+ <el-input
+ v-model="topqueryParams.managementDoctor"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鏃ユ湡闄愬埗" prop="status">
+ <el-select v-model="endOut" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in endOuts"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
<el-form-item label="鎮h�呰寖鍥�" prop="status">
<el-cascader
v-model="topqueryParams.scopetype"
@@ -169,7 +191,7 @@
</el-form>
<el-divider></el-divider>
<el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<div class="documentf">
<div class="document">
<el-button
@@ -182,11 +204,10 @@
>
</div>
</div>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<el-button
type="primary"
- plain
icon="el-icon-plus"
size="medium"
@click="handleAdd"
@@ -238,11 +259,7 @@
<el-col :span="1.5">
<div class="documentf">
<div class="document">
- <el-button
- type="primary"
- plain
- size="medium"
- @click="affiliation()"
+ <el-button type="primary" size="medium" @click="affiliation()"
>鏈汉鎵�灞炴湇鍔�</el-button
>
</div>
@@ -252,7 +269,7 @@
<div class="documentf">
<div class="document">
<el-button type="success" size="medium" @click="onthatday()"
- >褰撴棩鏈嶅姟</el-button
+ >浠婃棩鏈嶅姟</el-button
>
</div>
</div>
@@ -391,6 +408,7 @@
prop="drname"
/>
<el-table-column
+ v-if="orgname != '涓芥按甯備腑鍖婚櫌'"
label="闅忚浜哄憳"
align="center"
key="updateBy"
@@ -456,16 +474,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>
@@ -828,7 +836,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
{
@@ -876,6 +884,7 @@
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
},
+ orgname: "",
propss: { multiple: true },
options: [],
@@ -924,6 +933,10 @@
value: 1,
label: "寮傚父",
},
+ {
+ value: 2,
+ label: "璀﹀憡",
+ },
{
value: 0,
label: "姝e父",
@@ -955,8 +968,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -977,6 +990,7 @@
this.serviceState = store.getters.serviceState;
this.checkboxlist = store.getters.checkboxlist;
this.errtype = this.$route.query.errtype;
+ this.orgname = localStorage.getItem("orgname");
this.leavehospitaldistrictcode =
this.$route.query.leavehospitaldistrictcode;
this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
@@ -1011,6 +1025,21 @@
methods: {
/** 鏌ヨ闂ㄨ瘖闅忚鏈嶅姟鍒楄〃 */
getList(refresh) {
+ // 榛樿鍏ㄩ儴
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ // if (this.endOut == 0) {
+ // this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
+ // this.getEndOfDay()
+ // );
+ // } else {
+ // this.topqueryParams.endSendDateTime = null;
+ // }
// 鎺ュ彈寮傚父璺宠浆
if (this.errtype) {
this.topqueryParams.leavehospitaldistrictcodes.push(
@@ -1062,6 +1091,22 @@
});
this.total = response.total;
});
+ },
+ // 鏃堕棿
+ getEndOfDay() {
+ const date = new Date(); // 鍒涘缓涓�涓〃绀哄綋鍓嶆椂闂寸殑Date瀵硅薄
+ date.setHours(23, 59, 59, 0); // 灏嗘椂闂磋缃负23:59:59.000
+ return date;
+ },
+ formatDateToYYYYMMDDHHMMSS(date) {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0"); // 鏈堜唤琛ラ浂
+ const day = String(date.getDate()).padStart(2, "0"); // 鏃ユ湡琛ラ浂
+ const hours = String(date.getHours()).padStart(2, "0");
+ const minutes = String(date.getMinutes()).padStart(2, "0");
+ const seconds = String(date.getSeconds()).padStart(2, "0");
+
+ return `${year}-${month}-${day}`;
},
affiliation() {
this.topqueryParams.managementDoctorCode = store.getters.hisUserId;
@@ -1233,11 +1278,64 @@
};
this.handleQuery(1);
},
- // 澶氶�夋閫変腑鏁版嵁
- handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.userId);
- this.single = selection.length != 1;
- this.multiple = !selection.length;
+ handleSelectionChange(rows) {
+ this.selectedRows = rows.map((row) => {
+ // 鍒濆鍖栬瘎鍒嗗瓧娈�
+ return {
+ ...row,
+ authenticity: row.authenticity || 0,
+ weekFinish: row.weekFinish || 0,
+ standard: row.standard || 0,
+ timeliness: row.timeliness || 0,
+ library: row.library || 0,
+ environment: row.environment || 0,
+ doctorSatisfaction: row.doctorSatisfaction || 0,
+ nurseSatisfaction: row.nurseSatisfaction || 0,
+ };
+ });
+
+ if (this.selectedRows.length > 0) {
+ this.multiple = false;
+ } else {
+ this.multiple = true;
+ }
+ },
+
+ // 璁$畻鎬诲垎
+ calculateTotal(row) {
+ return (
+ (row.authenticity || 0) +
+ (row.weekFinish || 0) +
+ (row.standard || 0) +
+ (row.timeliness || 0) +
+ (row.library || 0) +
+ (row.environment || 0) +
+ (row.doctorSatisfaction || 0) +
+ (row.nurseSatisfaction || 0)
+ );
+ },
+
+ // 淇濆瓨璇勫垎
+ saveScores() {
+ this.selectedRows.forEach((item) => {
+ item.createBy = null;
+ item.patName = item.sendname;
+ item.hospitaldistrictname = item.leavehospitaldistrictname;
+ });
+ addsatisfaction(this.selectedRows).then((res) => {
+ if (res.code == 200) {
+ this.$message.success("璇勫垎淇濆瓨鎴愬姛");
+ this.scoreDialogVisible = false;
+ this.selectedRows = [];
+ this.$refs.userform.clearSelection();
+ } else {
+ this.$modal.msgWarning("璇勫垎淇濆瓨澶辫触");
+ this.scoreDialogVisible = false;
+ this.selectedRows = [];
+ this.$refs.userform.clearSelection();
+ }
+ });
+ // 杩欓噷鍙互娣诲姞淇濆瓨閫昏緫锛屽璋冪敤API淇濆瓨璇勫垎
},
//鍒犻櫎閫夐」
handleClose(tag) {
@@ -1271,11 +1369,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning("360鍔熻兘鏆傛湭寮�閫�");
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1388,11 +1485,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1430,6 +1525,8 @@
tableRowClassName({ row, rowIndex }) {
if (row.excep == 1) {
return "warning-row";
+ } else if (row.excep == 2) {
+ return "remind-row";
}
return "";
},
@@ -1450,6 +1547,9 @@
}
::v-deep.el-table .warning-row {
background: #eec4c4;
+}
+::v-deep.el-table .remind-row {
+ background: #fcf5aa;
}
.documentf {
@@ -1530,10 +1630,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #f2f8ff;
+ color: #324a9b;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664d9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
@@ -1548,7 +1650,7 @@
background: #d0fdd8;
}
::v-deep.ysfleftvlue .el-card__body:hover {
- background: #8df8a4;
+ background: #0abc54;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
.button-bb {
@@ -1573,7 +1675,7 @@
color: #ffffff;
}
.button-zx {
- background: #4fabe9;
+ background: #324a9b;
padding: 5px;
border-radius: 1px;
color: #ffffff;
@@ -1584,7 +1686,30 @@
font-size: 24px;
}
}
+.purple-button {
+ background-color: #7e22ce;
+ border-color: #7e22ce;
+ color: #fff;
+}
+.purple-button:hover,
+.purple-button:focus {
+ background-color: #9333ea;
+ border-color: #9333ea;
+}
+
+.purple-button:active {
+ background-color: #6b21a8;
+ border-color: #6b21a8;
+}
+.button-textxga {
+ color: #de7897;
+}
+.purple-button.is-disabled {
+ background-color: #d8b4fe;
+ border-color: #d8b4fe;
+ opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
+}
// 閫夐」瀛椾綋鏀惧ぇ
// ::v-deep.el-checkbox-group {
// span {
diff --git a/src/views/followvisit/discharge/js/cti-manager.js b/src/views/followvisit/discharge/js/cti-manager.js
new file mode 100644
index 0000000..91773a8
--- /dev/null
+++ b/src/views/followvisit/discharge/js/cti-manager.js
@@ -0,0 +1,202 @@
+// cti-manager.js - 绉婚櫎prototype渚濊禆鐨勭増鏈�
+(function(root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ define([], factory);
+ } else if (typeof module === 'object' && module.exports) {
+ module.exports = factory();
+ } else {
+ root.CTIManager = factory();
+ }
+}(this, function() {
+ 'use strict';
+
+ // 绠�鍗曠殑瀵硅薄鎵╁睍鏂规硶
+ function extend(target, source) {
+ if (!source) return target;
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) {
+ target[key] = source[key];
+ }
+ }
+ return target;
+ }
+
+ function CTIManager(options) {
+ var defaultOptions = {
+ autoReconnect: true,
+ maxReconnectAttempts: 5,
+ debug: true
+ };
+
+ this.options = extend({}, defaultOptions);
+ this.options = extend(this.options, options || {});
+
+ this.websocket = null;
+ this.isLoggedIn = false;
+ this.currentCall = null;
+ this.seatInfo = {};
+ this.eventHandlers = {};
+
+ this.init();
+ }
+
+ CTIManager.prototype = {
+ init: function() {
+ this.setupEventHandlers();
+ },
+
+ setupEventHandlers: function() {
+ // 榛樿浜嬩欢澶勭悊鍣�
+ this.on('login_success', this.handleLoginSuccess.bind(this));
+ this.on('login_failed', this.handleLoginFailed.bind(this));
+ this.on('call_start', this.handleCallStart.bind(this));
+ this.on('call_end', this.handleCallEnd.bind(this));
+ this.on('seat_status_change', this.handleSeatStatusChange.bind(this));
+ },
+
+ connect: function(url) {
+ try {
+ // 纭繚CTIWebSocket宸插叏灞�鍙敤
+ if (typeof CTIWebSocket === 'undefined') {
+ this.trigger('error', { type: 'dependency_error', message: 'CTIWebSocket鏈畾涔�' });
+ return false;
+ }
+
+ this.websocket = new CTIWebSocket({
+ url: url,
+ debug: this.options.debug,
+ reconnectInterval: 3000,
+ maxReconnectAttempts: this.options.maxReconnectAttempts
+ });
+
+ this.bindWebSocketEvents();
+ return true;
+ } catch (error) {
+ this.trigger('error', { type: 'connection_error', error: error });
+ return false;
+ }
+ },
+
+ bindWebSocketEvents: function() {
+ var self = this;
+
+ this.websocket.on('open', function() {
+ self.trigger('connected');
+ });
+
+ this.websocket.on('close', function() {
+ self.isLoggedIn = false;
+ self.trigger('disconnected');
+ });
+
+ this.websocket.on('error', function(error) {
+ self.trigger('error', error);
+ });
+
+ // 鐩戝惉鐗瑰畾鐨凜TI娑堟伅
+ this.websocket.on('cti:system:keepalive', function(data) {
+ self.trigger('keepalive', data);
+ });
+
+ this.websocket.on('cti:control:tp_callin', function(data) {
+ self.trigger('call_incoming', data);
+ if (data.uuid) {
+ self.trigger('uuid_received', data.uuid);
+ }
+ });
+ },
+
+ // 鐧诲綍鐩稿叧鏂规硶
+ login: function(seatname, seatnum, password) {
+ if (!this.websocket || !this.websocket.isConnected) {
+ this.trigger('error', { type: 'not_connected', message: 'WebSocket鏈繛鎺�' });
+ return false;
+ }
+
+ return this.websocket.seatlogin(seatname, seatnum, password);
+ },
+
+ logout: function() {
+ if (this.websocket && this.isLoggedIn) {
+ var result = this.websocket.seatlogout(this.seatInfo.seatname, this.seatInfo.seatnum);
+ if (result) {
+ this.isLoggedIn = false;
+ this.seatInfo = {};
+ }
+ return result;
+ }
+ return false;
+ },
+
+ // 鍛煎彨鎺у埗鏂规硶
+ makeCall: function(phoneNumber) {
+ if (!this.isLoggedIn) {
+ this.trigger('error', { type: 'not_logged_in', message: '鍧愬腑鏈櫥褰�' });
+ return false;
+ }
+
+ return this.websocket.callout(this.seatInfo.seatname, this.seatInfo.seatnum, phoneNumber);
+ },
+
+ hangupCall: function(uuid) {
+ if (!this.isLoggedIn) {
+ return false;
+ }
+
+ var callUuid = uuid || (this.currentCall ? this.currentCall.uuid : '');
+ return this.websocket.hangup(this.seatInfo.seatname, this.seatInfo.seatnum, callUuid);
+ },
+
+ // 鍧愬腑鐘舵�佹帶鍒�
+ setAfk: function() {
+ if (this.isLoggedIn) {
+ return this.websocket.afk(this.seatInfo.seatname, this.seatInfo.seatnum);
+ }
+ return false;
+ },
+
+ setOnline: function() {
+ if (this.isLoggedIn) {
+ return this.websocket.online(this.seatInfo.seatname, this.seatInfo.seatnum);
+ }
+ return false;
+ },
+
+ // 浜嬩欢绠$悊
+ on: function(event, handler) {
+ if (!this.eventHandlers[event]) {
+ this.eventHandlers[event] = [];
+ }
+ this.eventHandlers[event].push(handler);
+ },
+
+ off: function(event, handler) {
+ if (this.eventHandlers[event]) {
+ var index = this.eventHandlers[event].indexOf(handler);
+ if (index > -1) {
+ this.eventHandlers[event].splice(index, 1);
+ }
+ }
+ },
+
+ trigger: function(event, data) {
+ if (this.eventHandlers[event]) {
+ this.eventHandlers[event].forEach(function(handler) {
+ if (typeof handler === 'function') {
+ handler(data);
+ }
+ });
+ }
+ },
+
+ destroy: function() {
+ if (this.websocket) {
+ this.websocket.close();
+ this.websocket = null;
+ }
+ this.eventHandlers = {};
+ }
+ };
+
+ return CTIManager;
+}));
diff --git a/src/views/followvisit/discharge/js/json2.js b/src/views/followvisit/discharge/js/json2.js
new file mode 100644
index 0000000..d4720c0
--- /dev/null
+++ b/src/views/followvisit/discharge/js/json2.js
@@ -0,0 +1,506 @@
+// json2.js
+// 2016-05-01
+// Public Domain.
+// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+// See http://www.JSON.org/js.html
+// This code should be minified before deployment.
+// See http://javascript.crockford.com/jsmin.html
+
+// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+// NOT CONTROL.
+
+// This file creates a global JSON object containing two methods: stringify
+// and parse. This file is provides the ES5 JSON capability to ES3 systems.
+// If a project might run on IE8 or earlier, then this file should be included.
+// This file does nothing on ES5 systems.
+
+// JSON.stringify(value, replacer, space)
+// value any JavaScript value, usually an object or array.
+// replacer an optional parameter that determines how object
+// values are stringified for objects. It can be a
+// function or an array of strings.
+// space an optional parameter that specifies the indentation
+// of nested structures. If it is omitted, the text will
+// be packed without extra whitespace. If it is a number,
+// it will specify the number of spaces to indent at each
+// level. If it is a string (such as "\t" or " "),
+// it contains the characters used to indent at each level.
+// This method produces a JSON text from a JavaScript value.
+// When an object value is found, if the object contains a toJSON
+// method, its toJSON method will be called and the result will be
+// stringified. A toJSON method does not serialize: it returns the
+// value represented by the name/value pair that should be serialized,
+// or undefined if nothing should be serialized. The toJSON method
+// will be passed the key associated with the value, and this will be
+// bound to the value.
+
+// For example, this would serialize Dates as ISO strings.
+
+// Date.prototype.toJSON = function (key) {
+// function f(n) {
+// // Format integers to have at least two digits.
+// return (n < 10)
+// ? "0" + n
+// : n;
+// }
+// return this.getUTCFullYear() + "-" +
+// f(this.getUTCMonth() + 1) + "-" +
+// f(this.getUTCDate()) + "T" +
+// f(this.getUTCHours()) + ":" +
+// f(this.getUTCMinutes()) + ":" +
+// f(this.getUTCSeconds()) + "Z";
+// };
+
+// You can provide an optional replacer method. It will be passed the
+// key and value of each member, with this bound to the containing
+// object. The value that is returned from your method will be
+// serialized. If your method returns undefined, then the member will
+// be excluded from the serialization.
+
+// If the replacer parameter is an array of strings, then it will be
+// used to select the members to be serialized. It filters the results
+// such that only members with keys listed in the replacer array are
+// stringified.
+
+// Values that do not have JSON representations, such as undefined or
+// functions, will not be serialized. Such values in objects will be
+// dropped; in arrays they will be replaced with null. You can use
+// a replacer function to replace those with JSON values.
+
+// JSON.stringify(undefined) returns undefined.
+
+// The optional space parameter produces a stringification of the
+// value that is filled with line breaks and indentation to make it
+// easier to read.
+
+// If the space parameter is a non-empty string, then that string will
+// be used for indentation. If the space parameter is a number, then
+// the indentation will be that many spaces.
+
+// Example:
+
+// text = JSON.stringify(["e", {pluribus: "unum"}]);
+// // text is '["e",{"pluribus":"unum"}]'
+
+// text = JSON.stringify(["e", {pluribus: "unum"}], null, "\t");
+// // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
+
+// text = JSON.stringify([new Date()], function (key, value) {
+// return this[key] instanceof Date
+// ? "Date(" + this[key] + ")"
+// : value;
+// });
+// // text is '["Date(---current time---)"]'
+
+// JSON.parse(text, reviver)
+// This method parses a JSON text to produce an object or array.
+// It can throw a SyntaxError exception.
+
+// The optional reviver parameter is a function that can filter and
+// transform the results. It receives each of the keys and values,
+// and its return value is used instead of the original value.
+// If it returns what it received, then the structure is not modified.
+// If it returns undefined then the member is deleted.
+
+// Example:
+
+// // Parse the text. Values that look like ISO date strings will
+// // be converted to Date objects.
+
+// myData = JSON.parse(text, function (key, value) {
+// var a;
+// if (typeof value === "string") {
+// a =
+// /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+// if (a) {
+// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+// +a[5], +a[6]));
+// }
+// }
+// return value;
+// });
+
+// myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
+// var d;
+// if (typeof value === "string" &&
+// value.slice(0, 5) === "Date(" &&
+// value.slice(-1) === ")") {
+// d = new Date(value.slice(5, -1));
+// if (d) {
+// return d;
+// }
+// }
+// return value;
+// });
+
+// This is a reference implementation. You are free to copy, modify, or
+// redistribute.
+
+/*jslint
+ eval, for, this
+*/
+
+/*property
+ JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
+ lastIndex, length, parse, prototype, push, replace, slice, stringify,
+ test, toJSON, toString, valueOf
+*/
+
+
+// Create a JSON object only if one does not already exist. We create the
+// methods in a closure to avoid creating global variables.
+
+if (typeof JSON !== "object") {
+ JSON = {};
+}
+
+(function () {
+ "use strict";
+
+ var rx_one = /^[\],:{}\s]*$/;
+ var rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;
+ var rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
+ var rx_four = /(?:^|:|,)(?:\s*\[)+/g;
+ var rx_escapable = /[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+ var rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10
+ ? "0" + n
+ : n;
+ }
+
+ function this_value() {
+ return this.valueOf();
+ }
+
+ if (typeof Date.prototype.toJSON !== "function") {
+
+ Date.prototype.toJSON = function () {
+
+ return isFinite(this.valueOf())
+ ? this.getUTCFullYear() + "-" +
+ f(this.getUTCMonth() + 1) + "-" +
+ f(this.getUTCDate()) + "T" +
+ f(this.getUTCHours()) + ":" +
+ f(this.getUTCMinutes()) + ":" +
+ f(this.getUTCSeconds()) + "Z"
+ : null;
+ };
+
+ Boolean.prototype.toJSON = this_value;
+ Number.prototype.toJSON = this_value;
+ String.prototype.toJSON = this_value;
+ }
+
+ var gap;
+ var indent;
+ var meta;
+ var rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ rx_escapable.lastIndex = 0;
+ return rx_escapable.test(string)
+ ? "\"" + string.replace(rx_escapable, function (a) {
+ var c = meta[a];
+ return typeof c === "string"
+ ? c
+ : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + "\""
+ : "\"" + string + "\"";
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i; // The loop counter.
+ var k; // The member key.
+ var v; // The member value.
+ var length;
+ var mind = gap;
+ var partial;
+ var value = holder[key];
+
+// If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value && typeof value === "object" &&
+ typeof value.toJSON === "function") {
+ value = value.toJSON(key);
+ }
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === "function") {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case "string":
+ return quote(value);
+
+ case "number":
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value)
+ ? String(value)
+ : "null";
+
+ case "boolean":
+ case "null":
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce "null". The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is "object", we might be dealing with an object or an array or
+// null.
+
+ case "object":
+
+// Due to a specification blunder in ECMAScript, typeof null is "object",
+// so watch out for that case.
+
+ if (!value) {
+ return "null";
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === "[object Array]") {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || "null";
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0
+ ? "[]"
+ : gap
+ ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]"
+ : "[" + partial.join(",") + "]";
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === "object") {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ if (typeof rep[i] === "string") {
+ k = rep[i];
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (
+ gap
+ ? ": "
+ : ":"
+ ) + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (
+ gap
+ ? ": "
+ : ":"
+ ) + v);
+ }
+ }
+ }
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0
+ ? "{}"
+ : gap
+ ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}"
+ : "{" + partial.join(",") + "}";
+ gap = mind;
+ return v;
+ }
+ }
+
+// If the JSON object does not yet have a stringify method, give it one.
+
+ if (typeof JSON.stringify !== "function") {
+ meta = { // table of character substitutions
+ "\b": "\\b",
+ "\t": "\\t",
+ "\n": "\\n",
+ "\f": "\\f",
+ "\r": "\\r",
+ "\"": "\\\"",
+ "\\": "\\\\"
+ };
+ JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = "";
+ indent = "";
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === "number") {
+ for (i = 0; i < space; i += 1) {
+ indent += " ";
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === "string") {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== "function" &&
+ (typeof replacer !== "object" ||
+ typeof replacer.length !== "number")) {
+ throw new Error("JSON.stringify");
+ }
+
+// Make a fake root object containing our value under the key of "".
+// Return the result of stringifying the value.
+
+ return str("", {"": value});
+ };
+ }
+
+
+// If the JSON object does not yet have a parse method, give it one.
+
+ if (typeof JSON.parse !== "function") {
+ JSON.parse = function (text, reviver) {
+
+// The parse method takes a text and an optional reviver function, and returns
+// a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+// The walk method is used to recursively walk the resulting structure so
+// that modifications can be made.
+
+ var k;
+ var v;
+ var value = holder[key];
+ if (value && typeof value === "object") {
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+// Parsing happens in four stages. In the first stage, we replace certain
+// Unicode characters with escape sequences. JavaScript handles many characters
+// incorrectly, either silently deleting them, or treating them as line endings.
+
+ text = String(text);
+ rx_dangerous.lastIndex = 0;
+ if (rx_dangerous.test(text)) {
+ text = text.replace(rx_dangerous, function (a) {
+ return "\\u" +
+ ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+// In the second stage, we run the text against regular expressions that look
+// for non-JSON patterns. We are especially concerned with "()" and "new"
+// because they can cause invocation, and "=" because it can cause mutation.
+// But just to be safe, we want to reject all unexpected forms.
+
+// We split the second stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace the JSON backslash pairs with "@" (a non-JSON character). Second, we
+// replace all simple value tokens with "]" characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or "]" or
+// "," or ":" or "{" or "}". If that is so, then the text is safe for eval.
+
+ if (
+ rx_one.test(
+ text
+ .replace(rx_two, "@")
+ .replace(rx_three, "]")
+ .replace(rx_four, "")
+ )
+ ) {
+
+// In the third stage we use the eval function to compile the text into a
+// JavaScript structure. The "{" operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+ j = eval("(" + text + ")");
+
+// In the optional fourth stage, we recursively walk the new structure, passing
+// each name/value pair to a reviver function for possible transformation.
+
+ return (typeof reviver === "function")
+ ? walk({"": j}, "")
+ : j;
+ }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError("JSON.parse");
+ };
+ }
+}());
diff --git a/src/views/followvisit/discharge/js/prototype.js b/src/views/followvisit/discharge/js/prototype.js
new file mode 100644
index 0000000..0a83a4b
--- /dev/null
+++ b/src/views/followvisit/discharge/js/prototype.js
@@ -0,0 +1,4874 @@
+锘�/* Prototype JavaScript framework, version 1.6.1
+ * (c) 2005-2009 Sam Stephenson
+ *
+ * Prototype is freely distributable under the terms of an MIT-style license.
+ * For details, see the Prototype web site: http://www.prototypejs.org/
+ *
+ *--------------------------------------------------------------------------*/
+
+var Prototype = {
+ Version: '1.6.1',
+
+ Browser: (function(){
+ var ua = navigator.userAgent;
+ var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
+ return {
+ IE: !!window.attachEvent && !isOpera,
+ Opera: isOpera,
+ WebKit: ua.indexOf('AppleWebKit/') > -1,
+ Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
+ MobileSafari: /Apple.*Mobile.*Safari/.test(ua)
+ }
+ })(),
+
+ BrowserFeatures: {
+ XPath: !!document.evaluate,
+ SelectorsAPI: !!document.querySelector,
+ ElementExtensions: (function() {
+ var constructor = window.Element || window.HTMLElement;
+ return !!(constructor && constructor.prototype);
+ })(),
+ SpecificElementExtensions: (function() {
+ if (typeof window.HTMLDivElement !== 'undefined')
+ return true;
+
+ var div = document.createElement('div');
+ var form = document.createElement('form');
+ var isSupported = false;
+
+ if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
+ isSupported = true;
+ }
+
+ div = form = null;
+
+ return isSupported;
+ })()
+ },
+
+ ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
+ JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
+
+ emptyFunction: function() { },
+ K: function(x) { return x }
+};
+
+if (Prototype.Browser.MobileSafari)
+ Prototype.BrowserFeatures.SpecificElementExtensions = false;
+
+
+var Abstract = { };
+
+
+var Try = {
+ these: function() {
+ var returnValue;
+
+ for (var i = 0, length = arguments.length; i < length; i++) {
+ var lambda = arguments[i];
+ try {
+ returnValue = lambda();
+ break;
+ } catch (e) { }
+ }
+
+ return returnValue;
+ }
+};
+
+/* Based on Alex Arnell's inheritance implementation. */
+
+var Class = (function() {
+ function subclass() {};
+ function create() {
+ var parent = null, properties = $A(arguments);
+ if (Object.isFunction(properties[0]))
+ parent = properties.shift();
+
+ function klass() {
+ this.initialize.apply(this, arguments);
+ }
+
+ Object.extend(klass, Class.Methods);
+ klass.superclass = parent;
+ klass.subclasses = [];
+
+ if (parent) {
+ subclass.prototype = parent.prototype;
+ klass.prototype = new subclass;
+ parent.subclasses.push(klass);
+ }
+
+ for (var i = 0; i < properties.length; i++)
+ klass.addMethods(properties[i]);
+
+ if (!klass.prototype.initialize)
+ klass.prototype.initialize = Prototype.emptyFunction;
+
+ klass.prototype.constructor = klass;
+ return klass;
+ }
+
+ function addMethods(source) {
+ var ancestor = this.superclass && this.superclass.prototype;
+ var properties = Object.keys(source);
+
+ if (!Object.keys({ toString: true }).length) {
+ if (source.toString != Object.prototype.toString)
+ properties.push("toString");
+ if (source.valueOf != Object.prototype.valueOf)
+ properties.push("valueOf");
+ }
+
+ for (var i = 0, length = properties.length; i < length; i++) {
+ var property = properties[i], value = source[property];
+ if (ancestor && Object.isFunction(value) &&
+ value.argumentNames().first() == "$super") {
+ var method = value;
+ value = (function(m) {
+ return function() { return ancestor[m].apply(this, arguments); };
+ })(property).wrap(method);
+
+ value.valueOf = method.valueOf.bind(method);
+ value.toString = method.toString.bind(method);
+ }
+ this.prototype[property] = value;
+ }
+
+ return this;
+ }
+
+ return {
+ create: create,
+ Methods: {
+ addMethods: addMethods
+ }
+ };
+})();
+(function() {
+
+ var _toString = Object.prototype.toString;
+
+ function extend(destination, source) {
+ for (var property in source)
+ destination[property] = source[property];
+ return destination;
+ }
+
+ function inspect(object) {
+ try {
+ if (isUndefined(object)) return 'undefined';
+ if (object === null) return 'null';
+ return object.inspect ? object.inspect() : String(object);
+ } catch (e) {
+ if (e instanceof RangeError) return '...';
+ throw e;
+ }
+ }
+
+ function toJSON(object) {
+ var type = typeof object;
+ switch (type) {
+ case 'undefined':
+ case 'function':
+ case 'unknown': return;
+ case 'boolean': return object.toString();
+ }
+
+ if (object === null) return 'null';
+ if (object.toJSON) return object.toJSON();
+ if (isElement(object)) return;
+
+ var results = [];
+ for (var property in object) {
+ var value = toJSON(object[property]);
+ if (!isUndefined(value))
+ results.push(property.toJSON() + ': ' + value);
+ }
+
+ return '{' + results.join(', ') + '}';
+ }
+
+ function toQueryString(object) {
+ return $H(object).toQueryString();
+ }
+
+ function toHTML(object) {
+ return object && object.toHTML ? object.toHTML() : String.interpret(object);
+ }
+
+ function keys(object) {
+ var results = [];
+ for (var property in object)
+ results.push(property);
+ return results;
+ }
+
+ function values(object) {
+ var results = [];
+ for (var property in object)
+ results.push(object[property]);
+ return results;
+ }
+
+ function clone(object) {
+ return extend({ }, object);
+ }
+
+ function isElement(object) {
+ return !!(object && object.nodeType == 1);
+ }
+
+ function isArray(object) {
+ return _toString.call(object) == "[object Array]";
+ }
+
+
+ function isHash(object) {
+ return object instanceof Hash;
+ }
+
+ function isFunction(object) {
+ return typeof object === "function";
+ }
+
+ function isString(object) {
+ return _toString.call(object) == "[object String]";
+ }
+
+ function isNumber(object) {
+ return _toString.call(object) == "[object Number]";
+ }
+
+ function isUndefined(object) {
+ return typeof object === "undefined";
+ }
+
+ extend(Object, {
+ extend: extend,
+ inspect: inspect,
+ toJSON: toJSON,
+ toQueryString: toQueryString,
+ toHTML: toHTML,
+ keys: keys,
+ values: values,
+ clone: clone,
+ isElement: isElement,
+ isArray: isArray,
+ isHash: isHash,
+ isFunction: isFunction,
+ isString: isString,
+ isNumber: isNumber,
+ isUndefined: isUndefined
+ });
+})();
+Object.extend(Function.prototype, (function() {
+ var slice = Array.prototype.slice;
+
+ function update(array, args) {
+ var arrayLength = array.length, length = args.length;
+ while (length--) array[arrayLength + length] = args[length];
+ return array;
+ }
+
+ function merge(array, args) {
+ array = slice.call(array, 0);
+ return update(array, args);
+ }
+
+ function argumentNames() {
+ var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
+ .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
+ .replace(/\s+/g, '').split(',');
+ return names.length == 1 && !names[0] ? [] : names;
+ }
+
+ function bind(context) {
+ if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
+ var __method = this, args = slice.call(arguments, 1);
+ return function() {
+ var a = merge(args, arguments);
+ return __method.apply(context, a);
+ }
+ }
+
+ function bindAsEventListener(context) {
+ var __method = this, args = slice.call(arguments, 1);
+ return function(event) {
+ var a = update([event || window.event], args);
+ return __method.apply(context, a);
+ }
+ }
+
+ function curry() {
+ if (!arguments.length) return this;
+ var __method = this, args = slice.call(arguments, 0);
+ return function() {
+ var a = merge(args, arguments);
+ return __method.apply(this, a);
+ }
+ }
+
+ function delay(timeout) {
+ var __method = this, args = slice.call(arguments, 1);
+ timeout = timeout * 1000
+ return window.setTimeout(function() {
+ return __method.apply(__method, args);
+ }, timeout);
+ }
+
+ function defer() {
+ var args = update([0.01], arguments);
+ return this.delay.apply(this, args);
+ }
+
+ function wrap(wrapper) {
+ var __method = this;
+ return function() {
+ var a = update([__method.bind(this)], arguments);
+ return wrapper.apply(this, a);
+ }
+ }
+
+ function methodize() {
+ if (this._methodized) return this._methodized;
+ var __method = this;
+ return this._methodized = function() {
+ var a = update([this], arguments);
+ return __method.apply(null, a);
+ };
+ }
+
+ return {
+ argumentNames: argumentNames,
+ bind: bind,
+ bindAsEventListener: bindAsEventListener,
+ curry: curry,
+ delay: delay,
+ defer: defer,
+ wrap: wrap,
+ methodize: methodize
+ }
+})());
+
+
+Date.prototype.toJSON = function() {
+ return '"' + this.getUTCFullYear() + '-' +
+ (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
+ this.getUTCDate().toPaddedString(2) + 'T' +
+ this.getUTCHours().toPaddedString(2) + ':' +
+ this.getUTCMinutes().toPaddedString(2) + ':' +
+ this.getUTCSeconds().toPaddedString(2) + 'Z"';
+};
+
+
+RegExp.prototype.match = RegExp.prototype.test;
+
+RegExp.escape = function(str) {
+ return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+};
+var PeriodicalExecuter = Class.create({
+ initialize: function(callback, frequency) {
+ this.callback = callback;
+ this.frequency = frequency;
+ this.currentlyExecuting = false;
+
+ this.registerCallback();
+ },
+
+ registerCallback: function() {
+ this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+ },
+
+ execute: function() {
+ this.callback(this);
+ },
+
+ stop: function() {
+ if (!this.timer) return;
+ clearInterval(this.timer);
+ this.timer = null;
+ },
+
+ onTimerEvent: function() {
+ if (!this.currentlyExecuting) {
+ try {
+ this.currentlyExecuting = true;
+ this.execute();
+ this.currentlyExecuting = false;
+ } catch(e) {
+ this.currentlyExecuting = false;
+ throw e;
+ }
+ }
+ }
+});
+Object.extend(String, {
+ interpret: function(value) {
+ return value == null ? '' : String(value);
+ },
+ specialChar: {
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '\\': '\\\\'
+ }
+});
+
+Object.extend(String.prototype, (function() {
+
+ function prepareReplacement(replacement) {
+ if (Object.isFunction(replacement)) return replacement;
+ var template = new Template(replacement);
+ return function(match) { return template.evaluate(match) };
+ }
+
+ function gsub(pattern, replacement) {
+ var result = '', source = this, match;
+ replacement = prepareReplacement(replacement);
+
+ if (Object.isString(pattern))
+ pattern = RegExp.escape(pattern);
+
+ if (!(pattern.length || pattern.source)) {
+ replacement = replacement('');
+ return replacement + source.split('').join(replacement) + replacement;
+ }
+
+ while (source.length > 0) {
+ if (match = source.match(pattern)) {
+ result += source.slice(0, match.index);
+ result += String.interpret(replacement(match));
+ source = source.slice(match.index + match[0].length);
+ } else {
+ result += source, source = '';
+ }
+ }
+ return result;
+ }
+
+ function sub(pattern, replacement, count) {
+ replacement = prepareReplacement(replacement);
+ count = Object.isUndefined(count) ? 1 : count;
+
+ return this.gsub(pattern, function(match) {
+ if (--count < 0) return match[0];
+ return replacement(match);
+ });
+ }
+
+ function scan(pattern, iterator) {
+ this.gsub(pattern, iterator);
+ return String(this);
+ }
+
+ function truncate(length, truncation) {
+ length = length || 30;
+ truncation = Object.isUndefined(truncation) ? '...' : truncation;
+ return this.length > length ?
+ this.slice(0, length - truncation.length) + truncation : String(this);
+ }
+
+ function strip() {
+ return this.replace(/^\s+/, '').replace(/\s+$/, '');
+ }
+
+ function stripTags() {
+ return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
+ }
+
+ function stripScripts() {
+ return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+ }
+
+ function extractScripts() {
+ var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+ var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+ return (this.match(matchAll) || []).map(function(scriptTag) {
+ return (scriptTag.match(matchOne) || ['', ''])[1];
+ });
+ }
+
+ function evalScripts() {
+ return this.extractScripts().map(function(script) { return eval(script) });
+ }
+
+ function escapeHTML() {
+ return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
+ }
+
+ function unescapeHTML() {
+ return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');
+ }
+
+
+ function toQueryParams(separator) {
+ var match = this.strip().match(/([^?#]*)(#.*)?$/);
+ if (!match) return { };
+
+ return match[1].split(separator || '&').inject({ }, function(hash, pair) {
+ if ((pair = pair.split('='))[0]) {
+ var key = decodeURIComponent(pair.shift());
+ var value = pair.length > 1 ? pair.join('=') : pair[0];
+ if (value != undefined) value = decodeURIComponent(value);
+
+ if (key in hash) {
+ if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
+ hash[key].push(value);
+ }
+ else hash[key] = value;
+ }
+ return hash;
+ });
+ }
+
+ function toArray() {
+ return this.split('');
+ }
+
+ function succ() {
+ return this.slice(0, this.length - 1) +
+ String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+ }
+
+ function times(count) {
+ return count < 1 ? '' : new Array(count + 1).join(this);
+ }
+
+ function camelize() {
+ var parts = this.split('-'), len = parts.length;
+ if (len == 1) return parts[0];
+
+ var camelized = this.charAt(0) == '-'
+ ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+ : parts[0];
+
+ for (var i = 1; i < len; i++)
+ camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+ return camelized;
+ }
+
+ function capitalize() {
+ return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+ }
+
+ function underscore() {
+ return this.replace(/::/g, '/')
+ .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
+ .replace(/([a-z\d])([A-Z])/g, '$1_$2')
+ .replace(/-/g, '_')
+ .toLowerCase();
+ }
+
+ function dasherize() {
+ return this.replace(/_/g, '-');
+ }
+
+ function inspect(useDoubleQuotes) {
+ var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) {
+ if (character in String.specialChar) {
+ return String.specialChar[character];
+ }
+ return '\\u00' + character.charCodeAt().toPaddedString(2, 16);
+ });
+ if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
+ return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+ }
+
+ function toJSON() {
+ return this.inspect(true);
+ }
+
+ function unfilterJSON(filter) {
+ return this.replace(filter || Prototype.JSONFilter, '$1');
+ }
+
+ function isJSON() {
+ var str = this;
+ if (str.blank()) return false;
+ str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
+ return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
+ }
+
+ function evalJSON(sanitize) {
+ var json = this.unfilterJSON();
+ try {
+ if (!sanitize || json.isJSON()) return eval('(' + json + ')');
+ } catch (e) { }
+ throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
+ }
+
+ function include(pattern) {
+ return this.indexOf(pattern) > -1;
+ }
+
+ function startsWith(pattern) {
+ return this.indexOf(pattern) === 0;
+ }
+
+ function endsWith(pattern) {
+ var d = this.length - pattern.length;
+ return d >= 0 && this.lastIndexOf(pattern) === d;
+ }
+
+ function empty() {
+ return this == '';
+ }
+
+ function blank() {
+ return /^\s*$/.test(this);
+ }
+
+ function interpolate(object, pattern) {
+ return new Template(this, pattern).evaluate(object);
+ }
+
+ return {
+ gsub: gsub,
+ sub: sub,
+ scan: scan,
+ truncate: truncate,
+ strip: String.prototype.trim ? String.prototype.trim : strip,
+ stripTags: stripTags,
+ stripScripts: stripScripts,
+ extractScripts: extractScripts,
+ evalScripts: evalScripts,
+ escapeHTML: escapeHTML,
+ unescapeHTML: unescapeHTML,
+ toQueryParams: toQueryParams,
+ parseQuery: toQueryParams,
+ toArray: toArray,
+ succ: succ,
+ times: times,
+ camelize: camelize,
+ capitalize: capitalize,
+ underscore: underscore,
+ dasherize: dasherize,
+ inspect: inspect,
+ toJSON: toJSON,
+ unfilterJSON: unfilterJSON,
+ isJSON: isJSON,
+ evalJSON: evalJSON,
+ include: include,
+ startsWith: startsWith,
+ endsWith: endsWith,
+ empty: empty,
+ blank: blank,
+ interpolate: interpolate
+ };
+})());
+
+var Template = Class.create({
+ initialize: function(template, pattern) {
+ this.template = template.toString();
+ this.pattern = pattern || Template.Pattern;
+ },
+
+ evaluate: function(object) {
+ if (object && Object.isFunction(object.toTemplateReplacements))
+ object = object.toTemplateReplacements();
+
+ return this.template.gsub(this.pattern, function(match) {
+ if (object == null) return (match[1] + '');
+
+ var before = match[1] || '';
+ if (before == '\\') return match[2];
+
+ var ctx = object, expr = match[3];
+ var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
+ match = pattern.exec(expr);
+ if (match == null) return before;
+
+ while (match != null) {
+ var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1];
+ ctx = ctx[comp];
+ if (null == ctx || '' == match[3]) break;
+ expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
+ match = pattern.exec(expr);
+ }
+
+ return before + String.interpret(ctx);
+ });
+ }
+});
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+
+var $break = { };
+
+var Enumerable = (function() {
+ function each(iterator, context) {
+ var index = 0;
+ try {
+ this._each(function(value) {
+ iterator.call(context, value, index++);
+ });
+ } catch (e) {
+ if (e != $break) throw e;
+ }
+ return this;
+ }
+
+ function eachSlice(number, iterator, context) {
+ var index = -number, slices = [], array = this.toArray();
+ if (number < 1) return array;
+ while ((index += number) < array.length)
+ slices.push(array.slice(index, index+number));
+ return slices.collect(iterator, context);
+ }
+
+ function all(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result = true;
+ this.each(function(value, index) {
+ result = result && !!iterator.call(context, value, index);
+ if (!result) throw $break;
+ });
+ return result;
+ }
+
+ function any(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result = false;
+ this.each(function(value, index) {
+ if (result = !!iterator.call(context, value, index))
+ throw $break;
+ });
+ return result;
+ }
+
+ function collect(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var results = [];
+ this.each(function(value, index) {
+ results.push(iterator.call(context, value, index));
+ });
+ return results;
+ }
+
+ function detect(iterator, context) {
+ var result;
+ this.each(function(value, index) {
+ if (iterator.call(context, value, index)) {
+ result = value;
+ throw $break;
+ }
+ });
+ return result;
+ }
+
+ function findAll(iterator, context) {
+ var results = [];
+ this.each(function(value, index) {
+ if (iterator.call(context, value, index))
+ results.push(value);
+ });
+ return results;
+ }
+
+ function grep(filter, iterator, context) {
+ iterator = iterator || Prototype.K;
+ var results = [];
+
+ if (Object.isString(filter))
+ filter = new RegExp(RegExp.escape(filter));
+
+ this.each(function(value, index) {
+ if (filter.match(value))
+ results.push(iterator.call(context, value, index));
+ });
+ return results;
+ }
+
+ function include(object) {
+ if (Object.isFunction(this.indexOf))
+ if (this.indexOf(object) != -1) return true;
+
+ var found = false;
+ this.each(function(value) {
+ if (value == object) {
+ found = true;
+ throw $break;
+ }
+ });
+ return found;
+ }
+
+ function inGroupsOf(number, fillWith) {
+ fillWith = Object.isUndefined(fillWith) ? null : fillWith;
+ return this.eachSlice(number, function(slice) {
+ while(slice.length < number) slice.push(fillWith);
+ return slice;
+ });
+ }
+
+ function inject(memo, iterator, context) {
+ this.each(function(value, index) {
+ memo = iterator.call(context, memo, value, index);
+ });
+ return memo;
+ }
+
+ function invoke(method) {
+ var args = $A(arguments).slice(1);
+ return this.map(function(value) {
+ return value[method].apply(value, args);
+ });
+ }
+
+ function max(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result;
+ this.each(function(value, index) {
+ value = iterator.call(context, value, index);
+ if (result == null || value >= result)
+ result = value;
+ });
+ return result;
+ }
+
+ function min(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var result;
+ this.each(function(value, index) {
+ value = iterator.call(context, value, index);
+ if (result == null || value < result)
+ result = value;
+ });
+ return result;
+ }
+
+ function partition(iterator, context) {
+ iterator = iterator || Prototype.K;
+ var trues = [], falses = [];
+ this.each(function(value, index) {
+ (iterator.call(context, value, index) ?
+ trues : falses).push(value);
+ });
+ return [trues, falses];
+ }
+
+ function pluck(property) {
+ var results = [];
+ this.each(function(value) {
+ results.push(value[property]);
+ });
+ return results;
+ }
+
+ function reject(iterator, context) {
+ var results = [];
+ this.each(function(value, index) {
+ if (!iterator.call(context, value, index))
+ results.push(value);
+ });
+ return results;
+ }
+
+ function sortBy(iterator, context) {
+ return this.map(function(value, index) {
+ return {
+ value: value,
+ criteria: iterator.call(context, value, index)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }).pluck('value');
+ }
+
+ function toArray() {
+ return this.map();
+ }
+
+ function zip() {
+ var iterator = Prototype.K, args = $A(arguments);
+ if (Object.isFunction(args.last()))
+ iterator = args.pop();
+
+ var collections = [this].concat(args).map($A);
+ return this.map(function(value, index) {
+ return iterator(collections.pluck(index));
+ });
+ }
+
+ function size() {
+ return this.toArray().length;
+ }
+
+ function inspect() {
+ return '#<Enumerable:' + this.toArray().inspect() + '>';
+ }
+
+
+
+
+
+
+
+
+
+ return {
+ each: each,
+ eachSlice: eachSlice,
+ all: all,
+ every: all,
+ any: any,
+ some: any,
+ collect: collect,
+ map: collect,
+ detect: detect,
+ findAll: findAll,
+ select: findAll,
+ filter: findAll,
+ grep: grep,
+ include: include,
+ member: include,
+ inGroupsOf: inGroupsOf,
+ inject: inject,
+ invoke: invoke,
+ max: max,
+ min: min,
+ partition: partition,
+ pluck: pluck,
+ reject: reject,
+ sortBy: sortBy,
+ toArray: toArray,
+ entries: toArray,
+ zip: zip,
+ size: size,
+ inspect: inspect,
+ find: detect
+ };
+})();
+function $A(iterable) {
+ if (!iterable) return [];
+ if ('toArray' in Object(iterable)) return iterable.toArray();
+ var length = iterable.length || 0, results = new Array(length);
+ while (length--) results[length] = iterable[length];
+ return results;
+}
+
+function $w(string) {
+ if (!Object.isString(string)) return [];
+ string = string.strip();
+ return string ? string.split(/\s+/) : [];
+}
+
+Array.from = $A;
+
+
+(function() {
+ var arrayProto = Array.prototype,
+ slice = arrayProto.slice,
+ _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available
+
+ function each(iterator) {
+ for (var i = 0, length = this.length; i < length; i++)
+ iterator(this[i]);
+ }
+ if (!_each) _each = each;
+
+ function clear() {
+ this.length = 0;
+ return this;
+ }
+
+ function first() {
+ return this[0];
+ }
+
+ function last() {
+ return this[this.length - 1];
+ }
+
+ function compact() {
+ return this.select(function(value) {
+ return value != null;
+ });
+ }
+
+ function flatten() {
+ return this.inject([], function(array, value) {
+ if (Object.isArray(value))
+ return array.concat(value.flatten());
+ array.push(value);
+ return array;
+ });
+ }
+
+ function without() {
+ var values = slice.call(arguments, 0);
+ return this.select(function(value) {
+ return !values.include(value);
+ });
+ }
+
+ function reverse(inline) {
+ return (inline !== false ? this : this.toArray())._reverse();
+ }
+
+ function uniq(sorted) {
+ return this.inject([], function(array, value, index) {
+ if (0 == index || (sorted ? array.last() != value : !array.include(value)))
+ array.push(value);
+ return array;
+ });
+ }
+
+ function intersect(array) {
+ return this.uniq().findAll(function(item) {
+ return array.detect(function(value) { return item === value });
+ });
+ }
+
+
+ function clone() {
+ return slice.call(this, 0);
+ }
+
+ function size() {
+ return this.length;
+ }
+
+ function inspect() {
+ return '[' + this.map(Object.inspect).join(', ') + ']';
+ }
+
+ function toJSON() {
+ var results = [];
+ this.each(function(object) {
+ var value = Object.toJSON(object);
+ if (!Object.isUndefined(value)) results.push(value);
+ });
+ return '[' + results.join(', ') + ']';
+ }
+
+ function indexOf(item, i) {
+ i || (i = 0);
+ var length = this.length;
+ if (i < 0) i = length + i;
+ for (; i < length; i++)
+ if (this[i] === item) return i;
+ return -1;
+ }
+
+ function lastIndexOf(item, i) {
+ i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
+ var n = this.slice(0, i).reverse().indexOf(item);
+ return (n < 0) ? n : i - n - 1;
+ }
+
+ function concat() {
+ var array = slice.call(this, 0), item;
+ for (var i = 0, length = arguments.length; i < length; i++) {
+ item = arguments[i];
+ if (Object.isArray(item) && !('callee' in item)) {
+ for (var j = 0, arrayLength = item.length; j < arrayLength; j++)
+ array.push(item[j]);
+ } else {
+ array.push(item);
+ }
+ }
+ return array;
+ }
+
+ Object.extend(arrayProto, Enumerable);
+
+ if (!arrayProto._reverse)
+ arrayProto._reverse = arrayProto.reverse;
+
+ Object.extend(arrayProto, {
+ _each: _each,
+ clear: clear,
+ first: first,
+ last: last,
+ compact: compact,
+ flatten: flatten,
+ without: without,
+ reverse: reverse,
+ uniq: uniq,
+ intersect: intersect,
+ clone: clone,
+ toArray: clone,
+ size: size,
+ inspect: inspect,
+ toJSON: toJSON
+ });
+
+ var CONCAT_ARGUMENTS_BUGGY = (function() {
+ return [].concat(arguments)[0][0] !== 1;
+ })(1,2)
+
+ if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;
+
+ if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;
+ if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;
+})();
+function $H(object) {
+ return new Hash(object);
+};
+
+var Hash = Class.create(Enumerable, (function() {
+ function initialize(object) {
+ this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
+ }
+
+ function _each(iterator) {
+ for (var key in this._object) {
+ var value = this._object[key], pair = [key, value];
+ pair.key = key;
+ pair.value = value;
+ iterator(pair);
+ }
+ }
+
+ function set(key, value) {
+ return this._object[key] = value;
+ }
+
+ function get(key) {
+ if (this._object[key] !== Object.prototype[key])
+ return this._object[key];
+ }
+
+ function unset(key) {
+ var value = this._object[key];
+ delete this._object[key];
+ return value;
+ }
+
+ function toObject() {
+ return Object.clone(this._object);
+ }
+
+ function keys() {
+ return this.pluck('key');
+ }
+
+ function values() {
+ return this.pluck('value');
+ }
+
+ function index(value) {
+ var match = this.detect(function(pair) {
+ return pair.value === value;
+ });
+ return match && match.key;
+ }
+
+ function merge(object) {
+ return this.clone().update(object);
+ }
+
+ function update(object) {
+ return new Hash(object).inject(this, function(result, pair) {
+ result.set(pair.key, pair.value);
+ return result;
+ });
+ }
+
+ function toQueryPair(key, value) {
+ if (Object.isUndefined(value)) return key;
+ return key + '=' + encodeURIComponent(String.interpret(value));
+ }
+
+ function toQueryString() {
+ return this.inject([], function(results, pair) {
+ var key = encodeURIComponent(pair.key), values = pair.value;
+
+ if (values && typeof values == 'object') {
+ if (Object.isArray(values))
+ return results.concat(values.map(toQueryPair.curry(key)));
+ } else results.push(toQueryPair(key, values));
+ return results;
+ }).join('&');
+ }
+
+ function inspect() {
+ return '#<Hash:{' + this.map(function(pair) {
+ return pair.map(Object.inspect).join(': ');
+ }).join(', ') + '}>';
+ }
+
+ function toJSON() {
+ return Object.toJSON(this.toObject());
+ }
+
+ function clone() {
+ return new Hash(this);
+ }
+
+ return {
+ initialize: initialize,
+ _each: _each,
+ set: set,
+ get: get,
+ unset: unset,
+ toObject: toObject,
+ toTemplateReplacements: toObject,
+ keys: keys,
+ values: values,
+ index: index,
+ merge: merge,
+ update: update,
+ toQueryString: toQueryString,
+ inspect: inspect,
+ toJSON: toJSON,
+ clone: clone
+ };
+})());
+
+Hash.from = $H;
+Object.extend(Number.prototype, (function() {
+ function toColorPart() {
+ return this.toPaddedString(2, 16);
+ }
+
+ function succ() {
+ return this + 1;
+ }
+
+ function times(iterator, context) {
+ $R(0, this, true).each(iterator, context);
+ return this;
+ }
+
+ function toPaddedString(length, radix) {
+ var string = this.toString(radix || 10);
+ return '0'.times(length - string.length) + string;
+ }
+
+ function toJSON() {
+ return isFinite(this) ? this.toString() : 'null';
+ }
+
+ function abs() {
+ return Math.abs(this);
+ }
+
+ function round() {
+ return Math.round(this);
+ }
+
+ function ceil() {
+ return Math.ceil(this);
+ }
+
+ function floor() {
+ return Math.floor(this);
+ }
+
+ return {
+ toColorPart: toColorPart,
+ succ: succ,
+ times: times,
+ toPaddedString: toPaddedString,
+ toJSON: toJSON,
+ abs: abs,
+ round: round,
+ ceil: ceil,
+ floor: floor
+ };
+})());
+
+function $R(start, end, exclusive) {
+ return new ObjectRange(start, end, exclusive);
+}
+
+var ObjectRange = Class.create(Enumerable, (function() {
+ function initialize(start, end, exclusive) {
+ this.start = start;
+ this.end = end;
+ this.exclusive = exclusive;
+ }
+
+ function _each(iterator) {
+ var value = this.start;
+ while (this.include(value)) {
+ iterator(value);
+ value = value.succ();
+ }
+ }
+
+ function include(value) {
+ if (value < this.start)
+ return false;
+ if (this.exclusive)
+ return value < this.end;
+ return value <= this.end;
+ }
+
+ return {
+ initialize: initialize,
+ _each: _each,
+ include: include
+ };
+})());
+
+
+
+var Ajax = {
+ getTransport: function() {
+ return Try.these(
+ function() {return new XMLHttpRequest()},
+ function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+ function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+ ) || false;
+ },
+
+ activeRequestCount: 0
+};
+
+Ajax.Responders = {
+ responders: [],
+
+ _each: function(iterator) {
+ this.responders._each(iterator);
+ },
+
+ register: function(responder) {
+ if (!this.include(responder))
+ this.responders.push(responder);
+ },
+
+ unregister: function(responder) {
+ this.responders = this.responders.without(responder);
+ },
+
+ dispatch: function(callback, request, transport, json) {
+ this.each(function(responder) {
+ if (Object.isFunction(responder[callback])) {
+ try {
+ responder[callback].apply(responder, [request, transport, json]);
+ } catch (e) { }
+ }
+ });
+ }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+ onCreate: function() { Ajax.activeRequestCount++ },
+ onComplete: function() { Ajax.activeRequestCount-- }
+});
+Ajax.Base = Class.create({
+ initialize: function(options) {
+ this.options = {
+ method: 'post',
+ asynchronous: true,
+ contentType: 'application/x-www-form-urlencoded',
+ encoding: 'UTF-8',
+ parameters: '',
+ evalJSON: true,
+ evalJS: true
+ };
+ Object.extend(this.options, options || { });
+
+ this.options.method = this.options.method.toLowerCase();
+
+ if (Object.isString(this.options.parameters))
+ this.options.parameters = this.options.parameters.toQueryParams();
+ else if (Object.isHash(this.options.parameters))
+ this.options.parameters = this.options.parameters.toObject();
+ }
+});
+Ajax.Request = Class.create(Ajax.Base, {
+ _complete: false,
+
+ initialize: function($super, url, options) {
+ $super(options);
+ this.transport = Ajax.getTransport();
+ this.request(url);
+ },
+
+ request: function(url) {
+ this.url = url;
+ this.method = this.options.method;
+ var params = Object.clone(this.options.parameters);
+
+ if (!['get', 'post'].include(this.method)) {
+ params['_method'] = this.method;
+ this.method = 'post';
+ }
+
+ this.parameters = params;
+
+ if (params = Object.toQueryString(params)) {
+ if (this.method == 'get')
+ this.url += (this.url.include('?') ? '&' : '?') + params;
+ else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+ params += '&_=';
+ }
+
+ try {
+ var response = new Ajax.Response(this);
+ if (this.options.onCreate) this.options.onCreate(response);
+ Ajax.Responders.dispatch('onCreate', this, response);
+
+ this.transport.open(this.method.toUpperCase(), this.url,
+ this.options.asynchronous);
+
+ if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
+
+ this.transport.onreadystatechange = this.onStateChange.bind(this);
+ this.setRequestHeaders();
+
+ this.body = this.method == 'post' ? (this.options.postBody || params) : null;
+ this.transport.send(this.body);
+
+ /* Force Firefox to handle ready state 4 for synchronous requests */
+ if (!this.options.asynchronous && this.transport.overrideMimeType)
+ this.onStateChange();
+
+ }
+ catch (e) {
+ this.dispatchException(e);
+ }
+ },
+
+ onStateChange: function() {
+ var readyState = this.transport.readyState;
+ if (readyState > 1 && !((readyState == 4) && this._complete))
+ this.respondToReadyState(this.transport.readyState);
+ },
+
+ setRequestHeaders: function() {
+ var headers = {
+ 'X-Requested-With': 'XMLHttpRequest',
+ 'X-Prototype-Version': Prototype.Version,
+ 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+ };
+
+ if (this.method == 'post') {
+ headers['Content-type'] = this.options.contentType +
+ (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+ /* Force "Connection: close" for older Mozilla browsers to work
+ * around a bug where XMLHttpRequest sends an incorrect
+ * Content-length header. See Mozilla Bugzilla #246651.
+ */
+ if (this.transport.overrideMimeType &&
+ (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+ headers['Connection'] = 'close';
+ }
+
+ if (typeof this.options.requestHeaders == 'object') {
+ var extras = this.options.requestHeaders;
+
+ if (Object.isFunction(extras.push))
+ for (var i = 0, length = extras.length; i < length; i += 2)
+ headers[extras[i]] = extras[i+1];
+ else
+ $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+ }
+
+ for (var name in headers)
+ this.transport.setRequestHeader(name, headers[name]);
+ },
+
+ success: function() {
+ var status = this.getStatus();
+ return !status || (status >= 200 && status < 300);
+ },
+
+ getStatus: function() {
+ try {
+ return this.transport.status || 0;
+ } catch (e) { return 0 }
+ },
+
+ respondToReadyState: function(readyState) {
+ var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
+
+ if (state == 'Complete') {
+ try {
+ this._complete = true;
+ (this.options['on' + response.status]
+ || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+ || Prototype.emptyFunction)(response, response.headerJSON);
+ } catch (e) {
+ this.dispatchException(e);
+ }
+
+ var contentType = response.getHeader('Content-type');
+ if (this.options.evalJS == 'force'
+ || (this.options.evalJS && this.isSameOrigin() && contentType
+ && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
+ this.evalResponse();
+ }
+
+ try {
+ (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
+ Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
+ } catch (e) {
+ this.dispatchException(e);
+ }
+
+ if (state == 'Complete') {
+ this.transport.onreadystatechange = Prototype.emptyFunction;
+ }
+ },
+
+ isSameOrigin: function() {
+ var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
+ return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
+ protocol: location.protocol,
+ domain: document.domain,
+ port: location.port ? ':' + location.port : ''
+ }));
+ },
+
+ getHeader: function(name) {
+ try {
+ return this.transport.getResponseHeader(name) || null;
+ } catch (e) { return null; }
+ },
+
+ evalResponse: function() {
+ try {
+ return eval((this.transport.responseText || '').unfilterJSON());
+ } catch (e) {
+ this.dispatchException(e);
+ }
+ },
+
+ dispatchException: function(exception) {
+ (this.options.onException || Prototype.emptyFunction)(this, exception);
+ Ajax.Responders.dispatch('onException', this, exception);
+ }
+});
+
+Ajax.Request.Events =
+ ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+
+
+
+
+
+
+
+Ajax.Response = Class.create({
+ initialize: function(request){
+ this.request = request;
+ var transport = this.transport = request.transport,
+ readyState = this.readyState = transport.readyState;
+
+ if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
+ this.status = this.getStatus();
+ this.statusText = this.getStatusText();
+ this.responseText = String.interpret(transport.responseText);
+ this.headerJSON = this._getHeaderJSON();
+ }
+
+ if(readyState == 4) {
+ var xml = transport.responseXML;
+ this.responseXML = Object.isUndefined(xml) ? null : xml;
+ this.responseJSON = this._getResponseJSON();
+ }
+ },
+
+ status: 0,
+
+ statusText: '',
+
+ getStatus: Ajax.Request.prototype.getStatus,
+
+ getStatusText: function() {
+ try {
+ return this.transport.statusText || '';
+ } catch (e) { return '' }
+ },
+
+ getHeader: Ajax.Request.prototype.getHeader,
+
+ getAllHeaders: function() {
+ try {
+ return this.getAllResponseHeaders();
+ } catch (e) { return null }
+ },
+
+ getResponseHeader: function(name) {
+ return this.transport.getResponseHeader(name);
+ },
+
+ getAllResponseHeaders: function() {
+ return this.transport.getAllResponseHeaders();
+ },
+
+ _getHeaderJSON: function() {
+ var json = this.getHeader('X-JSON');
+ if (!json) return null;
+ json = decodeURIComponent(escape(json));
+ try {
+ return json.evalJSON(this.request.options.sanitizeJSON ||
+ !this.request.isSameOrigin());
+ } catch (e) {
+ this.request.dispatchException(e);
+ }
+ },
+
+ _getResponseJSON: function() {
+ var options = this.request.options;
+ if (!options.evalJSON || (options.evalJSON != 'force' &&
+ !(this.getHeader('Content-type') || '').include('application/json')) ||
+ this.responseText.blank())
+ return null;
+ try {
+ return this.responseText.evalJSON(options.sanitizeJSON ||
+ !this.request.isSameOrigin());
+ } catch (e) {
+ this.request.dispatchException(e);
+ }
+ }
+});
+
+Ajax.Updater = Class.create(Ajax.Request, {
+ initialize: function($super, container, url, options) {
+ this.container = {
+ success: (container.success || container),
+ failure: (container.failure || (container.success ? null : container))
+ };
+
+ options = Object.clone(options);
+ var onComplete = options.onComplete;
+ options.onComplete = (function(response, json) {
+ this.updateContent(response.responseText);
+ if (Object.isFunction(onComplete)) onComplete(response, json);
+ }).bind(this);
+
+ $super(url, options);
+ },
+
+ updateContent: function(responseText) {
+ var receiver = this.container[this.success() ? 'success' : 'failure'],
+ options = this.options;
+
+ if (!options.evalScripts) responseText = responseText.stripScripts();
+
+ if (receiver = $(receiver)) {
+ if (options.insertion) {
+ if (Object.isString(options.insertion)) {
+ var insertion = { }; insertion[options.insertion] = responseText;
+ receiver.insert(insertion);
+ }
+ else options.insertion(receiver, responseText);
+ }
+ else receiver.update(responseText);
+ }
+ }
+});
+
+Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
+ initialize: function($super, container, url, options) {
+ $super(options);
+ this.onComplete = this.options.onComplete;
+
+ this.frequency = (this.options.frequency || 2);
+ this.decay = (this.options.decay || 1);
+
+ this.updater = { };
+ this.container = container;
+ this.url = url;
+
+ this.start();
+ },
+
+ start: function() {
+ this.options.onComplete = this.updateComplete.bind(this);
+ this.onTimerEvent();
+ },
+
+ stop: function() {
+ this.updater.options.onComplete = undefined;
+ clearTimeout(this.timer);
+ (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+ },
+
+ updateComplete: function(response) {
+ if (this.options.decay) {
+ this.decay = (response.responseText == this.lastText ?
+ this.decay * this.options.decay : 1);
+
+ this.lastText = response.responseText;
+ }
+ this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
+ },
+
+ onTimerEvent: function() {
+ this.updater = new Ajax.Updater(this.container, this.url, this.options);
+ }
+});
+
+
+
+function $(element) {
+ if (arguments.length > 1) {
+ for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+ elements.push($(arguments[i]));
+ return elements;
+ }
+ if (Object.isString(element))
+ element = document.getElementById(element);
+ return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+ document._getElementsByXPath = function(expression, parentElement) {
+ var results = [];
+ var query = document.evaluate(expression, $(parentElement) || document,
+ null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+ for (var i = 0, length = query.snapshotLength; i < length; i++)
+ results.push(Element.extend(query.snapshotItem(i)));
+ return results;
+ };
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Node) var Node = { };
+
+if (!Node.ELEMENT_NODE) {
+ Object.extend(Node, {
+ ELEMENT_NODE: 1,
+ ATTRIBUTE_NODE: 2,
+ TEXT_NODE: 3,
+ CDATA_SECTION_NODE: 4,
+ ENTITY_REFERENCE_NODE: 5,
+ ENTITY_NODE: 6,
+ PROCESSING_INSTRUCTION_NODE: 7,
+ COMMENT_NODE: 8,
+ DOCUMENT_NODE: 9,
+ DOCUMENT_TYPE_NODE: 10,
+ DOCUMENT_FRAGMENT_NODE: 11,
+ NOTATION_NODE: 12
+ });
+}
+
+
+(function(global) {
+
+ var SETATTRIBUTE_IGNORES_NAME = (function(){
+ var elForm = document.createElement("form");
+ var elInput = document.createElement("input");
+ var root = document.documentElement;
+ elInput.setAttribute("name", "test");
+ elForm.appendChild(elInput);
+ root.appendChild(elForm);
+ var isBuggy = elForm.elements
+ ? (typeof elForm.elements.test == "undefined")
+ : null;
+ root.removeChild(elForm);
+ elForm = elInput = null;
+ return isBuggy;
+ })();
+
+ var element = global.Element;
+ global.Element = function(tagName, attributes) {
+ attributes = attributes || { };
+ tagName = tagName.toLowerCase();
+ var cache = Element.cache;
+ if (SETATTRIBUTE_IGNORES_NAME && attributes.name) {
+ tagName = '<' + tagName + ' name="' + attributes.name + '">';
+ delete attributes.name;
+ return Element.writeAttribute(document.createElement(tagName), attributes);
+ }
+ if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
+ return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
+ };
+ Object.extend(global.Element, element || { });
+ if (element) global.Element.prototype = element.prototype;
+})(this);
+
+Element.cache = { };
+Element.idCounter = 1;
+
+Element.Methods = {
+ visible: function(element) {
+ return $(element).style.display != 'none';
+ },
+
+ toggle: function(element) {
+ element = $(element);
+ Element[Element.visible(element) ? 'hide' : 'show'](element);
+ return element;
+ },
+
+
+ hide: function(element) {
+ element = $(element);
+ element.style.display = 'none';
+ return element;
+ },
+
+ show: function(element) {
+ element = $(element);
+ element.style.display = '';
+ return element;
+ },
+
+ remove: function(element) {
+ element = $(element);
+ element.parentNode.removeChild(element);
+ return element;
+ },
+
+ update: (function(){
+
+ var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
+ var el = document.createElement("select"),
+ isBuggy = true;
+ el.innerHTML = "<option value=\"test\">test</option>";
+ if (el.options && el.options[0]) {
+ isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION";
+ }
+ el = null;
+ return isBuggy;
+ })();
+
+ var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){
+ try {
+ var el = document.createElement("table");
+ if (el && el.tBodies) {
+ el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>";
+ var isBuggy = typeof el.tBodies[0] == "undefined";
+ el = null;
+ return isBuggy;
+ }
+ } catch (e) {
+ return true;
+ }
+ })();
+
+ var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {
+ var s = document.createElement("script"),
+ isBuggy = false;
+ try {
+ s.appendChild(document.createTextNode(""));
+ isBuggy = !s.firstChild ||
+ s.firstChild && s.firstChild.nodeType !== 3;
+ } catch (e) {
+ isBuggy = true;
+ }
+ s = null;
+ return isBuggy;
+ })();
+
+ function update(element, content) {
+ element = $(element);
+
+ if (content && content.toElement)
+ content = content.toElement();
+
+ if (Object.isElement(content))
+ return element.update().insert(content);
+
+ content = Object.toHTML(content);
+
+ var tagName = element.tagName.toUpperCase();
+
+ if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {
+ element.text = content;
+ return element;
+ }
+
+ if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) {
+ if (tagName in Element._insertionTranslations.tags) {
+ while (element.firstChild) {
+ element.removeChild(element.firstChild);
+ }
+ Element._getContentFromAnonymousElement(tagName, content.stripScripts())
+ .each(function(node) {
+ element.appendChild(node)
+ });
+ }
+ else {
+ element.innerHTML = content.stripScripts();
+ }
+ }
+ else {
+ element.innerHTML = content.stripScripts();
+ }
+
+ content.evalScripts.bind(content).defer();
+ return element;
+ }
+
+ return update;
+ })(),
+
+ replace: function(element, content) {
+ element = $(element);
+ if (content && content.toElement) content = content.toElement();
+ else if (!Object.isElement(content)) {
+ content = Object.toHTML(content);
+ var range = element.ownerDocument.createRange();
+ range.selectNode(element);
+ content.evalScripts.bind(content).defer();
+ content = range.createContextualFragment(content.stripScripts());
+ }
+ element.parentNode.replaceChild(content, element);
+ return element;
+ },
+
+ insert: function(element, insertions) {
+ element = $(element);
+
+ if (Object.isString(insertions) || Object.isNumber(insertions) ||
+ Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+ insertions = {bottom:insertions};
+
+ var content, insert, tagName, childNodes;
+
+ for (var position in insertions) {
+ content = insertions[position];
+ position = position.toLowerCase();
+ insert = Element._insertionTranslations[position];
+
+ if (content && content.toElement) content = content.toElement();
+ if (Object.isElement(content)) {
+ insert(element, content);
+ continue;
+ }
+
+ content = Object.toHTML(content);
+
+ tagName = ((position == 'before' || position == 'after')
+ ? element.parentNode : element).tagName.toUpperCase();
+
+ childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+
+ if (position == 'top' || position == 'after') childNodes.reverse();
+ childNodes.each(insert.curry(element));
+
+ content.evalScripts.bind(content).defer();
+ }
+
+ return element;
+ },
+
+ wrap: function(element, wrapper, attributes) {
+ element = $(element);
+ if (Object.isElement(wrapper))
+ $(wrapper).writeAttribute(attributes || { });
+ else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
+ else wrapper = new Element('div', wrapper);
+ if (element.parentNode)
+ element.parentNode.replaceChild(wrapper, element);
+ wrapper.appendChild(element);
+ return wrapper;
+ },
+
+ inspect: function(element) {
+ element = $(element);
+ var result = '<' + element.tagName.toLowerCase();
+ $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+ var property = pair.first(), attribute = pair.last();
+ var value = (element[property] || '').toString();
+ if (value) result += ' ' + attribute + '=' + value.inspect(true);
+ });
+ return result + '>';
+ },
+
+ recursivelyCollect: function(element, property) {
+ element = $(element);
+ var elements = [];
+ while (element = element[property])
+ if (element.nodeType == 1)
+ elements.push(Element.extend(element));
+ return elements;
+ },
+
+ ancestors: function(element) {
+ return Element.recursivelyCollect(element, 'parentNode');
+ },
+
+ descendants: function(element) {
+ return Element.select(element, "*");
+ },
+
+ firstDescendant: function(element) {
+ element = $(element).firstChild;
+ while (element && element.nodeType != 1) element = element.nextSibling;
+ return $(element);
+ },
+
+ immediateDescendants: function(element) {
+ if (!(element = $(element).firstChild)) return [];
+ while (element && element.nodeType != 1) element = element.nextSibling;
+ if (element) return [element].concat($(element).nextSiblings());
+ return [];
+ },
+
+ previousSiblings: function(element) {
+ return Element.recursivelyCollect(element, 'previousSibling');
+ },
+
+ nextSiblings: function(element) {
+ return Element.recursivelyCollect(element, 'nextSibling');
+ },
+
+ siblings: function(element) {
+ element = $(element);
+ return Element.previousSiblings(element).reverse()
+ .concat(Element.nextSiblings(element));
+ },
+
+ match: function(element, selector) {
+ if (Object.isString(selector))
+ selector = new Selector(selector);
+ return selector.match($(element));
+ },
+
+ up: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return $(element.parentNode);
+ var ancestors = Element.ancestors(element);
+ return Object.isNumber(expression) ? ancestors[expression] :
+ Selector.findElement(ancestors, expression, index);
+ },
+
+ down: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return Element.firstDescendant(element);
+ return Object.isNumber(expression) ? Element.descendants(element)[expression] :
+ Element.select(element, expression)[index || 0];
+ },
+
+ previous: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
+ var previousSiblings = Element.previousSiblings(element);
+ return Object.isNumber(expression) ? previousSiblings[expression] :
+ Selector.findElement(previousSiblings, expression, index);
+ },
+
+ next: function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
+ var nextSiblings = Element.nextSiblings(element);
+ return Object.isNumber(expression) ? nextSiblings[expression] :
+ Selector.findElement(nextSiblings, expression, index);
+ },
+
+
+ select: function(element) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return Selector.findChildElements(element, args);
+ },
+
+ adjacent: function(element) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return Selector.findChildElements(element.parentNode, args).without(element);
+ },
+
+ identify: function(element) {
+ element = $(element);
+ var id = Element.readAttribute(element, 'id');
+ if (id) return id;
+ do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));
+ Element.writeAttribute(element, 'id', id);
+ return id;
+ },
+
+ readAttribute: function(element, name) {
+ element = $(element);
+ if (Prototype.Browser.IE) {
+ var t = Element._attributeTranslations.read;
+ if (t.values[name]) return t.values[name](element, name);
+ if (t.names[name]) name = t.names[name];
+ if (name.include(':')) {
+ return (!element.attributes || !element.attributes[name]) ? null :
+ element.attributes[name].value;
+ }
+ }
+ return element.getAttribute(name);
+ },
+
+ writeAttribute: function(element, name, value) {
+ element = $(element);
+ var attributes = { }, t = Element._attributeTranslations.write;
+
+ if (typeof name == 'object') attributes = name;
+ else attributes[name] = Object.isUndefined(value) ? true : value;
+
+ for (var attr in attributes) {
+ name = t.names[attr] || attr;
+ value = attributes[attr];
+ if (t.values[attr]) name = t.values[attr](element, value);
+ if (value === false || value === null)
+ element.removeAttribute(name);
+ else if (value === true)
+ element.setAttribute(name, name);
+ else element.setAttribute(name, value);
+ }
+ return element;
+ },
+
+ getHeight: function(element) {
+ return Element.getDimensions(element).height;
+ },
+
+ getWidth: function(element) {
+ return Element.getDimensions(element).width;
+ },
+
+ classNames: function(element) {
+ return new Element.ClassNames(element);
+ },
+
+ hasClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ var elementClassName = element.className;
+ return (elementClassName.length > 0 && (elementClassName == className ||
+ new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
+ },
+
+ addClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ if (!Element.hasClassName(element, className))
+ element.className += (element.className ? ' ' : '') + className;
+ return element;
+ },
+
+ removeClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ element.className = element.className.replace(
+ new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
+ return element;
+ },
+
+ toggleClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ return Element[Element.hasClassName(element, className) ?
+ 'removeClassName' : 'addClassName'](element, className);
+ },
+
+ cleanWhitespace: function(element) {
+ element = $(element);
+ var node = element.firstChild;
+ while (node) {
+ var nextNode = node.nextSibling;
+ if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+ element.removeChild(node);
+ node = nextNode;
+ }
+ return element;
+ },
+
+ empty: function(element) {
+ return $(element).innerHTML.blank();
+ },
+
+ descendantOf: function(element, ancestor) {
+ element = $(element), ancestor = $(ancestor);
+
+ if (element.compareDocumentPosition)
+ return (element.compareDocumentPosition(ancestor) & 8) === 8;
+
+ if (ancestor.contains)
+ return ancestor.contains(element) && ancestor !== element;
+
+ while (element = element.parentNode)
+ if (element == ancestor) return true;
+
+ return false;
+ },
+
+ scrollTo: function(element) {
+ element = $(element);
+ var pos = Element.cumulativeOffset(element);
+ window.scrollTo(pos[0], pos[1]);
+ return element;
+ },
+
+ getStyle: function(element, style) {
+ element = $(element);
+ style = style == 'float' ? 'cssFloat' : style.camelize();
+ var value = element.style[style];
+ if (!value || value == 'auto') {
+ var css = document.defaultView.getComputedStyle(element, null);
+ value = css ? css[style] : null;
+ }
+ if (style == 'opacity') return value ? parseFloat(value) : 1.0;
+ return value == 'auto' ? null : value;
+ },
+
+ getOpacity: function(element) {
+ return $(element).getStyle('opacity');
+ },
+
+ setStyle: function(element, styles) {
+ element = $(element);
+ var elementStyle = element.style, match;
+ if (Object.isString(styles)) {
+ element.style.cssText += ';' + styles;
+ return styles.include('opacity') ?
+ element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
+ }
+ for (var property in styles)
+ if (property == 'opacity') element.setOpacity(styles[property]);
+ else
+ elementStyle[(property == 'float' || property == 'cssFloat') ?
+ (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
+ property] = styles[property];
+
+ return element;
+ },
+
+ setOpacity: function(element, value) {
+ element = $(element);
+ element.style.opacity = (value == 1 || value === '') ? '' :
+ (value < 0.00001) ? 0 : value;
+ return element;
+ },
+
+ getDimensions: function(element) {
+ element = $(element);
+ var display = Element.getStyle(element, 'display');
+ if (display != 'none' && display != null) // Safari bug
+ return {width: element.offsetWidth, height: element.offsetHeight};
+
+ var els = element.style;
+ var originalVisibility = els.visibility;
+ var originalPosition = els.position;
+ var originalDisplay = els.display;
+ els.visibility = 'hidden';
+ if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari
+ els.position = 'absolute';
+ els.display = 'block';
+ var originalWidth = element.clientWidth;
+ var originalHeight = element.clientHeight;
+ els.display = originalDisplay;
+ els.position = originalPosition;
+ els.visibility = originalVisibility;
+ return {width: originalWidth, height: originalHeight};
+ },
+
+ makePositioned: function(element) {
+ element = $(element);
+ var pos = Element.getStyle(element, 'position');
+ if (pos == 'static' || !pos) {
+ element._madePositioned = true;
+ element.style.position = 'relative';
+ if (Prototype.Browser.Opera) {
+ element.style.top = 0;
+ element.style.left = 0;
+ }
+ }
+ return element;
+ },
+
+ undoPositioned: function(element) {
+ element = $(element);
+ if (element._madePositioned) {
+ element._madePositioned = undefined;
+ element.style.position =
+ element.style.top =
+ element.style.left =
+ element.style.bottom =
+ element.style.right = '';
+ }
+ return element;
+ },
+
+ makeClipping: function(element) {
+ element = $(element);
+ if (element._overflow) return element;
+ element._overflow = Element.getStyle(element, 'overflow') || 'auto';
+ if (element._overflow !== 'hidden')
+ element.style.overflow = 'hidden';
+ return element;
+ },
+
+ undoClipping: function(element) {
+ element = $(element);
+ if (!element._overflow) return element;
+ element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+ element._overflow = null;
+ return element;
+ },
+
+ cumulativeOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ element = element.offsetParent;
+ } while (element);
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ positionedOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ element = element.offsetParent;
+ if (element) {
+ if (element.tagName.toUpperCase() == 'BODY') break;
+ var p = Element.getStyle(element, 'position');
+ if (p !== 'static') break;
+ }
+ } while (element);
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ absolutize: function(element) {
+ element = $(element);
+ if (Element.getStyle(element, 'position') == 'absolute') return element;
+
+ var offsets = Element.positionedOffset(element);
+ var top = offsets[1];
+ var left = offsets[0];
+ var width = element.clientWidth;
+ var height = element.clientHeight;
+
+ element._originalLeft = left - parseFloat(element.style.left || 0);
+ element._originalTop = top - parseFloat(element.style.top || 0);
+ element._originalWidth = element.style.width;
+ element._originalHeight = element.style.height;
+
+ element.style.position = 'absolute';
+ element.style.top = top + 'px';
+ element.style.left = left + 'px';
+ element.style.width = width + 'px';
+ element.style.height = height + 'px';
+ return element;
+ },
+
+ relativize: function(element) {
+ element = $(element);
+ if (Element.getStyle(element, 'position') == 'relative') return element;
+
+ element.style.position = 'relative';
+ var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
+ var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+ element.style.top = top + 'px';
+ element.style.left = left + 'px';
+ element.style.height = element._originalHeight;
+ element.style.width = element._originalWidth;
+ return element;
+ },
+
+ cumulativeScrollOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.scrollTop || 0;
+ valueL += element.scrollLeft || 0;
+ element = element.parentNode;
+ } while (element);
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ getOffsetParent: function(element) {
+ if (element.offsetParent) return $(element.offsetParent);
+ if (element == document.body) return $(element);
+
+ while ((element = element.parentNode) && element != document.body)
+ if (Element.getStyle(element, 'position') != 'static')
+ return $(element);
+
+ return $(document.body);
+ },
+
+ viewportOffset: function(forElement) {
+ var valueT = 0, valueL = 0;
+
+ var element = forElement;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+
+ if (element.offsetParent == document.body &&
+ Element.getStyle(element, 'position') == 'absolute') break;
+
+ } while (element = element.offsetParent);
+
+ element = forElement;
+ do {
+ if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
+ valueT -= element.scrollTop || 0;
+ valueL -= element.scrollLeft || 0;
+ }
+ } while (element = element.parentNode);
+
+ return Element._returnOffset(valueL, valueT);
+ },
+
+ clonePosition: function(element, source) {
+ var options = Object.extend({
+ setLeft: true,
+ setTop: true,
+ setWidth: true,
+ setHeight: true,
+ offsetTop: 0,
+ offsetLeft: 0
+ }, arguments[2] || { });
+
+ source = $(source);
+ var p = Element.viewportOffset(source);
+
+ element = $(element);
+ var delta = [0, 0];
+ var parent = null;
+ if (Element.getStyle(element, 'position') == 'absolute') {
+ parent = Element.getOffsetParent(element);
+ delta = Element.viewportOffset(parent);
+ }
+
+ if (parent == document.body) {
+ delta[0] -= document.body.offsetLeft;
+ delta[1] -= document.body.offsetTop;
+ }
+
+ if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
+ if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
+ if (options.setWidth) element.style.width = source.offsetWidth + 'px';
+ if (options.setHeight) element.style.height = source.offsetHeight + 'px';
+ return element;
+ }
+};
+
+Object.extend(Element.Methods, {
+ getElementsBySelector: Element.Methods.select,
+
+ childElements: Element.Methods.immediateDescendants
+});
+
+Element._attributeTranslations = {
+ write: {
+ names: {
+ className: 'class',
+ htmlFor: 'for'
+ },
+ values: { }
+ }
+};
+
+if (Prototype.Browser.Opera) {
+ Element.Methods.getStyle = Element.Methods.getStyle.wrap(
+ function(proceed, element, style) {
+ switch (style) {
+ case 'left': case 'top': case 'right': case 'bottom':
+ if (proceed(element, 'position') === 'static') return null;
+ case 'height': case 'width':
+ if (!Element.visible(element)) return null;
+
+ var dim = parseInt(proceed(element, style), 10);
+
+ if (dim !== element['offset' + style.capitalize()])
+ return dim + 'px';
+
+ var properties;
+ if (style === 'height') {
+ properties = ['border-top-width', 'padding-top',
+ 'padding-bottom', 'border-bottom-width'];
+ }
+ else {
+ properties = ['border-left-width', 'padding-left',
+ 'padding-right', 'border-right-width'];
+ }
+ return properties.inject(dim, function(memo, property) {
+ var val = proceed(element, property);
+ return val === null ? memo : memo - parseInt(val, 10);
+ }) + 'px';
+ default: return proceed(element, style);
+ }
+ }
+ );
+
+ Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
+ function(proceed, element, attribute) {
+ if (attribute === 'title') return element.title;
+ return proceed(element, attribute);
+ }
+ );
+}
+
+else if (Prototype.Browser.IE) {
+ Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
+ function(proceed, element) {
+ element = $(element);
+ try { element.offsetParent }
+ catch(e) { return $(document.body) }
+ var position = element.getStyle('position');
+ if (position !== 'static') return proceed(element);
+ element.setStyle({ position: 'relative' });
+ var value = proceed(element);
+ element.setStyle({ position: position });
+ return value;
+ }
+ );
+
+ $w('positionedOffset viewportOffset').each(function(method) {
+ Element.Methods[method] = Element.Methods[method].wrap(
+ function(proceed, element) {
+ element = $(element);
+ try { element.offsetParent }
+ catch(e) { return Element._returnOffset(0,0) }
+ var position = element.getStyle('position');
+ if (position !== 'static') return proceed(element);
+ var offsetParent = element.getOffsetParent();
+ if (offsetParent && offsetParent.getStyle('position') === 'fixed')
+ offsetParent.setStyle({ zoom: 1 });
+ element.setStyle({ position: 'relative' });
+ var value = proceed(element);
+ element.setStyle({ position: position });
+ return value;
+ }
+ );
+ });
+
+ Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
+ function(proceed, element) {
+ try { element.offsetParent }
+ catch(e) { return Element._returnOffset(0,0) }
+ return proceed(element);
+ }
+ );
+
+ Element.Methods.getStyle = function(element, style) {
+ element = $(element);
+ style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
+ var value = element.style[style];
+ if (!value && element.currentStyle) value = element.currentStyle[style];
+
+ if (style == 'opacity') {
+ if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+ if (value[1]) return parseFloat(value[1]) / 100;
+ return 1.0;
+ }
+
+ if (value == 'auto') {
+ if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
+ return element['offset' + style.capitalize()] + 'px';
+ return null;
+ }
+ return value;
+ };
+
+ Element.Methods.setOpacity = function(element, value) {
+ function stripAlpha(filter){
+ return filter.replace(/alpha\([^\)]*\)/gi,'');
+ }
+ element = $(element);
+ var currentStyle = element.currentStyle;
+ if ((currentStyle && !currentStyle.hasLayout) ||
+ (!currentStyle && element.style.zoom == 'normal'))
+ element.style.zoom = 1;
+
+ var filter = element.getStyle('filter'), style = element.style;
+ if (value == 1 || value === '') {
+ (filter = stripAlpha(filter)) ?
+ style.filter = filter : style.removeAttribute('filter');
+ return element;
+ } else if (value < 0.00001) value = 0;
+ style.filter = stripAlpha(filter) +
+ 'alpha(opacity=' + (value * 100) + ')';
+ return element;
+ };
+
+ Element._attributeTranslations = (function(){
+
+ var classProp = 'className';
+ var forProp = 'for';
+
+ var el = document.createElement('div');
+
+ el.setAttribute(classProp, 'x');
+
+ if (el.className !== 'x') {
+ el.setAttribute('class', 'x');
+ if (el.className === 'x') {
+ classProp = 'class';
+ }
+ }
+ el = null;
+
+ el = document.createElement('label');
+ el.setAttribute(forProp, 'x');
+ if (el.htmlFor !== 'x') {
+ el.setAttribute('htmlFor', 'x');
+ if (el.htmlFor === 'x') {
+ forProp = 'htmlFor';
+ }
+ }
+ el = null;
+
+ return {
+ read: {
+ names: {
+ 'class': classProp,
+ 'className': classProp,
+ 'for': forProp,
+ 'htmlFor': forProp
+ },
+ values: {
+ _getAttr: function(element, attribute) {
+ return element.getAttribute(attribute);
+ },
+ _getAttr2: function(element, attribute) {
+ return element.getAttribute(attribute, 2);
+ },
+ _getAttrNode: function(element, attribute) {
+ var node = element.getAttributeNode(attribute);
+ return node ? node.value : "";
+ },
+ _getEv: (function(){
+
+ var el = document.createElement('div');
+ el.onclick = Prototype.emptyFunction;
+ var value = el.getAttribute('onclick');
+ var f;
+
+ if (String(value).indexOf('{') > -1) {
+ f = function(element, attribute) {
+ attribute = element.getAttribute(attribute);
+ if (!attribute) return null;
+ attribute = attribute.toString();
+ attribute = attribute.split('{')[1];
+ attribute = attribute.split('}')[0];
+ return attribute.strip();
+ };
+ }
+ else if (value === '') {
+ f = function(element, attribute) {
+ attribute = element.getAttribute(attribute);
+ if (!attribute) return null;
+ return attribute.strip();
+ };
+ }
+ el = null;
+ return f;
+ })(),
+ _flag: function(element, attribute) {
+ return $(element).hasAttribute(attribute) ? attribute : null;
+ },
+ style: function(element) {
+ return element.style.cssText.toLowerCase();
+ },
+ title: function(element) {
+ return element.title;
+ }
+ }
+ }
+ }
+ })();
+
+ Element._attributeTranslations.write = {
+ names: Object.extend({
+ cellpadding: 'cellPadding',
+ cellspacing: 'cellSpacing'
+ }, Element._attributeTranslations.read.names),
+ values: {
+ checked: function(element, value) {
+ element.checked = !!value;
+ },
+
+ style: function(element, value) {
+ element.style.cssText = value ? value : '';
+ }
+ }
+ };
+
+ Element._attributeTranslations.has = {};
+
+ $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
+ 'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
+ Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
+ Element._attributeTranslations.has[attr.toLowerCase()] = attr;
+ });
+
+ (function(v) {
+ Object.extend(v, {
+ href: v._getAttr2,
+ src: v._getAttr2,
+ type: v._getAttr,
+ action: v._getAttrNode,
+ disabled: v._flag,
+ checked: v._flag,
+ readonly: v._flag,
+ multiple: v._flag,
+ onload: v._getEv,
+ onunload: v._getEv,
+ onclick: v._getEv,
+ ondblclick: v._getEv,
+ onmousedown: v._getEv,
+ onmouseup: v._getEv,
+ onmouseover: v._getEv,
+ onmousemove: v._getEv,
+ onmouseout: v._getEv,
+ onfocus: v._getEv,
+ onblur: v._getEv,
+ onkeypress: v._getEv,
+ onkeydown: v._getEv,
+ onkeyup: v._getEv,
+ onsubmit: v._getEv,
+ onreset: v._getEv,
+ onselect: v._getEv,
+ onchange: v._getEv
+ });
+ })(Element._attributeTranslations.read.values);
+
+ if (Prototype.BrowserFeatures.ElementExtensions) {
+ (function() {
+ function _descendants(element) {
+ var nodes = element.getElementsByTagName('*'), results = [];
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node.tagName !== "!") // Filter out comment nodes.
+ results.push(node);
+ return results;
+ }
+
+ Element.Methods.down = function(element, expression, index) {
+ element = $(element);
+ if (arguments.length == 1) return element.firstDescendant();
+ return Object.isNumber(expression) ? _descendants(element)[expression] :
+ Element.select(element, expression)[index || 0];
+ }
+ })();
+ }
+
+}
+
+else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
+ Element.Methods.setOpacity = function(element, value) {
+ element = $(element);
+ element.style.opacity = (value == 1) ? 0.999999 :
+ (value === '') ? '' : (value < 0.00001) ? 0 : value;
+ return element;
+ };
+}
+
+else if (Prototype.Browser.WebKit) {
+ Element.Methods.setOpacity = function(element, value) {
+ element = $(element);
+ element.style.opacity = (value == 1 || value === '') ? '' :
+ (value < 0.00001) ? 0 : value;
+
+ if (value == 1)
+ if(element.tagName.toUpperCase() == 'IMG' && element.width) {
+ element.width++; element.width--;
+ } else try {
+ var n = document.createTextNode(' ');
+ element.appendChild(n);
+ element.removeChild(n);
+ } catch (e) { }
+
+ return element;
+ };
+
+ Element.Methods.cumulativeOffset = function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ if (element.offsetParent == document.body)
+ if (Element.getStyle(element, 'position') == 'absolute') break;
+
+ element = element.offsetParent;
+ } while (element);
+
+ return Element._returnOffset(valueL, valueT);
+ };
+}
+
+if ('outerHTML' in document.documentElement) {
+ Element.Methods.replace = function(element, content) {
+ element = $(element);
+
+ if (content && content.toElement) content = content.toElement();
+ if (Object.isElement(content)) {
+ element.parentNode.replaceChild(content, element);
+ return element;
+ }
+
+ content = Object.toHTML(content);
+ var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
+
+ if (Element._insertionTranslations.tags[tagName]) {
+ var nextSibling = element.next();
+ var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+ parent.removeChild(element);
+ if (nextSibling)
+ fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
+ else
+ fragments.each(function(node) { parent.appendChild(node) });
+ }
+ else element.outerHTML = content.stripScripts();
+
+ content.evalScripts.bind(content).defer();
+ return element;
+ };
+}
+
+Element._returnOffset = function(l, t) {
+ var result = [l, t];
+ result.left = l;
+ result.top = t;
+ return result;
+};
+
+Element._getContentFromAnonymousElement = function(tagName, html) {
+ var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
+ if (t) {
+ div.innerHTML = t[0] + html + t[1];
+ t[2].times(function() { div = div.firstChild });
+ } else div.innerHTML = html;
+ return $A(div.childNodes);
+};
+
+Element._insertionTranslations = {
+ before: function(element, node) {
+ element.parentNode.insertBefore(node, element);
+ },
+ top: function(element, node) {
+ element.insertBefore(node, element.firstChild);
+ },
+ bottom: function(element, node) {
+ element.appendChild(node);
+ },
+ after: function(element, node) {
+ element.parentNode.insertBefore(node, element.nextSibling);
+ },
+ tags: {
+ TABLE: ['<table>', '</table>', 1],
+ TBODY: ['<table><tbody>', '</tbody></table>', 2],
+ TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3],
+ TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
+ SELECT: ['<select>', '</select>', 1]
+ }
+};
+
+(function() {
+ var tags = Element._insertionTranslations.tags;
+ Object.extend(tags, {
+ THEAD: tags.TBODY,
+ TFOOT: tags.TBODY,
+ TH: tags.TD
+ });
+})();
+
+Element.Methods.Simulated = {
+ hasAttribute: function(element, attribute) {
+ attribute = Element._attributeTranslations.has[attribute] || attribute;
+ var node = $(element).getAttributeNode(attribute);
+ return !!(node && node.specified);
+ }
+};
+
+Element.Methods.ByTag = { };
+
+Object.extend(Element, Element.Methods);
+
+(function(div) {
+
+ if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {
+ window.HTMLElement = { };
+ window.HTMLElement.prototype = div['__proto__'];
+ Prototype.BrowserFeatures.ElementExtensions = true;
+ }
+
+ div = null;
+
+})(document.createElement('div'))
+
+Element.extend = (function() {
+
+ function checkDeficiency(tagName) {
+ if (typeof window.Element != 'undefined') {
+ var proto = window.Element.prototype;
+ if (proto) {
+ var id = '_' + (Math.random()+'').slice(2);
+ var el = document.createElement(tagName);
+ proto[id] = 'x';
+ var isBuggy = (el[id] !== 'x');
+ delete proto[id];
+ el = null;
+ return isBuggy;
+ }
+ }
+ return false;
+ }
+
+ function extendElementWith(element, methods) {
+ for (var property in methods) {
+ var value = methods[property];
+ if (Object.isFunction(value) && !(property in element))
+ element[property] = value.methodize();
+ }
+ }
+
+ var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');
+
+ if (Prototype.BrowserFeatures.SpecificElementExtensions) {
+ if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {
+ return function(element) {
+ if (element && typeof element._extendedByPrototype == 'undefined') {
+ var t = element.tagName;
+ if (t && (/^(?:object|applet|embed)$/i.test(t))) {
+ extendElementWith(element, Element.Methods);
+ extendElementWith(element, Element.Methods.Simulated);
+ extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);
+ }
+ }
+ return element;
+ }
+ }
+ return Prototype.K;
+ }
+
+ var Methods = { }, ByTag = Element.Methods.ByTag;
+
+ var extend = Object.extend(function(element) {
+ if (!element || typeof element._extendedByPrototype != 'undefined' ||
+ element.nodeType != 1 || element == window) return element;
+
+ var methods = Object.clone(Methods),
+ tagName = element.tagName.toUpperCase();
+
+ if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
+
+ extendElementWith(element, methods);
+
+ element._extendedByPrototype = Prototype.emptyFunction;
+ return element;
+
+ }, {
+ refresh: function() {
+ if (!Prototype.BrowserFeatures.ElementExtensions) {
+ Object.extend(Methods, Element.Methods);
+ Object.extend(Methods, Element.Methods.Simulated);
+ }
+ }
+ });
+
+ extend.refresh();
+ return extend;
+})();
+
+Element.hasAttribute = function(element, attribute) {
+ if (element.hasAttribute) return element.hasAttribute(attribute);
+ return Element.Methods.Simulated.hasAttribute(element, attribute);
+};
+
+Element.addMethods = function(methods) {
+ var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
+
+ if (!methods) {
+ Object.extend(Form, Form.Methods);
+ Object.extend(Form.Element, Form.Element.Methods);
+ Object.extend(Element.Methods.ByTag, {
+ "FORM": Object.clone(Form.Methods),
+ "INPUT": Object.clone(Form.Element.Methods),
+ "SELECT": Object.clone(Form.Element.Methods),
+ "TEXTAREA": Object.clone(Form.Element.Methods)
+ });
+ }
+
+ if (arguments.length == 2) {
+ var tagName = methods;
+ methods = arguments[1];
+ }
+
+ if (!tagName) Object.extend(Element.Methods, methods || { });
+ else {
+ if (Object.isArray(tagName)) tagName.each(extend);
+ else extend(tagName);
+ }
+
+ function extend(tagName) {
+ tagName = tagName.toUpperCase();
+ if (!Element.Methods.ByTag[tagName])
+ Element.Methods.ByTag[tagName] = { };
+ Object.extend(Element.Methods.ByTag[tagName], methods);
+ }
+
+ function copy(methods, destination, onlyIfAbsent) {
+ onlyIfAbsent = onlyIfAbsent || false;
+ for (var property in methods) {
+ var value = methods[property];
+ if (!Object.isFunction(value)) continue;
+ if (!onlyIfAbsent || !(property in destination))
+ destination[property] = value.methodize();
+ }
+ }
+
+ function findDOMClass(tagName) {
+ var klass;
+ var trans = {
+ "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
+ "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
+ "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
+ "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
+ "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
+ "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
+ "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
+ "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
+ "FrameSet", "IFRAME": "IFrame"
+ };
+ if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
+ if (window[klass]) return window[klass];
+ klass = 'HTML' + tagName + 'Element';
+ if (window[klass]) return window[klass];
+ klass = 'HTML' + tagName.capitalize() + 'Element';
+ if (window[klass]) return window[klass];
+
+ var element = document.createElement(tagName);
+ var proto = element['__proto__'] || element.constructor.prototype;
+ element = null;
+ return proto;
+ }
+
+ var elementPrototype = window.HTMLElement ? HTMLElement.prototype :
+ Element.prototype;
+
+ if (F.ElementExtensions) {
+ copy(Element.Methods, elementPrototype);
+ copy(Element.Methods.Simulated, elementPrototype, true);
+ }
+
+ if (F.SpecificElementExtensions) {
+ for (var tag in Element.Methods.ByTag) {
+ var klass = findDOMClass(tag);
+ if (Object.isUndefined(klass)) continue;
+ copy(T[tag], klass.prototype);
+ }
+ }
+
+ Object.extend(Element, Element.Methods);
+ delete Element.ByTag;
+
+ if (Element.extend.refresh) Element.extend.refresh();
+ Element.cache = { };
+};
+
+
+document.viewport = {
+
+ getDimensions: function() {
+ return { width: this.getWidth(), height: this.getHeight() };
+ },
+
+ getScrollOffsets: function() {
+ return Element._returnOffset(
+ window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
+ window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
+ }
+};
+
+(function(viewport) {
+ var B = Prototype.Browser, doc = document, element, property = {};
+
+ function getRootElement() {
+ if (B.WebKit && !doc.evaluate)
+ return document;
+
+ if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)
+ return document.body;
+
+ return document.documentElement;
+ }
+
+ function define(D) {
+ if (!element) element = getRootElement();
+
+ property[D] = 'client' + D;
+
+ viewport['get' + D] = function() { return element[property[D]] };
+ return viewport['get' + D]();
+ }
+
+ viewport.getWidth = define.curry('Width');
+
+ viewport.getHeight = define.curry('Height');
+})(document.viewport);
+
+
+Element.Storage = {
+ UID: 1
+};
+
+Element.addMethods({
+ getStorage: function(element) {
+ if (!(element = $(element))) return;
+
+ var uid;
+ if (element === window) {
+ uid = 0;
+ } else {
+ if (typeof element._prototypeUID === "undefined")
+ element._prototypeUID = [Element.Storage.UID++];
+ uid = element._prototypeUID[0];
+ }
+
+ if (!Element.Storage[uid])
+ Element.Storage[uid] = $H();
+
+ return Element.Storage[uid];
+ },
+
+ store: function(element, key, value) {
+ if (!(element = $(element))) return;
+
+ if (arguments.length === 2) {
+ Element.getStorage(element).update(key);
+ } else {
+ Element.getStorage(element).set(key, value);
+ }
+
+ return element;
+ },
+
+ retrieve: function(element, key, defaultValue) {
+ if (!(element = $(element))) return;
+ var hash = Element.getStorage(element), value = hash.get(key);
+
+ if (Object.isUndefined(value)) {
+ hash.set(key, defaultValue);
+ value = defaultValue;
+ }
+
+ return value;
+ },
+
+ clone: function(element, deep) {
+ if (!(element = $(element))) return;
+ var clone = element.cloneNode(deep);
+ clone._prototypeUID = void 0;
+ if (deep) {
+ var descendants = Element.select(clone, '*'),
+ i = descendants.length;
+ while (i--) {
+ descendants[i]._prototypeUID = void 0;
+ }
+ }
+ return Element.extend(clone);
+ }
+});
+/* Portions of the Selector class are derived from Jack Slocum's DomQuery,
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
+ * license. Please see http://www.yui-ext.com/ for more information. */
+
+var Selector = Class.create({
+ initialize: function(expression) {
+ this.expression = expression.strip();
+
+ if (this.shouldUseSelectorsAPI()) {
+ this.mode = 'selectorsAPI';
+ } else if (this.shouldUseXPath()) {
+ this.mode = 'xpath';
+ this.compileXPathMatcher();
+ } else {
+ this.mode = "normal";
+ this.compileMatcher();
+ }
+
+ },
+
+ shouldUseXPath: (function() {
+
+ var IS_DESCENDANT_SELECTOR_BUGGY = (function(){
+ var isBuggy = false;
+ if (document.evaluate && window.XPathResult) {
+ var el = document.createElement('div');
+ el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>';
+
+ var xpath = ".//*[local-name()='ul' or local-name()='UL']" +
+ "//*[local-name()='li' or local-name()='LI']";
+
+ var result = document.evaluate(xpath, el, null,
+ XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ isBuggy = (result.snapshotLength !== 2);
+ el = null;
+ }
+ return isBuggy;
+ })();
+
+ return function() {
+ if (!Prototype.BrowserFeatures.XPath) return false;
+
+ var e = this.expression;
+
+ if (Prototype.Browser.WebKit &&
+ (e.include("-of-type") || e.include(":empty")))
+ return false;
+
+ if ((/(\[[\w-]*?:|:checked)/).test(e))
+ return false;
+
+ if (IS_DESCENDANT_SELECTOR_BUGGY) return false;
+
+ return true;
+ }
+
+ })(),
+
+ shouldUseSelectorsAPI: function() {
+ if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
+
+ if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false;
+
+ if (!Selector._div) Selector._div = new Element('div');
+
+ try {
+ Selector._div.querySelector(this.expression);
+ } catch(e) {
+ return false;
+ }
+
+ return true;
+ },
+
+ compileMatcher: function() {
+ var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
+ c = Selector.criteria, le, p, m, len = ps.length, name;
+
+ if (Selector._cache[e]) {
+ this.matcher = Selector._cache[e];
+ return;
+ }
+
+ this.matcher = ["this.matcher = function(root) {",
+ "var r = root, h = Selector.handlers, c = false, n;"];
+
+ while (e && le != e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ p = ps[i].re;
+ name = ps[i].name;
+ if (m = e.match(p)) {
+ this.matcher.push(Object.isFunction(c[name]) ? c[name](m) :
+ new Template(c[name]).evaluate(m));
+ e = e.replace(m[0], '');
+ break;
+ }
+ }
+ }
+
+ this.matcher.push("return h.unique(n);\n}");
+ eval(this.matcher.join('\n'));
+ Selector._cache[this.expression] = this.matcher;
+ },
+
+ compileXPathMatcher: function() {
+ var e = this.expression, ps = Selector.patterns,
+ x = Selector.xpath, le, m, len = ps.length, name;
+
+ if (Selector._cache[e]) {
+ this.xpath = Selector._cache[e]; return;
+ }
+
+ this.matcher = ['.//*'];
+ while (e && le != e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ name = ps[i].name;
+ if (m = e.match(ps[i].re)) {
+ this.matcher.push(Object.isFunction(x[name]) ? x[name](m) :
+ new Template(x[name]).evaluate(m));
+ e = e.replace(m[0], '');
+ break;
+ }
+ }
+ }
+
+ this.xpath = this.matcher.join('');
+ Selector._cache[this.expression] = this.xpath;
+ },
+
+ findElements: function(root) {
+ root = root || document;
+ var e = this.expression, results;
+
+ switch (this.mode) {
+ case 'selectorsAPI':
+ if (root !== document) {
+ var oldId = root.id, id = $(root).identify();
+ id = id.replace(/([\.:])/g, "\\$1");
+ e = "#" + id + " " + e;
+ }
+
+ results = $A(root.querySelectorAll(e)).map(Element.extend);
+ root.id = oldId;
+
+ return results;
+ case 'xpath':
+ return document._getElementsByXPath(this.xpath, root);
+ default:
+ return this.matcher(root);
+ }
+ },
+
+ match: function(element) {
+ this.tokens = [];
+
+ var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
+ var le, p, m, len = ps.length, name;
+
+ while (e && le !== e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ p = ps[i].re;
+ name = ps[i].name;
+ if (m = e.match(p)) {
+ if (as[name]) {
+ this.tokens.push([name, Object.clone(m)]);
+ e = e.replace(m[0], '');
+ } else {
+ return this.findElements(document).include(element);
+ }
+ }
+ }
+ }
+
+ var match = true, name, matches;
+ for (var i = 0, token; token = this.tokens[i]; i++) {
+ name = token[0], matches = token[1];
+ if (!Selector.assertions[name](element, matches)) {
+ match = false; break;
+ }
+ }
+
+ return match;
+ },
+
+ toString: function() {
+ return this.expression;
+ },
+
+ inspect: function() {
+ return "#<Selector:" + this.expression.inspect() + ">";
+ }
+});
+
+if (Prototype.BrowserFeatures.SelectorsAPI &&
+ document.compatMode === 'BackCompat') {
+ Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){
+ var div = document.createElement('div'),
+ span = document.createElement('span');
+
+ div.id = "prototype_test_id";
+ span.className = 'Test';
+ div.appendChild(span);
+ var isIgnored = (div.querySelector('#prototype_test_id .test') !== null);
+ div = span = null;
+ return isIgnored;
+ })();
+}
+
+Object.extend(Selector, {
+ _cache: { },
+
+ xpath: {
+ descendant: "//*",
+ child: "/*",
+ adjacent: "/following-sibling::*[1]",
+ laterSibling: '/following-sibling::*',
+ tagName: function(m) {
+ if (m[1] == '*') return '';
+ return "[local-name()='" + m[1].toLowerCase() +
+ "' or local-name()='" + m[1].toUpperCase() + "']";
+ },
+ className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
+ id: "[@id='#{1}']",
+ attrPresence: function(m) {
+ m[1] = m[1].toLowerCase();
+ return new Template("[@#{1}]").evaluate(m);
+ },
+ attr: function(m) {
+ m[1] = m[1].toLowerCase();
+ m[3] = m[5] || m[6];
+ return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
+ },
+ pseudo: function(m) {
+ var h = Selector.xpath.pseudos[m[1]];
+ if (!h) return '';
+ if (Object.isFunction(h)) return h(m);
+ return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
+ },
+ operators: {
+ '=': "[@#{1}='#{3}']",
+ '!=': "[@#{1}!='#{3}']",
+ '^=': "[starts-with(@#{1}, '#{3}')]",
+ '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
+ '*=': "[contains(@#{1}, '#{3}')]",
+ '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
+ '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
+ },
+ pseudos: {
+ 'first-child': '[not(preceding-sibling::*)]',
+ 'last-child': '[not(following-sibling::*)]',
+ 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
+ 'empty': "[count(*) = 0 and (count(text()) = 0)]",
+ 'checked': "[@checked]",
+ 'disabled': "[(@disabled) and (@type!='hidden')]",
+ 'enabled': "[not(@disabled) and (@type!='hidden')]",
+ 'not': function(m) {
+ var e = m[6], p = Selector.patterns,
+ x = Selector.xpath, le, v, len = p.length, name;
+
+ var exclusion = [];
+ while (e && le != e && (/\S/).test(e)) {
+ le = e;
+ for (var i = 0; i<len; i++) {
+ name = p[i].name
+ if (m = e.match(p[i].re)) {
+ v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m);
+ exclusion.push("(" + v.substring(1, v.length - 1) + ")");
+ e = e.replace(m[0], '');
+ break;
+ }
+ }
+ }
+ return "[not(" + exclusion.join(" and ") + ")]";
+ },
+ 'nth-child': function(m) {
+ return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
+ },
+ 'nth-last-child': function(m) {
+ return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
+ },
+ 'nth-of-type': function(m) {
+ return Selector.xpath.pseudos.nth("position() ", m);
+ },
+ 'nth-last-of-type': function(m) {
+ return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
+ },
+ 'first-of-type': function(m) {
+ m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
+ },
+ 'last-of-type': function(m) {
+ m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
+ },
+ 'only-of-type': function(m) {
+ var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
+ },
+ nth: function(fragment, m) {
+ var mm, formula = m[6], predicate;
+ if (formula == 'even') formula = '2n+0';
+ if (formula == 'odd') formula = '2n+1';
+ if (mm = formula.match(/^(\d+)$/)) // digit only
+ return '[' + fragment + "= " + mm[1] + ']';
+ if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+ if (mm[1] == "-") mm[1] = -1;
+ var a = mm[1] ? Number(mm[1]) : 1;
+ var b = mm[2] ? Number(mm[2]) : 0;
+ predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
+ "((#{fragment} - #{b}) div #{a} >= 0)]";
+ return new Template(predicate).evaluate({
+ fragment: fragment, a: a, b: b });
+ }
+ }
+ }
+ },
+
+ criteria: {
+ tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
+ className: 'n = h.className(n, r, "#{1}", c); c = false;',
+ id: 'n = h.id(n, r, "#{1}", c); c = false;',
+ attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
+ attr: function(m) {
+ m[3] = (m[5] || m[6]);
+ return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
+ },
+ pseudo: function(m) {
+ if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
+ return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
+ },
+ descendant: 'c = "descendant";',
+ child: 'c = "child";',
+ adjacent: 'c = "adjacent";',
+ laterSibling: 'c = "laterSibling";'
+ },
+
+ patterns: [
+ { name: 'laterSibling', re: /^\s*~\s*/ },
+ { name: 'child', re: /^\s*>\s*/ },
+ { name: 'adjacent', re: /^\s*\+\s*/ },
+ { name: 'descendant', re: /^\s/ },
+
+ { name: 'tagName', re: /^\s*(\*|[\w\-]+)(\b|$)?/ },
+ { name: 'id', re: /^#([\w\-\*]+)(\b|$)/ },
+ { name: 'className', re: /^\.([\w\-\*]+)(\b|$)/ },
+ { name: 'pseudo', re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ },
+ { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ },
+ { name: 'attr', re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ }
+ ],
+
+ assertions: {
+ tagName: function(element, matches) {
+ return matches[1].toUpperCase() == element.tagName.toUpperCase();
+ },
+
+ className: function(element, matches) {
+ return Element.hasClassName(element, matches[1]);
+ },
+
+ id: function(element, matches) {
+ return element.id === matches[1];
+ },
+
+ attrPresence: function(element, matches) {
+ return Element.hasAttribute(element, matches[1]);
+ },
+
+ attr: function(element, matches) {
+ var nodeValue = Element.readAttribute(element, matches[1]);
+ return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
+ }
+ },
+
+ handlers: {
+ concat: function(a, b) {
+ for (var i = 0, node; node = b[i]; i++)
+ a.push(node);
+ return a;
+ },
+
+ mark: function(nodes) {
+ var _true = Prototype.emptyFunction;
+ for (var i = 0, node; node = nodes[i]; i++)
+ node._countedByPrototype = _true;
+ return nodes;
+ },
+
+ unmark: (function(){
+
+ var PROPERTIES_ATTRIBUTES_MAP = (function(){
+ var el = document.createElement('div'),
+ isBuggy = false,
+ propName = '_countedByPrototype',
+ value = 'x'
+ el[propName] = value;
+ isBuggy = (el.getAttribute(propName) === value);
+ el = null;
+ return isBuggy;
+ })();
+
+ return PROPERTIES_ATTRIBUTES_MAP ?
+ function(nodes) {
+ for (var i = 0, node; node = nodes[i]; i++)
+ node.removeAttribute('_countedByPrototype');
+ return nodes;
+ } :
+ function(nodes) {
+ for (var i = 0, node; node = nodes[i]; i++)
+ node._countedByPrototype = void 0;
+ return nodes;
+ }
+ })(),
+
+ index: function(parentNode, reverse, ofType) {
+ parentNode._countedByPrototype = Prototype.emptyFunction;
+ if (reverse) {
+ for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
+ var node = nodes[i];
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+ }
+ } else {
+ for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
+ if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+ }
+ },
+
+ unique: function(nodes) {
+ if (nodes.length == 0) return nodes;
+ var results = [], n;
+ for (var i = 0, l = nodes.length; i < l; i++)
+ if (typeof (n = nodes[i])._countedByPrototype == 'undefined') {
+ n._countedByPrototype = Prototype.emptyFunction;
+ results.push(Element.extend(n));
+ }
+ return Selector.handlers.unmark(results);
+ },
+
+ descendant: function(nodes) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ h.concat(results, node.getElementsByTagName('*'));
+ return results;
+ },
+
+ child: function(nodes) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ for (var j = 0, child; child = node.childNodes[j]; j++)
+ if (child.nodeType == 1 && child.tagName != '!') results.push(child);
+ }
+ return results;
+ },
+
+ adjacent: function(nodes) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ var next = this.nextElementSibling(node);
+ if (next) results.push(next);
+ }
+ return results;
+ },
+
+ laterSibling: function(nodes) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ h.concat(results, Element.nextSiblings(node));
+ return results;
+ },
+
+ nextElementSibling: function(node) {
+ while (node = node.nextSibling)
+ if (node.nodeType == 1) return node;
+ return null;
+ },
+
+ previousElementSibling: function(node) {
+ while (node = node.previousSibling)
+ if (node.nodeType == 1) return node;
+ return null;
+ },
+
+ tagName: function(nodes, root, tagName, combinator) {
+ var uTagName = tagName.toUpperCase();
+ var results = [], h = Selector.handlers;
+ if (nodes) {
+ if (combinator) {
+ if (combinator == "descendant") {
+ for (var i = 0, node; node = nodes[i]; i++)
+ h.concat(results, node.getElementsByTagName(tagName));
+ return results;
+ } else nodes = this[combinator](nodes);
+ if (tagName == "*") return nodes;
+ }
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node.tagName.toUpperCase() === uTagName) results.push(node);
+ return results;
+ } else return root.getElementsByTagName(tagName);
+ },
+
+ id: function(nodes, root, id, combinator) {
+ var targetNode = $(id), h = Selector.handlers;
+
+ if (root == document) {
+ if (!targetNode) return [];
+ if (!nodes) return [targetNode];
+ } else {
+ if (!root.sourceIndex || root.sourceIndex < 1) {
+ var nodes = root.getElementsByTagName('*');
+ for (var j = 0, node; node = nodes[j]; j++) {
+ if (node.id === id) return [node];
+ }
+ }
+ }
+
+ if (nodes) {
+ if (combinator) {
+ if (combinator == 'child') {
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (targetNode.parentNode == node) return [targetNode];
+ } else if (combinator == 'descendant') {
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (Element.descendantOf(targetNode, node)) return [targetNode];
+ } else if (combinator == 'adjacent') {
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (Selector.handlers.previousElementSibling(targetNode) == node)
+ return [targetNode];
+ } else nodes = h[combinator](nodes);
+ }
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node == targetNode) return [targetNode];
+ return [];
+ }
+ return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
+ },
+
+ className: function(nodes, root, className, combinator) {
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ return Selector.handlers.byClassName(nodes, root, className);
+ },
+
+ byClassName: function(nodes, root, className) {
+ if (!nodes) nodes = Selector.handlers.descendant([root]);
+ var needle = ' ' + className + ' ';
+ for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
+ nodeClassName = node.className;
+ if (nodeClassName.length == 0) continue;
+ if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
+ results.push(node);
+ }
+ return results;
+ },
+
+ attrPresence: function(nodes, root, attr, combinator) {
+ if (!nodes) nodes = root.getElementsByTagName("*");
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ var results = [];
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (Element.hasAttribute(node, attr)) results.push(node);
+ return results;
+ },
+
+ attr: function(nodes, root, attr, value, operator, combinator) {
+ if (!nodes) nodes = root.getElementsByTagName("*");
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ var handler = Selector.operators[operator], results = [];
+ for (var i = 0, node; node = nodes[i]; i++) {
+ var nodeValue = Element.readAttribute(node, attr);
+ if (nodeValue === null) continue;
+ if (handler(nodeValue, value)) results.push(node);
+ }
+ return results;
+ },
+
+ pseudo: function(nodes, name, value, root, combinator) {
+ if (nodes && combinator) nodes = this[combinator](nodes);
+ if (!nodes) nodes = root.getElementsByTagName("*");
+ return Selector.pseudos[name](nodes, value, root);
+ }
+ },
+
+ pseudos: {
+ 'first-child': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ if (Selector.handlers.previousElementSibling(node)) continue;
+ results.push(node);
+ }
+ return results;
+ },
+ 'last-child': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ if (Selector.handlers.nextElementSibling(node)) continue;
+ results.push(node);
+ }
+ return results;
+ },
+ 'only-child': function(nodes, value, root) {
+ var h = Selector.handlers;
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
+ results.push(node);
+ return results;
+ },
+ 'nth-child': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root);
+ },
+ 'nth-last-child': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root, true);
+ },
+ 'nth-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root, false, true);
+ },
+ 'nth-last-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, formula, root, true, true);
+ },
+ 'first-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, "1", root, false, true);
+ },
+ 'last-of-type': function(nodes, formula, root) {
+ return Selector.pseudos.nth(nodes, "1", root, true, true);
+ },
+ 'only-of-type': function(nodes, formula, root) {
+ var p = Selector.pseudos;
+ return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
+ },
+
+ getIndices: function(a, b, total) {
+ if (a == 0) return b > 0 ? [b] : [];
+ return $R(1, total).inject([], function(memo, i) {
+ if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
+ return memo;
+ });
+ },
+
+ nth: function(nodes, formula, root, reverse, ofType) {
+ if (nodes.length == 0) return [];
+ if (formula == 'even') formula = '2n+0';
+ if (formula == 'odd') formula = '2n+1';
+ var h = Selector.handlers, results = [], indexed = [], m;
+ h.mark(nodes);
+ for (var i = 0, node; node = nodes[i]; i++) {
+ if (!node.parentNode._countedByPrototype) {
+ h.index(node.parentNode, reverse, ofType);
+ indexed.push(node.parentNode);
+ }
+ }
+ if (formula.match(/^\d+$/)) { // just a number
+ formula = Number(formula);
+ for (var i = 0, node; node = nodes[i]; i++)
+ if (node.nodeIndex == formula) results.push(node);
+ } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+ if (m[1] == "-") m[1] = -1;
+ var a = m[1] ? Number(m[1]) : 1;
+ var b = m[2] ? Number(m[2]) : 0;
+ var indices = Selector.pseudos.getIndices(a, b, nodes.length);
+ for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
+ for (var j = 0; j < l; j++)
+ if (node.nodeIndex == indices[j]) results.push(node);
+ }
+ }
+ h.unmark(nodes);
+ h.unmark(indexed);
+ return results;
+ },
+
+ 'empty': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++) {
+ if (node.tagName == '!' || node.firstChild) continue;
+ results.push(node);
+ }
+ return results;
+ },
+
+ 'not': function(nodes, selector, root) {
+ var h = Selector.handlers, selectorType, m;
+ var exclusions = new Selector(selector).findElements(root);
+ h.mark(exclusions);
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (!node._countedByPrototype) results.push(node);
+ h.unmark(exclusions);
+ return results;
+ },
+
+ 'enabled': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (!node.disabled && (!node.type || node.type !== 'hidden'))
+ results.push(node);
+ return results;
+ },
+
+ 'disabled': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (node.disabled) results.push(node);
+ return results;
+ },
+
+ 'checked': function(nodes, value, root) {
+ for (var i = 0, results = [], node; node = nodes[i]; i++)
+ if (node.checked) results.push(node);
+ return results;
+ }
+ },
+
+ operators: {
+ '=': function(nv, v) { return nv == v; },
+ '!=': function(nv, v) { return nv != v; },
+ '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
+ '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
+ '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
+ '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
+ '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
+ '-').include('-' + (v || "").toUpperCase() + '-'); }
+ },
+
+ split: function(expression) {
+ var expressions = [];
+ expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
+ expressions.push(m[1].strip());
+ });
+ return expressions;
+ },
+
+ matchElements: function(elements, expression) {
+ var matches = $$(expression), h = Selector.handlers;
+ h.mark(matches);
+ for (var i = 0, results = [], element; element = elements[i]; i++)
+ if (element._countedByPrototype) results.push(element);
+ h.unmark(matches);
+ return results;
+ },
+
+ findElement: function(elements, expression, index) {
+ if (Object.isNumber(expression)) {
+ index = expression; expression = false;
+ }
+ return Selector.matchElements(elements, expression || '*')[index || 0];
+ },
+
+ findChildElements: function(element, expressions) {
+ expressions = Selector.split(expressions.join(','));
+ var results = [], h = Selector.handlers;
+ for (var i = 0, l = expressions.length, selector; i < l; i++) {
+ selector = new Selector(expressions[i].strip());
+ h.concat(results, selector.findElements(element));
+ }
+ return (l > 1) ? h.unique(results) : results;
+ }
+});
+
+if (Prototype.Browser.IE) {
+ Object.extend(Selector.handlers, {
+ concat: function(a, b) {
+ for (var i = 0, node; node = b[i]; i++)
+ if (node.tagName !== "!") a.push(node);
+ return a;
+ }
+ });
+}
+
+function $$() {
+ return Selector.findChildElements(document, $A(arguments));
+}
+
+var Form = {
+ reset: function(form) {
+ form = $(form);
+ form.reset();
+ return form;
+ },
+
+ serializeElements: function(elements, options) {
+ if (typeof options != 'object') options = { hash: !!options };
+ else if (Object.isUndefined(options.hash)) options.hash = true;
+ var key, value, submitted = false, submit = options.submit;
+
+ var data = elements.inject({ }, function(result, element) {
+ if (!element.disabled && element.name) {
+ key = element.name; value = $(element).getValue();
+ if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
+ submit !== false && (!submit || key == submit) && (submitted = true)))) {
+ if (key in result) {
+ if (!Object.isArray(result[key])) result[key] = [result[key]];
+ result[key].push(value);
+ }
+ else result[key] = value;
+ }
+ }
+ return result;
+ });
+
+ return options.hash ? data : Object.toQueryString(data);
+ }
+};
+
+Form.Methods = {
+ serialize: function(form, options) {
+ return Form.serializeElements(Form.getElements(form), options);
+ },
+
+ getElements: function(form) {
+ var elements = $(form).getElementsByTagName('*'),
+ element,
+ arr = [ ],
+ serializers = Form.Element.Serializers;
+ for (var i = 0; element = elements[i]; i++) {
+ arr.push(element);
+ }
+ return arr.inject([], function(elements, child) {
+ if (serializers[child.tagName.toLowerCase()])
+ elements.push(Element.extend(child));
+ return elements;
+ })
+ },
+
+ getInputs: function(form, typeName, name) {
+ form = $(form);
+ var inputs = form.getElementsByTagName('input');
+
+ if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+ for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+ var input = inputs[i];
+ if ((typeName && input.type != typeName) || (name && input.name != name))
+ continue;
+ matchingInputs.push(Element.extend(input));
+ }
+
+ return matchingInputs;
+ },
+
+ disable: function(form) {
+ form = $(form);
+ Form.getElements(form).invoke('disable');
+ return form;
+ },
+
+ enable: function(form) {
+ form = $(form);
+ Form.getElements(form).invoke('enable');
+ return form;
+ },
+
+ findFirstElement: function(form) {
+ var elements = $(form).getElements().findAll(function(element) {
+ return 'hidden' != element.type && !element.disabled;
+ });
+ var firstByIndex = elements.findAll(function(element) {
+ return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
+ }).sortBy(function(element) { return element.tabIndex }).first();
+
+ return firstByIndex ? firstByIndex : elements.find(function(element) {
+ return /^(?:input|select|textarea)$/i.test(element.tagName);
+ });
+ },
+
+ focusFirstElement: function(form) {
+ form = $(form);
+ form.findFirstElement().activate();
+ return form;
+ },
+
+ request: function(form, options) {
+ form = $(form), options = Object.clone(options || { });
+
+ var params = options.parameters, action = form.readAttribute('action') || '';
+ if (action.blank()) action = window.location.href;
+ options.parameters = form.serialize(true);
+
+ if (params) {
+ if (Object.isString(params)) params = params.toQueryParams();
+ Object.extend(options.parameters, params);
+ }
+
+ if (form.hasAttribute('method') && !options.method)
+ options.method = form.method;
+
+ return new Ajax.Request(action, options);
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+
+Form.Element = {
+ focus: function(element) {
+ $(element).focus();
+ return element;
+ },
+
+ select: function(element) {
+ $(element).select();
+ return element;
+ }
+};
+
+Form.Element.Methods = {
+
+ serialize: function(element) {
+ element = $(element);
+ if (!element.disabled && element.name) {
+ var value = element.getValue();
+ if (value != undefined) {
+ var pair = { };
+ pair[element.name] = value;
+ return Object.toQueryString(pair);
+ }
+ }
+ return '';
+ },
+
+ getValue: function(element) {
+ element = $(element);
+ var method = element.tagName.toLowerCase();
+ return Form.Element.Serializers[method](element);
+ },
+
+ setValue: function(element, value) {
+ element = $(element);
+ var method = element.tagName.toLowerCase();
+ Form.Element.Serializers[method](element, value);
+ return element;
+ },
+
+ clear: function(element) {
+ $(element).value = '';
+ return element;
+ },
+
+ present: function(element) {
+ return $(element).value != '';
+ },
+
+ activate: function(element) {
+ element = $(element);
+ try {
+ element.focus();
+ if (element.select && (element.tagName.toLowerCase() != 'input' ||
+ !(/^(?:button|reset|submit)$/i.test(element.type))))
+ element.select();
+ } catch (e) { }
+ return element;
+ },
+
+ disable: function(element) {
+ element = $(element);
+ element.disabled = true;
+ return element;
+ },
+
+ enable: function(element) {
+ element = $(element);
+ element.disabled = false;
+ return element;
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Field = Form.Element;
+
+var $F = Form.Element.Methods.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+ input: function(element, value) {
+ switch (element.type.toLowerCase()) {
+ case 'checkbox':
+ case 'radio':
+ return Form.Element.Serializers.inputSelector(element, value);
+ default:
+ return Form.Element.Serializers.textarea(element, value);
+ }
+ },
+
+ inputSelector: function(element, value) {
+ if (Object.isUndefined(value)) return element.checked ? element.value : null;
+ else element.checked = !!value;
+ },
+
+ textarea: function(element, value) {
+ if (Object.isUndefined(value)) return element.value;
+ else element.value = value;
+ },
+
+ select: function(element, value) {
+ if (Object.isUndefined(value))
+ return this[element.type == 'select-one' ?
+ 'selectOne' : 'selectMany'](element);
+ else {
+ var opt, currentValue, single = !Object.isArray(value);
+ for (var i = 0, length = element.length; i < length; i++) {
+ opt = element.options[i];
+ currentValue = this.optionValue(opt);
+ if (single) {
+ if (currentValue == value) {
+ opt.selected = true;
+ return;
+ }
+ }
+ else opt.selected = value.include(currentValue);
+ }
+ }
+ },
+
+ selectOne: function(element) {
+ var index = element.selectedIndex;
+ return index >= 0 ? this.optionValue(element.options[index]) : null;
+ },
+
+ selectMany: function(element) {
+ var values, length = element.length;
+ if (!length) return null;
+
+ for (var i = 0, values = []; i < length; i++) {
+ var opt = element.options[i];
+ if (opt.selected) values.push(this.optionValue(opt));
+ }
+ return values;
+ },
+
+ optionValue: function(opt) {
+ return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+
+Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
+ initialize: function($super, element, frequency, callback) {
+ $super(callback, frequency);
+ this.element = $(element);
+ this.lastValue = this.getValue();
+ },
+
+ execute: function() {
+ var value = this.getValue();
+ if (Object.isString(this.lastValue) && Object.isString(value) ?
+ this.lastValue != value : String(this.lastValue) != String(value)) {
+ this.callback(this.element, value);
+ this.lastValue = value;
+ }
+ }
+});
+
+Form.Element.Observer = Class.create(Abstract.TimedObserver, {
+ getValue: function() {
+ return Form.Element.getValue(this.element);
+ }
+});
+
+Form.Observer = Class.create(Abstract.TimedObserver, {
+ getValue: function() {
+ return Form.serialize(this.element);
+ }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = Class.create({
+ initialize: function(element, callback) {
+ this.element = $(element);
+ this.callback = callback;
+
+ this.lastValue = this.getValue();
+ if (this.element.tagName.toLowerCase() == 'form')
+ this.registerFormCallbacks();
+ else
+ this.registerCallback(this.element);
+ },
+
+ onElementEvent: function() {
+ var value = this.getValue();
+ if (this.lastValue != value) {
+ this.callback(this.element, value);
+ this.lastValue = value;
+ }
+ },
+
+ registerFormCallbacks: function() {
+ Form.getElements(this.element).each(this.registerCallback, this);
+ },
+
+ registerCallback: function(element) {
+ if (element.type) {
+ switch (element.type.toLowerCase()) {
+ case 'checkbox':
+ case 'radio':
+ Event.observe(element, 'click', this.onElementEvent.bind(this));
+ break;
+ default:
+ Event.observe(element, 'change', this.onElementEvent.bind(this));
+ break;
+ }
+ }
+ }
+});
+
+Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
+ getValue: function() {
+ return Form.Element.getValue(this.element);
+ }
+});
+
+Form.EventObserver = Class.create(Abstract.EventObserver, {
+ getValue: function() {
+ return Form.serialize(this.element);
+ }
+});
+(function() {
+
+ var Event = {
+ KEY_BACKSPACE: 8,
+ KEY_TAB: 9,
+ KEY_RETURN: 13,
+ KEY_ESC: 27,
+ KEY_LEFT: 37,
+ KEY_UP: 38,
+ KEY_RIGHT: 39,
+ KEY_DOWN: 40,
+ KEY_DELETE: 46,
+ KEY_HOME: 36,
+ KEY_END: 35,
+ KEY_PAGEUP: 33,
+ KEY_PAGEDOWN: 34,
+ KEY_INSERT: 45,
+
+ cache: {}
+ };
+
+ var docEl = document.documentElement;
+ var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl
+ && 'onmouseleave' in docEl;
+
+ var _isButton;
+ if (Prototype.Browser.IE) {
+ var buttonMap = { 0: 1, 1: 4, 2: 2 };
+ _isButton = function(event, code) {
+ return event.button === buttonMap[code];
+ };
+ } else if (Prototype.Browser.WebKit) {
+ _isButton = function(event, code) {
+ switch (code) {
+ case 0: return event.which == 1 && !event.metaKey;
+ case 1: return event.which == 1 && event.metaKey;
+ default: return false;
+ }
+ };
+ } else {
+ _isButton = function(event, code) {
+ return event.which ? (event.which === code + 1) : (event.button === code);
+ };
+ }
+
+ function isLeftClick(event) { return _isButton(event, 0) }
+
+ function isMiddleClick(event) { return _isButton(event, 1) }
+
+ function isRightClick(event) { return _isButton(event, 2) }
+
+ function element(event) {
+ event = Event.extend(event);
+
+ var node = event.target, type = event.type,
+ currentTarget = event.currentTarget;
+
+ if (currentTarget && currentTarget.tagName) {
+ if (type === 'load' || type === 'error' ||
+ (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
+ && currentTarget.type === 'radio'))
+ node = currentTarget;
+ }
+
+ if (node.nodeType == Node.TEXT_NODE)
+ node = node.parentNode;
+
+ return Element.extend(node);
+ }
+
+ function findElement(event, expression) {
+ var element = Event.element(event);
+ if (!expression) return element;
+ var elements = [element].concat(element.ancestors());
+ return Selector.findElement(elements, expression, 0);
+ }
+
+ function pointer(event) {
+ return { x: pointerX(event), y: pointerY(event) };
+ }
+
+ function pointerX(event) {
+ var docElement = document.documentElement,
+ body = document.body || { scrollLeft: 0 };
+
+ return event.pageX || (event.clientX +
+ (docElement.scrollLeft || body.scrollLeft) -
+ (docElement.clientLeft || 0));
+ }
+
+ function pointerY(event) {
+ var docElement = document.documentElement,
+ body = document.body || { scrollTop: 0 };
+
+ return event.pageY || (event.clientY +
+ (docElement.scrollTop || body.scrollTop) -
+ (docElement.clientTop || 0));
+ }
+
+
+ function stop(event) {
+ Event.extend(event);
+ event.preventDefault();
+ event.stopPropagation();
+
+ event.stopped = true;
+ }
+
+ Event.Methods = {
+ isLeftClick: isLeftClick,
+ isMiddleClick: isMiddleClick,
+ isRightClick: isRightClick,
+
+ element: element,
+ findElement: findElement,
+
+ pointer: pointer,
+ pointerX: pointerX,
+ pointerY: pointerY,
+
+ stop: stop
+ };
+
+
+ var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
+ m[name] = Event.Methods[name].methodize();
+ return m;
+ });
+
+ if (Prototype.Browser.IE) {
+ function _relatedTarget(event) {
+ var element;
+ switch (event.type) {
+ case 'mouseover': element = event.fromElement; break;
+ case 'mouseout': element = event.toElement; break;
+ default: return null;
+ }
+ return Element.extend(element);
+ }
+
+ Object.extend(methods, {
+ stopPropagation: function() { this.cancelBubble = true },
+ preventDefault: function() { this.returnValue = false },
+ inspect: function() { return '[object Event]' }
+ });
+
+ Event.extend = function(event, element) {
+ if (!event) return false;
+ if (event._extendedByPrototype) return event;
+
+ event._extendedByPrototype = Prototype.emptyFunction;
+ var pointer = Event.pointer(event);
+
+ Object.extend(event, {
+ target: event.srcElement || element,
+ relatedTarget: _relatedTarget(event),
+ pageX: pointer.x,
+ pageY: pointer.y
+ });
+
+ return Object.extend(event, methods);
+ };
+ } else {
+ Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;
+ Object.extend(Event.prototype, methods);
+ Event.extend = Prototype.K;
+ }
+
+ function _createResponder(element, eventName, handler) {
+ var registry = Element.retrieve(element, 'prototype_event_registry');
+
+ if (Object.isUndefined(registry)) {
+ CACHE.push(element);
+ registry = Element.retrieve(element, 'prototype_event_registry', $H());
+ }
+
+ var respondersForEvent = registry.get(eventName);
+ if (Object.isUndefined(respondersForEvent)) {
+ respondersForEvent = [];
+ registry.set(eventName, respondersForEvent);
+ }
+
+ if (respondersForEvent.pluck('handler').include(handler)) return false;
+
+ var responder;
+ if (eventName.include(":")) {
+ responder = function(event) {
+ if (Object.isUndefined(event.eventName))
+ return false;
+
+ if (event.eventName !== eventName)
+ return false;
+
+ Event.extend(event, element);
+ handler.call(element, event);
+ };
+ } else {
+ if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&
+ (eventName === "mouseenter" || eventName === "mouseleave")) {
+ if (eventName === "mouseenter" || eventName === "mouseleave") {
+ responder = function(event) {
+ Event.extend(event, element);
+
+ var parent = event.relatedTarget;
+ while (parent && parent !== element) {
+ try { parent = parent.parentNode; }
+ catch(e) { parent = element; }
+ }
+
+ if (parent === element) return;
+
+ handler.call(element, event);
+ };
+ }
+ } else {
+ responder = function(event) {
+ Event.extend(event, element);
+ handler.call(element, event);
+ };
+ }
+ }
+
+ responder.handler = handler;
+ respondersForEvent.push(responder);
+ return responder;
+ }
+
+ function _destroyCache() {
+ for (var i = 0, length = CACHE.length; i < length; i++) {
+ Event.stopObserving(CACHE[i]);
+ CACHE[i] = null;
+ }
+ }
+
+ var CACHE = [];
+
+ if (Prototype.Browser.IE)
+ window.attachEvent('onunload', _destroyCache);
+
+ if (Prototype.Browser.WebKit)
+ window.addEventListener('unload', Prototype.emptyFunction, false);
+
+
+ var _getDOMEventName = Prototype.K;
+
+ if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {
+ _getDOMEventName = function(eventName) {
+ var translations = { mouseenter: "mouseover", mouseleave: "mouseout" };
+ return eventName in translations ? translations[eventName] : eventName;
+ };
+ }
+
+ function observe(element, eventName, handler) {
+ element = $(element);
+
+ var responder = _createResponder(element, eventName, handler);
+
+ if (!responder) return element;
+
+ if (eventName.include(':')) {
+ if (element.addEventListener)
+ element.addEventListener("dataavailable", responder, false);
+ else {
+ element.attachEvent("ondataavailable", responder);
+ element.attachEvent("onfilterchange", responder);
+ }
+ } else {
+ var actualEventName = _getDOMEventName(eventName);
+
+ if (element.addEventListener)
+ element.addEventListener(actualEventName, responder, false);
+ else
+ element.attachEvent("on" + actualEventName, responder);
+ }
+
+ return element;
+ }
+
+ function stopObserving(element, eventName, handler) {
+ element = $(element);
+
+ var registry = Element.retrieve(element, 'prototype_event_registry');
+
+ if (Object.isUndefined(registry)) return element;
+
+ if (eventName && !handler) {
+ var responders = registry.get(eventName);
+
+ if (Object.isUndefined(responders)) return element;
+
+ responders.each( function(r) {
+ Element.stopObserving(element, eventName, r.handler);
+ });
+ return element;
+ } else if (!eventName) {
+ registry.each( function(pair) {
+ var eventName = pair.key, responders = pair.value;
+
+ responders.each( function(r) {
+ Element.stopObserving(element, eventName, r.handler);
+ });
+ });
+ return element;
+ }
+
+ var responders = registry.get(eventName);
+
+ if (!responders) return;
+
+ var responder = responders.find( function(r) { return r.handler === handler; });
+ if (!responder) return element;
+
+ var actualEventName = _getDOMEventName(eventName);
+
+ if (eventName.include(':')) {
+ if (element.removeEventListener)
+ element.removeEventListener("dataavailable", responder, false);
+ else {
+ element.detachEvent("ondataavailable", responder);
+ element.detachEvent("onfilterchange", responder);
+ }
+ } else {
+ if (element.removeEventListener)
+ element.removeEventListener(actualEventName, responder, false);
+ else
+ element.detachEvent('on' + actualEventName, responder);
+ }
+
+ registry.set(eventName, responders.without(responder));
+
+ return element;
+ }
+
+ function fire(element, eventName, memo, bubble) {
+ element = $(element);
+
+ if (Object.isUndefined(bubble))
+ bubble = true;
+
+ if (element == document && document.createEvent && !element.dispatchEvent)
+ element = document.documentElement;
+
+ var event;
+ if (document.createEvent) {
+ event = document.createEvent('HTMLEvents');
+ event.initEvent('dataavailable', true, true);
+ } else {
+ event = document.createEventObject();
+ event.eventType = bubble ? 'ondataavailable' : 'onfilterchange';
+ }
+
+ event.eventName = eventName;
+ event.memo = memo || { };
+
+ if (document.createEvent)
+ element.dispatchEvent(event);
+ else
+ element.fireEvent(event.eventType, event);
+
+ return Event.extend(event);
+ }
+
+
+ Object.extend(Event, Event.Methods);
+
+ Object.extend(Event, {
+ fire: fire,
+ observe: observe,
+ stopObserving: stopObserving
+ });
+
+ Element.addMethods({
+ fire: fire,
+
+ observe: observe,
+
+ stopObserving: stopObserving
+ });
+
+ Object.extend(document, {
+ fire: fire.methodize(),
+
+ observe: observe.methodize(),
+
+ stopObserving: stopObserving.methodize(),
+
+ loaded: false
+ });
+
+ if (window.Event) Object.extend(window.Event, Event);
+ else window.Event = Event;
+})();
+
+(function() {
+ /* Support for the DOMContentLoaded event is based on work by Dan Webb,
+ Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */
+
+ var timer;
+
+ function fireContentLoadedEvent() {
+ if (document.loaded) return;
+ if (timer) window.clearTimeout(timer);
+ document.loaded = true;
+ document.fire('dom:loaded');
+ }
+
+ function checkReadyState() {
+ if (document.readyState === 'complete') {
+ document.stopObserving('readystatechange', checkReadyState);
+ fireContentLoadedEvent();
+ }
+ }
+
+ function pollDoScroll() {
+ try { document.documentElement.doScroll('left'); }
+ catch(e) {
+ timer = pollDoScroll.defer();
+ return;
+ }
+ fireContentLoadedEvent();
+ }
+
+ if (document.addEventListener) {
+ document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
+ } else {
+ document.observe('readystatechange', checkReadyState);
+ if (window == top)
+ timer = pollDoScroll.defer();
+ }
+
+ Event.observe(window, 'load', fireContentLoadedEvent);
+})();
+
+Element.addMethods();
+
+/*------------------------------- DEPRECATED -------------------------------*/
+
+Hash.toQueryString = Object.toQueryString;
+
+var Toggle = { display: Element.toggle };
+
+Element.Methods.childOf = Element.Methods.descendantOf;
+
+var Insertion = {
+ Before: function(element, content) {
+ return Element.insert(element, {before:content});
+ },
+
+ Top: function(element, content) {
+ return Element.insert(element, {top:content});
+ },
+
+ Bottom: function(element, content) {
+ return Element.insert(element, {bottom:content});
+ },
+
+ After: function(element, content) {
+ return Element.insert(element, {after:content});
+ }
+};
+
+var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
+
+var Position = {
+ includeScrollOffsets: false,
+
+ prepare: function() {
+ this.deltaX = window.pageXOffset
+ || document.documentElement.scrollLeft
+ || document.body.scrollLeft
+ || 0;
+ this.deltaY = window.pageYOffset
+ || document.documentElement.scrollTop
+ || document.body.scrollTop
+ || 0;
+ },
+
+ within: function(element, x, y) {
+ if (this.includeScrollOffsets)
+ return this.withinIncludingScrolloffsets(element, x, y);
+ this.xcomp = x;
+ this.ycomp = y;
+ this.offset = Element.cumulativeOffset(element);
+
+ return (y >= this.offset[1] &&
+ y < this.offset[1] + element.offsetHeight &&
+ x >= this.offset[0] &&
+ x < this.offset[0] + element.offsetWidth);
+ },
+
+ withinIncludingScrolloffsets: function(element, x, y) {
+ var offsetcache = Element.cumulativeScrollOffset(element);
+
+ this.xcomp = x + offsetcache[0] - this.deltaX;
+ this.ycomp = y + offsetcache[1] - this.deltaY;
+ this.offset = Element.cumulativeOffset(element);
+
+ return (this.ycomp >= this.offset[1] &&
+ this.ycomp < this.offset[1] + element.offsetHeight &&
+ this.xcomp >= this.offset[0] &&
+ this.xcomp < this.offset[0] + element.offsetWidth);
+ },
+
+ overlap: function(mode, element) {
+ if (!mode) return 0;
+ if (mode == 'vertical')
+ return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+ element.offsetHeight;
+ if (mode == 'horizontal')
+ return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+ element.offsetWidth;
+ },
+
+
+ cumulativeOffset: Element.Methods.cumulativeOffset,
+
+ positionedOffset: Element.Methods.positionedOffset,
+
+ absolutize: function(element) {
+ Position.prepare();
+ return Element.absolutize(element);
+ },
+
+ relativize: function(element) {
+ Position.prepare();
+ return Element.relativize(element);
+ },
+
+ realOffset: Element.Methods.cumulativeScrollOffset,
+
+ offsetParent: Element.Methods.getOffsetParent,
+
+ page: Element.Methods.viewportOffset,
+
+ clone: function(source, target, options) {
+ options = options || { };
+ return Element.clonePosition(target, source, options);
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
+ function iter(name) {
+ return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
+ }
+
+ instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
+ function(element, className) {
+ className = className.toString().strip();
+ var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
+ return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
+ } : function(element, className) {
+ className = className.toString().strip();
+ var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
+ if (!classNames && !className) return elements;
+
+ var nodes = $(element).getElementsByTagName('*');
+ className = ' ' + className + ' ';
+
+ for (var i = 0, child, cn; child = nodes[i]; i++) {
+ if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
+ (classNames && classNames.all(function(name) {
+ return !name.toString().blank() && cn.include(' ' + name + ' ');
+ }))))
+ elements.push(Element.extend(child));
+ }
+ return elements;
+ };
+
+ return function(className, parentElement) {
+ return $(parentElement || document.body).getElementsByClassName(className);
+ };
+}(Element.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+ initialize: function(element) {
+ this.element = $(element);
+ },
+
+ _each: function(iterator) {
+ this.element.className.split(/\s+/).select(function(name) {
+ return name.length > 0;
+ })._each(iterator);
+ },
+
+ set: function(className) {
+ this.element.className = className;
+ },
+
+ add: function(classNameToAdd) {
+ if (this.include(classNameToAdd)) return;
+ this.set($A(this).concat(classNameToAdd).join(' '));
+ },
+
+ remove: function(classNameToRemove) {
+ if (!this.include(classNameToRemove)) return;
+ this.set($A(this).without(classNameToRemove).join(' '));
+ },
+
+ toString: function() {
+ return $A(this).join(' ');
+ }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+
+/*--------------------------------------------------------------------------*/
\ No newline at end of file
diff --git a/src/views/followvisit/discharge/js/websocket.js b/src/views/followvisit/discharge/js/websocket.js
new file mode 100644
index 0000000..80abaca
--- /dev/null
+++ b/src/views/followvisit/discharge/js/websocket.js
@@ -0,0 +1,826 @@
+var ws;
+//--------------------------------锟斤拷锟斤拷锟斤拷锟斤拷websocket-----------------------------------------//
+function initwebsocket(cti_ws_url) {
+ if ('WebSocket' in window) {
+ ws = new WebSocket(cti_ws_url);
+ } else {
+ alert("do not suports websocket");
+ }
+ ws.onopen = function(evt) {
+ alert("open websocket success");
+ }
+ ws.onclose = function(evt) {
+ alert("websocket close");
+ }
+ //锟斤拷锟斤拷锟斤拷锟斤拷
+ ws.onmessage = function(evt) {
+ var reader = new FileReader();
+ reader.onloadend = function(e) {
+ console.log(this.result);
+ var msgdiv = document.getElementById("msg");
+ var span = document.createElement("span");
+ span.innerHTML = "receive_msg:"+this.result + "<br />";
+ msgdiv.appendChild(span);
+ var obj = eval('(' + this.result + ')');
+ if(obj.cmd=="system"&&obj.action=="keepalive"){
+ keepalive(obj.seatname,obj.seatnum);
+ }
+ var uuid = document.getElementById("uuid");
+ if(obj.cmd=="control"&&obj.action=="tp_callin"){
+ uuid.value=obj.uuid;
+ }
+ };
+ reader.readAsText(event.data);
+ }
+ ws.onerror = function(evt) {
+ alert("websocket error");
+ }
+}
+function sendmessage(protocolStr){
+ console.log();
+ var msgdiv = document.getElementById("msg");
+ var span = document.createElement("span");
+ span.innerHTML = "send_msg:"+protocolStr + "<br />";
+ msgdiv.appendChild(span);
+ ws.send(protocolStr);
+}
+function testclear(){
+ var msgdiv = document.getElementById("msg");
+ msgdiv.innerHTML="";
+}
+//--------------------------------command send-----------------------------------------//
+//锟斤拷席签锟斤拷
+function seatlogin(seatname,seatnum,password,cti_ws_url) {
+ if ('WebSocket' in window) {
+ ws = new WebSocket(cti_ws_url);
+ } else {
+ alert("do not suports websocket");
+ }
+ ws.onopen = function(evt) {
+ alert("open websocket success");
+ if(seatname=="")
+ {
+ alert("seatname is null");
+ return;
+ }
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"system","action":"seatlogin","seatname":"<seatname>","seatnum":"<seatnum>","password":"<password>","timestamp":"<timestamp>"};
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ protocol.password=password;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ }
+ ws.onclose = function(evt) {
+ alert("websocket close");
+ }
+ //锟斤拷锟斤拷锟斤拷锟斤拷
+ ws.onmessage = function(evt) {
+ var reader = new FileReader();
+ reader.onloadend = function(e) {
+ console.log(this.result);
+ var msgdiv = document.getElementById("msg");
+ var span = document.createElement("span");
+ span.innerHTML = "receive_msg:"+this.result + "<br />";
+ msgdiv.appendChild(span);
+ var obj = eval('(' + this.result + ')');
+ if(obj.cmd=="system"&&obj.action=="keepalive"){
+ keepalive(obj.seatname,obj.seatnum);
+ }
+ var uuid = document.getElementById("uuid");
+ if(obj.cmd=="control"&&obj.action=="tp_callin"){
+ uuid.value=obj.uuid;
+ }
+ };
+ reader.readAsText(event.data);
+ }
+ ws.onerror = function(evt) {
+ alert("websocket error");
+ }
+
+ //ws.send(protocolStr);
+}
+//锟斤拷席签锟斤拷
+function seatlogout(seatname,seatnum) {
+ if(seatname=="")
+ {
+ alert("seatname is null");
+ return;
+ }
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"system","action":"seatlogout","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+ ws.close();
+}
+//锟斤拷锟斤拷
+function afk(seatname,seatnum) {
+ if(seatname=="")
+ {
+ alert("seatname is null");
+ return;
+ }
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"system","action":"afk","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷
+function online(seatname,seatnum) {
+ if(seatname=="")
+ {
+ alert("seatname is null");
+ return;
+ }
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"system","action":"online","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟�
+function callout(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"callout","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//转锟斤拷
+function transfer(seatname,seatnum,phone,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"transfer","uuid":"<uuid>","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ protocol.uuid=uuid;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//转锟斤拷锟秸伙拷
+function transferresume(seatname,seatnum,phone,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"transferresume","uuid":"<uuid>","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ protocol.uuid=uuid;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+
+//通锟斤拷锟斤拷锟斤拷
+function hold(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"hold","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.uuid=uuid;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//通锟斤拷锟斤拷锟斤拷锟秸伙拷
+function holdresume(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"holdresume","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.uuid=uuid;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷
+function pickup(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"pickup","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟揭讹拷
+function hangup(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"hangup","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+
+//通锟斤拷强锟斤拷
+function remove(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"remove","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//通锟斤拷强锟斤拷
+function insert(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"insert","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷
+function monitor(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"monitor","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷转通锟斤拷
+function monitor_to_talk(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"monitor_to_talk","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷锟斤拷锟斤拷
+function monitor_end(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"monitor_end","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//选锟斤拷
+function choosecall(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"choosecall","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.uuid=uuid;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷
+function replacecall(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"replacecall","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷通锟斤拷
+function three(seatname,seatnum,phone) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"three","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷锟斤拷席状态
+function openseatlist(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"openseatlist","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟截憋拷锟斤拷席状态
+function closeseatlist(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"closeseatlist","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷锟脚讹拷锟斤拷息
+function openqueues(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"openqueues","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟截憋拷锟脚讹拷锟斤拷息
+function closequeues(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"closequeues","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷通锟斤拷锟斤拷息
+function opencalllist(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"opencalllist","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟截憋拷通锟斤拷锟斤拷息
+function closecalllist(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"closecalllist","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷锟叫硷拷锟斤拷息
+function openroutelist(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"openroutelist","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟截憋拷锟叫硷拷锟斤拷息
+function closeroutelist(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"closeroutelist","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+
+
+
+//锟斤拷取锟斤拷席锟斤拷息
+function seatlist(group) {
+ if(group=="")
+ {
+ alert("group is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"seatlist","group":"<group>","timestamp":"<timestamp>"};
+ protocol.group=group;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+
+//锟斤拷取锟脚讹拷锟斤拷息
+function queues() {
+ var protocol={"cmd":"status","action":"queues","timestamp":"<timestamp>"};
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷取通锟斤拷锟斤拷息
+function calllist() {
+ var protocol={"cmd":"status","action":"calllist","timestamp":"<timestamp>"};
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷取锟叫硷拷锟斤拷息
+function routelist() {
+ var protocol={"cmd":"status","action":"routelist","timestamp":"<timestamp>"};
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟较�
+function batch(paramid) {
+ if(paramid=="")
+ {
+ alert("paramid is null");
+ return;
+ }
+ var protocol={"cmd":"status","action":"batch","paramid":"<paramid>","timestamp":"<timestamp>"};
+ protocol.paramid=paramid;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷始锟斤拷锟斤拷锟斤拷锟�
+function batch_start(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"system","action":"batch_start","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟截憋拷锟斤拷锟斤拷锟斤拷锟�
+function batch_stop(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"system","action":"batch_stop","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//通锟斤拷锟斤拷询锟斤拷始
+function handoff_ready(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"handoff_ready","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.uuid=uuid;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷询
+function handoff_call(seatname,seatnum,phone,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"handoff_call","uuid":"<uuid>","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ protocol.uuid=uuid;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷询锟秸伙拷
+function handoff_resume(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"handoff_resume","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ protocol.uuid=uuid;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷询转锟斤拷
+function handoff_transfer(seatname,seatnum,phone,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(phone=="")
+ {
+ alert("phone is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"handoff_transfer","uuid":"<uuid>","phone":"<phone>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.phone=phone;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ protocol.uuid=uuid;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷询锟斤拷锟斤拷
+function handoff_three(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"handoff_three","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ protocol.uuid=uuid;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//锟斤拷锟斤拷
+function keepalive(seatname,seatnum) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ var protocol={"cmd":"system","action":"keepalive","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.seatnum=seatnum;
+ protocol.seatname=seatname;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+}
+//通锟斤拷锟斤拷锟斤拷录锟斤拷
+function record_start(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"record_start","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.uuid=uuid;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+//通锟斤拷停止录锟斤拷
+function record_stop(seatname,seatnum,uuid) {
+ if(seatnum=="")
+ {
+ alert("seatnum is null");
+ return;
+ }
+ if(uuid=="")
+ {
+ alert("uuid is null");
+ return;
+ }
+ var protocol={"cmd":"control","action":"record_stop","uuid":"<uuid>","seatname":"<seatname>","seatnum":"<seatnum>","timestamp":"<timestamp>"};
+ protocol.uuid=uuid;
+ protocol.seatname=seatname;
+ protocol.seatnum=seatnum;
+ var protocolStr=JSON.stringify(protocol);
+ sendmessage(protocolStr);
+ //ws.send(protocolStr);
+}
+
+//---------------------------------------------------------------------------------//
+
+
diff --git a/src/views/followvisit/discharge/outpatientService.vue b/src/views/followvisit/discharge/outpatientService.vue
index 4895852..53a4c79 100644
--- a/src/views/followvisit/discharge/outpatientService.vue
+++ b/src/views/followvisit/discharge/outpatientService.vue
@@ -186,8 +186,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -252,7 +251,7 @@
<div class="documentf">
<div class="document">
<el-button type="success" size="medium" @click="onthatday()"
- >褰撴棩鏈嶅姟</el-button
+ >浠婃棩鏈嶅姟</el-button
>
</div>
</div>
@@ -917,7 +916,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
{
@@ -972,13 +971,21 @@
value: 3,
label: "鍙戦�佹椂闂�(鍊掑簭)",
},
+ {
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+ },
],
// 鏌ヨ鍙傛暟
topqueryParams: {
pageNum: 1,
pageSize: 10,
sendstate: null,
- sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 3,
searchscope: 3,visitCount: 1,
scopetype: [],
@@ -1064,8 +1071,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -1399,11 +1406,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1516,11 +1522,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1745,10 +1749,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
@@ -1766,6 +1772,9 @@
background: #8df8a4;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
+.button-textxga {
+ color: #de7897;
+}
.button-bb {
font-weight: 500;
background-color: #2ba05c;
diff --git a/src/views/followvisit/linem/index.vue b/src/views/followvisit/linem/index.vue
index aec5093..0c44e9f 100644
--- a/src/views/followvisit/linem/index.vue
+++ b/src/views/followvisit/linem/index.vue
@@ -7,8 +7,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
v-hasPermi="['system:user:add']"
diff --git a/src/views/followvisit/mzsatisfaction/index.vue b/src/views/followvisit/mzsatisfaction/index.vue
new file mode 100644
index 0000000..0fbc077
--- /dev/null
+++ b/src/views/followvisit/mzsatisfaction/index.vue
@@ -0,0 +1,1976 @@
+<template>
+ <div class="app-container">
+ <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
+ shadow="hover"
+ :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
+ >
+ <div style="padding: 8px" @click="$router.push(item.router)">
+ <span>{{ item.name }}</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ item.value ? item.value : 0 }}
+ </div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="ysfleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>琛ㄥ崟宸插彂閫�</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ yfsvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="errleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>寮傚父</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ ycvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <el-row :gutter="20">
+ <!--鐢ㄦ埛鏁版嵁-->
+ <el-form
+ :model="topqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="98px"
+ >
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ v-model="topqueryParams.taskName"
+ placeholder="璇烽�夋嫨浠诲姟鍚嶇О"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="鍑洪櫌鏃堕棿">
+ <el-date-picker
+ v-model="dateRange"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="鎮h�呭鍚�" prop="sendname">
+ <el-input
+ v-model="topqueryParams.sendname"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="璇婃柇鍚嶇О" prop="leavediagname">
+ <el-input
+ v-model="topqueryParams.leavediagname"
+ placeholder="璇疯緭鍏ヨ瘖鏂悕绉�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="闅忚浜哄憳" prop="updateBy">
+ <el-input
+ v-model="topqueryParams.updateBy"
+ placeholder="璇疯緭鍏ラ殢璁夸汉鍛�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="涓绘不鍖荤敓" prop="drname">
+ <el-input
+ v-model="topqueryParams.drname"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="缁忕鍖荤敓" prop="managementDoctor">
+ <el-input
+ v-model="topqueryParams.managementDoctor"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="鎮h�呰寖鍥�" prop="status">
+ <el-cascader
+ v-model="topqueryParams.scopetype"
+ placeholder="榛樿鍏ㄩ儴"
+ :options="sourcetype"
+ :props="{ expandTrigger: 'hover' }"
+ @change="handleChange"
+ ></el-cascader>
+ </el-form-item>
+
+ <el-form-item label="浠诲姟鐘舵��" prop="status">
+ <el-select v-model="topqueryParams.sendstate" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎺掑簭鏂瑰紡" prop="status">
+ <el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptionssort"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery(1)"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+ </el-form>
+ <el-divider></el-divider>
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-upload2"
+ size="medium"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="medium"
+ @click="handleAdd"
+ >鏂板</el-button
+ >
+ </el-col>
+
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-warning-outline"
+ size="medium"
+ @click="toleadExport(1)"
+ >鎵ц澶辫触</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-warning"
+ size="medium"
+ @click="toleadExport(2)"
+ >缁撴灉寮傚父</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="success"
+ plain
+ size="medium"
+ @click="buidegetTasklist()"
+ >寰呭姙鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="primary"
+ plain
+ size="medium"
+ @click="affiliation()"
+ >鏈汉鎵�灞炴湇鍔�</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button type="success" size="medium" @click="onthatday()"
+ >浠婃棩鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+
+ </el-row>
+ <el-table
+ v-loading="loading"
+ ref="userform"
+ :data="userList"
+ :row-class-name="tableRowClassName"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="50" align="center" />
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ fixed
+ width="150"
+ show-overflow-tooltip
+ align="center"
+ key="taskName"
+ prop="taskName"
+ />
+ <!-- <el-table-column label="搴忓彿" fixed align="center" key="id" prop="id" /> -->
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ key="sendname"
+ prop="sendname"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ gettoken360(scope.row.sfzh, scope.row.drcode, scope.row.drname)
+ "
+ ><span class="button-textsc">{{
+ scope.row.sendname
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <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>
+ </el-tooltip>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟寮傚父璇存槑"
+ width="120"
+ align="center"
+ key="remark"
+ prop="remark" -->
+ />
+
+ <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
+ label="闅忚瀹屾垚鏃堕棿"
+ sortable
+ align="center"
+ prop="finishtime"
+ width="160"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.finishtime) }}</span>
+ </template>
+ </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="涓绘不鍖荤敓"
+ width="120"
+ align="center"
+ key="drname"
+ prop="drname"
+ />
+
+ <el-table-column
+ label="缁忕鍖荤敓"
+ align="center"
+ key="managementDoctor"
+ prop="managementDoctor"
+ width="120"
+ />
+ <el-table-column
+ label="鍑洪櫌澶╂暟"
+ width="120"
+ align="center"
+ key="endDay"
+ prop="endDay"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.endDay ? scope.row.endDay + "澶�" : "" }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="韬唤璇佸彿鐮�"
+ width="200"
+ align="center"
+ key="sfzh"
+ prop="sfzh"
+ />
+ <el-table-column
+ label="鑱旂郴鐢佃瘽"
+ width="200"
+ align="center"
+ key="phone"
+ prop="phone"
+ />
+ <el-table-column
+ label="璐d换鎶ゅ+"
+ width="120"
+ align="center"
+ key="nurseName"
+ prop="nurseName"
+ />
+
+ <!-- <el-table-column
+ label="鐥呭巻鍙�"
+ align="center"
+ sortable
+ key="medicalRecordNo"
+ prop="medicalRecordNo"
+ width="120"
+ /> -->
+
+ <!-- <el-table-column label="骞撮緞" align="center" key="age" prop="age" /> -->
+ <!-- <el-table-column label="鎬у埆"width="100" align="center" key="sex" prop="sex" /> -->
+ <!-- <el-table-column label="搴婂彿" align="center" key="badNo" prop="badNo" /> -->
+ <el-table-column
+ label="绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ width="120"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐥呭尯"
+ align="center"
+ 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>
+ <el-table-column
+ label="闅忚浜哄憳"
+ align="center"
+ key="updateBy"
+ prop="updateBy"
+ width="120"
+ />
+ <el-table-column
+ label="闂ㄨ瘖婊℃剰搴︽ā鏉垮悕绉�"
+ align="center"
+ key="templatename"
+ prop="templatename"
+ width="200"
+ />
+
+ <el-table-column
+ label="浠诲姟鎵ц鏂瑰紡"
+ align="center"
+ key="preachform"
+ prop="preachform"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.preachform">{{ item }}銆� </span>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟鍙戦�佹祦绋�"
+ align="center"
+ key="serviceSubtaskRecordList"
+ prop="serviceSubtaskRecordList"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.serviceSubtaskRecordList"
+ >{{ item.remark }}銆�
+ </span>
+ </template>
+ </el-table-column> -->
+ <el-table-column
+ label="浠诲姟缁撴灉璇存槑"
+ width="220"
+ align="center"
+ key="remark"
+ prop="remark"
+ >
+ <template slot-scope="scope" v-if="scope.row.remark">
+ <el-tooltip
+ :content="scope.row.remark"
+ placement="top"
+ effect="dark"
+ >
+ <el-tag
+ type="warning"
+ v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
+ >{{ scope.row.remark }}</el-tag
+ >
+ <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
+ </el-tooltip>
+ </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
+ >
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleUpdate(scope.row)"
+ ><span class="button-textxga"
+ ><i class="el-icon-edit"></i>鎮h�呰繃婊�</span
+ ></el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="topqueryParams.pageNum"
+ :limit.sync="topqueryParams.pageSize"
+ @pagination="getList"
+ />
+ </el-row>
+ <!-- 婊℃剰搴﹀脊妗� -->
+ <el-dialog
+ title="闅忚婊℃剰搴﹁瘎鍒�"
+ :visible.sync="scoreDialogVisible"
+ width="80%"
+ :close-on-click-modal="false"
+ >
+ <el-table :data="selectedRows" border style="width: 100%">
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ prop="sendname"
+ />
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ width="180"
+ align="center"
+ prop="taskName"
+ />
+ <!-- 鏂板璇勫垎鍒� -->
+ <el-table-column
+ label="鐪熷疄鎬�(20)"
+ align="center"
+ key="authenticity"
+ prop="authenticity"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.authenticity"
+ :min="0"
+ :max="20"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="涓�鍛ㄥ唴瀹屾垚(20)"
+ align="center"
+ key="weekFinish"
+ prop="weekFinish"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.weekFinish"
+ :min="0"
+ :max="20"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="瑙勮寖鎬�(10)"
+ align="center"
+ key="standard"
+ prop="standard"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.standard"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍙婃椂鎬�(10)"
+ align="center"
+ key="timeliness"
+ prop="timeliness"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.timeliness"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="瀹f暀鎯呭喌(10)"
+ align="center"
+ key="library"
+ prop="library"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.library"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鐜婊℃剰搴�(10)"
+ align="center"
+ key="environment"
+ prop="environment"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.environment"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍖荤敓婊℃剰搴�(10)"
+ align="center"
+ key="doctorSatisfaction"
+ prop="doctorSatisfaction"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.doctorSatisfaction"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎶ゅ+婊℃剰搴�(10)"
+ align="center"
+ key="nurseSatisfaction"
+ prop="nurseSatisfaction"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.nurseSatisfaction"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎬诲垎"
+ align="center"
+ key="total"
+ prop="total"
+ fixed="right"
+ >
+ <template slot-scope="scope">
+ <span>{{ calculateTotal(scope.row) }}</span>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="scoreDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="saveScores">淇濆瓨</el-button>
+ </div>
+ </el-dialog>
+ <!-- 娣诲姞鎴栦慨鏀瑰奖鍍忛殢璁垮璇濇 -->
+ <el-dialog
+ :title="amendtag ? '淇敼鎮h�呬俊鎭�' : '鏂板鎮h��'"
+ :visible.sync="Labelchange"
+ width="900px"
+ >
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="濮撳悕" width="100" prop="name">
+ <el-input
+ v-model="form.name"
+ placeholder="璇疯緭鍏ュ鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎬у埆" width="100" prop="sex">
+ <el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆">
+ <el-option
+ v-for="dict in sextype"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="骞撮緞" prop="age">
+ <el-input
+ v-model="form.age"
+ placeholder="璇疯緭鍏ュ勾榫�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="杩囨护鍖荤敓" width="100" prop="filterDrname">
+ <el-input
+ v-model="form.filterDrname"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+ <el-button @click="cancel">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ <!-- 淇敼鍙戦�佹椂闂村璇濇 -->
+ <el-dialog
+ title="鍙戦�佹椂闂磋缃�"
+ :visible.sync="modificationVisible"
+ width="45%"
+ >
+ <div style="margin-bottom: 20px; color: red">
+ 缁熶竴淇敼褰撳ぉ鏈彂閫佺殑浠诲姟鏃堕棿
+ </div>
+
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ ref="ruleForm"
+ label-width="120px"
+ class="demo-ruleForm"
+ >
+ <el-form-item label="鍙戦�佹棩鏈�">
+ <el-date-picker
+ v-model="ruleForm.value1"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ >
+ </el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="鏃堕棿娈�" prop="type">
+ <el-checkbox-group v-model="ruleForm.type">
+ <el-checkbox label="涓婂崍" name="type"></el-checkbox>
+ <el-checkbox label="涓嬪崍" name="type"></el-checkbox>
+ <el-checkbox label="鏅氫笂" name="type"></el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ <el-form-item label="涓婂崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value2"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="涓嬪崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value3"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="鏅氫笂鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value4"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="modificationVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="modificationVisible = false"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 鍐嶆闅忚 -->
+ <el-dialog title="鎮h�呭啀娆¢殢璁�" :visible.sync="dialogFormVisible">
+ <el-form ref="zcform" :rules="zcrules" :model="zcform" label-width="80px">
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.taskName"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鎮h�呭悕绉�">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.sendname"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="骞撮緞">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.age"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="绉戝">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.deptname"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鐥呭尯">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.leavehospitaldistrictname"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="闅忚鏂瑰紡" prop="resource">
+ <el-radio-group v-model="zcform.resource">
+ <el-radio label="1">鏈梾鍖洪殢璁�</el-radio>
+ <el-radio label="2">闅忚涓績闅忚</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <!-- <el-form-item label="鍗冲埢鍙戦��">
+ <el-switch v-model="zcform.delivery"></el-switch>
+ </el-form-item> -->
+ <el-form-item label="鍑洪櫌鏃堕棿">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="zcform.endtime"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="闅忚瀹屾垚鏃堕棿" prop="date1">
+ <el-date-picker
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ v-model="zcform.date1"
+ style="width: 100%"
+ ></el-date-picker>
+ </el-form-item>
+ <el-form-item label="闅忚璁板綍">
+ <el-input type="textarea" v-model="zcform.remark"></el-input>
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import {
+ delUser,
+ addUser,
+ updateUser,
+ resetUserPwd,
+ changeUserStatus,
+} from "@/api/system/user";
+import {
+ getTaskservelist,
+ buidegetTasklist,
+ addserviceSubtask,
+ query360PatInfo,
+ addsatisfaction,
+} from "@/api/AiCentre/index";
+import { alterpatient, particularpatient } from "@/api/patient/homepage";
+import Treeselect from "@riophae/vue-treeselect";
+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 },
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ dialogFormVisible: false,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 鐢ㄦ埛琛ㄦ牸鏁版嵁
+ userList: null,
+ // 寮瑰嚭灞傛爣棰�
+ title: "鏂板褰卞儚闅忚",
+ // 鏄惁鏄剧ず淇敼銆佹坊鍔犲脊鍑哄眰
+ addalteropen: false,
+ // 淇敼鍙戦�佹椂闂村璇濇
+ modificationVisible: false,
+ // 閮ㄩ棬鍚嶇О
+ deptName: undefined,
+ // 榛樿瀵嗙爜
+ initPassword: undefined,
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ dateRangefs: [],
+ // 宀椾綅閫夐」
+ postOptions: [],
+ ruleForm: {
+ type: [],
+ },
+ zcform: {},
+ dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
+ inputVisible: false,
+ Labelchange: false,
+ ycvalue: "",
+ yfsvalue: "",
+ inputValue: "",
+ preachform: "",
+ previewVisible: false, //褰卞儚闅忚棰勮寮规
+ radio: "",
+ radios: [],
+ previewtype: 2, //棰勮褰卞儚闅忚绫诲瀷
+ total: 0, // 鎬绘潯鏁�
+ // 婊℃剰搴﹁皟鏌ユ暟鎹�
+ scoreDialogVisible: false,
+ selectedRows: [],
+
+ value: [],
+ list: [],
+
+ sourcetype: [
+ {
+ value: 1,
+ label: "绉戝",
+ children: [],
+ },
+ {
+ value: 2,
+ label: "鐥呭尯",
+ children: [],
+ },
+ {
+ value: 3,
+ label: "鍏ㄩ儴",
+ },
+ ],
+ loading: false,
+ cardlist: [
+ {
+ name: "鏈嶅姟鎬婚噺",
+ value: 0,
+ },
+ // {
+ // name: "鎮h�呰繃婊�",
+ // value: 0,
+ // },
+ {
+ name: "闇�闅忚",
+ value: 0,
+ },
+ {
+ name: "鍙戦�佸け璐�",
+ value: 0,
+ },
+ {
+ name: "寰呴殢璁�",
+ value: 0,
+ },
+ // {
+ // name: "宸插彂閫�",
+ // value: 0,
+ // },
+
+ // {
+ // name: "琛ㄥ崟宸插彂閫�",
+ // value: 0,
+ // },
+ ],
+ zcrules: {
+ date1: [
+ { required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
+ ],
+ resource: [
+ { required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
+ ],
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {
+ phonenumber: "",
+ totagid: "",
+ types: "",
+ nickName: "",
+ qystatus: "",
+ btstatus: "",
+ },
+ topicoptionssort: [
+ {
+ value: 0,
+ label: "鍑洪櫌鏃堕棿(姝e簭)",
+ },
+ {
+ value: 1,
+ label: "鍑洪櫌鏃堕棿(鍊掑簭)",
+ },
+ {
+ value: 2,
+ label: "鍙戦�佹椂闂�(姝e簭)",
+ },
+ {
+ value: 3,
+ label: "鍙戦�佹椂闂�(鍊掑簭)",
+ },
+ {
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+ },
+ ],
+ // 鏌ヨ鍙傛暟
+ topqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 6,
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
+ serviceType: 14,
+ searchscope: 3,
+ visitCount: 1,
+ scopetype: [],
+ leaveldeptcodes: [],
+ leavehospitaldistrictcodes: [],
+ },
+ propss: { multiple: true },
+ options: [],
+
+ topicoptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 1,
+ label: "琛ㄥ崟宸查鍙�",
+ },
+ {
+ value: 2,
+ label: "寰呴殢璁�",
+ },
+ {
+ value: 3,
+ label: "琛ㄥ崟宸插彂閫�",
+ },
+ {
+ value: 4,
+ label: "涓嶆墽琛�",
+ },
+ {
+ value: 5,
+ label: "鍙戦�佸け璐�",
+ },
+ {
+ value: 6,
+ label: "宸插畬鎴�",
+ },
+ ],
+ sextype: [
+ {
+ value: 1,
+ label: "鐢�",
+ },
+ {
+ value: 2,
+ label: "濂�",
+ },
+ ],
+ topicoptionsyj: [
+ {
+ value: 1,
+ label: "寮傚父",
+ },
+ {
+ value: 0,
+ label: "姝e父",
+ },
+ ],
+ url: "http://9.208.2.190:8090/smartor/serviceExternal/query360PatInfo",
+ postData: {
+ XiaoXiTou: {
+ FaSongFCSJC: "ZJHES",
+ FaSongJGID: localStorage.getItem("orgid"),
+ FaSongJGMC: localStorage.getItem("orgname"),
+ FaSongSJ: "2025-01-09聽17:29:36",
+ FaSongXTJC: "SUIFANGXT",
+ FaSongXTMC: "闅忚绯荤粺",
+ XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
+ XiaoXiLX: "SC_LC_360STCX",
+ XiaoXiMC: "360聽瑙嗗浘鏌ヨ",
+ ZuHuID: localStorage.getItem("ZuHuID"),
+ ZuHuMC: localStorage.getItem("orgname"),
+ },
+ YeWuXX: {
+ BingRenXX: {
+ ZhengJianHM: "",
+ ZhengJianLXDM: "01",
+ ZhengJianLXMC: "灞呮皯韬唤璇�",
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ },
+ YongHuXX: {
+ XiTongID: "SUIFANGXT",
+ XiTongMC: "闅忚绯荤粺",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ idp: "lyra",
+ },
+ },
+ },
+ amendtag: false,
+ errtype: "",
+ leavehospitaldistrictcode: "",
+ serviceState: [],
+ checkboxlist: [],
+ // 琛ㄥ崟鏍¢獙
+ rules: {},
+ };
+ },
+ watch: {},
+ created() {
+ this.serviceState = store.getters.serviceState;
+ this.checkboxlist = store.getters.checkboxlist;
+ this.errtype = this.$route.query.errtype;
+ this.leavehospitaldistrictcode =
+ this.$route.query.leavehospitaldistrictcode;
+ this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
+ return {
+ label: dept.deptName,
+ value: dept.deptCode,
+ };
+ });
+ this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
+ return {
+ label: dept.districtName,
+ value: dept.districtCode,
+ };
+ });
+ if (this.errtype) {
+ this.toleadExport(2);
+ } else {
+ this.getList(1);
+ }
+ this.getConfigKey("sys.user.initPassword").then((response) => {
+ this.initPassword = response.msg;
+ });
+ },
+ activated() {
+ this.getList(1);
+ },
+ methods: {
+ /** 鏌ヨ闅忚鏈嶅姟鍒楄〃 */
+ getList(refresh) {
+ // 榛樿鍏ㄩ儴
+
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ 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;
+ }
+ 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);
+ // this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[1].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[2].value = response.rows[0].fssb;
+ this.cardlist[3].value = response.rows[0].dsf;
+ // this.cardlist[4].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ affiliation() {
+ this.topqueryParams.managementDoctorCode= store.getters.hisUserId;
+
+ this.getList(1);
+ },
+ onthatday() {
+ this.topqueryParams.startSendDateTime = this.getCurrentDate();
+ this.topqueryParams.endSendDateTime = this.getCurrentDate();
+ this.getList(1);
+ },
+ getCurrentDate() {
+ const now = new Date();
+ return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
+ },
+ buidegetTasklist(type) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ // 鎺ュ彈寮傚父璺宠浆
+ if (this.errtype) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(
+ this.leavehospitaldistrictcode
+ );
+ }
+ let obj = {
+ pageNum: 1,
+ pageSize: 10,
+ leavehospitaldistrictcodes:
+ this.topqueryParams.leavehospitaldistrictcodes,
+ sendstates: [2, 3],
+ leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
+ };
+ buidegetTasklist(obj).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);
+ this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[2].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[3].value = response.rows[0].fssb;
+ this.cardlist[4].value = response.rows[0].dsf;
+ // this.cardlist[5].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ // 鏌ョ湅闂ㄨ瘖闅忚璇︽儏
+ Referencequestion(row) {
+ this.previewVisible = true;
+ },
+ // 娣诲姞寮规鎼滅储
+ remoteMethod(query) {
+ if (query !== "") {
+ this.loading = true;
+ setTimeout(() => {
+ this.loading = false;
+ this.options = this.list.filter((item) => {
+ return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
+ });
+ }, 200);
+ } else {
+ this.options = [];
+ }
+ },
+ // 褰卞儚闅忚鐘舵�佷慨鏀�
+ handleStatusChange(row) {
+ let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
+ this.$modal
+ .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵')
+ .then(function () {
+ return changeUserStatus(row.userId, row.status);
+ })
+ .then(() => {
+ this.$modal.msgSuccess(text + "鎴愬姛");
+ })
+ .catch(function () {
+ row.status = row.status === "0" ? "1" : "0";
+ });
+ },
+
+ // 琛ㄥ崟閲嶇疆
+ 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");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery(refresh) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ this.topqueryParams.pageNum = 1;
+ this.topqueryParams.startOutHospTime = this.dateRange[0];
+ this.topqueryParams.endOutHospTime = this.dateRange[1];
+ this.topqueryParams.startSendDateTime = this.dateRangefs[0];
+ this.topqueryParams.endSendDateTime = this.dateRangefs[1];
+ this.getList(refresh);
+ },
+ // 鎮h�呰寖鍥村鐞�
+ handleChange(value) {
+ let type = value[0];
+ let code = value.slice(-1)[0];
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
+ if (type == 1) {
+ this.topqueryParams.leaveldeptcodes.push(code);
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.searchscope = 1;
+ } else if (type == 2) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(code);
+ this.topqueryParams.leaveldeptcodes = [];
+ this.topqueryParams.searchscope = 2;
+ } else {
+ this.topqueryParams.searchscope = 3;
+ }
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.dateRangefs = [];
+ this.topqueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 6,
+ sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
+ serviceType: 14,
+ searchscope: 3,
+ visitCount: 1,
+ scopetype: [],
+ leaveldeptcodes: [],
+ leavehospitaldistrictcodes: [],
+ };
+ this.handleQuery(1);
+ },
+ handleSelectionChange(rows) {
+ this.selectedRows = rows.map((row) => {
+ // 鍒濆鍖栬瘎鍒嗗瓧娈�
+ return {
+ ...row,
+ authenticity: row.authenticity || 0,
+ weekFinish: row.weekFinish || 0,
+ standard: row.standard || 0,
+ timeliness: row.timeliness || 0,
+ library: row.library || 0,
+ environment: row.environment || 0,
+ doctorSatisfaction: row.doctorSatisfaction || 0,
+ nurseSatisfaction: row.nurseSatisfaction || 0,
+ };
+ });
+
+ if (this.selectedRows.length > 0) {
+ this.multiple = false;
+ } else {
+ this.multiple = true;
+ }
+ },
+
+ // 璁$畻鎬诲垎
+ calculateTotal(row) {
+ return (
+ (row.authenticity || 0) +
+ (row.weekFinish || 0) +
+ (row.standard || 0) +
+ (row.timeliness || 0) +
+ (row.library || 0) +
+ (row.environment || 0) +
+ (row.doctorSatisfaction || 0) +
+ (row.nurseSatisfaction || 0)
+ );
+ },
+
+ // 淇濆瓨璇勫垎
+ saveScores() {
+ this.selectedRows.forEach((item) => {
+ item.createBy = null;
+ item.patName = item.sendname;
+ item.hospitaldistrictname = item.leavehospitaldistrictname;
+ });
+ addsatisfaction(this.selectedRows).then((res) => {
+ if (res.code == 200) {
+ this.$message.success("璇勫垎淇濆瓨鎴愬姛");
+ this.scoreDialogVisible = false;
+ this.selectedRows = [];
+ this.$refs.userform.clearSelection();
+ } else {
+ this.$modal.msgWarning("璇勫垎淇濆瓨澶辫触");
+ this.scoreDialogVisible = false;
+ this.selectedRows = [];
+ this.$refs.userform.clearSelection();
+ }
+ });
+ // 杩欓噷鍙互娣诲姞淇濆瓨閫昏緫锛屽璋冪敤API淇濆瓨璇勫垎
+ },
+ //鍒犻櫎閫夐」
+ handleClose(tag) {
+ this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+ },
+ //瑙﹀彂鏂板杈撳叆
+ showInput() {
+ this.inputVisible = true;
+ this.$nextTick((_) => {
+ this.$refs.saveTagInput.$refs.input.focus();
+ });
+ },
+ //鑾峰彇澶卞幓鐒︾偣瑙﹀彂
+ handleInputConfirm() {
+ let inputValue = this.inputValue;
+ if (inputValue) {
+ this.dynamicTags.push(inputValue);
+ }
+ this.inputVisible = false;
+ this.inputValue = "";
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.$router.push({
+ path: "/followvisit/QuestionnaireTask",
+ query: {
+ type: 2,
+ serviceType: 14,
+ },
+ });
+ },
+ //鎮h��360璺宠浆
+ gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning("360鍔熻兘鏆傛湭寮�閫�");
+
+ this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
+
+ query360PatInfo(this.postData).then((res) => {
+ if (res.data.url) {
+ window.open(res.data.url, "_blank");
+ // this.linkUrl = res.data.url;
+ } else {
+ this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
+ }
+ });
+ },
+
+ /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
+ handleResetPwd(row) {
+ this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ closeOnClickModal: false,
+ inputPattern: /^.{5,20}$/,
+ inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+ })
+ .then(({ value }) => {
+ resetUserPwd(row.userId, value).then((response) => {
+ this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
+ });
+ })
+ .catch(() => {});
+ },
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.Labelchange = false;
+ this.reset();
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm: function () {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ this.form.isoperation = 2;
+ this.form.notrequiredFlag = 1;
+ alterpatient(this.form)
+ .then((response) => {
+ console.log(response);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鎮h�呰繃婊ゆ垚鍔�");
+ });
+
+ this.reset();
+ this.Labelchange = false;
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const userIds = row.userId || this.ids;
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
+ .then(function () {
+ return delUser(userIds);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴鍋滄
+ AllStop() {
+ this.$modal
+ .confirm("鏄惁鍋滄鍏ㄩ儴浠诲姟锛�")
+ .then(function () {
+ return console.log("鍋滄鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgWarning("鍋滄鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴寮�濮�
+ AllStarted() {
+ this.$modal
+ .confirm("鏄惁寮�鍚叏閮ㄤ换鍔★紵")
+ .then(function () {
+ return console.log("寮�鍚垚鍔�");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("寮�鍚垚鍔�");
+ })
+ .catch(() => {});
+ },
+ // 浠诲姟閲嶇疆
+ TaskReset() {
+ this.$modal
+ .confirm("鏄惁閲嶇疆閫変腑鐨勪换鍔¢」锛�")
+ .then(function () {
+ return console.log("閫変腑鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("閲嶇疆鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 璁剧疆鍙戦�佹椂闂�
+ Sendtimesetting() {
+ this.modificationVisible = true;
+ },
+ // 璺宠浆璇︽儏椤�
+ Seedetails(row) {
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
+ }
+ this.$router.push({
+ path: "/followvisit/record/detailpage/",
+ query: {
+ taskid: row.taskid,
+ patid: row.patid,
+ id: row.id,
+ Voicetype: type,
+ visitCount: this.topqueryParams.visitCount,
+ },
+ });
+ },
+
+ onSubmit() {},
+
+ // 鎮h�呰繃婊よЕ鍙�
+ handleUpdate(row) {
+ particularpatient(row.patid).then((response) => {
+ this.form = response.data;
+ this.form.filterDrname = store.getters.nickName;
+ });
+ this.amendtag = true;
+ this.Labelchange = true;
+ },
+ // 渚挎嵎鎸夐挳
+ toleadExport(too) {
+ if (too == 1) {
+ this.topqueryParams.sendstate = 4;
+ this.topqueryParams.excep = null;
+ } else if (too == 2) {
+ this.topqueryParams.excep = 1;
+ }
+ this.handleQuery();
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.topqueryParams.pageNum = null;
+ this.topqueryParams.pageSize = null;
+ this.download(
+ "smartor/serviceSubtask/patItemExport",
+ {
+ ...this.topqueryParams,
+ },
+ `user_${new Date().getTime()}.xlsx`
+ );
+ },
+ // 寮傚父鍒楁覆鏌�
+ tableRowClassName({ row, rowIndex }) {
+ if (row.excep == 1) {
+ return "warning-row";
+ }
+ return "";
+ },
+
+ getCurrentTime() {
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ const seconds = String(now.getSeconds()).padStart(2, "0");
+
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-button--primary.is-plain {
+ color: #ffffff;
+ background: #409eff;
+ border-color: #4fabe9;
+}
+
+.document {
+ // width: 100px;
+ height: 50px;
+}
+::v-deep.el-table .warning-row {
+ background: #eec4c4;
+}
+
+.documentf {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.download {
+ text-align: center;
+
+ .el-upload__tip {
+ font-size: 23px;
+ }
+
+ .el-upload__text {
+ font-size: 23px;
+ }
+}
+
+.uploading {
+ margin-top: 20px;
+ margin: 20px;
+ padding: 30px;
+ background: #ffffff;
+ 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);
+}
+
+.el-tag + .el-tag {
+ margin-left: 10px;
+}
+
+.button-new-tag {
+ margin-left: 10px;
+ height: 32px;
+ line-height: 30px;
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.input-new-tag {
+ width: 90px;
+ margin-left: 10px;
+ vertical-align: bottom;
+}
+
+.drexamine {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 30px;
+ background: #daeaf5;
+
+ img {
+ width: 100px;
+ height: 100px;
+ }
+}
+.button-textxga {
+ color: #de7897;
+}
+.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);
+
+ .topic-dev {
+ margin-bottom: 25px;
+ font-size: 20px !important;
+
+ .dev-text {
+ margin-bottom: 10px;
+ }
+ }
+}
+::v-deep.leftvlue .el-card__body {
+ background: #d0e9fd;
+}
+::v-deep.leftvlue .el-card__body:hover {
+ background: #8dc8f8;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+::v-deep.errleftvlue .el-card__body {
+ background: #fdd0d7;
+}
+::v-deep.errleftvlue .el-card__body:hover {
+ background: #f88d96;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+
+::v-deep.ysfleftvlue .el-card__body {
+ background: #d0fdd8;
+}
+::v-deep.ysfleftvlue .el-card__body:hover {
+ background: #8df8a4;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+.button-bb {
+ font-weight: 500;
+ background-color: #2ba05c;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-xq {
+ font-weight: 500;
+ background-color: #409eff;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-sc {
+ font-weight: 500;
+ background-color: #b3a21f;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-zx {
+ background: #4fabe9;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+
+::v-deep.el-radio-group {
+ span {
+ font-size: 24px;
+ }
+}
+.purple-button {
+ background-color: #7e22ce;
+ border-color: #7e22ce;
+ color: #fff;
+}
+
+.purple-button:hover,
+.purple-button:focus {
+ background-color: #9333ea;
+ border-color: #9333ea;
+}
+
+.purple-button:active {
+ background-color: #6b21a8;
+ border-color: #6b21a8;
+}
+
+.purple-button.is-disabled {
+ background-color: #d8b4fe;
+ border-color: #d8b4fe;
+ opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
+}
+// 閫夐」瀛椾綋鏀惧ぇ
+// ::v-deep.el-checkbox-group {
+// span {
+// font-size: 24px;
+// }
+// }
+</style>
diff --git a/src/views/followvisit/outpatient/index.vue b/src/views/followvisit/outpatient/index.vue
index ab2f5de..f253049 100644
--- a/src/views/followvisit/outpatient/index.vue
+++ b/src/views/followvisit/outpatient/index.vue
@@ -138,8 +138,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -739,7 +738,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -1131,12 +1130,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1273,10 +1269,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index c128a84..3139041 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -18,7 +18,7 @@
>鍙睍绀烘湰娆℃湇鍔′俊鎭�</el-button
>
</div>
- <div style="margin-left: 20px; color: #59a0f0">
+ <!-- <div style="margin-left: 20px; color: #59a0f0">
<el-link
href="https://9.208.2.207:6060/search-homepage"
target="_blank"
@@ -26,7 +26,7 @@
>
鍓嶅線CDSS鏌ヨ
</el-link>
- </div>
+ </div> -->
<div class="merge-controls" v-if="Whetherall">
<el-button
type="primary"
@@ -52,6 +52,7 @@
<el-table
:data="logsheetlist"
:row-class-name="tableRowClassName"
+ :max-height="350"
style="width: 100%"
height="350"
@selection-change="handleSelectionChange"
@@ -255,6 +256,7 @@
/>
</el-dialog>
<div class="action-container">
+ <!-- 闅忚鍐呭 -->
<div class="call-action">
<div class="call-container">
<!-- <div class="call-header">
@@ -295,29 +297,28 @@
}}</span>
</div>
<div class="dev-xx">
- <el-radio-group
- v-model="item.scriptResult"
- @change="
- handleOptionChange(
- $event,
- index,
- item.svyLibTemplateTargetoptions,
- item
- )
- "
- >
+ <el-radio-group v-model="item.scriptResult">
<el-radio
v-for="(
items, indexs
- ) in item.svyLibTemplateTargetoptions"
+ ) in item.svyTaskTemplateTargetoptions"
:class="items.isabnormal ? 'red-star' : ''"
:key="indexs"
:label="items.optioncontent"
+ @click.native.prevent="
+ handleRadioToggle(
+ item,
+ index,
+ item.svyTaskTemplateTargetoptions,
+ items.optioncontent
+ )
+ "
>{{ items.optioncontent }}</el-radio
>
</el-radio-group>
</div>
<div
+ v-if="item.showAppendInput || item.answerps"
v-if="item.showAppendInput || item.answerps"
class="append-input-container"
>
@@ -359,7 +360,7 @@
@change="$forceUpdate()"
v-for="(
items, indexs
- ) in item.svyLibTemplateTargetoptions"
+ ) in item.svyTaskTemplateTargetoptions"
:key="indexs"
:label="items.optioncontent"
>
@@ -382,8 +383,18 @@
{{ index + 1 }}銆乕闂瓟]<span>{{
item.scriptContent
}}</span>
+ <span v-if="item.valueType == 3">(鍙兘杈撳叆鏁板瓧)</span>
</div>
- <div class="dev-xx">
+ <div class="dev-xx" v-if="item.valueType == 3">
+ <el-input
+ type="text"
+ v-numeric-only
+ placeholder="璇疯緭鍏ョ瓟妗�"
+ v-model="item.scriptResult"
+ >
+ </el-input>
+ </div>
+ <div class="dev-xx" v-else>
<el-input
type="textarea"
:rows="2"
@@ -423,8 +434,9 @@
>
<el-radio
v-for="(items, index) in item.scriptResult"
- :key="items"
+ :key="index"
:label="items"
+ :class="items.isabnormal ? 'red-star' : ''"
>{{ items }}</el-radio
>
</el-radio-group>
@@ -438,15 +450,25 @@
<div class="scriptTopic-dev" :key="index" v-else>
<div class="dev-text">
{{ index + 1 }}銆乕闂瓟]<span>{{
- item.questiontext
+ item.scriptContent
}}</span>
+ <span v-if="item.valueType == 3">(鍙兘杈撳叆鏁板瓧)</span>
</div>
- <div class="dev-xx">
+ <div class="dev-xx" v-if="item.valueType == 3">
+ <el-input
+ type="text"
+ v-numeric-only
+ placeholder="璇疯緭鍏ョ瓟妗�"
+ v-model="item.scriptResult"
+ >
+ </el-input>
+ </div>
+ <div class="dev-xx" v-else>
<el-input
type="textarea"
:rows="2"
placeholder="璇疯緭鍏ョ瓟妗�"
- v-model="item.matchedtext"
+ v-model="item.scriptResult"
clearable
>
</el-input>
@@ -530,6 +552,7 @@
</div>
</div>
</div>
+ <!-- 浜哄伐澶勭悊 -->
<div class="manual-action">
<div class="Followuserinfos">
<div>
@@ -557,7 +580,47 @@
@click="sendAgain()"
>鍐嶆闅忚</el-button
>
- </div> -->
+ </div>
+ <div class="tag-selector-container">
+ <el-select
+ v-model="selectedTag"
+ placeholder="璇烽�夋嫨寮傚父鐘舵��"
+ clearable
+ style="width: 150px; margin-right: 10px"
+ >
+ <el-option
+ v-for="item in tagOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ <span style="display: flex; align-items: center">
+ <span
+ class="color-indicator"
+ :style="{ backgroundColor: item.color }"
+ ></span>
+ <span>{{ item.label }}</span>
+ </span>
+ </el-option>
+ </el-select>
+
+ <!-- 褰撳墠閫夋嫨鐨勯鑹叉寚绀哄櫒 -->
+ <div
+ v-if="selectedTag"
+ class="color-indicator selected-indicator"
+ :style="{ backgroundColor: getSelectedTagColor() }"
+ ></div>
+
+ <!-- 鏍囪璇存槑鎻愮ず -->
+ <el-tooltip
+ v-if="selectedTag"
+ effect="light"
+ :content="getSelectedDescription()"
+ placement="top"
+ >
+ <i class="el-icon-info tag-info-icon"></i>
+ </el-tooltip>
+ </div>
</div>
<el-row>
<el-col :span="14"
@@ -626,10 +689,24 @@
/>
</div>
</div>
- <el-form-item label="闅忚璁板綍">
+ <el-form-item label="闅忚鍐呭" v-if="orgname == '涓芥按甯備腑鍖婚櫌'">
+ <el-input type="textarea" v-model="form.remark"></el-input>
+ </el-form-item>
+ <el-form-item label="闅忚璁板綍" v-else>
<el-input type="textarea" v-model="form.remark"></el-input>
</el-form-item>
+ <el-form-item label="闅忚鎯呭喌" v-if="orgname == '涓芥按甯備腑鍖婚櫌'">
+ <el-radio-group v-model="form.taskSituation">
+ <el-radio
+ v-for="city in cities"
+ :label="city.value"
+ :value="city.value"
+ :key="city.value"
+ >{{ city.label }}</el-radio
+ >
+ </el-radio-group>
+ </el-form-item>
<el-form-item label="澶勭悊鎰忚">
<div>
<el-button
@@ -653,6 +730,9 @@
<el-button plain type="info" @click="Editsingletaskson('5')"
>涓績闅忚</el-button
>
+ <el-button type="primary" round @click="sendAgainmsg"
+ >鐭俊鍙戦��</el-button
+ >
</div>
</el-form-item>
</el-form>
@@ -672,6 +752,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"
@@ -685,6 +783,16 @@
v-model="userform.relativetelcode"
placeholder="璇疯緭鍏ュ鍚�"
maxlength="20"
+ ></el-input> </el-form-item
+ ></el-col>
+ </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>
@@ -714,7 +822,53 @@
</div>
</div>
</div>
-
+ <!-- 鐭俊鍙戦�佸璇濇 -->
+ <el-dialog title="鐭俊鍙戦��" :visible.sync="smsDialogVisible">
+ <!-- 娉ㄦ剰杩欓噷浣跨敤浜� smsDialogVisible 浠ュ尯鍒嗗凡鏈夌殑 dialogFormVisible -->
+ <el-form ref="smsForm" :model="form" label-width="80px">
+ <el-form-item label="鎮h�呭悕绉�">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="form.sendname"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="骞撮緞">
+ <el-input style="width: 400px" disabled v-model="form.age"></el-input>
+ </el-form-item>
+ <el-form-item label="鐢佃瘽">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="userform.telcode"
+ ></el-input>
+ <!-- 娉ㄦ剰杩欓噷鍙兘浣跨敤 userform.telcode -->
+ </el-form-item>
+ <el-form-item label="绉戝">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="form.deptname"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鐥呭尯">
+ <el-input
+ style="width: 400px"
+ disabled
+ v-model="form.leavehospitaldistrictname"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鐭俊鍐呭">
+ <el-input type="textarea" v-model="smsContent"></el-input>
+ <!-- 寤鸿浣跨敤鐙珛鐨� smsContent 鍙橀噺 -->
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="smsDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="sendSms">纭鍙戦��</el-button>
+ <!-- 娉ㄦ剰鏂规硶鍚嶆敼涓� sendSms -->
+ </div>
+ </el-dialog>
<el-dialog
title="鎮h�呭啀娆¢殢璁�"
v-dialogDrags
@@ -810,14 +964,14 @@
<el-divider></el-divider>
<el-row>
<el-col :span="12">
- <el-form-item label="闅忚鏂瑰紡" prop="date1">
+ <el-form-item label="闅忚鏂瑰紡" prop="visitType">
<el-select
v-model="form.visitType"
filterable
allow-create
default-first-option
@change="visitChange"
- placeholder="璇烽�夋嫨闅忚鏂瑰紡(渚濆嚭闄㈡椂闂存妧璁$畻)"
+ placeholder="璇烽�夋嫨闅忚鏂瑰紡(渚濆嚭闄㈡椂闂磋绠�)"
>
<el-option
v-for="item in options"
@@ -838,6 +992,8 @@
align="right"
v-model="form.date1"
class="custom-disabled"
+ value-format="yyyy-MM-dd"
+ @change="checkFollowupDate"
></el-date-picker>
</el-form-item>
</el-col>
@@ -860,6 +1016,18 @@
<el-button type="primary" @click="setupsubtask">纭鍒涘缓鏈嶅姟</el-button>
</div>
</el-dialog>
+ <div class="main-content" v-if="orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'">
+ <!-- <el-button @click="CaldialogVisible = true">鎵撳紑寮规</el-button> -->
+
+ <!-- 寮规璋冪敤 -->
+ <el-dialog
+ title="鍛煎彨鍔熻兘妗�"
+ :visible.sync="CaldialogVisible"
+ width="60%"
+ >
+ <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" />
+ </el-dialog>
+ </div>
</div>
</template>
@@ -876,6 +1044,7 @@
updatePersonVoices,
addPersonVoices,
query360PatInfo,
+ sendMsg,
} from "@/api/AiCentre/index";
import {
messagelistpatient,
@@ -884,12 +1053,74 @@
} from "@/api/patient/homepage";
import CallButton from "@/components/CallButton";
import MergeAndModify from "./MergeAndModify.vue";
+import CallCenterLs from "@/components/CallCenterLs";
export default {
components: {
CallButton,
MergeAndModify,
+ CallCenterLs,
},
+ directives: {
+ numericOnly: {
+ bind(el, binding, vnode) {
+ // 灏濊瘯鑾峰彇瀹為檯鐨刬nput鍏冪礌
+ const input = el.tagName === "INPUT" ? el : el.querySelector("input");
+ if (!input) {
+ console.warn("v-numeric-only: 鏈壘鍒癷nput鍏冪礌");
+ return;
+ }
+ const handleInput = function (event) {
+ const oldValue = input.value;
+ const newValue = oldValue.replace(/[^\d]/g, "");
+ if (newValue !== oldValue) {
+ input.value = newValue;
+ // 瑙﹀彂input浜嬩欢锛岄�氱煡v-model鏇存柊
+ input.dispatchEvent(new Event("input", { bubbles: true })); // 娉ㄦ剰bubbles
+ }
+ };
+
+ const handlePaste = function (event) {
+ event.preventDefault();
+ const clipboardData = event.clipboardData || window.clipboardData;
+ const pastedData = clipboardData.getData("text");
+ const numericValue = pastedData.replace(/[^\d]/g, "");
+
+ // 妯℃嫙鍦ㄥ厜鏍囦綅缃彃鍏ョ函鏁板瓧鏂囨湰
+ const start = input.selectionStart;
+ const end = input.selectionEnd;
+ input.value =
+ input.value.substring(0, start) +
+ numericValue +
+ input.value.substring(end);
+ // 璋冩暣鍏夋爣浣嶇疆
+ const newCursorPos = start + numericValue.length;
+ input.setSelectionRange(newCursorPos, newCursorPos);
+
+ // 瑙﹀彂input浜嬩欢
+ input.dispatchEvent(new Event("input", { bubbles: true }));
+ };
+
+ input.addEventListener("input", handleInput);
+ input.addEventListener("paste", handlePaste);
+
+ // 瀛樺偍寮曠敤浠ヤ究瑙g粦
+ el._numericOnly = {
+ inputHandle: handleInput,
+ pasteHandle: handlePaste,
+ inputEl: input,
+ };
+ },
+ unbind(el) {
+ if (el._numericOnly) {
+ const { inputHandle, pasteHandle, inputEl } = el._numericOnly;
+ inputEl.removeEventListener("input", inputHandle);
+ inputEl.removeEventListener("paste", pasteHandle);
+ delete el._numericOnly;
+ }
+ },
+ },
+ },
dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
data() {
const validatePhone = (rule, value, callback) => {
@@ -911,7 +1142,11 @@
// 宸叉湁鏁版嵁...
callStatus: "idle", // idle, calling, connected, ended, failed
isEndingCall: false,
+ CaldialogVisible: false,
currentCall: null, // 褰撳墠閫氳瘽瀵硅薄
+ // 璺敱鐩戝惉鐩稿叧
+ routeWatcher: null,
+ lastRoutePath: this.$route.path,
input: "浠婂ぉ韬綋杩樹笉閿�",
radio: "2",
taskname: "",
@@ -919,19 +1154,86 @@
voice: "",
templateid: "",
again: "",
+ orgname: "",
zcform: {},
form: {},
+ cities: [
+ {
+ label: "姝e父璇煶",
+ value: "1",
+ },
+ {
+ label: "鎮h�呮嫆鎺ユ垨鎷掕",
+ value: "2",
+ },
+ {
+ label: "闈㈣鎴栬�呮帴璇�",
+ value: "3",
+ },
+ {
+ label: "寰俊闅忚",
+ value: "4",
+ },
+ {
+ label: "闅忚鐢佃瘽涓嶆纭�",
+ value: "5",
+ },
+ {
+ label: "鍏朵粬鎯呭喌涓嶅疁闅忚",
+ value: "6",
+ },
+ ],
tableDatatop: [], //棰樼洰琛�
voiceDatatop: [], //棰樼洰琛�
dynamicTags: [],
isMergeMode: false,
mergeDialogVisible: false,
selectedServices: [], // 閫変腑鐨勬湇鍔″垪琛�
+ selectedTag: "",
+ tagOptions: [
+ {
+ value: "0",
+ label: "姝e父",
+ type: "normal",
+ color: "#7ff5e1",
+ description: "鎮h�呮儏鍐垫甯革紝鏃犻渶鐗瑰埆鍏虫敞",
+ },
+ {
+ value: "1",
+ label: "寮傚父",
+ type: "abnormal",
+ color: "#f75c5c",
+ description: "鎮h�呭瓨鍦ㄥ紓甯告儏鍐碉紝闇�瑕侀噸鐐瑰叧娉�",
+ },
+ {
+ value: "2",
+ label: "璀﹀憡",
+ type: "warning",
+ color: "#fbfb4a",
+ description: "鎮h�呮儏鍐甸渶瑕佽鍛婃敞鎰忥紝鍙兘瀛樺湪椋庨櫓",
+ },
+ ],
zcrules: {
resource: [
{ required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
],
- date1: [{ required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" }],
+ date1: [
+ { required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
+ {
+ validator: (rule, value, callback) => {
+ if (!value) {
+ return callback(new Error("璇烽�夋嫨闅忚鏃堕棿"));
+ }
+ const selectedDate = new Date(value);
+ const now = new Date();
+ if (selectedDate < now) {
+ return callback(new Error("闅忚鏃堕棿涓嶈兘鏃╀簬褰撳墠鏃ユ湡"));
+ }
+ callback();
+ },
+ trigger: "change",
+ },
+ ],
},
userrules: {
telcode: [{ validator: validatePhone, trigger: "blur" }],
@@ -963,8 +1265,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -976,56 +1278,56 @@
// 绂佺敤浠婂ぉ鍙婁箣鍓嶇殑鏃ユ湡
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
},
- shortcuts: [
- {
- text: "涓冨ぉ鍚�",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
- picker.$emit("pick", date);
- },
- },
- {
- text: "15澶╁悗",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() + 3600 * 1000 * 24 * 15);
- picker.$emit("pick", date);
- },
- },
- {
- text: "涓�涓湀鍚�",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
- picker.$emit("pick", date);
- },
- },
- {
- text: "涓変釜鏈堝悗",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() + 3600 * 1000 * 24 * 90);
- picker.$emit("pick", date);
- },
- },
- {
- text: "鍏釜鏈堝悗",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() + 3600 * 1000 * 24 * 180);
- picker.$emit("pick", date);
- },
- },
- {
- text: "涓�骞村悗",
- onClick(picker) {
- const date = new Date();
- date.setTime(date.getTime() + 3600 * 1000 * 24 * 365);
- picker.$emit("pick", date);
- },
- },
- ],
+ // shortcuts: [
+ // {
+ // text: "涓冨ぉ鍚�",
+ // onClick(picker) {
+ // const date = new Date();
+ // date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
+ // picker.$emit("pick", date);
+ // },
+ // },
+ // {
+ // text: "15澶╁悗",
+ // onClick(picker) {
+ // const date = new Date();
+ // date.setTime(date.getTime() + 3600 * 1000 * 24 * 15);
+ // picker.$emit("pick", date);
+ // },
+ // },
+ // {
+ // text: "涓�涓湀鍚�",
+ // onClick(picker) {
+ // const date = new Date();
+ // date.setTime(date.getTime() + 3600 * 1000 * 24 * 30);
+ // picker.$emit("pick", date);
+ // },
+ // },
+ // {
+ // text: "涓変釜鏈堝悗",
+ // onClick(picker) {
+ // const date = new Date();
+ // date.setTime(date.getTime() + 3600 * 1000 * 24 * 90);
+ // picker.$emit("pick", date);
+ // },
+ // },
+ // {
+ // text: "鍏釜鏈堝悗",
+ // onClick(picker) {
+ // const date = new Date();
+ // date.setTime(date.getTime() + 3600 * 1000 * 24 * 180);
+ // picker.$emit("pick", date);
+ // },
+ // },
+ // {
+ // text: "涓�骞村悗",
+ // onClick(picker) {
+ // const date = new Date();
+ // date.setTime(date.getTime() + 3600 * 1000 * 24 * 365);
+ // picker.$emit("pick", date);
+ // },
+ // },
+ // ],
},
options: [
{
@@ -1054,6 +1356,8 @@
},
],
userform: {},
+ smsDialogVisible: false, // 鎺у埗鐭俊瀵硅瘽妗嗘樉绀�
+ smsContent: "", // 瀛樺偍鐭俊鍐呭
Whetherall: true, //鏄惁鍏ㄩ儴璁板綍灞曠ず
dialogFormVisible: false,
Voicetype: 0, //鏄惁涓鸿闊虫湇鍔�
@@ -1067,6 +1371,7 @@
patid: null,
};
},
+
computed: {
callStatusText() {
const statusMap = {
@@ -1098,6 +1403,7 @@
this.Voicetype = this.$route.query.Voicetype;
this.visitCount = this.$route.query.visitCount;
this.serviceType = this.$route.query.serviceType;
+ this.orgname = localStorage.getItem("orgname");
this.getTaskservelist();
},
@@ -1142,11 +1448,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning("360鍔熻兘鏆傛湭寮�閫�");
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1160,7 +1465,7 @@
getuserinfo() {
const queryParams = {
pid: Number(this.patid),
- allhosp: "0",
+ allhosp: "0", //1浣忛櫌2闂ㄨ瘖3浣撴4鍑洪櫌
};
// 鎮h�呭熀纭�淇℃伅
messagelistpatient(queryParams).then((response) => {
@@ -1179,35 +1484,64 @@
},
// 鍐嶆闅忚鏃堕棿閫夊彇
visitChange(value) {
- // 鏍规嵁閫夋嫨鐨勯殢璁挎柟寮忚缃椂闂�
+ if (!this.form.endtime) {
+ this.$message.warning("璇峰厛纭鍑洪櫌鏃堕棿");
+ this.form.visitType = "";
+ this.$refs.zcform.clearValidate(["visitType"]);
+ return;
+ }
+
+ const dischargeDate = new Date(this.form.endtime);
const now = new Date();
+ let followupDate = new Date(dischargeDate);
+
+ // 鏍规嵁閫夋嫨鐨勯殢璁挎柟寮忚绠楅殢璁挎棩鏈�
if (value.includes("涓冨ぉ鍚�")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 7
- );
+ followupDate.setDate(dischargeDate.getDate() + 7);
} else if (value.includes("15澶╁悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 15
- );
+ followupDate.setDate(dischargeDate.getDate() + 15);
} else if (value.includes("涓�涓湀鍚�")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 30
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 1);
} else if (value.includes("涓変釜鏈堝悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 90
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 3);
} else if (value.includes("鍏釜鏈堝悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 180
- );
+ followupDate.setMonth(dischargeDate.getMonth() + 6);
} else if (value.includes("涓�骞村悗")) {
- this.form.date1 = new Date(
- Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 365
+ followupDate.setFullYear(dischargeDate.getFullYear() + 1);
+ }
+
+ if (followupDate < now) {
+ this.$message.warning(
+ `璁$畻鍑虹殑闅忚鏃堕棿 ${this.formatTime(followupDate)} 宸茶繃鏈焋
);
+ this.form.visitType = "";
+ this.$refs.zcform.clearValidate(["visitType", "date1"]);
+ return;
+ }
+
+ this.form.date1 = this.formatTime(followupDate);
+
+ this.$refs.zcform.clearValidate(["date1"]);
+ },
+ // 妫�鏌ラ殢璁挎棩鏈熸槸鍚︽湁鏁�
+ checkFollowupDate(date) {
+ console.log(date);
+
+ if (!date) {
+ this.form.date1 = "";
+ this.$refs.zcform.clearValidate(["date1"]);
+ return;
+ }
+
+ const selectedDate = new Date(date);
+ const now = new Date();
+
+ if (selectedDate < now) {
+ this.$message.warning("闅忚鏃堕棿涓嶈兘鏃╀簬褰撳墠鏃ユ湡");
+ this.form.date1 = "";
+ this.$refs.zcform.validateField("date1"); // 瑙﹀彂楠岃瘉
}
},
-
// 鑾峰彇璇煶鏁版嵁
getPersonVoices(id) {
let obj = {
@@ -1267,14 +1601,25 @@
let excep = "";
const promises = [];
this.tableDatatop.forEach((item) => {
- var objs = item.svyLibTemplateTargetoptions.find(
- (items) => items.optioncontent == item.scriptResult
- );
- if (obj) {
- if (objs.isabnormal) {
- excep = 1;
+ if (item.valueType == 3 && item.scriptResult) {
+ // 楠岃瘉鏄惁涓烘湁鏁堟暟瀛�
+ if (!/^\d+$/.test(item.scriptResult)) {
+ this.$message.error(`闂 "${item.scriptContent}" 蹇呴』杈撳叆鏁板瓧`);
+ return;
}
}
+ var objs = item.svyTaskTemplateTargetoptions.find(
+ (items) => items.optioncontent == item.scriptResult
+ );
+
+ if (objs) {
+ if (excep != 1 && objs.isabnormal) {
+ excep = objs.isabnormal;
+ this.selectedTag = objs.isabnormal;
+ }
+ }
+ console.log(excep, "excep");
+
let obj = {
asrtext: null,
patid: this.patid,
@@ -1297,6 +1642,7 @@
promises.push(serviceSubtaskDetailadd(obj));
}
});
+
// 浣跨敤 Promise.all 绛夊緟鎵�鏈夊紓姝ユ搷浣滃畬鎴�
Promise.all(promises)
.then((results) => {
@@ -1308,49 +1654,49 @@
});
this.Editsingletasksonyic(6);
- // this.$modal
- // .confirm(
- // '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
- // this.logsheetlist[0].sendname +
- // '"鍐嶆闅忚锛�',
- // "纭",
- // {
- // confirmButtonText: "纭畾",
- // cancelButtonText: "鍙栨秷",
- // showCancelButton: true,
- // dangerouslyUseHTMLString: true,
- // confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
- // cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
- // }
- // )
- // .then(() => {
- // document.querySelector("#app").scrollTo(0, 0);
- // this.formtidy();
- // this.dialogFormVisible = true;
- // })
- // .catch(() => {
- // if (this.form.serviceType == 13) {
- // if (this.visitCount != 1) {
- // this.$router.push({
- // path: "/logisticsservice/zbAgain",
- // });
- // } else {
- // this.$router.push({
- // path: "/logisticsservice/record",
- // });
- // }
- // } else if (this.form.serviceType == 2) {
- // if (this.visitCount != 1) {
- // this.$router.push({
- // path: "/logisticsservice/again",
- // });
- // } else {
- // this.$router.push({
- // path: "/followvisit/discharge",
- // });
- // }
- // }
- // });
+ this.$modal
+ .confirm(
+ '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
+ this.userform.name +
+ '"鍐嶆闅忚锛�',
+ "纭",
+ {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ showCancelButton: true,
+ dangerouslyUseHTMLString: true,
+ confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
+ cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
+ }
+ )
+ .then(() => {
+ document.querySelector("#app").scrollTo(0, 0);
+ this.formtidy();
+ this.dialogFormVisible = true;
+ })
+ .catch(() => {
+ if (this.form.serviceType == 13) {
+ if (this.visitCount != 1) {
+ this.$router.push({
+ path: "/logisticsservice/zbAgain",
+ });
+ } else {
+ this.$router.push({
+ path: "/logisticsservice/record",
+ });
+ }
+ } else if (this.form.serviceType == 2) {
+ if (this.visitCount != 1) {
+ this.$router.push({
+ path: "/logisticsservice/again",
+ });
+ } else {
+ this.$router.push({
+ path: "/followvisit/discharge",
+ });
+ }
+ }
+ });
})
.catch((error) => {
// 濡傛灉鏈変换浣曚竴涓紓姝ユ搷浣滃け璐ワ紝浼氳繘鍏ヨ繖閲�
@@ -1398,8 +1744,13 @@
this.$message.error("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜");
return;
}
-
this.currentPhoneNumber = phone;
+ // 鍛煎彨鍒ゆ柇
+ if (this.orgname == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�") {
+ this.CaldialogVisible = true;
+ return;
+ }
+
this.callType = type;
this.callStatus = "calling";
@@ -1446,7 +1797,11 @@
}, 3000);
},
yuyingetdetail() {
- this.tableDatatop.forEach((item, index) => {
+ const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop));
+ console.log(dataToSubmit, "dataToSubmit");
+ return;
+ dataToSubmit.forEach((item, index) => {
+ // 瀵规嫹璐濈殑鏁版嵁杩涜鎿嶄綔锛屼笉褰卞搷鍘熷鐨� scriptResult 鏁扮粍
item.scriptResult = item.scriptResult.join("&");
item.templatequestionnum = index + 1;
item.subId = this.id;
@@ -1458,8 +1813,9 @@
item.patid = this.patid;
item.templateid = item.templateID;
});
+
let obj = {
- serviceSubtaskDetailList: this.tableDatatop,
+ serviceSubtaskDetailList: dataToSubmit, // 鎻愪氦澶勭悊鍚庣殑鍓湰
param1: this.taskid,
param2: this.patid,
subId: this.id,
@@ -1518,7 +1874,16 @@
formtidy() {
this.form.visitType2 = this.form.visitType;
this.form.date2 = this.form.longSendTime;
+ // this.form.date1 = this.setCurrentDate();
this.form.remark2 = this.form.remark;
+ },
+ setCurrentDate() {
+ // 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� yyyy-MM-dd
+ const today = new Date();
+ const year = today.getFullYear();
+ const month = String(today.getMonth() + 1).padStart(2, "0");
+ const day = String(today.getDate()).padStart(2, "0");
+ return `${year}-${month}-${day}`;
},
// 鑾峰彇鎮h�呰褰�
getTaskservelist(id) {
@@ -1531,7 +1896,7 @@
getTaskservelist({
patid: this.patid,
subId: id,
- pageSize:100,
+ pageSize: 100,
}).then((res) => {
if (res.code == 200) {
console.log(11);
@@ -1539,12 +1904,11 @@
this.form = res.rows[0].serviceSubtaskList.find(
(item) => item.id == this.id
);
- console.log(this.form);
-
- console.log(this.form.serviceType, "serviceType");
+ console.log(this.form, "serviceType");
this.logsheetlist = res.rows[0].serviceSubtaskList;
- this.templateid = this.logsheetlist[0].templateid;
+ this.templateid = this.form.templateid;
+ this.selectedTag = this.form.excep;
const targetDate = new Date(this.form.longSendTime); // 鐩爣鏃ユ湡
const now = new Date(); // 褰撳墠鏃堕棿
if (now < targetDate && this.form.sendstate == 2) {
@@ -1564,6 +1928,34 @@
this.getsearchrResults();
}
});
+ },
+ // 璋冭捣鐭俊鍙戦�佸璇濇
+ sendAgainmsg() {
+ this.smsDialogVisible = true;
+ // 鍙互鍦ㄨ繖閲屽垵濮嬪寲 smsContent锛屼緥濡� this.smsContent = '';
+ },
+
+ // 鍙戦�佺煭淇$殑鏂规硶
+ sendSms() {
+ // 杩欓噷璋冪敤浣犵殑鐭俊鍙戦�� API
+ // 鍋囪 API 涓� sendMsg锛屽弬鏁板彲鑳介渶瑕佹牴鎹疄闄呮儏鍐佃皟鏁�
+ sendMsg({
+ phone: this.userform.telcode, // 纭繚鐢佃瘽鍙风爜瀛楁姝g‘
+ content: this.smsContent,
+ })
+ .then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("鍙戦�佹垚鍔�");
+ this.smsDialogVisible = false; // 鍏抽棴瀵硅瘽妗�
+ this.smsContent = ""; // 娓呯┖鍐呭
+ } else {
+ this.$modal.msgError("鍙戦�佸け璐�");
+ }
+ })
+ .catch((error) => {
+ console.error("鍙戦�佺煭淇″け璐�:", error);
+ this.$modal.msgError("鍙戦�佸け璐�");
+ });
},
Editsingletaskson(son) {
let objson = {};
@@ -1594,6 +1986,8 @@
(item) => item.id == this.id
);
objson.remark = this.form.remark;
+ objson.taskSituation = this.form.taskSituation;
+ objson.excep = this.selectedTag;
if (sendstate) objson.sendstate = sendstate;
Editsingletaskson(objson).then((res) => {
if (res.code) {
@@ -1618,6 +2012,30 @@
}
return "";
},
+ getSelectedTagType() {
+ if (!this.selectedTag) return "";
+ const tag = this.tagOptions.find(
+ (item) => item.value === this.selectedTag
+ );
+ return tag ? tag.type : "";
+ },
+
+ getSelectedTagColor() {
+ if (!this.selectedTag) return "";
+ const tag = this.tagOptions.find(
+ (item) => item.value === this.selectedTag
+ );
+ return tag ? tag.color : "";
+ },
+
+ getSelectedDescription() {
+ if (!this.selectedTag) return "";
+ const tag = this.tagOptions.find(
+ (item) => item.value === this.selectedTag
+ );
+ return tag ? tag.description : "";
+ },
+
// 璋冭捣鍐嶆鍙戦��
sendAgain() {
document.querySelector("#app").scrollTo(0, 0);
@@ -1630,10 +2048,10 @@
this.$modal
.confirm('鏄惁鏌ョ湅浠诲姟涓�"' + row.taskName + '"鐨勬湇鍔¤鎯呮暟鎹紵')
.then(() => {
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
- this.Voicetype = 1;
- }
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
}
this.taskid = row.taskid;
this.id = row.id;
@@ -1661,7 +2079,7 @@
(item) => item.optioncontent == a
);
} else {
- var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find(
+ var obj = this.tableDatatop[b].svyTaskTemplateTargetoptions.find(
(item) => item.optioncontent == a
);
}
@@ -1672,13 +2090,47 @@
}
this.$forceUpdate();
},
+ handleRadioToggles(questionItem, optionValue) {
+ if (!questionItem.matchedtext) {
+ questionItem.matchedtext == "";
+ }
+ // 濡傛灉鐐瑰嚮鐨勬槸褰撳墠宸查�変腑鐨勯�夐」锛屽垯鍙栨秷閫変腑
+ if (questionItem.matchedtext == optionValue) {
+ this.$set(questionItem, "matchedtext", "");
+ // 鍚屾椂閲嶇疆涓庨�夐」鐩稿叧鐨勭姸鎬�
+ questionItem.isabnormal = false;
+ questionItem.showAppendInput = false;
+ // 娉ㄦ剰锛氬彇娑堥�変腑鏃讹紝鎴戜滑閫氬父涓嶅笇鏈涜Е鍙戦鐩烦杞�昏緫锛屾墍浠ョ洿鎺ヨ繑鍥�
+ // 濡傛灉闇�瑕侊紝鍙互鍦ㄨ繖閲屾坊鍔犲彇娑堥�変腑鍚庣殑鐗瑰畾閫昏緫锛屼緥濡傞噸缃鐩簭鍒�
+ } else {
+ // 濡傛灉鐐瑰嚮鐨勬槸鏈�変腑鐨勯�夐」锛屽垯閫氳繃鏇存敼缁戝畾鍊兼潵瑙﹀彂鍘熷鐨� handleOptionChange 鏂规硶
+ // 杩欓噷鍙渶瑕佹敼鍙� v-model 缁戝畾鐨勫�硷紝change浜嬩欢浼氳嚜鍔ㄨЕ鍙�
+ this.$set(questionItem, "matchedtext", optionValue); // 鍚庣画鐨勮烦杞瓑澶嶆潅閫昏緫浼氬湪 handleOptionChange 涓甯告墽琛�
+ }
+ },
+ // 鏂板鐨勫垏鎹㈤�変腑/鍙栨秷閫変腑鏂规硶
+ handleRadioToggle(questionItem, index, options, optionValue) {
+ // 濡傛灉鐐瑰嚮鐨勬槸褰撳墠宸查�変腑鐨勯�夐」锛屽垯鍙栨秷閫変腑
+ if (questionItem.scriptResult === optionValue) {
+ questionItem.scriptResult = ""; // 娓呯┖閫変腑鍊�
+ // 鍚屾椂閲嶇疆涓庨�夐」鐩稿叧鐨勭姸鎬�
+ questionItem.isabnormal = false;
+ questionItem.showAppendInput = false;
+ // 娉ㄦ剰锛氬彇娑堥�変腑鏃讹紝鎴戜滑閫氬父涓嶅笇鏈涜Е鍙戦鐩烦杞�昏緫锛屾墍浠ョ洿鎺ヨ繑鍥�
+ // 濡傛灉闇�瑕侊紝鍙互鍦ㄨ繖閲屾坊鍔犲彇娑堥�変腑鍚庣殑鐗瑰畾閫昏緫锛屼緥濡傞噸缃鐩簭鍒�
+ } else {
+ // 濡傛灉鐐瑰嚮鐨勬槸鏈�変腑鐨勯�夐」锛屽垯閫氳繃鏇存敼缁戝畾鍊兼潵瑙﹀彂鍘熷鐨� handleOptionChange 鏂规硶
+ // 杩欓噷鍙渶瑕佹敼鍙� v-model 缁戝畾鐨勫�硷紝change浜嬩欢浼氳嚜鍔ㄨЕ鍙�
+ questionItem.scriptResult = optionValue;
+ this.handleOptionChange(optionValue, index, options, questionItem);
+ // 鍚庣画鐨勮烦杞瓑澶嶆潅閫昏緫浼氬湪 handleOptionChange 涓甯告墽琛�
+ }
+ },
+
// 鍦╩ethods閮ㄥ垎锛屼慨鏀筯andleOptionChange鏂规硶:
handleOptionChange(selectedOption, questionIndex, options, a) {
- // 鍒ゆ柇鏄惁璇煶
- if (this.Voicetype) {
- this.aahandleOptionChange(selectedOption, questionIndex, options);
- return;
- }
+ console.log(selectedOption, questionIndex, options, a, "888");
+
if (document.activeElement) {
document.activeElement.blur();
}
@@ -1771,7 +2223,7 @@
},
overdata() {
this.tableDatatop.forEach((item, index) => {
- var obj = item.svyLibTemplateTargetoptions.find(
+ var obj = item.svyTaskTemplateTargetoptions.find(
(items) => items.optioncontent == item.scriptResult
);
if (obj) {
@@ -1901,6 +2353,21 @@
this.getTaskservelist();
},
},
+ // deactivated() {
+ // console.log(11);
+ // },
+ beforeRouteLeave(to, from, next) {
+ this.$refs.callButton.cleanupResources();
+ if (this.$refs.CallCenterLs) {
+ console.log(1);
+
+ this.$refs.CallCenterLs.handleSeatLogout();
+ }
+ next(); // 纭繚璋冪敤 nex
+ },
+ // beforeRouteUpdate() {
+ // console.log(33);
+ // },
};
</script>
@@ -1929,7 +2396,22 @@
height: 100%; /* 纭繚楂樺害缁ф壙 */
}
}
+.numeric-input {
+ position: relative;
+}
+.numeric-input::after {
+ content: "鍙兘杈撳叆鏁板瓧";
+ position: absolute;
+ right: 8px;
+ top: 50%;
+ transform: translateY(-50%);
+ font-size: 12px;
+ color: #999;
+ background: #f5f5f5;
+ padding: 2px 6px;
+ border-radius: 4px;
+}
.call-container {
padding: 20px;
background: #fff;
@@ -2075,7 +2557,7 @@
.CONTENT {
padding: 10px;
height: 100%;
- min-height: 660px; /* 璁剧疆鏈�灏忛珮搴� */
+ min-height: 738px; /* 璁剧疆鏈�灏忛珮搴� */
.title {
font-size: 22px;
@@ -2090,7 +2572,7 @@
padding: 30px;
border: 1px solid #dcdfe6;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
- max-height: 580px; /* 璁剧疆鏈�澶ч珮搴� */
+ max-height: 618px; /* 璁剧疆鏈�澶ч珮搴� */
overflow-y: auto; /* 鍐呭瓒呰繃楂樺害鏃舵樉绀烘粴鍔ㄦ潯 */
.topic-dev {
@@ -2172,7 +2654,54 @@
top: 0;
}
}
+.tag-selector-container {
+ display: flex;
+ align-items: center;
+ margin: 0 30px;
+}
+.color-indicator {
+ width: 16px;
+ height: 16px;
+ border-radius: 3px;
+ margin-right: 8px;
+ display: inline-block;
+}
+
+.selected-indicator {
+ margin-left: 10px;
+ width: 20px;
+ height: 20px;
+}
+
+.tag-info-icon {
+ margin-left: 10px;
+ color: #909399;
+ cursor: pointer;
+ font-size: 16px;
+}
+
+/* 纭繚閫夋嫨鍣ㄩ�夐」涓篃鏄剧ず棰滆壊鍧� */
+.el-select-dropdown__item {
+ display: flex;
+ align-items: center;
+}
+
+.tag-normal {
+ background-color: #7ff5e1;
+}
+.tag-abnormal {
+ background-color: #f75c5c;
+}
+.tag-warning {
+ background-color: #fbfb4a;
+}
+
+.tag-info {
+ margin-left: 10px;
+ color: #909399;
+ cursor: pointer;
+}
::v-deep.offside-value .el-radio__label {
color: #fff;
}
@@ -2222,4 +2751,193 @@
color: #080808 !important;
cursor: not-allowed;
}
+/* 鍘熸湁鐨勬牱寮忎繚鎸佷笉鍙橈紝娣诲姞浠ヤ笅鍝嶅簲寮忎唬鐮� */
+
+.Followupdetailspage {
+ margin: 10px;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+}
+
+.action-container {
+ display: flex;
+ flex-direction: row; /* 榛樿妯悜鎺掑垪 */
+ gap: 20px;
+ margin: 0 10px 20px 10px;
+
+ /* 褰撶缉鏀炬瘮渚嬪ぇ浜�100%鎴栧睆骞曞搴﹁緝灏忔椂鏀逛负涓婁笅鎺掑垪 */
+ @media screen and (min-resolution: 1.5dppx) {
+ flex-direction: column;
+
+ .call-action,
+ .manual-action {
+ width: 100% !important;
+ }
+ }
+}
+
+.call-action {
+ width: 65%;
+ min-width: 0;
+}
+
+.manual-action {
+ flex: 1;
+ min-width: 0;
+}
+
+/* 璋冩暣鍐呴儴鍏冪礌鐨勫搷搴斿紡甯冨眬 */
+.Followuserinfos {
+ .el-form {
+ /* 琛ㄥ崟鍝嶅簲寮忚皟鏁� */
+ .el-row {
+ margin: 0 -10px;
+ }
+
+ .el-col {
+ padding: 0 10px;
+ }
+
+ @media screen and (max-width: 768px) {
+ .el-col {
+ width: 100%;
+ margin-bottom: 15px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+ }
+ }
+}
+
+/* 璋冩暣琛ㄦ牸鐨勫搷搴斿紡琛ㄧ幇 */
+.el-table {
+ ::v-deep .el-table__body-wrapper {
+ overflow-x: auto;
+ }
+
+ /* 鍦ㄥ皬灞忓箷涓婅皟鏁磋〃鏍煎垪瀹� */
+ @media screen and (max-width: 992px) {
+ .el-table-column {
+ min-width: 120px;
+ }
+ }
+}
+
+/* 璋冩暣鏍囩閫夋嫨鍣ㄧ殑鍝嶅簲寮忓竷灞� */
+.tag-selector-container {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 10px;
+
+ @media screen and (max-width: 576px) {
+ flex-direction: column;
+ align-items: flex-start;
+
+ .el-select {
+ width: 100%;
+ margin-right: 0 !important;
+ }
+ }
+}
+
+/* 璋冩暣鎸夐挳缁勭殑鍝嶅簲寮忓竷灞� */
+.el-form-item.label-processing-opinion {
+ .el-button-group {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 10px;
+
+ .el-button {
+ flex: 1;
+ min-width: 120px;
+ }
+ }
+}
+
+/* 璋冩暣閫夐」鍗$殑鍝嶅簲寮忚〃鐜� */
+.el-tabs {
+ ::v-deep .el-tabs__nav-wrap {
+ overflow-x: auto;
+ white-space: nowrap;
+
+ &::after {
+ display: none;
+ }
+ }
+}
+
+/* 璋冩暣棰勮鍖哄煙鐨勫搷搴斿紡琛ㄧ幇 */
+.preview-left {
+ @media screen and (max-width: 768px) {
+ margin: 10px;
+ padding: 15px;
+
+ .topic-dev,
+ .scriptTopic-dev {
+ margin-bottom: 15px;
+ }
+ }
+}
+
+/* 璋冩暣瀵硅瘽妗嗙殑鍝嶅簲寮忚〃鐜� */
+.el-dialog {
+ @media screen and (max-width: 992px) {
+ width: 90% !important;
+ margin-top: 5vh !important;
+
+ .el-dialog__body {
+ padding: 15px;
+ }
+ }
+
+ @media screen and (max-width: 576px) {
+ width: 95% !important;
+
+ .el-form-item {
+ margin-bottom: 15px;
+ }
+ }
+}
+
+/* 纭繚鍐呭鍦ㄧ缉鏀炬椂淇濇寔鍙鎬� */
+.headline {
+ font-size: clamp(18px, 2vw, 24px); /* 浣跨敤clamp鍑芥暟纭繚瀛椾綋澶у皬鍦ㄥ悎鐞嗚寖鍥村唴 */
+}
+
+/* 涓虹Щ鍔ㄨ澶囦紭鍖栨粴鍔ㄤ綋楠� */
+@media screen and (max-width: 768px) {
+ .Followuserinfo,
+ .Followuserinfos {
+ padding: 15px;
+ margin: 5px;
+ }
+
+ .CONTENT {
+ min-height: auto;
+ padding: 5px;
+ }
+}
+
+/* 缂╂斁妫�娴嬫牱寮� */
+@media screen and (min-resolution: 1.5dppx),
+ screen and (-webkit-min-device-pixel-ratio: 1.5) {
+ .action-container {
+ flex-direction: column;
+ }
+
+ .call-action,
+ .manual-action {
+ width: 100%;
+ }
+
+ /* 璋冩暣鍐呴儴鍏冪礌闂磋窛 */
+ .call-container,
+ .Followuserinfos {
+ margin-bottom: 20px;
+ }
+}
</style>
diff --git a/src/views/followvisit/record/index.vue b/src/views/followvisit/record/index.vue
index 6192c55..332a54a 100644
--- a/src/views/followvisit/record/index.vue
+++ b/src/views/followvisit/record/index.vue
@@ -149,8 +149,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -215,7 +214,7 @@
<div class="documentf">
<div class="document">
<el-button type="success" size="medium" @click="onthatday()"
- >褰撴棩鏈嶅姟</el-button
+ >浠婃棩鏈嶅姟</el-button
>
</div>
</div>
@@ -808,8 +807,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -863,7 +862,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -906,7 +905,7 @@
serviceType: 13,
searchscope: 3,
sendstate: 2,
- sort: 2,
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
scopetype: [],
leaveldeptcodes: [],
leavehospitaldistrictcodes: [],
@@ -970,6 +969,14 @@
{
value: 3,
label: "鍙戦�佹椂闂�(鍊掑簭)",
+ },
+ {
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
},
],
errtype: "",
@@ -1080,11 +1087,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1406,12 +1412,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1585,10 +1588,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/followvisit/record/physical/index.vue b/src/views/followvisit/record/physical/index.vue
index 53ca223..7e370f1 100644
--- a/src/views/followvisit/record/physical/index.vue
+++ b/src/views/followvisit/record/physical/index.vue
@@ -18,7 +18,7 @@
>鍙睍绀烘湰娆℃湇鍔′俊鎭�</el-button
>
</div>
- <div style="margin-left: 20px; color: #59a0f0">
+ <!-- <div style="margin-left: 20px; color: #59a0f0">
<el-link
href="https://9.208.2.207:6060/search-homepage"
target="_blank"
@@ -26,7 +26,7 @@
>
鍓嶅線CDSS鏌ヨ
</el-link>
- </div>
+ </div> -->
</div>
<!-- <el-button type="success">闅忚鍚庣煭淇�</el-button> -->
</div>
@@ -573,8 +573,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -692,11 +692,10 @@
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1106,11 +1105,11 @@
this.$modal
.confirm('鏄惁鏌ョ湅浠诲姟涓�"' + row.taskName + '"鐨勬湇鍔¤鎯呮暟鎹紵')
.then(() => {
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
- this.Voicetype = 1;
- }
- }
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
+ }
this.taskid = row.taskid;
this.id = row.id;
this.patid = row.patid;
diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue
index 10a9838..bbe13cb 100644
--- a/src/views/followvisit/tasklist/index.vue
+++ b/src/views/followvisit/tasklist/index.vue
@@ -250,8 +250,15 @@
size="medium"
type="text"
@click="handleUpdate(scope.row, 1)"
- ><span class="button-xj"
- ><i class="el-icon-circle-plus-outline"></i>渚濈収鏂板</span
+ ><span class="button-xj">渚濈収鏂板</span></el-button
+ >
+ <el-button
+ v-if="scope.row.sendState != 5"
+ size="medium"
+ type="text"
+ @click="handleAddpatient(scope.row.taskid, scope.row.type)"
+ ><span class="button-hz"
+ ><i class="el-icon-circle-plus-outline"></i>鏂板鎮h��</span
></el-button
>
<el-button
@@ -259,9 +266,7 @@
size="medium"
type="text"
@click="stop(scope.row)"
- ><span class="button-zt"
- ><i class="el-icon-circle-plus-outline"></i>鏆傚仠</span
- ></el-button
+ ><span class="button-zt">鏆傚仠</span></el-button
>
</template>
</el-table-column>
@@ -373,6 +378,13 @@
>
</div>
</el-dialog>
+ <!-- 閫夋嫨鎮h�呭脊妗� -->
+ <Patient-Selection
+ ref="Patient"
+ :dialogVisiblepatient="dialogVisiblepatient"
+ @addoption="addoption"
+ @kkoption="dialogVisiblepatient = true"
+ />
</div>
</template>
@@ -387,23 +399,19 @@
} from "@/api/system/user";
import {
getTasklist,
- getTaskInfo,
- Editsingletask,
delTaskInfo,
- Questionnairetasklist,
- Questionnairetaskget,
- Questionnairetasksponsor,
TaskTemplateSendExecution,
} from "@/api/AiCentre/index";
import store from "@/store";
-
+import PatientSelection from "@/components/PatientSelection"; //姝e垯缁勪欢
+import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Tasklist",
dicts: ["sys_normal_disable", "sys_user_sex", "task_status"],
- components: { Treeselect },
+ components: { Treeselect, PatientSelection },
data() {
return {
// 閬僵灞�
@@ -441,6 +449,8 @@
showTimeNight: [],
showTimeNoon: [],
},
+ dialogVisiblepatient: false,
+ Patientlist: [],
taskformVisible: false,
dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
inputVisible: false,
@@ -474,61 +484,8 @@
label: "娑堟伅閫氱煡",
},
],
- taskoptions: [
- {
- value: "1",
- label: "鐩戞祴璇勪及",
- },
- {
- value: "2",
- label: "鍑洪櫌闅忚",
- },
- {
- value: "3",
- label: "闂ㄨ瘖闅忚",
- },
- {
- value: "4",
- label: "瀹f暀鍏虫��",
- },
- {
- value: "5",
- label: "澶嶈瘖绠$悊",
- },
- // {
- // value: "5",
- // label: "婊℃剰搴﹁皟鏌�",
- // },
- {
- value: "7",
- label: "鎮h�呮姤鍛�",
- },
- // {
- // value: "8",
- // label: "鍏朵粬閫氱煡",
- // },
- {
- value: "9",
- label: "浣撴闅忚",
- },
- // {
- // value: "10",
- // label: "鍖绘妧闅忚",
- // },
- {
- value: "11",
- label: "褰卞儚闅忚",
- },
- {
- value: "12",
- label: "蹇冪數闅忚",
- },
- {
- value: "13",
- label: "涓撶梾闅忚",
- },
- ],
- tasktopic: "2", //鏂板绫诲瀷
+ taskoptions: store.getters.tasktypes,
+ tasktopic: 2, //鏂板绫诲瀷
activname: "",
value: [],
list: [],
@@ -693,6 +650,7 @@
this.tasktopic = this.$route.query.tasktopic
? this.$route.query.tasktopic
: this.tasktopic;
+ this.tasktopic = Number(this.tasktopic);
this.getList();
this.getConfigKey("sys.user.initPassword").then((response) => {
this.initPassword = response.msg;
@@ -719,6 +677,7 @@
this.tasktopic == 3 ||
this.tasktopic == 1 ||
this.tasktopic == 7 ||
+ this.tasktopic == 5 ||
this.tasktopic == 6
) {
if (!this.topqueryParams.type) this.topqueryParams.type = 1;
@@ -732,6 +691,7 @@
label: "闂嵎闅忚",
},
];
+ // this.topqueryParams.type = 2;
// this.topqueryParams.type = 2;
} else if (this.tasktopic == 4 || this.tasktopic == 8) {
if (!this.topqueryParams.type) this.topqueryParams.type = "3";
@@ -753,7 +713,12 @@
value: 2,
label: "闂嵎闅忚",
},
+ {
+ value: 3,
+ label: "瀹f暀鍏虫��",
+ },
];
+ // this.topqueryParams.type = 2;
}
this.topqueryParams.beginTime = this.dateRange[0];
this.topqueryParams.endTime = this.dateRange[1];
@@ -1090,6 +1055,14 @@
const item = data.find((item) => item.value === value);
return item ? item.label : null;
},
+ handleAddpatient(taskid) {
+ this.$refs.Patient.handleAddpatient(taskid);
+ this.dialogVisiblepatient = true; // 鎵嬪姩鎺у埗寮圭獥鏄剧ず
+ },
+ addoption() {
+ this.dialogVisiblepatient = false; // 鎵嬪姩鎺у埗寮圭獥鏄剧ず
+ this.handleQuery();
+ },
},
};
</script>
@@ -1219,6 +1192,12 @@
border-radius: 1px;
color: #ffffff;
}
+.button-hz {
+ background: #63d37b;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
::v-deep.el-radio-group {
span {
diff --git a/src/views/followvisit/technology/index.vue b/src/views/followvisit/technology/index.vue
index dde2ab3..5691b3e 100644
--- a/src/views/followvisit/technology/index.vue
+++ b/src/views/followvisit/technology/index.vue
@@ -138,8 +138,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -807,7 +806,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -858,8 +857,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -1092,11 +1091,9 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh,drcode,drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC=='涓芥按甯備腑鍖婚櫌') {
- this.postData.YeWuXX.YongHuXX.YongHuID = '1400398571877961728';
- this.postData.YeWuXX.YongHuXX.YongHuXM = 'LSZYY';
- }
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, '_blank');
@@ -1344,12 +1341,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1521,10 +1515,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/followvisit/zbAgain/index.vue b/src/views/followvisit/zbAgain/index.vue
index fa4c662..75cd9fe 100644
--- a/src/views/followvisit/zbAgain/index.vue
+++ b/src/views/followvisit/zbAgain/index.vue
@@ -180,8 +180,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -246,7 +245,7 @@
<div class="documentf">
<div class="document">
<el-button type="success" size="medium" @click="onthatday()"
- >褰撴棩鏈嶅姟</el-button
+ >浠婃棩鏈嶅姟</el-button
>
</div>
</div>
@@ -397,13 +396,7 @@
key="drname"
prop="drname"
/>
- <el-table-column
- label="闅忚浜哄憳"
- align="center"
- key="updateBy"
- prop="updateBy"
- width="120"
- />
+
<el-table-column
label="鍑洪櫌澶╂暟"
width="120"
@@ -483,7 +476,13 @@
:show-overflow-tooltip="true"
>
</el-table-column>
-
+ <el-table-column
+ label="闅忚浜哄憳"
+ align="center"
+ key="updateBy"
+ prop="updateBy"
+ width="120"
+ />
<el-table-column
label="鍑洪櫌闅忚妯℃澘鍚嶇О"
align="center"
@@ -918,7 +917,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
{
@@ -973,13 +972,21 @@
value: 3,
label: "鍙戦�佹椂闂�(鍊掑簭)",
},
+ {
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+ },
],
// 鏌ヨ鍙傛暟
topqueryParams: {
pageNum: 1,
pageSize: 10,
sendstate: 2,
- sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
serviceType: 13,
searchscope: 3,
visitCount: 2,
@@ -1067,8 +1074,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -1416,11 +1423,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1533,11 +1539,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1762,10 +1766,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
@@ -1810,7 +1816,9 @@
border-radius: 1px;
color: #ffffff;
}
-
+.button-textxga {
+ color: #de7897;
+}
::v-deep.el-radio-group {
span {
font-size: 24px;
diff --git a/src/views/followvisit/zysatisfaction/index.vue b/src/views/followvisit/zysatisfaction/index.vue
new file mode 100644
index 0000000..6b8edd4
--- /dev/null
+++ b/src/views/followvisit/zysatisfaction/index.vue
@@ -0,0 +1,1967 @@
+<template>
+ <div class="app-container">
+ <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
+ shadow="hover"
+ :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
+ >
+ <div style="padding: 8px" @click="$router.push(item.router)">
+ <span>{{ item.name }}</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ item.value ? item.value : 0 }}
+ </div>
+ </div>
+ </el-card>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="ysfleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>琛ㄥ崟宸插彂閫�</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ yfsvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ <el-col :span="2.5">
+ <div class="errleftvlue">
+ <el-card shadow="hover">
+ <div style="padding: 8px">
+ <span>寮傚父</span>
+ <div
+ style="
+ text-align: center;
+ font-size: 18px;
+ margin-top: 10px;
+ font-weight: 600;
+ "
+ >
+ {{ ycvalue }}
+ </div>
+ </div>
+ </el-card>
+ </div>
+ </el-col>
+ </el-row>
+ </div>
+ <el-row :gutter="20">
+ <!--鐢ㄦ埛鏁版嵁-->
+ <el-form
+ :model="topqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="98px"
+ >
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ v-model="topqueryParams.taskName"
+ placeholder="璇烽�夋嫨浠诲姟鍚嶇О"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="鍑洪櫌鏃堕棿">
+ <el-date-picker
+ v-model="dateRange"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="鎮h�呭鍚�" prop="sendname">
+ <el-input
+ v-model="topqueryParams.sendname"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="璇婃柇鍚嶇О" prop="leavediagname">
+ <el-input
+ v-model="topqueryParams.leavediagname"
+ placeholder="璇疯緭鍏ヨ瘖鏂悕绉�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="闅忚浜哄憳" prop="updateBy">
+ <el-input
+ v-model="topqueryParams.updateBy"
+ placeholder="璇疯緭鍏ラ殢璁夸汉鍛�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="涓绘不鍖荤敓" prop="drname">
+ <el-input
+ v-model="topqueryParams.drname"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="缁忕鍖荤敓" prop="managementDoctor">
+ <el-input
+ v-model="topqueryParams.managementDoctor"
+ placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+ ></el-input>
+ </el-form-item>
+
+ <el-form-item label="鎮h�呰寖鍥�" prop="status">
+ <el-cascader
+ v-model="topqueryParams.scopetype"
+ placeholder="榛樿鍏ㄩ儴"
+ :options="sourcetype"
+ :props="{ expandTrigger: 'hover' }"
+ @change="handleChange"
+ ></el-cascader>
+ </el-form-item>
+
+ <el-form-item label="浠诲姟鐘舵��" prop="status">
+ <el-select v-model="topqueryParams.sendstate" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎺掑簭鏂瑰紡" prop="status">
+ <el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in topicoptionssort"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+
+ <el-form-item>
+ <el-button
+ type="primary"
+ icon="el-icon-search"
+ size="medium"
+ @click="handleQuery(1)"
+ >鎼滅储</el-button
+ >
+ <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
+ >閲嶇疆</el-button
+ >
+ </el-form-item>
+ </el-form>
+ <el-divider></el-divider>
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-upload2"
+ size="medium"
+ @click="handleExport"
+ >瀵煎嚭</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="medium"
+ @click="handleAdd"
+ >鏂板</el-button
+ >
+ </el-col>
+
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-warning-outline"
+ size="medium"
+ @click="toleadExport(1)"
+ >鎵ц澶辫触</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-warning"
+ size="medium"
+ @click="toleadExport(2)"
+ >缁撴灉寮傚父</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="success"
+ plain
+ size="medium"
+ @click="buidegetTasklist()"
+ >寰呭姙鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="primary"
+ plain
+ size="medium"
+ @click="affiliation()"
+ >鏈汉鎵�灞炴湇鍔�</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="1.5">
+ <div class="documentf">
+ <div class="document">
+ <el-button type="success" size="medium" @click="onthatday()"
+ >浠婃棩鏈嶅姟</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ </el-row>
+ <el-table
+ v-loading="loading"
+ ref="userform"
+ :data="userList"
+ :row-class-name="tableRowClassName"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="50" align="center" />
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ fixed
+ width="150"
+ show-overflow-tooltip
+ align="center"
+ key="taskName"
+ prop="taskName"
+ />
+ <!-- <el-table-column label="搴忓彿" fixed align="center" key="id" prop="id" /> -->
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ key="sendname"
+ prop="sendname"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ gettoken360(scope.row.sfzh, scope.row.drcode, scope.row.drname)
+ "
+ ><span class="button-textsc">{{
+ scope.row.sendname
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <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>
+ </el-tooltip>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟寮傚父璇存槑"
+ width="120"
+ align="center"
+ key="remark"
+ prop="remark" -->
+ />
+
+ <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
+ label="闅忚瀹屾垚鏃堕棿"
+ sortable
+ align="center"
+ prop="finishtime"
+ width="160"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.finishtime) }}</span>
+ </template>
+ </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="涓绘不鍖荤敓"
+ width="120"
+ align="center"
+ key="drname"
+ prop="drname"
+ />
+
+ <el-table-column
+ label="缁忕鍖荤敓"
+ align="center"
+ key="managementDoctor"
+ prop="managementDoctor"
+ width="120"
+ />
+ <el-table-column
+ label="鍑洪櫌澶╂暟"
+ width="120"
+ align="center"
+ key="endDay"
+ prop="endDay"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.endDay ? scope.row.endDay + "澶�" : "" }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="韬唤璇佸彿鐮�"
+ width="200"
+ align="center"
+ key="sfzh"
+ prop="sfzh"
+ />
+ <el-table-column
+ label="鑱旂郴鐢佃瘽"
+ width="200"
+ align="center"
+ key="phone"
+ prop="phone"
+ />
+ <el-table-column
+ label="璐d换鎶ゅ+"
+ width="120"
+ align="center"
+ key="nurseName"
+ prop="nurseName"
+ />
+
+ <!-- <el-table-column
+ label="鐥呭巻鍙�"
+ align="center"
+ sortable
+ key="medicalRecordNo"
+ prop="medicalRecordNo"
+ width="120"
+ /> -->
+
+ <!-- <el-table-column label="骞撮緞" align="center" key="age" prop="age" /> -->
+ <!-- <el-table-column label="鎬у埆"width="100" align="center" key="sex" prop="sex" /> -->
+ <!-- <el-table-column label="搴婂彿" align="center" key="badNo" prop="badNo" /> -->
+ <el-table-column
+ label="绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ width="120"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐥呭尯"
+ align="center"
+ 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>
+ <el-table-column
+ label="闅忚浜哄憳"
+ align="center"
+ key="updateBy"
+ prop="updateBy"
+ width="120"
+ />
+ <el-table-column
+ label="浣忛櫌婊℃剰搴︽ā鏉垮悕绉�"
+ align="center"
+ key="templatename"
+ prop="templatename"
+ width="200"
+ />
+ <el-table-column
+ label="浠诲姟鎵ц鏂瑰紡"
+ align="center"
+ key="preachform"
+ prop="preachform"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.preachform">{{ item }}銆� </span>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="浠诲姟鍙戦�佹祦绋�"
+ align="center"
+ key="serviceSubtaskRecordList"
+ prop="serviceSubtaskRecordList"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.serviceSubtaskRecordList"
+ >{{ item.remark }}銆�
+ </span>
+ </template>
+ </el-table-column> -->
+ <el-table-column
+ label="浠诲姟缁撴灉璇存槑"
+ width="220"
+ align="center"
+ key="remark"
+ prop="remark"
+ >
+ <template slot-scope="scope" v-if="scope.row.remark">
+ <el-tooltip
+ :content="scope.row.remark"
+ placement="top"
+ effect="dark"
+ >
+ <el-tag
+ type="warning"
+ v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
+ >{{ scope.row.remark }}</el-tag
+ >
+ <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
+ </el-tooltip>
+ </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-tooltip
+ class="item"
+ effect="dark"
+ content="鍐嶆闅忚"
+ placement="top"
+ >
+ <el-button
+ size="medium"
+ type="text"
+ v-if="scope.row.isVisitAgain!=2"
+ @click="followupvisit(scope.row)"
+ ><span class="button-bb"
+ ><i class="el-icon-s-promotion"></i>鍐嶆闅忚</span
+ ></el-button
+ >
+ </el-tooltip>
+ <el-tooltip
+ v-if="scope.row.sendstate == 1 || scope.row.sendstate == 2"
+ class="item"
+ effect="dark"
+ content="鏆傚仠鏈嶅姟"
+ placement="top"
+ >
+ <el-button
+ size="medium"
+ type="text"
+ @click="handlestop(scope.row)"
+ v-hasPermi="['system:user:edit']"
+ ><span class="button-sc"
+ ><i class="el-icon-remove-outline"></i>鏆傚仠鏈嶅姟</span
+ ></el-button
+ >
+ </el-tooltip> -->
+ <el-button size="medium" type="text" @click="Seedetails(scope.row)"
+ ><span class="button-zx"
+ ><i class="el-icon-s-order"></i>鏌ョ湅璇︽儏</span
+ ></el-button
+ >
+ <el-button
+ size="medium"
+ type="text"
+ @click="handleUpdate(scope.row)"
+ ><span class="button-textxga"
+ ><i class="el-icon-edit"></i>鎮h�呰繃婊�</span
+ ></el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="topqueryParams.pageNum"
+ :limit.sync="topqueryParams.pageSize"
+ @pagination="getList"
+ />
+ </el-row>
+ <!-- 婊℃剰搴﹀脊妗� -->
+ <el-dialog
+ title="闅忚婊℃剰搴﹁瘎鍒�"
+ :visible.sync="scoreDialogVisible"
+ width="80%"
+ :close-on-click-modal="false"
+ >
+ <el-table :data="selectedRows" border style="width: 100%">
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ prop="sendname"
+ />
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ width="180"
+ align="center"
+ prop="taskName"
+ />
+ <!-- 鏂板璇勫垎鍒� -->
+ <el-table-column
+ label="鐪熷疄鎬�(20)"
+ align="center"
+ key="authenticity"
+ prop="authenticity"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.authenticity"
+ :min="0"
+ :max="20"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="涓�鍛ㄥ唴瀹屾垚(20)"
+ align="center"
+ key="weekFinish"
+ prop="weekFinish"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.weekFinish"
+ :min="0"
+ :max="20"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="瑙勮寖鎬�(10)"
+ align="center"
+ key="standard"
+ prop="standard"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.standard"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍙婃椂鎬�(10)"
+ align="center"
+ key="timeliness"
+ prop="timeliness"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.timeliness"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="瀹f暀鎯呭喌(10)"
+ align="center"
+ key="library"
+ prop="library"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.library"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鐜婊℃剰搴�(10)"
+ align="center"
+ key="environment"
+ prop="environment"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.environment"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍖荤敓婊℃剰搴�(10)"
+ align="center"
+ key="doctorSatisfaction"
+ prop="doctorSatisfaction"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.doctorSatisfaction"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎶ゅ+婊℃剰搴�(10)"
+ align="center"
+ key="nurseSatisfaction"
+ prop="nurseSatisfaction"
+ width="150"
+ >
+ <template slot-scope="scope">
+ <el-input-number
+ v-model="scope.row.nurseSatisfaction"
+ :min="0"
+ :max="10"
+ :step="1"
+ size="small"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎬诲垎"
+ align="center"
+ key="total"
+ prop="total"
+ fixed="right"
+ >
+ <template slot-scope="scope">
+ <span>{{ calculateTotal(scope.row) }}</span>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="scoreDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="saveScores">淇濆瓨</el-button>
+ </div>
+ </el-dialog>
+ <!-- 娣诲姞鎴栦慨鏀瑰奖鍍忛殢璁垮璇濇 -->
+ <el-dialog
+ :title="amendtag ? '淇敼鎮h�呬俊鎭�' : '鏂板鎮h��'"
+ :visible.sync="Labelchange"
+ width="900px"
+ >
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="濮撳悕" width="100" prop="name">
+ <el-input
+ v-model="form.name"
+ placeholder="璇疯緭鍏ュ鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鎬у埆" width="100" prop="sex">
+ <el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆">
+ <el-option
+ v-for="dict in sextype"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="骞撮緞" prop="age">
+ <el-input
+ v-model="form.age"
+ placeholder="璇疯緭鍏ュ勾榫�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="8">
+ <el-form-item label="杩囨护鍖荤敓" width="100" prop="filterDrname">
+ <el-input
+ v-model="form.filterDrname"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ maxlength="30"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="杩囨护鍘熷洜">
+ <el-input
+ v-model="form.notrequiredreason"
+ type="textarea"
+ placeholder="璇疯緭鍏ヨ繃婊ゅ師鍥�"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+ <el-button @click="cancel">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ <!-- 淇敼鍙戦�佹椂闂村璇濇 -->
+ <el-dialog
+ title="鍙戦�佹椂闂磋缃�"
+ :visible.sync="modificationVisible"
+ width="45%"
+ >
+ <div style="margin-bottom: 20px; color: red">
+ 缁熶竴淇敼褰撳ぉ鏈彂閫佺殑浠诲姟鏃堕棿
+ </div>
+
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ ref="ruleForm"
+ label-width="120px"
+ class="demo-ruleForm"
+ >
+ <el-form-item label="鍙戦�佹棩鏈�">
+ <el-date-picker
+ v-model="ruleForm.value1"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ >
+ </el-date-picker>
+ </el-form-item>
+
+ <el-form-item label="鏃堕棿娈�" prop="type">
+ <el-checkbox-group v-model="ruleForm.type">
+ <el-checkbox label="涓婂崍" name="type"></el-checkbox>
+ <el-checkbox label="涓嬪崍" name="type"></el-checkbox>
+ <el-checkbox label="鏅氫笂" name="type"></el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ <el-form-item label="涓婂崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value2"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="涓嬪崍鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value3"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ <el-form-item label="鏅氫笂鏃堕棿鍖洪棿" required>
+ <el-time-picker
+ is-range
+ v-model="ruleForm.value4"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫椂闂�"
+ end-placeholder="缁撴潫鏃堕棿"
+ placeholder="閫夋嫨鏃堕棿鑼冨洿"
+ >
+ </el-time-picker>
+ </el-form-item>
+ </el-form>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="modificationVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="modificationVisible = false"
+ >纭� 瀹�</el-button
+ >
+ </span>
+ </el-dialog>
+ <!-- 鍐嶆闅忚 -->
+ </div>
+</template>
+
+<script>
+import {
+ delUser,
+ addUser,
+ updateUser,
+ resetUserPwd,
+ changeUserStatus,
+} from "@/api/system/user";
+import {
+ getTaskservelist,
+ buidegetTasklist,
+ addserviceSubtask,
+ query360PatInfo,
+ addsatisfaction,
+} from "@/api/AiCentre/index";
+import { alterpatient, particularpatient } from "@/api/patient/homepage";
+import Treeselect from "@riophae/vue-treeselect";
+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 },
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 鐢ㄦ埛琛ㄦ牸鏁版嵁
+ userList: null,
+ // 寮瑰嚭灞傛爣棰�
+ title: "鏂板褰卞儚闅忚",
+ // 鏄惁鏄剧ず淇敼銆佹坊鍔犲脊鍑哄眰
+ addalteropen: false,
+ // 淇敼鍙戦�佹椂闂村璇濇
+ modificationVisible: false,
+ // 閮ㄩ棬鍚嶇О
+ deptName: undefined,
+ // 榛樿瀵嗙爜
+ initPassword: undefined,
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ dateRangefs: [],
+ // 宀椾綅閫夐」
+ postOptions: [],
+ ruleForm: {
+ type: [],
+ },
+ zcform: {},
+ dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
+ inputVisible: false,
+ Labelchange: false,
+ ycvalue: "",
+ yfsvalue: "",
+ inputValue: "",
+ preachform: "",
+ previewVisible: false, //褰卞儚闅忚棰勮寮规
+ radio: "",
+ radios: [],
+ previewtype: 2, //棰勮褰卞儚闅忚绫诲瀷
+ total: 0, // 鎬绘潯鏁�
+ // 婊℃剰搴﹁皟鏌ユ暟鎹�
+ scoreDialogVisible: false,
+ selectedRows: [],
+
+ value: [],
+ list: [],
+
+ sourcetype: [
+ {
+ value: 1,
+ label: "绉戝",
+ children: [],
+ },
+ {
+ value: 2,
+ label: "鐥呭尯",
+ children: [],
+ },
+ {
+ value: 3,
+ label: "鍏ㄩ儴",
+ },
+ ],
+ loading: false,
+ cardlist: [
+ {
+ name: "鏈嶅姟鎬婚噺",
+ value: 0,
+ },
+ // {
+ // name: "鎮h�呰繃婊�",
+ // value: 0,
+ // },
+ {
+ name: "闇�闅忚",
+ value: 0,
+ },
+ {
+ name: "鍙戦�佸け璐�",
+ value: 0,
+ },
+ {
+ name: "寰呴殢璁�",
+ value: 0,
+ },
+ // {
+ // name: "宸插彂閫�",
+ // value: 0,
+ // },
+
+ // {
+ // name: "琛ㄥ崟宸插彂閫�",
+ // value: 0,
+ // },
+ ],
+ zcrules: {
+ date1: [
+ { required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
+ ],
+ resource: [
+ { required: true, message: "璇烽�夋嫨闅忚鏃堕棿", trigger: "blur" },
+ ],
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {
+ phonenumber: "",
+ totagid: "",
+ types: "",
+ nickName: "",
+ qystatus: "",
+ btstatus: "",
+ },
+ topicoptionssort: [
+ {
+ value: 0,
+ label: "鍑洪櫌鏃堕棿(姝e簭)",
+ },
+ {
+ value: 1,
+ label: "鍑洪櫌鏃堕棿(鍊掑簭)",
+ },
+ {
+ value: 2,
+ label: "鍙戦�佹椂闂�(姝e簭)",
+ },
+ {
+ value: 3,
+ label: "鍙戦�佹椂闂�(鍊掑簭)",
+ },{
+ value: 7,
+ label: "搴旈殢璁挎棩鏈�(姝e簭)",
+ },
+ {
+ value: 8,
+ label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+ },
+ ],
+ // 鏌ヨ鍙傛暟
+ topqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 6,
+ sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭) 7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
+ serviceType: 6,
+ searchscope: 3,
+ visitCount: 1,
+ scopetype: [],
+ leaveldeptcodes: [],
+ leavehospitaldistrictcodes: [],
+ },
+ propss: { multiple: true },
+ options: [],
+
+ topicoptions: [
+ {
+ value: null,
+ label: "鍏ㄩ儴",
+ },
+ {
+ value: 1,
+ label: "琛ㄥ崟宸查鍙�",
+ },
+ {
+ value: 2,
+ label: "寰呴殢璁�",
+ },
+ {
+ value: 3,
+ label: "琛ㄥ崟宸插彂閫�",
+ },
+ {
+ value: 4,
+ label: "涓嶆墽琛�",
+ },
+ {
+ value: 5,
+ label: "鍙戦�佸け璐�",
+ },
+ {
+ value: 6,
+ label: "宸插畬鎴�",
+ },
+ ],
+ sextype: [
+ {
+ value: 1,
+ label: "鐢�",
+ },
+ {
+ value: 2,
+ label: "濂�",
+ },
+ ],
+ topicoptionsyj: [
+ {
+ value: 1,
+ label: "寮傚父",
+ },
+ {
+ value: 0,
+ label: "姝e父",
+ },
+ ],
+ url: "http://9.208.2.190:8090/smartor/serviceExternal/query360PatInfo",
+ postData: {
+ XiaoXiTou: {
+ FaSongFCSJC: "ZJHES",
+ FaSongJGID: localStorage.getItem("orgid"),
+ FaSongJGMC: localStorage.getItem("orgname"),
+ FaSongSJ: "2025-01-09聽17:29:36",
+ FaSongXTJC: "SUIFANGXT",
+ FaSongXTMC: "闅忚绯荤粺",
+ XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
+ XiaoXiLX: "SC_LC_360STCX",
+ XiaoXiMC: "360聽瑙嗗浘鏌ヨ",
+ ZuHuID: localStorage.getItem("ZuHuID"),
+ ZuHuMC: localStorage.getItem("orgname"),
+ },
+ YeWuXX: {
+ BingRenXX: {
+ ZhengJianHM: "",
+ ZhengJianLXDM: "01",
+ ZhengJianLXMC: "灞呮皯韬唤璇�",
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ },
+ YongHuXX: {
+ XiTongID: "SUIFANGXT",
+ XiTongMC: "闅忚绯荤粺",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ idp: "lyra",
+ },
+ },
+ },
+ amendtag: false,
+ errtype: "",
+ leavehospitaldistrictcode: "",
+ serviceState: [],
+ checkboxlist: [],
+ // 琛ㄥ崟鏍¢獙
+ rules: {},
+ };
+ },
+ watch: {},
+ created() {
+ this.serviceState = store.getters.serviceState;
+ this.checkboxlist = store.getters.checkboxlist;
+ this.errtype = this.$route.query.errtype;
+ this.leavehospitaldistrictcode =
+ this.$route.query.leavehospitaldistrictcode;
+ this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
+ return {
+ label: dept.deptName,
+ value: dept.deptCode,
+ };
+ });
+ this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
+ return {
+ label: dept.districtName,
+ value: dept.districtCode,
+ };
+ });
+ if (this.errtype) {
+ this.toleadExport(2);
+ } else {
+ this.getList(1);
+ }
+ this.getConfigKey("sys.user.initPassword").then((response) => {
+ this.initPassword = response.msg;
+ });
+ },
+ activated() {
+ this.getList(1);
+ },
+ methods: {
+ /** 鏌ヨ闅忚鏈嶅姟鍒楄〃 */
+ getList(refresh) {
+ // 榛樿鍏ㄩ儴
+
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ 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;
+ }
+ 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);
+ // this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[1].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[2].value = response.rows[0].fssb;
+ this.cardlist[3].value = response.rows[0].dsf;
+ // this.cardlist[4].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ affiliation() {
+ this.topqueryParams.managementDoctorCode = store.getters.hisUserId;
+
+ this.getList(1);
+ },
+ onthatday() {
+ this.topqueryParams.startSendDateTime = this.getCurrentDate();
+ this.topqueryParams.endSendDateTime = this.getCurrentDate();
+ this.getList(1);
+ },
+ getCurrentDate() {
+ const now = new Date();
+ return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
+ },
+ buidegetTasklist(type) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ // 鎺ュ彈寮傚父璺宠浆
+ if (this.errtype) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(
+ this.leavehospitaldistrictcode
+ );
+ }
+ let obj = {
+ pageNum: 1,
+ pageSize: 10,
+ leavehospitaldistrictcodes:
+ this.topqueryParams.leavehospitaldistrictcodes,
+ sendstates: [2, 3],
+ leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
+ };
+ buidegetTasklist(obj).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);
+ this.cardlist[1].value = response.rows[0].wzx;
+ this.cardlist[2].value = response.rows[0].ysf;
+ this.ycvalue = response.rows[0].yc;
+ this.cardlist[3].value = response.rows[0].fssb;
+ this.cardlist[4].value = response.rows[0].dsf;
+ // this.cardlist[5].value = response.rows[0].yfs2;
+ this.yfsvalue = response.rows[0].yfs;
+ }
+ this.loading = false;
+ this.userList.forEach((item) => {
+ let idArray = null;
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+
+ if (item.preachform) {
+ if (item.endtime) {
+ 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;
+ });
+ }
+ });
+ this.total = response.total;
+ });
+ },
+ // 鏌ョ湅闂ㄨ瘖闅忚璇︽儏
+ Referencequestion(row) {
+ this.previewVisible = true;
+ },
+ // 娣诲姞寮规鎼滅储
+ remoteMethod(query) {
+ if (query !== "") {
+ this.loading = true;
+ setTimeout(() => {
+ this.loading = false;
+ this.options = this.list.filter((item) => {
+ return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
+ });
+ }, 200);
+ } else {
+ this.options = [];
+ }
+ },
+ // 褰卞儚闅忚鐘舵�佷慨鏀�
+ handleStatusChange(row) {
+ let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
+ this.$modal
+ .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵')
+ .then(function () {
+ return changeUserStatus(row.userId, row.status);
+ })
+ .then(() => {
+ this.$modal.msgSuccess(text + "鎴愬姛");
+ })
+ .catch(function () {
+ row.status = row.status === "0" ? "1" : "0";
+ });
+ },
+
+ // 琛ㄥ崟閲嶇疆
+ 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");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery(refresh) {
+ if (this.topqueryParams.searchscope == 3) {
+ this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ this.topqueryParams.leavehospitaldistrictcodes =
+ store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ this.topqueryParams.pageNum = 1;
+ this.topqueryParams.startOutHospTime = this.dateRange[0];
+ this.topqueryParams.endOutHospTime = this.dateRange[1];
+ this.topqueryParams.startSendDateTime = this.dateRangefs[0];
+ this.topqueryParams.endSendDateTime = this.dateRangefs[1];
+ this.getList(refresh);
+ },
+ // 鎮h�呰寖鍥村鐞�
+ handleChange(value) {
+ let type = value[0];
+ let code = value.slice(-1)[0];
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.leaveldeptcodes = [];
+ if (type == 1) {
+ this.topqueryParams.leaveldeptcodes.push(code);
+ this.topqueryParams.leavehospitaldistrictcodes = [];
+ this.topqueryParams.searchscope = 1;
+ } else if (type == 2) {
+ this.topqueryParams.leavehospitaldistrictcodes.push(code);
+ this.topqueryParams.leaveldeptcodes = [];
+ this.topqueryParams.searchscope = 2;
+ } else {
+ this.topqueryParams.searchscope = 3;
+ }
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.dateRangefs = [];
+ this.topqueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ sendstate: 6,
+ sort: 2, //0 鍑洪櫌鏃堕棿(姝e簭) 1 鍑洪櫌鏃堕棿(鍊掑簭) 2 鍙戦�佹椂闂�(姝e簭) 3 鍙戦�佹椂闂�(鍊掑簭)
+ serviceType: 6,
+ searchscope: 3,
+ visitCount: 1,
+ scopetype: [],
+ leaveldeptcodes: [],
+ leavehospitaldistrictcodes: [],
+ };
+ this.handleQuery(1);
+ },
+ handleSelectionChange(rows) {
+ this.selectedRows = rows.map((row) => {
+ // 鍒濆鍖栬瘎鍒嗗瓧娈�
+ return {
+ ...row,
+ authenticity: row.authenticity || 0,
+ weekFinish: row.weekFinish || 0,
+ standard: row.standard || 0,
+ timeliness: row.timeliness || 0,
+ library: row.library || 0,
+ environment: row.environment || 0,
+ doctorSatisfaction: row.doctorSatisfaction || 0,
+ nurseSatisfaction: row.nurseSatisfaction || 0,
+ };
+ });
+
+ if (this.selectedRows.length > 0) {
+ this.multiple = false;
+ } else {
+ this.multiple = true;
+ }
+ },
+
+ // 璁$畻鎬诲垎
+ calculateTotal(row) {
+ return (
+ (row.authenticity || 0) +
+ (row.weekFinish || 0) +
+ (row.standard || 0) +
+ (row.timeliness || 0) +
+ (row.library || 0) +
+ (row.environment || 0) +
+ (row.doctorSatisfaction || 0) +
+ (row.nurseSatisfaction || 0)
+ );
+ },
+
+ // 淇濆瓨璇勫垎
+ saveScores() {
+ this.selectedRows.forEach((item) => {
+ item.createBy = null;
+ item.patName = item.sendname;
+ item.hospitaldistrictname = item.leavehospitaldistrictname;
+ });
+ addsatisfaction(this.selectedRows).then((res) => {
+ if (res.code == 200) {
+ this.$message.success("璇勫垎淇濆瓨鎴愬姛");
+ this.scoreDialogVisible = false;
+ this.selectedRows = [];
+ this.$refs.userform.clearSelection();
+ } else {
+ this.$modal.msgWarning("璇勫垎淇濆瓨澶辫触");
+ this.scoreDialogVisible = false;
+ this.selectedRows = [];
+ this.$refs.userform.clearSelection();
+ }
+ });
+ // 杩欓噷鍙互娣诲姞淇濆瓨閫昏緫锛屽璋冪敤API淇濆瓨璇勫垎
+ },
+ //鍒犻櫎閫夐」
+ handleClose(tag) {
+ this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+ },
+ //瑙﹀彂鏂板杈撳叆
+ showInput() {
+ this.inputVisible = true;
+ this.$nextTick((_) => {
+ this.$refs.saveTagInput.$refs.input.focus();
+ });
+ },
+ //鑾峰彇澶卞幓鐒︾偣瑙﹀彂
+ handleInputConfirm() {
+ let inputValue = this.inputValue;
+ if (inputValue) {
+ this.dynamicTags.push(inputValue);
+ }
+ this.inputVisible = false;
+ this.inputValue = "";
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.$router.push({
+ path: "/followvisit/QuestionnaireTask",
+ query: {
+ type: 2,
+ serviceType: 6,
+ },
+ });
+ },
+ //鎮h��360璺宠浆
+ gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
+ this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
+
+ query360PatInfo(this.postData).then((res) => {
+ if (res.data.url) {
+ window.open(res.data.url, "_blank");
+ // this.linkUrl = res.data.url;
+ } else {
+ this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
+ }
+ });
+ },
+
+ /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
+ handleResetPwd(row) {
+ this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ closeOnClickModal: false,
+ inputPattern: /^.{5,20}$/,
+ inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+ })
+ .then(({ value }) => {
+ resetUserPwd(row.userId, value).then((response) => {
+ this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
+ });
+ })
+ .catch(() => {});
+ },
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.Labelchange = false;
+ this.reset();
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm: function () {
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ this.form.isoperation = 2;
+ this.form.notrequiredFlag = 1;
+ alterpatient(this.form)
+ .then((response) => {
+ console.log(response);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鎮h�呰繃婊ゆ垚鍔�");
+ });
+
+ this.reset();
+ this.Labelchange = false;
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const userIds = row.userId || this.ids;
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
+ .then(function () {
+ return delUser(userIds);
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴鍋滄
+ AllStop() {
+ this.$modal
+ .confirm("鏄惁鍋滄鍏ㄩ儴浠诲姟锛�")
+ .then(function () {
+ return console.log("鍋滄鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgWarning("鍋滄鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 鍏ㄩ儴寮�濮�
+ AllStarted() {
+ this.$modal
+ .confirm("鏄惁寮�鍚叏閮ㄤ换鍔★紵")
+ .then(function () {
+ return console.log("寮�鍚垚鍔�");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("寮�鍚垚鍔�");
+ })
+ .catch(() => {});
+ },
+ // 浠诲姟閲嶇疆
+ TaskReset() {
+ this.$modal
+ .confirm("鏄惁閲嶇疆閫変腑鐨勪换鍔¢」锛�")
+ .then(function () {
+ return console.log("閫変腑鎴愬姛");
+ })
+ .then(() => {
+ this.getList(1);
+ this.$modal.msgSuccess("閲嶇疆鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ // 璁剧疆鍙戦�佹椂闂�
+ Sendtimesetting() {
+ this.modificationVisible = true;
+ },
+ // 璺宠浆璇︽儏椤�
+ Seedetails(row) {
+ let type = "";
+ console.log(row, "rwo");
+ if (row.type == 1) {
+ type = 1;
+ }
+ this.$router.push({
+ path: "/followvisit/record/detailpage/",
+ query: {
+ taskid: row.taskid,
+ patid: row.patid,
+ id: row.id,
+ Voicetype: type,
+ visitCount: this.topqueryParams.visitCount,
+ },
+ });
+ },
+
+ onSubmit() {},
+ // 鏆傚仠鏈嶅姟
+ handlestop(row) {
+ let objson = row;
+ this.$modal
+ .confirm(
+ '鏄惁纭鏆傚仠浠诲姟鍚嶇О涓�"' +
+ row.taskName +
+ '鎮h�呭悕绉颁负"' +
+ row.sendname +
+ '"鐨勬暟鎹」锛�'
+ )
+ .then(() => {
+ getTaskservelist({
+ patid: row.patid,
+ taskid: row.taskid,
+ }).then((res) => {
+ if (res.code == 200) {
+ objson.sendstate = 4;
+ objson.remark = "鏈嶅姟鏆傚仠";
+ Editsingletaskson(objson).then((res) => {
+ if (res.code) {
+ this.$modal.msgSuccess("璁板綍鎴愬姛");
+ this.getList(1);
+ }
+ });
+ }
+ });
+ })
+ .catch(() => {});
+ },
+ // 鎮h�呰繃婊よЕ鍙�
+ handleUpdate(row) {
+ particularpatient(row.patid).then((response) => {
+ this.form = response.data;
+ this.form.filterDrname = store.getters.nickName;
+ });
+ this.amendtag = true;
+ this.Labelchange = true;
+ },
+ // 渚挎嵎鎸夐挳
+ toleadExport(too) {
+ if (too == 1) {
+ this.topqueryParams.sendstate = 4;
+ this.topqueryParams.excep = null;
+ } else if (too == 2) {
+ this.topqueryParams.excep = 1;
+ }
+ this.handleQuery();
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.topqueryParams.pageNum = null;
+ this.topqueryParams.pageSize = null;
+ this.download(
+ "smartor/serviceSubtask/patItemExport",
+ {
+ ...this.topqueryParams,
+ },
+ `user_${new Date().getTime()}.xlsx`
+ );
+ },
+ // 寮傚父鍒楁覆鏌�
+ tableRowClassName({ row, rowIndex }) {
+ if (row.excep == 1) {
+ return "warning-row";
+ }
+ return "";
+ },
+
+ getCurrentTime() {
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = String(now.getMonth() + 1).padStart(2, "0");
+ const day = String(now.getDate()).padStart(2, "0");
+ const hours = String(now.getHours()).padStart(2, "0");
+ const minutes = String(now.getMinutes()).padStart(2, "0");
+ const seconds = String(now.getSeconds()).padStart(2, "0");
+
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-button--primary.is-plain {
+ color: #ffffff;
+ background: #409eff;
+ border-color: #4fabe9;
+}
+
+.document {
+ // width: 100px;
+ height: 50px;
+}
+::v-deep.el-table .warning-row {
+ background: #eec4c4;
+}
+
+.documentf {
+ display: flex;
+ justify-content: flex-end;
+}
+
+.download {
+ text-align: center;
+
+ .el-upload__tip {
+ font-size: 23px;
+ }
+
+ .el-upload__text {
+ font-size: 23px;
+ }
+}
+
+.uploading {
+ margin-top: 20px;
+ margin: 20px;
+ padding: 30px;
+ background: #ffffff;
+ 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);
+}
+
+.el-tag + .el-tag {
+ margin-left: 10px;
+}
+
+.button-new-tag {
+ margin-left: 10px;
+ height: 32px;
+ line-height: 30px;
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.input-new-tag {
+ width: 90px;
+ margin-left: 10px;
+ vertical-align: bottom;
+}
+
+.drexamine {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 30px;
+ background: #daeaf5;
+
+ img {
+ width: 100px;
+ height: 100px;
+ }
+}
+
+.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);
+
+ .topic-dev {
+ margin-bottom: 25px;
+ font-size: 20px !important;
+
+ .dev-text {
+ margin-bottom: 10px;
+ }
+ }
+}
+::v-deep.leftvlue .el-card__body {
+ background: #f2f8ff;
+ color: #324a9b;
+}
+::v-deep.leftvlue .el-card__body:hover {
+ background: #3664d9;
+ color: #fff;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+.button-textxga {
+ color: #de7897;
+}
+::v-deep.errleftvlue .el-card__body {
+ background: #fdd0d7;
+}
+::v-deep.errleftvlue .el-card__body:hover {
+ background: #f88d96;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+
+::v-deep.ysfleftvlue .el-card__body {
+ background: #d0fdd8;
+}
+::v-deep.ysfleftvlue .el-card__body:hover {
+ background: #8df8a4;
+ cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
+}
+.button-bb {
+ font-weight: 500;
+ background-color: #2ba05c;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-xq {
+ font-weight: 500;
+ background-color: #409eff;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-sc {
+ font-weight: 500;
+ background-color: #b3a21f;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+.button-zx {
+ background: #4fabe9;
+ padding: 5px;
+ border-radius: 1px;
+ color: #ffffff;
+}
+
+::v-deep.el-radio-group {
+ span {
+ font-size: 24px;
+ }
+}
+.purple-button {
+ background-color: #7e22ce;
+ border-color: #7e22ce;
+ color: #fff;
+}
+
+.purple-button:hover,
+.purple-button:focus {
+ background-color: #9333ea;
+ border-color: #9333ea;
+}
+
+.purple-button:active {
+ background-color: #6b21a8;
+ border-color: #6b21a8;
+}
+
+.purple-button.is-disabled {
+ background-color: #d8b4fe;
+ border-color: #d8b4fe;
+ opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
+}
+// 閫夐」瀛椾綋鏀惧ぇ
+// ::v-deep.el-checkbox-group {
+// span {
+// font-size: 24px;
+// }
+// }
+</style>
diff --git a/src/views/groupManagement/PatientGroup/index.vue b/src/views/groupManagement/PatientGroup/index.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/views/groupManagement/PatientGroup/index.vue
diff --git a/src/views/groupManagement/PatientGroup/particulars.vue b/src/views/groupManagement/PatientGroup/particulars.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/views/groupManagement/PatientGroup/particulars.vue
diff --git a/src/views/groupManagement/PersonnelGroup/index.vue b/src/views/groupManagement/PersonnelGroup/index.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/views/groupManagement/PersonnelGroup/index.vue
diff --git a/src/views/groupManagement/PersonnelGroup/particulars.vue b/src/views/groupManagement/PersonnelGroup/particulars.vue
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/views/groupManagement/PersonnelGroup/particulars.vue
diff --git a/src/views/groupManagement/serviceGroup/index.vue b/src/views/groupManagement/serviceGroup/index.vue
new file mode 100644
index 0000000..abbfbbd
--- /dev/null
+++ b/src/views/groupManagement/serviceGroup/index.vue
@@ -0,0 +1,355 @@
+<template>
+ <div class="app-container">
+ <el-row :gutter="20">
+ <!-- 鎼滅储鍖哄煙 -->
+ <el-form
+ :model="queryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ v-show="showSearch"
+ label-width="98px"
+ >
+ <el-form-item label="鏈嶅姟缁勫悕绉�">
+ <el-input
+ v-model="queryParams.groupName"
+ placeholder="璇疯緭鍏ユ湇鍔$粍鍚嶇О"
+ @keyup.enter.native="handleQuery"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鍒涘缓浜�">
+ <el-input
+ v-model="queryParams.createBy"
+ placeholder="璇疯緭鍏ュ垱寤轰汉"
+ @keyup.enter.native="handleQuery"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="鍒涘缓鏃堕棿">
+ <el-date-picker
+ v-model="dateRange"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ </el-form-item>
+ <el-form-item label="鐘舵��">
+ <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨鐘舵��">
+ <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>
+ <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-divider></el-divider>
+
+ <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="medium"
+ @click="handleAdd"
+ >鏂板缓鏈嶅姟缁�</el-button
+ >
+ </el-col>
+ <right-toolbar
+ :showSearch.sync="showSearch"
+ @queryTable="getList"
+ ></right-toolbar>
+ </el-row>
+
+ <!-- 鏈嶅姟缁勫垪琛� -->
+ <el-table
+ v-loading="loading"
+ :data="groupList"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column
+ label="鏈嶅姟缁処D"
+ align="center"
+ key="groupId"
+ prop="groupId"
+ width="100"
+ />
+ <el-table-column
+ label="鏈嶅姟缁勫悕绉�"
+ align="center"
+ key="groupName"
+ prop="groupName"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鎻忚堪"
+ align="center"
+ key="groupDesc"
+ prop="groupDesc"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍏宠仈浠诲姟鏁�"
+ align="center"
+ key="taskCount"
+ prop="taskCount"
+ width="100"
+ />
+ <el-table-column
+ label="鍏宠仈鎮h�呮暟"
+ align="center"
+ key="patientCount"
+ prop="patientCount"
+ width="100"
+ />
+ <el-table-column
+ label="鐘舵��"
+ align="center"
+ key="status"
+ prop="status"
+ width="100"
+ >
+ <template slot-scope="scope">
+ <el-tag :type="scope.row.status === 1 ? 'success' : 'info'">
+ {{ scope.row.status === 1 ? "鍚敤" : "鍋滅敤" }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍒涘缓浜�"
+ align="center"
+ key="createBy"
+ prop="createBy"
+ />
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ align="center"
+ prop="createTime"
+ width="180"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="鎿嶄綔"
+ align="center"
+ width="300"
+ class-name="small-padding fixed-width"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-view"
+ @click="handleView(scope.row)"
+ >璇︽儏</el-button
+ >
+
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ class="delete-btn"
+ @click="handleDelete(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-row>
+ </div>
+</template>
+
+<script>
+import { listServiceGroup, delServiceGroup } from "@/api/system/serviceGroup";
+
+export default {
+ name: "ServiceGroupList",
+ dicts: ["sys_normal_disable"],
+ data() {
+ return {
+ // 閬僵灞�
+ loading: false,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 5,
+ // 鏈嶅姟缁勮〃鏍兼暟鎹�
+ groupList: [
+ {
+ groupId: "SG2025001",
+ groupName: "绯栧翱鐥呴殢璁跨鐞嗙粍",
+ groupDesc: "涓撻棬璐熻矗绯栧翱鐥呮偅鑰呯殑瀹氭湡闅忚鍜屽仴搴风鐞嗘湇鍔�",
+ taskCount: 5,
+ patientCount: 150,
+ status: 1,
+ createBy: "寮犲尰鐢�",
+ createTime: "2025-10-15 14:30:00",
+ },
+ {
+ groupId: "SG2025002",
+ groupName: "楂樿鍘嬪仴搴风鐞嗙粍",
+ groupDesc: "楂樿鍘嬫偅鑰呯殑鐢ㄨ嵂鎸囧鍜岃鍘嬬洃娴嬬鐞�",
+ taskCount: 3,
+ patientCount: 89,
+ status: 1,
+ createBy: "鏉庡尰鐢�",
+ createTime: "2025-10-10 09:15:00",
+ },
+ {
+ groupId: "SG2025003",
+ groupName: "鏈悗搴峰闅忚缁�",
+ groupDesc: "澶栫鎵嬫湳鍚庢偅鑰呯殑搴峰鎸囧鍜岄殢璁跨鐞�",
+ taskCount: 2,
+ patientCount: 45,
+ status: 0,
+ createBy: "鐜嬪尰鐢�",
+ createTime: "2025-09-28 16:20:00",
+ },
+ {
+ groupId: "SG2025004",
+ groupName: "瀛曚骇鏈熷仴搴风鐞嗙粍",
+ groupDesc: "瀛曟湡鍜屼骇鍚庡濂崇殑鍋ュ悍鐩戞祴鍜屾寚瀵兼湇鍔�",
+ taskCount: 4,
+ patientCount: 67,
+ status: 1,
+ createBy: "璧靛尰鐢�",
+ createTime: "2025-10-05 11:30:00",
+ },
+ {
+ groupId: "SG2025005",
+ groupName: "鎱㈡�х梾缁煎悎绠$悊缁�",
+ groupDesc: "澶氱鎱㈡�х梾鎮h�呯殑缁煎悎鍋ュ悍绠$悊鏈嶅姟",
+ taskCount: 6,
+ patientCount: 203,
+ status: 1,
+ createBy: "寮犲尰鐢�",
+ createTime: "2025-09-15 08:45:00",
+ },
+ ],
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ // 鐘舵�侀�夐」
+ statusOptions: [
+ { value: 1, label: "鍚敤" },
+ { value: 0, label: "鍋滅敤" },
+ ],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ groupName: undefined,
+ createBy: undefined,
+ status: undefined,
+ },
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ /** 鏌ヨ鏈嶅姟缁勫垪琛� */
+ getList() {
+ // this.loading = true;
+ // listServiceGroup(
+ // this.addDateRange(this.queryParams, this.dateRange)
+ // ).then((response) => {
+ // this.groupList = response.rows;
+ // this.total = response.total;
+ // this.loading = false;
+ // });
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.groupId);
+ this.single = selection.length !== 1;
+ this.multiple = !selection.length;
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.$router.push("/group/serviceGroupPar");
+ },
+ /** 璇︽儏鎸夐挳鎿嶄綔 */
+ handleView(row, type) {
+ this.$router.push({
+ path: "/group/serviceGroupPar",
+ query: {
+ type: this.topqueryParams.type,
+ },
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const groupIds = row.groupId || this.ids;
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鏈嶅姟缁勭紪鍙蜂负"' + groupIds + '"鐨勬暟鎹」锛�')
+ .then(() => {
+ return delServiceGroup(groupIds);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ },
+};
+</script>
+
+<style scoped>
+.delete-btn {
+ color: #f56c6c;
+}
+.app-container {
+ padding: 20px;
+}
+.mb8 {
+ margin-bottom: 8px;
+}
+</style>
diff --git a/src/views/groupManagement/serviceGroup/particulars.vue b/src/views/groupManagement/serviceGroup/particulars.vue
new file mode 100644
index 0000000..f7dd40f
--- /dev/null
+++ b/src/views/groupManagement/serviceGroup/particulars.vue
@@ -0,0 +1,518 @@
+<template>
+ <div class="app-container">
+ <!-- 椤堕儴闈㈠寘灞戝鑸� -->
+ <el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb">
+ <el-breadcrumb-item :to="{ path: '/system/serviceGroup' }">鏈嶅姟缁勭鐞�</el-breadcrumb-item>
+ <el-breadcrumb-item>鏈嶅姟缁勮鎯�</el-breadcrumb-item>
+ </el-breadcrumb>
+
+ <!-- 椤堕儴鍩虹淇℃伅 -->
+ <el-card class="base-info-card" shadow="never">
+ <div slot="header" class="clearfix">
+ <span class="card-title">鏈嶅姟缁勫熀纭�淇℃伅</span>
+ <el-button
+ style="float: right; padding: 3px 0"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleEdit"
+ >缂栬緫</el-button
+ >
+ </div>
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <div class="info-item">
+ <label>鏈嶅姟缁勫悕绉帮細</label>
+ <span>{{ baseInfo.groupName }}</span>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="info-item">
+ <label>鏈嶅姟缁処D锛�</label>
+ <span>{{ baseInfo.groupId }}</span>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="info-item">
+ <label>鐘舵�侊細</label>
+ <el-tag :type="baseInfo.status === 1 ? 'success' : 'info'">
+ {{ baseInfo.status === 1 ? '鍚敤' : '鍋滅敤' }}
+ </el-tag>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="24">
+ <div class="info-item">
+ <label>鎻忚堪锛�</label>
+ <span>{{ baseInfo.groupDesc || '鏆傛棤鎻忚堪' }}</span>
+ </div>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20">
+ <el-col :span="8">
+ <div class="info-item">
+ <label>鍒涘缓浜猴細</label>
+ <span>{{ baseInfo.createBy }}</span>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="info-item">
+ <label>鍒涘缓鏃堕棿锛�</label>
+ <span>{{ parseTime(baseInfo.createTime) }}</span>
+ </div>
+ </el-col>
+ <el-col :span="8">
+ <div class="info-item">
+ <label>鏇存柊鏃堕棿锛�</label>
+ <span>{{ parseTime(baseInfo.updateTime) }}</span>
+ </div>
+ </el-col>
+ </el-row>
+ </el-card>
+
+ <!-- 涓儴鍏宠仈浠诲姟 -->
+ <el-card class="task-card" shadow="never">
+ <div slot="header" class="clearfix">
+ <span class="card-title">鍏宠仈浠诲姟</span>
+ <el-button
+ style="float: right; margin-left: 10px;"
+ type="primary"
+ icon="el-icon-plus"
+ size="mini"
+ @click="handleAddTask"
+ >鍏宠仈浠诲姟</el-button
+ >
+ <el-button
+ style="float: right;"
+ type="text"
+ icon="el-icon-setting"
+ @click="handleManageTasks"
+ >绠$悊</el-button
+ >
+ </div>
+
+ <el-table
+ v-loading="taskLoading"
+ :data="taskList"
+ style="width: 100%"
+ >
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ prop="taskName"
+ min-width="200"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="浠诲姟绫诲瀷"
+ prop="taskType"
+ width="120"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.task_type" :value="scope.row.taskType"/>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="浠诲姟鐘舵��"
+ prop="sendState"
+ width="100"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.task_status" :value="scope.row.sendState"/>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎬讳换鍔�/宸查殢璁�"
+ width="120"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.totalCount }}/{{ scope.row.completedCount }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ prop="createTime"
+ width="180"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ width="200"
+ align="center"
+ fixed="right"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleViewTask(scope.row)"
+ >鏌ョ湅</el-button
+ >
+ <el-button
+ size="mini"
+ type="text"
+ class="delete-btn"
+ @click="handleRemoveTask(scope.row)"
+ >绉婚櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div v-if="taskList.length === 0 && !taskLoading" class="empty-text">
+ 鏆傛棤鍏宠仈浠诲姟锛岃鍏堝叧鑱斾换鍔�
+ </div>
+ </el-card>
+
+ <!-- 搴曢儴鍏宠仈鎮h�� -->
+ <el-card class="patient-card" shadow="never">
+ <div slot="header" class="clearfix">
+ <span class="card-title">鍏宠仈鎮h��</span>
+ <el-button
+ style="float: right; margin-left: 10px;"
+ type="primary"
+ icon="el-icon-plus"
+ size="mini"
+ @click="handleAddPatient"
+ >鍏宠仈鎮h��</el-button
+ >
+ <el-button
+ style="float: right;"
+ type="text"
+ icon="el-icon-setting"
+ @click="handleManagePatients"
+ >绠$悊</el-button
+ >
+ </div>
+
+ <el-table
+ v-loading="patientLoading"
+ :data="patientList"
+ style="width: 100%"
+ >
+ <el-table-column
+ label="鎮h�呭鍚�"
+ prop="patientName"
+ width="120"
+ align="center"
+ />
+ <el-table-column
+ label="鎬у埆"
+ prop="gender"
+ width="80"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.gender"/>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="骞撮緞"
+ prop="age"
+ width="80"
+ align="center"
+ />
+ <el-table-column
+ label="鎵嬫満鍙�"
+ prop="phone"
+ width="130"
+ align="center"
+ />
+ <el-table-column
+ label="鐥呭巻鍙�"
+ prop="medicalRecordNo"
+ width="120"
+ align="center"
+ />
+ <el-table-column
+ label="璇婃柇"
+ prop="diagnosis"
+ min-width="200"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍏宠仈鏃堕棿"
+ prop="relationTime"
+ width="180"
+ align="center"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.relationTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎿嶄綔"
+ width="150"
+ align="center"
+ fixed="right"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ @click="handleViewPatient(scope.row)"
+ >璇︽儏</el-button
+ >
+ <el-button
+ size="mini"
+ type="text"
+ class="delete-btn"
+ @click="handleRemovePatient(scope.row)"
+ >绉婚櫎</el-button
+ >
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <div v-if="patientList.length === 0 && !patientLoading" class="empty-text">
+ 鏆傛棤鍏宠仈鎮h�咃紝璇峰厛鍏宠仈鎮h��
+ </div>
+ </el-card>
+ </div>
+</template>
+
+<script>
+import { getServiceGroup, getGroupTasks, getGroupPatients } from "@/api/system/serviceGroup";
+
+export default {
+ name: "ServiceGroupDetail",
+ dicts: ['sys_user_sex', 'task_status', 'task_type'],
+ data() {
+ return {
+ groupId: this.$route.params.groupId || 'SG2025001',
+ baseInfoLoading: false,
+ taskLoading: false,
+ patientLoading: false,
+
+ // 娴嬭瘯鏁版嵁 - 鍩虹淇℃伅
+ baseInfo: {
+ groupId: 'SG2025001',
+ groupName: '绯栧翱鐥呴殢璁跨鐞嗘湇鍔$粍',
+ groupDesc: '涓撻棬璐熻矗绯栧翱鐥呮偅鑰呯殑瀹氭湡闅忚銆佺敤鑽寚瀵煎拰鍋ュ悍绠$悊鏈嶅姟锛屾彁楂樻偅鑰呮不鐤椾緷浠庢��',
+ status: 1,
+ createBy: '寮犲尰鐢�',
+ createTime: '2025-10-15 14:30:00',
+ updateTime: '2025-10-20 09:15:00'
+ },
+
+ // 娴嬭瘯鏁版嵁 - 鍏宠仈浠诲姟
+ taskList: [
+ {
+ taskId: 'T1001',
+ taskName: '绯栧翱鐥呮湀搴﹂殢璁胯瘎浼�',
+ taskType: 1,
+ sendState: 2,
+ totalCount: 150,
+ completedCount: 120,
+ createTime: '2025-10-18 10:00:00'
+ },
+ {
+ taskId: 'T1002',
+ taskName: '琛�绯栫洃娴嬩緷浠庢�ч棶鍗�',
+ taskType: 2,
+ sendState: 1,
+ totalCount: 150,
+ completedCount: 85,
+ createTime: '2025-10-16 14:30:00'
+ },
+ {
+ taskId: 'T1003',
+ taskName: '骞跺彂鐥囩瓫鏌ユ彁閱掍换鍔�',
+ taskType: 3,
+ sendState: 3,
+ totalCount: 150,
+ completedCount: 45,
+ createTime: '2025-10-10 09:20:00'
+ }
+ ],
+
+ // 娴嬭瘯鏁版嵁 - 鍏宠仈鎮h��
+ patientList: [
+ {
+ patientId: 'P2025001',
+ patientName: '鐜嬪皬鏄�',
+ gender: 1,
+ age: 45,
+ phone: '13800138000',
+ medicalRecordNo: 'MR2025001001',
+ diagnosis: '2鍨嬬硸灏跨梾锛屼即鏈夊懆鍥寸缁忓苟鍙戠棁',
+ relationTime: '2025-10-16 09:00:00'
+ },
+ {
+ patientId: 'P2025002',
+ patientName: '鏉庡皬绾�',
+ gender: 0,
+ age: 62,
+ phone: '13900139000',
+ medicalRecordNo: 'MR2025001002',
+ diagnosis: '1鍨嬬硸灏跨梾锛岃儼宀涚礌渚濊禆鍨�',
+ relationTime: '2025-10-17 14:30:00'
+ },
+ {
+ patientId: 'P2025003',
+ patientName: '璧靛缓鍥�',
+ gender: 1,
+ age: 58,
+ phone: '13600136000',
+ medicalRecordNo: 'MR2025001003',
+ diagnosis: '2鍨嬬硸灏跨梾锛屼即鏈夌硸灏跨梾鑲剧梾',
+ relationTime: '2025-10-18 11:20:00'
+ }
+ ]
+ };
+ },
+ created() {
+ this.groupId = this.$route.params.groupId;
+ this.getDetail();
+ this.getTaskList();
+ this.getPatientList();
+ },
+ methods: {
+ /** 鑾峰彇鏈嶅姟缁勮鎯� */
+ getDetail() {
+ // this.baseInfoLoading = true;
+ // getServiceGroup(this.groupId).then(response => {
+ // this.baseInfo = response.data;
+ // this.baseInfoLoading = false;
+ // });
+ },
+ /** 鑾峰彇鍏宠仈浠诲姟鍒楄〃 */
+ getTaskList() {
+ // this.taskLoading = true;
+ // getGroupTasks(this.groupId).then(response => {
+ // this.taskList = response.rows;
+ // this.taskLoading = false;
+ // });
+ },
+ /** 鑾峰彇鍏宠仈鎮h�呭垪琛� */
+ getPatientList() {
+ // this.patientLoading = true;
+ // getGroupPatients(this.groupId).then(response => {
+ // this.patientList = response.rows;
+ // this.patientLoading = false;
+ // });
+ },
+ /** 缂栬緫鏈嶅姟缁� */
+ handleEdit() {
+ this.$router.push(`/system/serviceGroup/edit/${this.groupId}`);
+ },
+ /** 鍏宠仈浠诲姟 */
+ handleAddTask() {
+ this.$router.push(`/system/serviceGroup/tasks/${this.groupId}?action=add`);
+ },
+ /** 绠$悊浠诲姟 */
+ handleManageTasks() {
+ this.$router.push(`/system/serviceGroup/tasks/${this.groupId}`);
+ },
+ /** 鏌ョ湅浠诲姟璇︽儏 */
+ handleViewTask(task) {
+ // 鏍规嵁浠诲姟绫诲瀷璺宠浆鍒颁笉鍚岀殑浠诲姟璇︽儏椤�
+ const routeMap = {
+ 1: '/followvisit/particty',
+ 2: '/followvisit/QuestionnaireTask',
+ 3: '/followvisit/Missioncreation'
+ };
+ const route = routeMap[task.type] || '/followvisit/task';
+ this.$router.push(`${route}?id=${task.taskid}`);
+ },
+ /** 绉婚櫎浠诲姟 */
+ handleRemoveTask(task) {
+ this.$modal.confirm(`鏄惁纭绉婚櫎浠诲姟"${task.taskName}"锛焋).then(() => {
+ // 璋冪敤绉婚櫎浠诲姟API
+ removeTaskFromGroup(this.groupId, task.taskid).then(() => {
+ this.$modal.msgSuccess("绉婚櫎鎴愬姛");
+ this.getTaskList();
+ });
+ }).catch(() => {});
+ },
+ /** 鍏宠仈鎮h�� */
+ handleAddPatient() {
+ this.$router.push(`/system/serviceGroup/patients/${this.groupId}?action=add`);
+ },
+ /** 绠$悊鎮h�� */
+ handleManagePatients() {
+ this.$router.push(`/system/serviceGroup/patients/${this.groupId}`);
+ },
+ /** 鏌ョ湅鎮h�呰鎯� */
+ handleViewPatient(patient) {
+ this.$router.push(`/system/patient/detail/${patient.patientId}`);
+ },
+ /** 绉婚櫎鎮h�� */
+ handleRemovePatient(patient) {
+ this.$modal.confirm(`鏄惁纭绉婚櫎鎮h��"${patient.patientName}"锛焋).then(() => {
+ // 璋冪敤绉婚櫎鎮h�匒PI
+ removePatientFromGroup(this.groupId, patient.patientId).then(() => {
+ this.$modal.msgSuccess("绉婚櫎鎴愬姛");
+ this.getPatientList();
+ });
+ }).catch(() => {});
+ },
+ }
+};
+</script>
+
+<style scoped>
+.app-container {
+ padding: 20px;
+}
+
+.breadcrumb {
+ margin-bottom: 20px;
+}
+
+.base-info-card,
+.task-card,
+.patient-card {
+ margin-bottom: 20px;
+}
+
+.card-title {
+ font-size: 16px;
+ font-weight: bold;
+ color: #303133;
+}
+
+.info-item {
+ margin-bottom: 15px;
+ line-height: 1.5;
+}
+
+.info-item label {
+ display: inline-block;
+ width: 100px;
+ color: #606266;
+ font-weight: normal;
+ text-align: right;
+ margin-right: 10px;
+}
+
+.info-item span {
+ color: #303133;
+}
+
+.empty-text {
+ text-align: center;
+ color: #909399;
+ padding: 40px 0;
+ font-size: 14px;
+}
+
+.delete-btn {
+ color: #f56c6c;
+}
+
+.clearfix:before,
+.clearfix:after {
+ display: table;
+ content: "";
+}
+.clearfix:after {
+ clear: both;
+}
+</style>
diff --git a/src/views/knowledge/education/compilequer/index copy.vue b/src/views/knowledge/education/compilequer/index copy.vue
new file mode 100644
index 0000000..18f6baf
--- /dev/null
+++ b/src/views/knowledge/education/compilequer/index copy.vue
@@ -0,0 +1,1322 @@
+<template>
+ <div class="Questionnairemanagement">
+ <!-- 宸︿晶鏍� -->
+ <div class="sidecolumn">
+ <el-steps finish-status="success" :active="Editprogress" simple>
+ <el-step>
+ <template slot="title">
+ <span style="cursor: pointer" @click="Editprogress = 1"
+ >鍩虹淇℃伅璁剧疆</span
+ >
+ </template>
+ </el-step>
+ <el-step>
+ <template slot="title">
+ <span style="cursor: pointer" @click="Editprogress = 2"
+ >瀹f暀鍐呭</span
+ >
+ </template>
+ </el-step>
+ </el-steps>
+ </div>
+ <!-- 鍙充晶鏁版嵁 -->
+ <div class="leftvlue">
+ <!-- 鍩烘湰淇℃伅 -->
+ <div v-if="Editprogress == 1">
+ <div class="leftvlue-jbxx">鍩烘湰淇℃伅</div>
+ <el-divider></el-divider>
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ ref="ruleForm"
+ label-width="100px"
+ class="demo-ruleForm"
+ >
+ <el-form-item label="瀹f暀鍒嗙被" prop="region">
+ <el-select
+ v-model="ruleForm.assortid"
+ size="medium"
+ filterable
+ placeholder="璇烽�夋嫨鍒嗙被"
+ >
+ <el-option-group
+ v-for="group in sortlist"
+ :key="group.id"
+ :label="group.assortname"
+ >
+ <el-option
+ v-for="item in group.heLibraryAssortList"
+ :key="item.id"
+ :label="item.assortname"
+ :value="item.id"
+ >
+ </el-option>
+ </el-option-group>
+ </el-select>
+ </el-form-item>
+ <el-row>
+ <el-col :span="12"> </el-col>
+ <el-col :span="12"> </el-col>
+ </el-row>
+ <el-form-item label="瀹f暀鏍囬" prop="preachname">
+ <div style="width: 30%">
+ <el-input
+ v-model="ruleForm.preachname"
+ placeholder="璇疯緭鍏ユ爣棰�"
+ ></el-input>
+ </div>
+ </el-form-item>
+ <el-form-item label="瀹f暀鎻忚堪" prop="preachcontent">
+ <div style="width: 60%">
+ <el-input
+ type="textarea"
+ :rows="2"
+ v-model="ruleForm.preachcontent"
+ placeholder="璇疯緭鍏ユ弿杩�"
+ ></el-input>
+ </div>
+ </el-form-item>
+ <el-form-item label="閫氱煡鍙橀噺" prop="name">
+ <div style="margin-bottom: 5px" v-for="item in variablelist">
+ <el-row>
+ <el-col :span="5">
+ <el-input
+ v-model="item.variatename"
+ placeholder="璇疯緭鍏ュ彉閲忓悕"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-input
+ v-model="item.variate"
+ placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-button
+ type="success"
+ icon="el-icon-plus"
+ circle
+ @click="addvariable(item)"
+ ></el-button>
+ <el-button
+ v-if="!item.default"
+ type="danger"
+ icon="el-icon-delete"
+ circle
+ @click="delvariable(item)"
+ ></el-button>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form-item>
+
+ <el-form-item label="鏂囦欢" prop="sickness">
+ <div style="width: 40%">
+ <el-upload
+ class="upload-demo"
+ action="https://jsonplaceholder.typicode.com/posts/"
+ :on-change="handleChange"
+ :file-list="fileList"
+ >
+ <el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
+ <div slot="tip" class="el-upload__tip">
+ 鍙兘涓婁紶jpg/png/xsl鏂囦欢锛屼笖涓嶈秴杩�50mb
+ </div>
+ </el-upload>
+ </div>
+ </el-form-item>
+ <el-form-item label="鏍囩" prop="desc">
+ <div class="xinz-inf">
+ <el-tag
+ :key="tag.tagname"
+ type="success"
+ v-for="tag in dynamicTags"
+ closable
+ :disable-transitions="false"
+ @close="handleClosetag(tag)"
+ >
+ {{ tag.tagname }}
+ </el-tag>
+ <el-select
+ v-model="inputValue"
+ v-if="inputVisible"
+ @change="handleInputConfirm"
+ filterable
+ remote
+ allow-create
+ reserve-keyword
+ default-first-option
+ :remote-method="remoteMethodtag"
+ :loading="loading"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in optionstag"
+ :key="item.tagid"
+ :label="item.tagname"
+ :value="item.tagname"
+ >
+ </el-option>
+ </el-select>
+ <el-button
+ v-else
+ class="button-new-tag"
+ size="small"
+ @click="showInput"
+ >+ 鏂板鏍囩</el-button
+ >
+ </div>
+ </el-form-item>
+ <el-row :gutter="20">
+ <el-col :span="6">
+ <el-form-item label="鐗堟湰鍙�" prop="name">
+ <el-input
+ v-model="ruleForm.version"
+ placeholder="榛樿1.0.1"
+ ></el-input> </el-form-item
+ ></el-col>
+ <el-col :span="9">
+ <el-form-item label="鍙敤鐘舵��" prop="region">
+ <el-radio-group v-model="ruleForm.isAvailable">
+ <el-radio
+ v-for="(item, index) in usable"
+ :label="item.value"
+ >{{ item.label }}</el-radio
+ >
+ </el-radio-group>
+ </el-form-item></el-col
+ >
+ </el-row>
+ <el-form-item label="瀹f暀鏂瑰紡" prop="region">
+ <el-select
+ v-model="ruleForm.suitway"
+ size="medium"
+ multiple
+ filterable
+ placeholder="璇烽�夋嫨鍒嗙被"
+ >
+ <el-option
+ class="ruleFormaa"
+ v-for="item in mode"
+ :key="item.label"
+ :label="item.label"
+ :value="item.label"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="閫傜敤鐤剧梾" prop="region">
+ <el-button type="warning" @click="$refs.child.handleAddpatient()"
+ >娣诲姞鐤剧梾</el-button
+ >
+ </el-form-item>
+ <el-form-item label="閫傜敤闄㈠尯" prop="region">
+ <el-select
+ v-model="ruleForm.campus"
+ size="medium"
+ multiple
+ filterable
+ placeholder="璇烽�夋嫨鍒嗙被"
+ >
+ <el-option
+ class="ruleFormaa"
+ v-for="item in courtyardlist"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="閫傜敤绉戝" prop="region">
+ <el-cascader
+ v-model="tempDetpRelevanceslist"
+ :options="deptList"
+ :props="props"
+ :show-all-levels="false"
+ clearable
+ >
+ <template slot-scope="{ node, data }">
+ <span>{{ data.deptName }}</span>
+ <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
+ </template>
+ </el-cascader>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="success" @click="nextstep('ruleForm')"
+ >涓嬩竴姝�</el-button
+ >
+ <el-button type="success" @click="Departmenttreatment('ruleForm')"
+ >淇濆瓨</el-button
+ >
+ <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <!-- 瀹f暀鍐呭 -->
+ <div v-if="Editprogress == 2">
+ <el-row :gutter="20">
+ <el-col :span="4">
+ <div class="leftvlue-jbxx">瀹f暀鍐呭</div>
+ </el-col>
+ <el-col :offset="16" :span="4">
+ <el-upload
+ class="upload-demo"
+ :action="uploadImgUrlword"
+ :on-success="uploadEditorSuccessword"
+ :on-error="uploadEditorErrorword"
+ :before-upload="beforeEditorUploadword"
+ :headers="headers"
+ >
+ <el-button size="small" type="primary">word鏂囦欢涓婁紶</el-button>
+ </el-upload>
+ </el-col>
+ </el-row>
+
+ <div>
+ <el-form
+ :model="ruleForm"
+ :rules="rules"
+ ref="ruleForm"
+ label-width="100px"
+ class="demo-ruleForm"
+ >
+ <!-- <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="璧勬枡褰㈠紡" prop="region">
+ <el-select
+ v-model="ruleForm.shape"
+ placeholder="璇烽�夋嫨鍐呭褰㈠紡"
+ >
+ <el-option
+ v-for="item in xjxsoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12"> -->
+
+ <!-- </el-col>
+ </el-row> -->
+ </el-form>
+ </div>
+ <!-- <div>
+ <div id="quillEditorQiniu">
+ <el-upload
+ class="avatar-uploader"
+ :action="uploadImgUrl"
+ :accept="'image/*,video/*'"
+ :show-file-list="false"
+ :on-success="uploadEditorSuccess"
+ :on-error="uploadEditorError"
+ :before-upload="beforeEditorUpload"
+ :headers="headers"
+ >
+ </el-upload>
+ <quill-editor
+ class="editor"
+ v-model="content"
+ ref="customQuillEditor"
+ :options="editorOption"
+ @blur="onEditorBlur"
+ @focus="onEditorFocus"
+ @change="onEditorChange"
+ >
+ </quill-editor>
+ </div>
+ </div> -->
+ <!-- 鏂扮粍浠� -->
+ <div style="border: 1px solid #ccc; margin: 10px">
+ <Toolbar
+ style="border-bottom: 1px solid #ccc"
+ :editor="editor"
+ :defaultConfig="toolbarConfig"
+ :mode="modes"
+ />
+ <Editor
+ style="height: 500px; overflow-y: hidden"
+ v-model="content"
+ :defaultConfig="editorConfig"
+ :mode="modes"
+ @onCreated="onCreated"
+ />
+ </div>
+ <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="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
+ </div>
+ </div>
+ </div>
+ <!-- 娣诲姞閫傜敤鐤剧梾绐楀彛 -->
+ <Optional-Form
+ ref="child"
+ :dialogVisiblepatient="dialogVisiblepatient"
+ :overallCase="illnesslist"
+ @addoption="dialogVisiblepatient = false"
+ @kkoption="dialogVisiblepatient = true"
+ />
+ </div>
+</template>
+
+<script>
+import { quillEditor } from "vue-quill-editor";
+import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
+import axios from "axios";
+
+import {
+ getheLibraryAssort,
+ delheLibraryAssort,
+ addheLibraryAssort,
+ addtargetillness,
+ getlibrarylist,
+ dellibraryinfo,
+ deltargetillness,
+ compilelibrary,
+ addrichText,
+ getlibraryinfo,
+ getillnesslist,
+ illnesslistget,
+ getillness,
+} from "@/api/AiCentre/index";
+import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
+
+import { listDept } from "@/api/system/dept";
+// import * as Quill from "quill";
+import Quill from "quill";
+import { listtag } from "@/api/system/label";
+import store from "@/store";
+
+// 杩欓噷寮曞叆淇敼杩囩殑video妯″潡骞舵敞鍐�
+import Video from "./video";
+Quill.register(Video, true);
+//鑾峰彇鐧诲綍token锛屽紩鍏ユ枃浠讹紝濡傛灉鍙槸绠�鍗曟祴璇曪紝娌℃湁涓婁紶鏂囦欢鏄惁鐧诲綍鐨勯檺鍒剁殑璇濓紝
+//杩欎釜token鍙互涓嶇敤鑾峰彇锛屾枃浠跺彲浠ヤ笉寮曞叆锛屾妸涓婇潰瀵瑰簲鐨勪笂浼犳枃浠舵惡甯﹁姹傚ご :headers="headers" 杩欎釜浠g爜鍒犳帀鍗冲彲
+import { getToken } from "@/utils/auth";
+const toolbarOptions = [
+ ["bold", "italic", "underline", "strike"], // toggled buttons
+ ["blockquote", "code-block"],
+
+ [{ header: 1 }, { header: 2 }], // custom button values
+ [{ list: "ordered" }, { list: "bullet" }],
+ [{ script: "sub" }, { script: "super" }], // superscript/subscript
+ [{ indent: "-1" }, { indent: "+1" }], // outdent/indent
+ [{ direction: "rtl" }], // text direction
+
+ [{ size: ["small", false, "large", "huge"] }], // custom dropdown
+ [{ header: [1, 2, 3, 4, 5, 6, false] }],
+
+ [{ color: [] }, { background: [] }], // dropdown with defaults from theme
+ [{ font: [] }],
+ [{ align: [] }],
+ ["link", "image", "video"],
+ ["clean"], // remove formatting button
+];
+
+export default {
+ name: "aEducationinfo",
+ components: { OptionalForm, Editor, Toolbar },
+ data() {
+ return {
+ editor: null,
+ content: "<p>hello</p>",
+ toolbarConfig: {},
+ editorConfig: {
+ placeholder: "璇疯緭鍏ュ唴瀹�...",
+ menus: [
+ "head",
+ "bold",
+ "italic",
+ "underline",
+ "image",
+ "link",
+ "list",
+ "undo",
+ "redo",
+ "file", // 娣诲姞鑷畾涔夋枃浠朵笂浼犺彍鍗�
+ ],
+ uploadImgServer: process.env.VUE_APP_BASE_API + "/common/uploadSort", // 鍥剧墖涓婁紶鎺ュ彛
+ uploadImgHeaders: {
+ Authorization: "Bearer " + getToken(),
+ }, // 鑷畾涔変笂浼犵殑 headers
+ uploadImgParams: { key: "value" }, // 鑷畾涔変笂浼犵殑鍙傛暟
+ uploadImgMaxSize: 2 * 1024 * 1024, // 鍥剧墖鏈�澶уぇ灏忥紝鍗曚綅 Byte
+ uploadImgMaxLength: 1, // 涓�娆℃渶澶氫笂浼犲浘鐗囨暟閲�
+ uploadImgTimeout: 3 * 60 * 1000, // 瓒呮椂鏃堕棿锛屽崟浣� ms
+ uploadImgHooks: {
+ customInsert: (insertImgFn, result) => {
+ const url = result.url; // 鑾峰彇鍥剧墖鍦板潃
+ insertImgFn(url); // 鎻掑叆鍥剧墖
+ },
+ },
+ customMenus: {
+ file: {
+ tip: "涓婁紶鏂囦欢",
+ click: (editor) => {
+ const input = document.createElement("input");
+ input.type = "file";
+ input.accept =
+ "application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"; // 鏀寔鐨勬枃浠剁被鍨�
+ input.onchange = (e) => {
+ const file = e.target.files[0];
+ if (!file) return;
+ const formData = new FormData();
+ formData.append("file", file);
+
+ // 纭繚 process.env.VUE_APP_BASE_API 鏄纭殑
+ const uploadUrl =
+ process.env.VUE_APP_BASE_API + "/common/uploadSort";
+ axios
+ .post(uploadUrl, formData, {
+ headers: {
+ Authorization: "Bearer " + getToken(),
+ },
+ })
+ .then((res) => {
+ const url = res.data.url; // 鑾峰彇鏂囦欢鍦板潃
+ // 鎻掑叆鏂囦欢閾炬帴浣滀负鏅�氭枃鏈�
+ editor.txt.append(url + " ");
+ // 鎴栬�呮彃鍏ユ枃浠堕摼鎺ヤ綔涓鸿秴閾炬帴
+ // editor.cmd.do('insertLink', { name: '鏂囦欢閾炬帴', url: url });
+ })
+ .catch((err) => {
+ console.error("鏂囦欢涓婁紶澶辫触", err);
+ });
+ };
+ input.click();
+ },
+ },
+ },
+ },
+ modes: "default", // or 'simple'
+ headers: {
+ Authorization: "Bearer " + getToken(),
+ },
+ uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/uploadSort",
+ uploadImgUrlword: process.env.VUE_APP_BASE_API + "/common/uploadShow",
+ uploadUrlPath: "娌℃湁鏂囦欢涓婁紶",
+ quillUpdateImg: false,
+ fileList: [
+ {
+ name: "food.jpeg",
+ url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
+ },
+ {
+ name: "food2.jpeg",
+ url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
+ },
+ ],
+ content: `<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://218.108.11.22:8093/profile-api/upload/vadio/钀ュ吇娉垫搷浣滆鑼�.mp4"></video><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://218.108.11.22:8093/profile-api/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p>321</p>"`, //鏈�缁堜繚瀛樼殑鍐呭
+ fileName: "", //鏂囦欢鍚�
+ dynamicTags: [],
+ inputVisible: false,
+ illnessVisible: false,
+ dialogVisiblepatient: false, //閫傜敤鐤剧梾绐楀彛
+ inputValue: "",
+ // 瀵屾枃鏈�
+ editorOption: {
+ placeholder: "浣犳兂璇翠粈涔堬紵",
+ modules: {
+ imageResize: {
+ displayStyles: {
+ backgroundColor: "black",
+ border: "none",
+ color: "white",
+ },
+ modules: ["Resize", "DisplaySize", "Toolbar"],
+ },
+ toolbar: {
+ container: toolbarOptions, // 宸ュ叿鏍�
+ handlers: {
+ image: function (value) {
+ if (value) {
+ document
+ .querySelector("#quillEditorQiniu .avatar-uploader input")
+ .click();
+ } else {
+ this.quill.format("image", false);
+ }
+ },
+ video: function (value) {
+ if (value) {
+ document
+ .querySelector("#quillEditorQiniu .avatar-uploader input")
+ .click();
+ } else {
+ this.quill.format("video", false);
+ }
+ },
+ },
+ },
+ },
+ },
+
+ sidecolumnrabs: "left", //鏂瑰悜
+ Editprogress: 1, //缂栬緫杩涘害
+ currentVersion: "1.2.3", //褰撳墠鐗堟湰
+ loading: false, // 閬僵灞�
+ drawer: false, //鎺у埗灞曞紑
+ radio: "false", //鍗曢�夐閫変腑
+ radios: [], //澶氶�夐閫変腑
+ radioas: "", //濉┖棰樼瓟妗�
+ // 鎬绘潯鏁�
+ total: 1,
+ hetype: "",
+ id: null,
+ ruleForm: {
+ campus: [],
+ heLibraryTagList: [],
+ tempDetpRelevances: [],
+ version: "1.0.1",
+ },
+ rules: {},
+ rulesa: {},
+ mode: [],
+ editableTabs: [],
+ sortlist: [],
+ usable: [],
+ courtyardlist: [],
+ precedencetype: [],
+ optionsillness: [],
+ illnesslistapi: [],
+ illnesslist: [],
+ options: [],
+ optionstag: [],
+ deptList: [],
+ tempDetpRelevanceslist: [],
+ props: { multiple: true, value: "deptId", label: "deptName" },
+ // 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
+ oldPattern: "http://192.168.191.181:8095/profile/upload",
+ // 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
+ oldPatternhtml: "/http:\/\/192\.168\.191\.181:8095\/profile\/upload\//g",
+ // 澶栫綉閮ㄥ垎锛堟枃浠讹級
+ // newPattern: "http://218.108.11.22:8093/profile-api/upload",
+ newPattern: "http://m.zjtongde.com:13871/prod-api/profile/upload",
+
+ xjxsoptions: [
+ {
+ value: "1",
+ label: "鍥炬枃",
+ },
+ {
+ value: "2",
+ label: "瑙嗛",
+ },
+ {
+ value: "3",
+ label: "闊抽",
+ },
+ ],
+ valssu: [
+ {
+ idd: 1,
+ wssd: "浣犳渶杩戞�庝箞鏍�",
+ sdadd: ["sss", "ssccss", "ssaas", "ss"],
+ },
+ ],
+ addvalue: "娣诲姞棰樼洰",
+
+ variablelist: [
+ { variatename: "濮撳悕", variate: "${name}", default: 1 },
+ { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
+ { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
+ ],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ },
+ };
+ },
+ activated() {
+ if (this.id != this.$route.query.id) {
+ this.gettabList();
+ this.getList();
+ this.illnessUpdate();
+ }
+ },
+
+ created() {
+ this.gettabList();
+ this.getList();
+ this.illnessUpdate();
+ this.mode = store.getters.mode;
+ this.editableTabs = store.getters.editableTabs;
+ this.usable = store.getters.usable;
+ this.precedencetype = store.getters.precedencetype;
+ this.courtyardlist = store.getters.courtyardlist;
+ },
+ watch: {
+ content(newVal, oldVal) {
+ //this.$emit('input', newVal);
+ console.log(newVal, "A");
+ console.log(oldVal, "B");
+ },
+ },
+ beforeDestroy() {
+ const editor = this.editor;
+ if (editor == null) return;
+ editor.destroy(); // 缁勪欢閿�姣佹椂锛屽強鏃堕攢姣佺紪杈戝櫒
+ },
+ methods: {
+ onCreated(editor) {
+ this.editor = Object.seal(editor); // 涓�瀹氳鐢� Object.seal()锛屽惁鍒欎細鎶ラ敊
+ },
+
+ // ---------------------------------
+ processElement(element) {
+ return { ...element, isoperation: null };
+ },
+ // 鑾峰彇椤甸潰鏁版嵁
+ getList() {
+ this.loading = true;
+ this.id = this.$route.query.id;
+ this.hetype = this.$route.query.hetype;
+ if (this.id) {
+ getlibraryinfo({ id: this.id }).then((res) => {
+ this.ruleForm = res.data[0];
+ if (this.ruleForm.campus)
+ this.ruleForm.campus = this.ruleForm.campus.split(",");
+ this.dynamicTags = res.data[0].heLibraryTagList.map(
+ this.processElement
+ );
+ if (this.ruleForm.htmlRichText) {
+ this.Getmissioncontent(this.ruleForm.htmlRichText);
+ }
+ if (this.ruleForm.deptNames) {
+ this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
+ }
+ if (this.ruleForm.suitway) {
+ this.ruleForm.suitway = this.ruleForm.suitway.split(",");
+ }
+ this.variablelist = this.ruleForm.otherdata
+ ? JSON.parse(this.ruleForm.otherdata)
+ : this.variablelist;
+ });
+ }
+ // 瀹f暀鍒嗙被
+ getheLibraryAssort({ hetype: 1 }).then((res) => {
+ this.sortlist = res.rows;
+ console.log(this.sortlist);
+ });
+ // 閮ㄩ棬
+ listDept(this.queryParams).then((response) => {
+ this.deptList = this.handleTree(response.data, "deptId");
+ });
+
+ // ------------------
+
+ // let html =
+ // '<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/钀ュ吇娉典粙缁�.mp4"></video><p>娴嬭瘯111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p><br></p>';
+ // // html = html.parserdom(this.oldPattern, this.newPattern);
+ // html = this.parserdom(html);
+ // console.log(html, "html");
+
+ // this.loading = false;
+ },
+ // parser
+ parserdom(html) {
+ // 鍒涘缓涓�涓柊鐨凞OM瑙f瀽鍣�
+ var parser = new DOMParser();
+ // 灏嗗瓧绗︿覆瑙f瀽涓烘枃妗e璞�
+ var doc = parser.parseFromString(html, "text/html");
+
+ // 瀹氫箟瑕佹浛鎹㈢殑鏂版棫URL
+ var oldUrlBase = this.oldPattern;
+ var newUrlBase =this.newPattern;
+
+ // 鑾峰彇鎵�鏈夌殑video鍏冪礌
+ var videos = doc.querySelectorAll("video");
+
+ // 閬嶅巻鎵�鏈夌殑video鍏冪礌骞舵浛鎹rc灞炴��
+ videos.forEach(function (video) {
+ var src = video.getAttribute("src");
+ if (src.startsWith(oldUrlBase)) {
+ video.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
+ }
+ });
+
+ // 灏嗕慨鏀瑰悗鐨勬枃妗h浆鎹㈠洖瀛楃涓�
+ var newContent = doc.body.innerHTML;
+ return newContent;
+ },
+ submitForm(formName) {
+ let tgs = [];
+ this.dynamicTags.forEach((item) => {
+ tgs.push(item.tagname);
+ });
+ if (this.ruleForm.campus) {
+ this.ruleForm.campus = this.ruleForm.campus.join(",");
+ }
+ this.ruleForm.labelInfo = tgs.length != 0 ? tgs.join(", ") : "";
+ this.ruleForm.otherdata = JSON.stringify(this.variablelist);
+ this.ruleForm.hetype = 1;
+ console.log(22);
+ this.ruleForm.suitway =
+ this.ruleForm.suitway.length != 0
+ ? this.ruleForm.suitway.join(",")
+ : "";
+
+ addrichText({
+ content: this.parserdom(this.content),
+ fileName: this.generateRandomHtmlFilename(),
+ }).then((res) => {
+ this.ruleForm.richText = res.msg;
+ console.log(this.ruleForm.richText, "this.ruleForm.richText");
+ // 澶勭悊鍐呯綉html
+ addrichText({
+ content: this.content,
+ fileName: this.generateRandomHtmlFilename(),
+ }).then((resf) => {
+ this.ruleForm.htmlRichText = resf.msg.replace(
+ this.newPattern,
+ this.oldPattern
+ );
+ console.log(this.ruleForm.htmlRichText, "this.ruleForm.htmlRichText");
+
+ if (this.id) {
+ this.ruleForm.isoperation = 2;
+ compilelibrary(this.ruleForm).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("缂栬緫鎴愬姛");
+ this.confirmillness();
+ this.$router.go(-1);
+ }
+ });
+ } else {
+ this.ruleForm.isoperation = 1;
+ compilelibrary(this.ruleForm).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.confirmillness(res.data);
+ this.$router.go(-1);
+ }
+ });
+ }
+ });
+ });
+ },
+
+ generateRandomHtmlFilename() {
+ // 鐢熸垚涓�涓�0鍒�1涔嬮棿鐨勯殢鏈烘暟锛屽苟灏嗗叾杞崲涓哄瓧绗︿覆
+ let randomNumber = Math.random().toString();
+ // 绉婚櫎鍓嶉潰鐨�0鍜屽皬鏁扮偣
+ randomNumber = randomNumber.substring(6);
+ // 纭繚鐢熸垚鐨勯殢鏈烘暟鏄竴瀹氶暱搴︾殑锛屼緥濡�8浣�
+ while (randomNumber.length < 8) {
+ randomNumber = "0" + randomNumber;
+ }
+ // 鎷兼帴涓�.html鍚庣紑
+ return randomNumber + ".html";
+ },
+
+ // 淇濆瓨鐤剧梾
+ confirmillness(guid) {
+ this.illnesslist.forEach((item, index) => {
+ if (guid) {
+ item.outid = guid;
+ } else {
+ console.log(this.ruleForm);
+ item.outid = this.ruleForm.id;
+ }
+ item.icd10name = item.icdname;
+ item.icd10code = item.icdcode;
+ item.type = 6;
+ if (!item.id) {
+ addtargetillness(item).then((res) => {});
+ }
+ });
+ this.illnessVisible = false;
+ this.$modal.msgSuccess("缂栬緫鎴愬姛");
+ },
+ getFileNameFromPath(path) {
+ const parts = path.split("/");
+ return parts[parts.length - 1];
+ },
+ // 涓嬩竴姝�
+ nextstep() {
+ if (this.Editprogress <= 1) {
+ return this.Editprogress++;
+ }
+ },
+ // 涓婁竴姝�
+ laststep() {
+ this.Editprogress = this.Editprogress - 1;
+ },
+ // 鍏抽棴
+ closeFm() {
+ this.$confirm("閫�鍑轰笉浼氫繚鐣欓〉闈㈠唴瀹规洿鏀�, 鏄惁缁х画?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ this.$router.go(-1);
+ })
+ .catch(() => {
+ this.$message({
+ type: "info",
+ message: "宸插彇娑�",
+ });
+ });
+ },
+ // 绉戝澶勭悊
+ Departmenttreatment() {
+ this.ruleForm.deptNames = JSON.stringify(this.tempDetpRelevanceslist);
+ const result = this.tempDetpRelevanceslist.map(
+ (subArr) => subArr[subArr.length - 1]
+ );
+ // id鏁扮粍鏌ユ暟缁勫璞�
+ result.forEach((item) => {
+ const condition = this.ruleForm.tempDetpRelevances.some(
+ (obj) => obj.deptId === item
+ );
+ if (!condition) {
+ listDept({ deptId: item }).then((res) => {
+ console.log("dept");
+ res.data[0].type = 2;
+ this.ruleForm.tempDetpRelevances.push(res.data[0]);
+ });
+ }
+ });
+ // 鏁扮粍瀵硅薄鏌d鏁扮粍
+ this.ruleForm.tempDetpRelevances.forEach((item) => {
+ const condition = result.some((obj) => obj === item.deptId);
+ if (!condition) {
+ const index = this.ruleForm.tempDetpRelevances.indexOf(item);
+ this.ruleForm.tempDetpRelevances[index].delFlag = 1;
+ }
+ });
+ setTimeout(() => {
+ this.submitForm();
+ }, 1000);
+ // this.submitForm();
+ },
+ // 淇濆瓨棰樼洰淇℃伅
+ Saveproblem() {},
+ /** 鏌ヨ棰樼洰鍒楄〃 */
+
+ // 鏂板鍙橀噺
+ addvariable() {
+ this.variablelist.push({
+ variatename: "",
+ variate: "",
+ });
+ },
+ // 鍒犻櫎鍙橀噺
+ delvariable(item) {
+ const index = this.variablelist.indexOf(item);
+ if (index !== -1) {
+ this.variablelist.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱�
+ } else {
+ console.log("鏈壘鍒拌瀵硅薄");
+ }
+ },
+ // 鎺у埗鏂囦欢
+ handleChange(file, fileList) {
+ this.fileList = fileList.slice(-3);
+ },
+ // 鏍囩-----------------
+ gettabList() {
+ const tagqueryParams = {
+ pageNum: 1,
+ pageSize: 1000,
+ tagcategoryid: "0",
+ };
+ listtag(tagqueryParams).then((response) => {
+ this.optionstag = response.rows;
+ });
+ },
+ handleClosetag(tag) {
+ console.log(tag);
+ const lindex = this.ruleForm.heLibraryTagList.findIndex(
+ (item) => item.tagname == tag.tagname
+ );
+ console.log(lindex);
+ this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+ this.ruleForm.heLibraryTagList[lindex].isoperation = 3;
+ },
+ handleInputConfirm() {
+ let tagvalue = {};
+ let tagname = this.inputValue;
+ if (tagname) {
+ listtag({
+ pageNum: 1,
+ pageSize: 1000,
+ tagcategoryid: "0",
+ tagname: tagname,
+ }).then((res) => {
+ if (res.rows[0]) {
+ tagvalue = res.rows[0];
+ tagvalue.isoperation = 1;
+ } else {
+ tagvalue = {
+ tagname: tagname,
+ isoperation: 1,
+ };
+ }
+ this.ruleForm.heLibraryTagList.push(tagvalue);
+ this.dynamicTags.push(tagvalue);
+ });
+ }
+ this.inputVisible = false;
+ this.inputValue = "";
+ },
+ remoteMethodtag(query) {
+ if (query !== "") {
+ this.loading = true;
+ setTimeout(() => {
+ this.loading = false;
+ listtag({ tagname: query, tagcategoryid: "0" }).then((res) => {
+ this.optionstag = res.rows;
+ });
+ }, 200);
+ } else {
+ this.optionstag = [];
+ }
+ },
+ showInput() {
+ this.inputVisible = true;
+ },
+ // 鐤剧梾-----------------------
+ illnessUpdate() {
+ if (this.id) {
+ getillness({ outid: this.$route.query.id, type: 6 }).then((res) => {
+ this.illnesslist = res.rows;
+ this.illnesslist.forEach((item) => {
+ item.icdname = item.icd10name;
+ });
+ });
+ }
+ },
+
+ // --------------------------
+
+ // 棰勮妯℃澘
+ PreviewTemplate() {
+ this.drawer = true;
+ },
+ resetForm(formName) {
+ this.$refs[formName].resetFields();
+ },
+
+ //涓婁紶鍥剧墖涔嬪墠async
+ beforeEditorUpload(res, file) {
+ //鏄剧ず涓婁紶鍔ㄧ敾
+ this.quillUpdateImg = true;
+ // const res1 = await uploadImage()
+ // console.log(res1,'=====');
+ // this.$emit('before',res, file)
+ console.log(res);
+ console.log(file);
+ },
+ // 涓婁紶鍥剧墖鎴愬姛
+ uploadEditorSuccess(res, file) {
+ console.log("涓婁紶鎴愬姛");
+ //鎷兼帴鍑轰笂浼犵殑鍥剧墖鍦ㄦ湇鍔″櫒鐨勫畬鏁村湴鍧�
+ let imgUrl = res.url;
+ console.log(res.url);
+
+ imgUrl = imgUrl.replace(this.newPattern, this.oldPattern);
+ console.log(imgUrl, "imgUrl");
+
+ let type = imgUrl.substring(imgUrl.lastIndexOf(".") + 1);
+ this.fileName = this.getFileNameFromPath(res.url);
+
+ // 鑾峰彇瀵屾枃鏈粍浠跺疄渚�
+ let quill = this.$refs.customQuillEditor.quill;
+ // 鑾峰彇鍏夋爣鎵�鍦ㄤ綅缃�
+ let length = quill.getSelection().index;
+ // 鎻掑叆鍥剧墖||瑙嗛 res.info涓烘湇鍔″櫒杩斿洖鐨勫浘鐗囧湴鍧�
+ if (type == "mp4" || type == "MP4" || type == "avi" || type == "AVI") {
+ window.jsValue = imgUrl;
+ quill.insertEmbed(length, "video", imgUrl);
+ } else {
+ quill.insertEmbed(length, "image", imgUrl);
+ }
+ // 璋冩暣鍏夋爣鍒版渶鍚�
+ quill.setSelection(length + 1);
+ //鍙栨秷涓婁紶鍔ㄧ敾
+ this.quillUpdateImg = false;
+ },
+ // 澶卞幓鐒︾偣浜嬩欢
+ onEditorBlur(e) {
+ console.log("onEditorBlur: ", e);
+ },
+ // 鑾峰緱鐒︾偣浜嬩欢
+ onEditorFocus(e) {
+ console.log("onEditorFocus: ", e);
+ },
+ // 鍐呭鏀瑰彉浜嬩欢
+ onEditorChange(e) {
+ console.log("onEditorChange: ", e);
+ },
+ // 涓婁紶(鏂囦欢)鍥剧墖澶辫触
+ uploadEditorError(res, file) {
+ console.log(res, "word");
+ console.log(file, "word");
+ //椤甸潰鎻愮ず
+ this.$message.error("涓婁紶鍥剧墖澶辫触");
+ //鍙栨秷涓婁紶鍔ㄧ敾
+ this.quillUpdateImg = false;
+ },
+ //涓婁紶缁勪欢杩斿洖鐨勭粨鏋�
+ uploadResult: function (res) {
+ this.uploadUrlPath = res;
+ },
+ // 涓婁紶(鏂囦欢)鍥剧墖澶辫触
+ uploadEditorErrorword(res, file) {
+ console.log(res);
+ console.log(file);
+ //椤甸潰鎻愮ず
+ this.$message.error("涓婁紶鍥剧墖澶辫触");
+ //鍙栨秷涓婁紶鍔ㄧ敾
+ this.quillUpdateImg = false;
+ },
+ //涓婁紶鍥剧墖涔嬪墠async
+ beforeEditorUploadword(res, file) {
+ //鏄剧ず涓婁紶鍔ㄧ敾
+ this.quillUpdateImg = true;
+ // const res1 = await uploadImage()
+ // console.log(res1,'=====');
+ // this.$emit('before',res, file)
+ console.log(res);
+ console.log(file);
+ },
+ // 涓婁紶word鎴愬姛
+ uploadEditorSuccessword(res, file) {
+ console.log("涓婁紶word鏂囦欢鎴愬姛");
+ console.log(res, file, "word");
+ let fileurl = res.url.replace(this.newPattern, this.oldPattern);
+ axios
+ .get(fileurl)
+ .then((response) => {
+ console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
+ this.$nextTick(() => {
+ this.content = response.data;
+ });
+ this.fileName = this.getFileNameFromPath(response.url);
+ console.log(this.fileName, "this.fileName");
+ })
+ .catch((error) => {
+ console.error("Failed to fetch file:", error);
+ });
+ },
+ Getmissioncontent(url) {
+ axios
+ .get(url)
+ .then((response) => {
+ console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
+ this.content = response.data;
+ this.fileName = this.getFileNameFromPath(response.url);
+ console.log(this.fileName, "this.fileName");
+ })
+ .catch((error) => {
+ console.error("Failed to fetch file:", error);
+ });
+ },
+ // 澶勭悊url
+ },
+};
+</script>
+<style src="@wangeditor/editor/dist/css/style.css"></style>
+<style src="@/assets/styles/global.css"></style>
+<style lang="scss" scoped>
+.sidecolumn {
+ // width: 300px;
+ // min-height: 100vh;
+ // text-align: center;
+ // display: flex;
+ // margin-top: 20px;
+ margin: 20px;
+ margin-bottom: 0;
+ padding: 20px;
+ 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);
+}
+
+.leftvlue {
+ // display: flex;
+ // flex: 1;
+ 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;
+ }
+
+ .leftvlue-jbxx {
+ font-size: 24px;
+ height: 30px;
+ border-left: 3px solid #41a1be;
+ padding-left: 3px;
+
+ span {
+ position: absolute;
+ right: 80px;
+ }
+ }
+
+ .demo-cascader {
+ margin-right: 20px;
+ }
+
+ .PreviewTemplate {
+ color: #02a7f0;
+ cursor: pointer;
+ font-size: 20px;
+ margin: 0 20px;
+ }
+}
+
+.xinz-inf {
+ font-size: 18px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ line-height: 48px;
+
+ .el-tag + .el-tag {
+ margin-left: 10px;
+ }
+
+ .button-new-tag {
+ margin-left: 10px;
+ height: 32px;
+ line-height: 30px;
+ padding-top: 0;
+ padding-bottom: 0;
+ }
+
+ .input-new-tag {
+ width: 90px;
+ margin-left: 10px;
+ vertical-align: bottom;
+ }
+}
+
+.preview-left {
+ margin: 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);
+
+ .topic-dev {
+ margin-bottom: 25px;
+ font-size: 20px !important;
+
+ .dev-text {
+ margin-bottom: 10px;
+ }
+ }
+}
+
+.addtopic {
+ margin-top: 30px;
+}
+
+.presentation {
+ margin: 20px 0;
+ display: flex;
+
+ .presentation-left {
+ width: 50%;
+ height: 500px;
+
+ .button-textxg {
+ color: #024df0;
+ }
+
+ .button-textsc {
+ color: #f52727;
+ }
+ }
+
+ .presentation-right {
+ width: 50%;
+ height: 500px;
+ padding: 20px;
+ font-size: 18px;
+ border: 1px solid #909091;
+
+ span {
+ padding: 0 35px;
+ margin-right: 10px;
+ border-bottom: 1px solid #909091;
+ }
+
+ .headline {
+ font-size: 20px;
+ border-left: 3px solid #41a1be;
+ padding-left: 5px;
+ margin: 15px 0;
+ }
+ }
+}
+
+::v-deep .addtopic-input {
+ input {
+ background: #02a7f0;
+ color: #edf1f7;
+ width: 150px;
+ }
+}
+
+::v-deep.el-step.is-vertical .el-step__title {
+ font-size: 25px;
+}
+
+::v-deep.el-input--medium {
+ font-size: 18px !important;
+}
+
+::v-deep.ruleFormaa.el-select {
+ display: inline-block;
+ position: relative;
+ width: 700px;
+}
+
+.el-select__tags {
+ font-size: 20px;
+ max-width: 888px !important;
+}
+
+::v-deep.el-radio__inner {
+ width: 22px;
+ height: 22px;
+}
+
+// ::v-deep.topic-dev.el-radio__label {
+// font-size: 24px;
+// }
+::v-deep.el-radio-group {
+ span {
+ font-size: 24px;
+ }
+}
+
+::v-deep.el-checkbox-group {
+ span {
+ font-size: 24px;
+ }
+}
+</style>
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index 59ebeef..f5c3f3f 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
@@ -273,78 +284,23 @@
</el-col>
</el-row>
- <div>
- <el-form
- :model="ruleForm"
- :rules="rules"
- ref="ruleForm"
- label-width="100px"
- class="demo-ruleForm"
- >
- <!-- <el-row :gutter="20">
- <el-col :span="12">
- <el-form-item label="璧勬枡褰㈠紡" prop="region">
- <el-select
- v-model="ruleForm.shape"
- placeholder="璇烽�夋嫨鍐呭褰㈠紡"
- >
- <el-option
- v-for="item in xjxsoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12"> -->
-
- <!-- </el-col>
- </el-row> -->
- </el-form>
- </div>
- <!-- <div>
- <div id="quillEditorQiniu">
- <el-upload
- class="avatar-uploader"
- :action="uploadImgUrl"
- :accept="'image/*,video/*'"
- :show-file-list="false"
- :on-success="uploadEditorSuccess"
- :on-error="uploadEditorError"
- :before-upload="beforeEditorUpload"
- :headers="headers"
- >
- </el-upload>
- <quill-editor
- class="editor"
- v-model="content"
- ref="customQuillEditor"
- :options="editorOption"
- @blur="onEditorBlur"
- @focus="onEditorFocus"
- @change="onEditorChange"
- >
- </quill-editor>
- </div>
- </div> -->
- <!-- 鏂扮粍浠� -->
+ <!-- WangEditor 瀵屾枃鏈紪杈戝櫒 -->
<div style="border: 1px solid #ccc; margin: 10px">
<Toolbar
style="border-bottom: 1px solid #ccc"
- :editor="editor"
+ :editor="editorRef"
:defaultConfig="toolbarConfig"
- :mode="modes"
+ :mode="mode"
/>
<Editor
- style="height: 500px; overflow-y: hidden"
- v-model="content"
+ style="height: 800px; overflow-y: hidden"
+ v-model:html="content"
:defaultConfig="editorConfig"
- :mode="modes"
- @onCreated="onCreated"
+ :mode="mode"
+ @onCreated="handleEditorCreated"
/>
</div>
+
<div>
<el-button @click="laststep('ruleForm')">涓婁竴姝�</el-button>
<el-button type="success" @click="Departmenttreatment('ruleForm')"
@@ -369,201 +325,146 @@
</template>
<script>
-import { quillEditor } from "vue-quill-editor";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
+import "@wangeditor/editor/dist/css/style.css";
import axios from "axios";
+import { getToken } from "@/utils/auth";
import {
getheLibraryAssort,
- delheLibraryAssort,
- addheLibraryAssort,
addtargetillness,
- getlibrarylist,
- dellibraryinfo,
- deltargetillness,
compilelibrary,
addrichText,
getlibraryinfo,
getillnesslist,
- illnesslistget,
getillness,
} from "@/api/AiCentre/index";
-import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
-
+import OptionalForm from "@/components/OptionalForm";
import { listDept } from "@/api/system/dept";
-// import * as Quill from "quill";
-import Quill from "quill";
import { listtag } from "@/api/system/label";
import store from "@/store";
-
-// 杩欓噷寮曞叆淇敼杩囩殑video妯″潡骞舵敞鍐�
-import Video from "./video";
-Quill.register(Video, true);
-//鑾峰彇鐧诲綍token锛屽紩鍏ユ枃浠讹紝濡傛灉鍙槸绠�鍗曟祴璇曪紝娌℃湁涓婁紶鏂囦欢鏄惁鐧诲綍鐨勯檺鍒剁殑璇濓紝
-//杩欎釜token鍙互涓嶇敤鑾峰彇锛屾枃浠跺彲浠ヤ笉寮曞叆锛屾妸涓婇潰瀵瑰簲鐨勪笂浼犳枃浠舵惡甯﹁姹傚ご :headers="headers" 杩欎釜浠g爜鍒犳帀鍗冲彲
-import { getToken } from "@/utils/auth";
-const toolbarOptions = [
- ["bold", "italic", "underline", "strike"], // toggled buttons
- ["blockquote", "code-block"],
-
- [{ header: 1 }, { header: 2 }], // custom button values
- [{ list: "ordered" }, { list: "bullet" }],
- [{ script: "sub" }, { script: "super" }], // superscript/subscript
- [{ indent: "-1" }, { indent: "+1" }], // outdent/indent
- [{ direction: "rtl" }], // text direction
-
- [{ size: ["small", false, "large", "huge"] }], // custom dropdown
- [{ header: [1, 2, 3, 4, 5, 6, false] }],
-
- [{ color: [] }, { background: [] }], // dropdown with defaults from theme
- [{ font: [] }],
- [{ align: [] }],
- ["link", "image", "video"],
- ["clean"], // remove formatting button
-];
export default {
name: "aEducationinfo",
components: { OptionalForm, Editor, Toolbar },
data() {
return {
- editor: null,
- content: "<p>hello</p>",
- toolbarConfig: {},
- editorConfig: {
- placeholder: "璇疯緭鍏ュ唴瀹�...",
- menus: [
- "head",
- "bold",
- "italic",
- "underline",
- "image",
- "link",
- "list",
- "undo",
- "redo",
- "file", // 娣诲姞鑷畾涔夋枃浠朵笂浼犺彍鍗�
+ // 缂栬緫鍣ㄥ疄渚�
+ editorRef: null,
+
+ // 缂栬緫鍣ㄥ唴瀹�
+ content: "<p>娴嬭瘯</p>",
+
+ // 缂栬緫鍣ㄦā寮�
+ mode: "default",
+ fileList: [],
+ // 宸ュ叿鏍忛厤缃�
+ toolbarConfig: {
+ excludeKeys: [
+ "group-video",
+ "insertVideo",
+ "uploadVideo",
+ "emotion",
+ "codeBlock",
],
- uploadImgServer: process.env.VUE_APP_BASE_API + "/common/uploadSort", // 鍥剧墖涓婁紶鎺ュ彛
- uploadImgHeaders: {
- Authorization: "Bearer " + getToken(),
- }, // 鑷畾涔変笂浼犵殑 headers
- uploadImgParams: { key: "value" }, // 鑷畾涔変笂浼犵殑鍙傛暟
- uploadImgMaxSize: 2 * 1024 * 1024, // 鍥剧墖鏈�澶уぇ灏忥紝鍗曚綅 Byte
- uploadImgMaxLength: 1, // 涓�娆℃渶澶氫笂浼犲浘鐗囨暟閲�
- uploadImgTimeout: 3 * 60 * 1000, // 瓒呮椂鏃堕棿锛屽崟浣� ms
- uploadImgHooks: {
- customInsert: (insertImgFn, result) => {
- const url = result.url; // 鑾峰彇鍥剧墖鍦板潃
- insertImgFn(url); // 鎻掑叆鍥剧墖
- },
- },
- customMenus: {
- file: {
- tip: "涓婁紶鏂囦欢",
- click: (editor) => {
- const input = document.createElement("input");
- input.type = "file";
- input.accept =
- "application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"; // 鏀寔鐨勬枃浠剁被鍨�
- input.onchange = (e) => {
- const file = e.target.files[0];
- if (!file) return;
+ },
+
+ // 缂栬緫鍣ㄩ厤缃�
+ editorConfig: {
+ placeholder: "璇疯緭鍏ュ鏁欏唴瀹�...",
+ MENU_CONF: {
+ uploadImage: {
+ server: process.env.VUE_APP_BASE_API + "/common/uploadSort",
+ fieldName: "file",
+ maxFileSize: 2 * 1024 * 1024,
+ maxNumberOfFiles: 1,
+ allowedFileTypes: ["image/*"],
+ headers: {
+ Authorization: "Bearer " + getToken(),
+ },
+ customUpload: async (file, insertFn) => {
+ try {
const formData = new FormData();
formData.append("file", file);
- // 纭繚 process.env.VUE_APP_BASE_API 鏄纭殑
- const uploadUrl =
- process.env.VUE_APP_BASE_API + "/common/uploadSort";
- axios
- .post(uploadUrl, formData, {
+ const response = await axios.post(
+ process.env.VUE_APP_BASE_API + "/common/uploadSort",
+ formData,
+ {
headers: {
+ // "Content-Type": "multipart/form-data",
Authorization: "Bearer " + getToken(),
},
- })
- .then((res) => {
- const url = res.data.url; // 鑾峰彇鏂囦欢鍦板潃
- // 鎻掑叆鏂囦欢閾炬帴浣滀负鏅�氭枃鏈�
- editor.txt.append(url + " ");
- // 鎴栬�呮彃鍏ユ枃浠堕摼鎺ヤ綔涓鸿秴閾炬帴
- // editor.cmd.do('insertLink', { name: '鏂囦欢閾炬帴', url: url });
- })
- .catch((err) => {
- console.error("鏂囦欢涓婁紶澶辫触", err);
- });
- };
- input.click();
+ }
+ );
+
+ if (response.data && response.data.url) {
+ let imgUrl = response.data.url;
+ // imgUrl = imgUrl.replace(
+ // "http://218.108.11.22:8093/profile-api/upload",
+ // "http://192.88.117.236:8090/prod-api/profile/upload"
+ // );
+ imgUrl = imgUrl.replace(
+ "http://m.zjtongde.com:13871/prod-api/profile/upload",
+ "http://192.88.117.236:8090/prod-api/profile/upload"
+ );
+ insertFn(imgUrl);
+ }
+ } catch (error) {
+ console.error("鍥剧墖涓婁紶澶辫触", error);
+ this.$message.error("鍥剧墖涓婁紶澶辫触");
+ }
},
},
},
},
- modes: "default", // or 'simple'
+ // 涓婁紶閰嶇疆
headers: {
Authorization: "Bearer " + getToken(),
},
- uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/uploadSort",
uploadImgUrlword: process.env.VUE_APP_BASE_API + "/common/uploadShow",
- uploadUrlPath: "娌℃湁鏂囦欢涓婁紶",
- quillUpdateImg: false,
- fileList: [
- {
- name: "food.jpeg",
- url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
- },
- {
- name: "food2.jpeg",
- url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
- },
- ],
- content: `<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://218.108.11.22:8093/profile-api/upload/vadio/钀ュ吇娉垫搷浣滆鑼�.mp4"></video><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://218.108.11.22:8093/profile-api/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p>321</p>"`, //鏈�缁堜繚瀛樼殑鍐呭
- fileName: "", //鏂囦欢鍚�
+
+ // 椤甸潰鐘舵��
+ Editprogress: 1,
+ loading: false,
+
+ // 琛ㄥ崟鏁版嵁
+ ruleForm: {
+ campus: [],
+ heLibraryTagList: [],
+ tempDetpRelevances: [],
+ version: "1.0.1",
+ preachname: "",
+ preachcontent: "",
+ isAvailable: "",
+ suitway: [],
+ },
+
+ // 鍏朵粬鏁版嵁
dynamicTags: [],
+ sortlist: [],
+ courtyardlist: [],
+ illnesslist: [],
+ deptList: [],
+ tempDetpRelevanceslist: [],
+ variablelist: [
+ { variatename: "濮撳悕", variate: "${name}", default: 1 },
+ { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
+ { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
+ ],
+
+ props: {
+ multiple: true,
+ value: "deptId",
+ label: "deptName",
+ },
+ fileName: "", //鏂囦欢鍚�
inputVisible: false,
illnessVisible: false,
dialogVisiblepatient: false, //閫傜敤鐤剧梾绐楀彛
inputValue: "",
- // 瀵屾枃鏈�
- editorOption: {
- placeholder: "浣犳兂璇翠粈涔堬紵",
- modules: {
- imageResize: {
- displayStyles: {
- backgroundColor: "black",
- border: "none",
- color: "white",
- },
- modules: ["Resize", "DisplaySize", "Toolbar"],
- },
- toolbar: {
- container: toolbarOptions, // 宸ュ叿鏍�
- handlers: {
- image: function (value) {
- if (value) {
- document
- .querySelector("#quillEditorQiniu .avatar-uploader input")
- .click();
- } else {
- this.quill.format("image", false);
- }
- },
- video: function (value) {
- if (value) {
- document
- .querySelector("#quillEditorQiniu .avatar-uploader input")
- .click();
- } else {
- this.quill.format("video", false);
- }
- },
- },
- },
- },
- },
-
sidecolumnrabs: "left", //鏂瑰悜
- Editprogress: 1, //缂栬緫杩涘害
currentVersion: "1.2.3", //褰撳墠鐗堟湰
- loading: false, // 閬僵灞�
drawer: false, //鎺у埗灞曞紑
radio: "false", //鍗曢�夐閫変腑
radios: [], //澶氶�夐閫変腑
@@ -572,34 +473,24 @@
total: 1,
hetype: "",
id: null,
- ruleForm: {
- campus: [],
- heLibraryTagList: [],
- tempDetpRelevances: [],
- version: "1.0.1",
- },
rules: {},
rulesa: {},
mode: [],
editableTabs: [],
- sortlist: [],
usable: [],
- courtyardlist: [],
precedencetype: [],
optionsillness: [],
illnesslistapi: [],
- illnesslist: [],
options: [],
optionstag: [],
- deptList: [],
- tempDetpRelevanceslist: [],
- props: { multiple: true, value: "deptId", label: "deptName" },
// 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
- oldPattern: "http://192.168.191.181:8095/profile/upload",
+ // oldPattern: "http://192.168.191.181:8095/profile/upload",
+ oldPattern: "http://192.88.117.236:8090/prod-api/profile/upload",
// 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
- oldPatternhtml: "/http:\/\/192\.168\.191\.181:8095\/profile\/upload\//g",
+ oldPatternhtml: "/http:\/\/192\.88\.117\.236:8095\/profile\/upload\//g",
// 澶栫綉閮ㄥ垎锛堟枃浠讹級
- newPattern: "http://218.108.11.22:8093/profile-api/upload",
+ // newPattern: "http://218.108.11.22:8093/profile-api/upload",銆併�佹柊鍗�
+ newPattern: "http://m.zjtongde.com:13871/prod-api/profile/upload",
xjxsoptions: [
{
@@ -624,11 +515,6 @@
],
addvalue: "娣诲姞棰樼洰",
- variablelist: [
- { variatename: "濮撳悕", variate: "${name}", default: 1 },
- { variatename: "鐢佃瘽", variate: "${phone}", default: 1 },
- { variatename: "鐥呮儏", variate: "${illness}", default: 1 },
- ],
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
@@ -655,10 +541,14 @@
this.courtyardlist = store.getters.courtyardlist;
},
watch: {
- content(newVal, oldVal) {
- //this.$emit('input', newVal);
- console.log(newVal, "A");
- console.log(oldVal, "B");
+ // content(newVal, oldVal) {
+ // //this.$emit('input', newVal);
+ // console.log(newVal, "A");
+ // console.log(oldVal, "B");
+ // },
+ content(newVal) {
+ // 鍐呭鍙樺寲鏃惰Е鍙戯紝鍙互鍦ㄨ繖閲屽鐞嗚嚜鍔ㄤ繚瀛樼瓑閫昏緫
+ this.$emit("content-change", newVal);
},
},
beforeDestroy() {
@@ -666,11 +556,42 @@
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) {
+ this.editorRef = editor;
+ console.log("缂栬緫鍣ㄥ凡鍒涘缓", editor);
+ },
+ // 閿�姣佺紪杈戝櫒
+ destroyEditor() {
+ if (this.editorRef) {
+ this.editorRef.destroy();
+ this.editorRef = null;
+ }
+ },
+
+ // 鑾峰彇鍐呭HTML
+ getEditorContent() {
+ return this.content;
+ },
// ---------------------------------
processElement(element) {
return { ...element, isoperation: null };
@@ -715,7 +636,7 @@
// ------------------
// let html =
- // '<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/钀ュ吇娉典粙缁�.mp4"></video><p>娴嬭瘯111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p><br></p>';
+ // '<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/钀ュ吇娉典粙缁�.mp4"></video><p>娴嬭瘯111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p><br></p>';
// // html = html.parserdom(this.oldPattern, this.newPattern);
// html = this.parserdom(html);
// console.log(html, "html");
@@ -730,17 +651,27 @@
var doc = parser.parseFromString(html, "text/html");
// 瀹氫箟瑕佹浛鎹㈢殑鏂版棫URL
- var oldUrlBase = "http://192.168.191.181:8095/profile/upload";
- var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
+ var oldUrlBase = this.oldPattern;
+ // var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
+ var newUrlBase = this.newPattern;
// 鑾峰彇鎵�鏈夌殑video鍏冪礌
var videos = doc.querySelectorAll("video");
+ var images = doc.querySelectorAll("img");
// 閬嶅巻鎵�鏈夌殑video鍏冪礌骞舵浛鎹rc灞炴��
videos.forEach(function (video) {
var src = video.getAttribute("src");
if (src.startsWith(oldUrlBase)) {
video.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
+ }
+ });
+ console.log(images,'images');
+
+ images.forEach(function (img) {
+ var src = img.getAttribute("src");
+ if (src.startsWith(oldUrlBase)) {
+ img.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
}
});
@@ -770,6 +701,10 @@
fileName: this.generateRandomHtmlFilename(),
}).then((res) => {
this.ruleForm.richText = res.msg;
+ this.ruleForm.richText = res.msg.replace(
+ this.oldPattern,
+ this.newPattern
+ );
console.log(this.ruleForm.richText, "this.ruleForm.richText");
// 澶勭悊鍐呯綉html
addrichText({
@@ -1110,25 +1045,41 @@
console.error("Failed to fetch file:", error);
});
},
+ // Getmissioncontent(url) {
+ // axios
+ // .get(url)
+ // .then((response) => {
+ // console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
+ // this.content = response.data;
+ // this.fileName = this.getFileNameFromPath(response.url);
+ // console.log(this.fileName, "this.fileName");
+ // })
+ // .catch((error) => {
+ // console.error("Failed to fetch file:", error);
+ // });
+ // },
+ // 鑾峰彇杩滅▼鍐呭
Getmissioncontent(url) {
axios
.get(url)
.then((response) => {
- console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
this.content = response.data;
- this.fileName = this.getFileNameFromPath(response.url);
- console.log(this.fileName, "this.fileName");
})
.catch((error) => {
- console.error("Failed to fetch file:", error);
+ console.error("鑾峰彇鍐呭澶辫触:", error);
});
},
// 澶勭悊url
+ },
+ // 鐢熷懡鍛ㄦ湡閽╁瓙
+ beforeUnmount() {
+ this.destroyEditor();
},
};
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>
<style src="@/assets/styles/global.css"></style>
+<style src="@wangeditor/editor/dist/css/style.css"></style>
<style lang="scss" scoped>
.sidecolumn {
// width: 300px;
diff --git a/src/views/knowledge/education/index.vue b/src/views/knowledge/education/index.vue
index 8643427..6fa0afc 100644
--- a/src/views/knowledge/education/index.vue
+++ b/src/views/knowledge/education/index.vue
@@ -5,7 +5,7 @@
<div class="sidecolumn">
<div class="sidecolumn-top">
<div class="top-wj">瀹f暀绫诲瀷</div>
- <div class="top-tj" @click="dialogFormVisible = true">+娣诲姞绫诲埆</div>
+ <div class="top-tj" @click="Newcategory">+娣诲姞绫诲埆</div>
</div>
<div class="center-ss">
<el-input
@@ -596,6 +596,7 @@
queryParams: {
pageNum: 1,
pageSize: 10,
+ hetype:1,
isavailable: "",
},
};
@@ -784,6 +785,13 @@
query: { id: row.id },
});
},
+ Newcategory(){
+ this.classifyform= {}, //绫诲埆琛ㄥ崟
+ this.radio = "涓诲垎绫�";
+ this.dialogFormVisible = true
+ this.zifon = true;
+ this.zufon = true;
+ },
// 鏌ョ湅瀹f暀
Vieweducation(row) {
this.htmlRichText = null;
@@ -793,7 +801,9 @@
.then((response) => {
console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
this.htmlRichText = response.data;
- this.htmlRichText = this.addStyleToImages(this.htmlRichText);
+ // this.htmlRichText = this.addStyleToImages(this.htmlRichText);
+ console.log(this.htmlRichText);
+
})
.catch((error) => {
this.$modal.msgError("鑾峰彇瀵屾枃鏈け璐�");
@@ -856,7 +866,7 @@
},
// 鏌ヨ鏍�
getDeptTree() {
- getheLibraryAssort({}).then((res) => {
+ getheLibraryAssort({ hetype: 2 }).then((res) => {
this.deptOptions = res.rows;
this.dialogFormVisible = false;
});
@@ -931,8 +941,12 @@
this.dialogFormVisible = true;
if (!b.pid) {
this.radio = "涓诲垎绫�";
+ this.title = "淇敼涓诲垎绫�";
+ this.zufon = false;
} else {
this.radio = "瀛愬垎绫�";
+ this.title = "淇敼瀛愬垎绫�";
+ this.zifon = false;
}
this.classifyform = b;
this.dialogFormVisible = true;
diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index 6e1f7e2..6e58ca1 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/src/views/knowledge/questionbank/particulars/index.vue
@@ -1092,10 +1092,10 @@
)
.then(() => {
console.log(row);
- this.topicobj.scriptTopic = row.targetname;
+ // this.topicobj.scriptTopic = row.targetname;
this.topicobj.valueType = row.valueType;
this.topicobj.scriptType = row.scriptType;
- this.topicobj.scriptContent = row.targetdesc;
+ // this.topicobj.scriptContent = row.targetdesc;
this.topicobj.targetid = row.id;
this.topicobj.targetname = row.targetname;
this.topicobj.svyLibScriptOptions = [];
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index 246989c..2923b51 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -550,6 +550,26 @@
placeholder="璇疯緭鍏ラ鍙�"
></el-input>
</el-form-item>
+
+ <el-form-item prop="valueType">
+ <template #label>
+ 缁撴灉绫诲瀷
+ <el-tooltip
+ class="item"
+ effect="light"
+ content="鏈被鍨嬩负缁撴灉鏀堕泦绫诲瀷锛涢�夐」鐢ㄤ簬鎸囧悜鎬ч鐩鏄惁绛夛紱鏂囨湰閫傜敤澶嶆潅鎯呭喌锛涙暟鍊肩敤浜庢敹闆嗘暟鍊煎瀷鏁版嵁"
+ placement="top-start"
+ >
+ <i class="el-icon-warning-outline"></i>
+ </el-tooltip>
+ <!-- 鍦ㄦ爣绛惧悗鎻掑叆绾㈣壊鏄熷彿 -->
+ </template>
+ <el-radio-group v-model="topicobj.valueType">
+ <el-radio :label="1">閫夐」</el-radio>
+ <el-radio :label="2">鏂囨湰</el-radio>
+ <el-radio :label="3">鏁板��</el-radio>
+ </el-radio-group>
+ </el-form-item>
</el-col>
</el-row>
@@ -651,19 +671,76 @@
</el-form-item>
</el-col>
</el-row>
+ <el-row>
+ <el-form-item label="鍏宠仈鏈嶅姟">
+ <div
+ v-if="item.sendTaskname"
+ class="service-tag-container"
+ >
+ <el-tag
+ type="success"
+ closable
+ @close="removeService(item)"
+ class="service-tag"
+ >
+ <i class="el-icon-connection service-icon"></i>
+ {{ item.sendTaskname }}
+ </el-tag>
+ </div>
+ <div v-else class="service-add-btn">
+ <el-button
+ type="success"
+ size="small"
+ icon="el-icon-plus"
+ @click="openServiceDialog(item)"
+ class="add-service-btn"
+ >
+ 閫夋嫨浠诲姟
+ </el-button>
+ </div>
+ </el-form-item>
+ </el-row>
<el-row :gutter="10">
- <el-form-item label="寮傚父鎻愰啋">
- <el-radio-group v-model="item.isabnormal">
- <el-radio :label="1">鏄�</el-radio>
- <el-radio :label="0">鍚�</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item label="鏄惁閫変腑鏀堕泦闄勫姞淇℃伅">
- <el-radio-group v-model="item.appendflag">
- <el-radio label="1">鏄�</el-radio>
- <el-radio label="0">鍚�</el-radio>
- </el-radio-group>
- </el-form-item>
+ <el-col :span="11">
+ <!-- 淇敼锛氬紓甯告彁閱掗儴鍒� -->
+ <el-form-item label="寮傚父鎻愰啋">
+ <el-select
+ v-model="item.isabnormal"
+ placeholder="璇烽�夋嫨鐘舵��"
+ >
+ <el-option
+ :value="0"
+ label="姝e父"
+ :style="{ color: '#67C23A' }"
+ >
+ <span style="color: #67c23a">鈼� 姝e父</span>
+ </el-option>
+
+ <el-option
+ :value="2"
+ label="璀﹀憡"
+ :style="{ color: '#FFBA00' }"
+ >
+ <span style="color: #FFBA00">鈼� 璀﹀憡</span>
+ </el-option>
+ <el-option
+ :value="1"
+ label="寮傚父"
+ :style="{ color: '#f75c5c' }"
+ >
+ <span style="color: #f75c5c">鈼� 寮傚父</span>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="11">
+ <el-form-item label="鏄惁閫変腑鏀堕泦闄勫姞淇℃伅">
+ <el-radio-group v-model="item.appendflag">
+ <el-radio label="1">鏄�</el-radio>
+ <el-radio label="0">鍚�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-col>
</el-row>
<el-row :gutter="10" v-if="topicobj.branchFlag == 1">
<el-col :span="20"
@@ -1234,6 +1311,144 @@
</el-tabs>
</div>
</el-drawer>
+ <!-- 閫夋嫨浠诲姟寮圭獥 -->
+ <el-dialog
+ title="閫夋嫨浠诲姟"
+ :visible.sync="serviceDialogVisible"
+ width="50%"
+ >
+ <div>
+ <el-form
+ :model="topqueryParams"
+ ref="queryForm"
+ size="small"
+ :inline="true"
+ label-width="98px"
+ >
+ <el-form-item label="浠诲姟鍚嶇О">
+ <el-input
+ v-model="topqueryParams.taskName"
+ @keyup.enter.native="handleQuery"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="浠诲姟绫诲瀷" prop="status">
+ <el-select
+ v-model="topqueryParams.serviceType"
+ placeholder="璇烽�夋嫨鏈嶅姟绫诲瀷"
+ >
+ <el-option
+ v-for="item in taskoptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ <el-table
+ :data="filteredServiceList"
+ v-loading="taskloading"
+ @selection-change="handleServiceSelectionChange"
+ >
+ <el-table-column type="selection" width="55"></el-table-column>
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ fixed
+ align="center"
+ key="taskName"
+ prop="taskName"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="浠诲姟鎻忚堪"
+ align="center"
+ key="taskDesc"
+ prop="taskDesc"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鏈嶅姟椤圭洰"
+ align="center"
+ key="templatename"
+ prop="templatename"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鎬讳换鍔�/宸查殢璁�"
+ align="center"
+ key="nickName"
+ width="120"
+ prop="nickName"
+ >
+ <template slot-scope="scope">
+ <span
+ >{{
+ scope.row.wfs || scope.row.wfs == 0
+ ? scope.row.wfs + scope.row.yfs
+ : ""
+ }}/{{ scope.row.yfs }}</span
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鏄惁闀挎湡浠诲姟"
+ align="center"
+ key="longTask"
+ prop="longTask"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.longTask ? "闀挎湡浠诲姟" : "闈為暱鏈�" }}</span>
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="鐘舵��"
+ align="center"
+ key="sendState"
+ prop="sendState"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="dict.type.task_status"
+ :value="scope.row.sendState"
+ />
+ </template>
+ </el-table-column>
+
+ <el-table-column
+ label="鍒涘缓浜�"
+ align="center"
+ key="createBy"
+ prop="createBy"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ sortable
+ align="center"
+ prop="createTime"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ v-show="tasktotal > 0"
+ :total="tasktotal"
+ :page.sync="topqueryParams.pageNum"
+ :limit.sync="topqueryParams.pageSize"
+ @pagination="gettaskList"
+ />
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="serviceDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="confirmServiceSelection"
+ >纭畾</el-button
+ >
+ </span>
+ </el-dialog>
<!-- 娣诲姞閫傜敤鐤剧梾绐楀彛 -->
<Optional-Form
ref="child"
@@ -1255,17 +1470,12 @@
depthospgetsonlist,
getQtemplateobj,
compileQtemplate,
- Qtemplateinfo,
- compileissue,
- delQtemplateinfo,
- Followupinfo,
- issueinfo,
getissuelist,
depthospgetsondel,
deltargetillness,
addtargetillness,
getillnesslist,
- illnesslistget,
+ getTasklist,
getillness,
} from "@/api/AiCentre/index";
import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
@@ -1274,7 +1484,7 @@
export default {
name: "Questionnaireinfo",
-
+ dicts: ["sys_normal_disable", "sys_user_sex", "task_status"],
components: { OptionalForm },
data() {
@@ -1297,8 +1507,39 @@
dialogVisiblepatient: false, //閫傜敤鐤剧梾绐楀彛
inputValue: "",
topicobj: {},
+ topqueryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ type: 3,
+ },
+ tasktotal: 0,
+ taskloading: false,
+ taskoptions: [
+ {
+ value: 4,
+ label: "瀹f暀鍏虫��",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ {
+ value: 5,
+ label: "澶嶈瘖閫氱煡",
+ raw: {
+ cssClass: "",
+ listClass: "",
+ },
+ },
+ ],
// 鎬绘潯鏁�
total: 1,
+ serviceDialogVisible: false, // 閫夋嫨浠诲姟寮圭獥鏄剧ず鎺у埗
+ serviceSearch: "", // 浠诲姟鎼滅储鍏抽敭璇�
+ serviceList: [], // 浠诲姟鍒楄〃
+ filteredServiceList: [],
+ selectedService: null, // 閫変腑鐨勪换鍔�
+ currentOptionItem: null, // 褰撳墠姝e湪璁剧疆鐨勪换鍔¢�夐」椤�
ruleForm: {
svyTemplateLibScripts: [],
tempDetpRelevances: [],
@@ -1747,6 +1988,62 @@
});
}
},
+ // ---------------閫夐」浠诲姟缁戝畾
+ openServiceDialog(item) {
+ this.gettaskList();
+ this.currentOptionItem = item;
+ },
+ gettaskList() {
+ getTasklist(this.topqueryParams).then((response) => {
+ this.filteredServiceList = response.rows;
+ this.tasktotal = response.total;
+ this.serviceDialogVisible = true;
+ this.$forceUpdate();
+ this.taskloading = false;
+ });
+ },
+ handleQuery() {
+ this.topqueryParams.pageNum = 1;
+ this.gettaskList();
+ },
+ // 鏂板鏂规硶锛氬姞杞戒换鍔″垪琛�
+ loadServiceList() {
+ // 杩欓噷璋冪敤API鑾峰彇浠诲姟鍒楄〃
+ // 绀轰緥鏁版嵁锛屽疄闄呬娇鐢ㄦ椂闇�瑕佽皟鐢ㄧ浉搴旂殑API
+ this.serviceList = [
+ { id: 1, taskName: "闅忚浠诲姟1", taskType: "甯歌闅忚" },
+ { id: 2, taskName: "鍋ュ悍璇勪及浠诲姟", taskType: "鍋ュ悍璇勪及" },
+ { id: 3, taskName: "鐢ㄨ嵂鎻愰啋浠诲姟", taskType: "鐢ㄨ嵂绠$悊" },
+ ];
+ },
+
+ // 鏂板鏂规硶锛氬鐞嗕换鍔¢�夋嫨鍙樺寲
+ handleServiceSelectionChange(selection) {
+ this.selectedService = selection.length > 0 ? selection[0] : null;
+ },
+
+ // 鏂板鏂规硶锛氱‘璁ら�夋嫨浠诲姟
+ confirmServiceSelection() {
+ console.log(this.selectedService);
+ console.log(this.currentOptionItem);
+
+ if (this.selectedService && this.currentOptionItem) {
+ this.currentOptionItem.sendTaskname = this.selectedService.taskName;
+ this.currentOptionItem.sendTaskid = this.selectedService.taskid;
+ this.serviceDialogVisible = false;
+ this.serviceSearch = "";
+ this.selectedService = null;
+ } else {
+ this.$message.warning("璇烽�夋嫨涓�涓换鍔�");
+ }
+ },
+
+ // 鏂板鏂规硶锛氱Щ闄ゅ叧鑱旀湇鍔�
+ removeService(item) {
+ item.sendTaskname = "";
+ item.sendTaskid = "";
+ },
+ // ------------------------
// 涓嬩竴姝�
nextstep() {
if (this.Editprogress <= 2) {
@@ -1787,7 +2084,9 @@
},
// 鏂板闂
addtopic(row) {
+ console.log(row);
row.isoperation = 1;
+ row.scriptid = row.id;
row.svyLibScriptOptions.forEach((item) => {
item.isoperation = 1;
});
@@ -2397,7 +2696,10 @@
display: flex;
.presentation-left {
width: 45%;
- // height: 500px;
+ max-height: 80vh;
+ padding: 0 20px;
+ font-size: 18px;
+ overflow: auto;
.button-textxg {
color: #024df0;
}
@@ -2417,7 +2719,7 @@
}
.presentation-right {
width: 55%;
- max-height: 688px;
+ max-height: 80vh;
padding: 0 20px;
font-size: 18px;
overflow: auto;
@@ -2447,6 +2749,135 @@
-webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
0 0 6px 0 rgba(0, 0, 0, 0.04);
}
+.service-tag-container {
+ display: inline-block;
+
+ .service-tag {
+ margin-right: 10px;
+ max-width: 220px;
+ height: 32px;
+ line-height: 30px;
+ padding: 0 12px;
+ border-radius: 16px;
+ font-size: 14px;
+ font-weight: 500;
+ border: 1px solid #e1f3d8;
+ background: linear-gradient(135deg, #f0f9eb, #e1f3d8);
+ box-shadow: 0 2px 4px rgba(103, 194, 58, 0.1);
+ transition: all 0.3s ease;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ position: relative;
+
+ &:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 4px 8px rgba(103, 194, 58, 0.15);
+ border-color: #b3e19d;
+ }
+
+ .service-icon {
+ margin-right: 4px;
+ font-size: 12px;
+ }
+
+ ::v-deep .el-icon-close {
+ margin-left: 6px;
+ font-size: 12px;
+ color: #67c23a;
+ background-color: #f0f9eb;
+ border-radius: 50%;
+ width: 16px;
+ height: 16px;
+ line-height: 16px;
+
+ &:hover {
+ background-color: #67c23a;
+ color: white;
+ }
+ }
+ }
+}
+
+.service-add-btn {
+ display: inline-block;
+
+ .add-service-btn {
+ height: 32px;
+ padding: 0 16px;
+ border-radius: 16px;
+ font-size: 14px;
+ font-weight: 500;
+ background: linear-gradient(135deg, #67c23a, #85ce61);
+ border: none;
+ box-shadow: 0 2px 4px rgba(103, 194, 58, 0.2);
+ transition: all 0.3s ease;
+
+ &:hover {
+ transform: translateY(-1px);
+ box-shadow: 0 4px 8px rgba(103, 194, 58, 0.3);
+ background: linear-gradient(135deg, #5daf34, #7ac252);
+ }
+
+ &:active {
+ transform: translateY(0);
+ box-shadow: 0 2px 4px rgba(103, 194, 58, 0.2);
+ }
+
+ i {
+ margin-right: 4px;
+ font-size: 12px;
+ }
+ }
+}
+
+// 鍝嶅簲寮忚璁�
+@media (max-width: 768px) {
+ .service-tag-container .service-tag {
+ max-width: 180px;
+ font-size: 13px;
+ padding: 0 10px;
+ }
+
+ .service-add-btn .add-service-btn {
+ padding: 0 12px;
+ font-size: 13px;
+ }
+}
+
+// 娣诲姞鍔ㄧ敾鏁堟灉
+@keyframes tagFadeIn {
+ from {
+ opacity: 0;
+ transform: scale(0.8) translateY(-5px);
+ }
+ to {
+ opacity: 1;
+ transform: scale(1) translateY(0);
+ }
+}
+
+.service-tag {
+ animation: tagFadeIn 0.3s ease-out;
+}
+
+// 涓烘暣涓�夐」鍖哄煙娣诲姞缁熶竴鏍峰紡
+.topicxq {
+ .service-tag-container,
+ .service-add-btn {
+ margin: 8px 0;
+ }
+}
+
+// 纭繚鍦ㄨ〃鍗曚腑鐨勬纭竷灞�
+.el-form-item {
+ .el-form-item__content {
+ .service-tag-container,
+ .service-add-btn {
+ vertical-align: middle;
+ }
+ }
+}
.custom-width {
width: 100px; /* 璁剧疆瀹藉害鏍峰紡 */
}
diff --git a/src/views/knowledge/questionnaire/index.vue b/src/views/knowledge/questionnaire/index.vue
index 45a95e3..c9e9167 100644
--- a/src/views/knowledge/questionnaire/index.vue
+++ b/src/views/knowledge/questionnaire/index.vue
@@ -28,7 +28,7 @@
@node-click="handleNodeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
- <span>{{ node.label }}</span>
+ <span class="tree-node-label">{{ node.label }}</span>
<span v-if="data.id > 0">
<el-button
type="text"
@@ -141,7 +141,6 @@
icon="el-icon-plus"
size="medium"
@click="handleAdd"
-
>鏂板</el-button
>
</el-col>
@@ -816,11 +815,11 @@
this.classifyform = b;
this.dialogFormVisible = true;
},
- Newcategory(){
- this.classifyform= {}, //绫诲埆琛ㄥ崟
- this.radio = "涓诲垎绫�";
- this.dialogFormVisible = true
- this.zifon = true;
+ Newcategory() {
+ (this.classifyform = {}), //绫诲埆琛ㄥ崟
+ (this.radio = "涓诲垎绫�");
+ this.dialogFormVisible = true;
+ this.zifon = true;
this.zufon = true;
},
@@ -896,7 +895,7 @@
display: flex;
}
.sidecolumn {
- width: 400px;
+ width: 380px;
min-height: 100vh;
text-align: center;
// display: flex;
@@ -920,6 +919,22 @@
cursor: pointer;
}
}
+ /* 鏍稿績锛氳缃浐瀹氬搴︼紝瓒呭嚭閮ㄥ垎鏄剧ず鐪佺暐鍙� */
+ .tree-node-label {
+ display: inline-block; /* 闇�瑕佽缃负琛屽唴鍧楃骇鍏冪礌鎵嶈兘璁剧疆瀹藉害 */
+ max-width: 160px; /* 鏈�澶у搴� */
+ overflow: hidden;
+ white-space: nowrap; /* 涓嶆崲琛� */
+ text-overflow: ellipsis; /* 鏄剧ず鐪佺暐鍙� */
+ vertical-align: bottom; /* 鍙�夌殑锛岀敤浜庡榻� */
+ }
+
+ /* 鍙�夛細榧犳爣鎮仠鏃跺彇娑堥檺鍒讹紝鏄剧ず鍏ㄦ枃锛堝彲鑳戒細鎾戝紑甯冨眬锛� */
+ .custom-tree-node:hover .tree-node-label {
+ max-width: none;
+ white-space: normal;
+ overflow: visible;
+ }
.center-ss {
margin-top: 30px;
.input-with-select {
diff --git a/src/views/login.vue b/src/views/login.vue
index e7f61cb..0f19503 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -41,7 +41,6 @@
<el-select style="width: 100%;" v-model="loginForm.orgid" placeholder="璇烽�夋嫨闄㈠尯">
<el-option
v-for="item in options"
- :key="item.value"
:label="item.label"
:value="item.value"
>
@@ -101,6 +100,7 @@
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt";
+import { getorganization } from "@/api/AiCentre/index";
export default {
name: "Login",
@@ -115,14 +115,7 @@
orgid:'1',
},
options: [
- { value: "47255004333112711A1001", label: "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�" },
- { value: "47231022633110211A2101", label: "涓芥按甯備腑鍖婚櫌" },
- { value: "47246102433112211A2101", label: "缂欎簯鍘夸腑鍖诲尰闄� " },
- { value: "47240018433118111A2101", label: "榫欐硥甯備腑鍖诲尰闄� " },
- { value: "47240004533118111A1001", label: "榫欐硥甯備汉姘戝尰闄� " },
- { value: "47243006833112611A2101", label: "搴嗗厓鍘夸腑鍖诲尰闄� " },
- { value: "47234002X33112111A2101", label: "闈掔敯鍘夸腑鍖诲尰闄� " },
- ],
+ ],
loginRules: {
username: [
{ required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" },
@@ -149,6 +142,7 @@
},
},
created() {
+ this.getorganization();
this.getCode();
this.getCookie();
// if (localStorage.getItem('orgid')) {
@@ -158,12 +152,21 @@
methods: {
getCode() {
getCodeImg().then((res) => {
- console.log(res);
this.captchaEnabled =
res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
+ }
+ });
+ },
+ getorganization() {
+ getorganization().then((res) => {
+ if (res.code == 200) {
+ this.options = res.rows.map((item) => ({
+ value: item.orgid,
+ label: item.organizationName,
+ }));
}
});
},
@@ -199,10 +202,12 @@
this.$store
.dispatch("Login", this.loginForm)
.then((res) => {
- if (this.loginForm.username=='admin') {
- this.$router.push({ path:"/index" }).catch(() => {});
- }else{
- this.$router.push({ path:"/followvisit/discharge" }).catch(() => {});
+ if (this.loginForm.username == "admin") {
+ this.$router.push({ path: "/index" }).catch(() => {});
+ } else {
+ this.$router
+ .push({ path: "/followvisit/discharge" })
+ .catch(() => {});
}
})
.catch(() => {
diff --git a/src/views/loginSSO.vue b/src/views/loginSSO.vue
new file mode 100644
index 0000000..6cd082c
--- /dev/null
+++ b/src/views/loginSSO.vue
@@ -0,0 +1,160 @@
+<template>
+ <div class="sso-redirect">
+ <div class="loading-container">
+ <el-alert
+ v-if="errorMessage"
+ :title="errorMessage"
+ type="error"
+ :closable="false"
+ show-icon
+ ></el-alert>
+ <div v-else class="loading-content">
+ <i class="el-icon-loading"></i>
+ <p>鍗曠偣鐧诲綍涓紝璇风◢鍊�...</p>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { setToken } from "@/utils/auth";
+
+export default {
+ name: "SSORedirect",
+ data() {
+ return {
+ errorMessage: "",
+ loading: true,
+ };
+ },
+ created() {
+ this.handleSSORedirect();
+ },
+ methods: {
+ // 鍖归厤orgid
+ mateOrgid(orgid) {
+ if (orgid == "30001002") {
+ localStorage.setItem("orgname", "娴欐睙鐪佺珛鍚屽痉鍖婚櫌缈犺嫅闄㈠尯");
+ localStorage.setItem("ZuHuID", "1400361376454545408");
+ localStorage.setItem("deptCode", "1017");
+ } else if (orgid == "30001003") {
+ localStorage.setItem("orgname", "娴欐睙鐪佺珛鍚屽痉鍖婚櫌涔嬫睙闄㈠尯");
+ localStorage.setItem("ZuHuID", "1400360867068907520");
+ localStorage.setItem("deptCode", "01040201");
+ } else if (orgid == "30001004") {
+ localStorage.setItem("orgname", "娴欐睙鐪佺珛鍚屽痉鍖婚櫌闂叉灄闄㈠尯");
+ localStorage.setItem("ZuHuID", "1429338802177000002");
+ localStorage.setItem("deptCode", "");
+ } else if (orgid == "30001005") {
+ localStorage.setItem("orgname", "娴欐睙鐪佺珛鍚屽痉鍖婚櫌澶╃洰灞辫矾闄㈠尯");
+ localStorage.setItem("ZuHuID", "1429338802177000003");
+ localStorage.setItem("deptCode", "");
+ } else if (orgid == "30001006") {
+ localStorage.setItem("orgname", "娴欐睙鐪佺珛鍚屽痉鍖婚櫌闈掑北婀栭櫌鍖�");
+ localStorage.setItem("ZuHuID", "1429338802177000004");
+ localStorage.setItem("deptCode", "");
+ } else if (orgid == "30001007") {
+ localStorage.setItem("orgname", "娴嬭瘯闄㈠尯");
+ localStorage.setItem("ZuHuID", "1429338802177000005");
+ localStorage.setItem("deptCode", "");
+ }
+ },
+ async handleSSORedirect() {
+ try {
+ console.log(11);
+ // 浠嶶RL鍙傛暟涓幏鍙杢oken鍜屾満鏋勪俊鎭�
+ let { token, orgid, orgname, ZuHuID, deptCode } = this.$route.query;
+ // token =
+ // "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijc5MWVkODNlLWE2MWYtNDI2MS05ZDZlLTNhOTVjYTU2YjZhMiJ9.q6jrRj8fwtb3FOqqwaxIFDr824hf85DW8heCj4qWYgRE55Pn0vkmcujFsYMrz9qqo047Gl7lv3rnok8pk7SKYQ"; // 楠岃瘉蹇呰鍙傛暟
+ // orgid = "30001002";
+ if (!token) {
+ throw new Error("缂哄皯璁よ瘉浠ょ墝(token)");
+ }
+ console.log(token);
+ console.log(orgid);
+ console.log(orgname);
+ // console.log(redirect,'redirect');
+
+ this.mateOrgid(orgid);
+ setToken(token);
+ this.$store.commit("SET_TOKEN", token);
+
+ // 瀛樺偍鏈烘瀯淇℃伅鍒發ocalStorage
+ if (orgid) {
+ localStorage.setItem("orgid", orgid);
+ this.$store.dispatch("UpdateOrgId", orgid);
+ }
+ if (orgname) localStorage.setItem("orgname", orgname);
+ if (ZuHuID) localStorage.setItem("ZuHuID", ZuHuID);
+ if (deptCode) localStorage.setItem("deptCode", deptCode);
+
+ // 鑾峰彇鐢ㄦ埛淇℃伅
+ await this.$store.dispatch("GetInfo");
+
+ // 纭畾閲嶅畾鍚戣矾寰�
+ let redirectPath = "/index";
+ // if (redirect) {
+ // console.log(redirect,'888');
+
+ // redirectPath = decodeURIComponent(redirect);
+ // } else {
+ // 鏍规嵁鐢ㄦ埛瑙掕壊鍐冲畾榛樿璺宠浆椤甸潰
+ const roles = this.$store.state.user.roles;
+ const username = this.$store.state.user.name;
+
+ if (roles.includes("admin") || username === "admin") {
+ redirectPath = "/index";
+ } else {
+ redirectPath = "/followvisit/discharge";
+ }
+ // }
+
+ // 璺宠浆鍒扮洰鏍囬〉闈�
+ this.$router.replace({ path: redirectPath });
+ } catch (error) {
+ console.error("SSO鐧诲綍澶辫触:", error);
+ this.errorMessage = `鍗曠偣鐧诲綍澶辫触: ${error.message || "鏈煡閿欒"}`;
+ this.loading = false;
+
+ // 5绉掑悗璺宠浆鍒版櫘閫氱櫥褰曢〉
+ setTimeout(() => {
+ this.$router.replace("/login");
+ }, 5000);
+ }
+ },
+ },
+};
+</script>
+
+<style scoped>
+.sso-redirect {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ background-color: #f5f7fa;
+}
+
+.loading-container {
+ text-align: center;
+ padding: 20px;
+ background: white;
+ border-radius: 4px;
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+}
+
+.loading-content {
+ padding: 20px;
+}
+
+.el-icon-loading {
+ font-size: 40px;
+ color: #409eff;
+ margin-bottom: 10px;
+}
+
+p {
+ margin: 0;
+ color: #606266;
+}
+</style>
diff --git a/src/views/outsideChainnew.vue b/src/views/outsideChainnew.vue
index f8738ed..b9e39b1 100644
--- a/src/views/outsideChainnew.vue
+++ b/src/views/outsideChainnew.vue
@@ -35,7 +35,7 @@
>
<el-radio
border
- v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
+ v-for="(items, index) in item.ivrTaskScriptTargetoptionList"
:class="
items.isabnormal && item.questionResult == items.targetvalue
? 'red-star'
@@ -68,7 +68,7 @@
<el-checkbox
border
@change="$forceUpdate()"
- v-for="(items, indexs) in item.ivrLibaScriptTargetoptionList"
+ v-for="(items, indexs) in item.ivrTaskScriptTargetoptionList"
:key="indexs"
:label="items.targetvalue"
>
@@ -168,7 +168,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑骞撮緞鑼冨洿鏄紵",
// questionResult: null,
- // ivrLibaScriptTargetoptionList: [
+ // ivrTaskScriptTargetoptionList: [
// { targetvalue: "18-25", value: "18-25", isabnormal: true },
// { targetvalue: "26-35", value: "26-35" },
// { targetvalue: "36-45", value: "36-45" },
@@ -181,7 +181,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// questionResult: null,
- // ivrLibaScriptTargetoptionList: [
+ // ivrTaskScriptTargetoptionList: [
// { targetvalue: "瀛︾敓", value: "student" },
// { targetvalue: "鏁欏笀", value: "teacher" },
// { targetvalue: "宸ョ▼甯�", value: "engineer" },
@@ -194,7 +194,7 @@
// scriptType: 2,
// scriptContent: "鎮ㄦ劅鍏磋叮鐨勬椿鍔ㄦ湁鍝簺锛�",
// questionResult: [],
- // ivrLibaScriptTargetoptionList: [
+ // ivrTaskScriptTargetoptionList: [
// { targetvalue: "鏃呮父", value: "travel", isabnormal: true },
// { targetvalue: "闃呰", value: "reading", isabnormal: true },
// { targetvalue: "杩愬姩", value: "sports", isabnormal: true },
@@ -207,7 +207,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// questionResult: null,
- // ivrLibaScriptTargetoptionList: [
+ // ivrTaskScriptTargetoptionList: [
// { targetvalue: "瀛︾敓", value: "student" },
// { targetvalue: "鏁欏笀", value: "teacher" },
// { targetvalue: "宸ョ▼甯�", value: "engineer" },
@@ -220,7 +220,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// questionResult: null,
- // ivrLibaScriptTargetoptionList: [
+ // ivrTaskScriptTargetoptionList: [
// { targetvalue: "瀛︾敓", value: "student" },
// { targetvalue: "鏁欏笀", value: "teacher" },
// { targetvalue: "宸ョ▼甯�", value: "engineer", isabnormal: true },
@@ -233,7 +233,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// questionResult: null,
- // ivrLibaScriptTargetoptionList: [
+ // ivrTaskScriptTargetoptionList: [
// { targetvalue: "瀛︾敓", value: "student" },
// { targetvalue: "鏁欏笀", value: "teacher" },
// { targetvalue: "宸ョ▼甯�", value: "engineer" },
@@ -281,6 +281,8 @@
geturlinfo() {
// let url = window.location.href;
let url = this.$route.query.p;
+ console.log(445);
+
// let url = 'http://218.108.11.22:8093/sf/003';
// let urlid = this.extractLastSegmentFromUrl(url);
@@ -412,13 +414,13 @@
param1: this.taskid,
param2: this.patid,
type: this.type,
- ivrLibaTemplateScriptVOList: [],
+ ivrTaskTemplateScriptVOList: [],
};
const arr = structuredClone(this.questionList);
console.log(arr, "srr");
arr.forEach((item, index) => {
if (item.scriptType == 3||item.scriptType == 4) return;
- var obj = item.ivrLibaScriptTargetoptionList.find(
+ var obj = item.ivrTaskScriptTargetoptionList.find(
(items) => items.targetvalue == item.questionResult
);
console.log(obj, "isabnormal");
@@ -437,7 +439,7 @@
item.questionResult = JSON.stringify(item.questionResult);
}
});
- form.ivrLibaTemplateScriptVOList = arr;
+ form.ivrTaskTemplateScriptVOList = arr;
Cachequestionnaire(form).then((res) => {
if (res.code == 200) {
if (subm) {
@@ -449,7 +451,7 @@
// 澶勭悊鍗曢�夐�夐」
handleOptionChange(selectedvalue, index, arr) {
// 鏌ユ壘閫変腑鐨勯�夐」瀵硅薄
- const selectedOption = arr.ivrLibaScriptTargetoptionList.find(
+ const selectedOption = arr.ivrTaskScriptTargetoptionList.find(
(option) => option.targetvalue == selectedvalue
);
if (selectedOption) {
@@ -464,7 +466,7 @@
// 锟斤拷鍔犲垎鏁�
let score = 0;
selectedvalues.forEach((value) => {
- const selectedOption = arr.ivrLibaScriptTargetoptionList.find(
+ const selectedOption = arr.ivrTaskScriptTargetoptionList.find(
(option) => option.targetvalue == value
);
if (selectedOption) {
diff --git a/src/views/outsideChainwt.vue b/src/views/outsideChainwt.vue
index a8da2c1..4f90ecc 100644
--- a/src/views/outsideChainwt.vue
+++ b/src/views/outsideChainwt.vue
@@ -35,7 +35,7 @@
>
<el-radio
border
- v-for="(items, index) in item.svyLibTemplateTargetoptions"
+ v-for="(items, index) in item.svyTaskTemplateTargetoptions"
:class="
items.isabnormal && item.scriptResult == items.optioncontent
? 'red-star'
@@ -68,7 +68,7 @@
<el-checkbox
border
@change="$forceUpdate()"
- v-for="(items, indexs) in item.svyLibTemplateTargetoptions"
+ v-for="(items, indexs) in item.svyTaskTemplateTargetoptions"
:key="indexs"
:label="items.optioncontent"
>
@@ -165,7 +165,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑骞撮緞鑼冨洿鏄紵",
// scriptResult: null,
- // svyLibTemplateTargetoptions: [
+ // svyTaskTemplateTargetoptions: [
// { optioncontent: "18-25", value: "18-25", isabnormal: true },
// { optioncontent: "26-35", value: "26-35" },
// { optioncontent: "36-45", value: "36-45" },
@@ -178,7 +178,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// scriptResult: null,
- // svyLibTemplateTargetoptions: [
+ // svyTaskTemplateTargetoptions: [
// { optioncontent: "瀛︾敓", value: "student" },
// { optioncontent: "鏁欏笀", value: "teacher" },
// { optioncontent: "宸ョ▼甯�", value: "engineer" },
@@ -191,7 +191,7 @@
// scriptType: 2,
// scriptContent: "鎮ㄦ劅鍏磋叮鐨勬椿鍔ㄦ湁鍝簺锛�",
// scriptResult: [],
- // svyLibTemplateTargetoptions: [
+ // svyTaskTemplateTargetoptions: [
// { optioncontent: "鏃呮父", value: "travel", isabnormal: true },
// { optioncontent: "闃呰", value: "reading", isabnormal: true },
// { optioncontent: "杩愬姩", value: "sports", isabnormal: true },
@@ -204,7 +204,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// scriptResult: null,
- // svyLibTemplateTargetoptions: [
+ // svyTaskTemplateTargetoptions: [
// { optioncontent: "瀛︾敓", value: "student" },
// { optioncontent: "鏁欏笀", value: "teacher" },
// { optioncontent: "宸ョ▼甯�", value: "engineer" },
@@ -217,7 +217,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// scriptResult: null,
- // svyLibTemplateTargetoptions: [
+ // svyTaskTemplateTargetoptions: [
// { optioncontent: "瀛︾敓", value: "student" },
// { optioncontent: "鏁欏笀", value: "teacher" },
// { optioncontent: "宸ョ▼甯�", value: "engineer", isabnormal: true },
@@ -230,7 +230,7 @@
// scriptType: 1,
// scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
// scriptResult: null,
- // svyLibTemplateTargetoptions: [
+ // svyTaskTemplateTargetoptions: [
// { optioncontent: "瀛︾敓", value: "student" },
// { optioncontent: "鏁欏笀", value: "teacher" },
// { optioncontent: "宸ョ▼甯�", value: "engineer" },
@@ -375,12 +375,12 @@
let form = {
param1: this.taskid,
param2: this.patid,
- svyLibTemplateScriptVOS: [],
+ svyTaskTemplateScriptVOS: [],
};
const arr = structuredClone(this.questionList);
console.log(arr,'srr')
arr.forEach((item, index) => {
- var obj = item.svyLibTemplateTargetoptions.find(
+ var obj = item.svyTaskTemplateTargetoptions.find(
(items) => items.optioncontent == item.scriptResult
);
if (obj) {
@@ -399,7 +399,7 @@
item.scriptResult = JSON.stringify(item.scriptResult);
}
});
- form.svyLibTemplateScriptVOS = arr;
+ form.svyTaskTemplateScriptVOS = arr;
Cachequestionnaire(form).then((res) => {
if (res.code == 200) {
if (subm) {
@@ -411,7 +411,7 @@
// 澶勭悊鍗曢�夐�夐」
handleOptionChange(selectedvalue, index, arr) {
// 鏌ユ壘閫変腑鐨勯�夐」瀵硅薄
- const selectedOption = arr.svyLibTemplateTargetoptions.find(
+ const selectedOption = arr.svyTaskTemplateTargetoptions.find(
(option) => option.optioncontent == selectedvalue
);
if (selectedOption) {
@@ -426,7 +426,7 @@
// 锟斤拷鍔犲垎鏁�
let score = 0;
selectedvalues.forEach((value) => {
- const selectedOption = arr.svyLibTemplateTargetoptions.find(
+ const selectedOption = arr.svyTaskTemplateTargetoptions.find(
(option) => option.optioncontent == value
);
if (selectedOption) {
diff --git a/src/views/outsideChainwtnew.vue b/src/views/outsideChainwtnew.vue
index 37858aa..3b5a39e 100644
--- a/src/views/outsideChainwtnew.vue
+++ b/src/views/outsideChainwtnew.vue
@@ -1,146 +1,162 @@
<template>
- <div class="questionnaire">
- <div class="CONTENT" v-if="!accomplish">
- <div class="preview-left">
- <div class="toptitle">
- <div class="title">{{ taskname ? taskname : "闂嵎" }}</div>
- <div style="font-size: 22px; margin-bottom: 20px; line-height: 1.5">
+ <div class="questionnaire-optimized">
+ <div class="content-wrapper" v-if="!accomplish">
+ <div class="questionnaire-container">
+ <!-- 闂嵎鏍囬鍖哄煙 -->
+ <div class="questionnaire-header">
+ <h1 class="questionnaire-title">
+ {{ taskname ? taskname : "闂嵎" }}
+ </h1>
+ <div class="questionnaire-description">
{{
kcb
? kcb
- : "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸"+localStorage.getItem("orgname")+"鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤闅忚闂嵎銆�"
+ : "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸鍖婚櫌鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤闅忚闂嵎銆�"
}}
- <!-- 浜茬埍鐨勬偅鑰�/瀹跺睘鎮ㄥソ锛屼负浜嗘洿濂界殑浜嗚В鎮ㄥ嚭闄㈠悗鐨勫悍澶嶆儏鍐碉紝缁欐偍閫傚綋鍙婃椂鐨勫仴搴锋寚瀵硷紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤鍑洪櫌闅忚闂嵎璋冩煡銆� -->
</div>
</div>
- <el-divider></el-divider>
- <!-- 鍗曢�� -->
- <div
- class="topic-dev"
- v-for="(item, index) in questionList"
- :key="item.aaa"
- >
- <div class="scriptTopic-dev" :key="index" v-if="item.scriptType == 1">
- <div class="dev-text">
- {{ index + 1 }}銆�<span style="line-height: 1.5"
- >{{ item.scriptContent }}
- <span style="color: #3ba2f7">[鍗曢�塢</span></span
+
+ <el-divider class="custom-divider"></el-divider>
+
+ <!-- 闂嵎棰樼洰鍖哄煙 -->
+ <div class="questions-section">
+ <div
+ class="question-item"
+ v-for="(item, index) in visibleQuestions"
+ :key="item.id"
+ :class="{
+ 'has-warning':
+ item.prompt &&
+ item.scriptResult &&
+ (item.scriptType !== 2 || item.scriptResult.length > 0),
+ }"
+ >
+ <!-- 棰樼洰棰樺共 -->
+ <div class="question-stem">
+ <span class="question-number"
+ >{{ getVisibleQuestionIndex(index) }}.</span
>
+ <span class="question-text">{{ item.scriptContent }}</span>
+ <span class="question-type-tag">
+ {{
+ item.scriptType === 1
+ ? "[鍗曢�塢"
+ : item.scriptType === 2
+ ? "[澶氶�塢"
+ : "[闂瓟]"
+ }}
+ </span>
</div>
- <div class="dev-xx">
- <el-radio-group
- class="custom-radio"
- v-model="item.scriptResult"
- @change="handleOptionChange($event, index, item)"
- >
+
+ <!-- 鍗曢�夐鐩� -->
+ <div
+ class="question-options"
+ v-if="item.scriptType == 1 && !item.ishide"
+ >
+ <el-radio-group class="options-group" v-model="item.scriptResult">
<el-radio
- border
- v-for="(items, index) in item.svyLibTemplateTargetoptions"
- :class="
- items.isabnormal && item.scriptResult == items.optioncontent
- ? 'red-star'
- : ''
+ v-for="(
+ option, optionIndex
+ ) in item.svyTaskTemplateTargetoptions"
+ :key="optionIndex"
+ :label="option.optioncontent"
+ :class="{
+ 'abnormal-option':
+ option.isabnormal &&
+ item.scriptResult == option.optioncontent,
+ }"
+ @click.native.prevent="
+ handleRadioToggle(
+ item,
+ index,
+ item.svyTaskTemplateTargetoptions,
+ option.optioncontent
+ )
"
- :key="index"
- :label="items.optioncontent"
- >{{ items.optioncontent }}</el-radio
+ class="option-radio"
>
+ <span class="option-text">{{ option.optioncontent }}</span>
+ </el-radio>
</el-radio-group>
</div>
- <div v-show="item.prompt">
- <el-alert :title="item.prompt" type="warning"> </el-alert>
- </div>
- </div>
- <!-- 澶氶�� -->
- <div class="scriptTopic-dev" :key="index" v-if="item.scriptType == 2">
- <div class="dev-text">
- {{ index + 1 }}銆�<span style="line-height: 1.5"
- >{{ item.scriptContent }}
- <span style="color: #3ba2f7">[澶氶�塢</span></span
- >
- </div>
- <div class="dev-xx">
+
+ <!-- 澶氶�夐鐩� -->
+ <div class="question-options" v-if="item.scriptType == 2">
<el-checkbox-group
- class="custom-radio"
+ class="options-group"
v-model="item.scriptResult"
>
<el-checkbox
- border
+ v-for="(
+ option, optionIndex
+ ) in item.svyTaskTemplateTargetoptions"
+ :key="optionIndex"
+ :label="option.optioncontent"
+ :class="{
+ 'abnormal-option': option.isabnormal,
+ }"
@change="$forceUpdate()"
- v-for="(items, indexs) in item.svyLibTemplateTargetoptions"
- :key="indexs"
- :label="items.optioncontent"
+ class="option-checkbox"
>
- {{ items.optioncontent }}
+ <span class="option-text">{{ option.optioncontent }}</span>
</el-checkbox>
</el-checkbox-group>
</div>
- <!-- :class="items.isabnormal ? 'red-star' : ''" -->
- <div v-show="item.prompt && item.scriptResult[0]">
- <el-alert :title="item.prompt" type="warning"> </el-alert>
- </div>
- </div>
- <!-- 濉┖ -->
- <div class="scriptTopic-dev" :key="index" v-if="item.scriptType == 4">
- <div class="dev-text">
- {{ index + 1 }}銆�<span style="line-height: 1.5"
- >{{ item.scriptContent
- }}<span style="color: #3ba2f7">[闂瓟]</span></span
- >
- </div>
- <div class="dev-xx">
+
+ <!-- 濉┖棰樼洰 -->
+ <div class="question-input" v-if="item.scriptType == 4">
<el-input
type="textarea"
:rows="3"
- placeholder="璇疯緭鍏ョ瓟妗�"
+ placeholder="璇疯緭鍏ユ偍鐨勫洖绛�"
v-model="item.scriptResult"
clearable
- >
- </el-input>
+ class="answer-textarea"
+ ></el-input>
+ </div>
+
+ <!-- 鎻愮ず淇℃伅 -->
+ <div
+ class="question-warning"
+ v-show="
+ item.prompt &&
+ item.scriptResult &&
+ (item.scriptType !== 2 || item.scriptResult.length > 0)
+ "
+ >
+ <el-alert
+ :title="item.prompt"
+ type="warning"
+ :closable="false"
+ class="warning-alert"
+ ></el-alert>
</div>
</div>
</div>
- <div class="bottom-fixed">
- <el-button
- type="primary"
- style="width: 80%; font-size: 20px"
- @click="cache(true)"
- >鎻愪氦闂嵎</el-button
- >
+
+ <!-- 鎻愪氦鎸夐挳 -->
+ <div class="submit-section">
+ <el-button type="primary" @click="cache(true)" class="submit-button">
+ 鎻愪氦闂嵎
+ </el-button>
</div>
</div>
</div>
- <div class="CONTENT" v-else>
- <div class="preview-lefts">
- <div
- style="
- text-align: center;
- padding-top: 50px;
- font-size: 24px;
- color: #175997;
- font-weight: 600;
- margin-bottom: 10px;
- "
- >
- 鎰熻阿鎮ㄧ殑閰嶅悎!
- </div>
- <div style="font-size: 20px">
+
+ <!-- 瀹屾垚椤甸潰 -->
+ <div class="completion-page" v-else>
+ <div class="completion-content">
+ <div class="completion-icon">鉁�</div>
+ <h2 class="completion-title">鎰熻阿鎮ㄧ殑閰嶅悎!</h2>
+ <p class="completion-message">
{{
jsy
? jsy
: "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈鍥炶灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒"
}}
- </div>
+ </p>
</div>
</div>
- <!-- <el-dialog
- :visible.sync="dialogVisible"
- width="50%"
- >
- <div>
- <el-alert :title="jsy" type="success"> </el-alert>
- </div>
- </el-dialog> -->
</div>
</template>
@@ -159,94 +175,10 @@
taskid: 355,
patid: 265823,
kcb: "",
- excep: "",
- questionList: [
- // {
- // scriptType: 1,
- // scriptContent: "鎮ㄧ殑骞撮緞鑼冨洿鏄紵",
- // scriptResult: null,
- // svyLibTemplateTargetoptions: [
- // { optioncontent: "18-25", value: "18-25", isabnormal: true },
- // { optioncontent: "26-35", value: "26-35" },
- // { optioncontent: "36-45", value: "36-45" },
- // { optioncontent: "46-55", value: "46-55" },
- // { optioncontent: "56+", value: "56+" },
- // ],
- // required: true,
- // },
- // {
- // scriptType: 1,
- // scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
- // scriptResult: null,
- // svyLibTemplateTargetoptions: [
- // { optioncontent: "瀛︾敓", value: "student" },
- // { optioncontent: "鏁欏笀", value: "teacher" },
- // { optioncontent: "宸ョ▼甯�", value: "engineer" },
- // { optioncontent: "鍖荤敓", value: "doctor" },
- // { optioncontent: "鍏朵粬", value: "other" },
- // ],
- // required: false,
- // },
- // {
- // scriptType: 2,
- // scriptContent: "鎮ㄦ劅鍏磋叮鐨勬椿鍔ㄦ湁鍝簺锛�",
- // scriptResult: [],
- // svyLibTemplateTargetoptions: [
- // { optioncontent: "鏃呮父", value: "travel", isabnormal: true },
- // { optioncontent: "闃呰", value: "reading", isabnormal: true },
- // { optioncontent: "杩愬姩", value: "sports", isabnormal: true },
- // { optioncontent: "闊充箰", value: "music" },
- // { optioncontent: "鐢靛奖", value: "movies" },
- // ],
- // required: false,
- // },
- // {
- // scriptType: 1,
- // scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
- // scriptResult: null,
- // svyLibTemplateTargetoptions: [
- // { optioncontent: "瀛︾敓", value: "student" },
- // { optioncontent: "鏁欏笀", value: "teacher" },
- // { optioncontent: "宸ョ▼甯�", value: "engineer" },
- // { optioncontent: "鍖荤敓", value: "doctor" },
- // { optioncontent: "鍏朵粬", value: "other" },
- // ],
- // required: false,
- // },
- // {
- // scriptType: 1,
- // scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
- // scriptResult: null,
- // svyLibTemplateTargetoptions: [
- // { optioncontent: "瀛︾敓", value: "student" },
- // { optioncontent: "鏁欏笀", value: "teacher" },
- // { optioncontent: "宸ョ▼甯�", value: "engineer", isabnormal: true },
- // { optioncontent: "鍖荤敓", value: "doctor" },
- // { optioncontent: "鍏朵粬", value: "other" },
- // ],
- // required: false,
- // },
- // {
- // scriptType: 1,
- // scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
- // scriptResult: null,
- // svyLibTemplateTargetoptions: [
- // { optioncontent: "瀛︾敓", value: "student" },
- // { optioncontent: "鏁欏笀", value: "teacher" },
- // { optioncontent: "宸ョ▼甯�", value: "engineer" },
- // { optioncontent: "鍖荤敓", value: "doctor" },
- // { optioncontent: "鍏朵粬", value: "other" },
- // ],
- // required: false,
- // },
- // {
- // scriptType: 4,
- // scriptContent: "鎮ㄧ殑濮撳悕鏄粈涔堬紵",
- // scriptResult: "name",
- // required: true,
- // scriptResult: null,
- // },
- ],
+ excep: 0,
+ isabnormal: 0,
+ taskname: "",
+ questionList: [],
jsy: null,
dialogVisible: false,
Endornot: true,
@@ -265,42 +197,53 @@
};
},
mounted() {
- window.addEventListener("beforeunload", this.cache);
+ // window.addEventListener("beforeunload", this.cache);
},
beforeDestroy() {
- window.removeEventListener("beforeunload", this.cache);
+ // window.removeEventListener("beforeunload", this.cache);
},
created() {
this.geturlinfo();
},
+ computed: {
+ // 璁$畻灞炴�э細鑾峰彇鎵�鏈夊彲瑙佺殑棰樼洰
+ visibleQuestions() {
+ return this.questionList.filter((question) => !question.ishide);
+ },
+ },
methods: {
// 瑙f瀽urlid
geturlinfo() {
- // let url = window.location.href;
- let url = this.$route.query.p;
- console.log(url,"url");
+ // let url = window.location.href;
+ let url = this.$route.query.p;
+ console.log(url, "url");
// let url = 'http://218.108.11.22:8093/sf/003';
// let urlid = this.extractLastSegmentFromUrl(url);
- geturlinfo( url ).then((res) => {
- if (res.code==200) {
- this.getQuestionnaire(res.data.param1,res.data.param2,res.data.param3,res.data.param5,)
- }
+ geturlinfo(url).then((res) => {
+ if (res.code == 200) {
+ this.getQuestionnaire(
+ res.data.param1,
+ res.data.param2,
+ res.data.param3,
+ res.data.param5
+ );
+ }
});
},
-// extractLastSegmentFromUrl(url) {
-// // 鎵惧埌鏈�鍚庝竴涓�'/'鐨勪綅缃�
-// const lastSlashIndex = url.lastIndexOf('/');
-// // 濡傛灉鎵惧埌浜�'/'锛屾埅鍙栧叾鍚庣殑鎵�鏈夊瓧绗�
-// if (lastSlashIndex !== -1) {
-// return url.substring(lastSlashIndex + 1);
-// }
-// // 濡傛灉娌℃湁鎵惧埌'/'锛岃繑鍥炵┖瀛楃涓�
-// return '';
-// },
+ // extractLastSegmentFromUrl(url) {
+ // // 鎵惧埌鏈�鍚庝竴涓�'/'鐨勪綅缃�
+ // const lastSlashIndex = url.lastIndexOf('/');
+ // // 濡傛灉鎵惧埌浜�'/'锛屾埅鍙栧叾鍚庣殑鎵�鏈夊瓧绗�
+ // if (lastSlashIndex !== -1) {
+ // return url.substring(lastSlashIndex + 1);
+ // }
+ // // 濡傛灉娌℃湁鎵惧埌'/'锛岃繑鍥炵┖瀛楃涓�
+ // return '';
+ // },
// 鑾峰彇鏁版嵁
- getQuestionnaire(param1,param2,param3) {
+ getQuestionnaire(param1, param2, param3) {
this.taskid = decodeURIComponent(param1);
this.patid = decodeURIComponent(param2);
this.taskname = decodeURIComponent(param3);
@@ -374,8 +317,11 @@
param1: this.taskid,
param2: this.patid,
excep: this.excep,
+ isabnormal: this.isabnormal,
serviceSubtaskDetailList: [],
};
+ console.log(form.isabnormal, "formisabnormal");
+
const arr = structuredClone(this.questionList);
// arr.forEach((item) => {
// item.asrtext = JSON.stringify(item.scriptResult);
@@ -400,21 +346,34 @@
let form = {
param1: this.taskid,
param2: this.patid,
- svyLibTemplateScriptVOS: [],
+ svyTaskTemplateScriptVOS: [],
};
const arr = structuredClone(this.questionList);
- console.log(arr, "srr");
+ arr.forEach((item) => {
+ item.ishide = item.ishide ? 1 : 0;
+ });
arr.forEach((item, index) => {
- var obj = item.svyLibTemplateTargetoptions.find(
- (items) => items.optioncontent == item.scriptResult
- );
- console.log(obj,'obj');
+ if (item.scriptType == 1 && item.scriptResult) {
+ var obj = item.svyTaskTemplateTargetoptions.find(
+ (items) => items.optioncontent == item.scriptResult
+ );
+ console.log(item);
- if (obj) {
- if (obj.isabnormal) {
+ console.log(obj, "obj");
+ if (obj.sendTaskid) {
+ item.sendTaskname = obj.sendTaskname;
+ item.sendTaskid = obj.sendTaskid;
+ console.log(String(obj.sendTaskid).split(","));
+ item.sendTaskids = String(obj.sendTaskid).split(",");
+ }
+ if (obj) {
+ form.excep = obj.isabnormal;
+ form.isabnormal = obj.isabnormal;
+ if (this.isabnormal != 1 && obj.isabnormal) {
+ this.excep = obj.isabnormal;
+ this.isabnormal = obj.isabnormal;
+ }
console.log(obj.isabnormal);
- form.excep = 1;
- this.excep = 1;
}
}
});
@@ -426,7 +385,7 @@
item.scriptResult = JSON.stringify(item.scriptResult);
}
});
- form.svyLibTemplateScriptVOS = arr;
+ form.svyTaskTemplateScriptVOS = arr;
form.type = 2;
Cachequestionnaire(form).then((res) => {
if (res.code == 200) {
@@ -436,25 +395,149 @@
}
});
},
- // 澶勭悊鍗曢�夐�夐」
- handleOptionChange(selectedvalue, index, arr) {
- // 鏌ユ壘閫変腑鐨勯�夐」瀵硅薄
- const selectedOption = arr.svyLibTemplateTargetoptions.find(
- (option) => option.optioncontent == selectedvalue
- );
- if (selectedOption) {
- // 灏嗛�変腑鐨勯�夐」瀵硅薄鐨� id 璧嬪�肩粰 obj.sonId
- this.questionList[index].nextScriptno = selectedOption.nextQuestion;
- this.questionList[index].score = selectedOption.score;
- this.questionList[index].prompt = selectedOption.prompt;
- }
+ // 鑾峰彇鍙棰樼洰鐨勬纭簭鍙凤紙瑙e喅璺抽鍚庡簭鍙蜂笉杩炵画鐨勯棶棰橈級
+ getVisibleQuestionIndex(index) {
+ return index + 1;
},
+ // 鏂板鐨勫垏鎹㈤�変腑/鍙栨秷閫変腑鏂规硶
+ handleRadioToggle(questionItem, index, options, optionValue) {
+ // 淇濆瓨褰撳墠鐘舵�佷互渚垮悗缁瘮杈�
+ const previousState = JSON.parse(JSON.stringify(this.questionList));
+
+ // 鍘熸湁鐨勫鐞嗛�昏緫
+ if (questionItem.scriptResult === optionValue) {
+ questionItem.scriptResult = "";
+ questionItem.isabnormal = 0;
+ questionItem.showAppendInput = false;
+ } else {
+ questionItem.scriptResult = optionValue;
+ this.handleOptionChange(optionValue, index, options, questionItem);
+ }
+
+ // 澶勭悊瀹屾垚鍚庯紝纭繚閲嶆柊璁$畻鍙棰樼洰鐨勫簭鍙�
+ this.$forceUpdate();
+ },
+
+ // 鍦╩ethods閮ㄥ垎锛屼慨鏀筯andleOptionChange鏂规硶:
+ handleOptionChange(selectedOption, questionIndex, options, a) {
+ console.log(selectedOption, questionIndex, options, a, "888");
+
+ if (document.activeElement) {
+ document.activeElement.blur();
+ }
+
+ // 鎵惧埌琚�変腑鐨勯�夐」瀵硅薄
+ const selectedOptionObj = options.find(
+ (item) => item.optioncontent == selectedOption
+ );
+ if (selectedOptionObj) {
+ this.questionList[questionIndex].nextScriptno =
+ selectedOptionObj.nextQuestion;
+ this.questionList[questionIndex].score = selectedOptionObj.score;
+ this.questionList[questionIndex].prompt = selectedOptionObj.prompt;
+ }
+ // 澶勭悊寮傚父鐘舵�侀珮浜�
+ this.questionList[questionIndex].isabnormal =
+ selectedOptionObj.isabnormal;
+ // 澶勭悊闄勫姞杈撳叆妗嗘樉绀�
+
+ this.questionList[questionIndex].showAppendInput =
+ selectedOptionObj.appendflag == 1;
+ console.log(this.questionList);
+
+ // if (!this.questionList[questionIndex].showAppendInput) {
+ // this.questionList[questionIndex].answerps = ""; // 娓呴櫎闄勫姞淇℃伅
+ // }
+ // 淇濆瓨褰撳墠棰樼洰涔嬪墠宸茬粡闅愯棌鐨勯鐩姸鎬�
+ const previouslyHiddenBeforeCurrent = this.questionList
+ .slice(0, questionIndex)
+ .map((item, index) => (item.ishide ? index : -1))
+ .filter((index) => index !== -1);
+
+ // 淇濆瓨涔嬪墠鍥爊extQuestion=0鑰岄殣钘忕殑棰樼洰鑼冨洿
+ const previouslyHiddenByEnd = this.questionList
+ .map((item, index) => (item.hiddenByEnd ? index : -1))
+ .filter((index) => index !== -1);
+
+ // 濡傛灉branchFlag涓�1锛屽鐞嗛鐩烦杞�
+ if (a.branchFlag == 1) {
+ if (selectedOptionObj.nextQuestion == 0) {
+ // 缁撴潫闂瓟 - 闅愯棌鍚庨潰鎵�鏈夐鐩苟鏍囪
+ this.questionList = this.questionList.map((item, index) => ({
+ ...item,
+ ishide: index > questionIndex,
+ hiddenByEnd: index > questionIndex, // 鏍囪杩欎簺棰樼洰鏄缁撴潫闂瓟闅愯棌鐨�
+ }));
+ } else {
+ // 姝e父璺宠浆閫昏緫
+ const nextQuestionIndex = selectedOptionObj.nextQuestion - 1;
+
+ this.questionList = this.questionList.map((item, index) => {
+ // 淇濈暀褰撳墠棰樼洰涔嬪墠鐨勯殣钘忕姸鎬�
+ if (index < questionIndex) {
+ return {
+ ...item,
+ ishide: previouslyHiddenBeforeCurrent.includes(index),
+ hiddenByEnd: false, // 娓呴櫎缁撴潫鏍囪
+ };
+ }
+
+ // 褰撳墠棰樼洰鎬绘槸鍙
+ if (index === questionIndex) {
+ return { ...item, ishide: 0, hiddenByEnd: false };
+ }
+
+ // 鏄剧ず鐩爣涓嬩竴棰�
+ if (index === nextQuestionIndex) {
+ return { ...item, ishide: 0, hiddenByEnd: false };
+ }
+
+ // 濡傛灉鏄箣鍓嶈缁撴潫闂瓟闅愯棌鐨勯鐩紝鐜板湪搴旇鎭㈠鏄剧ず
+ if (item.hiddenByEnd) {
+ return { ...item, ishide: 0, hiddenByEnd: false };
+ }
+
+ // 闅愯棌褰撳墠棰樺拰鐩爣棰樹箣闂寸殑棰樼洰
+ if (index > questionIndex && index < nextQuestionIndex) {
+ return { ...item, ishide: 1, hiddenByEnd: false };
+ }
+
+ // 鍏朵粬鎯呭喌淇濇寔鍘熺姸
+ return item;
+ });
+ }
+ } else {
+ // 濡傛灉娌℃湁璺宠浆锛屽彧闇�纭繚涓嬩竴棰樺彲瑙�
+ this.questionList = this.questionList.map((item, index) => ({
+ ...item,
+ ishide: index === questionIndex + 1 ? 0 : item.ishide,
+ hiddenByEnd: index === questionIndex + 1 ? false : item.hiddenByEnd,
+ }));
+ }
+
+ // 鍦ㄥ鐞嗗畬棰樼洰鏄剧ず/闅愯棌鍚庯紝寮哄埗鏇存柊瑙嗗浘浠ョ‘淇濆簭鍙锋纭�
+ this.$nextTick(() => {
+ this.$forceUpdate();
+ });
+ },
+ // 澶勭悊鍗曢�夐�夐」
+ // handleOptionChange(selectedvalue, index, arr) {
+ // // 鏌ユ壘閫変腑鐨勯�夐」瀵硅薄
+ // const selectedOption = arr.svyTaskTemplateTargetoptions.find(
+ // (option) => option.optioncontent == selectedvalue
+ // );
+ // if (selectedOption) {
+ // this.questionList[index].nextScriptno = selectedOption.nextQuestion;
+ // this.questionList[index].score = selectedOption.score;
+ // this.questionList[index].prompt = selectedOption.prompt;
+ // }
+ // },
// 澶勭悊澶氶�夐�夐」
// updateScore(selectedvalues, index, arr) {
// // 锟斤拷鍔犲垎鏁�
// let score = 0;
// selectedvalues.forEach((value) => {
- // const selectedOption = arr.svyLibTemplateTargetoptions.find(
+ // const selectedOption = arr.svyTaskTemplateTargetoptions.find(
// (option) => option.optioncontent == value
// );
// if (selectedOption) {
@@ -468,158 +551,294 @@
</script>
<style lang="scss" scoped>
-.questionnaire {
- // background-image: url("../assets/images/chainbackground.jpg");
- background-color: #f9f9fb;
- background-size: cover;
- background-attachment: fixed; /* 淇濇寔鑳屾櫙鍥哄畾 */
- background-position: center;
- font-family: Arial, sans-serif;
+.questionnaire-optimized {
min-height: 100vh;
- margin: 0;
- padding: 0;
- .CONTENT {
- .title {
- color: #3769f3;
- font-size: 22px;
- font-weight: bold;
- margin-bottom: 20px;
- text-align: center;
- }
- }
-}
-.preview-left {
- margin: 10px;
- margin-bottom: 60px;
- background-color: #fff;
- border-radius: 5px;
- // margin: 20px;
- padding: 10px;
- height: 100%;
- // 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);
- .topic-dev {
- margin-bottom: 25px;
- font-size: 20px !important;
- .dev-text {
- margin-bottom: 10px;
- }
- }
-}
-.preview-lefts {
- margin: 10px;
- background-color: #fff;
- border-radius: 5px;
- // margin: 20px;
- padding: 10px;
- height: 95vh; // 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);
- .topic-dev {
- margin-bottom: 25px;
- font-size: 20px !important;
- .dev-text {
- margin-bottom: 10px;
- }
- }
+ background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
+ padding: 20px 0;
+ font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
-.red-star {
- ::v-deep.el-radio__label {
- position: relative;
- padding-right: 10px; /* 鏍规嵁闇�瑕佽皟鏁� */
- }
- ::v-deep.el-radio__label::after {
- content: "*";
- color: red;
- position: absolute;
- right: -5px; /* 鏍规嵁闇�瑕佽皟鏁� */
- top: 0;
- }
- ::v-deep.el-checkbox__label {
- position: relative;
- padding-right: 10px; /* 鏍规嵁闇�瑕佽皟鏁� */
- }
- ::v-deep.el-checkbox__label::after {
- content: "*";
- color: red;
- position: absolute;
- right: -5px; /* 鏍规嵁闇�瑕佽皟鏁� */
- top: 0;
- }
-}
-::v-deep.el-checkbox-group {
- font-size: 0;
- display: flex;
- flex-direction: column;
- margin: 5px 0;
-}
-::v-deep.el-checkbox.is-bordered + .el-checkbox.is-bordered {
- margin-left: 0;
+.content-wrapper {
+ max-width: 800px;
+ margin: 0 auto;
+ padding: 0 15px;
}
-::v-deep.el-radio-group {
- display: flex;
- flex-direction: column;
- margin: 5px 0;
-}
-::v-deep.el-radio.is-bordered + .el-radio.is-bordered {
- /* margin-left: 10px; */
- margin-left: 0;
-}
-::v-deep.custom-radio .el-radio {
- margin: 2px 0;
+.questionnaire-container {
+ background: #ffffff;
+ border-radius: 12px;
+ box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
+ padding: 30px;
+ margin-bottom: 30px;
}
-.radio-option {
- flex: none; /* 涓嶈閫夐」鑷姩濉厖绌洪棿 */
- white-space: nowrap; /* 闃叉閫夐」鏂囨湰鎹㈣ */
- margin: 0 10px; /* 璁剧疆閫夐」宸﹀彸鐨勯棿闅� */
- font-size: 20px; /* 澧炲ぇ瀛椾綋澶у皬 */
-}
-
-.el-radio__label {
- font-size: 20px; /* 澧炲ぇ鏍囩鏂囧瓧澶у皬 */
-}
-.toptitle {
-}
-.bottom-fixed {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
+.questionnaire-header {
text-align: center;
- padding: 10px 0; /* 鏍规嵁闇�瑕佽皟鏁村唴杈硅窛 */
- background: #fff; /* 鏍规嵁闇�瑕佽皟鏁磋儗鏅鑹� */
- box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* 鍙�夌殑闃村奖鏁堟灉 */
- z-index: 1000; /* 纭繚鎸夐挳鍦ㄩ〉闈㈡渶涓婂眰 */
+ margin-bottom: 25px;
}
-::v-deep.el-alert--warning.is-light {
- background-color: #fbf9f3;
- color: #ffba00;
+
+.questionnaire-title {
+ color: #175997;
+ font-size: 28px;
+ font-weight: 700;
+ margin-bottom: 15px;
+ line-height: 1.3;
}
-::v-deep {
- .el-alert__title {
- font-size: 20px;
- line-height: 18px;
+
+.questionnaire-description {
+ font-size: 18px;
+ color: #5a6c84;
+ line-height: 1.6;
+ max-width: 700px;
+ margin: 0 auto;
+}
+
+.custom-divider {
+ margin: 25px 0;
+ background-color: #eaeef2;
+}
+
+.questions-section {
+ margin-bottom: 40px;
+}
+
+.question-item {
+ margin-bottom: 35px;
+ padding: 20px;
+ border-radius: 8px;
+ border: 1px solid #eaeef2;
+ transition: all 0.3s ease;
+
+ &:hover {
+ border-color: #d1e0f0;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+ }
+
+ &.has-warning {
+ border-left: 4px solid #e6a23c;
}
}
-::v-deep.el-radio--medium.is-bordered .el-radio__label {
- font-size: 20px;
+
+.question-stem {
+ display: flex;
+ align-items: flex-start;
+ margin-bottom: 20px;
+ font-size: 18px;
}
-::v-deep.el-radio--medium.is-bordered {
- padding: 5px 20px 0px 10px;
- border-radius: 4px;
- height: 36px;
+
+.question-number {
+ font-weight: 600;
+ color: #175997;
+ margin-right: 8px;
+ min-width: 24px;
}
-::v-deep.el-checkbox.is-bordered.el-checkbox--medium .el-checkbox__label {
- line-height: 17px;
- font-size: 20px;
+
+.question-text {
+ flex: 1;
+ line-height: 1.5;
+ color: #2c3e50;
+ font-weight: 500;
}
-::v-deep.el-checkbox {
- margin-right: 0px;
+
+.question-type-tag {
+ color: #3ba2f7;
+ font-size: 14px;
+ margin-left: 10px;
+ font-weight: 500;
+}
+
+.question-options {
+ margin: 15px 0;
+}
+
+.options-group {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+}
+
+.option-radio,
+.option-checkbox {
+ margin: 0;
+ padding: 12px 15px;
+ border-radius: 6px;
+ border: 1px solid #e0e0e0;
+ transition: all 0.2s;
+
+ &:hover {
+ border-color: #c0c4cc;
+ background-color: #f8fafc;
+ }
+}
+
+:deep(.option-radio .el-radio__label),
+:deep(.option-checkbox .el-checkbox__label) {
+ display: flex;
+ align-items: center;
+ font-size: 16px;
+}
+
+.option-text {
+ margin-right: 5px;
+}
+
+.abnormal-indicator {
+ color: #f56c6c;
+ font-weight: bold;
+}
+
+.abnormal-option {
+ :deep(.el-radio__inner) {
+ border-color: #f56c6c;
+ }
+
+ :deep(.el-checkbox__inner) {
+ border-color: #f56c6c;
+ }
+}
+
+.question-input {
+ margin: 15px 0;
+}
+
+.answer-textarea {
+ :deep(.el-textarea__inner) {
+ font-size: 16px;
+ line-height: 1.5;
+ }
+}
+
+.question-warning {
+ margin-top: 15px;
+}
+
+.warning-alert {
+ :deep(.el-alert__title) {
+ font-size: 15px;
+ line-height: 1.4;
+ }
+}
+
+.submit-section {
+ text-align: center;
+ padding: 20px 0 10px;
+}
+
+.submit-button {
+ width: 100%;
+ max-width: 300px;
+ height: 50px;
+ font-size: 18px;
+ font-weight: 500;
+ border-radius: 8px;
+ background: linear-gradient(135deg, #175997 0%, #2a77c9 100%);
+ border: none;
+ box-shadow: 0 4px 12px rgba(23, 89, 151, 0.3);
+ transition: all 0.3s;
+
+ &:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 6px 16px rgba(23, 89, 151, 0.4);
+ }
+
+ &:active {
+ transform: translateY(0);
+ }
+}
+
+.completion-page {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 70vh;
+ padding: 20px;
+}
+
+.completion-content {
+ text-align: center;
+ max-width: 600px;
+ padding: 40px;
+ background: #ffffff;
+ border-radius: 12px;
+ box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
+}
+
+.completion-icon {
+ font-size: 80px;
+ color: #52c41a;
+ margin-bottom: 20px;
+}
+
+.completion-title {
+ color: #175997;
+ font-size: 32px;
+ font-weight: 700;
+ margin-bottom: 20px;
+}
+
+.completion-message {
+ font-size: 18px;
+ color: #5a6c84;
+ line-height: 1.6;
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .content-wrapper {
+ padding: 0 10px;
+ }
+
+ .questionnaire-container {
+ padding: 20px 15px;
+ }
+
+ .questionnaire-title {
+ font-size: 24px;
+ }
+
+ .questionnaire-description {
+ font-size: 16px;
+ }
+
+ .question-stem {
+ font-size: 16px;
+ flex-direction: column;
+ align-items: flex-start;
+ }
+
+ .question-type-tag {
+ margin-left: 0;
+ margin-top: 5px;
+ }
+
+ .question-item {
+ padding: 15px;
+ }
+
+ .completion-content {
+ padding: 30px 20px;
+ }
+
+ .completion-title {
+ font-size: 28px;
+ }
+
+ .completion-message {
+ font-size: 16px;
+ }
+}
+
+@media (max-width: 480px) {
+ .questionnaire-title {
+ font-size: 22px;
+ }
+
+ .completion-title {
+ font-size: 24px;
+ }
+
+ .completion-icon {
+ font-size: 60px;
+ }
}
</style>
diff --git a/src/views/outsideChainxjnew.vue b/src/views/outsideChainxjnew.vue
index d61c135..3d40426 100644
--- a/src/views/outsideChainxjnew.vue
+++ b/src/views/outsideChainxjnew.vue
@@ -7,15 +7,21 @@
</div>
</div> -->
- <div class="CONTENT" >
+ <div class="CONTENT">
<div class="preview-left">
<div class="toptitle">
- <div class="title">{{ taskname ? taskname : ""+localStorage.getItem("orgname")+"鍖绘姢鐭ヨ瘑瀹f暀" }}</div>
+ <div class="title">
+ {{
+ taskname
+ ? taskname
+ : "鍖绘姢鐭ヨ瘑瀹f暀"
+ }}
+ </div>
<div style="font-size: 22px; margin-bottom: 20px; line-height: 1.5">
{{
kcb
? kcb
- : "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸"+localStorage.getItem("orgname")+"鐨勫尰鎶や汉鍛橈紝涓轰簡鏇村ソ鍦颁簡瑙f偍鐨勫悍澶嶆儏鍐碉紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�"
+ : "浜茬埍鐨勬偅鑰�-瀹跺睘锛屾垜浠槸鍖绘姢浜哄憳锛屼负浜嗘洿濂藉湴浜嗚В鎮ㄧ殑搴峰鎯呭喌锛岃鎮ㄦ娊涓�鐐瑰疂璐垫椂闂达紝瑙傜湅杩欎唤瀹f暀璧勮銆�"
}}
<!-- 浜茬埍鐨勬偅鑰�/瀹跺睘鎮ㄥソ锛屼负浜嗘洿濂界殑浜嗚В鎮ㄥ嚭闄㈠悗鐨勫悍澶嶆儏鍐碉紝缁欐偍閫傚綋鍙婃椂鐨勫仴搴锋寚瀵硷紝璇锋偍鎶戒竴鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤鍑洪櫌闅忚闂嵎璋冩煡銆� -->
</div>
@@ -32,11 +38,12 @@
margin-bottom: 10px;
"
>
- {{
+ {{
jsy
? jsy
: "鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈瀹f暀鍐呭灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒"
- }} </div>
+ }}
+ </div>
<!-- <div style="font-size: 20px">
{{
jsy
@@ -53,7 +60,7 @@
import {
getExternalfollowup,
Submitaquestionnaire,
- geturlinfo
+ geturlinfo,
} from "@/api/AiCentre/index";
import { getToken } from "@/utils/auth";
import axios from "axios";
@@ -76,15 +83,15 @@
question3: "",
},
richText: "<p>Hello, <strong>world</strong>!</p>",
- url:'',
- taskname:'',
- kcb:'',
- jsy:'',
+ url: "",
+ taskname: "",
+ kcb: "",
+ jsy: "",
};
},
created() {
- this.getQuestionnaire();
+ this.geturlinfo();
},
methods: {
// 瑙f瀽urlid
@@ -94,27 +101,32 @@
// let url = 'http://218.108.11.22:8093/sf/003';
// let urlid = this.extractLastSegmentFromUrl(url);
- geturlinfo( url ).then((res) => {
- if (res.code==200) {
- this.getQuestionnaire(res.data.param1,res.data.param2,res.data.param3,res.data.param5,)
- }
+ geturlinfo(url).then((res) => {
+ if (res.code == 200) {
+ this.getQuestionnaire(
+ res.data.param1,
+ res.data.param2,
+ res.data.param3,
+ res.data.param5
+ );
+ }
});
},
- extractLastSegmentFromUrl(url) {
- // 鎵惧埌鏈�鍚庝竴涓�'/'鐨勪綅缃�
- const lastSlashIndex = url.lastIndexOf('/');
- // 濡傛灉鎵惧埌浜�'/'锛屾埅鍙栧叾鍚庣殑鎵�鏈夊瓧绗�
- if (lastSlashIndex !== -1) {
- return url.substring(lastSlashIndex + 1);
- }
- // 濡傛灉娌℃湁鎵惧埌'/'锛岃繑鍥炵┖瀛楃涓�
- return '';
-},
+ // extractLastSegmentFromUrl(url) {
+ // // 鎵惧埌鏈�鍚庝竴涓�'/'鐨勪綅缃�
+ // const lastSlashIndex = url.lastIndexOf('/');
+ // // 濡傛灉鎵惧埌浜�'/'锛屾埅鍙栧叾鍚庣殑鎵�鏈夊瓧绗�
+ // if (lastSlashIndex !== -1) {
+ // return url.substring(lastSlashIndex + 1);
+ // }
+ // // 濡傛灉娌℃湁鎵惧埌'/'锛岃繑鍥炵┖瀛楃涓�
+ // return '';
+ // },
// 鑾峰彇鏁版嵁
- getQuestionnaire(param1,param2,param3) {
- this.taskid = param1;
- this.patid = param2;
- this.taskname = param3;
+ getQuestionnaire(param1, param2, param3) {
+ this.taskid = decodeURIComponent(param1);
+ this.patid = decodeURIComponent(param2);
+ this.taskname = decodeURIComponent(param3);
// // let taskid =
// // "OFp7tn/B6x7IzKJetvGWHdSWBj7msRlnlj6am9dyuHTH6sEt4uBbVCUXs5kcF/e4O2W6vqHf2Bz9K3/evbYDmw==";
// // let patid =
@@ -126,25 +138,26 @@
// // this.$modal.msgSuccess("浠诲姟id涓�" + this.taskid);
// let taskids = this.encrypt(this.taskid);
// let patids = this.encrypt(this.patid);
- getExternalfollowup({ param1: this.taskid, param2: this.patid }).then((res) => {
- if (res.code == 200) {
- this.url = res.data.script[0].richText;
- this.jsy = res.data.jsy;
- this.kcb = res.data.kcb;
- // 涓存椂鑾峰彇鏁版嵁
- axios
- .get(this.url)
- .then((response) => {
- console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
- this.richText = response.data;
- this.richText = this.addStyleToImages(this.richText);
- })
- .catch((error) => {
- console.error("Failed to fetch file:", error);
- });
+ getExternalfollowup({ param1: this.taskid, param2: this.patid }).then(
+ (res) => {
+ if (res.code == 200) {
+ this.url = res.data.script[0].richText;
+ this.jsy = res.data.jsy;
+ this.kcb = res.data.kcb;
+ // 涓存椂鑾峰彇鏁版嵁
+ axios
+ .get(this.url)
+ .then((response) => {
+ console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
+ this.richText = response.data;
+ this.richText = this.addStyleToImages(this.richText);
+ })
+ .catch((error) => {
+ console.error("Failed to fetch file:", error);
+ });
+ }
}
- });
-
+ );
},
addStyleToImages(html) {
return html.replace(
@@ -201,7 +214,6 @@
</script>
<style lang="scss" scoped>
-
.questionnaire {
background-image: url("../assets/images/chainbackground1.jpg");
background-color: #f9f9fb;
diff --git a/src/views/patient/follow/index.vue b/src/views/patient/follow/index.vue
index 06f2765..1970d37 100644
--- a/src/views/patient/follow/index.vue
+++ b/src/views/patient/follow/index.vue
@@ -619,7 +619,10 @@
height: 100px;
}
}
+.button-textxga {
+ color: #de7897;
+}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
}
</style>
diff --git a/src/views/patient/medtechnician/PatientChart.vue b/src/views/patient/medtechnician/PatientChart.vue
index a513703..60d45fb 100644
--- a/src/views/patient/medtechnician/PatientChart.vue
+++ b/src/views/patient/medtechnician/PatientChart.vue
@@ -472,60 +472,7 @@
label: "娑堟伅閫氱煡",
},
],
- taskoptions: [
- {
- value: "1",
- label: "鐩戞祴璇勪及",
- },
- {
- value: "2",
- label: "鍑洪櫌闅忚",
- },
- {
- value: "3",
- label: "闂ㄨ瘖闅忚",
- },
- {
- value: "4",
- label: "瀹f暀鍏虫��",
- },
- {
- value: "5",
- label: "澶嶈瘖绠$悊",
- },
- // {
- // value: "5",
- // label: "婊℃剰搴﹁皟鏌�",
- // },
- {
- value: "7",
- label: "鎮h�呮姤鍛�",
- },
- // {
- // value: "8",
- // label: "鍏朵粬閫氱煡",
- // },
- {
- value: "9",
- label: "浣撴闅忚",
- },
- // {
- // value: "10",
- // label: "鍖绘妧闅忚",
- // },
- {
- value: "11",
- label: "褰卞儚闅忚",
- },
- {
- value: "12",
- label: "蹇冪數闅忚",
- },
- // {
- // value: "13",
- // label: "涓撶梾闅忚",
- // },
- ],
+ taskoptions: store.getters.tasktypes,
tasktopic: "2", //鏂板绫诲瀷
activname: "",
value: [],
diff --git a/src/views/patient/patient/AwaitingAdmission.vue b/src/views/patient/patient/AwaitingAdmission.vue
new file mode 100644
index 0000000..f692a80
--- /dev/null
+++ b/src/views/patient/patient/AwaitingAdmission.vue
@@ -0,0 +1,1257 @@
+<template>
+ <div class="app-container">
+ <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="濮撳悕" width="100" prop="name">
+ <el-input
+ v-model="queryParams.patname"
+ placeholder="璇疯緭鍏ュ鍚�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="璇婃柇" width="100" prop="name">
+ <el-input
+ v-model="queryParams.diagname"
+ placeholder="璇疯緭鍏ヨ瘖鏂�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="绉戝" width="100" prop="name">
+ <el-input
+ v-model="queryParams.deptname"
+ placeholder="璇疯緭鍏ョ瀹ゅ悕绉�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鍖荤敓" width="100" prop="name">
+ <el-input
+ v-model="queryParams.drname"
+ placeholder="璇疯緭鍏ュ尰鐢熷鍚�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鐥呮鍙�" prop="outhospno">
+ <el-input
+ v-model="queryParams.outhospno"
+ placeholder="璇疯緭鍏ョ梾妗堝彿"
+ clearable
+ style="width: 250px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+
+ <el-form-item label="鎮h�呰寖鍥�" prop="status">
+ <el-cascader
+ v-model="queryParams.scopetype"
+ placeholder="榛樿鍏ㄩ儴"
+ :options="sourcetype"
+ :props="{ expandTrigger: 'hover' }"
+ @change="handleChange"
+ ></el-cascader>
+ </el-form-item>
+ <el-form-item label="灏辫瘖鏃ユ湡">
+ <el-date-picker
+ v-model="dateRange"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ <!-- <el-date-picker
+ v-model="dateRange"
+ type="datetimerange"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ :default-time="['12:00:00']"
+ >
+ </el-date-picker> -->
+ </el-form-item>
+ <el-row>
+ <!-- <el-form-item label=" 灏辫瘖鏃ユ湡 " prop="admitdate">
+ <el-date-picker
+ clearable
+ v-model="queryParams.admitdate"
+ type="date"
+ value-format="yyyy-MM-dd"
+ 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-row>
+ </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="handleAdd"
+ v-hasPermi="['system:user:add']"
+ >鏂板</el-button
+ >
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-edit"
+ size="medium"
+ :disabled="single"
+ @click="handleUpdate"
+ v-hasPermi="['system:user:edit']"
+ >淇敼</el-button
+ >
+ </el-col> -->
+ <el-col :span="1.5">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-delete"
+ size="medium"
+ :disabled="multiple"
+ @click="handleDelete"
+ v-hasPermi="['system:user:remove']"
+ >鍒犻櫎</el-button
+ >
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-plus"
+ size="medium"
+ :disabled="multiple"
+ @click="handleBatchAddTask"
+ >
+ 鎵归噺鍙戦�佸叆闄㈤�氱煡</el-button
+ >
+ </el-col>
+ <el-col :span="19">
+ <div class="documentf">
+ <div class="document">
+ <el-button
+ type="info"
+ plain
+ icon="el-icon-upload2"
+ size="medium"
+ @click="handleImport"
+ v-hasPermi="['system:user:import']"
+ >瀵煎叆</el-button
+ >
+ </div>
+ <div class="document">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="medium"
+ @click="handleExport"
+ v-hasPermi="['system:user:export']"
+ >瀵煎嚭</el-button
+ >
+ </div>
+ </div>
+ </el-col>
+ <!-- <el-col :span="1.5"> </el-col> -->
+ </el-row>
+
+ <el-table
+ v-loading="loading"
+ :data="userList"
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="50" align="center" />
+ <!-- <el-table-column
+ label="搴忓彿"
+ fixed
+ align="center"
+ key="id"
+ prop="id"
+ /> -->
+ <el-table-column
+ label="灏辫瘖鏃堕棿"
+ align="center"
+ key="admitdate"
+ prop="admitdate"
+ width="160"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.admitdate) }}</span>
+ </template>
+ </el-table-column>
+ <!-- <el-table-column
+ label="鐥呮鍙�"
+ align="center"
+ key="patno"
+ prop="patno"
+ /> -->
+ <el-table-column
+ label="鐥呮鍙�"
+ align="center"
+ key="outhospno"
+ prop="outhospno"
+ />
+ <el-table-column
+ label="濮撳悕"
+ width="100"
+ align="center"
+ key="patname"
+ prop="patname"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ gettoken360(
+ scope.row.idcardno,
+ scope.row.drcode,
+ scope.row.drname
+ )
+ "
+ ><span class="button-textsc">{{
+ scope.row.patname
+ }}</span></el-button
+ >
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎬у埆"
+ width="100"
+ align="center"
+ key="sex"
+ prop="sex"
+ >
+ <template slot-scope="scope">
+ <span>{{ scope.row.sex == 1 ? "鐢�" : "濂�" }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="骞撮緞"
+ align="center"
+ key="age"
+ prop="age"
+ width="120"
+ />
+ <el-table-column
+ label="鑱旂郴鐢佃瘽"
+ align="center"
+ key="telcode"
+ prop="telcode"
+ width="120"
+ />
+ <!-- <el-table-column
+ label="鎮h�呮爣绛撅紙缂猴級"
+ align="center"
+ key="tagList"
+ prop="tagList"
+ width="160"
+ :show-overflow-tooltip="true"
+ >
+ <template slot-scope="scope">
+ <span v-for="item in scope.row.tagList">{{ item }} </span>
+ </template>
+ </el-table-column> -->
+
+ <el-table-column
+ label="璇婃柇"
+ align="center"
+ key="diagname"
+ prop="diagname"
+ width="190"
+ />
+ <!-- <el-table-column
+ label="涓昏堪"
+ align="center"
+ key="mainsuit"
+ prop="mainsuit"
+ width="120"
+ /> -->
+ <el-table-column
+ label="灏辫瘖绉戝"
+ align="center"
+ key="deptname"
+ prop="deptname"
+ width="120"
+ />
+ <el-table-column
+ label="鎺ヨ瘖鍖荤敓"
+ align="center"
+ key="drname"
+ prop="drname"
+ width="120"
+ />
+ <el-table-column
+ label="鎿嶄綔"
+ fixed="right"
+ align="center"
+ width="160"
+ class-name="small-padding fixed-width"
+ >
+ <template slot-scope="scope">
+ <el-button
+ size="medium"
+ type="text"
+ @click="
+ $router.push({
+ path: '/patient/patient/profile/',
+ query: { id: scope.row.patid },
+ })
+ "
+ v-hasPermi="['system:user:edit']"
+ ><span class="button-textsc"
+ ><i class="el-icon-zoom-in"></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>
+ <el-dialog
+ title="鎵归噺娣诲姞浠诲姟"
+ :visible.sync="batchTaskVisible"
+ width="90%"
+ append-to-body
+ >
+ <el-row :gutter="20">
+ <!-- 宸︿晶锛氶�変腑鎮h�呭垪琛� -->
+ <el-col :span="12">
+ <div class="batch-patient-section">
+ <h4>閫変腑鎮h�咃紙{{ selectedPatients.length }}浜猴級</h4>
+ <el-table
+ :data="selectedPatients"
+ border
+ style="width: 100%"
+ size="small"
+ >
+ <el-table-column prop="patname" label="濮撳悕" width="100" />
+ <el-table-column prop="sex" label="鎬у埆" width="80">
+ <template slot-scope="scope">
+ {{ scope.row.sex === 1 ? "鐢�" : "濂�" }}
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="灏辫瘖鏃堕棿"
+ align="center"
+ key="admitdate"
+ prop="admitdate"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.admitdate) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="outhospno" label="鐥呮鍙�" />
+ <el-table-column prop="deptname" label="绉戝" />
+ </el-table>
+ </div>
+ </el-col>
+
+ <!-- 鍙充晶锛氫换鍔″垪琛� -->
+ <el-col :span="12">
+ <div class="batch-task-section">
+ <h4>浠诲姟鍒楄〃锛堣閫夋嫨1涓换鍔★級</h4>
+ <el-table
+ :data="taskList"
+ border
+ style="width: 100%"
+ size="small"
+ @current-change="handleTaskSelectionChange"
+ highlight-current-row
+ >
+ <el-table-column
+ label="浠诲姟鍚嶇О"
+ fixed
+ align="center"
+ key="taskName"
+ prop="taskName"
+ :show-overflow-tooltip="true"
+ />
+
+ <el-table-column
+ label="鏈嶅姟椤圭洰"
+ align="center"
+ key="templatename"
+ prop="templatename"
+ :show-overflow-tooltip="true"
+ />
+
+ <el-table-column
+ label="鍒涘缓浜�"
+ align="center"
+ key="createBy"
+ prop="createBy"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="鍒涘缓鏃堕棿"
+ sortable
+ align="center"
+ prop="createTime"
+ >
+ <template slot-scope="scope">
+ <span>{{ formatTime(scope.row.createTime) }}</span>
+ </template>
+ </el-table-column>
+ <template #empty>
+ <div class="empty-message">
+ <i class="el-icon-warning"></i>
+ <span>鎮h�呯瀹ゆ棤鍖归厤鏈嶅姟</span>
+ </div>
+ </template>
+ </el-table>
+ </div>
+ </el-col>
+ </el-row>
+
+ <!-- 搴曢儴鎸夐挳 -->
+ <div slot="footer" class="dialog-footer">
+ <el-button @click="batchTaskVisible = false">鍙� 娑�</el-button>
+ <el-button
+ type="primary"
+ :loading="batchLoading"
+ @click="submitBatchTask"
+ >鍒涘缓浠诲姟</el-button
+ >
+ </div>
+ </el-dialog>
+ <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
+ <el-dialog
+ :title="upload.title"
+ :visible.sync="upload.open"
+ width="70%"
+ append-to-body
+ >
+ <el-steps :active="dractive" simple>
+ <el-step title="涓婁紶瀵煎叆鏂囦欢" icon="el-icon-upload"></el-step>
+ <el-step title="瀵煎叆妫�鏌�" icon="el-icon-picture"></el-step>
+ <el-step title="瀵煎叆缁撴灉" icon="el-icon-picture"></el-step>
+ </el-steps>
+ <!-- 涓婁紶瀵煎叆鏂囦欢 -->
+ <div class="download" v-if="dractive == 1">
+ <el-upload
+ class="upload-demo"
+ ref="upload"
+ :limit="1"
+ accept=".xlsx, .xls"
+ :headers="upload.headers"
+ :action="upload.url + '?updateSupport=' + upload.updateSupport"
+ :disabled="upload.isUploading"
+ :on-progress="handleFileUploadProgress"
+ :on-success="handleFileSuccess"
+ :auto-upload="false"
+ drag
+ >
+ <i class="el-icon-upload"></i>
+ <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+ <div class="el-upload__tip text-center" slot="tip">
+ <div class="el-upload__tip" slot="tip">
+ <el-checkbox v-model="upload.updateSupport" />
+ 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
+ </div>
+ <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
+ <el-link
+ type="primary"
+ :underline="false"
+ style="font-size: 24px; vertical-align: baseline"
+ @click="importTemplate"
+ >涓嬭浇妯℃澘</el-link
+ >
+ </div>
+ </el-upload>
+ </div>
+
+ <!-- 瀵煎叆妫�鏌� -->
+ <div class="uploading" v-else-if="dractive == 2">
+ <el-table :data="uploadingData" style="width: 100%">
+ <el-table-column prop="serial" label="搴忓彿"> </el-table-column>
+ <el-table-column prop="name" label="濮撳悕" width="100">
+ </el-table-column>
+ <el-table-column prop="sex" label="鎬у埆" width="100">
+ </el-table-column>
+ <el-table-column prop="certificate" label="璇佷欢绫诲瀷">
+ </el-table-column>
+ <el-table-column prop="certificatenum" label="璇佷欢鍙风爜">
+ </el-table-column>
+ <el-table-column prop="goday" label="鍑虹敓鏃ユ湡"> </el-table-column>
+ <el-table-column prop="menum" label="鏈汉鑱旂郴鏂瑰紡"> </el-table-column>
+ <el-table-column prop="younum" label="浜插睘鑱旂郴鏂瑰紡">
+ </el-table-column>
+ <el-table-column prop="tag" label="鎮h�呮爣绛�"> </el-table-column>
+ <el-table-column prop="erry" label="閿欒鍘熷洜"> </el-table-column>
+ </el-table>
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="geterryList"
+ />
+ </div>
+ <!-- 瀹屾垚 -->
+ <div class="drexamine" v-else-if="dractive == 3">
+ <img
+ src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
+ />
+ <p>瀵煎叆鎮h�呮垚鍔燂紒</p>
+ <p>鏈鍏辫瀵煎叆{{ ImportQuantity }}浣嶆偅鑰�</p>
+ </div>
+
+ <div slot="footer" class="dialog-footer" v-if="dractive == 3">
+ <!-- <el-button type="primary" @click="submitFileForm">涓嬩竴姝�</el-button> -->
+ <el-button @click="submitclose">瀹屾垚</el-button>
+ </div>
+ <div slot="footer" v-else>
+ <el-button type="primary" @click="submitFileForm">涓嬩竴姝�</el-button>
+ <el-button @click="submitclose">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { delUser } from "@/api/system/user";
+
+import {
+ listPatouthosp,
+ getPatouthosp,
+ addPatouthosp,
+ updatePatouthosp,
+ delPatouthosp,
+} from "@/api/smartor/patouthosp";
+import { particularpatient } from "@/api/patient/homepage";
+import { listtag } from "@/api/system/label";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { query360PatInfo, getTasklist, addSubtask } from "@/api/AiCentre/index";
+
+import store from "@/store";
+import { type } from "jquery";
+
+export default {
+ name: "Userhuanze",
+ dicts: ["sys_normal_disable", "sys_user_sex"],
+ components: { Treeselect },
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 鐢ㄦ埛琛ㄦ牸鏁版嵁
+ userList: null,
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 閮ㄩ棬鏍戦�夐」
+ deptOptions: undefined,
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 閮ㄩ棬鍚嶇О
+ deptName: undefined,
+ // 榛樿瀵嗙爜
+ initPassword: undefined,
+ amendtag: false, //鏄惁淇敼
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ paperstypes: [
+ { papersname: "韬唤璇�" },
+ { papersname: "鎶ょ収" },
+ { papersname: "涓浗娓境灞呮皯韬唤璇�" },
+ { papersname: "涓浗鍙版咕灞呮皯韬唤璇�" },
+ ],
+ // 琛ㄥ崟鍙傛暟
+ form: {
+ name: "",
+ age: "",
+ sex: "",
+ tagList: [],
+ idcardno: "",
+ telcode: "",
+ idcardtype: "",
+ relativetelcode: "",
+ },
+ //瀵煎叆杩涘害
+ dractive: 1,
+ // 瀵煎叆灞曠ず琛ㄥ崟
+ uploadingData: {},
+ total: 0, // 鎬绘潯鏁�
+ ImportQuantity: 999, //瀵煎叆鎮h�呮暟閲�
+ Labelchange: false, //淇敼鏂板寮圭獥
+ propss: { multiple: true },
+ optionstag: [], //鏍囩鍒楄〃
+ batchTaskVisible: false, // 寮圭獥鍙鎬�
+ selectedPatients: [], // 閫変腑鐨勬偅鑰呭垪琛�
+ taskList: [], // 浠诲姟鍒楄〃
+ selectedTask: null, // 閫変腑鐨勪换鍔″垪琛�
+ batchLoading: false, // 鎵归噺鎻愪氦鍔犺浇鐘舵��
+ deptcode: "",
+ Patientrange: [
+ {
+ name: "鍏ㄩ儴",
+ id: 999,
+ },
+ {
+ name: "褰撳墠绉戝",
+ id: 1,
+ },
+ ],
+ postData: {
+ XiaoXiTou: {
+ FaSongFCSJC: "ZJHES",
+ FaSongJGID: localStorage.getItem("orgid"),
+ FaSongJGMC: localStorage.getItem("orgname"),
+ FaSongSJ: "2025-01-09聽17:29:36",
+ FaSongXTJC: "SUIFANGXT",
+ FaSongXTMC: "闅忚绯荤粺",
+ XiaoXiID: "5FA92AFB-9833-4608-87C7-F56A654AC171",
+ XiaoXiLX: "SC_LC_360STCX",
+ XiaoXiMC: "360聽瑙嗗浘鏌ヨ",
+ ZuHuID: localStorage.getItem("ZuHuID"),
+ ZuHuMC: localStorage.getItem("orgname"),
+ },
+ YeWuXX: {
+ BingRenXX: {
+ ZhengJianHM: "",
+ ZhengJianLXDM: "01",
+ ZhengJianLXMC: "灞呮皯韬唤璇�",
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ },
+ YongHuXX: {
+ XiTongID: "SUIFANGXT",
+ XiTongMC: "闅忚绯荤粺",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
+ ZuZhiJGID: localStorage.getItem("orgid"),
+ ZuZhiJGMC: localStorage.getItem("orgname"),
+ idp: "lyra",
+ },
+ },
+ },
+ defaultProps: {
+ children: "children",
+ label: "label",
+ },
+ sourcetype: [
+ {
+ value: 1,
+ label: "绉戝",
+ children: [],
+ },
+ {
+ value: 2,
+ label: "鐥呭尯",
+ children: [],
+ },
+ {
+ value: 3,
+ label: "鍏ㄩ儴",
+ },
+ ],
+ // 鐢ㄦ埛瀵煎叆鍙傛暟
+ upload: {
+ // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛�
+ open: false,
+ // 寮瑰嚭灞傛爣棰橈紙鐢ㄦ埛瀵煎叆锛�
+ title: "",
+ // 鏄惁绂佺敤涓婁紶
+ isUploading: false,
+ // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
+ updateSupport: 0,
+ // 璁剧疆涓婁紶鐨勮姹傚ご閮�
+ headers: { Authorization: "Bearer " + getToken() },
+ // 涓婁紶鐨勫湴鍧�
+ url: process.env.VUE_APP_BASE_API + "/system/user/importData",
+ },
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ searchscope: 3,
+ scopetype: [],
+ deptcodes: [],
+ },
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ // userName: [
+ // { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
+ // {
+ // min: 2,
+ // max: 20,
+ // message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
+ // trigger: "blur",
+ // },
+ // ],
+ // nickName: [
+ // { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" },
+ // ],
+ // password: [
+ // { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
+ // {
+ // min: 5,
+ // max: 20,
+ // message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+ // trigger: "blur",
+ // },
+ // ],
+ // email: [
+ // {
+ // type: "email",
+ // message: "璇疯緭鍏ユ纭殑閭鍦板潃",
+ // trigger: ["blur", "change"],
+ // },
+ // ],
+ // phonenumber: [
+ // {
+ // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+ // message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
+ // trigger: "blur",
+ // },
+ // ],
+ // IDnumber: [
+ // {
+ // pattern:
+ // /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
+ // message: "璇疯緭鍏ユ纭殑韬唤璇佸彿鐮�",
+ // trigger: "blur",
+ // },
+ // ],
+ },
+ };
+ },
+ watch: {
+ // 鏍规嵁鍚嶇О绛涢�夐儴闂ㄦ爲
+ deptName(val) {
+ this.$refs.tree.filter(val);
+ },
+ },
+ created() {
+ this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
+ return {
+ label: dept.deptName,
+ value: dept.deptCode,
+ };
+ });
+ this.sourcetype[1].children = store.getters.belongWards.map((dept) => {
+ return {
+ label: dept.districtName,
+ value: dept.districtCode,
+ };
+ });
+ this.getList();
+ this.gettabList();
+ },
+ methods: {
+ /** 鏌ヨ鎮h�呭垪琛� */
+ getList() {
+ this.loading = true;
+ if (this.queryParams.searchscope == 3) {
+ this.queryParams.deptcodes = store.getters.belongDepts.map(
+ (obj) => obj.deptCode
+ );
+ // this.queryParams.leavehospitaldistrictcodes =
+ // store.getters.belongWards.map((obj) => obj.districtCode);
+ }
+ if (this.dateRange) {
+ this.queryParams.beginTime = this.dateRange[0];
+ this.queryParams.endTime = this.dateRange[1];
+ } else {
+ this.queryParams.beginTime = "";
+ this.queryParams.endTime = "";
+ }
+ listPatouthosp(this.queryParams).then((response) => {
+ this.userList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ /** 鏌ヨ鏍囩鍒楄〃 */
+ gettabList() {
+ const tagqueryParams = {
+ pageNum: 1,
+ pageSize: 1000,
+ tagname: undefined,
+ tagdescription: undefined,
+ tagcategoryid: "0",
+ };
+ listtag(tagqueryParams).then((response) => {
+ console.log(response);
+ this.optionstag = response.rows;
+ });
+ },
+ // 鎮h�呰寖鍥村鐞�
+ handleChange(value) {
+ let type = value[0];
+ let code = value.slice(-1)[0];
+ // this.queryParams.leavehospitaldistrictcodes = [];
+ this.queryParams.deptcodes = [];
+
+ if (type == 1) {
+ this.queryParams.deptcodes.push(code);
+ // this.queryParams.leavehospitaldistrictcodes = [];
+ this.queryParams.searchscope = 1;
+ } else if (type == 2) {
+ // this.queryParams.leavehospitaldistrictcodes.push(code);
+ this.queryParams.deptcodes = [];
+ this.queryParams.searchscope = 2;
+ } else {
+ this.queryParams.searchscope = 3;
+ }
+ },
+ // 鏌ヨ瀵煎叆灞曠ず鍒楄〃
+ geterryList() {
+ this.loading = true;
+ listJob(this.queryParams).then((response) => {
+ this.jobList = 1;
+ this.total = 1;
+ this.loading = false;
+ });
+ },
+ //鎮h��360璺宠浆
+ gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
+ this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
+
+ query360PatInfo(this.postData).then((res) => {
+ if (res.data.url) {
+ window.open(res.data.url, "_blank");
+ // this.linkUrl = res.data.url;
+ } else {
+ this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
+ }
+ });
+ },
+ // 绛涢�夎妭鐐�
+ filterNode(value, data) {
+ if (!value) return true;
+ return data.label.indexOf(value) !== -1;
+ },
+ // 鑺傜偣鍗曞嚮浜嬩欢
+ handleNodeClick(data) {
+ this.queryParams.deptId = data.id;
+ this.handleQuery();
+ },
+
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.Labelchange = false;
+ this.reset();
+ },
+ // 琛ㄥ崟閲嶇疆
+ reset() {
+ this.form = {
+ name: "",
+ age: "",
+ sex: "",
+ tagList: [],
+ idcardno: "",
+ telcode: "",
+ idcardtype: "",
+ relativetelcode: "",
+ };
+ // this.resetForm("form");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.resetForm("queryForm");
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ searchscope: 3,
+ scopetype: [],
+ deptcodes: [],
+ // leavehospitaldistrictcodes: [],
+ };
+ this.handleQuery();
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map((item) => item.patid);
+ this.single = selection.length != 1;
+ this.multiple = !selection.length;
+ },
+
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.reset();
+ this.Labelchange = true;
+ this.amendtag = false;
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ console.log(row);
+ const userIds = row.patid || this.ids;
+ particularpatient(userIds).then((response) => {
+ console.log(response);
+ this.form = response.data;
+ });
+ this.amendtag = true;
+ this.Labelchange = true;
+ },
+
+ //淇敼/鏂板鎮h��
+ submitForm() {
+ if (this.amendtag) {
+ console.log(22);
+ this.form.isoperation = 2;
+ } else {
+ this.form.isoperation = 1;
+ }
+ alterpatient(this.form)
+ .then((response) => {
+ console.log(response);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("淇濆瓨鎴愬姛");
+ });
+ this.reset();
+ // this.idds = "";
+ this.Labelchange = false;
+ },
+
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const userIds = row.userId || this.ids;
+ this.$modal
+ .confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
+ .then(function () {
+ return deletepatient(userIds);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ })
+ .catch(() => {});
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.download(
+ "smartor/patarchive/export",
+ {
+ ...this.queryParams,
+ },
+ `user_${new Date().getTime()}.xlsx`
+ );
+ },
+ /** 瀵煎叆鎸夐挳鎿嶄綔 */
+ handleImport() {
+ this.upload.title = "鐢ㄦ埛瀵煎叆";
+ this.upload.open = true;
+ },
+ /** 涓嬭浇妯℃澘鎿嶄綔 */
+ importTemplate() {
+ this.download(
+ "smartor/import/getImportPatTemplate",
+ {},
+ `user_template_${new Date().getTime()}.xlsx`
+ );
+ },
+ // 鏂囦欢涓婁紶涓鐞�
+ handleFileUploadProgress(event, file, fileList) {
+ this.upload.isUploading = true;
+ },
+ // 鏂囦欢涓婁紶鎴愬姛澶勭悊
+ handleFileSuccess(response, file, fileList) {
+ this.upload.open = false;
+ this.upload.isUploading = false;
+ this.$refs.upload.clearFiles();
+ this.$alert(
+ "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+ response.msg +
+ "</div>",
+ "瀵煎叆缁撴灉",
+ { dangerouslyUseHTMLString: true }
+ );
+ this.getList();
+ },
+ // 鎻愪氦涓婁紶鏂囦欢
+ submitFileForm() {
+ // 涓婁紶
+ if (this.dractive == 1) {
+ this.$refs.upload.submit();
+ this.dractive++;
+ } else {
+ this.dractive++;
+ }
+ },
+ submitclose() {
+ this.upload.open = false;
+ this.dractive = 1;
+ },
+ /** 鎵归噺娣诲姞浠诲姟鎸夐挳鐐瑰嚮 */
+ handleBatchAddTask() {
+ // 鏍¢獙鏄惁閫変腑鎮h��
+ if (this.ids.length === 0) {
+ this.$modal.msgWarning("璇疯嚦灏戦�変腑1鍚嶆偅鑰�");
+ return;
+ }
+ // 妫�鏌ラ�変腑鐨勬偅鑰呬腑鏄惁鏈夊凡鏈変换鍔$殑
+ const hasTaskPatients = this.userList.filter(
+ (item) => this.ids.includes(item.patid) && item.serverState == 1
+ );
+
+ if (hasTaskPatients.length > 0) {
+ const patientNames = hasTaskPatients.map((p) => p.patname).join("銆�");
+ this.$modal.msgError(
+ `閫変腑鐨勬偅鑰� ${patientNames} 宸叉湁浠诲姟锛屾棤娉曢噸澶嶆坊鍔燻
+ );
+ return;
+ }
+ // 鑾峰彇閫変腑鎮h�呯殑绉戝淇℃伅锛堢敤浜庢牎楠屽悓涓�绉戝锛�
+ const patientDepts = new Set();
+ let deptcode = "";
+ this.ids.forEach((patId) => {
+ const patient = this.userList.find((item) => item.patid === patId);
+ if (patient) {
+ patientDepts.add(patient.deptname);
+ deptcode = patient.deptcode;
+ }
+ });
+
+ // 鏍¢獙鏄惁鍚屼竴绉戝
+ // if (patientDepts.size > 1) {
+ // this.$modal.msgError("閫変腑鐨勬偅鑰呬笉灞炰簬鍚屼竴绉戝锛屾棤娉曟壒閲忔坊鍔犱换鍔�");
+ // return;
+ // }
+
+ // 鑾峰彇閫変腑鎮h�呭垪琛�
+ this.selectedPatients = this.userList.filter((item) =>
+ this.ids.includes(item.patid)
+ );
+
+ // 鏄剧ず寮圭獥
+ this.batchTaskVisible = true;
+
+ // 鑾峰彇浠诲姟鍒楄〃
+ this.loadTaskList(deptcode);
+ },
+
+ /** 鍔犺浇浠诲姟鍒楄〃 */
+ loadTaskList(deptcode) {
+ this.batchLoading = true;
+ let topqueryParams = {
+ pageNum: 1,
+ pageSize: 10,
+ serviceType: 3,
+ type: 2,
+ };
+ // deptcode: deptcode,鍙栨秷绉戝闄愬埗
+ getTasklist(topqueryParams).then((response) => {
+ this.taskList = response.rows;
+ this.batchLoading = false;
+ });
+ },
+
+ /** 澶勭悊浠诲姟閫夋嫨鍙樺寲 */
+ handleTaskSelectionChange(currentRow) {
+ this.selectedTask = currentRow;
+ },
+
+ // 閲嶅啓鎵归噺鎻愪氦鏂规硶
+ async submitBatchTask() {
+ // 鏍¢獙鏄惁閫変腑浠诲姟
+ if (!this.selectedTask) {
+ this.$modal.msgWarning("璇烽�夋嫨1涓换鍔�");
+ return;
+ }
+
+ this.batchLoading = true;
+ const successPatients = [];
+ const failedPatients = [];
+
+ try {
+ // 閬嶅巻閫変腑鐨勬偅鑰咃紝閫愪釜璋冪敤鎺ュ彛
+ for (const patient of this.selectedPatients) {
+ const params = {
+ taskid: this.selectedTask.taskid,
+ type: this.selectedTask.type,
+ taskName: this.selectedTask.taskName,
+ serviceType: this.selectedTask.serviceType,
+ preachform: this.selectedTask.preachform,
+ templateid: this.selectedTask.templateid,
+ libtemplateid: this.selectedTask.libtemplateid,
+ sendstate: 2,
+ ...patient,
+ sendname: patient.patname,
+ endtime: patient.admitdate + " 00:00:00",
+ leavediagname: patient.diagname,
+ age: "",
+ };
+
+ try {
+ await addSubtask(params);
+ successPatients.push(patient.patname);
+ } catch (error) {
+ failedPatients.push(patient.patname);
+ }
+ }
+
+ // 鏄剧ず澶勭悊缁撴灉
+ let message = `鎴愬姛涓� ${successPatients.length} 鍚嶆偅鑰呮坊鍔犱换鍔;
+ if (failedPatients.length > 0) {
+ message += `锛�${failedPatients.length} 鍚嶆偅鑰呮坊鍔犲け璐;
+ }
+ this.$modal.msgSuccess(message);
+
+ this.batchTaskVisible = false;
+ this.getList(); // 鍒锋柊鎮h�呭垪琛�
+ } catch (error) {
+ this.$modal.msgError("鎵归噺娣诲姞浠诲姟杩囩▼涓嚭閿�");
+ } finally {
+ this.batchLoading = false;
+ }
+ },
+
+ /** 鎵归噺娣诲姞鎮h�呬换鍔℃帴鍙� */
+ batchAddPatientTask(params) {},
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-button--primary.is-plain {
+ color: #ffffff;
+ background: #409eff;
+ border-color: #4fabe9;
+}
+.document {
+ width: 100px;
+ height: 50px;
+}
+.documentf {
+ display: flex;
+ justify-content: flex-end;
+}
+.download {
+ text-align: center;
+ .el-upload__tip {
+ font-size: 23px;
+ }
+ .el-upload__text {
+ font-size: 23px;
+ }
+}
+.uploading {
+ margin-top: 20px;
+ margin: 20px;
+ padding: 30px;
+ background: #ffffff;
+ 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);
+}
+.drexamine {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 30px;
+ background: #daeaf5;
+ img {
+ width: 100px;
+ height: 100px;
+ }
+}
+.button-textsc {
+ color: #3664d9;
+}
+.batch-patient-section,
+.batch-task-section {
+ padding: 15px;
+ border: 1px solid #ebeef5;
+ border-radius: 4px;
+ margin-bottom: 15px;
+}
+
+.el-table--enable-row-hover .el-table__body tr:hover > td {
+ background-color: #f5f7fa;
+}
+.el-table__body tr.current-row > td {
+ background-color: #e6f7ff;
+}
+
+/* 绂佺敤鐘舵�佷笅鎸夐挳鏍峰紡 */
+.el-button.is-disabled {
+ cursor: not-allowed;
+}
+.batch-patient-section h4,
+.batch-task-section h4 {
+ margin-top: 0;
+ margin-bottom: 15px;
+ color: #303133;
+ font-size: 16px;
+}
+
+/* 琛ㄦ牸鏍峰紡浼樺寲 */
+.el-table {
+ margin-bottom: 10px;
+}
+
+/* 寮圭獥搴曢儴鎸夐挳闂磋窛 */
+.dialog-footer {
+ text-align: right;
+ padding: 10px 20px 20px;
+}
+</style>
diff --git a/src/views/patient/patient/ExternalPatient.vue b/src/views/patient/patient/ExternalPatient.vue
index 5f20aaa..69e7a2d 100644
--- a/src/views/patient/patient/ExternalPatient.vue
+++ b/src/views/patient/patient/ExternalPatient.vue
@@ -384,7 +384,7 @@
</el-row>
<el-row v-if="!amendtag">
<el-col :span="8">
- <el-form-item label="姘戞棌" prop="name">
+ <el-form-item label="姘戞棌" prop="nation">
<el-input
v-model="form.nation"
placeholder="璇疯緭鍏ユ皯鏃�"
@@ -393,7 +393,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
- <el-form-item label="绫嶈疮" prop="age">
+ <el-form-item label="绫嶈疮" prop="nativePlace">
<el-input
v-model="form.nativePlace"
placeholder="璇疯緭鍏ョ睄璐�"
@@ -414,7 +414,7 @@
<el-row v-if="!amendtag">
<el-col :span="12">
- <el-form-item label="鍑虹敓鍦�" prop="idcardno">
+ <el-form-item label="鍑虹敓鍦�">
<el-input
v-model="form.birthplace"
placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅"
@@ -422,7 +422,7 @@
/>
</el-form-item> </el-col
><el-col :span="12">
- <el-form-item label="灞呬綇鍦�" prop="idcardno">
+ <el-form-item label="灞呬綇鍦�">
<el-input
v-model="form.placeOfResidence"
placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅"
@@ -1178,10 +1178,12 @@
font-size: 20px;
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
.leftvlue {
@@ -1245,7 +1247,7 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
}
.button-textxg {
color: #de7897;
diff --git a/src/views/patient/patient/behospitalized.vue b/src/views/patient/patient/behospitalized.vue
index e6f8312..a368496 100644
--- a/src/views/patient/patient/behospitalized.vue
+++ b/src/views/patient/patient/behospitalized.vue
@@ -480,8 +480,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -718,11 +718,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -949,6 +948,6 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
}
</style>
diff --git a/src/views/patient/patient/hospital.vue b/src/views/patient/patient/hospital.vue
index de94d9e..6961289 100644
--- a/src/views/patient/patient/hospital.vue
+++ b/src/views/patient/patient/hospital.vue
@@ -511,8 +511,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -653,11 +653,10 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
+
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -947,6 +946,6 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
}
</style>
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index 18b054b..949a934 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -185,7 +185,6 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
icon="el-icon-s-promotion"
size="medium"
@click="distribute"
@@ -1027,8 +1026,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -1196,11 +1195,9 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh,drcode,drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC=='涓芥按甯備腑鍖婚櫌') {
- this.postData.YeWuXX.YongHuXX.YongHuID = '1400398571877961728';
- this.postData.YeWuXX.YongHuXX.YongHuXM = 'LSZYY';
- }
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
window.open(res.data.url, "_blank");
@@ -1534,10 +1531,12 @@
font-size: 20px;
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
.leftvlue {
@@ -1602,7 +1601,10 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
+}
+.button-textxga {
+ color: #de7897;
}
.button-textxg {
color: #de7897;
diff --git a/src/views/patient/patient/indexls.vue b/src/views/patient/patient/indexls.vue
index d3db66c..01ed808 100644
--- a/src/views/patient/patient/indexls.vue
+++ b/src/views/patient/patient/indexls.vue
@@ -188,8 +188,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
diff --git a/src/views/patient/patient/operation.vue b/src/views/patient/patient/operation.vue
index d6df8aa..261b8a9 100644
--- a/src/views/patient/patient/operation.vue
+++ b/src/views/patient/patient/operation.vue
@@ -743,6 +743,6 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
}
</style>
diff --git a/src/views/patient/patient/outpatient.vue b/src/views/patient/patient/outpatient.vue
index 3952a15..8cb1bc5 100644
--- a/src/views/patient/patient/outpatient.vue
+++ b/src/views/patient/patient/outpatient.vue
@@ -590,6 +590,7 @@
import { query360PatInfo, getTasklist, addSubtask } from "@/api/AiCentre/index";
import store from "@/store";
+import { type } from "jquery";
export default {
name: "Userhuanze",
@@ -691,8 +692,8 @@
YongHuXX: {
XiTongID: "SUIFANGXT",
XiTongMC: "闅忚绯荤粺",
- YongHuID: "1400466972205912064",
- YongHuXM: "JNRMYY",
+ YongHuID: localStorage.getItem("YongHuID"),
+ YongHuXM: localStorage.getItem("YongHuXM"),
ZuZhiJGID: localStorage.getItem("orgid"),
ZuZhiJGMC: localStorage.getItem("orgname"),
idp: "lyra",
@@ -740,8 +741,7 @@
pageSize: 10,
searchscope: 3,
scopetype: [],
- leaveldeptcodes: [],
- leavehospitaldistrictcodes: [],
+ deptcodes: [],
},
// 琛ㄥ崟鏍¢獙
rules: {
@@ -818,11 +818,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 +855,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;
@@ -881,11 +881,9 @@
},
//鎮h��360璺宠浆
gettoken360(sfzh, drcode, drname) {
+ // this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�');
+
this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
- if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") {
- this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
- this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
- }
query360PatInfo(this.postData).then((res) => {
if (res.data.url) {
@@ -940,8 +938,8 @@
pageSize: 10,
searchscope: 3,
scopetype: [],
- leaveldeptcodes: [],
- leavehospitaldistrictcodes: [],
+ deptcodes: [],
+ // leavehospitaldistrictcodes: [],
};
this.handleQuery();
},
@@ -1091,10 +1089,10 @@
});
// 鏍¢獙鏄惁鍚屼竴绉戝
- if (patientDepts.size > 1) {
- this.$modal.msgError("閫変腑鐨勬偅鑰呬笉灞炰簬鍚屼竴绉戝锛屾棤娉曟壒閲忔坊鍔犱换鍔�");
- return;
- }
+ // if (patientDepts.size > 1) {
+ // this.$modal.msgError("閫変腑鐨勬偅鑰呬笉灞炰簬鍚屼竴绉戝锛屾棤娉曟壒閲忔坊鍔犱换鍔�");
+ // return;
+ // }
// 鑾峰彇閫変腑鎮h�呭垪琛�
this.selectedPatients = this.userList.filter((item) =>
@@ -1116,8 +1114,8 @@
pageSize: 10,
serviceType: 3,
type: 2,
- deptcode: deptcode,
};
+ // deptcode: deptcode,鍙栨秷绉戝闄愬埗
getTasklist(topqueryParams).then((response) => {
this.taskList = response.rows;
this.batchLoading = false;
@@ -1146,10 +1144,17 @@
for (const patient of this.selectedPatients) {
const params = {
taskid: this.selectedTask.taskid,
+ type: this.selectedTask.type,
taskName: this.selectedTask.taskName,
serviceType: this.selectedTask.serviceType,
- sendstate:2,
+ preachform: this.selectedTask.preachform,
+ templateid: this.selectedTask.templateid,
+ libtemplateid: this.selectedTask.libtemplateid,
+ sendstate: 2,
...patient,
+ sendname: patient.patname,
+ endtime: patient.admitdate + " 00:00:00",
+ leavediagname: patient.diagname,
age: "",
};
@@ -1227,7 +1232,7 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664d9;
}
.batch-patient-section,
.batch-task-section {
diff --git a/src/views/patient/patient/physical.vue b/src/views/patient/patient/physical.vue
index 30228ec..0b62b0f 100644
--- a/src/views/patient/patient/physical.vue
+++ b/src/views/patient/patient/physical.vue
@@ -953,6 +953,6 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664D9;
}
</style>
diff --git a/src/views/patient/physical/index.vue b/src/views/patient/physical/index.vue
index 3381d58..81b4820 100644
--- a/src/views/patient/physical/index.vue
+++ b/src/views/patient/physical/index.vue
@@ -138,8 +138,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -760,7 +759,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -1268,12 +1267,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1410,10 +1406,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/patient/propaganda/Missioncreation.vue b/src/views/patient/propaganda/Missioncreation.vue
index e272911..a789b74 100644
--- a/src/views/patient/propaganda/Missioncreation.vue
+++ b/src/views/patient/propaganda/Missioncreation.vue
@@ -253,7 +253,7 @@
/> </el-form-item
></el-col>
</el-row>
- <el-form-item label="鏈嶅姟褰㈠紡">
+ <!-- <el-form-item label="鏈嶅姟褰㈠紡">
<el-checkbox-group v-model="checkList">
<el-checkbox
v-for="(item, index) in checkboxlist"
@@ -263,6 +263,16 @@
{{ item.label }}</el-checkbox
>
</el-checkbox-group>
+ </el-form-item> -->
+ <el-form-item label="鏈嶅姟褰㈠紡">
+ <SortCheckbox
+ v-model="checkList"
+ :options="checkboxlist"
+ :initialselectedOrder="selectedOrder"
+ value-key="value"
+ label-key="label"
+ @change="checkSelectionChange"
+ />
</el-form-item>
</el-form>
</div>
@@ -520,7 +530,7 @@
/>
</el-row>
<pagination
- v-show="patienttotal > 0"
+ v-show="patienttotal > 0 && this.patientqueryParams.allhosp != 6"
:total="patienttotal"
:page.sync="patientqueryParams.pageNum"
:limit.sync="patientqueryParams.pageSize"
@@ -759,7 +769,7 @@
import store from "@/store";
import {
- getTaskpatient,
+ getTaskpatientQC,
getlibrarylist,
getFollowuplist,
getQtemplatelist,
@@ -773,6 +783,7 @@
import { listDept } from "@/api/system/dept";
import { getToken } from "@/utils/auth";
import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢
+import SortCheckbox from "@/components/SortCheckbox"; //琛ㄦ牸缁勪欢
export default {
name: "ServiceDetails",
@@ -796,6 +807,7 @@
dialogVisiblepatient: false, //娣诲姞鎮h�呭脊妗�
radio: 1,
checkboxlist: [],
+ selectedOrder: [],
// 绉戝/鐥呭尯
belongWards: [],
belongWards: [],
@@ -805,9 +817,10 @@
htmlRichText: "<p>Hello, <strong>world</strong>!</p>",
// 鎮h�呰〃鍗�
tableLabelhz: [
- { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "inhosptime" },
+ { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "endtime" },
{ label: "鎮h��", width: "", prop: "name" },
- { label: "韬唤璇�", width: "200", prop: "sfzh" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
@@ -820,6 +833,7 @@
{ label: "鍑洪櫌鏃ユ湡", width: "150", prop: "endtime" },
{ label: "鎮h��", width: "", prop: "name" },
{ label: "韬唤璇�", width: "200", prop: "sfzh" },
+ { label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
@@ -966,11 +980,11 @@
},
taskoptions: [
{
- value: "1",
+ value: "4",
label: "鍑洪櫌鐥呬汉",
},
{
- value: "4",
+ value: "1",
label: "鍦ㄩ櫌鐥呬汉",
},
{
@@ -980,6 +994,14 @@
{
value: "3",
label: "浣撴鐥呬汉",
+ },
+ {
+ value: "6",
+ label: "闄㈠鎮h��",
+ },
+ {
+ value: "5",
+ label: "鎵嬫湳鐥呬汉",
},
],
source: [
@@ -999,7 +1021,7 @@
quote: false,
};
},
- components: { SFtable },
+ components: { SFtable, SortCheckbox },
created() {
this.id = this.$route.query.id;
@@ -1123,15 +1145,31 @@
}
},
// 淇濆瓨
- submitForm(formName) {
+ async submitForm(formName) {
this.form.preachform = this.checkList.join(",");
// this.formatFn(1);
- if (!this.form.patTaskRelevances[0]&&this.form.longTask==0) {
- this.$modal.msgError("璇烽�夋嫨鐥呬汉");
- return;
- }
+ if (!this.form.patTaskRelevances[0] && this.form.longTask == 0) {
+ try {
+ // 绛夊緟鐢ㄦ埛纭
+ await this.$modal.confirm("褰撳墠浠诲姟鏈�夋嫨鎮h�呮槸鍚︿繚瀛橈紵");
+ // 鍙湁鐢ㄦ埛鐐瑰嚮鈥滅‘璁も�濆悗锛屼唬鐮佹墠浼氭墽琛屽埌杩欓噷
+ } catch (error) {
+ // 鐢ㄦ埛鐐瑰嚮浜嗏�滃彇娑堚�濓紝鐩存帴涓柇鍑芥暟鎵ц
+ this.$modal.msgWarning("鎿嶄綔宸插彇娑�");
+ return; // 鍏抽敭锛氳繖閲宺eturn鐩存帴閫�鍑哄嚱鏁�
+ }
+ }
if (!this.form.templatename) {
this.$modal.msgError("鏈�夋嫨妯℃澘");
+ return;
+ }
+ if (this.checkList) {
+ this.form.preachform = this.checkList.join(",");
+ this.form.preachformList = this.selectedOrder;
+ } else {
+ this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+ this.submitLoading = false;
+
return;
}
const filteredArray = this.variableList.filter(
@@ -1242,13 +1280,32 @@
this.overallCase.forEach((item) => {
this.allpids.push(item.patid);
});
- if (this.patientqueryParams.allhosp == 1) {
+ if (this.patientqueryParams.allhosp == 4) {
this.tableLabelhz = [
+ // { label: "鍏ラ櫌鏃ユ湡", width: "170", prop: "starttime" },
{ label: "鍑洪櫌鏃ユ湡", width: "150", prop: "endtime" },
{ label: "鎮h��", width: "", prop: "name" },
- { label: "韬唤璇�", width: "200", prop: "sfzh" },
+ { label: "鎮h�呰瘖鏂�", width: "", prop: "leavediagname" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+ { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
+ { label: "鍖荤敓", width: "", prop: "drname" },
+ { label: "绉戝", width: "180", prop: "dept" },
+ { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
+ ];
+ } else if (this.patientqueryParams.allhosp == 1) {
+ this.tableLabelhz = [
+ { label: "鍏ラ櫌鏃ユ湡", width: "150", prop: "starttime" },
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "鎮h�呰瘖鏂�", width: "", prop: "leavediagname" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鎬у埆", width: "", prop: "sex" },
+ { label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "鍖荤敓", width: "", prop: "drname" },
{ label: "绉戝", width: "180", prop: "dept" },
@@ -1256,14 +1313,18 @@
];
} else if (this.patientqueryParams.allhosp == 2) {
this.tableLabelhz = [
- { label: "搴忓彿", width: "", prop: "patid" },
- { label: "鎮h�呭悕绉�", width: "", prop: "name" },
+ { label: "灏辫瘖鏃ユ湡", width: "150", prop: "admitdate" },
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
- { label: "璇婃柇", width: "", prop: "diagname" },
- { label: "灏辫瘖绉戝", width: "", prop: "deptName" },
- { label: "鍏ラ櫌鏃ユ湡", width: "", prop: "inhosptime" },
- { label: "鍒涘缓浜�", width: "", prop: "createBy" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+ { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
+ { label: "鍖荤敓", width: "", prop: "drname" },
+ { label: "绉戝", width: "180", prop: "dept" },
+ { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
];
}
if (this.allpids[0]) {
@@ -1271,33 +1332,26 @@
} else {
this.patientqueryParams.pids = null;
}
- // 绫诲瀷鍒ゆ柇
- if (this.patientqueryParams.allhosp == 1) {
- this.patientqueryParams.cry = 1;
- } else if (this.patientqueryParams.allhosp == 4) {
- this.patientqueryParams.cry = 0;
- this.patientqueryParams.allhosp = "1";
- }
- if (this.patientqueryParams.searchscope == 1) {
- this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
- (obj) => obj.deptCode
- );
+ if (this.patientqueryParams.allhosp == 4) {
+ this.patientqueryParams.hospitaldistrictcodes = [];
+ this.patientqueryParams.deptcodes = [];
+ } else if (this.patientqueryParams.allhosp == 1) {
+ this.patientqueryParams.deptcodes =
+ this.patientqueryParams.leaveldeptcodes;
+ this.patientqueryParams.hospitaldistrictcodes =
+ this.patientqueryParams.leavehospitaldistrictcodes;
this.patientqueryParams.leavehospitaldistrictcodes = [];
- } else if (this.patientqueryParams.searchscope == 2) {
- this.patientqueryParams.leavehospitaldistrictcodes =
- store.getters.belongWards.map((obj) => obj.districtCode);
this.patientqueryParams.leaveldeptcodes = [];
- } else {
- this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
- (obj) => obj.deptCode
- );
- this.patientqueryParams.leavehospitaldistrictcodes =
- store.getters.belongWards.map((obj) => obj.districtCode);
}
- getTaskpatient(this.patientqueryParams).then((response) => {
+ getTaskpatientQC(this.patientqueryParams).then((response) => {
console.log(response);
this.patientuserList = response.rows;
+ this.patientuserList.forEach((item) => {
+ if (item.endtime) {
+ item.endDay = this.daysBetween(item.endtime);
+ }
+ });
this.patienttotal = response.total;
this.loading = false;
this.Restorecheck();
@@ -1309,9 +1363,8 @@
handleExport() {},
// 閫夋嫨鎮h�呰〃鏁版嵁
- handleSelectionChange(selection, type) {
- console.log("澶氶�夋偅鑰�");
- this.SelectPatientslist = selection;
+ handleSelectionChange(selection) {
+ this.SelectPatientslist = structuredClone(selection);
this.multiple = !selection.length;
// 璧嬪�肩粰鏁翠綋閫変腑鏁扮粍
@@ -1320,13 +1373,22 @@
if (!isExist) {
item.isoperation = 1;
item.patid = item.id;
- if (item.idcardno) {
- item.sfzh = item.idcardno;
+ item.hospType = this.patientqueryParams.allhosp;
+ item.sfzh = item.idcardno;
+ item.deptCode = item.deptcode;
+ item.deptName = item.dept;
+ item.admindate = item.inhosptime;
+ item.diagname = item.leavediagname;
+ item.sfzh = item.idcardno;
+ if (this.patientqueryParams.allhosp == 6) {
+ item.patfrom = 1;
}
- if (type) {
- item.hospType = type;
- } else {
- item.hospType = this.patientqueryParams.allhosp;
+ if (this.patientqueryParams.allhosp == 1) {
+ item.visittime = item.endtime;
+ } else if (this.patientqueryParams.allhosp == 4) {
+ item.visittime = item.starttime;
+ } else if (this.patientqueryParams.allhosp == 2) {
+ item.visittime = item.admitdate;
}
this.overallCase.push(item);
this.form.patTaskRelevances.push(item);
@@ -1422,6 +1484,7 @@
: [];
this.overallCase = this.form.patTaskRelevances.concat();
this.checkList = this.form.preachform.split(",");
+ this.selectedOrder = this.form.preachformList;
console.log(this.form.showDate, "this.form");
if (this.form.daytime) this.daytime = this.form.showDate.split(",");
console.log(this.newadd, "渚濈収");
@@ -1448,6 +1511,11 @@
}
});
}
+ },
+ checkSelectionChange(selectedValues, selectedOrder) {
+ this.selectedOrder = selectedValues;
+ console.log("褰撳墠閫変腑:", selectedValues);
+ console.log("閫変腑椤哄簭:", selectedOrder);
},
// 渚濈収鏂板鏃跺鐞�
neWaddfn() {
@@ -1581,6 +1649,7 @@
TaskQuestioncomit(this.Tasktemplate).then((response) => {
console.log(response);
this.previewtf = false;
+ this.drawermb =false;
this.form.templateid = response.data;
this.form.libtemplateid = this.libId;
this.form.templatename = this.libName;
@@ -1839,7 +1908,7 @@
}
}
.button-textsc {
- color: #28cfe6;
+ color: #3664d9;
}
.button-textxg {
color: #de7897;
diff --git a/src/views/patient/propaganda/Missionotice.vue b/src/views/patient/propaganda/Missionotice.vue
index a870188..ee36792 100644
--- a/src/views/patient/propaganda/Missionotice.vue
+++ b/src/views/patient/propaganda/Missionotice.vue
@@ -78,8 +78,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
v-hasPermi="['system:user:add']"
diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index dd695de..d558652 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -69,7 +69,7 @@
placeholder="璇疯緭鍏ヤ换鍔℃弿杩�"
/>
</el-form-item>
- <el-form-item label="鏈嶅姟褰㈠紡">
+ <!-- <el-form-item label="鏈嶅姟褰㈠紡">
<el-radio-group v-model="checkList">
<el-radio
v-for="(item, index) in checkboxlist"
@@ -79,6 +79,16 @@
{{ item.label }}</el-radio
>
</el-radio-group>
+ </el-form-item> -->
+ <el-form-item label="鏈嶅姟褰㈠紡">
+ <SortCheckbox
+ v-model="checkList"
+ :options="checkboxlist"
+ :initialselectedOrder="selectedOrder"
+ value-key="value"
+ label-key="label"
+ @change="checkSelectionChange"
+ />
</el-form-item>
<el-form-item label="鎵ц鍛ㄦ湡" prop="longTask">
<el-radio-group v-model="form.longTask">
@@ -432,10 +442,16 @@
</div>
</div>
</div>
- <el-button type="success" @click="nextstep('ruleForm')">{{
- quote ? "绔嬪嵆鍒涘缓" : "浠诲姟璇︽儏閰嶇疆"
+ <el-button type="primary" @click="nextstep('ruleForm')">{{
+ quote ? "绔嬪嵆鍒涘缓" : "娲惧彂鎮h�呴厤缃�"
}}</el-button>
- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
+ <el-button
+ :loading="submitLoading"
+ type="success"
+ @click="submitForm('ruleForm')"
+ >{{ quote ? "绔嬪嵆鍒涘缓" : "纭鏈嶅姟閰嶇疆" }}</el-button
+ >
+ <!-- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> -->
</div>
<!-- 浠诲姟璇︽儏 -->
<div v-if="Editprogress == 2">
@@ -516,10 +532,13 @@
</div>
</div>
<el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
- <el-button type="success" @click="submitForm('ruleForm')">{{
- quote ? "绔嬪嵆鍒涘缓" : "纭浠诲姟閰嶇疆"
- }}</el-button>
- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
+ <el-button
+ :loading="submitLoading"
+ type="success"
+ @click="submitForm('ruleForm')"
+ >{{ quote ? "绔嬪嵆鍒涘缓" : "纭鏈嶅姟閰嶇疆" }}</el-button
+ >
+ <!-- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> -->
</div>
</div>
<!-- 娣诲姞鎮h�� -->
@@ -911,8 +930,10 @@
taskdiaggetlist,
taskopergetlist,
} from "@/api/AiCentre/index";
-import OptionalForm from "@/components/OptionalForm"; //姝e垯缁勪欢
+import OptionalForm from "@/components/OptionalForm"; //鐤剧梾娣诲姞缁勪欢
import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢
+import SortCheckbox from "@/components/SortCheckbox"; //琛ㄦ牸缁勪欢
+
import { MessageBox } from "element-ui";
export default {
@@ -925,6 +946,7 @@
previewid: "", //浠诲姟妯℃澘浼犻�抜d
libName: "",
templateor: false,
+ submitLoading: false, // 鎺у埗鎸夐挳鍔犺浇鐘舵��
objyl: {},
overallCase: [], //閫夋嫨鎮h�呮��
allpids: [],
@@ -969,6 +991,7 @@
{ label: "韬唤璇�", width: "200", prop: "idcardno" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "涓绘不鍖荤敓", width: "", prop: "drname" },
{ label: "绉戝", width: "240", prop: "dept" },
@@ -982,6 +1005,7 @@
{ label: "韬唤璇�", width: "200", prop: "sfzh" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "涓绘不鍖荤敓", width: "", prop: "drname" },
@@ -1026,6 +1050,7 @@
pageSize: 10,
},
checkList: "",
+ selectedOrder: [],
deliverytopqueryParams: {
pageNum: 1, //
pageSize: 10,
@@ -1154,60 +1179,7 @@
},
],
- tasktypes: [
- {
- value: 1,
- label: "鐩戞祴璇勪及",
- },
- {
- value: 2,
- label: "鍑洪櫌闅忚",
- },
- {
- value: 3,
- label: "闂ㄨ瘖闅忚",
- },
- {
- value: 4,
- label: "瀹f暀鍏虫��",
- },
- {
- value: 5,
- label: "澶嶈瘖绠$悊",
- },
- // {
- // value: 5,
- // label: "婊℃剰搴﹁皟鏌�",
- // },
- {
- value: 7,
- label: "鎮h�呮姤鍛�",
- },
- // {
- // value: 8,
- // label: "鍏朵粬閫氱煡",
- // },
- {
- value: 9,
- label: "浣撴闅忚",
- },
- // {
- // value: 1",
- // label: "鍖绘妧闅忚",
- // },
- {
- value: 11,
- label: "褰卞儚闅忚",
- },
- {
- value: 12,
- label: "蹇冪數闅忚",
- },
- // {
- // value: "13",
- // label: "涓撶梾闅忚",
- // },
- ],
+ tasktypes: store.getters.tasktypes,
// 绉戝/鐥呭尯
belongWards: [],
deptlist: [],
@@ -1231,8 +1203,9 @@
sendType: [
{ required: true, message: "鍙戦�佽缃笉鑳戒负绌�", trigger: "blur" },
],
- deptcode: [
- { required: true, message: "閫傜敤绉戝涓嶈兘涓虹┖", trigger: "blur" },
+
+ longTask: [
+ { required: true, message: "璇烽�夋嫨鎵ц鍛ㄦ湡", trigger: "blur" },
],
// leavehospitaldistrictcode: [
// { required: true, message: "閫傜敤鐥呭尯涓嶈兘涓虹┖", trigger: "blur" },
@@ -1245,7 +1218,7 @@
serviceType: null,
};
},
- components: { SFtable, OptionalForm },
+ components: { SFtable, OptionalForm, SortCheckbox },
created() {
this.appraiselist = store.getters.appraiselist;
@@ -1337,9 +1310,13 @@
value: "5",
label: "寰俊鍏紬鍙�",
},
- { label: "寰俊灏忕▼搴�", value: 6 },
+ { label: "寰俊灏忕▼搴�", value: "6" },
];
- } else if (this.form.serviceType == 6) {
+ } else if (
+ this.form.serviceType == 6 ||
+ this.form.serviceType == 14 ||
+ this.form.serviceType == 15
+ ) {
this.checkboxlist = [
{
value: "3",
@@ -1406,6 +1383,7 @@
this.form.serviceType == 2 ||
this.form.serviceType == 3 ||
this.form.serviceType == 5 ||
+ this.form.serviceType == 16 ||
this.form.serviceType == 4
) {
this.checkboxlist = [
@@ -1454,104 +1432,132 @@
},
// 淇濆瓨
submitForm(formName) {
- if (this.time4 && this.form.sendType == 3)
- this.form.showTimeMorn = this.time4;
- this.form.sendTimeslot = [
- {
- begantime: this.time4,
- endtime: "",
- xh: 1,
- },
- ];
- if (this.form.appltype == 1) {
- this.leavehospitaldistrictcodes = [];
- this.operationcodes = [];
- this.illnesscodes = [];
- } else if (this.form.appltype == 2) {
- this.deptcodesWards = [];
- this.operationcodes = [];
- this.illnesscodes = [];
- } else if (this.form.appltype == 3) {
- this.deptcodesWards = [];
- this.leavehospitaldistrictcodes = [];
- this.operationcodes = [];
- } else if (this.form.appltype == 4) {
- this.deptcodesWards = [];
- this.illnesscodes = [];
- this.leavehospitaldistrictcodes = [];
- }
- if (this.checkList) {
- this.form.preachform = this.checkList;
- } else {
- this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+ console.log(this.submitLoading);
+
+ if (this.submitLoading) {
return;
}
- console.log(this.operationcodes[0]);
- console.log(this.operationcodes);
+ // 绗簩姝ワ細寮�鍚姞杞界姸鎬侊紝绂佺敤鎸夐挳
+ this.submitLoading = true;
+ console.log(this.submitLoading);
- if (
- this.deptcodesWards[0] ||
- this.leavehospitaldistrictcodes[0] ||
- this.diagglist[0] ||
- this.operationcodes[0]
- ) {
- } else {
- this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
- return;
- }
-
- if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
- this.$modal.msgError("璇烽�夋嫨鐥呬汉");
- return;
- }
-
- if (!this.form.templatename && !this.templateor) {
- this.$modal.msgError("鏈�夋嫨妯℃澘");
- return;
- }
-
- if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) {
- } else if (
- (this.form.sendType == 3 && this.time4) ||
- this.form.longTask
- ) {
- } else {
- return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
- }
- const filteredArray = this.variableList.filter(
- (item) =>
- item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
- );
- this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
- if (this.form.taskid) {
- this.form.isoperation = 2;
- } else {
- this.form.isoperation = 1;
- }
- if (!this.form.type) {
- this.form.type = this.$route.query.type;
- }
- this.form.serviceType = this.serviceType;
- this.form.deptcode = this.deptcodesWards.join(",");
- this.form.leavehospitaldistrictcode =
- this.leavehospitaldistrictcodes.join(",");
- this.form.opcode = this.operationcodes.join(",");
- this.form.icd10code = this.diagglist
- .map((item) => item.icdcode)
- .join(",");
- Editsingletask(this.form).then((res) => {
- if (res.code == 200) {
- if (this.form.taskid) {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- } else {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- }
- this.$router.push({
- path: "/followvisit/tasklist",
- query: { tasktopic: this.form.serviceType },
- });
+ try {
+ if (this.time4 && this.form.sendType == 3)
+ this.form.showTimeMorn = this.time4;
+ this.form.sendTimeslot = [
+ {
+ begantime: this.time4,
+ endtime: "",
+ xh: 1,
+ },
+ ];
+ if (this.form.appltype == 1) {
+ this.leavehospitaldistrictcodes = [];
+ this.operationcodes = [];
+ this.illnesscodes = [];
+ } else if (this.form.appltype == 2) {
+ this.deptcodesWards = [];
+ this.operationcodes = [];
+ this.illnesscodes = [];
+ } else if (this.form.appltype == 3) {
+ this.deptcodesWards = [];
+ this.leavehospitaldistrictcodes = [];
+ this.operationcodes = [];
+ } else if (this.form.appltype == 4) {
+ this.deptcodesWards = [];
+ this.illnesscodes = [];
+ this.leavehospitaldistrictcodes = [];
}
- });
+ if (this.checkList) {
+ this.form.preachform = this.checkList.join(",");
+ this.form.preachformList = this.selectedOrder;
+ } else {
+ this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+ this.submitLoading = false;
+
+ return;
+ }
+ console.log(this.operationcodes[0]);
+ console.log(this.operationcodes);
+
+ if (
+ this.deptcodesWards[0] ||
+ this.leavehospitaldistrictcodes[0] ||
+ this.diagglist[0] ||
+ this.operationcodes[0] ||
+ this.form.longTask == 2 ||
+ this.serviceType == 3
+ ) {
+ } else {
+ this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
+ this.submitLoading = false;
+ return;
+ }
+ //鏆傚仠浠诲姟鎮h�呴檺鍒�
+ // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
+ // this.$modal.msgError("璇烽�夋嫨鐥呬汉");
+ // return;
+ // }
+
+ if (!this.form.templatename && !this.templateor) {
+ this.$modal.msgError("鏈�夋嫨妯℃澘");
+ this.submitLoading = false;
+
+ return;
+ }
+
+ if (
+ (this.form.sendType == 1 && this.time1) ||
+ this.form.sendType == 2
+ ) {
+ } else if (
+ (this.form.sendType == 3 && this.time4) ||
+ this.form.longTask
+ ) {
+ } else {
+ this.submitLoading = false;
+ return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+ }
+ const filteredArray = this.variableList.filter(
+ (item) =>
+ item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
+ );
+ this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+ if (this.form.taskid) {
+ this.form.isoperation = 2;
+ } else {
+ this.form.isoperation = 1;
+ }
+ if (!this.form.type) {
+ this.form.type = this.$route.query.type;
+ }
+ this.form.serviceType = this.serviceType;
+ this.form.deptcode = this.deptcodesWards.join(",");
+ this.form.leavehospitaldistrictcode =
+ this.leavehospitaldistrictcodes.join(",");
+ this.form.opcode = this.operationcodes.join(",");
+ this.form.icd10code = this.diagglist
+ .map((item) => item.icdcode)
+ .join(",");
+ Editsingletask(this.form).then((res) => {
+ if (res.code == 200) {
+ if (this.form.taskid) {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ } else {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ }
+ this.$router.push({
+ path: "/followvisit/tasklist",
+ query: { tasktopic: this.form.serviceType },
+ });
+ this.submitLoading = false;
+ }
+ });
+ } catch (error) {
+ this.submitLoading = false;
+ } finally {
+ // 绗洓姝ワ細鏃犺鎴愬姛鎴栧け璐ワ紝鏈�缁堥兘鍏抽棴鍔犺浇鐘舵��
+ }
},
// ----------------------琛ㄦ牸瀛愮粍浠朵簨浠�
@@ -1611,6 +1617,27 @@
});
}
});
+ },
+ checkSelectionChange(selectedValues, selectedOrder) {
+ this.selectedOrder = selectedValues;
+ console.log("褰撳墠閫変腑:", selectedValues);
+ console.log("閫変腑椤哄簭:", selectedOrder);
+ },
+ // 鏈嶅姟褰㈠紡閫夊彇
+ handleCheckedCitiesChange(row) {
+ console.log(row, "鏈嶅姟");
+ this.foncheckList = this.checkboxlist.filter((obj) =>
+ row.includes(obj.value)
+ );
+ },
+ // 鏈嶅姟褰㈠紡鍒犻櫎
+ handleClosetag(tag) {
+ console.log(tag, "tag");
+ console.log(this.foncheckList, "foncheckList");
+ this.checkList = this.checkList.filter((item) => item != tag.value);
+ this.foncheckList = this.foncheckList.filter(
+ (obj) => obj.value !== tag.value
+ );
},
getillness(id) {
if (id) {
@@ -1702,6 +1729,7 @@
{ label: "韬唤璇�", width: "200", prop: "idcardno" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "鍖荤敓", width: "", prop: "drname" },
@@ -1716,6 +1744,22 @@
{ label: "韬唤璇�", width: "200", prop: "idcardno" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+ { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
+ { label: "鍖荤敓", width: "", prop: "drname" },
+ { label: "绉戝", width: "180", prop: "dept" },
+ { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
+ ];
+ } else if (this.patientqueryParams.allhosp == 2) {
+ this.tableLabelhz = [
+ { label: "灏辫瘖鏃ユ湡", width: "150", prop: "admitdate" },
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
+ { label: "鎬у埆", width: "", prop: "sex" },
+ { label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "鍖荤敓", width: "", prop: "drname" },
@@ -1777,6 +1821,13 @@
item.sfzh = item.idcardno;
if (this.patientqueryParams.allhosp == 6) {
item.patfrom = 1;
+ }
+ if (this.patientqueryParams.allhosp == 1) {
+ item.visittime = item.endtime;
+ } else if (this.patientqueryParams.allhosp == 4) {
+ item.visittime = item.starttime;
+ } else if (this.patientqueryParams.allhosp == 2) {
+ item.visittime = item.admitdate;
}
this.overallCase.push(item);
this.form.patTaskRelevances.push(item);
@@ -1868,6 +1919,7 @@
{ label: "韬唤璇�", width: "200", prop: "idcardno" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
];
this.patientqueryParams.pageSize = 1000;
@@ -1948,8 +2000,8 @@
? this.form.patTaskRelevances
: [];
this.overallCase = this.form.patTaskRelevances.concat();
- this.checkList = this.form.preachform;
-
+ this.checkList = this.form.preachform.split(",");
+ this.selectedOrder = this.form.preachformList;
this.overallCase.forEach((item) => {
if (item.endtime) {
item.endDay = this.daysBetween(item.endtime);
@@ -2083,6 +2135,9 @@
},
// 鐤剧梾鍒犻櫎瑙﹀彂
removediagg(row) {
+ console.log(row,'row');
+console.log(this.diagglist,'this.diagglist');
+
let result = this.diagglist
.filter((item) => item.icd10code == row)
.map((item) => item.id);
@@ -2215,6 +2270,7 @@
TaskQuestioncomit(this.objyl).then((response) => {
this.previewtf = false;
this.form.libtemplateid = this.objyl.svyid;
+ this.form.libtemplatename = this.objyl.svyname;
this.form.templateid = response.data;
this.form.templatename = this.objyl.svyname;
this.$modal.msgSuccess("閫夋嫨妯℃澘鎴愬姛");
@@ -2225,6 +2281,7 @@
TaskQuestioncomit(this.objyl).then((response) => {
this.previewtf = false;
this.form.libtemplateid = this.objyl.svyid;
+ this.form.libtemplatename = this.objyl.svyname;
this.form.templateid = response.data;
this.form.templatename = this.objyl.svyname;
this.$modal.msgSuccess("閫夋嫨妯℃澘鎴愬姛");
@@ -2275,9 +2332,13 @@
this.objyl.isoperation = 1;
this.objyl.svyTaskTemplateScriptVOS =
this.objyl.svyTemplateLibScripts;
+ this.objyl.svyTaskTemplateScriptVOS.forEach((item) => {
+ item.svyTaskTemplateTargetoptions =
+ item.svyLibTemplateTargetoptions;
+ });
this.form.svyTaskTemplateVO = this.objyl;
this.form.templatename = this.objyl.svyname;
- this.$modal.msgSuccess("鏆傚瓨鎴愬姛淇濆瓨浠诲姟鍚庢ā鏉垮け鏁�");
+ this.$modal.msgSuccess("鏆傚瓨鎴愬姛淇濆瓨浠诲姟鍚庢ā鏉跨敓鏁�");
this.drawermb = false;
this.previewtf = false;
})
diff --git a/src/views/patient/propaganda/index.vue b/src/views/patient/propaganda/index.vue
index 2e7d70c..1e3369b 100644
--- a/src/views/patient/propaganda/index.vue
+++ b/src/views/patient/propaganda/index.vue
@@ -101,7 +101,6 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
icon="el-icon-plus"
size="medium"
@click="handleAdd"
@@ -753,8 +752,8 @@
serviceType: 4,
searchscope: 2,
sendstate: 2,
- leavehospitaldistrictcodes:[],
- leaveldeptcodes:[],
+ leaveldeptcodes: [],
+ leavehospitaldistrictcodes: [],
},
propss: { multiple: true },
options: [],
@@ -833,7 +832,7 @@
methods: {
/** 鏌ヨ闂ㄨ瘖瀹f暀鏈嶅姟鍒楄〃 */
getList() {
- if (this.topqueryParams.searchscope == 3) {
+ if (this.topqueryParams.searchscope == 3) {
this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
(obj) => obj.deptCode
);
diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue
index 69c24a5..70b06f1 100644
--- a/src/views/patient/propaganda/particty.vue
+++ b/src/views/patient/propaganda/particty.vue
@@ -69,7 +69,7 @@
placeholder="璇疯緭鍏ヤ换鍔℃弿杩�"
/>
</el-form-item>
- <el-form-item label="鏈嶅姟褰㈠紡">
+ <!-- <el-form-item label="鏈嶅姟褰㈠紡">
<el-radio-group
v-model="checkList"
@change="handleCheckedCitiesChange"
@@ -78,11 +78,20 @@
v-for="(item, index) in checkboxlist"
:key="index"
:label="item.value"
- @change="checkboxChange($event, item.value)"
>
{{ item.label }}</el-radio
>
</el-radio-group>
+ </el-form-item> -->
+ <el-form-item label="鏈嶅姟褰㈠紡">
+ <SortCheckbox
+ v-model="checkList"
+ :options="checkboxlist"
+ :initialselectedOrder="selectedOrder"
+ value-key="value"
+ label-key="label"
+ @change="checkSelectionChange"
+ />
</el-form-item>
<!-- <div class="xinz-infs">
<el-form-item label="鏈嶅姟鎵ц椤哄簭" prop="daytime">
@@ -433,7 +442,7 @@
<el-button type="success" @click="nextstep('ruleForm')">{{
quote ? "绔嬪嵆鍒涘缓" : "浠诲姟璇︽儏閰嶇疆"
}}</el-button>
- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
+ <!-- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> -->
</div>
<!-- 浠诲姟璇︽儏 -->
<div v-if="Editprogress == 2">
@@ -471,7 +480,7 @@
size="medium"
:disabled="!patientqueryParams.allhosp"
@click="handleQuery"
- >鏂板</el-button
+ >娣诲姞鎮h��</el-button
>
</el-col>
@@ -514,10 +523,13 @@
</div>
</div>
<el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
- <el-button type="success" @click="submitForm('11')">{{
- quote ? "绔嬪嵆鍒涘缓" : "纭浠诲姟閰嶇疆"
- }}</el-button>
- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
+ <el-button
+ :loading="submitLoading"
+ type="success"
+ @click="submitForm('11')"
+ >{{ quote ? "绔嬪嵆鍒涘缓" : "纭浠诲姟閰嶇疆" }}</el-button
+ >
+ <!-- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> -->
</div>
</div>
<!-- 娣诲姞鎮h�� -->
@@ -731,7 +743,7 @@
<el-radio
v-for="(
items, index
- ) in item.ivrLibaScriptTargetoptionList"
+ ) in item.ivrTaskScriptTargetoptionList"
:key="index"
:label="index"
>{{ items.targetvalue }}</el-radio
@@ -753,7 +765,7 @@
<el-checkbox
v-for="(
items, index
- ) in item.ivrLibaScriptTargetoptionList"
+ ) in item.ivrTaskScriptTargetoptionList"
:key="index"
:label="index"
>
@@ -887,7 +899,7 @@
import { messagelistpatient } from "@/api/patient/homepage";
import store from "@/store";
import {
- getTaskpatient,
+ getTaskpatientQC,
getillnesslist,
getbaseopera,
getFollowuplist,
@@ -909,6 +921,7 @@
} from "@/api/AiCentre/index";
import { deptTreeSelect } from "@/api/system/user";
import OptionalForm from "@/components/OptionalForm";
+import SortCheckbox from "@/components/SortCheckbox"; //琛ㄦ牸缁勪欢
import { MessageBox } from "element-ui";
import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢
@@ -924,6 +937,7 @@
libName: "",
username: "",
templateor: false,
+ submitLoading: false, // 鎺у埗鎸夐挳鍔犺浇鐘舵��
objyl: {},
overallCase: [], //閫夋嫨鎮h�呮��
allpids: [],
@@ -951,6 +965,8 @@
skip: false,
donorchargeList: [],
baseoperaList: [],
+ selectedOrder: [],
+
usable: [
{ value: "0", label: "鍙敤" },
{ value: "1", label: "鍋滅敤" },
@@ -969,6 +985,7 @@
{ label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "涓绘不鍖荤敓", width: "", prop: "drname" },
{ label: "绉戝", width: "240", prop: "dept" },
@@ -1025,7 +1042,7 @@
pageNum: 1, //
pageSize: 10,
},
- checkList: "",
+ checkList: [],
foncheckList: [],
formatvalue: {
format1: "",
@@ -1122,11 +1139,11 @@
},
taskoptions: [
{
- value: "1",
+ value: "4",
label: "鍑洪櫌鐥呬汉",
},
{
- value: "4",
+ value: "1",
label: "鍦ㄩ櫌鐥呬汉",
},
{
@@ -1157,60 +1174,7 @@
},
],
- tasktypes: [
- {
- value: "1",
- label: "鐩戞祴璇勪及",
- },
- {
- value: "2",
- label: "鍑洪櫌闅忚",
- },
- {
- value: "3",
- label: "闂ㄨ瘖闅忚",
- },
- {
- value: "4",
- label: "瀹f暀鍏虫��",
- },
- {
- value: "5",
- label: "澶嶈瘖绠$悊",
- },
- // {
- // value: "5",
- // label: "婊℃剰搴﹁皟鏌�",
- // },
- {
- value: "7",
- label: "鎮h�呮姤鍛�",
- },
- // {
- // value: "8",
- // label: "鍏朵粬閫氱煡",
- // },
- {
- value: "9",
- label: "浣撴闅忚",
- },
- // {
- // value: "10",
- // label: "鍖绘妧闅忚",
- // },
- {
- value: "11",
- label: "褰卞儚闅忚",
- },
- {
- value: "12",
- label: "蹇冪數闅忚",
- },
- // {
- // value: "13",
- // label: "涓撶梾闅忚",
- // },
- ],
+ tasktypes: store.getters.tasktypes,
// 绉戝/鐥呭尯
belongWards: [],
deptlist: [],
@@ -1234,6 +1198,9 @@
sendType: [
{ required: true, message: "鍙戦�佽缃笉鑳戒负绌�", trigger: "blur" },
],
+ longTask: [
+ { required: true, message: "璇烽�夋嫨鎵ц鍛ㄦ湡", trigger: "blur" },
+ ],
// deptcode: [
// { required: true, message: "閫傜敤绉戝涓嶈兘涓虹┖", trigger: "blur" },
// ],
@@ -1251,7 +1218,7 @@
serviceType: null,
};
},
- components: { SFtable, OptionalForm },
+ components: { SFtable, OptionalForm, SortCheckbox },
created() {
this.appraiselist = store.getters.appraiselist;
@@ -1427,6 +1394,7 @@
} else if (
this.form.serviceType == 2 ||
this.form.serviceType == 3 ||
+ this.form.serviceType == 16 ||
this.form.serviceType == 4
) {
this.checkboxlist = [
@@ -1475,102 +1443,128 @@
},
// 淇濆瓨
submitForm(type) {
- if (this.templateor && type) this.templateor = false;
- if (this.time4 && this.form.sendType == 3)
- this.form.showTimeMorn = this.time4;
- this.form.sendTimeslot = [
- {
- begantime: this.time4,
- endtime: "",
- xh: 1,
- },
- ];
- if (this.form.appltype == 1) {
- this.leavehospitaldistrictcodes = [];
- this.operationcodes = [];
- this.illnesscodes = [];
- } else if (this.form.appltype == 2) {
- this.deptcodesWards = [];
- this.operationcodes = [];
- this.illnesscodes = [];
- } else if (this.form.appltype == 3) {
- this.deptcodesWards = [];
- this.leavehospitaldistrictcodes = [];
- this.operationcodes = [];
- } else if (this.form.appltype == 4) {
- this.deptcodesWards = [];
- this.illnesscodes = [];
- this.leavehospitaldistrictcodes = [];
- }
- if (this.checkList) {
- this.form.preachform = this.checkList;
- } else {
- this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+ if (this.submitLoading) {
return;
}
-
- if (
- this.deptcodesWards[0] ||
- this.leavehospitaldistrictcodes[0] ||
- this.diagglist[0] ||
- this.operationcodes[0]
- ) {
- } else {
- this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
- return;
- }
- if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
- this.$modal.msgError("璇烽�夋嫨鐥呬汉");
- return;
- }
-
- if (!this.form.templatename && !this.templateor) {
- this.$modal.msgError("鏈�夋嫨妯℃澘");
- return;
- }
-
- if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) {
- } else if (
- (this.form.sendType == 3 && this.time4) ||
- this.form.longTask
- ) {
- } else {
- return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
- }
- const filteredArray = this.variableList.filter(
- (item) =>
- item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
- );
- this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
- if (this.form.taskid) {
- this.form.isoperation = 2;
- } else {
- this.form.isoperation = 1;
- }
- if (!this.form.type) {
- this.form.type = this.$route.query.type;
- }
- this.form.serviceType = this.serviceType;
- this.form.deptcode = this.deptcodesWards.join(",");
- this.form.leavehospitaldistrictcode =
- this.leavehospitaldistrictcodes.join(",");
- this.form.opcode = this.operationcodes.join(",");
- this.form.icd10code = this.diagglist
- .map((item) => item.icdcode)
- .join(",");
- Editsingletask(this.form).then((res) => {
- if (res.code == 200) {
- if (this.form.taskid) {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- } else {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- }
- this.$router.push({
- path: "/followvisit/tasklist",
- query: { tasktopic: this.form.serviceType },
- });
+ // 绗簩姝ワ細寮�鍚姞杞界姸鎬侊紝绂佺敤鎸夐挳
+ this.submitLoading = true;
+ try {
+ if (this.templateor && type) this.templateor = false;
+ if (this.time4 && this.form.sendType == 3)
+ this.form.showTimeMorn = this.time4;
+ this.form.sendTimeslot = [
+ {
+ begantime: this.time4,
+ endtime: "",
+ xh: 1,
+ },
+ ];
+ if (this.form.appltype == 1) {
+ this.leavehospitaldistrictcodes = [];
+ this.operationcodes = [];
+ this.illnesscodes = [];
+ } else if (this.form.appltype == 2) {
+ this.deptcodesWards = [];
+ this.operationcodes = [];
+ this.illnesscodes = [];
+ } else if (this.form.appltype == 3) {
+ this.deptcodesWards = [];
+ this.leavehospitaldistrictcodes = [];
+ this.operationcodes = [];
+ } else if (this.form.appltype == 4) {
+ this.deptcodesWards = [];
+ this.illnesscodes = [];
+ this.leavehospitaldistrictcodes = [];
}
- });
+ if (this.checkList) {
+ this.form.preachform = this.checkList.join(",");
+ this.form.preachformList = this.selectedOrder;
+ } else {
+ this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+ this.submitLoading = false;
+
+ return;
+ }
+
+ if (
+ this.deptcodesWards[0] ||
+ this.leavehospitaldistrictcodes[0] ||
+ this.diagglist[0] ||
+ this.operationcodes[0] ||
+ this.form.longTask == 2 ||
+ this.serviceType == 3
+ ) {
+ } else {
+ this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
+ this.submitLoading = false;
+
+ return;
+ }
+ // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
+ // this.$modal.msgError("璇烽�夋嫨鐥呬汉");
+ // return;
+ // }
+
+ if (!this.form.templatename && !this.templateor) {
+ this.$modal.msgError("鏈�夋嫨妯℃澘");
+ this.submitLoading = false;
+
+ return;
+ }
+
+ if (
+ (this.form.sendType == 1 && this.time1) ||
+ this.form.sendType == 2
+ ) {
+ } else if (
+ (this.form.sendType == 3 && this.time4) ||
+ this.form.longTask
+ ) {
+ } else {
+ this.submitLoading = false;
+
+ return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+ }
+ const filteredArray = this.variableList.filter(
+ (item) =>
+ item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
+ );
+ this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+ if (this.form.taskid) {
+ this.form.isoperation = 2;
+ } else {
+ this.form.isoperation = 1;
+ }
+ if (!this.form.type) {
+ this.form.type = this.$route.query.type;
+ }
+ this.form.serviceType = this.serviceType;
+ this.form.deptcode = this.deptcodesWards.join(",");
+ this.form.leavehospitaldistrictcode =
+ this.leavehospitaldistrictcodes.join(",");
+ this.form.opcode = this.operationcodes.join(",");
+ this.form.icd10code = this.diagglist
+ .map((item) => item.icdcode)
+ .join(",");
+ Editsingletask(this.form).then((res) => {
+ if (res.code == 200) {
+ if (this.form.taskid) {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ } else {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ }
+ this.submitLoading = false;
+ this.$router.push({
+ path: "/followvisit/tasklist",
+ query: { tasktopic: this.form.serviceType },
+ });
+ }
+ });
+ } catch (error) {
+ this.submitLoading = false;
+ } finally {
+ // 绗洓姝ワ細鏃犺鎴愬姛鎴栧け璐ワ紝鏈�缁堥兘鍏抽棴鍔犺浇鐘舵��
+ }
},
// ----------------------琛ㄦ牸瀛愮粍浠朵簨浠�
@@ -1682,6 +1676,7 @@
{ label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "鍖荤敓", width: "", prop: "drname" },
@@ -1696,6 +1691,22 @@
{ label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
{ label: "鎬у埆", width: "", prop: "sex" },
{ label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
+ { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+ { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
+ { label: "鍖荤敓", width: "", prop: "drname" },
+ { label: "绉戝", width: "180", prop: "dept" },
+ { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
+ ];
+ } else if (this.patientqueryParams.allhosp == 2) {
+ this.tableLabelhz = [
+ { label: "灏辫瘖鏃ユ湡", width: "150", prop: "admitdate" },
+ { label: "鎮h��", width: "", prop: "name" },
+ { label: "韬唤璇�", width: "200", prop: "idcardno" },
+ { label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
+ { label: "鎬у埆", width: "", prop: "sex" },
+ { label: "骞撮緞", width: "", prop: "age" },
+ { label: "鐢佃瘽", width: "180", prop: "telcode" },
{ label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
{ label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
{ label: "鍖荤敓", width: "", prop: "drname" },
@@ -1708,12 +1719,11 @@
} else {
this.patientqueryParams.pids = null;
}
- // 绫诲瀷鍒ゆ柇
if (this.patientqueryParams.allhosp == 1) {
this.patientqueryParams.cry = 1;
} else if (this.patientqueryParams.allhosp == 4) {
- this.patientqueryParams.cry = 0;
- this.patientqueryParams.allhosp = "1";
+ // this.patientqueryParams.cry = 0;
+ // this.patientqueryParams.allhosp = "1";
}
// 鏉ユ簮鍒ゆ柇
@@ -1733,7 +1743,7 @@
this.patientqueryParams.leavehospitaldistrictcodes =
store.getters.belongWards.map((obj) => obj.districtCode);
}
- getTaskpatient(this.patientqueryParams).then((response) => {
+ getTaskpatientQC(this.patientqueryParams).then((response) => {
this.patientuserList = response.rows;
this.patientuserList.forEach((item) => {
if (item.endtime) {
@@ -1768,6 +1778,13 @@
item.sfzh = item.idcardno;
if (this.patientqueryParams.allhosp == 6) {
item.patfrom = 1;
+ }
+ if (this.patientqueryParams.allhosp == 1) {
+ item.visittime = item.endtime;
+ } else if (this.patientqueryParams.allhosp == 4) {
+ item.visittime = item.starttime;
+ } else if (this.patientqueryParams.allhosp == 2) {
+ item.visittime = item.admitdate;
}
this.overallCase.push(item);
this.form.patTaskRelevances.push(item);
@@ -1816,6 +1833,10 @@
},
getList() {},
handleQuery() {
+ console.log(
+ "this.patientqueryParams.allhosp",
+ this.patientqueryParams.allhosp
+ );
if (this.patientqueryParams.topica == 0) {
this.patientqueryParams.leavehospitaldistrictcodes =
store.getters.leavehospitaldistrictcodes;
@@ -1839,7 +1860,13 @@
)
this.patientqueryParams.leaveldeptcodes = null;
this.handleAddpatient();
+
+ console.log(
+ "this.patientqueryParams.allhosp",
+ this.patientqueryParams.allhosp
+ );
},
+
resetQuerymb() {
this.topqueryParams = { svyname: "" };
this.handleQuerymb();
@@ -1903,7 +1930,8 @@
? this.form.patTaskRelevances
: [];
this.overallCase = this.form.patTaskRelevances.concat();
- this.checkList = this.form.preachform;
+ this.checkList = this.form.preachform.split(",");
+ this.selectedOrder = this.form.preachformList;
this.overallCase.forEach((item) => {
if (item.endtime) {
@@ -2173,7 +2201,7 @@
this.objyl.suitway = this.objyl.suitway.join(",");
}
this.objyl.ivrLibaTemplateScriptVOList.forEach((item) => {
- item.ivrTaskScriptTargetoptionList = item.ivrLibaScriptTargetoptionList;
+ item.ivrTaskScriptTargetoptionList = item.ivrTaskScriptTargetoptionList;
});
this.objyl.ivrTaskTemplateScriptVOList =
this.objyl.ivrLibaTemplateScriptVOList;
@@ -2190,6 +2218,7 @@
Taskparticty(this.objyl).then((response) => {
this.previewtf = false;
this.form.libtemplateid = this.objyl.id;
+ this.form.libtemplatename = this.objyl.templateName;
this.form.templateid = response.data;
this.putbelongDepts(response.data);
this.form.templatename = this.objyl.templateName;
@@ -2210,6 +2239,7 @@
Taskparticty(this.objyl).then((response) => {
this.previewtf = false;
this.form.libtemplateid = this.objyl.id;
+ this.form.libtemplatename = this.objyl.templateName;
this.form.templateid = response.data;
this.putbelongDepts(response.data);
this.form.templatename = this.objyl.templateName;
@@ -2247,7 +2277,11 @@
}
});
},
- checkboxChange(checked, value) {},
+ checkSelectionChange(selectedValues, selectedOrder) {
+ this.selectedOrder = selectedValues;
+ console.log("褰撳墠閫変腑:", selectedValues);
+ console.log("閫変腑椤哄簭:", selectedOrder);
+ },
// 鏈嶅姟褰㈠紡閫夊彇
handleCheckedCitiesChange(row) {
console.log(row, "鏈嶅姟");
@@ -2285,7 +2319,7 @@
this.objyl.isoperation = 1;
this.objyl.ivrLibaTemplateScriptVOList.forEach((item) => {
item.ivrTaskScriptTargetoptionList =
- item.ivrLibaScriptTargetoptionList;
+ item.ivrTaskScriptTargetoptionList;
});
this.objyl.ivrTaskTemplateScriptVOList =
this.objyl.ivrLibaTemplateScriptVOList;
diff --git a/src/views/patient/questionnaire/index.vue b/src/views/patient/questionnaire/index.vue
index 15a7093..c1dec41 100644
--- a/src/views/patient/questionnaire/index.vue
+++ b/src/views/patient/questionnaire/index.vue
@@ -138,8 +138,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -723,7 +722,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -1147,12 +1146,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1289,10 +1285,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/patient/shadow/index.vue b/src/views/patient/shadow/index.vue
index a6f3b66..f5dc402 100644
--- a/src/views/patient/shadow/index.vue
+++ b/src/views/patient/shadow/index.vue
@@ -138,8 +138,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -723,7 +722,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -1147,12 +1146,9 @@
Seedetails(row) {
let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/detailpage/",
query: {
@@ -1289,10 +1285,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/patient/subsequent/index.vue b/src/views/patient/subsequent/index.vue
index 1003a53..751d2af 100644
--- a/src/views/patient/subsequent/index.vue
+++ b/src/views/patient/subsequent/index.vue
@@ -138,8 +138,7 @@
<el-col :span="1.5">
<el-button
type="primary"
- plain
- icon="el-icon-plus"
+ icon="el-icon-plus"
size="medium"
@click="handleAdd"
>鏂板</el-button
@@ -739,7 +738,7 @@
// value: 0,
// },
{
- name: "搴旈殢璁�",
+ name: "闇�闅忚",
value: 0,
},
@@ -1132,14 +1131,11 @@
},
// 璺宠浆璇︽儏椤�
Seedetails(row) {
- let type = "";
+ let type = "";
console.log(row, "rwo");
- if (row.preachformson) {
- if (row.preachformson.includes("3")) {
+ if (row.type == 1) {
type = 1;
- console.log(type, "rwo");
}
- }
this.$router.push({
path: "/followvisit/record/physical/",
query: {
@@ -1276,10 +1272,12 @@
}
}
::v-deep.leftvlue .el-card__body {
- background: #d0e9fd;
+ background: #F2F8FF;
+ color: #324A9B;
}
::v-deep.leftvlue .el-card__body:hover {
- background: #8dc8f8;
+ background: #3664D9;
+ color: #fff;
cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
}
::v-deep.errleftvlue .el-card__body {
diff --git a/src/views/satisfaction.vue b/src/views/satisfaction.vue
new file mode 100644
index 0000000..26585af
--- /dev/null
+++ b/src/views/satisfaction.vue
@@ -0,0 +1,1188 @@
+<template>
+ <div class="questionnaire" :class="'survey-type-' + surveyType">
+ <!-- 鍔犺浇鐘舵�� -->
+ <div v-if="loading" class="loading-state">
+ <div class="loading-spinner">
+ <i class="el-icon-loading"></i>
+ <p>闂嵎鍔犺浇涓�...</p>
+ </div>
+ </div>
+
+ <!-- 鏃犳暟鎹姸鎬� -->
+ <div v-else-if="isEmptyData" class="empty-state">
+ <div class="empty-content">
+ <i class="el-icon-document" style="font-size: 64px; color: #909399"></i>
+ <h3>鏆傛棤闂嵎鏁版嵁</h3>
+ <p>褰撳墠娌℃湁鍙敤鐨勯棶鍗凤紝璇疯仈绯荤鐞嗗憳鎴栫◢鍚庨噸璇�</p>
+ <el-button
+ type="primary"
+ @click="loadSurveyData"
+ icon="el-icon-refresh"
+ >
+ 閲嶆柊鍔犺浇
+ </el-button>
+ </div>
+ </div>
+
+ <!-- 閿欒鐘舵�� -->
+ <div v-else-if="hasError" class="error-state">
+ <div class="error-content">
+ <i class="el-icon-warning" style="font-size: 64px; color: #f56c6c"></i>
+ <h3>鏁版嵁鍔犺浇澶辫触</h3>
+ <p>{{ errorMessage }}</p>
+ <el-button
+ type="primary"
+ @click="loadSurveyData"
+ icon="el-icon-refresh"
+ >
+ 閲嶆柊灏濊瘯
+ </el-button>
+ </div>
+ </div>
+ <div class="CONTENT" v-if="!accomplish">
+ <div class="preview-left">
+ <div class="toptitle">
+ <div class="title">{{ surveyTitle }}</div>
+ <div style="font-size: 22px; margin-bottom: 20px; line-height: 1.5">
+ {{ surveyDescription }}
+ </div>
+ </div>
+ <div v-if="showDeptSelect" class="dept-select-container">
+ <el-form>
+ <el-form>
+ <el-form-item label="閫夋嫨绉戝">
+ <el-select
+ v-model="selectedDept"
+ filterable
+ clearable
+ placeholder="璇烽�夋嫨绉戝鎴栬緭鍏ュ叧閿瘝鎼滅储"
+ @change="handleDeptChange"
+ popper-class="dept-select-dropdown"
+ >
+ <el-option
+ v-for="dept in filteredDeptList"
+ :key="dept.code"
+ :label="`${dept.name} (${dept.code})`"
+ :value="dept.name"
+ >
+ <span>{{ dept.name }}</span>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
+ </el-form>
+ </div>
+ <el-divider></el-divider>
+
+ <!-- 鍗曢�夐 -->
+ <div
+ class="topic-dev"
+ v-for="(item, index) in questionList"
+ :key="item.scriptId"
+ >
+ <div class="scriptTopic-dev" :key="index" v-if="item.scriptType == 1">
+ <div class="dev-text">
+ {{ index + 1 }}銆�<span style="line-height: 1.5"
+ >{{ item.scriptContent }}
+ <span style="color: #3ba2f7">[鍗曢�塢</span></span
+ >
+ </div>
+ <div class="dev-xx">
+ <el-radio-group
+ class="custom-radio"
+ v-model="item.scriptResult"
+ @change="handleOptionChange($event, index, item)"
+ >
+ <el-radio
+ border
+ v-for="(option, optIndex) in item.svyLibTemplateTargetoptions"
+ :class="
+ option.isabnormal &&
+ item.scriptResult == option.optioncontent
+ ? 'red-star'
+ : ''
+ "
+ :key="optIndex"
+ :label="option.optioncontent"
+ >{{ option.optioncontent }}</el-radio
+ >
+ </el-radio-group>
+ </div>
+ <div v-show="item.prompt">
+ <el-alert :title="item.prompt" type="warning"> </el-alert>
+ </div>
+ </div>
+
+ <!-- 澶氶�夐 -->
+ <div class="scriptTopic-dev" :key="index" v-if="item.scriptType == 2">
+ <div class="dev-text">
+ {{ index + 1 }}銆�<span style="line-height: 1.5"
+ >{{ item.scriptContent }}
+ <span style="color: #3ba2f7">[澶氶�塢</span></span
+ >
+ </div>
+ <div class="dev-xx">
+ <el-checkbox-group
+ class="custom-radio"
+ v-model="item.scriptResult"
+ >
+ <el-checkbox
+ border
+ @change="$forceUpdate()"
+ v-for="(option, optIndex) in item.svyLibTemplateTargetoptions"
+ :key="optIndex"
+ :label="option.optioncontent"
+ >
+ {{ option.optioncontent }}
+ </el-checkbox>
+ </el-checkbox-group>
+ </div>
+ <div v-show="item.prompt && item.scriptResult[0]">
+ <el-alert :title="item.prompt" type="warning"> </el-alert>
+ </div>
+ </div>
+
+ <!-- 濉┖棰� -->
+ <div class="scriptTopic-dev" :key="index" v-if="item.scriptType == 4">
+ <div class="dev-text">
+ {{ index + 1 }}銆�<span style="line-height: 1.5"
+ >{{ item.scriptContent
+ }}<span style="color: #3ba2f7">[闂瓟]</span></span
+ >
+ </div>
+ <div class="dev-xx">
+ <el-input
+ type="textarea"
+ :rows="3"
+ placeholder="璇疯緭鍏�"
+ v-model="item.scriptResult"
+ clearable
+ >
+ </el-input>
+ </div>
+ </div>
+ </div>
+
+ <div class="bottom-fixed">
+ <el-button
+ type="primary"
+ style="width: 80%; font-size: 20px"
+ @click="submitSurvey"
+ >鎻愪氦闂嵎</el-button
+ >
+ </div>
+ </div>
+ </div>
+
+ <div class="CONTENT" v-else>
+ <div class="preview-lefts">
+ <div class="completion-message">
+ <div class="thank-you">{{ this.accomplish || "鎰熻阿鎮ㄧ殑閰嶅悎!" }}</div>
+ <div class="feedback-message">{{ completionMessage }}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import {
+ getScriptByCondition,
+ saveMYDQuestionAnswer,
+ WLgetDept,
+} from "@/api/AiCentre/index";
+
+export default {
+ data() {
+ return {
+ surveyType: null, // 'outpatient', 'inpatient'
+ surveyTitle: "",
+ surveyDescription: "",
+ questionList: [],
+ deptList: [],
+ completionMessage: "",
+ accomplish: false,
+ showDeptSelect: false,
+ selectedDept: null,
+ deptSearchText: "", // 淇濈暀鐢ㄤ簬鏈湴杩囨护
+ deptList: [],
+ filteredDeptList: [],
+
+ // 鍔犲瘑鍚庣殑鍙傛暟
+ encryptedParams: {
+ param1: "",
+ param2: "",
+ param3: "",
+ param4: "",
+ param5: "",
+ param6: "30001002",
+ },
+ isEmptyData: false, // 鏂板锛氭棤鏁版嵁鐘舵��
+ hasError: false, // 鏂板锛氶敊璇姸鎬�
+ loading: false, // 鏂板锛氬姞杞界姸鎬�
+ errorMessage: "", // 鏂板锛氶敊璇俊鎭�
+ // 娴嬭瘯鏁版嵁
+ testData: {
+ 1: {
+ title: "闂ㄨ瘖婊℃剰搴﹁皟鏌�",
+ description:
+ "浜茬埍鐨勬偅鑰咃紝鎰熻阿鎮ㄩ�夋嫨鎴戜滑鐨勫尰鐤楁湇鍔°�備负浜嗕笉鏂彁鍗囨湇鍔¤川閲忥紝璇锋偍鑺卞嚑鍒嗛挓鏃堕棿濉啓姝ら棶鍗枫��",
+ questions: [
+ {
+ scriptId: 1,
+ scriptType: 1,
+ scriptContent: "鎮ㄥ闂ㄨ瘖鍖荤敓鐨勮瘖鐤楁按骞虫槸鍚︽弧鎰忥紵",
+ scriptResult: null,
+ svyLibTemplateTargetoptions: [
+ { optioncontent: "闈炲父婊℃剰", value: "5", isabnormal: false },
+ { optioncontent: "婊℃剰", value: "4", isabnormal: false },
+ { optioncontent: "涓�鑸�", value: "3", isabnormal: true },
+ { optioncontent: "涓嶆弧鎰�", value: "2", isabnormal: true },
+ { optioncontent: "闈炲父涓嶆弧鎰�", value: "1", isabnormal: true },
+ ],
+ },
+ {
+ scriptId: 2,
+ scriptType: 1,
+ scriptContent: "鎮ㄥ闂ㄨ瘖鎶ゅ+鐨勬湇鍔℃�佸害鏄惁婊℃剰锛�",
+ scriptResult: null,
+ svyLibTemplateTargetoptions: [
+ { optioncontent: "闈炲父婊℃剰", value: "5", isabnormal: false },
+ { optioncontent: "婊℃剰", value: "4", isabnormal: false },
+ { optioncontent: "涓�鑸�", value: "3", isabnormal: true },
+ { optioncontent: "涓嶆弧鎰�", value: "2", isabnormal: true },
+ { optioncontent: "闈炲父涓嶆弧鎰�", value: "1", isabnormal: true },
+ ],
+ },
+ {
+ scriptId: 3,
+ scriptType: 2,
+ scriptContent: "鎮ㄨ涓洪棬璇婂摢浜涙柟闈㈤渶瑕佹敼杩涳紵锛堝彲澶氶�夛級",
+ scriptResult: [],
+ svyLibTemplateTargetoptions: [
+ {
+ optioncontent: "鎺掗槦绛夊�欐椂闂�",
+ value: "waiting_time",
+ isabnormal: false,
+ },
+ {
+ optioncontent: "鍖荤敓娌熼�氭柟寮�",
+ value: "communication",
+ isabnormal: false,
+ },
+ {
+ optioncontent: "灏辫瘖鐜",
+ value: "environment",
+ isabnormal: false,
+ },
+ {
+ optioncontent: "鍖荤枟璁惧",
+ value: "equipment",
+ isabnormal: false,
+ },
+ { optioncontent: "鍏朵粬", value: "other", isabnormal: false },
+ ],
+ },
+ {
+ scriptId: 4,
+ scriptType: 4,
+ scriptContent: "鎮ㄥ闂ㄨ瘖鏈嶅姟杩樻湁浠�涔堝叾浠栧缓璁紵",
+ scriptResult: null,
+ },
+ ],
+ completionMessage:
+ "鎰熻阿鎮ㄥ疂璐电殑鎰忚锛佹垜浠皢涓嶆柇鏀硅繘闂ㄨ瘖鏈嶅姟璐ㄩ噺锛屼负鎮ㄦ彁渚涙洿濂界殑鍖荤枟鏈嶅姟浣撻獙銆�",
+ },
+ 2: {
+ title: "浣忛櫌婊℃剰搴﹁皟鏌�",
+ description:
+ "浜茬埍鐨勬偅鑰呭強瀹跺睘锛屾劅璋㈡偍閫夋嫨鍦ㄦ垜闄綇闄㈡不鐤椼�備负浜嗘彁鍗囦綇闄㈡湇鍔¤川閲忥紝璇锋偍濉啓姝ら棶鍗枫��",
+ questions: [
+ {
+ scriptId: 1,
+ scriptType: 1,
+ scriptContent: "鎮ㄥ浣忛櫌鏈熼棿鍖荤敓鐨勮瘖鐤楁按骞虫槸鍚︽弧鎰忥紵",
+ scriptResult: null,
+ svyLibTemplateTargetoptions: [
+ { optioncontent: "闈炲父婊℃剰", value: "5", isabnormal: false },
+ { optioncontent: "婊℃剰", value: "4", isabnormal: false },
+ { optioncontent: "涓�鑸�", value: "3", isabnormal: true },
+ { optioncontent: "涓嶆弧鎰�", value: "2", isabnormal: true },
+ { optioncontent: "闈炲父涓嶆弧鎰�", value: "1", isabnormal: true },
+ ],
+ },
+ {
+ scriptId: 2,
+ scriptType: 1,
+ scriptContent: "鎮ㄥ浣忛櫌鏈熼棿鎶ゅ+鐨勬姢鐞嗘湇鍔℃槸鍚︽弧鎰忥紵",
+ scriptResult: null,
+ svyLibTemplateTargetoptions: [
+ { optioncontent: "闈炲父婊℃剰", value: "5", isabnormal: false },
+ { optioncontent: "婊℃剰", value: "4", isabnormal: false },
+ { optioncontent: "涓�鑸�", value: "3", isabnormal: true },
+ { optioncontent: "涓嶆弧鎰�", value: "2", isabnormal: true },
+ { optioncontent: "闈炲父涓嶆弧鎰�", value: "1", isabnormal: true },
+ ],
+ },
+ {
+ scriptId: 3,
+ scriptType: 1,
+ scriptContent: "鎮ㄥ浣忛櫌鐥呮埧鐨勭幆澧冨拰鍗敓鏄惁婊℃剰锛�",
+ scriptResult: null,
+ svyLibTemplateTargetoptions: [
+ { optioncontent: "闈炲父婊℃剰", value: "5", isabnormal: false },
+ { optioncontent: "婊℃剰", value: "4", isabnormal: false },
+ { optioncontent: "涓�鑸�", value: "3", isabnormal: true },
+ { optioncontent: "涓嶆弧鎰�", value: "2", isabnormal: true },
+ { optioncontent: "闈炲父涓嶆弧鎰�", value: "1", isabnormal: true },
+ ],
+ },
+ {
+ scriptId: 4,
+ scriptType: 4,
+ scriptContent: "鎮ㄥ浣忛櫌鏈嶅姟杩樻湁浠�涔堝叾浠栧缓璁紵",
+ scriptResult: null,
+ },
+ ],
+ completionMessage:
+ "鎰熻阿鎮ㄥ鎴戜滑宸ヤ綔鐨勬敮鎸侊紒鎴戜滑灏嗘牴鎹偍鐨勫弽棣堟寔缁敼杩涗綇闄㈡湇鍔¤川閲忥紝绁濇偍鏃╂棩搴峰锛�",
+ },
+ },
+ };
+ },
+ created() {
+ this.initSurveyData();
+ },
+ methods: {
+ // 鍒濆鍖栬皟鏌ユ暟鎹�
+ initSurveyData() {
+ // 浠庤矾鐢卞弬鏁拌幏鍙栧姞瀵嗗悗鐨勫弬鏁�
+ this.encryptedParams.param1 =
+ this.$route.query.param1 ||
+ "WOAq2QZd43E-qg-96SvuIFsn-sdRVxQNH4M82XhpXp_Ux4PFrPaqSFXcKaeA6oxEgNhPisA86LvU9kTAEz4xvQ==";
+ this.encryptedParams.param2 =
+ this.$route.query.param2 ||
+ "XWeBh42RLYlNsMcomgw9UXhUPySkRP5EneWSueSq8F84qwYznU9heXuSx4tUMUtDvRnuJ86moJivy-kWQX12Rg==";
+ this.encryptedParams.param5 = this.$route.query.param3 || "2"; // 1=浣忛櫌, 2=闂ㄨ瘖, 3=鎶曡瘔寤鸿
+ this.encryptedParams.param6 = this.$route.query.param4 || "30001002";
+
+ this.surveyType = parseInt(this.encryptedParams.param5) || 2;
+
+ // 鍔犺浇闂嵎鏁版嵁
+ this.loadSurveyData();
+ // 鑾峰彇绉戝鍒楄〃
+ this.WLgetDept();
+ },
+ WLgetDept() {
+ // 璋冪敤鎺ュ彛鑾峰彇绉戝鏁版嵁
+ WLgetDept(this.encryptedParams.param6).then((res) => {
+ this.deptList = Object.entries(res.data).map(([code, name]) => ({
+ code,
+ name,
+ }));
+ this.filteredDeptList = [...this.deptList];
+
+ if (this.surveyType === 3) {
+ this.showDeptSelect = true;
+ }
+ });
+ },
+ filterDeptList() {
+ if (!this.deptSearchText) {
+ this.filteredDeptList = [...this.deptList];
+ return;
+ }
+
+ const searchText = this.deptSearchText.toLowerCase();
+ this.filteredDeptList = this.deptList.filter(
+ (dept) =>
+ dept.name.toLowerCase().includes(searchText) ||
+ dept.code.toLowerCase().includes(searchText)
+ );
+ },
+ // 鍔犺浇璋冩煡鏁版嵁
+ loadSurveyData() {
+ this.loading = true;
+ this.isEmptyData = false;
+ this.hasError = false;
+ this.errorMessage = "";
+ // 璋冪敤鎺ュ彛鑾峰彇闂嵎鏁版嵁
+ // 鏍规嵁闂嵎绫诲瀷璁剧疆涓嶅悓鐨勫弬鏁�
+ let encryptedParams = {
+ param1: this.encryptedParams.param1,
+ };
+
+ // 鏍规嵁surveyType璁剧疆涓嶅悓鐨勫弬鏁�
+ switch (this.surveyType) {
+ case 1: // 浣忛櫌
+ encryptedParams.param2 = this.encryptedParams.param2;
+ break;
+ case 2: // 闂ㄨ瘖
+ encryptedParams.param3 = this.encryptedParams.param2;
+ break;
+ case 3: // 鎶曡瘔寤鸿
+ encryptedParams.param4 = this.encryptedParams.param2;
+ break;
+ default:
+ encryptedParams.param3 = this.encryptedParams.param2;
+ }
+ getScriptByCondition(encryptedParams)
+ .then((res) => {
+ if (res.code === 200) {
+ if (res.data.result) {
+ this.accomplish = res.data.result;
+ return;
+ }
+ if (
+ !res.data.svyLibTemplateScriptVOS ||
+ res.data.svyLibTemplateScriptVOS.length === 0
+ ) {
+ this.isEmptyData = true;
+ this.$message.warning("鏆傛棤闂嵎鏁版嵁");
+ return;
+ }
+ // 澶勭悊鎺ュ彛杩斿洖鐨勬暟鎹�
+ this.questionList = res.data.svyLibTemplateScriptVOS.map((item) => {
+ return {
+ ...item,
+ scriptResult: item.scriptType === 2 ? [] : null,
+ };
+ });
+
+ // 鏍规嵁surveyType璁剧疆鏍囬鍜屾弿杩�
+ switch (this.surveyType) {
+ case 2: // 闂ㄨ瘖
+ this.surveyTitle = "闂ㄨ瘖婊℃剰搴﹁皟鏌�";
+ this.surveyDescription =
+ "浜茬埍鐨勬偅鑰咃紝鎰熻阿鎮ㄩ�夋嫨鎴戜滑鐨勫尰鐤楁湇鍔°�備负浜嗕笉鏂彁鍗囨湇鍔¤川閲忥紝璇锋偍鑺卞嚑鍒嗛挓鏃堕棿濉啓姝ら棶鍗枫��";
+ this.completionMessage =
+ "鎰熻阿鎮ㄥ疂璐电殑鎰忚锛佹垜浠皢涓嶆柇鏀硅繘闂ㄨ瘖鏈嶅姟璐ㄩ噺锛屼负鎮ㄦ彁渚涙洿濂界殑鍖荤枟鏈嶅姟浣撻獙銆�";
+ break;
+ case 1: // 浣忛櫌
+ this.surveyTitle = "浣忛櫌婊℃剰搴﹁皟鏌�";
+ this.surveyDescription =
+ "浜茬埍鐨勬偅鑰呭強瀹跺睘锛屾劅璋㈡偍閫夋嫨鍦ㄦ垜闄綇闄㈡不鐤椼�備负浜嗘彁鍗囦綇闄㈡湇鍔¤川閲忥紝璇锋偍濉啓姝ら棶鍗枫��";
+ this.completionMessage =
+ "鎰熻阿鎮ㄥ鎴戜滑宸ヤ綔鐨勬敮鎸侊紒鎴戜滑灏嗘牴鎹偍鐨勫弽棣堟寔缁敼杩涗綇闄㈡湇鍔¤川閲忥紝绁濇偍鏃╂棩搴峰锛�";
+ break;
+ case 3: // 鎶曡瘔寤鸿
+ this.surveyTitle = "鎶曡瘔寤鸿鍙嶉";
+ this.surveyDescription =
+ "灏婃暚鐨勫鎴凤紝鎰熻阿鎮ㄦ娊鍑哄疂璐垫椂闂存彁渚涘弽棣堛�傛偍鐨勬剰瑙佸鎴戜滑鏀硅繘鏈嶅姟闈炲父閲嶈銆�";
+ this.completionMessage =
+ "鎰熻阿鎮ㄧ殑鍙嶉锛佹垜浠凡鏀跺埌鎮ㄧ殑鎶曡瘔/寤鸿锛屽皢灏藉揩澶勭悊骞朵笌鎮ㄨ仈绯汇��";
+ break;
+ default:
+ this.useTestData(1); // 榛樿浣跨敤闂ㄨ瘖鏁版嵁
+ }
+ } else {
+ // 鎺ュ彛鏃犳暟鎹垨澶辫触锛屼娇鐢ㄦ祴璇曟暟鎹�
+ // this.useTestData(this.surveyType);
+ }
+ })
+ .catch(() => {
+ console.error("鏁版嵁鑾峰彇澶辫触:", error);
+ this.hasError = true;
+ this.errorMessage =
+ error.message || "闂嵎鏁版嵁鍔犺浇澶辫触锛岃妫�鏌ョ綉缁滆繛鎺ュ悗閲嶈瘯";
+ this.$message.error("鏁版嵁鍔犺浇澶辫触");
+ // 鎺ュ彛璋冪敤澶辫触锛屼娇鐢ㄦ祴璇曟暟鎹�
+ // this.useTestData(this.surveyType);
+ })
+ .finally(() => {
+ this.loading = false;
+ });
+ },
+ handleDeptChange(value) {
+ this.selectedDept = value;
+ // 鍙互鍦ㄨ繖閲屾坊鍔犲叾浠栧鐞嗛�昏緫
+ },
+ // 浣跨敤娴嬭瘯鏁版嵁
+ useTestData(surveyType) {
+ const type = [1, 2, 3].includes(surveyType) ? surveyType : 1;
+ const testData = this.testData[type];
+
+ this.surveyTitle = testData.title;
+ this.surveyDescription = testData.description;
+ this.questionList = testData.questions;
+ this.completionMessage = testData.completionMessage;
+ },
+
+ // 鎻愪氦璋冩煡闂嵎锛堢洿鎺ユ彁浜わ紝涓嶇粡杩囩紦瀛橈級
+ async submitSurvey() {
+ // 楠岃瘉蹇呭~椤�
+ if (this.hasUnansweredRequiredQuestions()) {
+ this.$message.error("璇峰畬鎴愭墍鏈夊繀濉棶棰樺悗鍐嶆彁浜�");
+ return;
+ }
+
+ try {
+ const submitData = this.prepareSubmitData();
+ const res = await saveMYDQuestionAnswer(submitData);
+
+ if (res.code === 200) {
+ this.accomplish = "闂嵎宸叉彁浜�";
+ this.$message.success("鎻愪氦鎴愬姛锛佹劅璋㈡偍鐨勫弽棣堛��");
+ } else {
+ this.$message.error(res.msg || "鎻愪氦澶辫触锛岃绋嶅悗鍐嶈瘯");
+ }
+ } catch (error) {
+ this.$message.error("缃戠粶閿欒锛屾彁浜ゅけ璐�");
+ console.error("鎻愪氦澶辫触:", error);
+ }
+ },
+
+ // 妫�鏌ユ槸鍚︽湁鏈洖绛旂殑蹇呭~闂
+ hasUnansweredRequiredQuestions() {
+ return this.questionList.some((question) => {
+ return (
+ question.required &&
+ (question.scriptResult === null ||
+ question.scriptResult === "" ||
+ (Array.isArray(question.scriptResult) &&
+ question.scriptResult.length === 0))
+ );
+ });
+ },
+
+ // 鍑嗗鎻愪氦鏁版嵁
+ prepareSubmitData() {
+ // 鍒涘缓绉戝閫夋嫨闂瀵硅薄
+ const deptQuestion = {
+ scriptId: "dept_selection", // 鑷畾涔塈D
+ scriptType: 4, // 4琛ㄧず闂瓟绫诲瀷
+ scriptContent: "閫夋嫨鐨勭瀹�",
+ scriptResult: this.selectedDept || "", // 瀛樺偍閫夋嫨鐨勭瀹ゅ悕绉�
+ required: false, // 闈炲繀濉�
+ sort: 999,
+ nextScriptno: "1",
+ };
+
+ return {
+ taskId: this.encryptedParams.param1,
+ serialnum: this.encryptedParams.param2 || this.encryptedParams.param3,
+ mzzy: this.surveyType,
+ svyLibTemplateScriptVOS: [
+ deptQuestion, // 灏嗙瀹ら�夋嫨浣滀负绗竴涓棶棰�
+ ...this.questionList.map((item) => {
+ return {
+ scriptId: item.scriptId,
+ scriptType: item.scriptType,
+ scriptResult:
+ item.scriptType === 2
+ ? (item.scriptResult || []).join("&")
+ : item.scriptResult || "",
+ nextScriptno: item.nextScriptno,
+ score: item.score,
+ prompt: item.prompt,
+ ...item,
+ };
+ }),
+ ],
+ excep: this.checkAbnormalOptions() ? 1 : 0,
+ };
+ },
+
+ // 妫�鏌ュ紓甯搁�夐」
+ checkAbnormalOptions() {
+ return this.questionList.some((question) => {
+ if (!question.scriptResult) return false;
+
+ if (question.scriptType === 1) {
+ // 鍗曢�夐寮傚父妫�鏌�
+ const selectedOption = question.svyLibTemplateTargetoptions.find(
+ (opt) => opt.optioncontent === question.scriptResult
+ );
+ return selectedOption?.isabnormal;
+ } else if (question.scriptType === 2) {
+ // 澶氶�夐寮傚父妫�鏌�
+ return question.scriptResult.some((answer) => {
+ const option = question.svyLibTemplateTargetoptions.find(
+ (opt) => opt.optioncontent === answer
+ );
+ return option?.isabnormal;
+ });
+ }
+ return false;
+ });
+ },
+
+ // 澶勭悊鍗曢�夐�夐」鍙樺寲
+ handleOptionChange(selectedValue, index, question) {
+ const selectedOption = question.svyLibTemplateTargetoptions.find(
+ (option) => option.optioncontent === selectedValue
+ );
+
+ if (selectedOption) {
+ this.questionList[index].nextScriptno = selectedOption.nextQuestion;
+ this.questionList[index].score = selectedOption.score;
+ this.questionList[index].prompt = selectedOption.prompt;
+ }
+ },
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+/* 鍩虹鏍峰紡鍙橀噺 */
+:root {
+ --primary-color: #1a73e8; /* 榛樿钃濊壊 */
+ --secondary-color: #34d399; /* 榛樿缁胯壊 */
+ --alert-color: #ed8936; /* 榛樿姗欒壊 */
+}
+
+/* 闂ㄨ瘖鏍峰紡鍙橀噺 */
+.survey-type-1 {
+ --primary-color: #1a73e8; /* 鍖荤枟钃� */
+ --secondary-color: #34d399; /* 鍋ュ悍缁� */
+ --alert-color: #ed8936; /* 璀︾ず姗� */
+}
+
+/* 浣忛櫌鏍峰紡鍙橀噺 */
+.survey-type-2 {
+ --primary-color: #5a67d8; /* 娣辫摑绱� */
+ --secondary-color: #667eea; /* 娴呰摑绱� */
+ --alert-color: #f56565; /* 璀︾ず绾� */
+}
+
+/* 鎶曡瘔寤鸿鏍峰紡鍙橀噺 */
+.survey-type-3 {
+ --primary-color: #e53e3e; /* 绱ф�ョ孩 */
+ --secondary-color: #f6ad55; /* 璀︾ず榛� */
+ --alert-color: #f56565; /* 璀︾ず绾� */
+}
+
+.questionnaire {
+ font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
+ min-height: 100vh;
+ margin: 0;
+ padding: 0;
+ color: #333;
+ transition: all 0.3s ease;
+
+ /* 鏍规嵁surveyType搴旂敤涓嶅悓鐨勪富棰� */
+ &.survey-type-1 {
+ background-color: #f5f9fc;
+ --theme-gradient: linear-gradient(135deg, #1a73e8, #34d399);
+ }
+
+ &.survey-type-2 {
+ background-color: #f8f9ff;
+ --theme-gradient: linear-gradient(135deg, #5a67d8, #667eea);
+ }
+
+ &.survey-type-3 {
+ background-color: #fff5f5;
+ --theme-gradient: linear-gradient(135deg, #e53e3e, #f6ad55);
+ }
+}
+.dept-select-container {
+ margin: 20px 0;
+ padding: 20px;
+ background-color: #f8fafc;
+ border-radius: 8px;
+ border: 1px solid #e2e8f0;
+}
+
+/* 璋冩暣涓嬫媺閫夐」鏍峰紡 */
+.el-select-dropdown__item {
+ display: flex;
+ justify-content: space-between;
+}
+/* 涓嬫媺妗嗘牱寮忚皟鏁� */
+::v-deep .dept-select-dropdown {
+ max-height: 400px; /* 闄愬埗鏈�澶ч珮搴� */
+ overflow-y: auto; /* 娣诲姞婊氬姩鏉� */
+
+ .el-select-dropdown__item {
+ display: flex;
+ justify-content: space-between;
+ padding: 0 20px;
+ height: auto;
+ line-height: 36px;
+
+ span {
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ /* 鍚嶇О閮ㄥ垎 */
+ span:first-child {
+ width: 60%;
+ text-align: left;
+ }
+
+ /* 缂栫爜閮ㄥ垎 */
+ span:last-child {
+ width: 40%;
+ text-align: right;
+ }
+ }
+}
+
+/* 绉诲姩绔�傞厤 */
+@media (max-width: 768px) {
+ ::v-deep .dept-select-dropdown {
+ max-width: 100vw; /* 闄愬埗鏈�澶у搴︿负瑙嗗彛瀹藉害 */
+ width: auto !important;
+ left: 10px !important;
+ right: 10px !important;
+
+ .el-select-dropdown__item {
+ span:first-child {
+ width: 50%;
+ }
+ span:last-child {
+ width: 50%;
+ }
+ }
+ }
+}
+.CONTENT {
+ max-width: 900px;
+ margin: 0 auto;
+ padding: 20px;
+
+ .title {
+ color: var(--primary-color);
+ font-size: 28px;
+ font-weight: 600;
+ margin-bottom: 15px;
+ text-align: center;
+ letter-spacing: 0.5px;
+ position: relative;
+
+ &::after {
+ content: "";
+ position: absolute;
+ bottom: -8px;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 60px;
+ height: 3px;
+ background: var(--theme-gradient);
+ border-radius: 3px;
+ }
+ }
+}
+
+.preview-left {
+ margin: 20px 0;
+ margin-bottom: 100px;
+ background-color: #fff;
+ border-radius: 12px;
+ padding: 30px;
+ border: none;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
+ transition: all 0.3s ease;
+
+ &:hover {
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
+ }
+
+ .toptitle {
+ margin-bottom: 25px;
+
+ div {
+ color: #4a5568;
+ font-size: 18px;
+ line-height: 1.6;
+ text-align: center;
+ }
+ }
+
+ .el-divider {
+ background-color: #e2e8f0;
+ margin: 25px 0;
+ }
+
+ .topic-dev {
+ margin-bottom: 30px;
+ font-size: 17px;
+ background-color: #f8fafc;
+ border-radius: 10px;
+ padding: 20px;
+ transition: all 0.3s ease;
+ position: relative;
+ overflow: hidden;
+
+ &:hover {
+ background-color: #f1f5f9;
+ }
+
+ /* 娣诲姞绫诲瀷鏍囪瘑灏忔爣绛� */
+ &::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 4px;
+ height: 100%;
+ background: var(--primary-color);
+ }
+
+ .dev-text {
+ margin-bottom: 18px;
+ font-weight: 500;
+ color: #2d3748;
+ font-size: 18px;
+ line-height: 1.6;
+
+ span[style*="color: #3ba2f7"] {
+ font-size: 14px;
+ margin-left: 8px;
+ color: var(--primary-color) !important;
+ }
+ }
+ }
+}
+
+.preview-lefts {
+ margin: 20px 0;
+ background-color: #fff;
+ border-radius: 12px;
+ padding: 40px;
+ min-height: 400px;
+ border: none;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+
+ .completion-message {
+ padding: 40px;
+ max-width: 600px;
+
+ .thank-you {
+ font-size: 32px;
+ color: var(--primary-color);
+ font-weight: 600;
+ margin-bottom: 25px;
+ position: relative;
+ display: inline-block;
+
+ &::after {
+ content: "";
+ position: absolute;
+ bottom: -10px;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 80px;
+ height: 3px;
+ background: var(--theme-gradient);
+ border-radius: 3px;
+ }
+ }
+
+ .feedback-message {
+ font-size: 20px;
+ line-height: 1.7;
+ color: #4a5568;
+ margin: 0 auto;
+ }
+ }
+}
+
+.red-star {
+ ::v-deep .el-radio__label,
+ ::v-deep .el-checkbox__label {
+ position: relative;
+ padding-right: 20px;
+
+ &::after {
+ content: "*";
+ color: #ef4444;
+ position: absolute;
+ right: 0;
+ top: 0;
+ font-size: 16px;
+ }
+ }
+}
+.loading-state {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 60vh;
+ padding: 40px;
+
+ .loading-spinner {
+ text-align: center;
+
+ .el-icon-loading {
+ font-size: 48px;
+ color: var(--primary-color);
+ margin-bottom: 16px;
+ animation: rotating 2s linear infinite;
+ }
+
+ p {
+ color: #666;
+ font-size: 16px;
+ }
+ }
+}
+
+.empty-state,
+.error-state {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 60vh;
+ padding: 40px;
+
+ .empty-content,
+ .error-content {
+ text-align: center;
+ max-width: 400px;
+
+ h3 {
+ color: #666;
+ font-size: 20px;
+ margin: 16px 0 12px;
+ font-weight: 500;
+ }
+
+ p {
+ color: #999;
+ font-size: 14px;
+ margin-bottom: 24px;
+ line-height: 1.6;
+ }
+ }
+}
+
+.error-state {
+ .error-content {
+ h3 {
+ color: #f56c6c;
+ }
+ }
+}
+
+@keyframes rotating {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+}
+
+/* 鍝嶅簲寮忚皟鏁� */
+@media (max-width: 768px) {
+ .loading-state,
+ .empty-state,
+ .error-state {
+ padding: 20px;
+ min-height: 50vh;
+
+ .el-icon-loading,
+ .el-icon-document,
+ .el-icon-warning {
+ font-size: 40px !important;
+ }
+
+ h3 {
+ font-size: 18px !important;
+ }
+
+ p {
+ font-size: 13px !important;
+ }
+ }
+}
+::v-deep {
+ .el-checkbox-group {
+ display: flex;
+ flex-direction: column;
+ margin: 15px 0;
+ gap: 12px;
+ }
+
+ .el-radio-group {
+ display: flex;
+ flex-direction: column;
+ margin: 15px 0;
+ gap: 12px;
+ }
+
+ .el-radio.is-bordered,
+ .el-checkbox.is-bordered {
+ width: 100%;
+ margin-right: 0;
+ margin-bottom: 10px;
+ max-width: 400px;
+ padding: 14px 20px 14px 15px;
+ border-radius: 8px;
+ height: auto;
+ min-height: 50px;
+ border: 1px solid #e2e8f0;
+ transition: all 0.3s ease;
+ margin-left: 0 !important;
+ margin-top: 0 !important;
+ .el-radio-group,
+ .el-checkbox-group {
+ align-items: center;
+ }
+ &:hover {
+ border-color: var(--primary-color);
+ box-shadow: 0 2px 8px rgba(var(--primary-color), 0.15);
+ }
+
+ &.is-checked {
+ border-color: var(--primary-color);
+ background-color: rgba(var(--primary-color), 0.05);
+ }
+ }
+
+ .el-radio__label,
+ .el-checkbox__label {
+ font-size: 16px;
+ color: #2d3748;
+ }
+
+ .el-alert--warning.is-light {
+ background-color: #fff8f0;
+ color: var(--alert-color);
+ margin-top: 15px;
+ border-radius: 8px;
+ border-left: 4px solid var(--alert-color);
+
+ .el-alert__title {
+ font-size: 15px;
+ line-height: 1.6;
+ color: var(--alert-color);
+ }
+
+ .el-alert__closebtn {
+ color: var(--alert-color);
+ }
+ }
+
+ .el-textarea__inner {
+ font-size: 16px;
+ border-radius: 8px;
+ border: 1px solid #e2e8f0;
+ padding: 12px 15px;
+ transition: all 0.3s ease;
+ min-height: 100px;
+
+ &:focus {
+ border-color: var(--primary-color);
+ box-shadow: 0 0 0 2px rgba(var(--primary-color), 0.2);
+ }
+
+ &::placeholder {
+ color: #a0aec0;
+ }
+ }
+
+ .el-radio__input.is-checked .el-radio__inner {
+ background-color: var(--primary-color);
+ border-color: var(--primary-color);
+ }
+
+ .el-checkbox__input.is-checked .el-checkbox__inner {
+ background-color: var(--primary-color);
+ border-color: var(--primary-color);
+ }
+
+ .el-radio__inner,
+ .el-checkbox__inner {
+ width: 18px;
+ height: 18px;
+ }
+}
+
+.bottom-fixed {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ text-align: center;
+ padding: 10px 0;
+ background: var(--theme-gradient);
+ box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
+ z-index: 1000;
+ transition: all 0.3s ease;
+
+ .el-button {
+ height: 56px;
+ font-size: 18px;
+ font-weight: 500;
+ letter-spacing: 0.5px;
+ border-radius: 8px;
+ background-color: #fff;
+ color: var(--primary-color);
+ border: none;
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
+ transition: all 0.3s ease;
+ width: 80%;
+ max-width: 400px;
+ position: relative;
+ overflow: hidden;
+
+ &::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: -100%;
+ width: 100%;
+ height: 100%;
+ background: linear-gradient(
+ 90deg,
+ transparent,
+ rgba(255, 255, 255, 0.4),
+ transparent
+ );
+ transition: all 0.5s ease;
+ }
+
+ &:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
+
+ &::before {
+ left: 100%;
+ }
+ }
+
+ &:active {
+ transform: translateY(0);
+ }
+ }
+}
+
+/* 鍝嶅簲寮忚璁� */
+@media (max-width: 768px) {
+ .questionnaire {
+ .CONTENT {
+ padding: 15px;
+ }
+
+ .preview-left,
+ .preview-lefts {
+ padding: 20px;
+ margin-bottom: 80px;
+ }
+
+ .title {
+ font-size: 24px !important;
+ }
+
+ .dev-text {
+ font-size: 16px !important;
+ }
+
+ .bottom-fixed .el-button {
+ height: 50px;
+ font-size: 16px;
+ width: 90%;
+ }
+ }
+}
+</style>
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index bb119e0..46770d9 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -126,411 +126,472 @@
>
</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 type="expand">
- <template slot-scope="props">
- <el-table
- :data="props.row.doctorStats"
- border
- style="width: 95%; margin: 0 auto"
- class="inner-table"
- >
- <el-table-column
- label="鍖荤敓濮撳悕"
- prop="drname"
- align="center"
- />
- <el-table-column
- label="绉戝"
- width="120"
- prop="deptname"
- align="center"
- />
- <el-table-column
- label="鍑洪櫌浜烘"
- prop="dischargeCount"
- align="center"
- />
- <el-table-column
- label="鍑洪櫌浜烘"
- align="center"
- key="dischargeCount"
- prop="dischargeCount"
+ <div class="your-table-container">
+ <el-table
+ v-loading="loading"
+ :data="userList"
+ :border="true"
+ @selection-change="handleSelectionChange"
+ @expand-change="handleRowClick"
+ :row-key="getRowKey"
+ show-summary
+ :summary-method="getSummaries"
+ :expand-row-keys="expands"
+ >
+ <!-- 灞曞紑琛岀澶村垪 -->
+ <el-table-column type="expand">
+ <template slot-scope="props">
+ <el-table
+ :data="props.row.doctorStats"
+ border
+ style="width: 95%; margin: 0 auto"
+ class="inner-table"
+ show-summary
+ :summary-method="getInnerSummaries"
>
- </el-table-column>
+ <el-table-column
+ label="鍖荤敓濮撳悕"
+ prop="drname"
+ align="center"
+ />
+ <el-table-column
+ label="绉戝"
+ width="120"
+ prop="deptname"
+ align="center"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ prop="dischargeCount"
+ align="center"
+ />
+ <el-table-column
+ label="鍑洪櫌浜烘"
+ align="center"
+ key="dischargeCount"
+ prop="dischargeCount"
+ >
+ </el-table-column>
- <el-table-column
- label="鏃犻渶闅忚浜烘"
- align="center"
- width="100"
- key="nonFollowUp"
- prop="nonFollowUp"
- >
- </el-table-column>
- <el-table-column
- label="搴旈殢璁夸汉娆�"
- align="center"
- width="100"
- key="followUpNeeded"
- prop="followUpNeeded"
- >
- </el-table-column>
- <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
<el-table-column
- label="搴旈殢璁�"
+ label="鏃犻渶闅忚浜烘"
align="center"
- key="needFollowUp"
- prop="needFollowUp"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
>
</el-table-column>
<el-table-column
- label="寰呴殢璁�"
+ label="搴旈殢璁夸汉娆�"
align="center"
- key="pendingFollowUp"
- prop="pendingFollowUp"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
>
</el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccess"
- prop="followUpSuccess"
+ <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUp"
+ prop="needFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUp"
+ prop="pendingFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccess"
+ prop="followUpSuccess"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFail"
+ prop="followUpFail"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ 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"
+ width="120"
+ 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="weChat"
+ prop="weChat"
+ >
+ </el-table-column>
</el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFail"
- prop="followUpFail"
+ <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUpAgain"
+ prop="needFollowUpAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUpAgain"
+ prop="pendingFollowUpAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccessAgain"
+ prop="followUpSuccessAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFailAgain"
+ prop="followUpFailAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ key="followUpRateAgain"
+ prop="followUpRateAgain"
+ >
+ <!-- <template slot-scope="scope">
+ <span
+ >{{
+ (Number(scope.row.FollowUpRateAgain) * 100).toFixed(2)
+ }}%</span
>
+ </template> -->
+ </el-table-column>
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manualAgain"
+ prop="manualAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐭俊"
+ align="center"
+ key="smsAgain"
+ prop="smsAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChatAgain"
+ prop="weChatAgain"
+ >
+ </el-table-column>
</el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- 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"
- width="120"
- 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="weChat"
- prop="weChat"
- >
- </el-table-column>
- </el-table-column>
- <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
- <el-table-column
- label="搴旈殢璁�"
- align="center"
- key="needFollowUpAgain"
- prop="needFollowUpAgain"
- >
- </el-table-column>
- <el-table-column
- label="寰呴殢璁�"
- align="center"
- key="pendingFollowUpAgain"
- prop="pendingFollowUpAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccessAgain"
- prop="followUpSuccessAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFailAgain"
- prop="followUpFailAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- key="followUpRateAgain"
- prop="followUpRateAgain"
- >
- <!-- <template slot-scope="scope">
- <span
- >{{
- (Number(scope.row.FollowUpRateAgain) * 100).toFixed(2)
- }}%</span
- >
- </template> -->
- </el-table-column>
- <el-table-column
- label="浜哄伐"
- align="center"
- key="manualAgain"
- prop="manualAgain"
- >
- </el-table-column>
- <el-table-column
- label="鐭俊"
- align="center"
- key="smsAgain"
- prop="smsAgain"
- >
- </el-table-column>
- <el-table-column
- label="寰俊"
- align="center"
- key="weChatAgain"
- prop="weChatAgain"
- >
- </el-table-column>
- </el-table-column>
- </el-table>
- </template>
- </el-table-column>
- <el-table-column
- label="鍑洪櫌鐥呭尯"
- align="center"
- sortable
- key="leavehospitaldistrictname"
- prop="leavehospitaldistrictname"
- width="150"
- :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"
- width="100"
- key="nonFollowUp"
- prop="nonFollowUp"
- >
- </el-table-column>
- <el-table-column
- label="搴旈殢璁夸汉娆�"
- align="center"
- width="100"
- key="followUpNeeded"
- prop="followUpNeeded"
- >
- </el-table-column>
- <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
- <el-table-column
- label="搴旈殢璁�"
- align="center"
- key="needFollowUp"
- prop="needFollowUp"
- >
- </el-table-column>
- <el-table-column
- label="寰呴殢璁�"
- align="center"
- key="pendingFollowUp"
- prop="pendingFollowUp"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccess"
- prop="followUpSuccess"
- >
- </el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFail"
- prop="followUpFail"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- 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"
- width="120"
- 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
- >
+ </el-table>
</template>
</el-table-column>
<el-table-column
- label="浜哄伐"
+ label="鍑洪櫌鐥呭尯"
align="center"
- key="manual"
- prop="manual"
+ sortable
+ key="leavehospitaldistrictname"
+ prop="leavehospitaldistrictname"
+ width="150"
+ :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"
+ width="100"
+ key="nonFollowUp"
+ prop="nonFollowUp"
>
</el-table-column>
<el-table-column
- label="鐭俊"
+ label="搴旈殢璁夸汉娆�"
align="center"
- key="sms"
- prop="sms"
+ width="100"
+ key="followUpNeeded"
+ prop="followUpNeeded"
>
+ </el-table-column>
+ <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUp"
+ prop="needFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUp"
+ prop="pendingFollowUp"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccess"
+ prop="followUpSuccess"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFail"
+ prop="followUpFail"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ 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"
+ width="120"
+ 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="weChat"
+ prop="weChat"
+ >
+ </el-table-column>
+ </el-table-column>
+ <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
+ <el-table-column
+ label="闇�闅忚"
+ align="center"
+ key="needFollowUpAgain"
+ prop="needFollowUpAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰呴殢璁�"
+ align="center"
+ key="pendingFollowUpAgain"
+ prop="pendingFollowUpAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鎴愬姛"
+ align="center"
+ key="followUpSuccessAgain"
+ prop="followUpSuccessAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚澶辫触"
+ align="center"
+ key="followUpFailAgain"
+ prop="followUpFailAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="闅忚鐜�"
+ align="center"
+ width="120"
+ key="followUpRateAgain"
+ prop="followUpRateAgain"
+ >
+ <!-- <template slot-scope="scope">
+ <span
+ >{{
+ (Number(scope.row.FollowUpRateAgain) * 100).toFixed(2)
+ }}%</span
+ >
+ </template> -->
+ </el-table-column>
+ <el-table-column
+ label="浜哄伐"
+ align="center"
+ key="manualAgain"
+ prop="manualAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="鐭俊"
+ align="center"
+ key="smsAgain"
+ prop="smsAgain"
+ >
+ </el-table-column>
+ <el-table-column
+ label="寰俊"
+ align="center"
+ key="weChatAgain"
+ prop="weChatAgain"
+ >
+ </el-table-column>
</el-table-column>
<el-table-column
- label="寰俊"
+ v-if="orgname == '涓芥按甯備腑鍖婚櫌'"
align="center"
- key="weChat"
- prop="weChat"
+ label="闅忚鎯呭喌"
>
+ <el-table-column
+ label="姝e父璇煶"
+ align="center"
+ width="100"
+ key="taskSituation1"
+ prop="taskSituation1"
+ >
+ </el-table-column
+ ><el-table-column
+ label="鎮h�呮嫆鎺ユ垨鎷掕"
+ align="center"
+ width="100"
+ key="taskSituation2"
+ prop="taskSituation2"
+ >
+ </el-table-column
+ ><el-table-column
+ label="闈㈣鎴栬�呮帴璇�"
+ align="center"
+ width="100"
+ key="taskSituation3"
+ prop="taskSituation3"
+ >
+ </el-table-column
+ ><el-table-column
+ label="寰俊闅忚"
+ align="center"
+ width="100"
+ key="taskSituation4"
+ prop="taskSituation4"
+ >
+ </el-table-column
+ ><el-table-column
+ label="闅忚鐢佃瘽涓嶆纭�"
+ align="center"
+ width="100"
+ key="taskSituation5"
+ prop="taskSituation5"
+ >
+ </el-table-column
+ ><el-table-column
+ label="鍏朵粬鎯呭喌涓嶅疁闅忚"
+ align="center"
+ width="100"
+ key="taskSituation6"
+ prop="taskSituation6"
+ >
+ </el-table-column>
</el-table-column>
- </el-table-column>
- <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
- <el-table-column
- label="搴旈殢璁�"
- align="center"
- key="needFollowUpAgain"
- prop="needFollowUpAgain"
- >
- </el-table-column>
- <el-table-column
- label="寰呴殢璁�"
- align="center"
- key="pendingFollowUpAgain"
- prop="pendingFollowUpAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鎴愬姛"
- align="center"
- key="followUpSuccessAgain"
- prop="followUpSuccessAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚澶辫触"
- align="center"
- key="followUpFailAgain"
- prop="followUpFailAgain"
- >
- </el-table-column>
- <el-table-column
- label="闅忚鐜�"
- align="center"
- width="120"
- key="followUpRateAgain"
- prop="followUpRateAgain"
- >
- <!-- <template slot-scope="scope">
- <span
- >{{
- (Number(scope.row.FollowUpRateAgain) * 100).toFixed(2)
- }}%</span
- >
- </template> -->
- </el-table-column>
- <el-table-column
- label="浜哄伐"
- align="center"
- key="manualAgain"
- prop="manualAgain"
- >
- </el-table-column>
- <el-table-column
- label="鐭俊"
- align="center"
- key="smsAgain"
- prop="smsAgain"
- >
- </el-table-column>
- <el-table-column
- label="寰俊"
- align="center"
- key="weChatAgain"
- prop="weChatAgain"
- >
- </el-table-column>
- </el-table-column>
- </el-table>
+ </el-table>
+ </div>
<!-- <pagination
v-show="total > 0"
@@ -838,6 +899,7 @@
return {
topactiveName: "Local", //椤堕儴閫夋嫨
activeName: "first", //渚ц竟閫夋嫨
+ orgname: "",
expands: [],
// 閬僵灞�
loading: false,
@@ -917,51 +979,7 @@
sidecolumnval: "", //绫诲埆鎼滅储
propss: { multiple: true },
SeedetailsVisible: false,
- options: [
- {
- value: 1,
- label: "鐩戞祴璇勪及",
- },
- {
- value: 2,
- label: "鍑洪櫌闅忚",
- },
- {
- value: 3,
- label: "闂ㄨ瘖闅忚",
- },
- {
- value: 4,
- label: "瀹f暀鍏虫��",
- },
- {
- value: 5,
- label: "澶嶈瘖绠$悊",
- },
-
- {
- value: 7,
- label: "鎮h�呮姤鍛�",
- },
-
- {
- value: 9,
- label: "浣撴闅忚",
- },
-
- {
- value: 11,
- label: "褰卞儚闅忚",
- },
- {
- value: 12,
- label: "蹇冪數闅忚",
- },
- {
- value: 13,
- label: "涓撶梾闅忚",
- },
- ],
+ options: store.getters.tasktypes,
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 3600 * 1000 * 24;
@@ -1000,6 +1018,7 @@
created() {
this.getDeptTree();
this.getList();
+ this.orgname = localStorage.getItem("orgname");
},
methods: {
@@ -1060,6 +1079,162 @@
} else {
this.expands = [this.getRowKey(row)];
}
+ },
+ getSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "鍚堣";
+ return;
+ }
+ if (index === 1||index === 2) {
+ sums[index] = "/";
+ return;
+ }
+
+ // 瀵圭櫨鍒嗘瘮瀛楁鐗规畩澶勭悊 - 鍙栧钩鍧囧��
+ if (
+ column.property === "followUpRate" ||
+ column.property === "rate" ||
+ column.property === "followUpRateAgain"
+ ) {
+ // 鎻愬彇鎵�鏈夋湁鏁堢櫨鍒嗘瘮鍊煎苟杞崲涓哄皬鏁�
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+
+ // 澶勭悊甯︾櫨鍒嗗彿鐨勬暟鎹�
+ if (typeof value === "string" && value.includes("%")) {
+ // 鍘婚櫎鐧惧垎鍙峰苟杞崲涓哄皬鏁�
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ // 澶勭悊宸茬粡鏄皬鏁扮殑鏁版嵁
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0); // 杩囨护鎺塶ull鍜�0鍊�
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ // 鏅�氭暟瀛楀瓧娈� - 姹傚拰
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+
+ // 鍐呴儴琛ㄦ牸鍚堣琛岃绠楁柟娉�
+ getInnerSummaries(param) {
+ const { columns, data } = param;
+ const sums = [];
+
+ columns.forEach((column, index) => {
+ if (index === 0) {
+ sums[index] = "灏忚";
+ return;
+ }
+
+ if (column.property === "drname" || column.property === "deptname") {
+ sums[index] = "-";
+ return;
+ }
+
+ // 瀵圭櫨鍒嗘瘮瀛楁鐗规畩澶勭悊 - 鍙栧钩鍧囧��
+ if (column.property === "followUpRate" || column.property === "rate") {
+ // 鎻愬彇鎵�鏈夋湁鏁堢櫨鍒嗘瘮鍊煎苟杞崲涓哄皬鏁�
+ const percentageValues = data
+ .map((item) => {
+ const value = item[column.property];
+ if (!value || value === "-" || value === "0%") return null;
+
+ // 澶勭悊甯︾櫨鍒嗗彿鐨勬暟鎹�
+ if (typeof value === "string" && value.includes("%")) {
+ // 鍘婚櫎鐧惧垎鍙峰苟杞崲涓哄皬鏁�
+ const numValue = parseFloat(value.replace("%", "")) / 100;
+ return isNaN(numValue) ? null : numValue;
+ } else {
+ // 澶勭悊宸茬粡鏄皬鏁扮殑鏁版嵁
+ const numValue = parseFloat(value);
+ return isNaN(numValue) ? null : numValue;
+ }
+ })
+ .filter((value) => value !== null && value !== 0);
+
+ if (percentageValues.length > 0) {
+ const average =
+ percentageValues.reduce((sum, value) => sum + value, 0) /
+ percentageValues.length;
+ sums[index] = (average * 100).toFixed(2) + "%";
+ } else {
+ sums[index] = "0.00%";
+ }
+ } else {
+ // 鏅�氭暟瀛楀瓧娈� - 姹傚拰
+ const values = data.map((item) => {
+ const value = item[column.property];
+ if (value === "-" || value === "" || value === null) return 0;
+ return Number(value) || 0;
+ });
+
+ if (!values.every((value) => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => prev + curr, 0);
+ sums[index] = this.formatNumber(sums[index]);
+ } else {
+ sums[index] = "-";
+ }
+ }
+ });
+
+ return sums;
+ },
+
+ // 杈呭姪鏂规硶锛氭彁鍙栫櫨鍒嗘瘮鏁板��
+ extractPercentageValue(value) {
+ if (!value) return null;
+
+ if (typeof value === "string") {
+ // 澶勭悊甯︾櫨鍒嗗彿鐨勫瓧绗︿覆
+ if (value.includes("%")) {
+ const num = parseFloat(value.replace("%", ""));
+ return isNaN(num) ? null : num / 100;
+ }
+ // 澶勭悊绾暟瀛楀瓧绗︿覆
+ const num = parseFloat(value);
+ return isNaN(num) ? null : num;
+ }
+
+ // 澶勭悊鏁板瓧绫诲瀷
+ return typeof value === "number" ? value : null;
+ },
+
+ // 鏁板瓧鏍煎紡鍖栨柟娉�
+ formatNumber(num) {
+ if (isNaN(num)) return "-";
+ return Number.isInteger(num) ? num.toString() : num.toFixed(0);
},
/** 淇敼鏍囩 */
handleUpdate(row) {
@@ -1287,10 +1462,23 @@
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
+ 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,
+ };
+ delete params.leavehospitaldistrictcodes.all;
+ delete params.deptcodes.all;
this.download(
"smartor/serviceSubtask/getSfStatisticsExport",
{
- ...this.queryParams,
+ ...params,
},
`user_${new Date().getTime()}.xlsx`
);
@@ -1321,298 +1509,302 @@
},
// 鍒濆鍖栭ゼ鍥�
-initPieChart() {
- const echarts = require("echarts");
- const pieDom = document.getElementById("pieChart");
- if (!pieDom) return;
+ 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
+ if (this.pieChart) {
+ this.pieChart.dispose();
}
- },
- 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"
+
+ 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,
},
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
},
- data: [
- {
- value: followUpData.pending,
- name: "寰呴殢璁�"
+ tooltip: {
+ trigger: "item",
+ formatter: "{a} <br/>{b}: {c} ({d}%)",
+ },
+ legend: {
+ orient: "vertical",
+ left: "left",
+ data: ["寰呴殢璁�", "闅忚鎴愬姛", "闅忚澶辫触"],
+ textStyle: {
+ color: "#666",
},
+ },
+ color: ["#FF9D4D", "#36B37E", "#FF5C5C"], // 鏂扮殑閰嶈壊鏂规
+ series: [
{
- 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'
+ name: "闅忚鐘舵��",
+ type: "pie",
+ radius: ["40%", "70%"],
+ avoidLabelOverlap: true,
+ itemStyle: {
+ borderRadius: 10,
+ borderColor: "#fff",
+ borderWidth: 2,
},
- // 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: {
+ show: true,
+ formatter: "{b}: {c} ({d}%)",
+ color: "#333",
},
- // label: {
- // position: 'end',
- // formatter: '鐩爣90%'
- // }
- }]
- }
- }
- ],
- grid: {
- top: '15%',
- left: '3%',
- right: '4%',
- bottom: '15%',
- containLabel: true
- }
- };
+ 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.barLineChart.setOption(option);
- window.addEventListener("resize", this.resizeBarLineChart);
-},
+ 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() {
@@ -1723,6 +1915,41 @@
text-align: left;
font-size: 20px;
}
+// 缇庡寲鍚堣琛屾牱寮�
+::v-deep .el-table__footer {
+ .el-table__cell {
+ background-color: #f5f7fa;
+ font-weight: 600;
+ color: #409eff;
+
+ .cell {
+ font-weight: 600;
+ color: #409eff;
+ }
+ }
+}
+
+// 鍐呴儴琛ㄦ牸鍚堣琛屾牱寮�
+::v-deep .inner-table .el-table__footer {
+ .el-table__cell {
+ background-color: #ecf5ff;
+ font-weight: 500;
+ color: #67c23a;
+
+ .cell {
+ font-weight: 500;
+ color: #67c23a;
+ }
+ }
+}
+
+// 鐧惧垎姣斿瓧娈电壒娈婃牱寮�
+.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRate"] .cell,
+.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="rate"] .cell,
+.your-table-container ::v-deep .el-table__footer .el-table__cell[data-field="followUpRateAgain"] .cell {
+ color: #e6a23c !important;
+ font-weight: 700 !important;
+}
.leftvlue {
// display: flex;
diff --git a/src/views/sfstatistics/percentage/satisfaction.vue b/src/views/sfstatistics/percentage/satisfaction.vue
new file mode 100644
index 0000000..75de5a7
--- /dev/null
+++ b/src/views/sfstatistics/percentage/satisfaction.vue
@@ -0,0 +1,1533 @@
+<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-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="joyAllCount"
+ prop="joyAllCount"
+ >
+ </el-table-column>
+ <el-table-column
+ label="婊℃剰搴﹀~鎶ラ噺"
+ align="center"
+ key="joyCount"
+ prop="joyCount"
+ >
+ </el-table-column>
+ <el-table-column
+ label="瀹屾垚姣旂巼"
+ align="center"
+ key="joyTotal"
+ prop="joyTotal"
+ >
+ <template slot-scope="scope">
+ <span class="button-zx"
+ >{{
+ (Number(scope.row.joyTotal) * 100).toFixed(2)
+ }}%</span
+ >
+ </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="getinfo(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>
+ <!-- 鍗曠瀹ょ粺璁¤鎯� -->
+ <el-dialog :visible.sync="topicVisible" width="45%">
+ <div class="topicdia">
+ <div class="top-text">{{ topicvalue.name }}</div>
+ <div class="top-mintext">闅忚瀹屾垚鏁皗{ topicvalue.number }}</div>
+ <div style="overflow-x: hidden; overflow-y: auto; max-height: 65vh">
+ <div class="ttaabbcc" v-for="item in topiclist" :key="item.name">
+ <div class="describe">
+ 绗瑊{ item.number }}棰橈細 {{ item.name }}?<span
+ >[{{ item.type == 1 ? "鍗曢�夐" : "澶氶�夐" }}]</span
+ >
+ </div>
+ <div>
+ <el-table :data="tableData" style="width: 100%">
+ <el-table-column prop="date" label="闂閫夐」">
+ </el-table-column>
+ <el-table-column prop="name" label="閫夋嫨浜烘暟">
+ </el-table-column>
+ <el-table-column prop="address" label="姣斾緥"> </el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="topicVisible = false">鍏� 闂�</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import {
+ toamendtag,
+ addapitag,
+ deletetag,
+ changetagcategory,
+} from "@/api/system/label";
+import store from "@/store";
+import {
+ getSfStatisticsJoydetails,
+ getSfStatisticsJoy,
+ 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,
+ },
+ topiclist: [
+ {
+ name: "鎮ㄧ殑韬綋搴峰鎯呭喌濡備綍",
+ number: 1,
+ type: 1,
+ },
+ {
+ name: "鎮ㄧ殑楗鎯呭喌濡備綍",
+ number: 2,
+ type: 2,
+ },
+ {
+ name: "鎮ㄧ殑鎭㈠鎯呭喌濡備綍",
+ number: 3,
+ type: 1,
+ },
+ ],
+ tableData: [
+ {
+ date: "濂�",
+ name: 12,
+ address: "50%",
+ },
+ {
+ date: "涓�鑸�",
+ name: 2,
+ address: "6.2%",
+ },
+ {
+ date: "宸�",
+ name: 0,
+ address: "0%",
+ },
+ ],
+ 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, //浜岀淮鐮佸脊妗�
+ topicVisible: false, //鎺у埗鍗曢寮规
+ topicvalue: {
+ name: "楠ㄧ闅忚妯℃澘",
+ number: 222,
+ },
+ 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;
+ getSfStatisticsJoy(params).then((response) => {
+ console.log(response);
+ // this.total = response.total;
+ this.userList = response.data;
+ });
+ },
+ getRowKey(row) {
+ return row.statisticaltype === 1
+ ? row.leavehospitaldistrictcode
+ : row.deptcode;
+ },
+ /** 淇敼鏍囩 */
+ 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);
+ },
+ // 璋冭捣璇︽儏
+ getinfo(row) {
+ this.topicVisible = true;
+
+ },
+ // 娣诲姞/淇敼鏍囩
+ 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/src/views/shortmessage/healthinformation/compilequer/index.vue b/src/views/shortmessage/healthinformation/compilequer/index.vue
index 8a6e6ef..44c8ad5 100644
--- a/src/views/shortmessage/healthinformation/compilequer/index.vue
+++ b/src/views/shortmessage/healthinformation/compilequer/index.vue
@@ -60,16 +60,35 @@
</div>
</el-form-item>
<el-form-item label="閫氱煡鍐呭" prop="preachcontent">
- <div style="width: 80%">
- <el-input
- type="textarea"
- :rows="5"
- v-model="ruleForm.preachcontent"
- placeholder="璇疯緭鍏ラ�氱煡鍐呭"
- ></el-input>
- </div>
+ <el-input
+ type="textarea"
+ :rows="5"
+ show-word-limit
+ id="preachcontent"
+ v-model.sync="ruleForm.preachcontent"
+ placeholder="璇疯緭鍏ラ�氱煡鍐呭"
+ @focus="handleInput('preachcontent')"
+ ></el-input>
</el-form-item>
- <el-form-item label="閫氱煡鍙橀噺" prop="name">
+ <el-row>
+ <el-col :span="24">
+ <el-form-item label="閫氱煡鍙橀噺" prop="scriptContent">
+ <div style="display: flex; margin-bottom: 10px">
+ <div
+ v-for="item in variablelist"
+ :class="item.default ? 'tsgname' : 'tsgnames'"
+ @click="tsgnameto(item)"
+ >
+ {{ item.variatename }}
+ </div>
+ <div class="tsgnamebj" @click="variabledeawer = true">
+ 鍙橀噺缂栬緫
+ </div>
+ </div>
+ </el-form-item>
+ </el-col></el-row
+ >
+ <!-- <el-form-item label="閫氱煡鍙橀噺" prop="name">
<div style="margin-bottom: 5px" v-for="item in variablelist">
<el-row>
<el-col :span="5">
@@ -101,7 +120,7 @@
</el-col>
</el-row>
</div>
- </el-form-item>
+ </el-form-item> -->
<el-form-item label="鏍囩" prop="desc">
<div class="xinz-inf">
@@ -203,9 +222,50 @@
>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
</el-form-item>
+ <el-drawer
+ title="鍙橀噺缂栬緫"
+ :visible.sync="variabledeawer"
+ direction="ttb"
+ size="35%"
+ >
+ <el-form-item label="閫氱煡鍙橀噺" prop="name">
+ <div style="margin-bottom: 5px" v-for="item in variablelist">
+ <el-row>
+ <el-col :span="5">
+ <el-input
+ v-model="item.variatename"
+ placeholder="璇疯緭鍏ュ彉閲忓悕"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-input
+ v-model="item.variate"
+ placeholder="璇疯緭鍏ュ彉閲忓唴瀹�"
+ ></el-input>
+ </el-col>
+ <el-col :span="8" :offset="1">
+ <el-button
+ type="success"
+ icon="el-icon-plus"
+ circle
+ @click="addvariable(item)"
+ ></el-button>
+ <el-button
+ v-if="!item.default"
+ type="danger"
+ icon="el-icon-delete"
+ circle
+ @click="delvariable(item)"
+ ></el-button>
+ </el-col>
+ </el-row>
+ </div>
+ </el-form-item>
+ </el-drawer>
</el-form>
</div>
</div>
+
<!-- 娣诲姞閫傜敤鐤剧梾绐楀彛 -->
<Optional-Form
ref="child"
@@ -251,6 +311,7 @@
dynamicTags: [],
inputVisible: false,
illnessVisible: false,
+ variabledeawer: false,
dialogVisiblepatient: false,
inputValue: "",
sidecolumnrabs: "left",
@@ -270,6 +331,7 @@
tempDetpRelevances: [],
version: "1.0.1",
},
+ currentInputId: "",
rules: {},
rulesa: {},
mode: [],
@@ -379,6 +441,36 @@
}
});
}
+ },
+ // 渚挎嵎鏍囩
+ tsgnameto(row) {
+ let inputValueArr = "";
+ let el = document.querySelector("#" + this.currentInputId);
+ //el.selectionStart; 杩欏氨鏄綋鍓嶅厜鏍囨墍鍦ㄧ殑浣嶇疆锛堝瓧绗︿覆涓瓧绗︾殑index锛�
+ if (this.currentInputId == "preachcontent") {
+ inputValueArr = this.ruleForm.preachcontent.split("");
+ } else {
+ return;
+ }
+ //灏嗚緭鍏ユ鍐呭鍒囨垚鏁扮粍锛屾柟渚垮悗缁搷浣�
+ // inputValueArr = this.inputValue.split("");
+ // 鎷垮埌閫変腑鏂囧瓧鐨勯暱搴︼紙鍚庣画鍙互鐢ㄦ潵鏇挎崲閫変腑鐨勬枃瀛楋級
+ let selectLength = el.selectionEnd - el.selectionStart;
+ // 灏嗚鎻掑叆/鏇挎崲鐨勬枃瀛楁彃鍏�/鏇挎崲锛坴alue.name鏄鎻掑叆/鏇挎崲鐨勫瓧绗︿覆锛�
+ inputValueArr.splice(el.selectionStart, selectLength, `${row.variate}`);
+ // 鎶婃暟缁勯噸鏂拌浆鎹负瀛楃涓插苟璧嬪��
+ inputValueArr = inputValueArr.join("");
+ console.log(inputValueArr);
+ if (this.currentInputId == "preachcontent") {
+ this.ruleForm.preachcontent = inputValueArr;
+ } else {
+ return;
+ }
+ },
+ handleInput(id) {
+ this.currentInputId = id;
+ console.log("杈撳叆妗嗙殑鍊煎凡鏇存柊:", this.currentInputId);
+ // 鍦ㄨ繖閲屾墽琛屾洿鏂版暟鎹殑閫昏緫
},
// 淇濆瓨鐤剧梾
confirmillness(guid) {
@@ -595,6 +687,51 @@
vertical-align: bottom;
}
}
+.tsgnames {
+ width: 90px;
+ margin-right: 10px;
+ text-align: center;
+ cursor: pointer;
+ height: 40px;
+ line-height: 40px;
+ background: #7799fa;
+ color: #ffff;
+ font-size: 18px;
+ border-radius: 5px;
+}
+.tsgnames:hover {
+ background: #3366f5;
+}
+.tsgname {
+ width: 90px;
+ margin-right: 10px;
+ text-align: center;
+ cursor: pointer;
+ height: 40px;
+ line-height: 40px;
+ background: #66c18c;
+ color: #ffff;
+ font-size: 18px;
+ border-radius: 5px;
+}
+.tsgname:hover {
+ background: #20894d;
+}
+.tsgnamebj {
+ width: 90px;
+ margin-left: 15px;
+ text-align: center;
+ cursor: pointer;
+ height: 40px;
+ line-height: 40px;
+ background: #49dbb7;
+ color: #ffff;
+ font-size: 18px;
+ border-radius: 5px;
+}
+.tsgnamebj:hover {
+ background: #27c449;
+}
::v-deep .el-step.is-vertical .el-step__title {
font-size: 25px;
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 4a0cfcc..71bb1b1 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -846,7 +846,6 @@
}
console.log(this.form.wardCodes, "wardCodes");
console.log(this.form.deptCodes, "deptCodes");
-
this.postOptions = response.posts;
this.roleOptions = response.roles;
this.$set(this.form, "postIds", response.postIds);
@@ -927,7 +926,7 @@
adduserdept() {
if (this.form.wardCodes[0]) {
this.form.wardCodes.forEach((dept) => {
- const containsId8 = null;
+ let containsId8 = null;
if (this.belongWards) {
containsId8 = this.belongWards.some(
(item) => item.deptCode == dept
@@ -948,7 +947,7 @@
}
if (this.form.deptCodes[0]) {
this.form.deptCodes.forEach((dept) => {
- const containsId8 = null;
+ let containsId8 = null;
if (this.belongDepts) {
containsId8 = this.belongDepts.some(
(item) => item.deptCode == dept
diff --git a/vue.config.js b/vue.config.js
index ab7fc01..469cedd 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -36,17 +36,20 @@
// 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.10:8095`,
- // target: `http://192.168.100.158:8095`,
+ // target: `http://192.168.100.127:8095`,
+ // target: `http://192.168.100.10:8094`,//鐪佺珛鍚屽痉
+ target: `http://192.168.100.10:8095`,//鏂板崕
// target:`http://localhost:8095`,
- // target: `http://192.168.101.135:8095`,
+ // target:`http://35z1t16164.qicp.vip`,
+ // target: `http://192.168.100.193:8095`,
// target: `http://192.168.101.166:8093`,
target: `http://192.168.191.181:8095`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
- }
+ },
+
},
disableHostCheck: true
},
--
Gitblit v1.9.3