sinake
2025-08-14 ba4eee2e5ced6aef3e85a7c7b8317817b7ad3cae
Merge branch 'lishui-Smartor' of http://116.62.18.175:6699/r/~yxh/smartor-web

# Conflicts:
# src/views/followvisit/discharge/index.vue
# src/views/knowledge/questionbank/particulars/index.vue
# src/views/knowledge/questionnaire/compilequer/index.vue
# src/views/sfstatistics/percentage/index.vue
已删除2个文件
已添加7个文件
已修改33个文件
7765 ■■■■■ 文件已修改
dist-wl.zip 补丁 | 查看 | 原始文档 | blame | 历史
dist.zip 补丁 | 查看 | 原始文档 | blame | 历史
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/AiCentre/EChartsdata.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/AiCentre/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/AiCentre/satisfaction.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/user.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Assistant/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/CallButton/index.vue 294 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/getters.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/sipService-bd.js 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/sipService.js 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/SpecificDisease/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/again/index.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/outpatientService.vue 1808 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/index.vue 255 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/physical/index.vue 1433 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/satisfaction/index.vue 667 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/technology/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/zbAgain/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue 252 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/education/compilequer/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/follow/index.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/medtechnician/Compositeeditdetails.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/medtechnician/SpecializedService.vue 1315 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/patient/behospitalized.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/patient/hospital.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/patient/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/patient/outpatient.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/Missioncreation.vue 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/QuestionnaireTask.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/particty copy.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/questionnaire/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/shadow/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/subsequent/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/repositoryai/general/particulars/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/repositoryai/templateku/configurat/measurement.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/shortmessage/healthinformation/compilequer/index.vue 713 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/shortmessage/healthinformation/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dist-wl.zip
Binary files differ
dist.zip
Binary files differ
package.json
@@ -60,6 +60,7 @@
    "js-beautify": "1.13.0",
    "js-cookie": "3.0.1",
    "jsencrypt": "^3.3.2",
    "jssip": "^3.10.1",
    "lemon-imui": "^1.7.7",
    "moment": "^2.30.1",
    "nprogress": "0.2.0",
