From 6071c30d6dd76d75b973676f823b4f2ee036810b Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期四, 04 六月 2026 10:17:52 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/QuestionnaireTask.vue |  613 +++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 415 insertions(+), 198 deletions(-)

diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index 06667b3..2f19c12 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -69,7 +69,7 @@
                     placeholder="璇疯緭鍏ヤ换鍔℃弿杩�"
                   />
                 </el-form-item>
-                <el-form-item label="鏈嶅姟褰㈠紡">
+                <!-- <el-form-item label="鏈嶅姟褰㈠紡">
                   <el-radio-group v-model="checkList">
                     <el-radio
                       v-for="(item, index) in checkboxlist"
@@ -79,16 +79,17 @@
                       {{ item.label }}</el-radio
                     >
                   </el-radio-group>
-                </el-form-item>
-                <!-- <el-form-item label="鏈嶅姟褰㈠紡">
+                </el-form-item> -->
+                <el-form-item label="鏈嶅姟褰㈠紡">
                   <SortCheckbox
                     v-model="checkList"
                     :options="checkboxlist"
+                    :initialselectedOrder="selectedOrder"
                     value-key="value"
                     label-key="label"
                     @change="checkSelectionChange"
                   />
-                </el-form-item> -->
+                </el-form-item>
                 <el-form-item label="鎵ц鍛ㄦ湡" prop="longTask">
                   <el-radio-group v-model="form.longTask">
                     <el-radio :label="0">鑷畾涔夊懆鏈�</el-radio>
@@ -259,29 +260,6 @@
                   ></el-col>
                 </el-row>
                 <el-row v-if="form.appltype == 3">
-                  <!-- <el-col :span="20"
-                    ><el-form-item label="閫傜敤鐤剧梾" prop="region">
-                      <el-select
-                        v-model="illnesscodes"
-                        style="width: 400px"
-                        @remove-tag="removediagg"
-                        size="medium"
-                        :remote-method="remotedonor"
-                        multiple
-                        filterable
-                        remote
-                        placeholder="璇烽�夋嫨鐥呭尯"
-                      >
-                        <el-option
-                          class="ruleFormaa"
-                          v-for="item in donorchargeList"
-                          :key="item.icdcode"
-                          :label="item.icdname"
-                          :value="item.icdcode"
-                        >
-                        </el-option>
-                      </el-select> </el-form-item
-                  ></el-col> -->
                   <div class="xinz-infs">
                     <el-form-item>
                       <template #label>
@@ -313,17 +291,93 @@
                       <!-- <el-tag v-if="hasMore" type="info">+{{ remaining }} more</el-tag> -->
                     </el-form-item>
                   </div>
+                  <div
+                    style="
+                      margin-bottom: 20px;
+                      padding: 8px 12px;
+                      background-color: #f0f9ff;
+                      border-left: 4px solid #409eff;
+                    "
+                  >
+                    <p
+                      style="
+                        margin: 0;
+                        color: #606266;
+                        font-size: 13px;
+                        line-height: 1.4;
+                      "
+                    >
+                      <i
+                        class="el-icon-info"
+                        style="color: #409eff; margin-right: 6px"
+                      ></i>
+                      閽堝鍚屼竴鐤剧梾鍦ㄥ绉戝/鐥呭尯涓嬪瓨鍦ㄧ殑鎯呭喌锛屽彲閫夋嫨鎬ч厤缃浐瀹氱瀹�/鐥呭尯
+                    </p>
+                  </div>
+                  <!-- 鏂板锛氱柧鐥呭叧鑱斾笅鐨勭瀹ら厤缃紙鍗曢�夛級 -->
+                  <el-row :gutter="20" style="margin-top: 20px">
+                    <el-col :span="12">
+                      <el-form-item label="鍏宠仈绉戝" prop="diseaseDept">
+                        <el-select
+                          v-model="diseaseDept"
+                          style="width: 100%"
+                          clearable
+                          filterable
+                          placeholder="璇烽�夋嫨绉戝锛堝彲閫夛級"
+                          value-key="deptCode"
+                          @change="handleDiseaseDeptChange"
+                        >
+                          <el-option
+                            v-for="item in belongDepts"
+                            :key="item.deptCode"
+                            :label="item.deptName"
+                            :value="item"
+                          ></el-option>
+                        </el-select>
+                        <div v-if="diseaseDept" class="selected-info">
+                          宸查�夋嫨: {{ diseaseDept.deptName }} ({{
+                            diseaseDept.deptCode
+                          }})
+                        </div>
+                      </el-form-item>
+                    </el-col>
+
+                    <el-col :span="12">
+                      <el-form-item label="鍏宠仈鐥呭尯" prop="diseaseWard">
+                        <el-select
+                          v-model="diseaseWard"
+                          style="width: 100%"
+                          clearable
+                          filterable
+                          placeholder="璇烽�夋嫨鐥呭尯锛堝彲閫夛級"
+                          value-key="districtCode"
+                          @change="handleDiseaseWardChange"
+                        >
+                          <el-option
+                            v-for="item in belongWards"
+                            :key="item.districtCode"
+                            :label="item.districtName"
+                            :value="item"
+                          ></el-option>
+                        </el-select>
+                        <div v-if="diseaseWard" class="selected-info">
+                          宸查�夋嫨: {{ diseaseWard.districtName }} ({{
+                            diseaseWard.districtCode
+                          }})
+                        </div>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
                 </el-row>
                 <el-row v-if="form.appltype == 4">
                   <el-col :span="20"
                     ><el-form-item label="閫傜敤鎵嬫湳" prop="region">
                       <el-select
