| | |
| | | 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 |
| | | }); |
| | | } |
| | |
| | | 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"; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // å é¤å¤é¨æ£è
表 |
| | | export function CallgetList() { |
| | | return request({ |
| | | url: "/smartor/ServiceTelInfo/getList", |
| | | method: "get", |
| | | params: { |
| | | orgid: localStorage.getItem("orgid"), |
| | | }, |
| | | }); |
| | | } |
| | | // æ¥è¯¢å¤é¨æ£è
表 |
| | | export function CallsetState(data) { |
| | | return request({ |
| | | url: "/smartor/ServiceTelInfo/setState", |
| | | method: "get", |
| | | params: data, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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", |
| | | }); |
| | | } |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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' |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢æå¡ç»å
³èçæ£è
å表 |
| | | 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' |
| | | }) |
| | | } |
| | | |
| | | // å
³èæ£è
å°æå¡ç» |
| | | export function addPatientToGroup(data) { |
| | | return request({ |
| | | url: '/system/serviceGroup/patients', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 仿å¡ç»ç§»é¤æ£è
|
| | | export function removePatientFromGroup(groupId, patientId) { |
| | | return request({ |
| | | url: '/system/serviceGroup/' + groupId + '/patients/' + patientId, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | 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({ |
| | |
| | | }); |
| | | } |
| | | |
| | | // ä»»å¡é访çç»è®¡è¡¨çä¸é»æç» |
| | | // 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 = { |
| | |
| | | **/ |
| | | |
| | | /* theme color */ |
| | | $--color-primary: #3ba2f7; |
| | | $--color-success: #13ce66; |
| | | $--color-primary: #3664D9; |
| | | $--color-success: #0ABC54; |
| | | $--color-warning: #ffba00; |
| | | $--color-danger: #ff4949; |
| | | // $--color-info: #1E1E1E; |
| | |
| | | -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; |
| | |
| | | & .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; |
| | | } |
| | |
| | | $base-logo-light-title-color: #001529; |
| | | |
| | | $base-sub-menu-background:#99baed; |
| | | $base-sub-menu-hover:#001528; |
| | | $base-sub-menu-hover:#5c7acd; |
| | | |
| | | // èªå®ä¹æè²èå飿 ¼ |
| | | /** |
| | |
| | | |
| | | <script> |
| | | import sipService from "@/utils/sipService"; |
| | | import { CallsetState, CallgetList } from "@/api/AiCentre/index"; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | }, |
| | | }, |
| | | 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", |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | }; |
| | | 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}`; |
| | | }, |
| | |
| | | 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(); // éæ¾åæºå· |
| | | } |
| | | }; |
| | | |
| | | // çå¬éè¯ç¶æåå |
| | |
| | | } |
| | | |
| | | 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; |
| | | // æ£ç¡®è®¾ç½® 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 { |
| | | // 妿æ£å¨éè¯ä¸ï¼å
ææ |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | title="æ´¾åæ£è
éæ©" |
| | | :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="æ£è
ï¼"> |
| | | <el-input |
| | | v-model="patientqueryParams.name" |
| | | @keyup.enter.native="handleQuery" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ£è
ç±»å"> |
| | | <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="æ£è
è¯æï¼"> |
| | | <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> |
| | | <!-- éæ©æ£è
å表 --> |
| | | <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: "é¢å¤æ£è
", |
| | | }, |
| | | { |
| | | value: "5", |
| | | label: "ææ¯ç
人", |
| | | }, |
| | | ], |
| | | overallCase:[], |
| | | tableLabel: [ |
| | | { label: "åºé¢æ¥æ", width: "150", prop: "inhosptime" }, |
| | | { label: "æ£è
", width: "", prop: "name" }, |
| | | { label: "æ£è
è¯æ", width: "", prop: "leavediagname" }, |
| | | { label: "身份è¯", width: "200", prop: "idcardno" }, |
| | | { label: "æ§å«", width: "", prop: "sex" }, |
| | | { label: "å¹´é¾", width: "", prop: "age" }, |
| | | { label: "责任æ¤å£«", 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宣æ |
| | | 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() { |
| | | // è·åå¤é¨æ£è
|
| | | 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: "æ£è
", width: "", prop: "name" }, |
| | | { label: "æ£è
è¯æ", width: "", prop: "leavediagname" }, |
| | | { label: "身份è¯", width: "200", prop: "idcardno" }, |
| | | { label: "æ§å«", width: "", prop: "sex" }, |
| | | { label: "å¹´é¾", width: "", prop: "age" }, |
| | | { label: "åºé¢å¤©æ°", width: "", prop: "endDay" }, |
| | | { label: "责任æ¤å£«", 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: "æ£è
", width: "", prop: "name" }, |
| | | { label: "æ£è
è¯æ", width: "", prop: "leavediagname" }, |
| | | { label: "身份è¯", width: "200", prop: "idcardno" }, |
| | | { label: "æ§å«", width: "", prop: "sex" }, |
| | | { label: "å¹´é¾", width: "", prop: "age" }, |
| | | { label: "åºé¢å¤©æ°", width: "", prop: "endDay" }, |
| | | { label: "责任æ¤å£«", width: "", prop: "nurseName" }, |
| | | { label: "å»ç", width: "", prop: "drname" }, |
| | | { label: "ç§å®¤", width: "180", prop: "dept" }, |
| | | { label: "ç
åº", width: "150", prop: "leavehospitaldistrictname" }, |
| | | ]; |
| | | } |
| | | console.log(this.patientqueryParams.allhosp); |
| | | |
| | | // è·åæ£è
æ°æ® |
| | | 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; |
| | | }); |
| | | }, |
| | | // è·åå¤é¨æ£è
导å
¥å表 |
| | | Externallist() { |
| | | this.tableLabel = [ |
| | | { label: "æ£è
", 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, "触åéæ©åmultipleSelection"); |
| | | }, |
| | | // 忢页忢å¤éä¸ |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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ï¼å¦åè¿åfalse |
| | | 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> |
| | |
| | | margin-right: 15px; |
| | | } |
| | | &.active { |
| | | background-color: #42b983; |
| | | background-color: #3664D9; |
| | | color: #fff; |
| | | border-color: #42b983; |
| | | border-color: #3664D9; |
| | | &::before { |
| | | content: ''; |
| | | background: #fff; |
| | |
| | | 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; |
| | |
| | | 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(); |
| | | }); |
| | |
| | | component: () => import('@/views/login'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/loginSSO', |
| | | component: () => import('@/views/loginSSO'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/sf', |
| | | component: () => import('@/views/outsideChainnew'), |
| | |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/satisfaction', |
| | | component: () => import('@/views/satisfaction'), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/outsideChain', |
| | | component: () => import('@/views/outsideChain'), |
| | | hidden: true |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | </template> |
| | |
| | | </template> |
| | | <script> |
| | | |
| | | </script> |
| | | </script> |
| | |
| | | }, |
| | | }, |
| | | ], |
| | | // é访类å |
| | | tasktypes: (state) => [ |
| | | // { |
| | | // value: 16, |
| | | // label: "课é¢é访", |
| | | // raw: { |
| | | // cssClass: "", |
| | | // listClass: "", |
| | | // }, |
| | | // }, |
| | | |
| | | { |
| | | value: 2, |
| | | label: "åºé¢é访", |
| | | raw: { |
| | | cssClass: "", |
| | | listClass: "", |
| | | }, |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "é¨è¯é访", |
| | | raw: { |
| | | cssClass: "", |
| | | listClass: "", |
| | | }, |
| | | }, |
| | | { |
| | | value: 4, |
| | | label: "宣æå
³æ", |
| | | 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: "æ£è
æ¥å", |
| | | 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; |
| | |
| | | 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: "æ£è
æ¥å", |
| | | route: "followvisit/QuestionnaireTask", |
| | | raw: { |
| | | cssClass: "", |
| | | listClass: "", |
| | | Serviceauthority: [ |
| | | { |
| | | value: "1", |
| | | label: "æ£è
æ¥å", |
| | | 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: "宣æå
³æ", |
| | | route: "followvisit/Missioncreation", |
| | | raw: { |
| | | cssClass: "", |
| | | listClass: "", |
| | | { |
| | | value: "4", |
| | | label: "宣æå
³æ", |
| | | 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"); // è¯·æ¿æ¢ä¸ºå®é
çZuHuID |
| | | localStorage.setItem("deptCode", "1017"); // è¯·æ¿æ¢ä¸ºå®é
çç§å®¤ä»£ç |
| | | } else if (orgid == "H41082200269") { |
| | | localStorage.setItem("orgname", "åç±å¿äººæ°å»é¢"); |
| | | localStorage.setItem("ZuHuID", "1400360867068907520"); // è¯·æ¿æ¢ä¸ºå®é
çZuHuID |
| | | localStorage.setItem("deptCode", "01040201"); // è¯·æ¿æ¢ä¸ºå®é
çç§å®¤ä»£ç |
| | | } else if (orgid == "H41078202417") { |
| | | localStorage.setItem("orgname", "è¾å¿å¸ä¸å»é¢"); |
| | | localStorage.setItem("ZuHuID", "1429338802177000002"); // è¯·æ¿æ¢ä¸ºå®é
çZuHuID |
| | | 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) { // éªè¯è¿åçrolesæ¯å¦æ¯ä¸ä¸ªé空æ°ç» |
| | | 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) { |
| | | // éªè¯è¿åçrolesæ¯å¦æ¯ä¸ä¸ªé空æ°ç» |
| | | 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; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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'; |
| | | // è®¾å®æ¢å¤æ¶é´ï¼binding.value æ¯æä»¤ä¼ å
¥çå¼ï¼å¦ï¼v-prevent-reclick="2000"ï¼ |
| | | setTimeout(() => { |
| | | el.disabled = false; |
| | | el.style.pointerEvents = 'all'; |
| | | el.style.opacity = '1'; |
| | | }, binding.value || 1500); // é»è®¤1.5ç§ |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | |
| | | } |
| | | ) |
| | | .then(() => { |
| | | |
| | | this.$router.replace("/login"); |
| | | }) |
| | | .catch(() => { |
| | | isRelogin.show = false; |
| | |
| | | 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; // æ°å¢æ³¨åæåæ¶é´æ³ |
| | | } |
| | | |
| | | // åå§åSIP客æ·ç«¯ |
| | | 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; |
| | | |
| | | // æ ååSDP |
| | | 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("æ åååçSDP:", 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 = "åªä½åå失败ï¼è¯·æ£æ¥ç¼è§£ç å¨é
ç½®"; |
| | | 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"); |
| | |
| | | } |
| | | }); |
| | | } |
| | | // ææå½åéè¯ |
| | | |
| | | 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(); |
| | |
| | | this.onStatusChange = null; |
| | | this.onCallStatusChange = null; |
| | | this.onIncomingCall = null; |
| | | this.isRegistered = false; // æ°å¢æ³¨åç¶ææ å¿ |
| | | this.registrationTime = null; // æ°å¢æ³¨åæåæ¶é´æ³ |
| | | } |
| | | |
| | | init(config) { |
| | |
| | | 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", "è¿æ¥æå¼") |
| | | ); |
| | |
| | | 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) { |
| | |
| | | errorMessage = "ä¼è¯åæ°ä¸æ»¡è¶³æå¡å¨è¦æ±"; |
| | | break; |
| | | default: |
| | | errorMessage = `å¼å«å¤±è´¥: ${e.cause || e.message}`; |
| | | errorMessage = `å¼å«å¤±è´¥3: ${e.cause || e.message}`; |
| | | } |
| | | |
| | | this.updateCallStatus("failed55", errorMessage); |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="medium" |
| | | :disabled="single" |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="æ£è
å§å" 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="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="责任æ¤å£«" |
| | | 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>æ£è
è¿æ»¤</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 ? 'ä¿®æ¹æ£è
ä¿¡æ¯' : 'æ°å¢æ£è
'" |
| | | :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="æ£è
忬¡é访" :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="æ£è
åç§°"> |
| | | <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: "æ£è
è¿æ»¤", |
| | | // 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: "é¨è¯æ¶é´(æ£åº)", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "é¨è¯æ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "åéæ¶é´(æ£åº)", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "åéæ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | topqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | sendstate: 2, |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 é¨è¯æ¶é´(æ£åº) 1 é¨è¯æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | 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: "æ£å¸¸", |
| | | }, |
| | | ], |
| | | 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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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); |
| | | }, |
| | | // æ£è
èå´å¤ç |
| | | 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 é¨è¯æ¶é´(æ£åº) 1 é¨è¯æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 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, |
| | | }, |
| | | }); |
| | | }, |
| | | //æ£è
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("æ£è
è¿æ»¤æå"); |
| | | }); |
| | | |
| | | 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 + |
| | | 'æ£è
å称为"' + |
| | | 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(() => {}); |
| | | }, |
| | | // æ£è
è¿æ»¤è§¦å |
| | | 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> |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | >æ°å¢</el-button |
| | |
| | | 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", |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | |
| | |
| | | }, |
| | | //æ£è
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'); |
| | |
| | | }, |
| | | // 跳转详æ
页 |
| | | 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: { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | >æ°å¢</el-button |
| | |
| | | <div class="documentf"> |
| | | <div class="document"> |
| | | <el-button type="success" size="medium" @click="onthatday()" |
| | | >彿¥æå¡</el-button |
| | | >仿¥æå¡</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | key="drname" |
| | | prop="drname" |
| | | /> |
| | | <el-table-column |
| | | label="é访人å" |
| | | align="center" |
| | | key="updateBy" |
| | | prop="updateBy" |
| | | width="120" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="åºé¢å¤©æ°" |
| | | 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="åºé¢é访模æ¿åç§°" |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | { |
| | |
| | | value: 3, |
| | | label: "åéæ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | topqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | sendstate: 2, |
| | | sort: 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | serviceType: 2, |
| | | searchscope: 3, |
| | | visitCount: 2, |
| | |
| | | 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", |
| | |
| | | }); |
| | | }, |
| | | affiliation() { |
| | | |
| | | this.topqueryParams.managementDoctorCode= store.getters.hisUserId; |
| | | |
| | | this.getList(1); |
| | |
| | | }, |
| | | //æ£è
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"); |
| | |
| | | .then((response) => { |
| | | console.log(response); |
| | | }) |
| | | .then(() => { |
| | | .then(() => { |
| | | this.getList(1); |
| | | this.$modal.msgSuccess("æ£è
è¿æ»¤æå"); |
| | | }); |
| | |
| | | }, |
| | | // 跳转详æ
页 |
| | | 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: { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | border-radius: 1px; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .button-textxga { |
| | | color: #de7897; |
| | | } |
| | | ::v-deep.el-radio-group { |
| | | span { |
| | | font-size: 24px; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="æ£è
å§å" 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="æ£è
èå´" 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="责任æ¤å£«" |
| | | 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>æ£è
è¿æ»¤</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="宣ææ
åµ(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 ? 'ä¿®æ¹æ£è
ä¿¡æ¯' : 'æ°å¢æ£è
'" |
| | | :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: "æ£è
è¿æ»¤", |
| | | // 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: "åºé¢æ¶é´(æ£åº)", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "åºé¢æ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | topqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | sendstate: 6, |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | 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: "æ£å¸¸", |
| | | }, |
| | | ], |
| | | 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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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); |
| | | }, |
| | | // æ£è
èå´å¤ç |
| | | 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 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 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, |
| | | }, |
| | | }); |
| | | }, |
| | | //æ£è
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("æ£è
è¿æ»¤æå"); |
| | | }); |
| | | |
| | | 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 + |
| | | 'æ£è
å称为"' + |
| | | 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(() => {}); |
| | | }, |
| | | // æ£è
è¿æ»¤è§¦å |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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">代ç</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">代æ¥</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: { |
| | | // åå§åWebSocketè¿æ¥ |
| | | 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(`åå§åWebSocketé误: ${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; |
| | | // æ£ç¡®è®¾ç½® 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(`æ¶æ¯è§£æé误: ${error.message}`); |
| | | } |
| | | }; |
| | | reader.readAsText(event.data); |
| | | }, |
| | | |
| | | // æå¼WebSocketè¿æ¥ |
| | | disconnectWebSocket() { |
| | | if (this.ws) { |
| | | this.ws.close(); |
| | | this.ws = null; |
| | | this.isConnected = false; |
| | | this.addLog("WebSocketå·²æå¼"); |
| | | } |
| | | }, |
| | | |
| | | // åéWebSocketæ¶æ¯ |
| | | 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); |
| | | }, |
| | | |
| | | // 代ç |
| | | 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); |
| | | }, |
| | | |
| | | // ä»£æ¥ |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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: { |
| | | // åå§åWebSocketè¿æ¥ |
| | | 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(`åå§åWebSocketé误: ${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 { |
| | | // æ£æ¥æ°æ®ç±»åï¼å¯è½æ¯å符串æBlob |
| | | 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}`); |
| | | } |
| | | }, |
| | | // ä¸é¨å¤çè§£æåç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è§£æé误: ${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å·²æå¼"); |
| | | } |
| | | }, |
| | | |
| | | // åéWebSocketæ¶æ¯ |
| | | 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); |
| | | }, |
| | | |
| | | // 代ç |
| | | 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); |
| | | }, |
| | | |
| | | // ä»£æ¥ |
| | | 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> |
| | |
| | | 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="æ£è
èå´" prop="status"> |
| | | <el-cascader |
| | | v-model="topqueryParams.scopetype" |
| | |
| | | </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 |
| | |
| | | > |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | |
| | | <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> |
| | |
| | | <div class="documentf"> |
| | | <div class="document"> |
| | | <el-button type="success" size="medium" @click="onthatday()" |
| | | >彿¥æå¡</el-button |
| | | >仿¥æå¡</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | prop="drname" |
| | | /> |
| | | <el-table-column |
| | | v-if="orgname != '丽水å¸ä¸å»é¢'" |
| | | label="é访人å" |
| | | align="center" |
| | | key="updateBy" |
| | |
| | | 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> |
| | | |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | { |
| | |
| | | leaveldeptcodes: [], |
| | | leavehospitaldistrictcodes: [], |
| | | }, |
| | | orgname: "", |
| | | propss: { multiple: true }, |
| | | options: [], |
| | | |
| | |
| | | value: 1, |
| | | label: "å¼å¸¸", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "è¦å", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "æ£å¸¸", |
| | |
| | | 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", |
| | |
| | | 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) => { |
| | |
| | | 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( |
| | |
| | | }); |
| | | 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; |
| | |
| | | }; |
| | | 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) { |
| | |
| | | }, |
| | | //æ£è
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"); |
| | |
| | | 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: { |
| | |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (row.excep == 1) { |
| | | return "warning-row"; |
| | | } else if (row.excep == 2) { |
| | | return "remind-row"; |
| | | } |
| | | return ""; |
| | | }, |
| | |
| | | } |
| | | ::v-deep.el-table .warning-row { |
| | | background: #eec4c4; |
| | | } |
| | | ::v-deep.el-table .remind-row { |
| | | background: #fcf5aa; |
| | | } |
| | | |
| | | .documentf { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | background: #d0fdd8; |
| | | } |
| | | ::v-deep.ysfleftvlue .el-card__body:hover { |
| | | background: #8df8a4; |
| | | background: #0abc54; |
| | | cursor: pointer; /* é¼ æ æ¬æµ®æ¶å为æå½¢ */ |
| | | } |
| | | .button-bb { |
| | |
| | | color: #ffffff; |
| | | } |
| | | .button-zx { |
| | | background: #4fabe9; |
| | | background: #324a9b; |
| | | padding: 5px; |
| | | border-radius: 1px; |
| | | color: #ffffff; |
| | |
| | | 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 { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 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); |
| | | }); |
| | | |
| | | // çå¬ç¹å®çCTIæ¶æ¯ |
| | | 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; |
| | | })); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // 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"); |
| | | }; |
| | | } |
| | | }()); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | |
| | | //---------------------------------------------------------------------------------// |
| | | |
| | | |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | >æ°å¢</el-button |
| | |
| | | <div class="documentf"> |
| | | <div class="document"> |
| | | <el-button type="success" size="medium" @click="onthatday()" |
| | | >彿¥æå¡</el-button |
| | | >仿¥æå¡</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | { |
| | |
| | | value: 3, |
| | | label: "åéæ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | topqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | sendstate: null, |
| | | sort: 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | serviceType: 3, |
| | | searchscope: 3,visitCount: 1, |
| | | scopetype: [], |
| | |
| | | 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", |
| | |
| | | }, |
| | | //æ£è
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"); |
| | |
| | | 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: { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | background: #8df8a4; |
| | | cursor: pointer; /* é¼ æ æ¬æµ®æ¶å为æå½¢ */ |
| | | } |
| | | .button-textxga { |
| | | color: #de7897; |
| | | } |
| | | .button-bb { |
| | | font-weight: 500; |
| | | background-color: #2ba05c; |
| | |
| | | <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']" |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="æ£è
å§å" 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="æ£è
èå´" 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="责任æ¤å£«" |
| | | 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>æ£è
è¿æ»¤</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="宣ææ
åµ(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 ? 'ä¿®æ¹æ£è
ä¿¡æ¯' : 'æ°å¢æ£è
'" |
| | | :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="æ£è
忬¡é访" :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="æ£è
åç§°"> |
| | | <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: "æ£è
è¿æ»¤", |
| | | // 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: "åºé¢æ¶é´(æ£åº)", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "åºé¢æ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "åéæ¶é´(æ£åº)", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "åéæ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | topqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | sendstate: 6, |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | 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: "æ£å¸¸", |
| | | }, |
| | | ], |
| | | 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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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); |
| | | }, |
| | | // æ£è
èå´å¤ç |
| | | 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 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 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, |
| | | }, |
| | | }); |
| | | }, |
| | | //æ£è
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("æ£è
è¿æ»¤æå"); |
| | | }); |
| | | |
| | | 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() {}, |
| | | |
| | | // æ£è
è¿æ»¤è§¦å |
| | | 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> |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | >æ°å¢</el-button |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | |
| | |
| | | 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: { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | >åªå±ç¤ºæ¬æ¬¡æå¡ä¿¡æ¯</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" |
| | |
| | | > |
| | | åå¾CDSSæ¥è¯¢ |
| | | </el-link> |
| | | </div> |
| | | </div> --> |
| | | <div class="merge-controls" v-if="Whetherall"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | <el-table |
| | | :data="logsheetlist" |
| | | :row-class-name="tableRowClassName" |
| | | :max-height="350" |
| | | style="width: 100%" |
| | | height="350" |
| | | @selection-change="handleSelectionChange" |
| | |
| | | /> |
| | | </el-dialog> |
| | | <div class="action-container"> |
| | | <!-- é访å
容 --> |
| | | <div class="call-action"> |
| | | <div class="call-container"> |
| | | <!-- <div class="call-header"> |
| | |
| | | }}</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" |
| | | > |
| | |
| | | @change="$forceUpdate()" |
| | | v-for="( |
| | | items, indexs |
| | | ) in item.svyLibTemplateTargetoptions" |
| | | ) in item.svyTaskTemplateTargetoptions" |
| | | :key="indexs" |
| | | :label="items.optioncontent" |
| | | > |
| | |
| | | {{ 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" |
| | |
| | | > |
| | | <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> |
| | |
| | | <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> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 人工å¤ç --> |
| | | <div class="manual-action"> |
| | | <div class="Followuserinfos"> |
| | | <div> |
| | |
| | | @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" |
| | |
| | | /> |
| | | </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 |
| | |
| | | <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> |
| | |
| | | </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" |
| | |
| | | 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> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- çä¿¡åéå¯¹è¯æ¡ --> |
| | | <el-dialog title="çä¿¡åé" :visible.sync="smsDialogVisible"> |
| | | <!-- 注æè¿é使ç¨äº smsDialogVisible 以åºåå·²æç dialogFormVisible --> |
| | | <el-form ref="smsForm" :model="form" label-width="80px"> |
| | | <el-form-item label="æ£è
åç§°"> |
| | | <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="æ£è
忬¡é访" |
| | | v-dialogDrags |
| | |
| | | <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" |
| | |
| | | align="right" |
| | | v-model="form.date1" |
| | | class="custom-disabled" |
| | | value-format="yyyy-MM-dd" |
| | | @change="checkFollowupDate" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <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> |
| | | |
| | |
| | | updatePersonVoices, |
| | | addPersonVoices, |
| | | query360PatInfo, |
| | | sendMsg, |
| | | } from "@/api/AiCentre/index"; |
| | | import { |
| | | messagelistpatient, |
| | |
| | | } 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) { |
| | | // å°è¯è·åå®é
çinputå
ç´ |
| | | const input = el.tagName === "INPUT" ? el : el.querySelector("input"); |
| | | if (!input) { |
| | | console.warn("v-numeric-only: æªæ¾å°inputå
ç´ "); |
| | | 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); |
| | | |
| | | // åå¨å¼ç¨ä»¥ä¾¿è§£ç» |
| | | 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) => { |
| | |
| | | // å·²ææ°æ®... |
| | | callStatus: "idle", // idle, calling, connected, ended, failed |
| | | isEndingCall: false, |
| | | CaldialogVisible: false, |
| | | currentCall: null, // å½åéè¯å¯¹è±¡ |
| | | // è·¯ç±çå¬ç¸å
³ |
| | | routeWatcher: null, |
| | | lastRoutePath: this.$route.path, |
| | | input: "ä»å¤©èº«ä½è¿ä¸é", |
| | | radio: "2", |
| | | taskname: "", |
| | |
| | | voice: "", |
| | | templateid: "", |
| | | again: "", |
| | | orgname: "", |
| | | zcform: {}, |
| | | form: {}, |
| | | cities: [ |
| | | { |
| | | label: "æ£å¸¸è¯é³", |
| | | value: "1", |
| | | }, |
| | | { |
| | | label: "æ£è
ææ¥ææè®¿", |
| | | 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: "æ£å¸¸", |
| | | type: "normal", |
| | | color: "#7ff5e1", |
| | | description: "æ£è
æ
嵿£å¸¸ï¼æ éç¹å«å
³æ³¨", |
| | | }, |
| | | { |
| | | value: "1", |
| | | label: "å¼å¸¸", |
| | | type: "abnormal", |
| | | color: "#f75c5c", |
| | | description: "æ£è
åå¨å¼å¸¸æ
åµï¼éè¦éç¹å
³æ³¨", |
| | | }, |
| | | { |
| | | value: "2", |
| | | label: "è¦å", |
| | | type: "warning", |
| | | color: "#fbfb4a", |
| | | description: "æ£è
æ
åµéè¦è¦å注æï¼å¯è½åå¨é£é©", |
| | | }, |
| | | ], |
| | | 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" }], |
| | |
| | | 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", |
| | |
| | | // ç¦ç¨ä»å¤©åä¹åçæ¥æ |
| | | 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: [ |
| | | { |
| | |
| | | }, |
| | | ], |
| | | userform: {}, |
| | | smsDialogVisible: false, // æ§å¶çä¿¡å¯¹è¯æ¡æ¾ç¤º |
| | | smsContent: "", // åå¨çä¿¡å
容 |
| | | Whetherall: true, //æ¯å¦å
¨é¨è®°å½å±ç¤º |
| | | dialogFormVisible: false, |
| | | Voicetype: 0, //æ¯å¦ä¸ºè¯é³æå¡ |
| | |
| | | patid: null, |
| | | }; |
| | | }, |
| | | |
| | | computed: { |
| | | callStatusText() { |
| | | const statusMap = { |
| | |
| | | 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(); |
| | | }, |
| | |
| | | }, |
| | | //æ£è
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"); |
| | |
| | | getuserinfo() { |
| | | const queryParams = { |
| | | pid: Number(this.patid), |
| | | allhosp: "0", |
| | | allhosp: "0", //1ä½é¢2é¨è¯3使£4åºé¢ |
| | | }; |
| | | // æ£è
åºç¡ä¿¡æ¯ |
| | | messagelistpatient(queryParams).then((response) => { |
| | |
| | | }, |
| | | // 忬¡é访æ¶é´éå |
| | | 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 = { |
| | |
| | | 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, |
| | |
| | | promises.push(serviceSubtaskDetailadd(obj)); |
| | | } |
| | | }); |
| | | |
| | | // ä½¿ç¨ Promise.all çå¾
ææå¼æ¥æä½å®æ |
| | | Promise.all(promises) |
| | | .then((results) => { |
| | |
| | | }); |
| | | this.Editsingletasksonyic(6); |
| | | |
| | | // this.$modal |
| | | // .confirm( |
| | | // 'ä»»å¡ä¿åæåæ¯å¦é对æ£è
ï¼"' + |
| | | // 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( |
| | | 'ä»»å¡ä¿åæåæ¯å¦é对æ£è
ï¼"' + |
| | | 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) => { |
| | | // 妿æä»»ä½ä¸ä¸ªå¼æ¥æä½å¤±è´¥ï¼ä¼è¿å
¥è¿é |
| | |
| | | this.$message.error("请è¾å
¥æ£ç¡®çææºå·ç "); |
| | | return; |
| | | } |
| | | |
| | | this.currentPhoneNumber = phone; |
| | | // å¼å«å¤æ |
| | | if (this.orgname == "æ¯å®ç²æèªæ²»å¿äººæ°å»é¢") { |
| | | this.CaldialogVisible = true; |
| | | return; |
| | | } |
| | | |
| | | this.callType = type; |
| | | this.callStatus = "calling"; |
| | | |
| | |
| | | }, 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; |
| | |
| | | item.patid = this.patid; |
| | | item.templateid = item.templateID; |
| | | }); |
| | | |
| | | let obj = { |
| | | serviceSubtaskDetailList: this.tableDatatop, |
| | | serviceSubtaskDetailList: dataToSubmit, // æäº¤å¤çåç坿¬ |
| | | param1: this.taskid, |
| | | param2: this.patid, |
| | | subId: this.id, |
| | |
| | | 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}`; |
| | | }, |
| | | // è·åæ£è
è®°å½ |
| | | getTaskservelist(id) { |
| | |
| | | getTaskservelist({ |
| | | patid: this.patid, |
| | | subId: id, |
| | | pageSize:100, |
| | | pageSize: 100, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(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) { |
| | |
| | | this.getsearchrResults(); |
| | | } |
| | | }); |
| | | }, |
| | | // è°èµ·çä¿¡åéå¯¹è¯æ¡ |
| | | sendAgainmsg() { |
| | | this.smsDialogVisible = true; |
| | | // å¯ä»¥å¨è¿éåå§å smsContentï¼ä¾å¦ this.smsContent = ''; |
| | | }, |
| | | |
| | | // åéçä¿¡çæ¹æ³ |
| | | sendSms() { |
| | | // è¿éè°ç¨ä½ ççä¿¡åé API |
| | | // å设 API 为 sendMsgï¼åæ°å¯è½éè¦æ ¹æ®å®é
æ
åµè°æ´ |
| | | sendMsg({ |
| | | phone: this.userform.telcode, // ç¡®ä¿çµè¯å·ç åæ®µæ£ç¡® |
| | | 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 = {}; |
| | |
| | | (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) { |
| | |
| | | } |
| | | 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); |
| | |
| | | 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; |
| | |
| | | (item) => item.optioncontent == a |
| | | ); |
| | | } else { |
| | | var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find( |
| | | var obj = this.tableDatatop[b].svyTaskTemplateTargetoptions.find( |
| | | (item) => item.optioncontent == a |
| | | ); |
| | | } |
| | |
| | | } |
| | | 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 䏿£å¸¸æ§è¡ |
| | | } |
| | | }, |
| | | |
| | | // å¨methodsé¨åï¼ä¿®æ¹handleOptionChangeæ¹æ³: |
| | | 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(); |
| | | } |
| | |
| | | }, |
| | | overdata() { |
| | | this.tableDatatop.forEach((item, index) => { |
| | | var obj = item.svyLibTemplateTargetoptions.find( |
| | | var obj = item.svyTaskTemplateTargetoptions.find( |
| | | (items) => items.optioncontent == item.scriptResult |
| | | ); |
| | | if (obj) { |
| | |
| | | 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> |
| | | |
| | |
| | | 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; |
| | |
| | | .CONTENT { |
| | | padding: 10px; |
| | | height: 100%; |
| | | min-height: 660px; /* 设置æå°é«åº¦ */ |
| | | min-height: 738px; /* 设置æå°é«åº¦ */ |
| | | |
| | | .title { |
| | | font-size: 22px; |
| | |
| | | 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 { |
| | |
| | | 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; |
| | | } |
| | |
| | | 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> |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | >æ°å¢</el-button |
| | |
| | | <div class="documentf"> |
| | | <div class="document"> |
| | | <el-button type="success" size="medium" @click="onthatday()" |
| | | >彿¥æå¡</el-button |
| | | >仿¥æå¡</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | 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", |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | |
| | |
| | | serviceType: 13, |
| | | searchscope: 3, |
| | | sendstate: 2, |
| | | sort: 2, |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | scopetype: [], |
| | | leaveldeptcodes: [], |
| | | leavehospitaldistrictcodes: [], |
| | |
| | | { |
| | | value: 3, |
| | | label: "åéæ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | errtype: "", |
| | |
| | | }, |
| | | //æ£è
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"); |
| | |
| | | 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: { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | >åªå±ç¤ºæ¬æ¬¡æå¡ä¿¡æ¯</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" |
| | |
| | | > |
| | | åå¾CDSSæ¥è¯¢ |
| | | </el-link> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <!-- <el-button type="success">é访åçä¿¡</el-button> --> |
| | | </div> |
| | |
| | | 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", |
| | |
| | | |
| | | //æ£è
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"); |
| | |
| | | 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; |
| | |
| | | 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>æ°å¢æ£è
</span |
| | | ></el-button |
| | | > |
| | | <el-button |
| | |
| | | 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> |
| | |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | <!-- éæ©æ£è
å¼¹æ¡ --> |
| | | <Patient-Selection |
| | | ref="Patient" |
| | | :dialogVisiblepatient="dialogVisiblepatient" |
| | | @addoption="addoption" |
| | | @kkoption="dialogVisiblepatient = true" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } 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"; //æ£åç»ä»¶ |
| | | 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 { |
| | | // é®ç½©å± |
| | |
| | | showTimeNight: [], |
| | | showTimeNoon: [], |
| | | }, |
| | | dialogVisiblepatient: false, |
| | | Patientlist: [], |
| | | taskformVisible: false, |
| | | dynamicTags: ["é项ä¸", "é项äº", "é项ä¸"], //é项 |
| | | inputVisible: false, |
| | |
| | | label: "æ¶æ¯éç¥", |
| | | }, |
| | | ], |
| | | taskoptions: [ |
| | | { |
| | | value: "1", |
| | | label: "çæµè¯ä¼°", |
| | | }, |
| | | { |
| | | value: "2", |
| | | label: "åºé¢é访", |
| | | }, |
| | | { |
| | | value: "3", |
| | | label: "é¨è¯é访", |
| | | }, |
| | | { |
| | | value: "4", |
| | | label: "宣æå
³æ", |
| | | }, |
| | | { |
| | | value: "5", |
| | | label: "å¤è¯ç®¡ç", |
| | | }, |
| | | // { |
| | | // value: "5", |
| | | // label: "满æåº¦è°æ¥", |
| | | // }, |
| | | { |
| | | value: "7", |
| | | label: "æ£è
æ¥å", |
| | | }, |
| | | // { |
| | | // 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: [], |
| | |
| | | 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; |
| | |
| | | this.tasktopic == 3 || |
| | | this.tasktopic == 1 || |
| | | this.tasktopic == 7 || |
| | | this.tasktopic == 5 || |
| | | this.tasktopic == 6 |
| | | ) { |
| | | if (!this.topqueryParams.type) this.topqueryParams.type = 1; |
| | |
| | | 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"; |
| | |
| | | value: 2, |
| | | label: "é®å·é访", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "宣æå
³æ", |
| | | }, |
| | | ]; |
| | | // this.topqueryParams.type = 2; |
| | | } |
| | | this.topqueryParams.beginTime = this.dateRange[0]; |
| | | this.topqueryParams.endTime = this.dateRange[1]; |
| | |
| | | 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> |
| | |
| | | border-radius: 1px; |
| | | color: #ffffff; |
| | | } |
| | | .button-hz { |
| | | background: #63d37b; |
| | | padding: 5px; |
| | | border-radius: 1px; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | ::v-deep.el-radio-group { |
| | | span { |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | >æ°å¢</el-button |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | |
| | |
| | | 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", |
| | |
| | | }, |
| | | //æ£è
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'); |
| | |
| | | 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: { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | >æ°å¢</el-button |
| | |
| | | <div class="documentf"> |
| | | <div class="document"> |
| | | <el-button type="success" size="medium" @click="onthatday()" |
| | | >彿¥æå¡</el-button |
| | | >仿¥æå¡</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | key="drname" |
| | | prop="drname" |
| | | /> |
| | | <el-table-column |
| | | label="é访人å" |
| | | align="center" |
| | | key="updateBy" |
| | | prop="updateBy" |
| | | width="120" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="åºé¢å¤©æ°" |
| | | 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" |
| | |
| | | // value: 0, |
| | | // }, |
| | | { |
| | | name: "åºé访", |
| | | name: "éé访", |
| | | value: 0, |
| | | }, |
| | | { |
| | |
| | | value: 3, |
| | | label: "åéæ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | topqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | sendstate: 2, |
| | | sort: 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | serviceType: 13, |
| | | searchscope: 3, |
| | | visitCount: 2, |
| | |
| | | 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", |
| | |
| | | }, |
| | | //æ£è
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"); |
| | |
| | | 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: { |
| | |
| | | } |
| | | } |
| | | ::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 { |
| | |
| | | border-radius: 1px; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .button-textxga { |
| | | color: #de7897; |
| | | } |
| | | ::v-deep.el-radio-group { |
| | | span { |
| | | font-size: 24px; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="æ£è
å§å" 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="æ£è
èå´" 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="责任æ¤å£«" |
| | | 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>æ£è
è¿æ»¤</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="宣ææ
åµ(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 ? 'ä¿®æ¹æ£è
ä¿¡æ¯' : 'æ°å¢æ£è
'" |
| | | :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: "æ£è
è¿æ»¤", |
| | | // 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: "åºé¢æ¶é´(æ£åº)", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "åºé¢æ¶é´(ååº)", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "åéæ¶é´(æ£åº)", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "åéæ¶é´(ååº)", |
| | | },{ |
| | | value: 7, |
| | | label: "åºéè®¿æ¥æ(æ£åº)", |
| | | }, |
| | | { |
| | | value: 8, |
| | | label: "åºéè®¿æ¥æ(ååº)", |
| | | }, |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | topqueryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | sendstate: 6, |
| | | sort: localStorage.getItem("orgname") == "丽水å¸ä¸å»é¢" ? 8 : 2, //0 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 3 åéæ¶é´(ååº) 7åºéè®¿æ¥æ(ååº) åºéè®¿æ¥æ(æ£åº) |
| | | 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: "æ£å¸¸", |
| | | }, |
| | | ], |
| | | 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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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 |
| | | ); |
| | | // 妿æ¾å°å¯¹åºçidï¼è¿ålabelå¼ï¼å¦åè¿å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); |
| | | }, |
| | | // æ£è
èå´å¤ç |
| | | 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 åºé¢æ¶é´(æ£åº) 1 åºé¢æ¶é´(ååº) 2 åéæ¶é´(æ£åº) 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, |
| | | }, |
| | | }); |
| | | }, |
| | | //æ£è
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("æ£è
è¿æ»¤æå"); |
| | | }); |
| | | |
| | | 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 + |
| | | 'æ£è
å称为"' + |
| | | 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(() => {}); |
| | | }, |
| | | // æ£è
è¿æ»¤è§¦å |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="æå¡ç»ID" |
| | | 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="å
³èæ£è
æ°" |
| | | 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: "å¤ç§æ
¢æ§ç
æ£è
ç综åå¥åº·ç®¡çæå¡", |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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>æå¡ç»IDï¼</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> |
| | | |
| | | <!-- åºé¨å
³èæ£è
--> |
| | | <el-card class="patient-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="handleAddPatient" |
| | | >å
³èæ£è
</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="æ£è
å§å" |
| | | 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"> |
| | | ææ å
³èæ£è
ï¼è¯·å
å
³èæ£è
|
| | | </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' |
| | | } |
| | | ], |
| | | |
| | | // æµè¯æ°æ® - å
³èæ£è
|
| | | 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; |
| | | // }); |
| | | }, |
| | | /** è·åå
³èæ£è
å表 */ |
| | | 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(() => {}); |
| | | }, |
| | | /** å
³èæ£è
*/ |
| | | handleAddPatient() { |
| | | this.$router.push(`/system/serviceGroup/patients/${this.groupId}?action=add`); |
| | | }, |
| | | /** ç®¡çæ£è
*/ |
| | | handleManagePatients() { |
| | | this.$router.push(`/system/serviceGroup/patients/${this.groupId}`); |
| | | }, |
| | | /** æ¥çæ£è
详æ
*/ |
| | | handleViewPatient(patient) { |
| | | this.$router.push(`/system/patient/detail/${patient.patientId}`); |
| | | }, |
| | | /** ç§»é¤æ£è
*/ |
| | | handleRemovePatient(patient) { |
| | | this.$modal.confirm(`æ¯å¦ç¡®è®¤ç§»é¤æ£è
"${patient.patientName}"ï¼`).then(() => { |
| | | // è°ç¨ç§»é¤æ£è
API |
| | | 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> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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" |
| | | >宣æå
容</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="宣æåç±»" 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="å®£ææ é¢" prop="preachname"> |
| | | <div style="width: 30%"> |
| | | <el-input |
| | | v-model="ruleForm.preachname" |
| | | placeholder="请è¾å
¥æ é¢" |
| | | ></el-input> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="宣ææè¿°" 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="å®£ææ¹å¼" 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> |
| | | <!-- 宣æå
容 --> |
| | | <div v-if="Editprogress == 2"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4"> |
| | | <div class="leftvlue-jbxx">宣æå
容</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"; //æ£åç»ä»¶ |
| | | |
| | | 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" è¿ä¸ªä»£ç å æå³å¯ |
| | | 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; |
| | | }); |
| | | } |
| | | // 宣æåç±» |
| | | 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) { |
| | | // å建ä¸ä¸ªæ°çDOMè§£æå¨ |
| | | var parser = new DOMParser(); |
| | | // å°å符串解æä¸ºææ¡£å¯¹è±¡ |
| | | var doc = parser.parseFromString(html, "text/html"); |
| | | |
| | | // å®ä¹è¦æ¿æ¢çæ°æ§URL |
| | | var oldUrlBase = this.oldPattern; |
| | | var newUrlBase =this.newPattern; |
| | | |
| | | // è·åææçvideoå
ç´ |
| | | var videos = doc.querySelectorAll("video"); |
| | | |
| | | // éåææçvideoå
ç´ å¹¶æ¿æ¢src屿§ |
| | | videos.forEach(function (video) { |
| | | var src = video.getAttribute("src"); |
| | | if (src.startsWith(oldUrlBase)) { |
| | | video.setAttribute("src", src.replace(oldUrlBase, newUrlBase)); |
| | | } |
| | | }); |
| | | |
| | | // å°ä¿®æ¹åçææ¡£è½¬æ¢åå符串 |
| | | 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]); |
| | | }); |
| | | } |
| | | }); |
| | | // æ°ç»å¯¹è±¡æ¥idæ°ç» |
| | | 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> |
| src/views/knowledge/education/compilequer/index.vue
src/views/knowledge/education/index.vue
src/views/knowledge/questionbank/particulars/index.vue
src/views/knowledge/questionnaire/compilequer/index.vue
src/views/knowledge/questionnaire/index.vue
src/views/login.vue
src/views/loginSSO.vue
src/views/outsideChainnew.vue
src/views/outsideChainwt.vue
src/views/outsideChainwtnew.vue
src/views/outsideChainxjnew.vue
src/views/patient/follow/index.vue
src/views/patient/medtechnician/PatientChart.vue
src/views/patient/patient/AwaitingAdmission.vue
src/views/patient/patient/ExternalPatient.vue
src/views/patient/patient/behospitalized.vue
src/views/patient/patient/hospital.vue
src/views/patient/patient/index.vue
src/views/patient/patient/indexls.vue
src/views/patient/patient/operation.vue
src/views/patient/patient/outpatient.vue
src/views/patient/patient/physical.vue
src/views/patient/physical/index.vue
src/views/patient/propaganda/Missioncreation.vue
src/views/patient/propaganda/Missionotice.vue
src/views/patient/propaganda/QuestionnaireTask.vue
src/views/patient/propaganda/index.vue
src/views/patient/propaganda/particty.vue
src/views/patient/questionnaire/index.vue
src/views/patient/shadow/index.vue
src/views/patient/subsequent/index.vue
src/views/satisfaction.vue
src/views/sfstatistics/percentage/index.vue
src/views/sfstatistics/percentage/satisfaction.vue
src/views/shortmessage/healthinformation/compilequer/index.vue
src/views/system/user/index.vue
vue.config.js |