src/api/AiCentre/EChartsdata.js
@@ -25,6 +25,14 @@
    data: data,
  });
}
// é¦–页中部数据
export function getServiceStatistics(data) {
  return request({
    url: "/smartor/serviceSubtask/getServiceStatistics",
    method: "post",
    data: data,
  });
}
// æŸ¥è¯¢æ‚£è€…住院记录列表
export function getechartsMedInhospList(data) {
  return request({
src/api/AiCentre/index.js
@@ -9,3 +9,4 @@
export * from './external'
export * from './patientexternal'
export * from './EChartsdata'
export * from './satisfaction'
src/api/AiCentre/satisfaction.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi"; //处理字符串
// æŸ¥è¯¢æ»¡æ„åº¦åˆ—表
export function listsatisfaction(query) {
  return request({
    url: "/smartor/satisfaction/list",
    method: "post",
    data: query,
  });
}
// æ‰¹é‡æ–°å¢žæ»¡æ„åº¦
export function addsatisfaction(data) {
  return request({
    url: "/smartor/satisfaction/batchinsert",
    method: "post",
    data: data,
  });
}
// ä¿®æ”¹æ»¡æ„åº¦
export function updatesatisfaction(data) {
  return request({
    url: "/smartor/satisfaction/edit",
    method: "post",
    data: data,
  });
}
// åˆ é™¤æ»¡æ„åº¦
export function delsatisfaction(satisfactionId) {
  return request({
    url: "/smartor/satisfaction/remove/" + satisfactionId,
    method: "get",
  });
}
src/api/system/user.js
@@ -86,7 +86,7 @@
    data: data,
  });
}
// ä¿®æ”¹ç”¨æˆ·ä¸ªäººä¿¡æ¯
// ç»Ÿè®¡æŸ¥è¯¢
export function getSfStatistics(data) {
  return request({
    url: "/smartor/serviceSubtask/getSfStatistics",
@@ -94,6 +94,14 @@
    data: data,
  });
}
// æœªåŠæ—¶æŸ¥è¯¢
export function selectTimelyRate(data) {
  return request({
    url: "/smartor/servicetask/selectTimelyRate",
    method: "post",
    data: data,
  });
}
// ç”¨æˆ·å¯†ç é‡ç½®
export function updateUserPwd(oldPassword, newPassword) {
src/components/Assistant/index.vue
@@ -361,7 +361,7 @@
  display: block;
  background: black;
  background: -webkit-radial-gradient(100px 100px, circle, #5788fe, #292929);
  background: -webkit-radial-gradient(100px 100px, circle, #5788FE, #292929);
  //   background: -moz-radial-gradient(100px 100px, circle, #35a1a1, #000);Firefox æµè§ˆå™¨çš„实现
  //   background: radial-gradient(100px 100px, circle, #35a1a1, #000);标准 HTML5 å±žæ€§
  margin: 0;
src/components/CallButton/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,294 @@
<template>
  <div class="call-container">
    <div class="sip-status" :class="sipStatusClass">
      SIP状态: {{ sipStatus }}
    </div>
    <!-- çŠ¶æ€æ˜¾ç¤º -->
    <div class="call-status" :class="callStatusClass">
      {{ callStatusText }}
    </div>
    <!-- å‘¼å«æŒ‰é’® -->
    <button
      :class="['call-btn', { calling: isCalling }]"
      @click="startCall"
      :disabled="isCalling || sipStatus !== '已注册'"
    >
      {{ callButtonText }}
    </button>
    <!-- æŒ‚断按钮 -->
    <button v-if="isCalling" class="end-call-btn" @click="endCall">挂断</button>
    <!-- éŸ³é¢‘元素(隐藏) -->
    <audio id="remoteAudio" autoplay></audio>
  </div>
</template>
<script>
import sipService from "@/utils/sipService";
export default {
  props: {
    phoneNumber: {
      type: String,
      default: "",
    },
  },
  data() {
    const randomNum = Math.floor(Math.random() * 11) + 1000; // å†…部定义
    return {
      isCalling: false,
      callStatus: "idle", // idle, calling, connected, ended
      sipStatus: "未连接",
      sipStatusClass: "status-disconnected",
      sipConfig: {
        wsUrl: "wss://192.168.10.124:7443",
        sipUri: `${randomNum}` + "@192.168.10.124",
        password: "Smartor@2023",
        displayName: "Web å°é¾™",
      },
    };
  },
  computed: {
    callStatusText() {
      const statusMap = {
        idle: "准备就绪",
        calling: "呼叫中...",
        connected: "通话中",
        ended: "通话结束",
      };
      return statusMap[this.callStatus];
    },
    callStatusClass() {
      return `status-${this.callStatus}`;
    },
    callButtonText() {
      return this.isCalling ? "通话中..." : "一键呼叫";
    },
  },
  mounted() {
    sipService.init(this.sipConfig);
    sipService.onStatusChange = (status) => {
      this.sipStatus = status.text;
      this.sipStatusClass = `status-${status.type}`;
    };
    // ç›‘听通话状态变化
    sipService.onCallStatusChange = (status) => {
      this.callStatus = status.type;
      this.isCalling = status.type === "calling" || status.type === "connected";
      // é€šçŸ¥çˆ¶ç»„件通话状态变化
      this.$emit("call-status-change", status);
    };
  },
  methods: {
    async startCall() {
      if (!this.phoneNumber) {
        this.$message.error("请输入电话号码");
        return;
      }
      try {
        this.callStatus = "calling";
        this.isCalling = true;
        await sipService.makeCall(this.phoneNumber);
      } catch (error) {
        console.error("呼叫失败:", error);
        this.callStatus = "ended";
        this.isCalling = false;
        this.$message.error(`呼叫失败: ${error.message}`);
      }
    },
    endCall() {
      sipService.endCall();
      this.callStatus = "ended";
      this.isCalling = false;
    },
  },
};
</script>
<style scoped>
.call-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
}
input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.call-btn {
  padding: 10px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.call-status {
  padding: 8px;
  margin: 10px 0;
  border-radius: 4px;
  text-align: center;
}
.status-idle {
  background-color: #f5f5f5;
  color: #666;
}
.status-calling {
  background-color: #fff8e1;
  color: #ff8f00;
}
.status-connected {
  background-color: #e8f5e9;
  color: #2e7d32;
}
.status-ended {
  background-color: #ffebee;
  color: #c62828;
}
/* åŽŸæœ‰æ ·å¼ä¿æŒä¸å˜ */
.call-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
}
.call-btn {
  padding: 10px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.call-btn:hover:not(:disabled) {
  background-color: #45a049;
}
.call-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}
.call-btn.calling {
  background-color: #2196f3;
}
.end-call-btn {
  padding: 10px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.end-call-btn:hover {
  background-color: #d32f2f;
}
.sip-status {
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  text-align: center;
}
.status-disconnected {
  background-color: #ffebee;
  color: #c62828;
}
.status-connecting {
  background-color: #fff8e1;
  color: #ff8f00;
}
.status-registered {
  background-color: #e8f5e9;
  color: #2e7d32;
}
.status-failed {
  background-color: #ffebee;
  color: #c62828;
}
.call-btn:hover {
  background-color: #45a049;
}
.call-btn.calling {
  background-color: #2196f3;
}
.end-call-btn {
  padding: 10px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.end-call-btn:hover {
  background-color: #d32f2f;
}
.call-status {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}
.sip-status {
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  text-align: center;
}
.status-disconnected {
  background-color: #ffebee;
  color: #c62828;
}
.status-connecting {
  background-color: #fff8e1;
  color: #ff8f00;
}
.status-registered {
  background-color: #e8f5e9;
  color: #2e7d32;
}
.status-failed {
  background-color: #ffebee;
  color: #c62828;
}
</style>
src/store/getters.js
@@ -8,6 +8,7 @@
  token: (state) => state.user.token,
  avatar: (state) => state.user.avatar,
  name: (state) => state.user.name,
  nickName: (state) => state.user.nickName,
  Id: (state) => state.user.Id,
  introduction: (state) => state.user.introduction,
  roles: (state) => state.user.roles,
src/store/modules/user.js
@@ -5,6 +5,7 @@
  state: {
    token: getToken(),
    name: '',
    nickName:'',
    Id: '',
    avatar: '',
    hisUserId:'',
@@ -87,6 +88,9 @@
    SET_NAME: (state, name) => {
      state.name = name
    },
    SET_nickNAME: (state, name) => {
      state.nickName = name
    },
    SET_Id: (state, Id) => {
      state.Id = Id
      console.log(state.Id,'user2');
@@ -140,11 +144,19 @@
          localStorage.setItem('deptCode', '01040201');
          }else if (orgid=='47246102433112211A2101') {
          localStorage.setItem('orgname', '缙云县中医医院');
          localStorage.setItem('ZuHuID', '1400360867068907520');
          localStorage.setItem('ZuHuID', '1429338802177000002');
          localStorage.setItem('deptCode', '');
          }else if (orgid=='47240018433118111A2101') {
          localStorage.setItem('orgname', '龙泉市中医医院');
          localStorage.setItem('ZuHuID', '1400360867068907520');
          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', '');
          }
          resolve()
@@ -168,6 +180,7 @@
            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)
src/utils/sipService-bd.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,200 @@
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();
src/utils/sipService.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,216 @@
import JsSIP from "jssip";
class SipService {
  constructor() {
    this.ua = null;
    this.currentSession = null;
    this.onStatusChange = null;
    this.onCallStatusChange = null;
    this.onIncomingCall = null;
  }
  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: [],
        register: true,
        sessionExpires: 1800,
        minSessionExpires: 90,
        register_expires: 300,
      });
      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("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;
    }
  }
  makeCall(targetNumber) {
    return new Promise((resolve, reject) => {
      try {
        if (!this.ua) {
          throw new Error("SIP客户端未初始化");
        }
        if (!this.ua.isRegistered()) {
          throw new Error("SIP未注册,无法呼叫");
        }
        const options = {
          sessionTimers: true, // å¯ç”¨ä¼šè¯è®¡æ—¶å™¨
          sessionTimersExpires: 90,
          extraHeaders: ["Accept: application/sdp"],
          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.10.124`,
          options
        );
        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;
        }
      };
    });
  }
  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 = `呼叫失败: ${e.cause || e.message}`;
    }
    this.updateCallStatus("failed55", errorMessage);
    reject(new Error(errorMessage));
  }
  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;
    }
  }
  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();
src/views/followvisit/SpecificDisease/index.vue
@@ -842,10 +842,10 @@
          name: "待发送",
          value: 0,
        },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "已发送未领取",
@@ -986,7 +986,7 @@
          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.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
src/views/followvisit/again/index.vue
@@ -644,7 +644,17 @@
            </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="过滤原因">
@@ -929,10 +939,10 @@
          name: "待随访",
          value: 0,
        },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
@@ -1157,7 +1167,7 @@
          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.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1237,7 +1247,7 @@
          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.cardlist[5].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1590,6 +1600,7 @@
    handleUpdate(row) {
      particularpatient(row.patid).then((response) => {
        this.form = response.data;
        this.form.filterDrname = store.getters.nickName;
      });
      this.amendtag = true;
      this.Labelchange = true;
src/views/followvisit/discharge/outpatientService.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1808 @@
<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="updateBy">
          <el-input
            v-model="topqueryParams.updateBy"
            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"
            plain
            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="随访人员"
          align="center"
          key="updateBy"
          prop="updateBy"
          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="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="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: [],
      previewtype: 2, //预览影像随访类型
      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: "发送时间(倒序)",
        },
      ],
      // æŸ¥è¯¢å‚æ•°
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        sendstate: null,
        sort: 2, //0 å‡ºé™¢æ—¶é—´(正序)    1 å‡ºé™¢æ—¶é—´(倒序)   2 å‘送时间(正序)    3 å‘送时间(倒序)
        serviceType: 3,
        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: "1400466972205912064",
            YongHuXM: "JNRMYY",
            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.drcode = store.getters.hisUserId;
      this.topqueryParams.nurseId = 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: 2,
        sort: 2, //0 å‡ºé™¢æ—¶é—´(正序)    1 å‡ºé™¢æ—¶é—´(倒序)   2 å‘送时间(正序)    3 å‘送时间(倒序)
        serviceType: 3,
        searchscope: 3,
        visitCount: 1,
        scopetype: [],
        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.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.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.preachformson) {
        if (row.preachformson.includes("3")) {
          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.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: #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;
  }
}
// é€‰é¡¹å­—体放大
// ::v-deep.el-checkbox-group {
//   span {
//     font-size: 24px;
//   }
// }
</style>
src/views/followvisit/record/detailpage/index.vue
@@ -206,7 +206,12 @@
    </div>
    <div class="Followuserinfos">
      <div>
        <el-form ref="form" :model="form" label-width="120px">
        <el-form
          ref="userform"
          :model="form"
          :rules="userrules"
          label-width="120px"
        >
          <div class="headline">
            <div>人工处理</div>
            <el-row :gutter="20">
@@ -215,6 +220,13 @@
                  <el-input
                    placeholder="联系电话缺失"
                    v-model="userform.telcode"
                  >
                    <el-button
                      slot="append"
                      icon="el-icon-phone"
                      @click="handleCall(userform.telcode, 'tel')"
                      :disabled="!isValidPhone(userform.telcode)"
                    ></el-button
                  ></el-input> </el-form-item
              ></el-col>
              <el-col :span="8"
@@ -222,6 +234,13 @@
                  <el-input
                    placeholder="联系人电话缺失"
                    v-model="userform.relativetelcode"
                  >
                    <el-button
                      slot="append"
                      icon="el-icon-phone"
                      @click="handleCall(userform.relativetelcode, 'relative')"
                      :disabled="!isValidPhone(userform.relativetelcode)"
                    ></el-button
                  ></el-input> </el-form-item
              ></el-col>
              <el-col :span="8"
@@ -232,13 +251,37 @@
                  ></el-input> </el-form-item
              ></el-col>
            </el-row>
            <div style="margin-left: 30px">
              <el-button type="primary" plain @click="Editsingletasksonyic('')"
                >保存服务</el-button
              >
            </div>
          </div>
          <el-row :gutter="20" v-if="callStatus !== 'idle'">
            <el-col :span="24">
              <el-alert
                :title="callStatusText"
                :type="callStatusType"
                :closable="false"
                show-icon
              />
            </el-col>
          </el-row>
          <!-- æŒ‚断按钮(仅在通话中显示) -->
          <el-row :gutter="20" v-if="callStatus === 'connected'">
            <el-col :span="24" style="text-align: center; margin-top: 10px">
              <el-button
                type="danger"
                icon="el-icon-phone"
                @click="endCurrentCall"
                :loading="isEndingCall"
              >
                æŒ‚断电话
              </el-button>
            </el-col>
          </el-row>
          <el-form-item label="随访记录">
            <el-input type="textarea" v-model="form.remark"></el-input>
          </el-form-item>
@@ -343,6 +386,14 @@
          </el-collapse-item>
        </el-collapse>
      </div>
    </div>
    <div>
      <h2>一键呼叫功能</h2>
      <CallButton
        ref="callButton"
        :phoneNumber="currentPhoneNumber"
        style="display: none"
      />
    </div>
    <div>
      <el-tabs v-model="activeName" type="border-card">
@@ -671,7 +722,7 @@
                allow-create
                default-first-option
                @change="visitChange"
                placeholder="请选择随访方式"
                placeholder="请选择随访方式(依出院时间技计算)"
              >
                <el-option
                  v-for="item in options"
@@ -691,6 +742,7 @@
                :picker-options="pickerOptions"
                align="right"
                v-model="form.date1"
                class="custom-disabled"
              ></el-date-picker>
            </el-form-item>
          </el-col>
@@ -735,11 +787,34 @@
  alterpatient,
  listcontactinformation,
} from "@/api/patient/homepage";
import CallButton from "@/components/CallButton";
export default {
  components: {
    CallButton,
  },
  dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
  data() {
    const validatePhone = (rule, value, callback) => {
      if (!value) {
        return callback(new Error("请输入联系电话"));
      }
      setTimeout(() => {
        if (!/^1[3-9]\d{9}$/.test(value)) {
          callback(new Error("请输入正确的11位手机号码"));
        } else {
          callback();
        }
      }, 300);
    };
    return {
      userid: "",
      currentPhoneNumber: "",
      callType: "", // ç”¨äºŽåŒºåˆ†æ˜¯å“ªä¸ªç”µè¯
      // å·²æœ‰æ•°æ®...
      callStatus: "idle", // idle, calling, connected, ended, failed
      isEndingCall: false,
      currentCall: null, // å½“前通话对象
      input: "今天身体还不错",
      radio: "2",
      taskname: "",
@@ -757,6 +832,10 @@
          { required: true, message: "请选择随访方式", trigger: "change" },
        ],
        date1: [{ required: true, message: "请选择随访时间", trigger: "blur" }],
      },
      userrules: {
        telcode: [{ validator: validatePhone, trigger: "blur" }],
        relativetelcode: [{ validator: validatePhone, trigger: "blur" }],
      },
      url: "http://9.208.2.190:8090/smartor/serviceExternal/query360PatInfo",
      postData: {
@@ -793,6 +872,10 @@
        },
      },
      pickerOptions: {
        disabledDate(time) {
          // ç¦ç”¨ä»Šå¤©åŠä¹‹å‰çš„æ—¥æœŸ
          return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
        },
        shortcuts: [
          {
            text: "七天后",
@@ -884,7 +967,28 @@
      patid: null,
    };
  },
  computed: {
    callStatusText() {
      const statusMap = {
        idle: "准备呼叫",
        calling: `正在呼叫 ${this.currentPhoneNumber}...`,
        connected: `已接通 ${this.currentPhoneNumber}`,
        ended: "通话已结束",
        failed: "呼叫失败",
      };
      return statusMap[this.callStatus];
    },
    callStatusType() {
      const typeMap = {
        idle: "info",
        calling: "warning",
        connected: "success",
        ended: "info",
        failed: "error",
      };
      return typeMap[this.callStatus];
    },
  },
  created() {
    this.taskid = this.$route.query.taskid;
    this.id = this.$route.query.id;
@@ -979,17 +1083,29 @@
      // æ ¹æ®é€‰æ‹©çš„随访方式设置时间
      const now = new Date();
      if (value.includes("七天后")) {
        this.form.date1 = new Date(now.getTime() + 3600 * 1000 * 24 * 7);
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 7
        );
      } else if (value.includes("15天后")) {
        this.form.date1 = new Date(now.getTime() + 3600 * 1000 * 24 * 15);
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 15
        );
      } else if (value.includes("一个月后")) {
        this.form.date1 = new Date(now.getTime() + 3600 * 1000 * 24 * 30);
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 30
        );
      } else if (value.includes("三个月后")) {
        this.form.date1 = new Date(now.getTime() + 3600 * 1000 * 24 * 90);
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 90
        );
      } else if (value.includes("六个月后")) {
        this.form.date1 = new Date(now.getTime() + 3600 * 1000 * 24 * 180);
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 180
        );
      } else if (value.includes("一年后")) {
        this.form.date1 = new Date(now.getTime() + 3600 * 1000 * 24 * 365);
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 365
        );
      }
    },
@@ -1123,10 +1239,10 @@
                    path: "/logisticsservice/record",
                  });
                }
              } else if (form.serviceType == 2) {
              } else if (this.form.serviceType == 2) {
                if (this.visitCount) {
                  this.$router.push({
                    path: "/followvisit/again",
                    path: "/logisticsservice/again",
                  });
                } else {
                  this.$router.push({
@@ -1140,6 +1256,96 @@
          // å¦‚果有任何一个异步操作失败,会进入这里
          console.error("发生错误:", error);
        });
    },
    // éªŒè¯ç”µè¯å·ç æ ¼å¼å¹¶è¿”回错误信息
validatePhoneNumber(phone) {
  if (!phone) {
    return { isValid: false, message: '请输入电话号码' };
  }
  // æ‰‹æœºå·æ­£åˆ™
  const mobileRegex = /^1[3-9]\d{9}$/;
  // å¸¦åŒºå·çš„固定电话(完整格式)
  const landlineFullRegex = /^0\d{2,3}-?\d{7,8}$/;
  // ä¸å¸¦åŒºå·çš„固定电话(仅本地号码)
  const landlineLocalRegex = /^\d{7,8}$/;
  if (mobileRegex.test(phone)) {
    return { isValid: true, type: 'mobile' };
  } else if (landlineFullRegex.test(phone)) {
    return { isValid: true, type: 'landline' };
  } else if (landlineLocalRegex.test(phone)) {
    return {
      isValid: false,
      message: '本地号码请添加区号(如028-1234567)'
    };
  } else {
    return {
      isValid: false,
      message: '请输入正确的电话号码(手机号或带区号的固定电话)'
    };
  }
},
// ä½¿ç”¨ç¤ºä¾‹
isValidPhone(phone) {
  return this.validatePhoneNumber(phone).isValid;
},
    handleCall(phone, type) {
      if (!this.isValidPhone(phone)) {
        this.$message.error("请输入正确的手机号码");
        return;
      }
      this.currentPhoneNumber = phone;
      this.callType = type;
      this.callStatus = "calling";
      this.$nextTick(() => {
        this.$refs.callButton.startCall();
        // ç›‘听通话状态变化
        this.$refs.callButton.$on("call-status-change", (status) => {
          this.handleCallStatusChange(status);
        });
      });
    },
    // å¤„理通话状态变化
    handleCallStatusChange(status) {
      console.log(status,'status');
      this.callStatus = status.type;
      if (status.type === "connected") {
        this.currentCall = {
          phone: this.currentPhoneNumber,
          type: this.callType,
          startTime: new Date(),
        };
      } else if (status.type === "ended" || status.type === "failed") {
        this.currentCall = null;
      }
      // å¯ä»¥æ ¹æ®çŠ¶æ€æ‰§è¡Œå…¶ä»–æ“ä½œ
      if (status.type === "failed") {
        this.$message.error(`呼叫失败: ${status.text}`);
      }
    },
    // ç»“束当前通话
    endCurrentCall() {
      if (!this.currentCall) return;
      this.isEndingCall = true;
      this.$refs.callButton.endCall();
      // 3秒后重置状态
      setTimeout(() => {
        this.isEndingCall = false;
      }, 3000);
    },
    yuyingetdetail() {
      this.tableDatatop.forEach((item, index) => {
@@ -1186,7 +1392,7 @@
            })
            .catch(() => {
              if (this.form.serviceType == 13) {
                if (this.visitCount) {
                if (this.visitCount != 1) {
                  this.$router.push({
                    path: "/logisticsservice/zbAgain",
                  });
@@ -1196,7 +1402,7 @@
                  });
                }
              } else if (form.serviceType == 2) {
                if (this.visitCount) {
                if (this.visitCount != 1) {
                  this.$router.push({
                    path: "/followvisit/again",
                  });
@@ -1232,11 +1438,12 @@
          this.form = res.rows[0].serviceSubtaskList.find(
            (item) => item.id == this.id
          );
          console.log(this.form.serviceType, "serviceType");
          this.logsheetlist = res.rows[0].serviceSubtaskList;
          this.templateid = this.logsheetlist[0].templateid;
          const targetDate = new Date(this.form.longSendTime); // ç›®æ ‡æ—¥æœŸ
          const now = new Date(); // å½“前时间
          this.form.endtime = this.formatTime(this.form.endtime);
          if (now < targetDate && this.form.sendstate == 2) {
            this.$confirm("当前服务未到发送时间请谨慎修改", "提示", {
              confirmButtonText: "确定",
@@ -1388,7 +1595,6 @@
          form.finishtime = "";
          if (form.resource) {
            if (form.resource == 2) {
              form.serviceType = 13;
              form.visitDeptCode = localStorage.getItem("deptCode");
              form.visitDeptName = "随访中心";
            } else {
@@ -1401,16 +1607,18 @@
          }
          // form.id = null;
          form.sendstate = 2;
          console.log(form.serviceType, "form.serviceType");
          addserviceSubtask(form).then((res) => {
            if (res.code == 200) {
              this.$modal.msgSuccess("创建成功");
              if (form.serviceType == 13) {
                this.$router.push({
                  path: "/logisticsservice/again",
                  path: "/logisticsservice/zbAgain",
                });
              } else if (form.serviceType == 2) {
                this.$router.push({
                  path: "/logisticsservice/zbAgain",
                  path: "/logisticsservice/again",
                });
              }
            } else {
@@ -1614,6 +1822,19 @@
  background-color: #f57676;
  border-color: #f57676;
}
.el-icon-phone {
  transition: all 0.3s;
}
.el-button[disabled] .el-icon-phone {
  color: #c0c4cc;
}
.el-button:not([disabled]) .el-icon-phone {
  color: #409eff;
}
.el-button:not([disabled]):hover .el-icon-phone {
  color: #66b1ff;
  transform: scale(1.1);
}
.mulsz {
  font-size: 25px;
  margin-top: 20px;
src/views/followvisit/record/index.vue
@@ -879,10 +879,10 @@
          name: "待随访",
          value: 0,
        },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
@@ -1049,7 +1049,7 @@
          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.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1127,7 +1127,7 @@
          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.cardlist[5].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
src/views/followvisit/record/physical/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1433 @@
<template>
  <!-- èŠè¿žé¡µé¢è®°å½• -->
  <div class="Followupdetailspage" id="app-container">
    <div class="Followuserinfo">
      <div>
        <div class="userinfo-text">
          <!-- <span>患者服务详情</span> -->
          <div class="headline">
            <div>患者服务详情</div>
            <div style="margin-left: 20px">
              <el-button
                v-if="!Whetherall"
                type="primary"
                @click="getTaskservelist()"
                >查看患者全部服务</el-button
              >
              <el-button v-else type="success" @click="getTaskservelist(id)"
                >只展示本次服务信息</el-button
              >
            </div>
            <div style="margin-left: 20px; color: #59a0f0">
              <el-link
                href="https://9.208.2.207:6060/search-homepage"
                target="_blank"
                :underline="true"
              >
                å‰å¾€CDSS查询
              </el-link>
            </div>
          </div>
          <!-- <el-button type="success">随访后短信</el-button> -->
        </div>
      </div>
      <div>
        <el-table
          :data="logsheetlist"
          :row-class-name="tableRowClassName"
          style="width: 100%"
        >
          <el-table-column
            prop="sendname"
            align="center"
            label="姓名"
            width="100"
          >
            <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
            prop="taskName"
            align="center"
            width="200"
            show-overflow-tooltip
            label="任务名称"
          >
          </el-table-column>
          <el-table-column
            prop="sendstate"
            align="center"
            width="200"
            label="任务状态"
          >
            <template slot-scope="scope">
              <div v-if="scope.row.sendstate == 1">
                <el-tag type="primary" :disable-transitions="false"
                  >表单已领取</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 2">
                <el-tag type="primary" :disable-transitions="false"
                  >待随访</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 3">
                <el-tag type="success" :disable-transitions="false"
                  >表单已发送</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 4">
                <el-tag type="info" :disable-transitions="false">不执行</el-tag>
              </div>
              <div v-if="scope.row.sendstate == 5">
                <el-tag type="danger" :disable-transitions="false"
                  >发送失败</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 6">
                <el-tag type="success" :disable-transitions="false"
                  >已完成</el-tag
                >
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="finishtime"
            align="center"
            label="随访完成时间"
            width="200"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column
            label="出院日期"
            width="200"
            align="center"
            key="endtime"
            prop="endtime"
          >
            <template slot-scope="scope">
              <span>{{ formatTime(scope.row.endtime) }}</span>
            </template></el-table-column
          >
          <el-table-column
            label="责任护士"
            width="120"
            align="center"
            key="nurseName"
            prop="nurseName"
          />
          <el-table-column
            label="主治医生"
            width="120"
            align="center"
            key="drname"
            prop="drname"
          />
          <el-table-column
            label="结果状态"
            align="center"
            key="excep"
            prop="excep"
            width="120"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_yujing"
                :value="scope.row.excep"
              />
            </template>
          </el-table-column>
          <el-table-column
            label="处理意见"
            align="center"
            key="suggest"
            prop="suggest"
            width="120"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_suggest"
                :value="scope.row.suggest"
              />
            </template>
          </el-table-column>
          <el-table-column
            prop="templatename"
            align="center"
            label="服务模板"
            width="200"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column
            prop="remark"
            align="center"
            label="服务记录"
            width="200"
            show-overflow-tooltip
          >
          </el-table-column>
          <el-table-column
            prop="bankcardno"
            align="center"
            label="呼叫状态"
            width="210"
          >
          </el-table-column>
          <el-table-column
            label="操作"
            fixed="right"
            align="center"
            width="200"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                @click="Seedetails(scope.row)"
                ><span class="button-zx"
                  ><i class="el-icon-s-order"></i>查看</span
                ></el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <div class="Followuserinfos">
      <div>
        <el-form
          ref="userform"
          :model="form"
          :rules="userrules"
          label-width="120px"
        >
          <div class="headline">
            <div>人工处理</div>
            <el-form-item label="联系电话">
              <el-input placeholder="联系电话缺失" v-model="form.phone">
                <el-button
                  slot="append"
                  icon="el-icon-phone"
                  @click="handleCall(form.phone, 'tel')"
                  :disabled="!isValidPhone(form.phone)"
                ></el-button
              ></el-input>
            </el-form-item>
          </div>
          <el-form-item label="随访记录">
            <el-input type="textarea" v-model="form.remark"></el-input>
          </el-form-item>
          <el-form-item label="处理意见">
            <div>
              <el-button plain type="warning" @click="Editsingletaskson('1')"
                >暂不处理</el-button
              >
              <el-button plain type="success" @click="Editsingletaskson('2')"
                >病情稳定</el-button
              >
              <el-button plain type="primary" @click="Editsingletaskson('3')"
                >通知就诊</el-button
              >
              <!-- <el-button type="danger" @click="Editsingletaskson('4')"
    >失访</el-button
  > -->
              <el-button plain type="info" @click="Editsingletaskson('5')"
                >中心随访</el-button
              >
              <el-button
                type="primary"
                round
                v-if="this.form.isVisitAgain != 2"
                @click="sendAgain()"
                >再次随访</el-button
              >
              <el-button type="success" @click="Editsingletasksonyic('')"
                >保存服务</el-button
              >
            </div>
          </el-form-item>
        </el-form>
        <!-- <el-collapse>
          <el-collapse-item title="查看当前患者信息" name="1">
            <div class="detailed">
              <el-form ref="userform" :model="userform" label-width="100px">
                <el-row :gutter="20">
                  <el-col :span="12">
                    <el-form-item label="患者姓名" prop="name">
                      <el-input
                        v-model="userform.name"
                        placeholder="请输入姓名"
                        maxlength="30"
                      ></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"
                        placeholder="请输入联系方式"
                        maxlength="20"
                      /> </el-form-item
                  ></el-col>
                  <el-col :span="12">
                    <el-form-item label="亲属联系方式" prop="name">
                      <el-input
                        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="birthplace">
                      <el-input
                        v-model="userform.birthplace"
                        placeholder="国、省、地市、区县、街道等详细信息"
                        maxlength="50"
                      /> </el-form-item
                  ></el-col>
                </el-row>
                <el-row :gutter="20">
                  <el-col :span="24"
                    ><el-form-item label="居住地" prop="placeOfResidence">
                      <el-input
                        v-model="userform.placeOfResidence"
                        placeholder="国、省、地市、区县、街道等详细信息"
                        maxlength="50"
                      /> </el-form-item
                  ></el-col>
                </el-row>
              </el-form>
            </div>
          </el-collapse-item>
        </el-collapse> -->
      </div>
    </div>
    <div>
      <CallButton
        ref="callButton"
        :phoneNumber="currentPhoneNumber"
        style="display: none"
      />
    </div>
    <el-dialog
      title="患者再次随访"
      v-dialogDrags
      :visible.sync="dialogFormVisible"
    >
      <el-form ref="zcform" :rules="zcrules" :model="form" label-width="80px">
        <el-form-item label="任务名称">
          <el-input
            style="width: 400px"
            disabled
            v-model="form.taskName"
          ></el-input>
        </el-form-item>
        <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="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
            style="width: 400px"
            disabled
            v-model="form.endtime"
          ></el-input>
        </el-form-item>
        <div class="headline">上次随访</div>
        <el-divider></el-divider>
        <el-row>
          <el-col :span="12">
            <el-form-item label="随访方式">
              <el-select
                v-model="form.visitType2"
                filterable
                allow-create
                default-first-option
                disabled
                placeholder="请选择随访方式"
                class="custom-disabled"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="随访时间">
              <el-date-picker
                type="date"
                disabled
                placeholder="选择日期"
                :picker-options="pickerOptions"
                align="right"
                v-model="form.date2"
                class="custom-disabled"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="随访记录">
          <el-input
            class="custom-disabled"
            type="textarea"
            disabled
            v-model="form.remark2"
          ></el-input>
        </el-form-item>
        <div class="headline">下次随访</div>
        <el-divider></el-divider>
        <el-row>
          <el-col :span="12">
            <el-form-item label="随访方式" prop="date1">
              <el-select
                v-model="form.visitType"
                filterable
                allow-create
                default-first-option
                @change="visitChange"
                placeholder="请选择随访方式(依出院时间技计算)"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="随访时间" prop="date1">
              <el-date-picker
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions"
                align="right"
                v-model="form.date1"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="随访方式" prop="resource">
          <el-radio-group v-model="form.resource">
            <el-radio label="1">本病区随访</el-radio>
            <el-radio label="2">随访中心随访</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="随访记录">
          <el-input type="textarea" v-model="form.remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="warning" @click="dialogFormVisible = false"
          >取 æ¶ˆ</el-button
        >
        <el-button type="primary" @click="setupsubtask">确认创建服务</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getsearchrResults,
  getPersonVoices,
  addserviceSubtask,
  getTaskservelist,
  getTaskFollowup,
  Editsingletaskson,
  serviceSubtaskDetailedit,
  serviceSubtaskDetailadd,
  updatePersonVoices,
  addPersonVoices,
  query360PatInfo,
} from "@/api/AiCentre/index";
import {
  messagelistpatient,
  alterpatient,
  listcontactinformation,
} from "@/api/patient/homepage";
import CallButton from "@/components/CallButton";
export default {
  components: {
    CallButton,
  },
  dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
  data() {
    const validatePhone = (rule, value, callback) => {
      if (!value) {
        return callback(new Error("请输入联系电话"));
      }
      setTimeout(() => {
        if (!/^1[3-9]\d{9}$/.test(value)) {
          callback(new Error("请输入正确的11位手机号码"));
        } else {
          callback();
        }
      }, 300);
    };
    return {
      userid: "",
      currentPhoneNumber: "",
      callType: "", // ç”¨äºŽåŒºåˆ†æ˜¯å“ªä¸ªç”µè¯
      input: "今天身体还不错",
      radio: "2",
      taskname: "",
      voice: "",
      templateid: "",
      again: "",
      zcform: {},
      form: {},
      tableDatatop: [], //题目表
      voiceDatatop: [], //题目表
      dynamicTags: [],
      zcrules: {
        resource: [
          { required: true, message: "请选择随访方式", trigger: "change" },
        ],
        date1: [{ required: true, message: "请选择随访时间", trigger: "blur" }],
      },
      userrules: {
        telcode: [{ validator: validatePhone, trigger: "blur" }],
        relativetelcode: [{ validator: validatePhone, trigger: "blur" }],
      },
      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: "1400466972205912064",
            YongHuXM: "JNRMYY",
            ZuZhiJGID: localStorage.getItem("orgid"),
            ZuZhiJGMC: localStorage.getItem("orgname"),
            idp: "lyra",
          },
        },
      },
      pickerOptions: {
        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: [
        {
          value: "七天后",
          label: "七天后",
        },
        {
          value: "15天后",
          label: "15天后",
        },
        {
          value: "一个月后",
          label: "一个月后",
        },
        {
          value: "三个月后",
          label: "三个月后",
        },
        {
          value: "六个月后",
          label: "六个月后",
        },
        {
          value: "一年后",
          label: "一年后",
        },
      ],
      userform: {},
      Whetherall: true, //是否全部记录展示
      dialogFormVisible: false,
      Voicetype: 0, //是否为语音服务
      visitCount: null,
      logsheetlist: [],
      topicobj: {},
      sendname: null,
      serviceType: null,
      id: null,
      taskid: null,
      patid: null,
    };
  },
  created() {
    this.taskid = this.$route.query.taskid;
    this.id = this.$route.query.id;
    this.sendname = this.$route.query.sendname;
    this.patid = this.$route.query.patid;
    this.again = this.$route.query.again;
    this.Voicetype = this.$route.query.Voicetype;
    this.visitCount = this.$route.query.visitCount;
    this.serviceType = this.$route.query.serviceType;
    this.getTaskservelist();
  },
  methods: {
    // èŽ·å–é—®å·æ•°æ®
    //患者360跳转
    gettoken360(sfzh, drcode, drname) {
      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.linkUrl = res.data.url;
        } else {
          this.$modal.msgWarning("360查询无结果");
        }
      });
    },
    // èŽ·å–åŸºç¡€ä¿¡æ¯
    getuserinfo() {
      const queryParams = {
        pid: Number(this.patid),
        allhosp: "0",
        pageNum: 1,
      };
      // æ‚£è€…基础信息
      messagelistpatient(queryParams).then((response) => {
        if (response.rows[0]) {
          this.userform = response.rows[0];
          // this.dynamicTags = response.rows[0].tagList.map(this.processElement);
        }
      });
      listcontactinformation({ patid: this.patid }).then((response) => {
        this.tableData = response.rows;
        if (this.tableData.length) {
          this.userform.relativetelcode = this.tableData[0].contactway;
          this.userform.relation = this.tableData[0].relation;
        }
      });
    },
    // å†æ¬¡éšè®¿æ—¶é—´é€‰å–
    visitChange(value) {
      // æ ¹æ®é€‰æ‹©çš„随访方式设置时间
      const now = new Date();
      if (value.includes("七天后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 7
        );
      } else if (value.includes("15天后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 15
        );
      } else if (value.includes("一个月后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 30
        );
      } else if (value.includes("三个月后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 90
        );
      } else if (value.includes("六个月后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 180
        );
      } else if (value.includes("一年后")) {
        this.form.date1 = new Date(
          Date.parse(this.form.endtime) + 3600 * 1000 * 24 * 365
        );
      }
    },
    // èŽ·å–è¯­éŸ³æ•°æ®
    getPersonVoices(id) {
      let obj = {
        taskid: this.taskid,
        patid: this.patid,
        subId: id ? id : this.id,
      };
      getPersonVoices(obj).then((res) => {
        if (res.code == 200) {
          this.voiceDatatop = res.data.serviceSubtaskDetails;
          this.voice = res.data.voice;
          this.activeName = "yy";
          this.taskname = res.data.taskName;
          // é—®å·å±•示数据处理
          this.tableDatatop = res.data.filteredDetails;
          this.tableDatatop.forEach((item) => {
            if (item.targetvalue) {
              item.scriptResult = item.targetvalue.split("&");
            } else {
              item.scriptResult = [];
            }
          });
          if (!this.tableDatatop.length) {
            this.puttaskid(this.templateid);
          }
        }
      });
    },
    // èŽ·å–é—®å·å®Œæ•´æ•°æ®æ¯”å¯¹
    puttaskid(id) {
      getTaskFollowup(id).then((res) => {
        if (res.code == 200) {
          this.tableDatatop = res.data.ivrTaskTemplateScriptVOList;
          this.tableDatatop.forEach((item) => {
            item.id = null;
            // ç±»åž‹åˆ¤æ–­èµ‹å€¼
            if (item.ivrTaskScriptTargetoptionList) {
              item.targetvalue = 1;
              item.questiontext = item.scriptContent;
              item.targetvalue = item.ivrTaskScriptTargetoptionList
                .map((obj) => obj.targetvalue)
                .join("&");
            }
            if (item.targetvalue) {
              item.scriptResult = item.targetvalue.split("&");
            } else {
              item.scriptResult = [];
            }
          });
        }
      });
    },
    // åŒ»æŠ¤äººå‘˜å­˜å‚¨æ•°æ®
    getdetail() {
      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;
          }
        }
        let obj = {
          asrtext: null,
          patid: this.patid,
          subId: this.id,
          taskid: this.taskid,
          scriptid: item.id,
          excep: excep,
          questiontext: item.scriptContent,
        };
        if (item.scriptType == 2 && item.scriptResult[0]) {
          obj.asrtext = item.scriptResult.join("&");
        } else if (item.scriptType != 2 && item.scriptResult) {
          obj.asrtext = item.scriptResult;
        }
        if (item.isoption == 3) {
          promises.push(serviceSubtaskDetailedit(obj));
        } else {
          promises.push(serviceSubtaskDetailadd(obj));
        }
      });
      // ä½¿ç”¨ Promise.all ç­‰å¾…所有异步操作完成
      Promise.all(promises)
        .then((results) => {
          // æ‰€æœ‰å¼‚步操作成功完成后的逻辑
          results.forEach((res) => {
            if (res.code !== 200) {
              this.$modal.error("修改失败");
            }
          });
          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) {
                  this.$router.push({
                    path: "/logisticsservice/zbAgain",
                  });
                } else {
                  this.$router.push({
                    path: "/logisticsservice/record",
                  });
                }
              } else if (form.serviceType == 2) {
                if (this.visitCount) {
                  this.$router.push({
                    path: "/followvisit/again",
                  });
                } else {
                  this.$router.push({
                    path: "/followvisit/discharge",
                  });
                }
              }
            });
        })
        .catch((error) => {
          // å¦‚果有任何一个异步操作失败,会进入这里
          console.error("发生错误:", error);
        });
    },
    // éªŒè¯æ‰‹æœºå·æ ¼å¼
    isValidPhone(phone) {
      return /^1[3-9]\d{9}$/.test(phone);
    },
    // å‘¼å«å¤„理
    handleCall(phone, type) {
      if (this.isValidPhone(phone)) {
        this.currentPhoneNumber = phone;
        this.callType = type;
        // ç­‰å¾…下一个tick确保值已更新
        this.$nextTick(() => {
          this.$refs.callButton.startCall();
          // å¯é€‰ï¼šæ ¹æ®ä¸åŒç±»åž‹åšä¸åŒå¤„理
          if (type === "tel") {
            console.log("正在呼叫患者本人:", phone);
          } else {
            console.log("正在呼叫联系人:", phone);
          }
        });
      }
    },
    yuyingetdetail() {
      this.tableDatatop.forEach((item, index) => {
        item.scriptResult = item.scriptResult.join("&");
        item.templatequestionnum = index + 1;
        item.subId = this.id;
        item.taskid = this.taskid;
        item.asrtext = item.matchedtext;
        if (!item.id) {
          item.isoperation = 1;
        }
        item.patid = this.patid;
        item.templateid = item.templateID;
      });
      let obj = {
        serviceSubtaskDetailList: this.tableDatatop,
        param1: this.taskid,
        param2: this.patid,
        subId: this.id,
      };
      addPersonVoices(obj).then((res) => {
        if (res.code == 200) {
          this.$modal.msgSuccess("服务保存成功");
          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) {
                  this.$router.push({
                    path: "/logisticsservice/zbAgain",
                  });
                } else {
                  this.$router.push({
                    path: "/logisticsservice/record",
                  });
                }
              } else if (form.serviceType == 2) {
                if (this.visitCount) {
                  this.$router.push({
                    path: "/followvisit/again",
                  });
                } else {
                  this.$router.push({
                    path: "/followvisit/discharge",
                  });
                }
              }
            });
        }
      });
    },
    // å†æ¬¡éšè®¿æ•°æ®æ›´æ›¿
    formtidy() {
      this.form.visitType2 = this.form.visitType;
      this.form.date2 = this.form.longSendTime;
      this.form.remark2 = this.form.remark;
    },
    // èŽ·å–æ‚£è€…è®°å½•
    getTaskservelist(id) {
      if (id) {
        this.Whetherall = false;
      } else {
        this.Whetherall = true;
      }
      getTaskservelist({
        patid: this.patid,
        subId: id,
      }).then((res) => {
        if (res.code == 200) {
          this.form = res.rows[0].serviceSubtaskList.find(
            (item) => item.id == this.id
          );
          if (!this.form.remark) {
            this.form.remark = this.form.taskDesc;
          }
          this.logsheetlist = res.rows[0].serviceSubtaskList;
          this.templateid = this.logsheetlist[0].templateid;
          const targetDate = new Date(this.form.longSendTime); // ç›®æ ‡æ—¥æœŸ
          const now = new Date(); // å½“前时间
          this.form.endtime = this.formatTime(this.form.endtime);
          if (now < targetDate && this.form.sendstate == 2) {
            this.$confirm("当前服务未到发送时间请谨慎修改", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
            })
              .then(() => {})
              .catch(() => {});
          }
          this.getuserinfo();
        }
      });
    },
    Editsingletaskson(son) {
      let objson = {};
      getTaskservelist({
        patid: this.patid,
        subId: this.id,
      }).then((res) => {
        if (res.code == 200) {
          objson = res.rows[0].serviceSubtaskList[0];
          objson.suggest = son;
          Editsingletaskson(objson).then((res) => {
            if (res.code) {
              this.$modal.msgSuccess("服务记录成功");
              this.getTaskservelist();
            }
          });
        }
      });
    },
    Editsingletasksonyic(sendstate) {
      let objson = {};
      getTaskservelist({
        patid: this.patid,
        subId: this.id,
      }).then((res) => {
        if (res.code == 200) {
          objson = res.rows[0].serviceSubtaskList.find(
            (item) => item.id == this.id
          );
          objson.remark = this.form.remark;
          if (sendstate) objson.sendstate = sendstate;
          Editsingletaskson(objson).then((res) => {
            if (res.code) {
              this.$modal.msgSuccess("服务修改成功");
              alterpatient(this.userform).then((res) => {
                if (res.code == 200) {
                  this.$modal.msgSuccess("基础信息保存成功");
                } else {
                  this.$modal.msgError("基础信息修改失败");
                }
              });
              this.getTaskservelist();
            }
          });
        }
      });
    },
    // å¼‚常列渲染
    tableRowClassName({ row, rowIndex }) {
      if (row.id == this.id) {
        return "warning-row";
      }
      return "";
    },
    // è°ƒèµ·å†æ¬¡å‘送
    sendAgain() {
      document.querySelector("#app").scrollTo(0, 0);
      // scrollTo(0, 0)
      this.formtidy();
      this.dialogFormVisible = true;
    },
    // æŸ¥çœ‹è¯¦æƒ…
    Seedetails(row) {
      this.$modal
        .confirm('是否查看任务为"' + row.taskName + '"的服务详情数据?')
        .then(() => {
          if (row.preachformson) {
            if (row.preachformson.includes("3")) {
              this.Voicetype = 1;
            }
          }
          this.taskid = row.taskid;
          this.id = row.id;
          this.patid = row.patid;
          this.serviceType = row.serviceType;
          this.getTaskservelist();
        })
        .catch(() => {});
    },
    handleOptionChange(a, b, c) {
      const result = c.find((item) => item.optioncontent == a);
      if (result.nextQuestion == 0) {
        this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => {
          acc.push(i > b ? { ...item, astrict: 1 } : item);
          return acc;
        }, []);
      } else {
        this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => {
          acc.push(i > b ? { ...item, astrict: 0 } : item);
          return acc;
        }, []);
      }
      if (this.Voicetype) {
        var obj = this.tableDatatop[b].ivrTaskScriptTargetoptionList.find(
          (item) => item.optioncontent == a
        );
      } else {
        var obj = this.tableDatatop[b].svyLibTemplateTargetoptions.find(
          (item) => item.optioncontent == a
        );
      }
      if (obj.isabnormal) {
        this.tableDatatop[b].isabnormal = true;
      } else {
        this.tableDatatop[b].isabnormal = false;
      }
      this.$forceUpdate();
    },
    overdata() {
      this.tableDatatop.forEach((item, index) => {
        var obj = item.svyLibTemplateTargetoptions.find(
          (items) => items.optioncontent == item.scriptResult
        );
        if (obj) {
          if (obj.isabnormal) {
            this.tableDatatop[index].isabnormal = true;
          } else {
            this.tableDatatop[index].isabnormal = false;
          }
          this.$forceUpdate();
        }
      });
    },
    // åˆ›å»ºå†æ¬¡éšè®¿æœåŠ¡
    setupsubtask() {
      this.$refs["zcform"].validate((valid) => {
        if (valid) {
          this.form.remark =
            this.form.remark + "【" + this.getCurrentTime() + "】";
          let form = structuredClone(this.form);
          form.longSendTime = this.formatTime(form.date1);
          form.finishtime = "";
          if (form.resource) {
            if (form.resource == 2) {
              form.serviceType = 13;
              form.visitDeptCode = localStorage.getItem("deptCode");
              form.visitDeptName = "随访中心";
            } else {
              form.visitDeptCode = form.deptcode;
              form.visitDeptName = form.deptname;
            }
          } else {
            this.$modal.msgError("未选择随访方式");
            return;
          }
          // form.id = null;
          form.sendstate = 2;
          addserviceSubtask(form).then((res) => {
            if (res.code == 200) {
              this.$modal.msgSuccess("创建成功");
              if (form.serviceType == 13) {
                this.$router.push({
                  path: "/logisticsservice/again",
                });
              } else if (form.serviceType == 2) {
                this.$router.push({
                  path: "/logisticsservice/zbAgain",
                });
              }
            } else {
              this.$modal.msgError("创建失败");
            }
            document.querySelector("#app").scrollTo(0, 0);
            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}`;
    },
    updateScore(a, b, c) {},
  },
};
</script>
<style lang="scss">
.Followupdetailspage {
  margin: 10px;
}
.Followuserinfo {
  margin: 20px 10px;
  align-items: center;
  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);
  .userinfo-text {
    font-size: 20px;
    margin-right: 20px;
    margin-bottom: 10px;
  }
  .userinfo-value {
    color: rgb(15, 139, 211);
    span {
      margin-right: 20px;
    }
  }
}
::v-deep.el-table .warning-row {
  background: #c4e2ee;
}
.Followuserinfos {
  margin: 20px 10px;
  align-items: center;
  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);
  .userinfo-text {
    font-size: 20px;
    margin-right: 20px;
    margin-bottom: 10px;
  }
  .userinfo-value {
    color: rgb(15, 139, 211);
    span {
      margin-right: 20px;
    }
  }
}
.borderdiv {
  min-height: 60vh;
  font-size: 20px;
  padding: 30px;
  .title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
  }
  .leftside {
    margin: 30px 0;
    span {
      width: 400px;
      margin-left: 20px;
      padding: 10px;
      color: #fff;
      background: rgb(110, 196, 247);
      border-radius: 10px;
    }
  }
  .offside {
    display: flex;
    flex-direction: row-reverse;
    .offside-value {
      padding: 10px;
      background: rgb(217, 173, 253);
      border-radius: 10px;
      color: #fff;
      margin-right: 20px;
    }
  }
}
.CONTENT {
  padding: 10px;
  .title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
  }
}
.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;
    }
  }
}
.scriptTopic-isabnormal {
  color: red;
}
.detailed {
  width: 88%;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  background-color: #ddf0f8;
  .bg-purple {
    margin-bottom: 20px;
  }
  .spanvalue {
    display: inline-block;
    min-width: 200px;
    border-bottom: 1px solid rgb(172, 172, 172);
  }
}
.headline {
  font-size: 24px;
  height: 40px;
  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;
  }
}
.red-star {
  ::v-deep.el-radio__label {
    position: relative;
    padding-right: 10px; /* æ ¹æ®éœ€è¦è°ƒæ•´ */
  }
  ::v-deep.el-radio__label::after {
    content: "*";
    color: red;
    position: absolute;
    right: -5px; /* æ ¹æ®éœ€è¦è°ƒæ•´ */
    top: 0;
  }
  ::v-deep.el-input-group__textarea {
    white-space: pre-wrap; /* ä¿æŒç©ºç™½ç¬¦åºåˆ—并正常换行 */
    word-break: break-all; /* åœ¨é•¿å•词或URL地址内部进行换行 */
  }
  ::v-deep.el-checkbox__label {
    position: relative;
    padding-right: 10px; /* æ ¹æ®éœ€è¦è°ƒæ•´ */
  }
  ::v-deep.el-checkbox__label::after {
    content: "*";
    color: red;
    position: absolute;
    right: -5px; /* æ ¹æ®éœ€è¦è°ƒæ•´ */
    top: 0;
  }
}
::v-deep.offside-value .el-radio__label {
  color: #fff;
}
::v-deep.el-link.el-link--default {
  color: #02a7f0 !important;
}
.el-message-box__btns button:nth-child(2) {
  margin-left: 10px;
  background-color: #f57676;
  border-color: #f57676;
}
.el-icon-phone {
  transition: all 0.3s;
}
.el-button[disabled] .el-icon-phone {
  color: #c0c4cc;
}
.el-button:not([disabled]) .el-icon-phone {
  color: #409eff;
}
.el-button:not([disabled]):hover .el-icon-phone {
  color: #66b1ff;
  transform: scale(1.1);
}
.mulsz {
  font-size: 25px;
  margin-top: 20px;
}
.el-input.is-disabled .el-input__inner {
  background-color: #fff; /* èƒŒæ™¯é¢œè‰² */
  border-color: #dcdfe6; /* è¾¹æ¡†é¢œè‰² */
  color: #080808 !important; /* æ–‡å­—颜色 */
  cursor: not-allowed; /* é¼ æ ‡æ ·å¼ */
}
.el-textarea.is-disabled .el-textarea__inner {
  background-color: #fff; /* èƒŒæ™¯é¢œè‰² */
  border-color: #dcdfe6; /* è¾¹æ¡†é¢œè‰² */
  color: #080808 !important; /* æ–‡å­—颜色 */
  cursor: not-allowed; /* é¼ æ ‡æ ·å¼ */
}
</style>
src/views/followvisit/satisfaction/index.vue
@@ -11,44 +11,23 @@
        v-show="showSearch"
        label-width="98px"
      >
        <el-form-item label="任务名称">
          <el-input v-model="topqueryParams.name"></el-input>
        <el-form-item label="病区名称">
          <el-input
            placeholder="请输入患者病区"
            v-model="topqueryParams.hospitaldistrictname"
          ></el-input>
        </el-form-item>
        <el-form-item label="发起人">
          <el-input v-model="topqueryParams.name"></el-input>
        <el-form-item label="科室名称">
          <el-input
            placeholder="请输入患者科室"
            v-model="topqueryParams.deptname"
          ></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="status">
          <el-select v-model="topqueryParams.topic" 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.topic" placeholder="请选择">
            <el-option
              v-for="item in topicoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        <el-form-item label="患者名称">
          <el-input
            placeholder="请输入患者姓名"
            v-model="topqueryParams.patName"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button