-                        v-model="operationcodes"
+                        v-model="form.oplevelcode"
                         style="width: 400px"
                         @remove-tag="removeopera"
                         size="medium"
                         :remote-method="remoteopcode"
-                        multiple
                         filterable
                         remote
                         placeholder="璇烽�夋嫨鎵嬫湳"
@@ -331,8 +385,8 @@
                         <el-option
                           class="ruleFormaa"
                           v-for="item in baseoperaList"
-                          :label="item.opdesc"
-                          :value="item.opcode"
+                          :label="item.label"
+                          :value="item.value"
                         >
                         </el-option>
                       </el-select> </el-form-item
@@ -374,10 +428,6 @@
                       placeholder="璇风偣鍑诲彸渚ч�夋嫨"
                     />
                     <el-button
-                      v-if="
-                        (form.templateid && form.sendState == 1) ||
-                        !form.templateid
-                      "
                       style="margin-left: 10px"
                       type="primary"
                       icon="el-icon-edit"
@@ -444,10 +494,13 @@
         <el-button type="primary" @click="nextstep('ruleForm')">{{
           quote ? "绔嬪嵆鍒涘缓" : "娲惧彂鎮h�呴厤缃�"
         }}</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">
@@ -528,10 +581,13 @@
           </div>
         </div>
         <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
-        <el-button type="success" @click="submitForm('ruleForm')">{{
-          quote ? "绔嬪嵆鍒涘缓" : "纭鏈嶅姟閰嶇疆"
-        }}</el-button>
-        <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
+        <el-button
+          :loading="submitLoading"
+          type="success"
+          @click="submitForm('ruleForm')"
+          >{{ quote ? "绔嬪嵆鍒涘缓" : "纭鏈嶅姟閰嶇疆" }}</el-button
+        >
+        <!-- <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> -->
       </div>
     </div>
     <!-- 娣诲姞鎮h�� -->
@@ -632,8 +688,8 @@
     <!-- 妯℃澘棰勮 -->
     <el-dialog title="妯℃澘棰勮" :visible.sync="previewtf" width="70%">
       <el-tabs type="border-card">
-        <el-tab-pane label="妯℃澘鍩虹鏁版嵁"
-          ><div class="preview-left">
+        <el-tab-pane label="妯℃澘鍩虹鏁版嵁">
+          <div class="preview-left">
             <el-form :model="objyl" label-width="100px" class="demo-objyl">
               <el-row :gutter="10">
                 <el-col :span="14">
@@ -723,10 +779,11 @@
                 >
                 </el-input
               ></el-form-item>
-            </el-form></div
-        ></el-tab-pane>
-        <el-tab-pane label="闂灞曠ず"
-          ><div class="preview-left">
+            </el-form>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane label="闂灞曠ず">
+          <div class="preview-left">
             <div v-for="item in questionList">
               <!-- 鍗曢�� -->
               <div
@@ -735,7 +792,7 @@
                 v-if="item.scriptType == 1"
               >
                 <div class="dev-text">
