| | |
| | | data: data, |
| | | }); |
| | | } |
| | | // é¦é¡µä¸é¨æ°æ® |
| | | export function getServiceStatistics(data) { |
| | | return request({ |
| | | url: "/smartor/serviceSubtask/getServiceStatistics", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | // æ¥è¯¢æ£è
ä½é¢è®°å½å表 |
| | | export function getechartsMedInhospList(data) { |
| | | return request({ |
| | |
| | | callStatus: 'idle', // idle, calling, connected, ended |
| | | sipStatus: "æªè¿æ¥", |
| | | sipStatusClass: "status-disconnected", |
| | | randomNum = Math.floor(Math.random() * 21) + 1000, // çæ 1000-1020 çéæºæ´æ° |
| | | randomNum : Math.floor(Math.random() * 11) + 1000, // çæ 1000-1010 çéæºæ´æ° |
| | | sipConfig: { |
| | | wsUrl: "wss://192.168.100.6:7443", |
| | | sipUri: `${randomNum}`+"@192.168.100.6", |
| | | wsUrl: "wss://192.168.10.124:7443", |
| | | sipUri: `${randomNum}`+"@192.168.10.124", |
| | | password: "Smartor@2023", |
| | | displayName: "Web å°é¾", |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import JsSIP from "jssip"; |
| | | |
| | | class SipService { |
| | | constructor() { |
| | | this.ua = null; |
| | | this.currentSession = null; |
| | | this.onStatusChange = null; // ç¶æåååè° |
| | | this.onCallStatusChange = null; // æ°å¢éè¯ç¶æåè° |
| | | } |
| | | |
| | | // åå§åSIP客æ·ç«¯ |
| | | init(config) { |
| | | try { |
| | | 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, |
| | | 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, // æå¤§éè¿é´é |
| | | }); |
| | | |
| | | this.ua.start(); |
| | | |
| | | // 注åäºä»¶çå¬ |
| | | this.ua.on("registered", () => { |
| | | this.updateStatus("registered", "已注å"); |
| | | }); |
| | | |
| | | this.ua.on("registrationFailed", (e) => { |
| | | this.updateStatus("failed", `注å失败: ${e.cause}`); |
| | | }); |
| | | |
| | | 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); |
| | | } |
| | | } |
| | | handleIncomingCall(session) { |
| | | if (session.direction === "incoming") { |
| | | console.log("æ¥çµ:", session.remote_identity.uri.toString()); |
| | | // å¯ä»¥å¨è¿é触å UI éç¥ |
| | | if (this.onIncomingCall) { |
| | | this.onIncomingCall(session); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ´æ°ç¶æå¹¶éç¥UI |
| | | updateStatus(type, text) { |
| | | console.log(`SIPç¶ææ´æ°: ${type} - ${text}`); |
| | | if (this.onStatusChange) { |
| | | this.onStatusChange({ type, text }); |
| | | } |
| | | } |
| | | |
| | | // ä¸é®æ¨å· - å¢å 注åç¶ææ£æ¥ |
| | | makeCall(targetNumber) { |
| | | if (!this.ua) { |
| | | 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 }, |
| | | ], |
| | | 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.on('failed', (e) => { |
| | | this.updateCallStatus('failed', `å¼å«å¤±è´¥2: ${e.cause}`); |
| | | }); |
| | | |
| | | this.currentSession.on('ended', () => { |
| | | this.updateCallStatus('ended', 'éè¯å·²ç»æ'); |
| | | }); |
| | | |
| | | this.currentSession.on('confirmed', () => { |
| | | this.updateCallStatus('connected', 'éè¯å·²æ¥é'); |
| | | }); |
| | | this.setupAudio(this.currentSession); |
| | | } |
| | | setupAudio(session) { |
| | | session.connection.addEventListener("addstream", (e) => { |
| | | const audioElement = document.getElementById("remoteAudio"); |
| | | if (audioElement) { |
| | | audioElement.srcObject = e.stream; |
| | | } |
| | | }); |
| | | } |
| | | // ææå½åéè¯ |
| | | endCall() { |
| | | if (this.currentSession) { |
| | | this.currentSession.terminate(); |
| | | this.updateCallStatus('ended', 'éè¯å·²ç»æ'); |
| | | this.currentSession = null; |
| | | } |
| | | } |
| | | // æ°å¢æ¹æ³ï¼æ´æ°éè¯ç¶æ |
| | | updateCallStatus(type, text) { |
| | | console.log(`éè¯ç¶ææ´æ°: ${type} - ${text}`); |
| | | if (this.onCallStatusChange) { |
| | | this.onCallStatusChange({ type, text }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | export default new SipService(); |
| | |
| | | constructor() { |
| | | this.ua = null; |
| | | this.currentSession = null; |
| | | this.onStatusChange = null; // ç¶æåååè° |
| | | this.onCallStatusChange = null; // æ°å¢éè¯ç¶æåè° |
| | | this.onStatusChange = null; |
| | | this.onCallStatusChange = null; |
| | | this.onIncomingCall = null; |
| | | } |
| | | |
| | | // åå§åSIP客æ·ç«¯ |
| | | init(config) { |
| | | try { |
| | | this.updateStatus("connecting", "è¿æ¥ä¸..."); |
| | |
| | | uri: config.sipUri, |
| | | password: config.password, |
| | | display_name: config.displayName, |
| | | iceservers: [], |
| | | // realm: config.realm, |
| | | iceServers: [{ urls: "stun:stun.l.google.com:19302" }], |
| | | 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, // æå¤§éè¿é´é |
| | | session_expires: 900, |
| | | sessionTimersExpires: 600, |
| | | extraHeaders: ["Min-SE: 120"], |
| | | register_expires: 300, |
| | | connection_recovery_min_interval: 2, |
| | | connection_recovery_max_interval: 30, |
| | | pcConfig: { |
| | | iceTransportPolicy: "all", |
| | | rtcpMuxPolicy: "require", |
| | | bundlePolicy: "max-bundle" |
| | | } |
| | | }); |
| | | |
| | | this.ua.start(); |
| | | |
| | | // 注åäºä»¶çå¬ |
| | | this.ua.on("registered", () => { |
| | | this.updateStatus("registered", "已注å"); |
| | | }); |
| | | // äºä»¶çå¬ |
| | | this.ua.on("registered", () => this.updateStatus("registered", "已注å")); |
| | | this.ua.on("registrationFailed", (e) => |
| | | this.updateStatus("failed", `注å失败: ${e.cause}`)); |
| | | this.ua.on("disconnected", () => |
| | | this.updateStatus("disconnected", "è¿æ¥æå¼")); |
| | | this.ua.on("connected", () => |
| | | this.updateStatus("connecting", "éæ°è¿æ¥ä¸...")); |
| | | this.ua.on("newRTCSession", (data) => |
| | | this.handleIncomingCall(data.session)); |
| | | |
| | | this.ua.on("registrationFailed", (e) => { |
| | | this.updateStatus("failed", `注å失败: ${e.cause}`); |
| | | }); |
| | | |
| | | 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); |
| | | } |
| | | } |
| | | handleIncomingCall(session) { |
| | | if (session.direction === "incoming") { |
| | | console.log("æ¥çµ:", session.remote_identity.uri.toString()); |
| | | // å¯ä»¥å¨è¿é触å UI éç¥ |
| | | if (this.onIncomingCall) { |
| | | this.onIncomingCall(session); |
| | | } |
| | | throw error; |
| | | } |
| | | } |
| | | |
| | | // æ´æ°ç¶æå¹¶éç¥UI |
| | | updateStatus(type, text) { |
| | | console.log(`SIPç¶ææ´æ°: ${type} - ${text}`); |
| | | if (this.onStatusChange) { |
| | | this.onStatusChange({ type, text }); |
| | | } |
| | | } |
| | | |
| | | // ä¸é®æ¨å· - å¢å 注åç¶ææ£æ¥ |
| | | makeCall(targetNumber) { |
| | | if (!this.ua) { |
| | | throw new Error("SIP客æ·ç«¯æªåå§å"); |
| | | } |
| | | 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: false, // ææ¶ç¦ç¨ä»¥åå°å
¼å®¹æ§é®é¢ |
| | | extraHeaders: [ |
| | | "Min-SE: 120", |
| | | "Accept: application/sdp", |
| | | "Supported: outbound" |
| | | ], |
| | | video: [], |
| | | }, |
| | | }, |
| | | }; |
| | | mediaConstraints: { audio: true, video: false }, |
| | | rtcOfferConstraints: { |
| | | offerToReceiveAudio: true, |
| | | offerToReceiveVideo: false |
| | | }, |
| | | eventHandlers: { |
| | | progress: () => this.updateCallStatus("calling", "å¼å«ä¸..."), |
| | | failed: (e) => { |
| | | this.handleCallFailure(e, reject); |
| | | }, |
| | | ended: () => this.updateCallStatus("ended", "éè¯ç»æ"), |
| | | confirmed: () => { |
| | | this.updateCallStatus("connected", "éè¯å·²æ¥é"); |
| | | resolve(); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | 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.10.124`, |
| | | options |
| | | ); |
| | | |
| | | this.setupPeerConnection(this.currentSession); |
| | | this.setupAudio(this.currentSession); |
| | | |
| | | } catch (error) { |
| | | this.updateCallStatus("failed", `å¼å«å¤±è´¥1: ${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.cause}`); |
| | | }); |
| | | |
| | | this.currentSession.on('ended', () => { |
| | | this.updateCallStatus('ended', 'éè¯å·²ç»æ'); |
| | | }); |
| | | |
| | | this.currentSession.on('confirmed', () => { |
| | | this.updateCallStatus('connected', 'éè¯å·²æ¥é'); |
| | | }); |
| | | this.setupAudio(this.currentSession); |
| | | } |
| | | |
| | | normalizeSDP(offer) { |
| | | let sdp = offer.sdp; |
| | | |
| | | // 1. æ ååè¿æ¥è¡ |
| | | sdp = sdp.replace(/c=IN IP4.*\r\n/, "c=IN IP4 0.0.0.0\r\n"); |
| | | |
| | | // 2. æ ååé³é¢åªä½è¡ |
| | | sdp = sdp.replace(/m=audio \d+.*\r\n/, |
| | | "m=audio 9 UDP/TLS/RTP/SAVPF 0 8\r\n"); |
| | | |
| | | // 3. ç¡®ä¿å
å«åºæ¬ç¼è§£ç å¨ |
| | | 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"; |
| | | } |
| | | |
| | | // 4. æ·»å å¿
è¦å±æ§ |
| | | 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) { |
| | | console.error("å¼å«å¤±è´¥è¯¦æ
:", { |
| | | cause: e.cause, |
| | | message: e.message, |
| | | response: e.response && e.response.status_code |
| | | }); |
| | | |
| | | let errorMessage = "å¼å«å¤±è´¥"; |
| | | switch(e.cause) { |
| | | case "Incompatible SDP": |
| | | errorMessage = "åªä½åå失败ï¼è¯·æ£æ¥ç¼è§£ç å¨é
ç½®"; |
| | | break; |
| | | case "488": |
| | | case "606": |
| | | errorMessage = "对æ¹è®¾å¤ä¸æ¯æå½ååªä½é
ç½®"; |
| | | break; |
| | | default: |
| | | errorMessage = `å¼å«å¤±è´¥: ${e.cause || e.message}`; |
| | | } |
| | | |
| | | this.updateCallStatus("failed2", 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(); |
| | |
| | | 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 |
| | |
| | | align="center" |
| | | key="updateBy" |
| | | prop="updateBy" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="ç»ç®¡å»ç" |
| | | align="center" |
| | | key="managementDoctor" |
| | | prop="managementDoctor" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | |
| | | affiliation() { |
| | | this.topqueryParams.drcode = store.getters.hisUserId; |
| | | this.topqueryParams.nurseId = store.getters.hisUserId; |
| | | this.topqueryParams.managementDoctor = store.getters.name; |
| | | this.getList(1); |
| | | }, |
| | | onthatday() { |
| | |
| | | ></el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <!-- ä¸é´echars --> |
| | | <!-- ä¸é¨çº¿æ§æ±ç¶å¾ --> |
| | | <div class="boxEchars"> |
| | | <div class="echars1" id="echars"></div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <!-- ä¸é´åå³è¾¹ --> |
| | | <!-- å³è¾¹å表 --> |
| | | <el-col :span="4" class="aside"> |
| | | <div class="grid-content bg-purple" style="margin-top: -180px"> |
| | | <div class="title"> |
| | |
| | | ></el-table-column> |
| | | |
| | | <el-table-column prop="rc" class-name="rc"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.rc }}次 |
| | | </template> |
| | | <template slot-scope="scope"> {{ scope.row.rc }}次 </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | getechartsListCountdata, |
| | | getechartsMedOuthospList, |
| | | getechartsMedInhospList, |
| | | getechartsandData, |
| | | getServiceStatistics, |
| | | getDeptRanking, |
| | | } from "@/api/AiCentre/index"; |
| | | import dayjs from "dayjs"; |
| | |
| | | lastHeight: window.innerHeight, |
| | | radio1: "æ", |
| | | ticketStatistics: {}, |
| | | timeTypeMap: { |
| | | å¨: "day", |
| | | æ: "month", |
| | | å¹´: "year", |
| | | }, |
| | | DischargeData: { |
| | | rs: "", |
| | | rc: "", |
| | |
| | | this.getgraphdata(); |
| | | this.getranking(); |
| | | this.$nextTick(function () { |
| | | this.getregionAmountCollect(); |
| | | this.myEcharts2(); |
| | | this.getnodeCollect(); |
| | | this.getSkuTop(); |
| | | }); |
| | |
| | | this.getgraphdata(); |
| | | this.getranking(); |
| | | this.getTopdata(); |
| | | this.getregionAmountCollect(); |
| | | this.myEcharts2(); |
| | | this.getnodeCollect(); |
| | | this.getSkuTop(); |
| | | }, |
| | |
| | | }, |
| | | // topæè¡ |
| | | async getSkuTop() { |
| | | let Rankingdata = { |
| | | let Rankingdata = { |
| | | startDate: this.endatd, |
| | | endDate: this.statd, |
| | | cy: 1, |
| | | }; |
| | | await getDeptRanking(Rankingdata).then((res) => { |
| | | if (res.code == 200) { |
| | | this.SkuTop=res.rows.sort((a, b) => b.rc - a.rc); |
| | | console.log(this.SkuTop,'this.SkuTop'); |
| | | this.SkuTop = res.rows.sort((a, b) => b.rc - a.rc); |
| | | console.log(this.SkuTop, "this.SkuTop"); |
| | | } |
| | | }); |
| | | |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // è·åå°±è¯æ°é |
| | | getranking() { |
| | | |
| | | }, |
| | | // è·åä¸é¨çº¿æ±å¾æ°æ® |
| | | getgraphdata() { |
| | | let Outhospdata = { |
| | | getranking() {}, |
| | | |
| | | async getgraphdata() { |
| | | let params = { |
| | | startDate: this.endatd, |
| | | endDate: this.statd, |
| | | cy: 1, |
| | | timeType: |
| | | this.radio1 === "å¨" |
| | | ? "day" |
| | | : this.radio1 === "æ" |
| | | ? "month" |
| | | : "year", |
| | | }; |
| | | let Inhospdata = { |
| | | startDate: this.endatd, |
| | | endDate: this.statd, |
| | | cy: 1, |
| | | |
| | | try { |
| | | const res = await getServiceStatistics(params); |
| | | if (res.code === 200) { |
| | | this.processChartData(res.data); |
| | | } |
| | | } catch (error) { |
| | | console.error("è·åå¾è¡¨æ°æ®å¤±è´¥:", error); |
| | | } |
| | | }, |
| | | processChartData(data) { |
| | | // ææ¶é´æåºç¡®ä¿æ°æ®é¡ºåºæ£ç¡® |
| | | const sortedData = [...data].sort( |
| | | (a, b) => new Date(a.timePeriod) - new Date(b.timePeriod) |
| | | ); |
| | | |
| | | const xAxisData = []; |
| | | const dischargeFollowData = []; |
| | | const outpatientFollowData = []; |
| | | const pmiData = []; |
| | | const pmoData = []; |
| | | |
| | | sortedData.forEach((item) => { |
| | | // æ ¹æ®æ¶é´ç±»åæ ¼å¼åæ¾ç¤º |
| | | let timeLabel = item.timePeriod; |
| | | if (this.radio1 === "å¨") { |
| | | timeLabel = dayjs(item.timePeriod).format("MM-DD"); |
| | | } else if (this.radio1 === "æ") { |
| | | timeLabel = item.timePeriod.split("-")[1] + "æ"; |
| | | } else { |
| | | timeLabel = item.timePeriod.split("-")[0] + "å¹´"; |
| | | } |
| | | |
| | | xAxisData.push(timeLabel); |
| | | dischargeFollowData.push(item.dischargeFollowCount); |
| | | outpatientFollowData.push(item.outpatientFollowCount); |
| | | pmiData.push(item.pmiCount); |
| | | pmoData.push(item.pmoCount); |
| | | }); |
| | | |
| | | // æ´æ°å¾è¡¨ |
| | | this.updateChart( |
| | | xAxisData, |
| | | dischargeFollowData, |
| | | outpatientFollowData, |
| | | pmiData, |
| | | pmoData |
| | | ); |
| | | }, |
| | | updateChart( |
| | | xAxisData, |
| | | dischargeFollowData, |
| | | outpatientFollowData, |
| | | pmiData, |
| | | pmoData |
| | | ) { |
| | | if (!this.myChart2) { |
| | | this.myEcharts2(); |
| | | return; |
| | | } |
| | | |
| | | // 计ç®é访éçæå¤§å¼ |
| | | const maxFollow = Math.max( |
| | | ...dischargeFollowData, |
| | | ...outpatientFollowData |
| | | ); |
| | | // è®¡ç®æå¡äººæ¬¡çæå¤§å¼ |
| | | const maxService = Math.max(...pmiData, ...pmoData); |
| | | |
| | | // å¨æè®¡ç®intervalå¼ |
| | | const followInterval = this.calculateOptimalInterval(maxFollow); |
| | | const serviceInterval = this.calculateOptimalInterval(maxService); |
| | | |
| | | const option = { |
| | | xAxis: { |
| | | data: xAxisData, |
| | | }, |
| | | yAxis: [ |
| | | { |
| | | interval: followInterval, |
| | | max: Math.ceil(maxFollow / followInterval) * followInterval, |
| | | }, |
| | | { |
| | | interval: serviceInterval, |
| | | max: Math.ceil(maxService / serviceInterval) * serviceInterval, |
| | | }, |
| | | ], |
| | | series: [ |
| | | { data: dischargeFollowData }, |
| | | { data: outpatientFollowData }, |
| | | { data: pmiData }, |
| | | { data: pmoData }, |
| | | ], |
| | | }; |
| | | getechartsMedOuthospList(Outhospdata).then((res) => {}); |
| | | getechartsMedInhospList(Inhospdata).then((res) => {}); |
| | | |
| | | this.myChart2.setOption(option); |
| | | }, |
| | | |
| | | // è®¡ç®æä¼çintervalå¼ |
| | | calculateOptimalInterval(maxValue) { |
| | | if (maxValue <= 0) return 50; // é»è®¤å¼ |
| | | |
| | | // æ ¹æ®æå¤§å¼è®¡ç®åéçé´é |
| | | const magnitude = Math.pow(10, Math.floor(Math.log10(maxValue))); |
| | | const stepRatio = maxValue / magnitude; |
| | | |
| | | let interval; |
| | | if (stepRatio > 5) { |
| | | interval = magnitude; |
| | | } else if (stepRatio > 2) { |
| | | interval = magnitude / 2; |
| | | } else { |
| | | interval = magnitude / 5; |
| | | } |
| | | |
| | | // ç¡®ä¿intervalæ¯æ´æ° |
| | | interval = Math.round(interval); |
| | | |
| | | // éå¶æå°é´é |
| | | return Math.max(interval, 50); |
| | | }, |
| | | // è·å线ç¶å¾æ¶é´ |
| | | async getregionAmountCollect() { |
| | | //getregionAmountCollect(1, this.endatd, this.statd); |
| | |
| | | this.series = [123, 123, 223, 212, 432, 123, 442, 234]; |
| | | this.myEcharts2(); |
| | | }, |
| | | // 线æ§å¾ |
| | | // 线æ§å¾åæ±ç¶å¾ |
| | | myEcharts2() { |
| | | var echarts = require("echarts"); |
| | | var myChart2 = echarts.init(document.getElementById("echars")); |
| | | this.myChart2 = myChart2; |
| | | |
| | | var option2 = { |
| | | tooltip: { |
| | | trigger: "axis", |
| | |
| | | }, |
| | | }, |
| | | legend: { |
| | | data: [ |
| | | "åºé¢é访é", |
| | | "é¨è¯é访é", |
| | | // "å¨é¢é访é", |
| | | // "é¨è¯å¤è¯éç¥", |
| | | "åºé¢æå¡äººæ¬¡", |
| | | "é¨è¯æå¡äººæ¬¡", |
| | | ], |
| | | data: ["åºé¢é访é", "é¨è¯é访é", "åºé¢æå¡äººæ¬¡", "é¨è¯æå¡äººæ¬¡"], |
| | | }, |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: [ |
| | | "䏿", |
| | | "äºæ", |
| | | "䏿", |
| | | "åæ", |
| | | "äºæ", |
| | | "å
æ", |
| | | "䏿", |
| | | "å
«æ", |
| | | "乿", |
| | | "åæ", |
| | | ], |
| | | data: [], // åå§ä¸ºç©ºï¼å°éè¿APIæ°æ®å¡«å
|
| | | axisPointer: { |
| | | type: "shadow", |
| | | }, |
| | |
| | | type: "value", |
| | | name: "é访é", |
| | | min: 0, |
| | | max: 250, |
| | | interval: 50, |
| | | axisLabel: { |
| | | formatter: "{value} 人", |
| | | }, |
| | | }, |
| | | { |
| | | type: "value", |
| | | name: "å¤è¯/è¯ä¼°æ¬¡æ°", |
| | | name: "æå¡äººæ¬¡", |
| | | min: 0, |
| | | max: 250, |
| | | interval: 50, |
| | | axisLabel: { |
| | | formatter: "{value} 次", |
| | | }, |
| | |
| | | return value + " 人"; |
| | | }, |
| | | }, |
| | | data: [120, 150, 165, 90, 140, 200, 130, 85, 175, 95, 110, 160], |
| | | data: [], // åå§ä¸ºç©ºï¼å°éè¿APIæ°æ®å¡«å
|
| | | }, |
| | | // { |
| | | // name: "å½±åé访é", |
| | | // type: "bar", |
| | | // tooltip: { |
| | | // valueFormatter: function (value) { |
| | | // return value + " 人"; |
| | | // }, |
| | | // }, |
| | | // data: [102, 190, 135, 88, 175, 160, 83, 145, 200, 110, 97, 180], |
| | | // }, |
| | | { |
| | | name: "é¨è¯é访é", |
| | | type: "bar", |
| | |
| | | return value + " 人"; |
| | | }, |
| | | }, |
| | | data: [145, 92, 178, 134, 167, 85, 199, 112, 156, 88, 120, 145], |
| | | data: [], // åå§ä¸ºç©ºï¼å°éè¿APIæ°æ®å¡«å
|
| | | }, |
| | | |
| | | // { |
| | | // name: "åºé¢å¤è¯éç¥", |
| | | // type: "line", |
| | | // smooth: 0.3, |
| | | // yAxisIndex: 1, |
| | | // tooltip: { |
| | | // valueFormatter: function (value) { |
| | | // return value + " 次"; |
| | | // }, |
| | | // }, |
| | | // data: [45, 123, 78, 156, 89, 34, 199, 112, 67, 145, 88, 175], |
| | | // }, |
| | | { |
| | | name: "åºé¢æå¡äººæ¬¡", |
| | | type: "line", |
| | |
| | | return value + " 次"; |
| | | }, |
| | | }, |
| | | data: [102, 190, 135, 88, 175, 160, 83, 145, 200, 110, 97, 180], |
| | | data: [], // åå§ä¸ºç©ºï¼å°éè¿APIæ°æ®å¡«å
|
| | | }, |
| | | { |
| | | name: "é¨è¯æå¡äººæ¬¡", |
| | |
| | | return value + " 次"; |
| | | }, |
| | | }, |
| | | data: [120, 150, 165, 90, 140, 200, 130, 85, 175, 95, 110, 160], |
| | | data: [], // åå§ä¸ºç©ºï¼å°éè¿APIæ°æ®å¡«å
|
| | | }, |
| | | ], |
| | | }; |
| | | myChart2.on("updateAxisPointer", function (event) { |
| | | const xAxisInfo = event.axesInfo[0]; |
| | | if (xAxisInfo) { |
| | | const dimension = xAxisInfo.value + 1; |
| | | myChart2.setOption({ |
| | | series: { |
| | | id: "pie", |
| | | label: { |
| | | formatter: "{b}: {@[" + dimension + "]} ", |
| | | }, |
| | | encode: { |
| | | value: dimension, |
| | | tooltip: dimension, |
| | | }, |
| | | }, |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | myChart2.setOption(option2); |
| | | |
| | | // åå§å è½½æ°æ® |
| | | this.getgraphdata(); |
| | | }, |
| | | // 饼ç¶å¾ |
| | | myPieChart() { |
| | |
| | | }); |
| | | } |
| | | // 宣æåç±» |
| | | getheLibraryAssort({}).then((res) => { |
| | | getheLibraryAssort({ hetype: 1 }).then((res) => { |
| | | this.sortlist = res.rows; |
| | | console.log(this.sortlist); |
| | | }); |
| | |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="ç»ç®¡å»ç" |
| | | align="center" |
| | | key="managementDoctor" |
| | | prop="managementDoctor" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="主治å»ç" |
| | | align="center" |
| | | key="drname" |
| | |
| | | </el-select> </el-form-item |
| | | ></el-col> |
| | | </el-row> |
| | | <el-form-item label="æ§è¡å¨æ" prop="longTask"> |
| | | <el-form-item label="æ§è¡å¨æ" prop="longTask"> |
| | | <el-radio-group v-model="form.longTask"> |
| | | <el-radio :label="0">èªå®ä¹å¨æ</el-radio> |
| | | <el-radio :label="1">é¿æä»»å¡</el-radio> |
| | |
| | | <el-radio :label="2">å³å»åé</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ§è¡æ¥æï¼" v-if="form.sendType == 1&& !form.longTask"> |
| | | <el-form-item |
| | | label="æ§è¡æ¥æï¼" |
| | | v-if="form.sendType == 1 && !form.longTask" |
| | | > |
| | | <el-date-picker |
| | | v-model="daytime" |
| | | @change="changeTimeday" |
| | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æ§è¡æ¶é´ç¹ï¼" v-if="form.sendType == 3&& !form.longTask"> |
| | | <el-form-item |
| | | label="æ§è¡æ¶é´ç¹ï¼" |
| | | v-if="form.sendType == 3 && !form.longTask" |
| | | > |
| | | <div style="display: flex"> |
| | | <div style="margin-right: 10px"> |
| | | <el-date-picker |
| | |
| | | </div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æ§è¡æ¶é´æ®µï¼" v-if="form.sendType == 1&& !form.longTask"> |
| | | <el-form-item |
| | | label="æ§è¡æ¶é´æ®µï¼" |
| | | v-if="form.sendType == 1 && !form.longTask" |
| | | > |
| | | <div style="display: flex"> |
| | | <div style="margin-right: 10px"> |
| | | <span style="font-size: 18px; margin-right: 10px">â </span> |
| | |
| | | icon="el-icon-upload2" |
| | | size="medium" |
| | | @click="handleImport" |
| | | |
| | | >导å
¥</el-button |
| | | > |
| | | </el-col> |
| | |
| | | <!-- 模æ¿é¢è§ --> |
| | | <el-dialog title="模æ¿é¢è§" :visible.sync="previewtf" width="60%"> |
| | | <div class="preview-left"> |
| | | <!-- åé --> |
| | | <div v-html="htmlRichText"></div> |
| | | <!-- æ ¹æ®æ¨¡æ¿ç±»åæ¾ç¤ºä¸åå
容 --> |
| | | <div v-if="currentTemplateType == '2'"> |
| | | <!-- éç¥æ¨¡æ¿åªæ¾ç¤ºçº¯ææ¬å
容 --> |
| | | <div style="white-space: pre-wrap; font-size: 16px; line-height: 1.6"> |
| | | {{ plainTextContent }} |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <!-- å
¶ä»ç±»åæ¨¡æ¿æ¾ç¤ºå¯ææ¬å
容 --> |
| | | <div v-html="htmlRichText"></div> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <!-- <el-button @click="previewGo">å徿¨¡æ¿è¯¦æ
ä¿®æ¹</el-button> --> |
| | | <el-button type="primary" @click="previewFn">确认使ç¨</el-button> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | |
| | | <el-table :data="uploadingData" style="width: 100%"> |
| | | <el-table-column prop="serial" label="æ£è
id"> </el-table-column> |
| | | <el-table-column prop="name" label="å§å" |
| | | width="100"> </el-table-column> |
| | | <el-table-column prop="sex" label="æ§å«"width="100"> </el-table-column> |
| | | <el-table-column prop="idcardno" width="300" label="è¯ä»¶å·ç "> </el-table-column> |
| | | <el-table-column prop="name" label="å§å" width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="sex" label="æ§å«" width="100"> |
| | | </el-table-column> |
| | | <el-table-column prop="idcardno" width="300" label="è¯ä»¶å·ç "> |
| | | </el-table-column> |
| | | <el-table-column prop="goday" label="åºçæ¥æ"> </el-table-column> |
| | | <el-table-column prop="telcode" width="200" label="èç³»æ¹å¼"> </el-table-column> |
| | | <el-table-column prop="createTime" width="200" label="åå»ºæ¥æ"> |
| | | <el-table-column prop="telcode" width="200" label="èç³»æ¹å¼"> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" width="200" label="åå»ºæ¥æ"> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- <pagination |
| | |
| | | <el-form-item label="宣æåç§°"> |
| | | <el-input v-model="topqueryParams.preachname"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="宣æåç±»" prop="region"> |
| | | <el-form-item label="宣æç±»å" prop="region"> |
| | | <el-select |
| | | v-model="topqueryParams.assortid" |
| | | v-model="topqueryParams.hetype" |
| | | size="medium" |
| | | filterable |
| | | placeholder="è¯·éæ©åç±»" |
| | | > |
| | | <el-option-group |
| | | v-for="group in sortlist" |
| | | :key="group.id" |
| | | :label="group.assortname" |
| | | <el-option |
| | | v-for="item in heLibraryAssortList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id" |
| | | > |
| | | <el-option |
| | | v-for="item in group.heLibraryAssortList" |
| | | :key="item.id" |
| | | :label="item.assortname" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-option-group> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | |
| | | return { |
| | | title: "宣æå
容å表", |
| | | currenttype: 1, //1宣æ2é¨è¯3åºé¢4å¤è¯5使£6é®å· |
| | | currentTemplateType: "", // å½å模æ¿ç±»å |
| | | plainTextContent: "", // çº¯ææ¬å
容 |
| | | id: "", // |
| | | previewid: "", //任塿¨¡æ¿ä¼ éid |
| | | libName: "", |
| | |
| | | tableLabelxj: [ |
| | | { label: "å建人", width: "", prop: "createBy" }, |
| | | { label: "宣æåç§°", width: "180", prop: "preachname" }, |
| | | { label: "宣ææè¿°", width: "180", prop: "preachcontent" }, |
| | | { label: "宣æå
容", width: "180", prop: "preachcontent" }, |
| | | // { label: "宣æå½¢å¼", width: "", prop: "playType" }, |
| | | { label: "éç¨æ¹å¼", width: "", prop: "suitway" }, |
| | | { label: "ä¿®æ¹æ¥æ", width: "", prop: "uploadTime" }, |
| | |
| | | ], |
| | | variableListTime: [], |
| | | sortlist: [], |
| | | heLibraryAssortList: [ |
| | | { id: 1, value: "宣æ" }, |
| | | { id: 2, value: "éç¥" }, |
| | | ], |
| | | tasktopic: null, //æ°å¢ç±»å |
| | | SelectPatientslist: [], |
| | | form: { |
| | |
| | | templatename: "", |
| | | templateid: null, |
| | | libtemplateid: null, |
| | | kcb: "亲ç±çæ£è
-å®¶å±ï¼æä»¬æ¯"+localStorage.getItem("orgname")+"ç廿¤äººåï¼ä¸ºäºæ´å¥½å°äºè§£æ¨çåº·å¤æ
åµï¼è¯·æ¨æ½ä¸ç¹å®è´µæ¶é´ï¼è§çè¿ä»½å®£æèµè®¯ã", |
| | | kcb: |
| | | "亲ç±çæ£è
-å®¶å±ï¼æä»¬æ¯" + |
| | | localStorage.getItem("orgname") + |
| | | "ç廿¤äººåï¼ä¸ºäºæ´å¥½å°äºè§£æ¨çåº·å¤æ
åµï¼è¯·æ¨æ½ä¸ç¹å®è´µæ¶é´ï¼è§çè¿ä»½å®£æèµè®¯ã", |
| | | jsy: "çæ´»ä¸è¦å³é¸ç»åï¼æ³¨æä¼æ¯åè¥å
»ï¼éå½é»ç¼ï¼æçéé
ï¼ä¿æå¿æ
èç
ï¼å®æå¤è¯ã飿¬æ¬¡å®£æå
容就å°è¿éï¼ç¥æ¨èº«ä½å¥åº·ï¼", |
| | | }, |
| | | taskoptions: [ |
| | |
| | | submitForm(formName) { |
| | | this.form.preachform = this.checkList.join(","); |
| | | // this.formatFn(1); |
| | | if (!this.form.patTaskRelevances[0]) { |
| | | if (!this.form.patTaskRelevances[0]&&this.form.longTask==0) { |
| | | this.$modal.msgError("è¯·éæ©ç
人"); |
| | | return; |
| | | } |
| | |
| | | this.form.isoperation = 2; |
| | | } else { |
| | | this.form.isoperation = 1; |
| | | this.form.sendState=1; |
| | | this.form.sendState = 1; |
| | | } |
| | | if (!this.form.type) { |
| | | this.form.type = this.$route.query.type; |
| | |
| | | // ----------------------è¡¨æ ¼åç»ä»¶äºä»¶ |
| | | // éæ©æ¨¡æ¿å¹¶é¢è§ |
| | | selectfn(row, type) { |
| | | // æ¨¡æ¿æ
åµä¸è·å模æ¿ä¿¡æ¯ |
| | | this.libName = row.preachname; |
| | | this.htmlRichText = null; |
| | | this.libId = row.id; |
| | | console.log(row, "row"); |
| | | this.Tasktemplate = row; |
| | | |
| | | // 设置å½å模æ¿ç±»å |
| | | this.currentTemplateType = row.hetype || "1"; // é»è®¤ä¸ºå®£æç±»å |
| | | |
| | | this.previewtf = true; |
| | | this.previewid = row.svyid; |
| | | console.log(this.questionList, "questionList"); |
| | | // this.Variablehandling(row.svyLibScripts, 1); |
| | | console.log(row.htmlRichText); |
| | | axios |
| | | .get(row.htmlRichText) |
| | | .then((response) => { |
| | | console.log(response.data, "æ°æ®"); // è¾åºè·åå°çæä»¶å
容 |
| | | this.htmlRichText = response.data; |
| | | this.htmlRichText = this.addStyleToImages(this.htmlRichText); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("è·å坿æ¬å¤±è´¥"); |
| | | console.error("Failed to fetch file:", error); |
| | | }); |
| | | |
| | | if (this.currentTemplateType == "2") { |
| | | // 妿æ¯éç¥æ¨¡æ¿ï¼è·åçº¯ææ¬å
容 |
| | | this.plainTextContent = row.preachcontent; |
| | | } else { |
| | | // å
¶ä»ç±»å模æ¿è·å坿æ¬å
容 |
| | | axios |
| | | .get(row.htmlRichText) |
| | | .then((response) => { |
| | | this.htmlRichText = response.data; |
| | | this.htmlRichText = this.addStyleToImages(this.htmlRichText); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("è·å坿æ¬å¤±è´¥"); |
| | | console.error("Failed to fetch file:", error); |
| | | }); |
| | | } |
| | | }, |
| | | // é¢è§æ¨¡æ¿ |
| | | previewfnm() { |
| | |
| | | this.Tasktemplate = res.rows[0]; |
| | | this.previewtf = true; |
| | | this.previewid = res.rows[0].svyid; |
| | | axios |
| | | .get(res.rows[0].htmlRichText) |
| | | .then((response) => { |
| | | this.htmlRichText = response.data; |
| | | this.htmlRichText = this.addStyleToImages(this.htmlRichText); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("è·å坿æ¬å¤±è´¥"); |
| | | console.error("Failed to fetch file:", error); |
| | | }); |
| | | this.currentTemplateType = res.rows[0].hetype || "1"; // é»è®¤ä¸ºå®£æç±»å |
| | | |
| | | if (this.currentTemplateType == "2") { |
| | | // 妿æ¯éç¥æ¨¡æ¿ï¼è·åçº¯ææ¬å
容 |
| | | this.plainTextContent = res.rows[0].preachcontent; |
| | | } else { |
| | | // å
¶ä»ç±»å模æ¿è·å坿æ¬å
容 |
| | | axios |
| | | .get(res.rows[0].htmlRichText) |
| | | .then((response) => { |
| | | this.htmlRichText = response.data; |
| | | this.htmlRichText = this.addStyleToImages(this.htmlRichText); |
| | | }) |
| | | .catch((error) => { |
| | | this.$modal.msgError("è·å坿æ¬å¤±è´¥"); |
| | | console.error("Failed to fetch file:", error); |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | addStyleToImages(html) { |
| | |
| | | handleExport() {}, |
| | | |
| | | // éæ©æ£è
è¡¨æ°æ® |
| | | handleSelectionChange(selection,type) { |
| | | handleSelectionChange(selection, type) { |
| | | console.log("å¤éæ£è
"); |
| | | this.SelectPatientslist = selection; |
| | | this.multiple = !selection.length; |
| | |
| | | item.sfzh = item.idcardno; |
| | | } |
| | | if (type) { |
| | | item.hospType=type |
| | | }else{ |
| | | item.hospType = type; |
| | | } else { |
| | | item.hospType = this.patientqueryParams.allhosp; |
| | | } |
| | | this.overallCase.push(item); |
| | |
| | | templateid: null, |
| | | libtemplateid: null, |
| | | serviceType: Number(this.$route.query.serviceType), |
| | | kcb: "亲ç±çæ£è
-å®¶å±ï¼æä»¬æ¯"+localStorage.getItem("orgname")+"ç廿¤äººåï¼ä¸ºäºæ´å¥½å°äºè§£æ¨çåº·å¤æ
åµï¼è¯·æ¨æ½ä¸ç¹å®è´µæ¶é´ï¼å®æè¿ä»½é访é®å·ã", |
| | | kcb: |
| | | "亲ç±çæ£è
-å®¶å±ï¼æä»¬æ¯" + |
| | | localStorage.getItem("orgname") + |
| | | "ç廿¤äººåï¼ä¸ºäºæ´å¥½å°äºè§£æ¨çåº·å¤æ
åµï¼è¯·æ¨æ½ä¸ç¹å®è´µæ¶é´ï¼è§çè¿ä»½å®£æèµè®¯ã", |
| | | jsy: "çæ´»ä¸è¦å³é¸ç»åï¼æ³¨æä¼æ¯åè¥å
»ï¼éå½é»ç¼ï¼æçéé
ï¼ä¿æå¿æ
èç
ï¼å®æå¤è¯ã飿¬æ¬¡å访就å°è¿éï¼ç¥æ¨èº«ä½å¥åº·ï¼", |
| | | }; |
| | | |
| | |
| | | this.$refs.upload.submit(); |
| | | this.dractive++; |
| | | } else if (this.dractive == 2) { |
| | | this.handleSelectionChange(this.uploadingData,4); |
| | | this.handleSelectionChange(this.uploadingData, 4); |
| | | this.upload.open = false; |
| | | this.dractive = 1 |
| | | this.dractive = 1; |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | /* æ°å¢æ ·å¼ */ |
| | | .preview-left { |
| | | padding: 20px; |
| | | max-height: 70vh; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | /* çº¯ææ¬å
å®¹æ ·å¼ */ |
| | | .plain-text-content { |
| | | white-space: pre-wrap; |
| | | font-size: 16px; |
| | | line-height: 1.6; |
| | | padding: 15px; |
| | | background: #f9f9f9; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .download { |
| | | text-align: center; |
| | | .el-upload__tip { |
| | |
| | | <template> |
| | | <div class="Questionnairemanagement"> |
| | | <div class="NotificationManagement"> |
| | | <!-- 左侧æ --> |
| | | <div class="sidecolumn"> |
| | | <el-steps finish-status="success" :active="Editprogress" simple> |
| | |
| | | > |
| | | </template> |
| | | </el-step> |
| | | <el-step> |
| | | <template slot="title"> |
| | | <span style="cursor: pointer" @click="Editprogress = 2" |
| | | >éç¥å
容</span |
| | | > |
| | | </template> |
| | | </el-step> |
| | | </el-steps> |
| | | </div> |
| | | <!-- å³ä¾§æ°æ® --> |
| | |
| | | <!-- åºæ¬ä¿¡æ¯ --> |
| | | <div v-if="Editprogress == 1"> |
| | | <div class="leftvlue-jbxx">åºæ¬ä¿¡æ¯</div> |
| | | <el-divider></el-divider> |
| | | <el-form |
| | | :model="ruleForm" |
| | | :rules="rules" |
| | |
| | | <el-col :span="12"> </el-col> |
| | | </el-row> |
| | | <el-form-item label="éç¥æ é¢" prop="preachname"> |
| | | <div style="width: 30%"> |
| | | <div style="width: 60%"> |
| | | <el-input |
| | | v-model="ruleForm.preachname" |
| | | placeholder="请è¾å
¥æ é¢" |
| | | ></el-input> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="éç¥æè¿°" prop="preachcontent"> |
| | | <div style="width: 60%"> |
| | | <el-form-item label="éç¥å
容" prop="preachcontent"> |
| | | <div style="width: 80%"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="2" |
| | | :rows="5" |
| | | v-model="ruleForm.preachcontent" |
| | | placeholder="请è¾å
¥æè¿°" |
| | | placeholder="请è¾å
¥éç¥å
容" |
| | | ></el-input> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | </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 |
| | |
| | | @change="handleInputConfirm" |
| | | filterable |
| | | remote |
| | | allow-create |
| | | reserve-keyword |
| | | default-first-option |
| | | :remote-method="remoteMethodtag" |
| | |
| | | ></el-col> |
| | | <el-col :span="9"> |
| | | <el-form-item label="å¯ç¨ç¶æ" prop="region"> |
| | | <el-select |
| | | v-model="ruleForm.isavailable" |
| | | size="medium" |
| | | filterable |
| | | placeholder="è¯·éæ©åç±»" |
| | | > |
| | | <el-option |
| | | class="ruleFormaa" |
| | | v-for="item in usable" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | <el-radio-group v-model="ruleForm.isAvailable"> |
| | | <el-radio |
| | | v-for="(item, index) in usable" |
| | | :label="item.value" |
| | | >{{ item.label }}</el-radio |
| | | > |
| | | </el-option> |
| | | </el-select> </el-form-item |
| | | ></el-col> |
| | | </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="è¯·éæ©åç±»" |
| | | placeholder="è¯·éæ©é¢åº" |
| | | > |
| | | <el-option |
| | | class="ruleFormaa" |
| | |
| | | </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-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"> |
| | | <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></el-col |
| | | > |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <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> |
| | | <div id="quillEditorQiniu"> |
| | | <!-- åºäºelementUiçä¸ä¼ ç»ä»¶ el-upload begin--> |
| | | <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> |
| | | <!-- åºäºelementUiçä¸ä¼ ç»ä»¶ el-upload end--> |
| | | <quill-editor |
| | | class="editor" |
| | | v-model="content" |
| | | ref="customQuillEditor" |
| | | :options="editorOption" |
| | | @blur="onEditorBlur" |
| | | @focus="onEditorFocus" |
| | | @change="onEditorChange" |
| | | > |
| | | </quill-editor> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- æ·»å éç¨ç¾ç
çªå£ --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { quillEditor } from "vue-quill-editor"; |
| | | import axios from "axios"; |
| | | |
| | | import { |
| | | getheLibraryAssort, |
| | | delheLibraryAssort, |
| | |
| | | illnesslistget, |
| | | getillness, |
| | | } from "@/api/AiCentre/index"; |
| | | import OptionalForm from "@/components/OptionalForm"; //æ£åç»ä»¶ |
| | | |
| | | 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: "NotificationManagement", |
| | | components: { OptionalForm }, |
| | | data() { |
| | | return { |
| | | headers: { |
| | | Authorization: "Bearer " + getToken(), |
| | | }, |
| | | uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", |
| | | 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: "", //æç»ä¿åçå
容 |
| | | fileName: "", //æä»¶å |
| | | dynamicTags: [], |
| | | inputVisible: false, |
| | | illnessVisible: false, |
| | | dialogVisiblepatient: 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: "", //填空é¢çæ¡ |
| | | // æ»æ¡æ° |
| | | sidecolumnrabs: "left", |
| | | Editprogress: 1, |
| | | currentVersion: "1.2.3", |
| | | loading: false, |
| | | drawer: false, |
| | | radio: "false", |
| | | radios: [], |
| | | radioas: "", |
| | | total: 1, |
| | | hetype: "", |
| | | id: null, |
| | |
| | | deptList: [], |
| | | tempDetpRelevanceslist: [], |
| | | props: { multiple: true, value: "deptId", label: "deptName" }, |
| | | 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.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"); |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | processElement(element) { |
| | | return { ...element, isoperation: null }; |
| | | }, |
| | | // è·å页颿°æ® |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | if (this.id) { |
| | | getlibraryinfo({ id: this.id }).then((res) => { |
| | | this.ruleForm = res.data[0]; |
| | | this.ruleForm.campus = this.ruleForm.campus.split(","); |
| | | if (this.ruleForm.campus) |
| | | this.ruleForm.campus = this.ruleForm.campus.split(","); |
| | | this.dynamicTags = res.data[0].heLibraryTagList.map( |
| | | this.processElement |
| | | ); |
| | | this.Getmissioncontent(this.ruleForm.richText); |
| | | 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) |
| | |
| | | // éç¥åç±» |
| | | getheLibraryAssort({ hetype: 2 }).then((res) => { |
| | | this.sortlist = res.rows; |
| | | console.log(this.sortlist); |
| | | }); |
| | | // é¨é¨ |
| | | listDept(this.queryParams).then((response) => { |
| | | this.deptList = this.handleTree(response.data, "deptId"); |
| | | }); |
| | | this.loading = false; |
| | | }, |
| | | |
| | | processElement(element) { |
| | | return { ...element, isoperation: null }; |
| | | }, |
| | | submitForm(formName) { |
| | | let tgs = []; |
| | | this.dynamicTags.forEach((item) => { |
| | | tgs.push(item.tagname); |
| | | }); |
| | | this.ruleForm.campus = this.ruleForm.campus.join(","); |
| | | 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 = 2; |
| | | console.log(22); |
| | | this.ruleForm.suitway = |
| | | this.ruleForm.suitway.length != 0 |
| | | ? this.ruleForm.suitway.join(",") |
| | | : ""; |
| | | this.ruleForm.hetype = 2; // éç¥ç±»å |
| | | |
| | | addrichText({ |
| | | content: this.content, |
| | | fileName: this.fileName ? this.fileName : "æµè¯.html", |
| | | }).then((res) => { |
| | | this.ruleForm.richText = res.msg; |
| | | if (this.id) { |
| | | this.ruleForm.isoperation = 2; |
| | | compilelibrary(this.ruleForm).then((res) => { |
| | | 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) => { |
| | | } |
| | | }); |
| | | } 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); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // ä¿åç¾ç
|
| | | confirmillness(guid) { |
| | |
| | | if (guid) { |
| | | item.outid = guid; |
| | | } else { |
| | | console.log(this.ruleForm); |
| | | item.outid = this.ruleForm.id; |
| | | } |
| | | item.icd10name = item.icdname; |
| | |
| | | }); |
| | | 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() { |
| | |
| | | ); |
| | | if (!condition) { |
| | | listDept({ deptId: item }).then((res) => { |
| | | console.log("dept"); |
| | | res.data[0].type = 2; |
| | | this.ruleForm.tempDetpRelevances.push(res.data[0]); |
| | | }); |
| | |
| | | setTimeout(() => { |
| | | this.submitForm(); |
| | | }, 1000); |
| | | // this.submitForm(); |
| | | }, |
| | | // ä¿åé¢ç®ä¿¡æ¯ |
| | | Saveproblem() {}, |
| | | /** æ¥è¯¢é¢ç®å表 */ |
| | | |
| | | // æ°å¢åé |
| | | addvariable() { |
| | | this.variablelist.push({ |
| | |
| | | delvariable(item) { |
| | | const index = this.variablelist.indexOf(item); |
| | | if (index !== -1) { |
| | | this.variablelist.splice(index, 1); // ä»ç´¢å¼ä½ç½®å é¤ä¸ä¸ªå
ç´ |
| | | this.variablelist.splice(index, 1); |
| | | } else { |
| | | console.log("æªæ¾å°è¯¥å¯¹è±¡"); |
| | | } |
| | | }, |
| | | // æ§å¶æä»¶ |
| | | handleChange(file, fileList) { |
| | | this.fileList = fileList.slice(-3); |
| | | }, |
| | | // æ ç¾----------------- |
| | | // æ ç¾ç¸å
³æ¹æ³ |
| | | gettabList() { |
| | | const tagqueryParams = { |
| | | pageNum: 1, |
| | |
| | | }); |
| | | }, |
| | | 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; |
| | | }, |
| | |
| | | showInput() { |
| | | this.inputVisible = true; |
| | | }, |
| | | // ç¾ç
----------------------- |
| | | // ç¾ç
ç¸å
³æ¹æ³ |
| | | illnessUpdate() { |
| | | if (this.id) { |
| | | getillness({ outid: this.$route.query.id, type: 6 }).then((res) => { |
| | |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | // -------------------------- |
| | | |
| | | // é¢è§æ¨¡æ¿ |
| | | 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("ä¸ä¼ æå"); |
| | | // this.$emit('upload',res, file) |
| | | console.log(res, file); |
| | | //æ¼æ¥åºä¸ä¼ çå¾ç卿å¡å¨ç宿´å°å |
| | | let imgUrl = res.url; |
| | | let type = imgUrl.substring(imgUrl.lastIndexOf(".") + 1); |
| | | console.log(type); |
| | | // è·å坿æ¬ç»ä»¶å®ä¾ |
| | | let quill = this.$refs.customQuillEditor.quill; |
| | | // è·åå
æ æå¨ä½ç½® |
| | | let length = quill.getSelection().index; |
| | | // æå
¥å¾ç||è§é¢ res.info为æå¡å¨è¿åçå¾çå°å |
| | | if (type == "mp4" || type == "MP4") { |
| | | 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); |
| | | }, |
| | | // ä¸ä¼ å¾çæå |
| | | uploadEditorSuccessword(res, file) { |
| | | console.log("ä¸ä¼ æå"); |
| | | const data = null; |
| | | console.log(res, file, "word"); |
| | | axios |
| | | .get(res.url) |
| | | .then((response) => { |
| | | console.log(response.data, "æ°æ®"); // è¾åºè·åå°çæä»¶å
容 |
| | | this.content = response.data; |
| | | this.texturl = res.url; |
| | | this.fileName = this.getFileNameFromPath(res.url); |
| | | }) |
| | | .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(res.url); |
| | | }) |
| | | .catch((error) => { |
| | | console.error("Failed to fetch file:", error); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .Questionnairemanagement { |
| | | // display: flex; |
| | | } |
| | | .sidecolumn { |
| | | // width: 300px; |
| | | // min-height: 100vh; |
| | | // text-align: center; |
| | | // display: flex; |
| | | // margin-top: 20px; |
| | | margin: 20px; |
| | | margin-bottom: 0; |
| | | padding: 20px; |
| | |
| | | -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 { |
| | | margin-bottom: 50px; |
| | | font-size: 20px; |
| | | span { |
| | | position: absolute; |
| | | right: 80px; |
| | | } |
| | | } |
| | | .demo-cascader { |
| | | margin-right: 20px; |
| | | } |
| | | .PreviewTemplate { |
| | | color: #02a7f0; |
| | | cursor: pointer; |
| | | font-size: 20px; |
| | | margin: 0 20px; |
| | | font-size: 24px; |
| | | height: 30px; |
| | | border-left: 3px solid #41a1be; |
| | | padding-left: 3px; |
| | | } |
| | | } |
| | | |
| | | .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; |
| | |
| | | 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 { |
| | | |
| | | ::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 { |
| | | |
| | | ::v-deep.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; |
| | | } |
| | | } |
| | | .editor { |
| | | line-height: normal !important; |
| | | height: 600px; |
| | | margin-bottom: 80px; |
| | | } |
| | | .ql-snow .ql-tooltip[data-mode="link"]::before { |
| | | content: "请è¾å
¥é¾æ¥å°å:"; |
| | | } |
| | | .ql-snow .ql-tooltip.ql-editing a.ql-action::after { |
| | | border-right: 0px; |
| | | content: "ä¿å"; |
| | | padding-right: 0px; |
| | | } |
| | | |
| | | .ql-snow .ql-tooltip[data-mode="video"]::before { |
| | | content: "请è¾å
¥è§é¢å°å:"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item::before { |
| | | content: "14px"; |
| | | } |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { |
| | | content: "10px"; |
| | | } |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { |
| | | content: "18px"; |
| | | } |
| | | .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, |
| | | .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { |
| | | content: "32px"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item::before { |
| | | content: "ææ¬"; |
| | | } |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { |
| | | content: "æ é¢1"; |
| | | } |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { |
| | | content: "æ é¢2"; |
| | | } |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { |
| | | content: "æ é¢3"; |
| | | } |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { |
| | | content: "æ é¢4"; |
| | | } |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { |
| | | content: "æ é¢5"; |
| | | } |
| | | .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, |
| | | .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { |
| | | content: "æ é¢6"; |
| | | } |
| | | |
| | | .ql-snow .ql-picker.ql-font .ql-picker-label::before, |
| | | .ql-snow .ql-picker.ql-font .ql-picker-item::before { |
| | | content: "æ ååä½"; |
| | | } |
| | | .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before, |
| | | .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { |
| | | content: "衬线åä½"; |
| | | } |
| | | .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before, |
| | | .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { |
| | | content: "ç宽åä½"; |
| | | } |
| | | </style> |
| | |
| | | icon="el-icon-plus" |
| | | size="medium" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:user:add']" |
| | | >æ°å¢</el-button |
| | | > |
| | | </el-col> |