@@ -66,51 +45,6 @@
      <el-divider></el-divider>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-select v-model="tasktopic" placeholder="请选择新增类型">
            <el-option
              v-for="item in taskoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="medium"
            :disabled="!tasktopic"
            @click="handleAdd"
            >新增</el-button
          >
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="success"
            plain
            icon="el-icon-edit"
            size="medium"
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['system:user:edit']"
            >修改</el-button
          >
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="danger"
            plain
            icon="el-icon-delete"
            size="medium"
            :disabled="multiple"
            @click="handleDelete"
            v-hasPermi="['system:user:remove']"
            >删除</el-button
          >
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
@@ -119,7 +53,6 @@
                icon="el-icon-download"
                size="medium"
                @click="handleExport"
                v-hasPermi="['system:user:export']"
                >导出</el-button
              >
            </div>
@@ -138,146 +71,255 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column
          label="序号"
          align="center"
          key="userId"
          prop="userId"
        />
        <el-table-column label="编号" align="center" key="id" prop="id" />
        <el-table-column
          label="住院编号"
          label="病区"
          align="center"
          sortable
          key="userName"
          prop="userName"
          width="120"
          key="hospitaldistrictname"
          prop="hospitaldistrictname"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="科室"
          width="120"
          align="center"
          key="deptname"
          prop="deptname"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="姓名"
          width="100"
          align="center"
          key="patName"
          prop="patName"
          width="120"
        />
        <el-table-column
          label="联系电话"
          align="center"
          key="phone"
          prop="phone"
          width="150"
          show-overflow-tooltip
        />
        <el-table-column
          label="真实性(20)"
          align="center"
          key="authenticity"
          prop="authenticity"
          sortable
          key="userName"
          prop="userName"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="年龄"
          align="center"
          key="age"
          prop="age"
          width="120"
        />
        <el-table-column
          label="调查模板"
          align="center"
          key="types"
          prop="types"
        />
        <el-table-column
          label="调查类型"
          align="center"
          key="types"
          prop="types"
        />
        <el-table-column
          label="调查内容"
          align="center"
          key="nickName"
          prop="nickName"
        />
        <el-table-column
          label="住院病区"
          align="center"
          key="nickName"
          prop="nickName"
        />
        <el-table-column
          label="床号"
          align="center"
          key="nickName"
          prop="nickName"
        />
        <el-table-column
          label="主治医生"
          align="center"
          key="nickName"
          prop="nickName"
        />
        <el-table-column
          label="管床护士"
          align="center"
          key="nickName"
          prop="nickName"
        />
        <el-table-column
          label="执行状态"
          align="center"
          key="topicnumber"
          prop="topicnumber"
          width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <div>执行完成/执行失败</div>
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.authenticity"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.authenticity }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="诊断"
          label="一周内完成(20)"
          align="center"
          key="topicnumberaa"
          prop="topicnumberaa"
          key="weekFinish"
          prop="weekFinish"
          sortable
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.weekFinish"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.weekFinish }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="规范性(10)"
          align="center"
          key="standard"
          prop="standard"
          width="120"
          :show-overflow-tooltip="true"
        />
          sortable
        >
          <template slot-scope="scope">
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.standard"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.standard }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="及时性(10)"
          align="center"
          key="timeliness"
          prop="timeliness"
          sortable
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.timeliness"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.timeliness }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="宣教情况(10)"
          align="center"
          key="library"
          prop="library"
          sortable
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.library"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.library }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="环境满意度(10)"
          align="center"
          key="environment"
          prop="environment"
          sortable
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.environment"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.environment }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="入院时间"
          sortable
          label="医生满意度(10)"
          align="center"
          key="doctorSatisfaction"
          prop="doctorSatisfaction"
          width="150"
          sortable
        >
          <template slot-scope="scope">
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.doctorSatisfaction"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.doctorSatisfaction }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="护士满意度(10)"
          align="center"
          key="nurseSatisfaction"
          prop="nurseSatisfaction"
          width="150"
          sortable
        >
          <template slot-scope="scope">
            <el-input-number
              v-if="scope.row.editing"
              v-model="scope.row.nurseSatisfaction"
              :min="0"
              :max="20"
              size="small"
              controls-position="right"
            />
            <span v-else>{{ scope.row.nurseSatisfaction }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="总分"
          fixed="right"
          align="center"
          key="total"
          prop="total"
          sortable
        >
        </el-table-column>
        <el-table-column
          label="完成日期"
          fixed="right"
          width="150"
          align="center"
          key="createTime"
          prop="createTime"
          width="160"
          sortable
        >
          <template slot-scope="scope">
            <span>{{ formatTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="任务详情"
          label="操作"
          align="center"
          fixed="right"
          width="200"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <el-button
              v-if="!scope.row.editing"
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-xq"
                ><i class="el-icon-s-data"></i>详情</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-bb"
                ><i class="el-icon-s-order"></i>报表</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-sc"
              @click="handleDelete(scope.row)"
              ><span class="button-zx"
                ><i class="el-icon-delete"></i>删除</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="toggleEdit(scope.row, scope.$index)"
            >
              <span class="button-textxga">
                <i
                  :class="scope.row.editing ? 'el-icon-check' : 'el-icon-edit'"
                ></i>
                {{ scope.row.editing ? "保存" : "编辑" }}
              </span>
            </el-button>
            <el-button
              v-if="scope.row.editing"
              size="medium"
              type="text"
              @click="handleCancel(scope.row, scope.$index)"
              >取消</el-button
            >
          </template>
        </el-table-column>
@@ -291,73 +333,16 @@
        @pagination="getList"
      />
    </el-row>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹å½±åƒéšè®¿å¯¹è¯æ¡† -->
    <el-dialog
      :title="title"
      :visible.sync="addalteropen"
      width="700px"
      append-to-body
    >
      <el-form ref="form" :model="form" label-width="100px">
        <el-row :gutter="20">
          <el-col :span="12"
            ><el-form-item label="任务名称">
              <el-input v-model="form.name"></el-input> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24"
            ><el-form-item label="所属科室">
              <el-select v-model="form.region" placeholder="请选择科室">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select> </el-form-item></el-col
        ></el-row>
        <el-row :gutter="20">
          <el-col :span="24"
            ><el-form-item label="随访类型">
              <el-select v-model="form.region" placeholder="请选择随访类型">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="服务模块">
              <el-select v-model="form.region" placeholder="请选择模块">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="影像随访要求">
              <el-input type="textarea" v-model="form.desc"></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>
  </div>
</template>
<script>
import {
  listUser,
  getUser,
  delUser,
  addUser,
  updateUser,
  resetUserPwd,
  listsatisfaction,
  delsatisfaction,
  updatesatisfaction,
  changeUserStatus,
} from "@/api/system/user";
} from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -426,58 +411,7 @@
      value: [],
      list: [],
      loading: false,
      states: [
        "Alabama",
        "Alaska",
        "Arizona",
        "Arkansas",
        "California",
        "Colorado",
        "Connecticut",
        "Delaware",
        "Florida",
        "Georgia",
        "Hawaii",
        "Idaho",
        "Illinois",
        "Indiana",
        "Iowa",
        "Kansas",
        "Kentucky",
        "Louisiana",
        "Maine",
        "Maryland",
        "Massachusetts",
        "Michigan",
        "Minnesota",
        "Mississippi",
        "Missouri",
        "Montana",
        "Nebraska",
        "Nevada",
        "New Hampshire",
        "New Jersey",
        "New Mexico",
        "New York",
        "North Carolina",
        "North Dakota",
        "Ohio",
        "Oklahoma",
        "Oregon",
        "Pennsylvania",
        "Rhode Island",
        "South Carolina",
        "South Dakota",
        "Tennessee",
        "Texas",
        "Utah",
        "Vermont",
        "Virginia",
        "Washington",
        "West Virginia",
        "Wisconsin",
        "Wyoming",
      ],
      states: [],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
@@ -610,13 +544,11 @@
    /** æŸ¥è¯¢å½±åƒéšè®¿åˆ—表 */
    getList() {
      this.loading = true;
      listUser(this.addDateRange(this.topqueryParams, this.dateRange)).then(
        (response) => {
          this.userList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
      );
      listsatisfaction(this.topqueryParams).then((response) => {
        this.userList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // æŸ¥çœ‹å½±åƒéšè®¿è¯¦æƒ…
    Referencequestion(row) {
@@ -635,21 +567,6 @@
      } 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";
        });
    },
    // å–消按钮
    cancel() {
@@ -721,43 +638,46 @@
        path: "/Intelligentcenter/satisfaction/particulars",
        query: { type: this.tasktopic },
      });
      // getUser().then((response) => {
      //   this.postOptions = response.posts;
      //   this.roleOptions = response.roles;
      //   this.title = "新增影像随访";
      //   this.form.password = this.initPassword;
      // });
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const userId = row.userId || this.ids;
      getUser(userId).then((response) => {
        this.form = response.data;
        this.postOptions = response.posts;
        this.roleOptions = response.roles;
        this.$set(this.form, "postIds", response.postIds);
        this.$set(this.form, "roleIds", response.roleIds);
        this.addalteropen = true;
        this.title = "修改用户";
        this.form.password = "";
      });
    },
    /** é‡ç½®å¯†ç æŒ‰é’®æ“ä½œ */
    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);
    toggleEdit(row, index) {
      if (row.editing) {
        // ä¿å­˜é€»è¾‘
        updatesatisfaction(row).then((response) => {
          this.$modal.msgSuccess("修改成功");
          this.$set(this.userList, index, {
            ...row,
            editing: false,
            // è®¡ç®—总分
            total: this.calculateTotal(row),
          });
        })
        .catch(() => {});
        });
        // è¿™é‡Œå¯ä»¥æ·»åŠ API调用保存数据
      } else {
        // è¿›å…¥ç¼–辑模式
        this.$set(this.userList, index, {
          ...row,
          editing: true,
          // ä¿å­˜åŽŸå§‹æ•°æ®ç”¨äºŽå¯èƒ½çš„å–æ¶ˆæ“ä½œ
          originalData: { ...row },
        });
      }
    },
    handleCancel(row, index) {
      this.$set(this.userList, index, row.originalData);
    },
    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)
      );
    },
    /** æäº¤æŒ‰é’® */
