From 03348941a9c44e3b9706a3b6c25c8fb5ba25d9d5 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 30 三月 2026 09:15:28 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/QuestionnaireTask.vue |  130 ++++++++++++++++++++-----------------------
 1 files changed, 61 insertions(+), 69 deletions(-)

diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index c4318f1..3ab1854 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -260,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>
@@ -319,12 +296,11 @@
                   <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="璇烽�夋嫨鎵嬫湳"
@@ -332,8 +308,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
@@ -917,6 +893,7 @@
   Externallist,
   getQtemplatelist,
   getQtemplateobj,
+  taskgetQtemplateobj,
   TaskQuestioncomit,
   deleteTaskQuestioncomit,
   Questionnairetaskgetson,
@@ -965,14 +942,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: "鍋滅敤" },
@@ -1203,8 +1184,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" },
@@ -1452,16 +1434,16 @@
         ];
         if (this.form.appltype == 1) {
           this.leavehospitaldistrictcodes = [];
-          this.operationcodes = [];
+          this.form.oplevelcode = null;
           this.illnesscodes = [];
         } else if (this.form.appltype == 2) {
           this.deptcodesWards = [];
-          this.operationcodes = [];
+          this.form.oplevelcode = null;
           this.illnesscodes = [];
         } else if (this.form.appltype == 3) {
           this.deptcodesWards = [];
           this.leavehospitaldistrictcodes = [];
-          this.operationcodes = [];
+          this.form.oplevelcode = null;
         } else if (this.form.appltype == 4) {
           this.deptcodesWards = [];
           this.illnesscodes = [];
@@ -1472,21 +1454,22 @@
           this.form.preachformList = this.selectedOrder;
         } else {
           this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+          this.submitLoading = false;
+
           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.oplevelcode ||
           this.form.longTask == 2 ||
           this.serviceType == 3
         ) {
         } else {
           this.$modal.msgError("璇烽�夋嫨浠诲姟鍏宠仈鏉′欢");
+          this.submitLoading = false;
           return;
         }
         //鏆傚仠浠诲姟鎮h�呴檺鍒�
@@ -1497,6 +1480,8 @@
 
         if (!this.form.templatename && !this.templateor) {
           this.$modal.msgError("鏈�夋嫨妯℃澘");
+          this.submitLoading = false;
+
           return;
         }
 
@@ -1509,6 +1494,7 @@
           this.form.longTask
         ) {
         } else {
+          this.submitLoading = false;
           return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
         }
         const filteredArray = this.variableList.filter(
@@ -1528,7 +1514,7 @@
         this.form.deptcode = this.deptcodesWards.join(",");
         this.form.leavehospitaldistrictcode =
           this.leavehospitaldistrictcodes.join(",");
-        this.form.opcode = this.operationcodes.join(",");
+        // this.form.opcode = this.operationcodes.join(",");
         this.form.icd10code = this.diagglist
           .map((item) => item.icdcode)
           .join(",");
@@ -1587,6 +1573,8 @@
     },
     // 棰勮
     previewfnmb() {
+      // taskgetQtemplateobj({ id: this.form.templateid });
+
       getTaskQuestioncomit(this.form.templateid).then((res) => {
         if (res.code == 200) {
           console.log(res, "棰勮鏁版嵁");
@@ -1597,15 +1585,17 @@
           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;
             }
           });
         }
@@ -1649,36 +1639,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) {
@@ -2128,8 +2118,8 @@
     },
     // 鐤剧梾鍒犻櫎瑙﹀彂
     removediagg(row) {
-      console.log(row,'row');
-console.log(this.diagglist,'this.diagglist');
+      console.log(row, "row");
+      console.log(this.diagglist, "this.diagglist");
 
       let result = this.diagglist
         .filter((item) => item.icd10code == row)
@@ -2263,6 +2253,7 @@
               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("閫夋嫨妯℃澘鎴愬姛");
@@ -2273,6 +2264,7 @@
         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("閫夋嫨妯℃澘鎴愬姛");
@@ -2321,9 +2313,9 @@
             this.objyl.templateid = this.objyl.svyid;
             this.form.libtemplateid = this.objyl.svyid;
             this.objyl.isoperation = 1;
-            this.objyl.svyLibTemplateScriptVOS =
+            this.objyl.svyTaskTemplateScriptVOS =
               this.objyl.svyTemplateLibScripts;
-            this.objyl.svyLibTemplateScriptVOS.forEach((item) => {
+            this.objyl.svyTaskTemplateScriptVOS.forEach((item) => {
               item.svyTaskTemplateTargetoptions =
                 item.svyLibTemplateTargetoptions;
             });

--
Gitblit v1.9.3