WXL (wul)
2 天以前 d54ac083e2992a5613f5cb22849db9742dbe9a9b
问卷联调
已修改10个文件
已添加3个文件
554 ■■■■■ 文件已修改
dist (2).zip 补丁 | 查看 | 原始文档 | blame | 历史
dist (3).zip 补丁 | 查看 | 原始文档 | blame | 历史
dist.zip 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/directives/preventReClick.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/tasklist/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/outsideChainnew.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/outsideChainwt.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/QuestionnaireTask.vue 242 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/propaganda/particty.vue 226 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
dist (2).zip
Binary files differ
dist (3).zip
Binary files differ
dist.zip
Binary files differ
src/main.js
@@ -25,6 +25,8 @@
import { codemirror } from "vue-codemirror";
import "@/utils/cm-setting.js";
Vue.component("codemirror", codemirror);
import preventReClick from '@/utils/directives/preventReClick';
Vue.use(preventReClick);
import { Quill } from "vue-quill-editor";
window.Quill = Quill;
src/utils/directives/preventReClick.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
export default {
  install(Vue) {
    Vue.directive('preventReClick', {
      inserted(el, binding) {
        el.addEventListener('click', () => {
          if (!el.disabled) {
            el.disabled = true;
            // å¯ä»¥æ·»åŠ ç¦ç”¨æ ·å¼ï¼ˆå¯é€‰ï¼‰
            el.style.pointerEvents = 'none';
            el.style.opacity = '0.6';
            // è®¾å®šæ¢å¤æ—¶é—´ï¼Œbinding.value æ˜¯æŒ‡ä»¤ä¼ å…¥çš„值(如:v-prevent-reclick="2000")
            setTimeout(() => {
              el.disabled = false;
              el.style.pointerEvents = 'all';
              el.style.opacity = '1';
            }, binding.value || 1500); // é»˜è®¤1.5秒
          }
        });
      }
    });
  }
};
src/utils/request.js
@@ -110,7 +110,7 @@
          }
        )
          .then(() => {
          this.$router.replace("/login");
          })
          .catch(() => {
            isRelogin.show = false;
src/views/followvisit/discharge/index.vue
@@ -1187,7 +1187,8 @@
        qystatus: "",
        btstatus: "",
      },
      endOut: 1,
      // endOut: 1,
      endOut: localStorage.getItem("orgname") == "丽水市中医院" ? 0 : 1, //0 å‡ºé™¢æ—¶é—´(正序)    1 å‡ºé™¢æ—¶é—´(倒序)   2 å‘送时间(正序)    3 å‘送时间(倒序)  7应随访日期(倒序) åº”随访日期(正序)
      endOuts: [
        {
          value: 0,
src/views/followvisit/record/detailpage/index.vue
@@ -314,6 +314,7 @@
                              :class="items.isabnormal ? 'red-star' : ''"
                              :key="indexs"
                              :label="items.optioncontent"
                               @click.native.prevent="handleRadioToggle(item, items.optioncontent)"
                              >{{ items.optioncontent }}</el-radio
                            >
                          </el-radio-group>
@@ -436,6 +437,7 @@
                              v-for="(items, index) in item.scriptResult"
                              :key="items"
                              :label="items"
                               @click.native.prevent="handleRadioToggle(item, items.optioncontent)"
                              >{{ items }}</el-radio
                            >
                          </el-radio-group>
@@ -1022,7 +1024,10 @@
        :visible.sync="CaldialogVisible"
        width="60%"
      >
        <CallCenterLs ref="callCenterModal" :initial-phone="currentPhoneNumber" />
        <CallCenterLs
          ref="callCenterModal"
          :initial-phone="currentPhoneNumber"
        />
      </el-dialog>
    </div>
  </div>
@@ -1692,7 +1697,7 @@
      // å‘¼å«åˆ¤æ–­
      if (this.orgname == "景宁畲族自治县人民医院") {
        this.CaldialogVisible = true;
        return
        return;
      }
      this.callType = type;
@@ -2022,6 +2027,23 @@
      }
      this.$forceUpdate();
    },
    // æ–°å¢žçš„切换选中/取消选中方法
    handleRadioToggle(questionItem, optionValue) {
      // å¦‚果点击的是当前已选中的选项,则取消选中
      if (questionItem.scriptResult === optionValue) {
        questionItem.scriptResult = ""; // æ¸…空选中值
        // åŒæ—¶é‡ç½®ä¸Žé€‰é¡¹ç›¸å…³çš„状态
        questionItem.isabnormal = false;
        questionItem.showAppendInput = false;
        // æ³¨æ„ï¼šå–消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回
        // å¦‚果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列
      } else {
        // å¦‚果点击的是未选中的选项,则通过更改绑定值来触发原始的 handleOptionChange æ–¹æ³•
        // è¿™é‡Œåªéœ€è¦æ”¹å˜ v-model ç»‘定的值,change事件会自动触发
        questionItem.scriptResult = optionValue;
        // åŽç»­çš„跳转等复杂逻辑会在 handleOptionChange ä¸­æ­£å¸¸æ‰§è¡Œ
      }
    },
    // åœ¨methods部分,修改handleOptionChange方法:
    handleOptionChange(selectedOption, questionIndex, options, a) {
      if (document.activeElement) {
src/views/followvisit/tasklist/index.vue
@@ -650,6 +650,7 @@
    this.tasktopic = this.$route.query.tasktopic
      ? this.$route.query.tasktopic
      : this.tasktopic;
    this.tasktopic = Number(this.tasktopic);
    this.getList();
    this.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
src/views/outsideChainnew.vue
@@ -414,7 +414,7 @@
        param1: this.taskid,
        param2: this.patid,
        type: this.type,
        ivrLibaTemplateScriptVOList: [],
        ivrTaskaTemplateScriptVOList: [],
      };
      const arr = structuredClone(this.questionList);
      console.log(arr, "srr");
@@ -439,7 +439,7 @@
          item.questionResult = JSON.stringify(item.questionResult);
        }
      });
      form.ivrLibaTemplateScriptVOList = arr;
      form.ivrTaskaTemplateScriptVOList = arr;
      Cachequestionnaire(form).then((res) => {
        if (res.code == 200) {
          if (subm) {
src/views/outsideChainwt.vue
@@ -35,7 +35,7 @@
              >
                <el-radio
                  border
                  v-for="(items, index) in item.svyLibTemplateTargetoptions"
                  v-for="(items, index) in item.svyTaskTemplateTargetoptions"
                  :class="
                    items.isabnormal && item.scriptResult == items.optioncontent
                      ? 'red-star'
@@ -68,7 +68,7 @@
                <el-checkbox
                  border
                  @change="$forceUpdate()"
                  v-for="(items, indexs) in item.svyLibTemplateTargetoptions"
                  v-for="(items, indexs) in item.svyTaskTemplateTargetoptions"
                  :key="indexs"
                  :label="items.optioncontent"
                >
@@ -165,7 +165,7 @@
        //   scriptType: 1,
        //   scriptContent: "您的年龄范围是?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //   svyTaskTemplateTargetoptions: [
        //     { optioncontent: "18-25", value: "18-25", isabnormal: true },
        //     { optioncontent: "26-35", value: "26-35" },
        //     { optioncontent: "36-45", value: "36-45" },
@@ -178,7 +178,7 @@
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //   svyTaskTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer" },
@@ -191,7 +191,7 @@
        //   scriptType: 2,
        //   scriptContent: "您感兴趣的活动有哪些?",
        //   scriptResult: [],
        //   svyLibTemplateTargetoptions: [
        //   svyTaskTemplateTargetoptions: [
        //     { optioncontent: "旅游", value: "travel", isabnormal: true },
        //     { optioncontent: "阅读", value: "reading", isabnormal: true },
        //     { optioncontent: "运动", value: "sports", isabnormal: true },
@@ -204,7 +204,7 @@
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //   svyTaskTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer" },
@@ -217,7 +217,7 @@
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //   svyTaskTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer", isabnormal: true },
@@ -230,7 +230,7 @@
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //   svyTaskTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer" },
@@ -375,12 +375,12 @@
      let form = {
        param1: this.taskid,
        param2: this.patid,
        svyLibTemplateScriptVOS: [],
        svyTaskTemplateScriptVOS: [],
      };
      const arr = structuredClone(this.questionList);
      console.log(arr,'srr')
      arr.forEach((item, index) => {
        var obj = item.svyLibTemplateTargetoptions.find(
        var obj = item.svyTaskTemplateTargetoptions.find(
          (items) => items.optioncontent == item.scriptResult
        );
        if (obj) {
@@ -399,7 +399,7 @@
          item.scriptResult = JSON.stringify(item.scriptResult);
        }
      });
      form.svyLibTemplateScriptVOS = arr;
      form.svyTaskTemplateScriptVOS = arr;
      Cachequestionnaire(form).then((res) => {
        if (res.code == 200) {
          if (subm) {
@@ -411,7 +411,7 @@
    // å¤„理单选选项
    handleOptionChange(selectedvalue, index, arr) {
      // æŸ¥æ‰¾é€‰ä¸­çš„选项对象
      const selectedOption = arr.svyLibTemplateTargetoptions.find(
      const selectedOption = arr.svyTaskTemplateTargetoptions.find(
        (option) => option.optioncontent == selectedvalue
      );
      if (selectedOption) {
@@ -426,7 +426,7 @@
      // ï¿½ï¿½åŠ åˆ†æ•°
      let score = 0;
      selectedvalues.forEach((value) => {
        const selectedOption = arr.svyLibTemplateTargetoptions.find(
        const selectedOption = arr.svyTaskTemplateTargetoptions.find(
          (option) => option.optioncontent == value
        );
        if (selectedOption) {
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -445,10 +445,13 @@
        <el-button type="primary" @click="nextstep('ruleForm')">{{
          quote ? "立即创建" : "派发患者配置"
        }}</el-button>
        <el-button type="success" @click="submitForm('ruleForm')">{{
          quote ? "立即创建" : "确认服务配置"
        }}</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
        <el-button
          :loading="submitLoading"
          type="success"
          @click="submitForm('ruleForm')"
          >{{ quote ? "立即创建" : "确认服务配置" }}</el-button
        >
        <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
      </div>
      <!-- ä»»åŠ¡è¯¦æƒ… -->
      <div v-if="Editprogress == 2">
@@ -529,10 +532,13 @@
          </div>
        </div>
        <el-button type="primary" @click="laststep()">上一步</el-button>
        <el-button type="success" @click="submitForm('ruleForm')">{{
          quote ? "立即创建" : "确认服务配置"
        }}</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
        <el-button
          :loading="submitLoading"
          type="success"
          @click="submitForm('ruleForm')"
          >{{ quote ? "立即创建" : "确认服务配置" }}</el-button
        >
        <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
      </div>
    </div>
    <!-- æ·»åŠ æ‚£è€… -->
@@ -940,6 +946,7 @@
      previewid: "", //任务模板传递id
      libName: "",
      templateor: false,
      submitLoading: false, // æŽ§åˆ¶æŒ‰é’®åŠ è½½çŠ¶æ€
      objyl: {},
      overallCase: [], //选择患者总
      allpids: [],
@@ -984,6 +991,7 @@
        { label: "身份证", width: "200", prop: "idcardno" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "责任护士", width: "", prop: "nurseName" },
        { label: "主治医生", width: "", prop: "drname" },
        { label: "科室", width: "240", prop: "dept" },
@@ -997,6 +1005,7 @@
        { label: "身份证", width: "200", prop: "sfzh" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "出院天数", width: "", prop: "endDay" },
        { label: "责任护士", width: "", prop: "nurseName" },
        { label: "主治医生", width: "", prop: "drname" },
@@ -1422,107 +1431,126 @@
    },
    // ä¿å­˜
    submitForm(formName) {
      if (this.time4 && this.form.sendType == 3)
        this.form.showTimeMorn = this.time4;
      this.form.sendTimeslot = [
        {
          begantime: this.time4,
          endtime: "",
          xh: 1,
        },
      ];
      if (this.form.appltype == 1) {
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 2) {
        this.deptcodesWards = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 3) {
        this.deptcodesWards = [];
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
      } else if (this.form.appltype == 4) {
        this.deptcodesWards = [];
        this.illnesscodes = [];
        this.leavehospitaldistrictcodes = [];
      }
      if (this.checkList) {
        this.form.preachform = this.checkList.join(",");
        this.form.preachformList = this.selectedOrder;
      } else {
        this.$modal.msgError("请选择服务类型");
      console.log(this.submitLoading);
      if (this.submitLoading) {
        return;
      }
      console.log(this.operationcodes[0]);
      console.log(this.operationcodes);
      // ç¬¬äºŒæ­¥ï¼šå¼€å¯åŠ è½½çŠ¶æ€ï¼Œç¦ç”¨æŒ‰é’®
      this.submitLoading = true;
      console.log(this.submitLoading);
      if (
        this.deptcodesWards[0] ||
        this.leavehospitaldistrictcodes[0] ||
        this.diagglist[0] ||
        this.operationcodes[0] ||
        this.form.longTask == 2 ||
        this.serviceType == 14
      ) {
      } else {
        this.$modal.msgError("请选择任务关联条件");
        return;
      }
      //暂停任务患者限制
      // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
      //   this.$modal.msgError("请选择病人");
      //   return;
      // }
      if (!this.form.templatename && !this.templateor) {
        this.$modal.msgError("未选择模板");
        return;
      }
      if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) {
      } else if (
        (this.form.sendType == 3 && this.time4) ||
        this.form.longTask
      ) {
      } else {
        return this.$modal.msgError("时间信息缺失");
      }
      const filteredArray = this.variableList.filter(
        (item) =>
          item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
      );
      this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
      if (this.form.taskid) {
        this.form.isoperation = 2;
      } else {
        this.form.isoperation = 1;
      }
      if (!this.form.type) {
        this.form.type = this.$route.query.type;
      }
      this.form.serviceType = this.serviceType;
      this.form.deptcode = this.deptcodesWards.join(",");
      this.form.leavehospitaldistrictcode =
        this.leavehospitaldistrictcodes.join(",");
      this.form.opcode = this.operationcodes.join(",");
      this.form.icd10code = this.diagglist
        .map((item) => item.icdcode)
        .join(",");
      Editsingletask(this.form).then((res) => {
        if (res.code == 200) {
          if (this.form.taskid) {
            this.$modal.msgSuccess("修改成功");
          } else {
            this.$modal.msgSuccess("新增成功");
          }
          this.$router.push({
            path: "/followvisit/tasklist",
            query: { tasktopic: this.form.serviceType },
          });
      try {
        if (this.time4 && this.form.sendType == 3)
          this.form.showTimeMorn = this.time4;
        this.form.sendTimeslot = [
          {
            begantime: this.time4,
            endtime: "",
            xh: 1,
          },
        ];
        if (this.form.appltype == 1) {
          this.leavehospitaldistrictcodes = [];
          this.operationcodes = [];
          this.illnesscodes = [];
        } else if (this.form.appltype == 2) {
          this.deptcodesWards = [];
          this.operationcodes = [];
          this.illnesscodes = [];
        } else if (this.form.appltype == 3) {
          this.deptcodesWards = [];
          this.leavehospitaldistrictcodes = [];
          this.operationcodes = [];
        } else if (this.form.appltype == 4) {
          this.deptcodesWards = [];
          this.illnesscodes = [];
          this.leavehospitaldistrictcodes = [];
        }
      });
        if (this.checkList) {
          this.form.preachform = this.checkList.join(",");
          this.form.preachformList = this.selectedOrder;
        } else {
          this.$modal.msgError("请选择服务类型");
          return;
        }
        console.log(this.operationcodes[0]);
        console.log(this.operationcodes);
        if (
          this.deptcodesWards[0] ||
          this.leavehospitaldistrictcodes[0] ||
          this.diagglist[0] ||
          this.operationcodes[0] ||
          this.form.longTask == 2 ||
          this.serviceType == 3
        ) {
        } else {
          this.$modal.msgError("请选择任务关联条件");
          return;
        }
        //暂停任务患者限制
        // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
        //   this.$modal.msgError("请选择病人");
        //   return;
        // }
        if (!this.form.templatename && !this.templateor) {
          this.$modal.msgError("未选择模板");
          return;
        }
        if (
          (this.form.sendType == 1 && this.time1) ||
          this.form.sendType == 2
        ) {
        } else if (
          (this.form.sendType == 3 && this.time4) ||
          this.form.longTask
        ) {
        } else {
          return this.$modal.msgError("时间信息缺失");
        }
        const filteredArray = this.variableList.filter(
          (item) =>
            item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
        );
        this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
        if (this.form.taskid) {
          this.form.isoperation = 2;
        } else {
          this.form.isoperation = 1;
        }
        if (!this.form.type) {
          this.form.type = this.$route.query.type;
        }
        this.form.serviceType = this.serviceType;
        this.form.deptcode = this.deptcodesWards.join(",");
        this.form.leavehospitaldistrictcode =
          this.leavehospitaldistrictcodes.join(",");
        this.form.opcode = this.operationcodes.join(",");
        this.form.icd10code = this.diagglist
          .map((item) => item.icdcode)
          .join(",");
        Editsingletask(this.form).then((res) => {
          if (res.code == 200) {
            if (this.form.taskid) {
              this.$modal.msgSuccess("修改成功");
            } else {
              this.$modal.msgSuccess("新增成功");
            }
            this.$router.push({
              path: "/followvisit/tasklist",
              query: { tasktopic: this.form.serviceType },
            });
            this.submitLoading = false;
          }
        });
      } catch (error) {
        this.submitLoading = false;
      } finally {
        // ç¬¬å››æ­¥ï¼šæ— è®ºæˆåŠŸæˆ–å¤±è´¥ï¼Œæœ€ç»ˆéƒ½å…³é—­åŠ è½½çŠ¶æ€
      }
    },
    // ----------------------表格子组件事件
@@ -1694,6 +1722,7 @@
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
@@ -1708,6 +1737,7 @@
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
@@ -1722,6 +1752,7 @@
          { label: "电话号码", width: "180", prop: "telcode" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
@@ -1881,6 +1912,7 @@
        { label: "身份证", width: "200", prop: "idcardno" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "出院天数", width: "", prop: "endDay" },
      ];
      this.patientqueryParams.pageSize = 1000;
src/views/patient/propaganda/particty.vue
@@ -442,7 +442,7 @@
        <el-button type="success" @click="nextstep('ruleForm')">{{
          quote ? "立即创建" : "任务详情配置"
        }}</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
        <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
      </div>
      <!-- ä»»åŠ¡è¯¦æƒ… -->
      <div v-if="Editprogress == 2">
@@ -523,10 +523,13 @@
          </div>
        </div>
        <el-button type="primary" @click="laststep()">上一步</el-button>
        <el-button type="success" @click="submitForm('11')">{{
          quote ? "立即创建" : "确认任务配置"
        }}</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
        <el-button
          :loading="submitLoading"
          type="success"
          @click="submitForm('11')"
          >{{ quote ? "立即创建" : "确认任务配置" }}</el-button
        >
        <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
      </div>
    </div>
    <!-- æ·»åŠ æ‚£è€… -->
@@ -934,6 +937,7 @@
      libName: "",
      username: "",
      templateor: false,
      submitLoading: false, // æŽ§åˆ¶æŒ‰é’®åŠ è½½çŠ¶æ€
      objyl: {},
      overallCase: [], //选择患者总
      allpids: [],
@@ -981,6 +985,7 @@
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "责任护士", width: "", prop: "nurseName" },
        { label: "主治医生", width: "", prop: "drname" },
        { label: "科室", width: "240", prop: "dept" },
@@ -994,6 +999,7 @@
        { label: "电话号码", width: "180", prop: "telcode" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "电话", width: "180", prop: "telcode" },
        { label: "出院天数", width: "", prop: "endDay" },
        { label: "责任护士", width: "", prop: "nurseName" },
        { label: "主治医生", width: "", prop: "drname" },
@@ -1435,105 +1441,120 @@
    },
    // ä¿å­˜
    submitForm(type) {
      if (this.templateor && type) this.templateor = false;
      if (this.time4 && this.form.sendType == 3)
        this.form.showTimeMorn = this.time4;
      this.form.sendTimeslot = [
        {
          begantime: this.time4,
          endtime: "",
          xh: 1,
        },
      ];
      if (this.form.appltype == 1) {
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 2) {
        this.deptcodesWards = [];
        this.operationcodes = [];
        this.illnesscodes = [];
      } else if (this.form.appltype == 3) {
        this.deptcodesWards = [];
        this.leavehospitaldistrictcodes = [];
        this.operationcodes = [];
      } else if (this.form.appltype == 4) {
        this.deptcodesWards = [];
        this.illnesscodes = [];
        this.leavehospitaldistrictcodes = [];
      }
      if (this.checkList) {
        this.form.preachform = this.checkList.join(",");
        this.form.preachformList = this.selectedOrder;
      } else {
        this.$modal.msgError("请选择服务类型");
      if (this.submitLoading) {
        return;
      }
      if (
        this.deptcodesWards[0] ||
        this.leavehospitaldistrictcodes[0] ||
        this.diagglist[0] ||
        this.operationcodes[0] ||
        this.form.longTask == 2 ||
        this.serviceType == 14
      ) {
      } else {
        this.$modal.msgError("请选择任务关联条件");
        return;
      }
      // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
      //   this.$modal.msgError("请选择病人");
      //   return;
      // }
      if (!this.form.templatename && !this.templateor) {
        this.$modal.msgError("未选择模板");
        return;
      }
      if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) {
      } else if (
        (this.form.sendType == 3 && this.time4) ||
        this.form.longTask
      ) {
      } else {
        return this.$modal.msgError("时间信息缺失");
      }
      const filteredArray = this.variableList.filter(
        (item) =>
          item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
      );
      this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
      if (this.form.taskid) {
        this.form.isoperation = 2;
      } else {
        this.form.isoperation = 1;
      }
      if (!this.form.type) {
        this.form.type = this.$route.query.type;
      }
      this.form.serviceType = this.serviceType;
      this.form.deptcode = this.deptcodesWards.join(",");
      this.form.leavehospitaldistrictcode =
        this.leavehospitaldistrictcodes.join(",");
      this.form.opcode = this.operationcodes.join(",");
      this.form.icd10code = this.diagglist
        .map((item) => item.icdcode)
        .join(",");
      Editsingletask(this.form).then((res) => {
        if (res.code == 200) {
          if (this.form.taskid) {
            this.$modal.msgSuccess("修改成功");
          } else {
            this.$modal.msgSuccess("新增成功");
          }
          this.$router.push({
            path: "/followvisit/tasklist",
            query: { tasktopic: this.form.serviceType },
          });
      // ç¬¬äºŒæ­¥ï¼šå¼€å¯åŠ è½½çŠ¶æ€ï¼Œç¦ç”¨æŒ‰é’®
      this.submitLoading = true;
      try {
        if (this.templateor && type) this.templateor = false;
        if (this.time4 && this.form.sendType == 3)
          this.form.showTimeMorn = this.time4;
        this.form.sendTimeslot = [
          {
            begantime: this.time4,
            endtime: "",
            xh: 1,
          },
        ];
        if (this.form.appltype == 1) {
          this.leavehospitaldistrictcodes = [];
          this.operationcodes = [];
          this.illnesscodes = [];
        } else if (this.form.appltype == 2) {
          this.deptcodesWards = [];
          this.operationcodes = [];
          this.illnesscodes = [];
        } else if (this.form.appltype == 3) {
          this.deptcodesWards = [];
          this.leavehospitaldistrictcodes = [];
          this.operationcodes = [];
        } else if (this.form.appltype == 4) {
          this.deptcodesWards = [];
          this.illnesscodes = [];
          this.leavehospitaldistrictcodes = [];
        }
      });
        if (this.checkList) {
          this.form.preachform = this.checkList.join(",");
          this.form.preachformList = this.selectedOrder;
        } else {
          this.$modal.msgError("请选择服务类型");
          return;
        }
        if (
          this.deptcodesWards[0] ||
          this.leavehospitaldistrictcodes[0] ||
          this.diagglist[0] ||
          this.operationcodes[0] ||
          this.form.longTask == 2 ||
          this.serviceType == 3
        ) {
        } else {
          this.$modal.msgError("请选择任务关联条件");
          return;
        }
        // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
        //   this.$modal.msgError("请选择病人");
        //   return;
        // }
        if (!this.form.templatename && !this.templateor) {
          this.$modal.msgError("未选择模板");
          return;
        }
        if (
          (this.form.sendType == 1 && this.time1) ||
          this.form.sendType == 2
        ) {
        } else if (
          (this.form.sendType == 3 && this.time4) ||
          this.form.longTask
        ) {
        } else {
          return this.$modal.msgError("时间信息缺失");
        }
        const filteredArray = this.variableList.filter(
          (item) =>
            item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
        );
        this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
        if (this.form.taskid) {
          this.form.isoperation = 2;
        } else {
          this.form.isoperation = 1;
        }
        if (!this.form.type) {
          this.form.type = this.$route.query.type;
        }
        this.form.serviceType = this.serviceType;
        this.form.deptcode = this.deptcodesWards.join(",");
        this.form.leavehospitaldistrictcode =
          this.leavehospitaldistrictcodes.join(",");
        this.form.opcode = this.operationcodes.join(",");
        this.form.icd10code = this.diagglist
          .map((item) => item.icdcode)
          .join(",");
        Editsingletask(this.form).then((res) => {
          if (res.code == 200) {
            if (this.form.taskid) {
              this.$modal.msgSuccess("修改成功");
            } else {
              this.$modal.msgSuccess("新增成功");
            }
            this.submitLoading = false;
            this.$router.push({
              path: "/followvisit/tasklist",
              query: { tasktopic: this.form.serviceType },
            });
          }
        });
      } catch (error) {
        this.submitLoading = false;
      } finally {
        // ç¬¬å››æ­¥ï¼šæ— è®ºæˆåŠŸæˆ–å¤±è´¥ï¼Œæœ€ç»ˆéƒ½å…³é—­åŠ è½½çŠ¶æ€
      }
    },
    // ----------------------表格子组件事件
@@ -1645,6 +1666,7 @@
          { label: "电话号码", width: "180", prop: "telcode" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
@@ -1659,6 +1681,7 @@
          { label: "电话号码", width: "180", prop: "telcode" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },
@@ -1673,6 +1696,7 @@
          { label: "电话号码", width: "180", prop: "telcode" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "电话", width: "180", prop: "telcode" },
          { label: "出院天数", width: "", prop: "endDay" },
          { label: "责任护士", width: "", prop: "nurseName" },
          { label: "医生", width: "", prop: "drname" },