@@ -765,14 +685,8 @@
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.userId != undefined) {
            updateUser(this.form).then((response) => {
            updatesatisfaction(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
@@ -782,11 +696,11 @@
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      const userIds = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .confirm('是否确认删除用户编号为"' + row.patName + '"的数据项?')
        .then(function () {
          return delUser(userIds);
          return delsatisfaction(userIds);
        })
        .then(() => {
          this.getList();
@@ -797,7 +711,7 @@
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download(
        "system/user/export",
        "smartor/satisfaction/export",
        {
          ...this.topqueryParams,
        },
@@ -909,11 +823,22 @@
  font-weight: 500;
  color: #dd302a;
}
// .button-zx {
//   background: #e94f4f;
//   padding: 5px;
//   border-radius: 1px;
//   color: #ffffff;
// }
.el-table .cell .el-input-number {
  width: 100%;
}
/* æŒ‰é’®æ ·å¼ */
.button-zx {
  background: #4fabe9;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
  color: #f56c6c;
}
.button-textxga {
  color: #409eff;
}
::v-deep.el-radio-group {
src/views/followvisit/technology/index.vue
@@ -823,10 +823,10 @@
          name: "待随访",
          value: 0,
        },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
@@ -999,7 +999,7 @@
          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.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1061,7 +1061,7 @@
          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.cardlist[5].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
src/views/followvisit/zbAgain/index.vue
@@ -929,10 +929,10 @@
          name: "待随访",
          value: 0,
        },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
@@ -1157,7 +1157,7 @@
          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.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1237,7 +1237,7 @@
          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.cardlist[5].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
src/views/index.vue
@@ -105,13 +105,13 @@
                ></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">
@@ -134,9 +134,7 @@
                ></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>
@@ -292,7 +290,7 @@
  getechartsListCountdata,
  getechartsMedOuthospList,
  getechartsMedInhospList,
  getechartsandData,
  getServiceStatistics,
  getDeptRanking,
} from "@/api/AiCentre/index";
import dayjs from "dayjs";
@@ -308,8 +306,13 @@
      mypPieCharts: null,
      lastWidth: window.innerWidth,
      lastHeight: window.innerHeight,
      radio1: "周",
      radio1: "月",
      ticketStatistics: {},
      timeTypeMap: {
        å‘¨: "day",
        æœˆ: "month",
        å¹´: "year",
      },
      DischargeData: {
        rs: "",
        rc: "",
@@ -352,7 +355,7 @@
    this.getgraphdata();
    this.getranking();
    this.$nextTick(function () {
      this.getregionAmountCollect();
      this.myEcharts2();
      this.getnodeCollect();
      this.getSkuTop();
    });
@@ -379,7 +382,7 @@
      this.getgraphdata();
      this.getranking();
      this.getTopdata();
      this.getregionAmountCollect();
      this.myEcharts2();
      this.getnodeCollect();
      this.getSkuTop();
    },
@@ -396,15 +399,15 @@
    },
    // 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");
        }
      });