-                  {{ item.sort }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
+                  {{ item.sort }}. [鍗曢�塢<span>{{ item.scriptContent }}</span>
                 </div>
                 <div class="dev-xx">
                   <el-radio-group v-model="item.remark">
@@ -755,7 +812,7 @@
                 v-if="item.scriptType == 2"
               >
                 <div class="dev-text">
-                  {{ item.sort }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
+                  {{ item.sort }}. [澶氶�塢<span>{{ item.scriptContent }}</span>
                 </div>
                 <div class="dev-xx">
                   <el-checkbox-group v-model="item.qremark">
@@ -776,7 +833,7 @@
                 v-if="item.scriptType == 4"
               >
                 <div class="dev-text">
-                  {{ item.sort }}銆乕闂瓟]<span>{{ item.scriptContent }}</span>
+                  {{ item.sort }}. [闂瓟]<span>{{ item.scriptContent }}</span>
                 </div>
                 <div class="dev-xx">
                   <el-input
@@ -787,8 +844,9 @@
                   </el-input>
                 </div>
               </div>
-            </div></div
-        ></el-tab-pane>
+            </div>
+          </div>
+        </el-tab-pane>
       </el-tabs>
 
       <span slot="footer" class="dialog-footer">
@@ -910,6 +968,7 @@
   Externallist,
   getQtemplatelist,
   getQtemplateobj,
+  taskgetQtemplateobj,
   TaskQuestioncomit,
   deleteTaskQuestioncomit,
   Questionnairetaskgetson,
@@ -926,6 +985,7 @@
 import OptionalForm from "@/components/OptionalForm"; //鐤剧梾娣诲姞缁勪欢
 import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢
 import SortCheckbox from "@/components/SortCheckbox"; //琛ㄦ牸缁勪欢
+
 import { MessageBox } from "element-ui";
 
 export default {
@@ -938,6 +998,7 @@
       previewid: "", //浠诲姟妯℃澘浼犻�抜d
       libName: "",
       templateor: false,
+      submitLoading: false, // 鎺у埗鎸夐挳鍔犺浇鐘舵��
       objyl: {},
       overallCase: [], //閫夋嫨鎮h�呮��
       allpids: [],
@@ -956,14 +1017,18 @@
       dialogVisiblepatientjb: false, //娣诲姞鐤剧梾寮规
       deptcodesWards: [], //绉戝鏁版嵁
       leavehospitaldistrictcodes: [], //鐥呭尯鏁版嵁
-      operationcodes: [], //鎵嬫湳鏁版嵁
       illnesscodes: [], //鐤剧梾鏁版嵁
       radio: 1,
       checkboxlist: [],
       tableLabel: [],
       questionList: [],
       donorchargeList: [],
-      baseoperaList: [],
+      baseoperaList: [
+        { value: "1", label: "涓�绾ф墜鏈�" },
+        { value: "2", label: "浜岀骇鎵嬫湳" },
+        { value: "3", label: "涓夌骇鎵嬫湳" },
+        { value: "4", label: "鍥涚骇鎵嬫湳" },
+      ],
       usable: [
         { value: "0", label: "鍙敤" },
         { value: "1", label: "鍋滅敤" },
@@ -982,6 +1047,7 @@
         { label: "韬唤璇�", width: "200", prop: "idcardno" },
         { label: "鎬у埆", width: "", prop: "sex" },
         { label: "骞撮緞", width: "", prop: "age" },
+        { label: "鐢佃瘽", width: "180", prop: "telcode" },
         { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
         { label: "涓绘不鍖荤敓", width: "", prop: "drname" },
         { label: "绉戝", width: "240", prop: "dept" },
@@ -995,6 +1061,7 @@
         { label: "韬唤璇�", width: "200", prop: "sfzh" },
         { label: "鎬у埆", width: "", prop: "sex" },
         { label: "骞撮緞", width: "", prop: "age" },
+        { label: "鐢佃瘽", width: "180", prop: "telcode" },
         { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
         { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
         { label: "涓绘不鍖荤敓", width: "", prop: "drname" },
@@ -1030,6 +1097,10 @@
       // 鏃堕棿澶勭悊
       daytime: [], //鏃ユ湡
       applydaytime: [], //璁$畻鏃ユ湡
+      diseaseDept: null, // 鐤剧梾鍏宠仈涓嬬殑绉戝锛堝瓨鍌ㄦ暣涓璞★級
+      diseaseWard: null, // 鐤剧梾鍏宠仈涓嬬殑鐥呭尯锛堝瓨鍌ㄦ暣涓璞★級
+      diseaseDepts: "",
+      diseaseWards: "",
       time1: "", //涓婂崍鏃堕棿娈�
       time2: "", //涓嬪崍鏃堕棿娈�
       time3: "", //鏅氫笂鏃堕棿娈�
@@ -1192,8 +1263,9 @@
         sendType: [
           { required: true, message: "鍙戦�佽缃笉鑳戒负绌�", trigger: "blur" },
         ],
-        deptcode: [
-          { required: true, message: "閫傜敤绉戝涓嶈兘涓虹┖", trigger: "blur" },
+
+        longTask: [
+          { required: true, message: "璇烽�夋嫨鎵ц鍛ㄦ湡", trigger: "blur" },
         ],
         // leavehospitaldistrictcode: [
         //   { required: true, message: "閫傜敤鐥呭尯涓嶈兘涓虹┖", trigger: "blur" },
@@ -1307,6 +1379,10 @@
       ) {
         this.checkboxlist = [
           {
+            value: "1",
+            label: "浜哄伐",
+          },
+          {
             value: "3",
             label: "鏅鸿兘璇煶",
           },
@@ -1372,6 +1448,8 @@
         this.form.serviceType == 3 ||
         this.form.serviceType == 5 ||
         this.form.serviceType == 16 ||
+        this.form.serviceType == 18 ||
+        this.form.serviceType == 19 ||
         this.form.serviceType == 4
       ) {
         this.checkboxlist = [
@@ -1420,107 +1498,160 @@
     },
     // 淇濆瓨
     submitForm(formName) {
-      if (this.time4 && this.form.sendType == 3)
-        this.form.showTimeMorn = this.time4;
-      this.form.sendTimeslot = [
-        {
-          begantime: this.time4,
-          endtime: "",
-          xh: 1,
-        },
-      ];
-      if (this.form.appltype == 1) {
-        this.leavehospitaldistrictcodes = [];
-        this.operationcodes = [];
-        this.illnesscodes = [];
-      } else if (this.form.appltype == 2) {
-        this.deptcodesWards = [];
-        this.operationcodes = [];
-        this.illnesscodes = [];
-      } else if (this.form.appltype == 3) {
-        this.deptcodesWards = [];
-        this.leavehospitaldistrictcodes = [];
-        this.operationcodes = [];
-      } else if (this.form.appltype == 4) {
-        this.deptcodesWards = [];
-        this.illnesscodes = [];
-        this.leavehospitaldistrictcodes = [];
-      }
-      if (this.checkList) {
-        this.form.preachform = this.checkList;
-      } else {
-        this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+      console.log(this.submitLoading, "1");
+
+      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
-      ) {
-      } else {
-        this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
-        return;
-      }
-      //鏆傚仠浠诲姟鎮h�呴檺鍒�
-      // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
-      //   this.$modal.msgError("璇烽�夋嫨鐥呬汉");
-      //   return;
-      // }
+      try {
+        if (this.time4 && this.form.sendType == 3)
+          this.form.showTimeMorn = this.time4;
+        this.form.sendTimeslot = [
+          {
+            begantime: this.time4,
+            endtime: "",
+            xh: 1,
+          },
+        ];
+        console.log(1);
 
-      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 },
-          });
+        if (this.form.appltype == 1) {
+          this.leavehospitaldistrictcodes = [];
+          this.form.oplevelcode = null;
+          this.illnesscodes = [];
+        } else if (this.form.appltype == 2) {
+          this.deptcodesWards = [];
+          this.form.oplevelcode = null;
+          this.illnesscodes = [];
+        } else if (this.form.appltype == 3) {
+          this.deptcodesWards = [];
+          this.leavehospitaldistrictcodes = [];
+          this.form.oplevelcode = null;
+        } else if (this.form.appltype == 4) {
+          this.deptcodesWards = [];
+          this.illnesscodes = [];
+          this.leavehospitaldistrictcodes = [];
         }
-      });
+        if (this.checkList) {
+          this.form.preachform = this.checkList.join(",");
+          this.form.preachformList = this.selectedOrder;
+        } else {
+          this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+          this.submitLoading = false;
+
+          return;
+        }
+        console.log(2);
+
+        if (
+          this.deptcodesWards[0] ||
+          this.leavehospitaldistrictcodes[0] ||
+          this.diagglist[0] ||
+          this.form.oplevelcode ||
+          this.form.longTask == 2 ||
+          this.serviceType == 3
+        ) {
+        } else {
+          this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
+          this.submitLoading = false;
+          return;
+        }
+        //鏆傚仠浠诲姟鎮h�呴檺鍒�
+        // if (!this.form.patTaskRelevances[0] && !this.form.longTask) {
+        //   this.$modal.msgError("璇烽�夋嫨鐥呬汉");
+        //   return;
+        // }
+        console.log(3);
+
+        if (!this.form.templatename && !this.templateor) {
+          this.$modal.msgError("鏈�夋嫨妯℃澘");
+          this.submitLoading = false;
+
+          return;
+        }
+
+        if (
+          (this.form.sendType == 1 && this.time1) ||
+          this.form.sendType == 2
+        ) {
+        } else if (
+          (this.form.sendType == 3 && this.time4) ||
+          this.form.longTask
+        ) {
+        } else {
+          this.submitLoading = false;
+          return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+        }
+        const filteredArray = this.variableList.filter(
+          (item) =>
+            item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
+        );
+        this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+        if (this.form.taskid) {
+          this.form.isoperation = 2;
+        } else {
+          this.form.isoperation = 1;
+        }
+        if (!this.form.type) {
+          this.form.type = this.$route.query.type;
+        }
+        console.log(4);
+        this.form.serviceType = this.serviceType;
+        this.form.deptcode = this.deptcodesWards.join(",");
+        this.form.leavehospitaldistrictcode =
+          this.leavehospitaldistrictcodes.join(",");
+        // this.form.opcode = this.operationcodes.join(",");
+        if (this.form.appltype == 3) {
+          if (this.diseaseDept) {
+            this.form.deptcode = this.diseaseDept.deptCode;
+            this.form.deptname = this.diseaseDept.deptName;
+          }
+
+          if (this.diseaseWard) {
+            this.form.leavehospitaldistrictcode = this.diseaseWard.districtCode;
+            this.form.leavehospitaldistrictname = this.diseaseWard.districtName;
+          }
+        }
+
+        this.form.icd10code = this.diagglist
+          .map((item) => item.icdcode)
+          .join(",");
+        this.form.icd10name = this.diagglist
+          .map((item) => item.icdname)
+          .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 {
+        // 绗洓姝ワ細鏃犺鎴愬姛鎴栧け璐ワ紝鏈�缁堥兘鍏抽棴鍔犺浇鐘舵��
+      }
+    },
+    handleDiseaseDeptChange(dept) {
+      // 褰撻�夋嫨绉戝鏃讹紝瀛樺偍鏁翠釜绉戝瀵硅薄
+      this.diseaseDept = dept;
     },
 
+    handleDiseaseWardChange(ward) {
+      // 褰撻�夋嫨鐥呭尯鏃讹紝瀛樺偍鏁翠釜鐥呭尯瀵硅薄
+      this.diseaseWard = ward;
+    },
     // ----------------------琛ㄦ牸瀛愮粍浠朵簨浠�
     // 閫夋嫨棰勮
     selectfn(row, type) {
@@ -1540,6 +1671,8 @@
             this.tempbelongWards = [];
             this.objyl.suitway = this.objyl.suitway.split(",");
             this.questionList = res.rows[0].svyTemplateLibScripts;
+            console.log(this.questionList, "this.questionList");
+
             this.questionList.forEach((item) => {
               item.qremark = [];
             });
@@ -1555,6 +1688,8 @@
     },
     // 棰勮
     previewfnmb() {
+      // taskgetQtemplateobj({ id: this.form.templateid });
+
       getTaskQuestioncomit(this.form.templateid).then((res) => {
         if (res.code == 200) {
           console.log(res, "棰勮鏁版嵁");
@@ -1565,24 +1700,42 @@
           this.getillness(this.form.libtemplateid);
 
           this.previewtf = true;
-          getQtemplateobj({ svyid: this.form.libtemplateid }).then((res) => {
+          taskgetQtemplateobj({ id: this.form.templateid }).then((res) => {
             if (res.code == 200) {
-              this.questionList = res.rows[0].svyTemplateLibScripts;
+              this.questionList = res.data.svyTaskTemplateScriptVOS;
               this.questionList.forEach((item) => {
                 item.qremark = [];
+                item.svyLibTemplateTargetoptions =
+                  item.svyTaskTemplateTargetoptions;
               });
               this.previewtftype = 1;
               this.objyl.svyTemplateLibScripts =
-                res.rows[0].svyTemplateLibScripts;
+                res.data.svyTaskTemplateScriptVOS;
             }
           });
         }
       });
     },
     checkSelectionChange(selectedValues, selectedOrder) {
-      this.selectedOrder = selectedOrder;
+      this.selectedOrder = selectedValues;
       console.log("褰撳墠閫変腑:", selectedValues);
       console.log("閫変腑椤哄簭:", selectedOrder);
+    },
+    // 鏈嶅姟褰㈠紡閫夊彇
+    handleCheckedCitiesChange(row) {
+      console.log(row, "鏈嶅姟");
+      this.foncheckList = this.checkboxlist.filter((obj) =>
+        row.includes(obj.value)
+      );
+    },
+    // 鏈嶅姟褰㈠紡鍒犻櫎
+    handleClosetag(tag) {
+      console.log(tag, "tag");
+      console.log(this.foncheckList, "foncheckList");
+      this.checkList = this.checkList.filter((item) => item != tag.value);
+      this.foncheckList = this.foncheckList.filter(
+        (obj) => obj.value !== tag.value
+      );
     },
     getillness(id) {
       if (id) {
@@ -1601,36 +1754,36 @@
       }).then((res) => {
         this.donorchargeList = res.rows;
       });
-      getbaseopera({
-        pageNum: 1,
-        pageSize: 1000,
-      }).then((res) => {
-        this.baseoperaList = res.rows;
-      });
+      // getbaseopera({
+      //   pageNum: 1,
+      //   pageSize: 1000,
+      // }).then((res) => {
+      //   this.baseoperaList = res.rows;
+      // });
     },
     // 鎵嬫湳鏌ヨ
     remoteopcode(name) {
-      if (name) {
-        getbaseopera({
-          pageNum: 1,
-          pageSize: 1000,
-          opdesc: name,
-        }).then((res) => {
-          this.baseoperaList = res.rows;
-        });
-      }
+      // if (name) {
+      //   getbaseopera({
+      //     pageNum: 1,
+      //     pageSize: 1000,
+      //     opdesc: name,
+      //   }).then((res) => {
+      //     this.baseoperaList = res.rows;
+      //   });
+      // }
     },
     // 鐤剧梾鏌ヨ
     remotedonor(name) {
-      if (name) {
-        getbaseopera({
-          pageNum: 1,
-          pageSize: 1000,
-          opdesc: name,
-        }).then((res) => {
-          this.baseoperaList = res.rows;
-        });
-      }
+      // if (name) {
+      //   getbaseopera({
+      //     pageNum: 1,
+      //     pageSize: 1000,
+      //     opdesc: name,
+      //   }).then((res) => {
+      //     this.baseoperaList = res.rows;
+      //   });
+      // }
     },
     // 澶勭悊闂灞傚彉閲�
     Variablehandling(arr, type) {
@@ -1674,6 +1827,7 @@
           { label: "韬唤璇�", width: "200", prop: "idcardno" },
           { label: "鎬у埆", width: "", prop: "sex" },
           { label: "骞撮緞", width: "", prop: "age" },
+          { label: "鐢佃瘽", width: "180", prop: "telcode" },
           { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
           { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
           { label: "鍖荤敓", width: "", prop: "drname" },
@@ -1688,6 +1842,7 @@
           { label: "韬唤璇�", width: "200", prop: "idcardno" },
           { label: "鎬у埆", width: "", prop: "sex" },
           { label: "骞撮緞", width: "", prop: "age" },
+          { label: "鐢佃瘽", width: "180", prop: "telcode" },
           { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
           { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
           { label: "鍖荤敓", width: "", prop: "drname" },
@@ -1702,6 +1857,7 @@
           { label: "鐢佃瘽鍙风爜", width: "180", prop: "telcode" },
           { label: "鎬у埆", width: "", prop: "sex" },
           { label: "骞撮緞", width: "", prop: "age" },
+          { label: "鐢佃瘽", width: "180", prop: "telcode" },
           { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
           { label: "璐d换鎶ゅ+", width: "", prop: "nurseName" },
           { label: "鍖荤敓", width: "", prop: "drname" },
@@ -1743,6 +1899,7 @@
     handleUpdate() {},
     handleDelete() {},
     handleExport() {},
+
     // 閫夋嫨鎮h�呰〃鏁版嵁
     handleSelectionChange(selection) {
       this.SelectPatientslist = structuredClone(selection);
@@ -1756,6 +1913,7 @@
           item.patid = item.id;
           item.hospType = this.patientqueryParams.allhosp;
           item.sfzh = item.idcardno;
+          item.telshortcode = item.telshortcode;
           item.deptCode = item.deptcode;
           item.deptName = item.dept;
           item.admindate = item.inhosptime;
@@ -1763,6 +1921,13 @@
           item.sfzh = item.idcardno;
           if (this.patientqueryParams.allhosp == 6) {
             item.patfrom = 1;
+          }
+          if (this.patientqueryParams.allhosp == 1) {
+            item.visittime = item.endtime;
+          } else if (this.patientqueryParams.allhosp == 4) {
+            item.visittime = item.starttime;
+          } else if (this.patientqueryParams.allhosp == 2) {
+            item.visittime = item.admitdate;
           }
           this.overallCase.push(item);
           this.form.patTaskRelevances.push(item);
@@ -1819,7 +1984,10 @@
 
         return;
       }
-      if (this.patientqueryParams.searchscope == 1) {
+      if (
+        this.patientqueryParams.searchscope == 1 ||
+        this.patientqueryParams.allhosp == 2
+      ) {
         this.patientqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
           (obj) => obj.deptCode
         );
@@ -1854,6 +2022,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;
@@ -1934,8 +2103,8 @@
               ? this.form.patTaskRelevances
               : [];
             this.overallCase = this.form.patTaskRelevances.concat();
-            this.checkList = this.form.preachform;
-
+            this.checkList = this.form.preachform.split(",");
+            this.selectedOrder = this.form.preachformList;
             this.overallCase.forEach((item) => {
               if (item.endtime) {
                 item.endDay = this.daysBetween(item.endtime);
@@ -2007,12 +2176,17 @@
         if (res.code == 200) {
           let arr = res.rows;
           arr.forEach((item) => {
-            getillnesslist({
-              icdcode: item.icd10code,
-            }).then((res) => {
-              item.icdname = res.rows[0].icdname;
+            if (localStorage.getItem("orgname") == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
+              item.icdname = item.icd10name;
               this.diagglist.push(item);
-            });
+            } else {
+              getillnesslist({
+                icdname: item.icd10name,
+              }).then((res) => {
+                item.icdname = res.rows[0].icdname;
+                this.diagglist.push(item);
+              });
+            }
             this.illnesscodes.push(item.icd10code);
           });
         }
@@ -2069,6 +2243,9 @@
     },
     // 鐤剧梾鍒犻櫎瑙﹀彂
     removediagg(row) {
+      console.log(row, "row");
+      console.log(this.diagglist, "this.diagglist");
+
       let result = this.diagglist
         .filter((item) => item.icd10code == row)
         .map((item) => item.id);
@@ -2193,24 +2370,31 @@
 
       this.objyl.isoperation = 1;
       this.objyl.taskid = this.form.taskid;
-
+      this.objyl.svyTemplateLibScripts.forEach((item) => {
+        item.qremark = [];
+        item.svyTaskTemplateTargetoptions = item.svyLibTemplateTargetoptions;
+      });
+      this.objyl.svyTaskTemplateScriptVOS = this.objyl.svyTemplateLibScripts;
       if (this.objyl.id) {
         deleteTaskQuestioncomit(this.objyl.id).then((res) => {
           if (res.code == 200) {
-            (this.objyl.id = null),
-              TaskQuestioncomit(this.objyl).then((response) => {
-                this.previewtf = false;
-                this.form.libtemplateid = this.objyl.svyid;
-                this.form.templateid = response.data;
-                this.form.templatename = this.objyl.svyname;
-                this.$modal.msgSuccess("閫夋嫨妯℃澘鎴愬姛");
-              });
+            this.objyl.id = null;
+
+            TaskQuestioncomit(this.objyl).then((response) => {
+              this.previewtf = false;
+              this.form.libtemplateid = this.objyl.svyid;
+              this.form.libtemplatename = this.objyl.svyname;
+              this.form.templateid = response.data;
+              this.form.templatename = this.objyl.svyname;
+              this.$modal.msgSuccess("閫夋嫨妯℃澘鎴愬姛");
+            });
           }
         });
       } else {
         TaskQuestioncomit(this.objyl).then((response) => {
           this.previewtf = false;
           this.form.libtemplateid = this.objyl.svyid;
+          this.form.libtemplatename = this.objyl.svyname;
           this.form.templateid = response.data;
           this.form.templatename = this.objyl.svyname;
           this.$modal.msgSuccess("閫夋嫨妯℃澘鎴愬姛");
@@ -2261,9 +2445,13 @@
             this.objyl.isoperation = 1;
             this.objyl.svyTaskTemplateScriptVOS =
               this.objyl.svyTemplateLibScripts;
+            this.objyl.svyTaskTemplateScriptVOS.forEach((item) => {
+              item.svyTaskTemplateTargetoptions =
+                item.svyLibTemplateTargetoptions;
+            });
             this.form.svyTaskTemplateVO = this.objyl;
             this.form.templatename = this.objyl.svyname;
-            this.$modal.msgSuccess("鏆傚瓨鎴愬姛淇濆瓨浠诲姟鍚庢ā鏉垮け鏁�");
+            this.$modal.msgSuccess("鏆傚瓨鎴愬姛淇濆瓨浠诲姟鍚庢ā鏉跨敓鏁�");
             this.drawermb = false;
             this.previewtf = false;
           })
@@ -2284,9 +2472,11 @@
 <style lang="scss" scoped>
 .Questionnairemanagement {
 }
+
 .leftvlue-jbxx {
   margin-top: 10px;
 }
+
 .sidecolumn {
   width: 100%;
   // min-height: 12vh;
@@ -2298,6 +2488,7 @@
   -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;
@@ -2310,8 +2501,10 @@
   -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
     0 0 6px 0 rgba(0, 0, 0, 0.04);
 }
+
 .examine-jic {
   margin: 20px;
+
   .headline {
     font-size: 24px;
     height: 40px;
@@ -2319,6 +2512,7 @@
     padding-left: 5px;
     margin-bottom: 10px;
     display: flex;
+
     // justify-content: space-between;
     .Add-details {
       font-size: 18px;
@@ -2326,25 +2520,30 @@
       cursor: pointer;
     }
   }
+
   .jic-value {
     font-size: 20px;
     border-top: 1px solid #a7abac;
     padding: 10px;
     margin-bottom: 10px;
+
     .details-jic {
       padding: 10px 15px;
       border: 1px solid #dcdfe6;
       -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
         0 0 6px 0 rgba(0, 0, 0, 0.04);
+
       .details-title {
         display: flex;
         justify-content: space-between;
         margin-bottom: 10px;
+
         div:nth-child(2) {
           color: #02a7f0;
           cursor: pointer;
         }
       }
+
       .details-renw {
         background: #e4ebfc;
         padding: 15px 5px;
@@ -2354,6 +2553,7 @@
     }
   }
 }
+
 .xinz-infs {
   font-size: 18px;
   line-height: 48px;
@@ -2362,6 +2562,7 @@
     margin-left: 10px;
   }
 }
+
 // .leftvlue-jbxx {
 //   margin-bottom: 50px;
 //   font-size: 20px;
@@ -2384,36 +2585,43 @@
   //   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);
   .scriptTopic-dev {
     margin-bottom: 25px;
     font-size: 20px !important;
+
     .dev-text {
       margin-bottom: 10px;
     }
   }
 }
+
 .jic-value {
   font-size: 20px;
   border-top: 1px solid #a7abac;
   padding: 10px;
   margin-bottom: 10px;
+
   .details-jic {
     padding: 10px 15px;
     border: 1px solid #dcdfe6;
     -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
       0 0 6px 0 rgba(0, 0, 0, 0.04);
+
     .details-title {
       display: flex;
       justify-content: space-between;
       margin-bottom: 10px;
+
       div:nth-child(2) {
         color: #02a7f0;
         cursor: pointer;
       }
     }
+
     .details-renw {
       background: #e4ebfc;
       padding: 15px 5px;
@@ -2422,6 +2630,7 @@
     }
   }
 }
+
 ::v-deep .addtopic-input {
   input {
     background: #02a7f0;
@@ -2429,12 +2638,15 @@
     width: 150px;
   }
 }
+
 ::v-deep.el-step.is-vertical .el-step__title {
   font-size: 25px;
 }
+
 ::v-deep.el-row {
   margin-bottom: 10px;
 }
+
 // ::v-deep.el-input--medium {
 //   font-size: 24px !important;
 // }
@@ -2443,14 +2655,17 @@
   position: relative;
   width: 700px;
 }
+
 .el-select__tags {
   font-size: 20px;
   max-width: 888px !important;
 }
+
 ::v-deep.el-radio__inner {
   width: 22px;
   height: 22px;
 }
+
 // ::v-deep.topic-dev.el-radio__label {
 //   font-size: 24px;
 // }
@@ -2459,12 +2674,14 @@
     font-size: 18px;
   }
 }
+
 ::v-deep.el-input.is-disabled .el-input__inner {
   background-color: #f5f7fa;
   border-color: #dfe4ed;
   color: rgb(253, 66, 66);
   cursor: not-allowed;
 }
+
 ::v-deep.el-checkbox-group {
   span {
     font-size: 18px;

--
Gitblit v1.9.3