@@ -451,26 +454,141 @@
        }
      });
    },
    // èŽ·å–å°±è¯Šæ•°é‡
    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);
@@ -480,11 +598,12 @@
      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",
@@ -504,30 +623,12 @@
          },
        },
        legend: {
          data: [
            "出院随访量",
            "门诊随访量",
            // "在院随访量",
            // "门诊复诊通知",
            "出院服务人次",
            "门诊服务人次",
          ],
          data: ["出院随访量", "门诊随访量", "出院服务人次", "门诊服务人次"],
        },
        xAxis: [
          {
            type: "category",
            data: [
              "一月",
              "二月",
              "三月",
              "四月",
              "五月",
              "六月",
              "七月",
              "八月",
              "九月",
              "十月",
            ],
            data: [], // åˆå§‹ä¸ºç©ºï¼Œå°†é€šè¿‡API数据填充
            axisPointer: {
              type: "shadow",
            },
@@ -538,18 +639,14 @@
            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} æ¬¡",
            },
@@ -565,18 +662,8 @@
                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",
@@ -585,21 +672,8 @@
                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",
@@ -610,7 +684,7 @@
                return value + " æ¬¡";
              },
            },
            data: [102, 190, 135, 88, 175, 160, 83, 145, 200, 110, 97, 180],
            data: [], // åˆå§‹ä¸ºç©ºï¼Œå°†é€šè¿‡API数据填充
          },
          {
            name: "门诊服务人次",
@@ -622,29 +696,15 @@
                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() {
src/views/knowledge/education/compilequer/index.vue
@@ -703,7 +703,7 @@
        });
      }
      // å®£æ•™åˆ†ç±»
      getheLibraryAssort({}).then((res) => {
      getheLibraryAssort({ hetype: 1 }).then((res) => {
        this.sortlist = res.rows;
        console.log(this.sortlist);
      });
src/views/login.vue
@@ -119,6 +119,8 @@
        { value: "47231022633110211A2101", label: "丽水市中医院" },
        { value: "47246102433112211A2101", label: "缙云县中医医院 " },
        { value: "47240018433118111A2101", label: "龙泉市中医医院 " },
        { value: "47243006833112611A2101", label: "庆元县中医医院 " },
        { value: "47234002X33112111A2101", label: "青田县中医医院 " },
       ],
      loginRules: {
        username: [
@@ -195,9 +197,12 @@
          this.loginForm.orgid = '1',
          this.$store
            .dispatch("Login", this.loginForm)
            .then(() => {
              // this.$router.push({ path: this.redirect || "/" }).catch(() => {});
              this.$router.push({ path:"/followvisit/discharge" }).catch(() => {});
            .then((res) => {
              if (this.loginForm.username=='admin') {
              this.$router.push({ path:"/index" }).catch(() => {});
              }else{
                this.$router.push({ path:"/followvisit/discharge" }).catch(() => {});
              }
            })
            .catch(() => {
              this.loading = false;
src/views/patient/follow/index.vue
@@ -11,11 +11,19 @@
          v-show="showSearch"
          label-width="98px"
        >
          <el-form-item label="姓名"
          width="100" prop="name">
          <el-form-item label="患者姓名" width="100" prop="name">
            <el-input
              v-model="queryParams.name"
              placeholder="请输入姓名"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="过滤医生" width="100" prop="filterDrname">
            <el-input
              v-model="queryParams.filterDrname"
              placeholder="请输入医生姓名"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
@@ -37,9 +45,7 @@
            </el-select>
          </el-form-item> -->
          <el-row>
            <el-form-item>
              <el-button
                type="primary"
@@ -58,7 +64,6 @@
          </el-row>
        </el-form>
        <el-table
          v-loading="loading"
          :data="userList"
@@ -74,12 +79,18 @@
          <el-table-column
            fixed
            label="姓名"
          width="100"
            width="100"
            align="center"
            key="name"
            prop="name"
          />
          <el-table-column label="性别"width="100" align="center" key="sex" prop="sex">
          <el-table-column
            label="性别"
            width="100"
            align="center"
            key="sex"
            prop="sex"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.sex == 1 ? "男" : "女" }}</span>
            </template>
@@ -128,6 +139,12 @@
            prop="placeOfResidence"
            width="180"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="过滤医生"
            align="center"
            key="filterDrname"
            prop="filterDrname"
          />
          <el-table-column
            label="患者标签"
@@ -185,7 +202,6 @@
                    query: { id: scope.row.id },
                  })
                "
                ><span class="button-textsc"
                  ><i class="el-icon-zoom-in"></i>查看</span
                ></el-button
@@ -194,7 +210,6 @@
                size="medium"
                type="text"
                @click="handleDelete(scope.row)"
                ><span class="button-textxga"
                  ><i class="el-icon-edit"></i>取消过滤</span
                ></el-button
@@ -212,8 +227,6 @@
        />
      </el-col>
    </el-row>
  </div>
</template>
@@ -295,7 +308,7 @@
      propss: { multiple: true },
      optionstag: [], //标签列表
      Patientrange: [
      {
        {
          value: 0,
          label: "所属患者",
        },
@@ -437,13 +450,13 @@
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.queryParams={
      (this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        allhosp: "1",
        notrequiredFlag: 1,
      },
      this.handleQuery();
      }),
        this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
@@ -490,16 +503,16 @@
      const userIds = row.id || this.ids;
      this.$modal
        .confirm('是否确认取消用户编号为"' + userIds + '"的数据项过滤?')
        .then( ()=> {
          row.notrequiredFlag=0
        .then(() => {
          row.notrequiredFlag = 0;
          alterpatient(row)
          .then((response) => {
            console.log(response);
          })
          .then(() => {
            this.getList();
            this.$modal.msgSuccess("修改成功");
          });
            .then((response) => {
              console.log(response);
            })
            .then(() => {
              this.getList();
              this.$modal.msgSuccess("修改成功");
            });
        })
        .catch(() => {});
src/views/patient/medtechnician/Compositeeditdetails.vue
@@ -816,7 +816,7 @@
.headline {
  font-size: 24px;
  height: 40px;
  border-left: 5px solid #5788fe;
  border-left: 5px solid #5788FE;
  padding-left: 5px;
  margin-bottom: 10px;
  display: flex;
src/views/patient/medtechnician/SpecializedService.vue
ÎļþÒÑɾ³ý
src/views/patient/patient/behospitalized.vue
@@ -638,7 +638,7 @@
      (obj) => obj.deptCode
    );
    this.getList();
    this.listDept();
    // this.listDept();
    this.gettabList();
  },
  methods: {
src/views/patient/patient/hospital.vue
@@ -45,6 +45,15 @@
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="科室名称" prop="inhospno">
            <el-input
              v-model="queryParams.deptname"
              placeholder="请输入科室名称"
              clearable
              style="width: 250px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="患者范围" prop="status">
            <el-cascader
@@ -256,6 +265,13 @@
            align="center"
            key="bedNo"
            prop="bedNo"
            width="120"
          />
          <el-table-column
            label="经管医生"
            align="center"
            key="managementDoctor"
            prop="managementDoctor"
            width="120"
          />
          <el-table-column
@@ -615,7 +631,7 @@
      (obj) => obj.deptCode
    );
    this.getList();
    this.listDept();
    // this.listDept();
    this.gettabList();
  },
  methods: {
src/views/patient/patient/index.vue
@@ -554,6 +554,17 @@
            </el-form-item>
          </el-col>
        </el-row>
        <el-row v-if="amendtag">
          <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 v-if="!amendtag">
          <el-col :span="8">
            <el-form-item label="民族" prop="name">
@@ -1272,8 +1283,8 @@
    handleUpdate(row) {
      const userIds = row.id || this.ids;
      particularpatient(userIds).then((response) => {
        console.log(response);
        this.form = response.data;
        this.form.filterDrname = store.getters.nickName;
      });
      this.amendtag = true;
      this.Labelchange = true;
src/views/patient/patient/outpatient.vue
@@ -20,6 +20,33 @@
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="诊断" width="100" prop="name">
            <el-input
              v-model="queryParams.diagname"
              placeholder="请输入诊断"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="科室" width="100" prop="name">
            <el-input
              v-model="queryParams.deptname"
              placeholder="请输入科室名称"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="医生" width="100" prop="name">
            <el-input
              v-model="queryParams.drname"
              placeholder="请输入医生姓名"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="病案号" prop="outhospno">
            <el-input
              v-model="queryParams.outhospno"
@@ -39,18 +66,7 @@
              @change="handleChange"
            ></el-cascader>
          </el-form-item>
          <el-row>
            <!-- <el-form-item label=" å°±è¯Šæ—¥æœŸ " prop="admitdate">
              <el-date-picker
                clearable
                v-model="queryParams.admitdate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="请选择 å°±è¯Šæ—¥æœŸ "
              >
              </el-date-picker>
            </el-form-item> -->
            <el-form-item label="就诊日期">
          <el-form-item label="就诊日期">
              <el-date-picker
                v-model="dateRange"
                style="width: 240px"
@@ -70,6 +86,18 @@
              >
              </el-date-picker> -->
            </el-form-item>
          <el-row>
            <!-- <el-form-item label=" å°±è¯Šæ—¥æœŸ " prop="admitdate">
              <el-date-picker
                clearable
                v-model="queryParams.admitdate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="请选择 å°±è¯Šæ—¥æœŸ "
              >
              </el-date-picker>
            </el-form-item> -->
            <el-form-item>
              <el-button
                type="primary"
src/views/patient/propaganda/Missioncreation.vue
@@ -124,14 +124,33 @@
                      </el-select> </el-form-item
                  ></el-col>
                </el-row>
                <el-form-item label="发送设置:" v-if="currenttype != 2">
                <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-group>
                </el-form-item>
                <el-row :gutter="20" v-if="form.longTask">
                  <el-col :span="8">
                    <el-form-item label="周期时间" prop="name">
                      <el-input
                        v-model="form.sendDay"
                        placeholder="默认5天后"
                      ></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-form-item label="执行设置" v-if="!form.longTask">
                  <el-radio-group v-model="form.sendType">
                    <el-radio :label="1">时间段发送</el-radio>
                    <el-radio :label="3">时间点发送</el-radio>
                    <el-radio :label="2">即刻发送</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="发送日期:" v-if="form.sendType == 1">
                <el-form-item
                  label="执行日期:"
                  v-if="form.sendType == 1 && !form.longTask"
                >
                  <el-date-picker
                    v-model="daytime"
                    @change="changeTimeday"
@@ -144,7 +163,10 @@
                  </el-date-picker>
                </el-form-item>
                <el-form-item label="发送时间点:" v-if="form.sendType == 3">
                <el-form-item
                  label="执行时间点:"
                  v-if="form.sendType == 3 && !form.longTask"
                >
                  <div style="display: flex">
                    <div style="margin-right: 10px">
                      <el-date-picker
@@ -159,7 +181,10 @@
                  </div>
                </el-form-item>
                <el-form-item label="发送时间段:" v-if="form.sendType == 1">
                <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>
@@ -390,7 +415,6 @@
                        icon="el-icon-upload2"
                        size="medium"
                        @click="handleImport"
                        >导入</el-button
                      >
                    </el-col>
@@ -514,11 +538,19 @@
    <!-- æ¨¡æ¿é¢„览 -->
    <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>
@@ -590,13 +622,16 @@
        <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
@@ -637,26 +672,20 @@
              <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>
@@ -751,6 +780,8 @@
    return {
      title: "宣教内容列表",
      currenttype: 1, //1宣教2门诊3出院4复诊5体检6问卷
      currentTemplateType: "", // å½“前模板类型
      plainTextContent: "", // çº¯æ–‡æœ¬å†…容
      id: "", //
      previewid: "", //任务模板传递id
      libName: "",
@@ -800,7 +831,7 @@
      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" },
@@ -914,15 +945,23 @@
      ],
      variableListTime: [],
      sortlist: [],
      heLibraryAssortList: [
        { id: 1, value: "宣教" },
        { id: 2, value: "通知" },
      ],
      tasktopic: null, //新增类型
      SelectPatientslist: [],
      form: {
        patTaskRelevances: [],
        sendType: 1,
        longTask: 0,
        templatename: "",
        templateid: null,
        libtemplateid: null,
        kcb: "亲爱的患者-家属,我们是"+localStorage.getItem("orgname")+"的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。",
        kcb:
          "亲爱的患者-家属,我们是" +
          localStorage.getItem("orgname") +
          "的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。",
        jsy: "生活上要劳逸结合,注意休息和营养,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次宣教内容就到这里,祝您身体健康!",
      },
      taskoptions: [
@@ -970,7 +1009,7 @@
    this.belongDepts = store.getters.belongDepts;
    this.form.typename = this.$route.query.typename;
    this.form.serviceType = Number(this.$route.query.serviceType);
    this.listDept();
    // this.listDept();
    this.Acquisitiontype();
    this.Getdetails();
    this.getheLibraryAssort();
@@ -1087,7 +1126,7 @@
    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;
      }
@@ -1105,7 +1144,7 @@
        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;
@@ -1133,28 +1172,33 @@
    // ----------------------表格子组件事件
    // é€‰æ‹©æ¨¡æ¿å¹¶é¢„览
    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() {
@@ -1165,16 +1209,24 @@
        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) {
@@ -1257,7 +1309,7 @@
    handleExport() {},
    // é€‰æ‹©æ‚£è€…表数据
    handleSelectionChange(selection,type) {
    handleSelectionChange(selection, type) {
      console.log("多选患者");
      this.SelectPatientslist = selection;
      this.multiple = !selection.length;
@@ -1272,8 +1324,8 @@
            item.sfzh = item.idcardno;
          }
          if (type) {
            item.hospType=type
          }else{
            item.hospType = type;
          } else {
            item.hospType = this.patientqueryParams.allhosp;
          }
          this.overallCase.push(item);
@@ -1351,7 +1403,10 @@
        templateid: null,
        libtemplateid: null,
        serviceType: Number(this.$route.query.serviceType),
        kcb: "亲爱的患者-家属,我们是"+localStorage.getItem("orgname")+"的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。",
        kcb:
          "亲爱的患者-家属,我们是" +
          localStorage.getItem("orgname") +
          "的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,观看这份宣教资讯。",
        jsy: "生活上要劳逸结合,注意休息和营养,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次回访就到这里,祝您身体健康!",
      };
@@ -1584,9 +1639,9 @@
        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;
      }
    },
@@ -1737,6 +1792,23 @@
    }
  }
}
/* æ–°å¢žæ ·å¼ */
.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 {
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -438,7 +438,7 @@
      </div>
      <!-- ä»»åŠ¡è¯¦æƒ… -->
      <div v-if="Editprogress == 2">
        <el-alert title="在本阶段选择宣教病人" type="success" effect="dark">
        <el-alert title="在本阶段选择随访病人" type="success" effect="dark">
        </el-alert>
        <div class="leftvlue-jbxx">
          <div class="examine-jic">
@@ -550,6 +550,12 @@
              <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>
@@ -1026,7 +1032,6 @@
      patientqueryParams: {
        pageNum: 1, //
        pageSize: 10,
        topica: 1, //0全部1科室2病区
        leavehospitaldistrictcodes: [],
        leaveldeptcodes: [],
      },
@@ -1109,11 +1114,11 @@
      },
      taskoptions: [
        {
          value: "1",
          value: "4",
          label: "出院病人",
        },
        {
          value: "4",
          value: "1",
          label: "在院病人",
        },
        {
@@ -1687,11 +1692,7 @@
      this.overallCase.forEach((item) => {
        this.allpids.push(item.patid);
      });
      if (
        this.patientqueryParams.allhosp == 1 ||
        (this.patientqueryParams.allhosp == 1 &&
          this.patientqueryParams.cry == 1)
      ) {
      if (this.patientqueryParams.allhosp == 4) {
        this.tableLabelhz = [
          // { label: "入院日期", width: "170", prop: "starttime" },
          { label: "出院日期", width: "150", prop: "endtime" },
@@ -1706,7 +1707,7 @@
          { label: "科室", width: "180", prop: "dept" },
          { label: "病区", width: "150", prop: "leavehospitaldistrictname" },
        ];
      } else if (this.patientqueryParams.allhosp == 4) {
      } else if (this.patientqueryParams.allhosp == 1) {
        this.tableLabelhz = [
          { label: "入院日期", width: "150", prop: "starttime" },
          { label: "患者", width: "", prop: "name" },
@@ -1728,21 +1729,16 @@
      }
      // æ¥æºåˆ¤æ–­
      if (this.patientqueryParams.searchscope == 1) {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
      if (this.patientqueryParams.allhosp == 4) {
        this.patientqueryParams.hospitaldistrictcodes = [];
        this.patientqueryParams.deptcodes = [];
      } else if (this.patientqueryParams.allhosp == 1) {
        this.patientqueryParams.deptcodes =
          this.patientqueryParams.leaveldeptcodes;
        this.patientqueryParams.hospitaldistrictcodes =
          this.patientqueryParams.leavehospitaldistrictcodes;
        this.patientqueryParams.leavehospitaldistrictcodes = [];
      } else if (this.patientqueryParams.searchscope == 2) {
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.patientqueryParams.leaveldeptcodes = [];
      } else {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      getTaskpatientQC(this.patientqueryParams).then((response) => {
        this.patientuserList = response.rows;
@@ -1829,7 +1825,6 @@
    getList() {},
    handleQuery() {
      // èŽ·å–å¤–éƒ¨æ‚£è€…
      console.log(this.patientqueryParams.allhosp, "aaalll");
      if (this.patientqueryParams.allhosp == 6) {
        this.Externallist();
@@ -1837,19 +1832,22 @@
        return;
      }
      if (this.patientqueryParams.topica == 0) {
      if (this.patientqueryParams.searchscope == 1) {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.patientqueryParams.leavehospitaldistrictcodes = [];
      } else if (this.patientqueryParams.searchscope == 2) {
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.leavehospitaldistrictcodes;
        this.patientqueryParams.leaveldeptcodes = store.getters.leaveldeptcodes;
      } else if (this.patientqueryParams.topica == 1) {
        this.patientqueryParams.leavehospitaldistrictcodes = null;
        this.patientqueryParams.leaveldeptcodes = store.getters.leaveldeptcodes;
      } else if (this.patientqueryParams.topica == 2) {
          store.getters.belongWards.map((obj) => obj.districtCode);
        this.patientqueryParams.leaveldeptcodes = [];
      } else {
        this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.patientqueryParams.leavehospitaldistrictcodes =
          store.getters.leavehospitaldistrictcodes;
        this.patientqueryParams.leaveldeptcodes = null;
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      if (
        !this.patientqueryParams.leavehospitaldistrictcodes ||
        !this.patientqueryParams.leavehospitaldistrictcodes[0]
src/views/patient/propaganda/particty copy.vue
@@ -714,7 +714,7 @@
    this.serviceType = Number(this.$route.query.serviceType);
    this.form.serviceType = Number(this.$route.query.serviceType);
    this.form.nhh = this.$route.query.nhh;
    this.listDept();
    // this.listDept();
    this.Acquisitiontype();
    this.Getdetails();
  },
src/views/patient/questionnaire/index.vue
@@ -739,10 +739,10 @@
          name: "待随访",
          value: 0,
        },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
@@ -883,7 +883,7 @@
          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.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
src/views/patient/shadow/index.vue
@@ -739,10 +739,10 @@
          name: "待随访",
          value: 0,
        },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        // {
        //   name: "表单已发送",
@@ -883,7 +883,7 @@
          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.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
src/views/patient/subsequent/index.vue
@@ -1141,7 +1141,7 @@
        }
      }
      this.$router.push({
        path: "/followvisit/record/detailpage/",
        path: "/followvisit/record/physical/",
        query: {
          taskid: row.taskid,
          patid: row.patid,
src/views/repositoryai/general/particulars/index.vue
@@ -573,7 +573,7 @@
  padding: 10px;
  .leftvlue-jbxx {
    font-size: 24px;
    border-left: 5px solid #5788fe;
    border-left: 5px solid #5788FE;
    padding-left: 5px;
    margin: 15px 0;
  }
@@ -594,7 +594,7 @@
  }
  .leftvlue-jbxx {
    font-size: 24px;
    border-left: 5px solid #5788fe;
    border-left: 5px solid #5788FE;
    padding-left: 5px;
    margin: 15px 0;
  }
src/views/repositoryai/templateku/configurat/measurement.vue
@@ -155,7 +155,6 @@
      this.timeout = this.$route.query.timeout;
      // é˜²æ­¢ç”¨æˆ·å¤šæ¬¡è¿žç»­ç‚¹å‡»å‘起请求,所以要先关闭上次的ws请求。
      closeWebsocket();
      console.log(this.id);
      const obj = {
        type: "text",
        userId: this.userid,
src/views/shortmessage/healthinformation/compilequer/index.vue
@@ -1,5 +1,5 @@
<template>
  <div class="Questionnairemanagement">
  <div class="NotificationManagement">
    <!-- å·¦ä¾§æ  -->
    <div class="sidecolumn">
      <el-steps finish-status="success" :active="Editprogress" simple>
@@ -10,13 +10,6 @@
            >
          </template>
        </el-step>
        <el-step>
          <template slot="title">
            <span style="cursor: pointer" @click="Editprogress = 2"
              >通知内容</span
            >
          </template>
        </el-step>
      </el-steps>
    </div>
    <!-- å³ä¾§æ•°æ® -->
@@ -24,6 +17,7 @@
      <!-- åŸºæœ¬ä¿¡æ¯ -->
      <div v-if="Editprogress == 1">
        <div class="leftvlue-jbxx">基本信息</div>
        <el-divider></el-divider>
        <el-form
          :model="ruleForm"
          :rules="rules"
@@ -58,20 +52,20 @@
            <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>
@@ -109,21 +103,6 @@
            </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
@@ -142,6 +121,7 @@
                @change="handleInputConfirm"
                filterable
                remote
                allow-create
                reserve-keyword
                default-first-option
                :remote-method="remoteMethodtag"
@@ -175,53 +155,23 @@
            ></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"
@@ -248,105 +198,12 @@
            </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>
    <!-- æ·»åŠ é€‚ç”¨ç–¾ç—…çª—å£ -->
@@ -361,9 +218,7 @@
</template>
<script>
import { quillEditor } from "vue-quill-editor";
import axios from "axios";
import {
  getheLibraryAssort,
  delheLibraryAssort,
@@ -379,115 +234,33 @@
  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,
@@ -513,42 +286,24 @@
      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();
@@ -559,18 +314,7 @@
    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;
@@ -579,16 +323,13 @@
      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)
@@ -598,51 +339,46 @@
      // é€šçŸ¥åˆ†ç±»
      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) {
@@ -650,7 +386,6 @@
        if (guid) {
          item.outid = guid;
        } else {
          console.log(this.ruleForm);
          item.outid = this.ruleForm.id;
        }
        item.icd10name = item.icdname;
@@ -662,20 +397,6 @@
      });
      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() {
@@ -707,7 +428,6 @@
        );
        if (!condition) {
          listDept({ deptId: item }).then((res) => {
            console.log("dept");
            res.data[0].type = 2;
            this.ruleForm.tempDetpRelevances.push(res.data[0]);
          });
@@ -724,12 +444,7 @@
      setTimeout(() => {
        this.submitForm();
      }, 1000);
      // this.submitForm();
    },
    // ä¿å­˜é¢˜ç›®ä¿¡æ¯
    Saveproblem() {},
    /** æŸ¥è¯¢é¢˜ç›®åˆ—表 */
    // æ–°å¢žå˜é‡
    addvariable() {
      this.variablelist.push({
@@ -741,16 +456,12 @@
    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,
@@ -762,11 +473,9 @@
      });
    },
    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;
    },
@@ -812,7 +521,7 @@
    showInput() {
      this.inputVisible = true;
    },
    // ç–¾ç—…-----------------------
    // ç–¾ç—…相关方法
    illnessUpdate() {
      if (this.id) {
        getillness({ outid: this.$route.query.id, type: 6 }).then((res) => {
@@ -823,9 +532,6 @@
        });
      }
    },
    // --------------------------
    // é¢„览模板
    PreviewTemplate() {
      this.drawer = true;
@@ -833,129 +539,12 @@
    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;
@@ -964,47 +553,34 @@
  -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;
@@ -1012,176 +588,41 @@
    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>
src/views/shortmessage/healthinformation/index.vue
@@ -141,7 +141,6 @@
                  icon="el-icon-plus"
                  size="medium"
                  @click="handleAdd"
                  v-hasPermi="['system:user:add']"
                  >新增</el-button
                >
              </el-col>