From 2c4c416bf7950c72ffa2543a218e4fd993ee2af2 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 12 九月 2024 12:04:32 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/QuestionnaireTask.vue |  259 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 177 insertions(+), 82 deletions(-)

diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index 1c8b4ea..c9a50bf 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -176,6 +176,26 @@
                     </div>
                   </div>
                 </el-form-item>
+                <el-row>
+                  <el-col :span="12"
+                    ><el-form-item label="寮�鍦虹櫧" prop="kcb">
+                      <el-input
+                        type="textarea"
+                          :rows="3"
+                        v-model="form.kcb"
+                        placeholder="璇疯緭鍏ュ紑鍦虹櫧"
+                      /> </el-form-item
+                  ></el-col>
+                  <el-col :span="12"
+                    ><el-form-item label="缁撴潫璇�" prop="jsy">
+                      <el-input
+                        type="textarea"
+                        :rows="3"
+                        v-model="form.jsy"
+                        placeholder="璇疯緭鍏ョ粨鏉熻"
+                      /> </el-form-item
+                  ></el-col>
+                </el-row>
               </el-form>
             </div>
           </div>
@@ -286,6 +306,7 @@
                         </el-option>
                       </el-select>
                     </el-col>
+
                     <el-col :span="1.5">
                       <el-button
                         type="primary"
@@ -293,7 +314,7 @@
                         icon="el-icon-plus"
                         size="medium"
                         :disabled="!patientqueryParams.allhosp"
-                        @click="handleAddpatient"
+                        @click="handleQuery"
                         >鏂板</el-button
                       >
                     </el-col>
@@ -317,7 +338,7 @@
                     @details="detailhz"
                     @handleUpdate="handleUpdate"
                     :currentList="overallCase"
-                    :tableLabel="tableLabelhz"
+                    :tableLabel="tableLabelhzwb"
                     :serialnumber="false"
                     :searchTrue="true"
                     :multiplechoice="false"
@@ -369,6 +390,18 @@
                   @keyup.enter.native="handleQuery"
                 ></el-input>
               </el-form-item>
+              <el-select
+                v-model="patientqueryParams.topica"
+                placeholder="璇烽�夋嫨鎮h�呮潵婧�"
+              >
+                <el-option
+                  v-for="item in source"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
 
               <el-form-item>
                 <el-button
@@ -416,66 +449,66 @@
     </el-dialog>
     <el-dialog title="妯℃澘棰勮" :visible.sync="previewtf" width="60%">
       <div class="preview-left">
-        <!-- 鍗曢�� -->
-        <div
-          class="scriptTopic-dev"
-          v-for="item in questionList"
-          :key="item.sort"
-          v-if="item.scriptType == 1"
-        >
-          <div class="dev-text">
-            {{ item.sort }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
+        <div v-for="item in questionList">
+          <!-- 鍗曢�� -->
+          <div
+            class="scriptTopic-dev"
+            :key="item.sort"
+            v-if="item.scriptType == 1"
+          >
+            <div class="dev-text">
+              {{ item.sort }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
+            </div>
+            <div class="dev-xx">
+              <el-radio-group v-model="item.remark">
+                <el-radio
+                  v-for="(items, index) in item.svyLibTemplateTargetoptions"
+                  :key="index"
+                  :label="index"
+                  >{{ items.optioncontent }}</el-radio
+                >
+              </el-radio-group>
+            </div>
           </div>
-          <div class="dev-xx">
-            <el-radio-group v-model="item.remark">
-              <el-radio
-                v-for="(items, index) in item.svyLibTemplateTargetoptions"
-                :key="index"
-                :label="index"
-                >{{ items.optioncontent }}</el-radio
-              >
-            </el-radio-group>
+          <!-- 澶氶�� -->
+          <div
+            class="scriptTopic-dev"
+            :key="item.sort"
+            v-if="item.scriptType == 2"
+          >
+            <div class="dev-text">
+              {{ item.sort }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
+            </div>
+            <div class="dev-xx">
+              <el-checkbox-group v-model="qremark">
+                <el-checkbox
+                  v-for="(items, index) in item.svyLibTemplateTargetoptions"
+                  :key="index"
+                  :label="index"
+                >
+                  {{ items.optioncontent }}
+                </el-checkbox>
+              </el-checkbox-group>
+            </div>
           </div>
-        </div>
-        <!-- 澶氶�� -->
-        <div
-          class="scriptTopic-dev"
-          v-for="item in questionList"
-          v-if="item.scriptType == 2"
-        >
-          <div class="dev-text">
-            {{ item.sort }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span>
-          </div>
-          <div class="dev-xx">
-            <el-checkbox-group v-model="multiplechoice">
-              <el-checkbox
-                v-for="items in item.svyLibTemplateTargetoptions"
-                :key="items.optioncontent"
-                :label="items.optioncontent"
-              >
-                {{ items.optioncontent }}
-              </el-checkbox>
-            </el-checkbox-group>
-          </div>
-        </div>
-        <!-- 濉┖ -->
-        <div
-          class="scriptTopic-dev"
-          v-for="item in questionList"
-          :key="item.sort"
-          v-if="item.scriptType == 4"
-        >
-          <div class="dev-text">
-            {{ item.sort }}銆乕濉┖]<span>{{ item.scriptContent }}</span>
-          </div>
-          <div class="dev-xx">
-            <el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="item.radioas" clearable>
-            </el-input>
+          <!-- 濉┖ -->
+          <div
+            class="scriptTopic-dev"
+            :key="item.sort"
+            v-if="item.scriptType == 4"
+          >
+            <div class="dev-text">
+              {{ item.sort }}銆乕闂瓟]<span>{{ item.scriptContent }}</span>
+            </div>
+            <div class="dev-xx">
+              <el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="radioas" clearable>
+              </el-input>
+            </div>
           </div>
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="previewGo">鍓嶅線妯℃澘璇︽儏淇敼</el-button>
+        <!-- <el-button @click="previewGo">鍓嶅線妯℃澘璇︽儏淇敼</el-button> -->
         <el-button type="primary" @click="previewFn">纭浣跨敤</el-button>
       </span>
     </el-dialog>
@@ -562,8 +595,9 @@
   getlibrarylist,
   getFollowuplist,
   getQtemplatelist,
+  getQtemplateobj,
   TaskQuestioncomit,
-  Questionnairetaskget,
+  Questionnairetaskgetson,
   gethetaskinfo,
   delhetaskinfo,
   Editsingletask,
@@ -596,13 +630,25 @@
       questionList: [],
       // 鎮h�呰〃鍗�
       tableLabelhz: [
-        { label: "鎮h��", width: "", prop: "name" },
-        { label: "韬唤璇�", width: "200", prop: "idcardno" },
-        { label: "鎬у埆", width: "", prop: "sex" },
-        { label: "骞撮緞", width: "", prop: "age" },
-        { label: "鍖荤敓", width: "", prop: "drname" },
-        { label: "绉戝", width: "", prop: "deptName" },
-        { label: "灏辫瘖/鍑洪櫌鏃ユ湡", width: "280", prop: "inhosptime" },
+        { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "inhosptime" },
+          { label: "鎮h��", width: "", prop: "name" },
+          { label: "韬唤璇�", width: "200", prop: "idcardno" },
+          { label: "鎬у埆", width: "", prop: "sex" },
+          { label: "骞撮緞", width: "", prop: "age" },
+          { label: "鍖荤敓", width: "", prop: "drname" },
+          { label: "绉戝", width: "240", prop: "deptname" },
+          { label: "鐥呭尯", width: "240", prop: "leavehospitaldistrictname" },
+      ],
+      // 鎮h�呰〃鍗�
+      tableLabelhzwb: [
+      { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "inhosptime" },
+          { label: "鎮h��", width: "", prop: "name" },
+          { label: "韬唤璇�", width: "200", prop: "sfzh" },
+          { label: "鎬у埆", width: "", prop: "sex" },
+          { label: "骞撮緞", width: "", prop: "age" },
+          { label: "鍖荤敓", width: "", prop: "drname" },
+          { label: "绉戝", width: "180", prop: "deptName" },
+          { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
       ],
 
       tableLabelwj: [
@@ -650,6 +696,7 @@
       patientqueryParams: {
         pageNum: 1, //
         pageSize: 10,
+        topica:0,//0鍏ㄩ儴1绉戝2鐥呭尯
       },
       topicoptions: [{ children: [{ children: [] }] }],
       showSearch: true, //
@@ -717,6 +764,8 @@
         templatename: "",
         templateid: null,
         libtemplateid: null,
+        kcb:'浜茬埍鐨勬偅鑰�-瀹跺睘锛屾偍濂斤紒鎴戜滑鏄禉涓尰澶т簩闄㈢殑鍖绘姢浜哄憳锛屼负浜嗘洿濂藉湴浜嗚В鎮ㄧ殑搴峰鎯呭喌锛岃鎮ㄦ娊涓�鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤闅忚闂嵎銆�',
+        jsy:'璇锋偍娉ㄦ剰浼戞伅鍜岃惀鍏伙紝鐢熸椿涓婅鍔抽�哥粨鍚堬紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈鍥炶灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒',
       },
       taskoptions: [
         {
@@ -732,6 +781,21 @@
           label: "浣撴鐥呬汉",
         },
       ],
+      source: [
+        {
+          value: 0,
+          label: "鎵�鏈夋偅鑰�",
+        },
+        {
+          value: 1,
+          label: "绉戝鎮h��",
+        },
+        {
+          value: 2,
+          label: "鐥呭尯鎮h��",
+        },
+      ],
+
       tasktypes: [
         {
           value: 1,
@@ -961,13 +1025,17 @@
     },
     // 淇濆瓨
     submitForm(formName) {
+      console.log(this.form.patTaskRelevances,'1.patTaskRelevances');
+      console.log(this.overallCase,'this.form.overallCase');
       if (this.time4 && this.form.sendType == 3)
         this.form.showTimeMorn = this.time4;
-      this.form.sendTimeslot = [{
-        begantime: this.time4,
-        endtime: "",
-        xh: 1,
-      }];
+      this.form.sendTimeslot = [
+        {
+          begantime: this.time4,
+          endtime: "",
+          xh: 1,
+        },
+      ];
       if (this.checkList[0]) {
         this.form.preachform = this.checkList.join(",");
       } else {
@@ -987,7 +1055,7 @@
       } else {
         return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
       }
-
+      console.log(this.form.patTaskRelevances,'2.patTaskRelevances');
       const filteredArray = this.variableList.filter(
         (item) =>
           item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
@@ -1026,7 +1094,13 @@
         this.libId = row.svyid;
         this.Tasktemplate = row;
         this.questionList = row.svyTemplateLibScripts;
-        this.previewtf = true;
+        getQtemplateobj({ svyid: row.svyid }).then((res) => {
+          if (res.code == 200) {
+            this.questionList = res.rows[0].svyTemplateLibScripts;
+            this.previewtf = true;
+          }
+        });
+        console.log(row.svyTemplateLibScripts);
         this.previewid = row.svyid;
         this.Variablehandling(row.svyTemplateLibScripts, 1);
       } else if (type == 2) {
@@ -1037,10 +1111,8 @@
     previewfnmb() {
       console.log(this.form);
 
-      getQtemplatelist({ svyid: this.form.libtemplateid }).then((res) => {
+      getQtemplateobj({ svyid: this.form.libtemplateid }).then((res) => {
         if (res.code == 200) {
-          console.log();
-
           this.questionList = res.rows[0].svyTemplateLibScripts;
           this.previewtf = true;
         }
@@ -1083,13 +1155,14 @@
       });
       if (this.patientqueryParams.allhosp == 1) {
         this.tableLabelhz = [
+          { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "inhosptime" },
           { label: "鎮h��", width: "", prop: "name" },
           { label: "韬唤璇�", width: "200", prop: "idcardno" },
           { label: "鎬у埆", width: "", prop: "sex" },
           { label: "骞撮緞", width: "", prop: "age" },
           { label: "鍖荤敓", width: "", prop: "drname" },
-          { label: "绉戝", width: "", prop: "deptName" },
-          { label: "灏辫瘖/鍑洪櫌鏃ユ湡", width: "280", prop: "inhosptime" },
+          { label: "绉戝", width: "180", prop: "deptname" },
+          { label: "鐥呭尯", width: "150", prop: "leavehospitaldistrictname" },
         ];
       } else if (this.patientqueryParams.allhosp == 2) {
         this.tableLabelhz = [
@@ -1097,7 +1170,8 @@
           { label: "鎬у埆", width: "", prop: "sex" },
           { label: "骞撮緞", width: "", prop: "age" },
           { label: "璇婃柇", width: "", prop: "diagname" },
-          { label: "灏辫瘖绉戝", width: "", prop: "deptName" },
+          { label: "绉戝", width: "", prop: "deptname" },
+        { label: "鐥呭尯", width: "", prop: "leavehospitaldistrictname" },
           { label: "鍏ラ櫌鏃ユ湡", width: "", prop: "inhosptime" },
           { label: "鍒涘缓浜�", width: "", prop: "createBy" },
         ];
@@ -1121,11 +1195,10 @@
     handleUpdate() {},
     handleDelete() {},
     handleExport() {},
-
     // 閫夋嫨鎮h�呰〃鏁版嵁
     handleSelectionChange(selection) {
-      console.log("澶氶�夋偅鑰�");
-      this.SelectPatientslist = selection;
+      console.log("澶氶�夋偅鑰�",selection);
+      this.SelectPatientslist = structuredClone(selection);
       this.multiple = !selection.length;
 
       // 璧嬪�肩粰鏁翠綋閫変腑鏁扮粍
@@ -1135,8 +1208,15 @@
           item.isoperation = 1;
           item.patid = item.id;
           item.hospType = this.patientqueryParams.allhosp;
+          item.sfzh = item.idcardno;
+          item.deptCode = item.deptcode;
+          item.deptName = item.deptname;
+          item.admindate = item.inhosptime;
+          item.sfzh = item.idcardno;
+          console.log(item);
           this.overallCase.push(item);
           this.form.patTaskRelevances.push(item);
+          console.log(this.form.patTaskRelevances,'patTaskRelevances');
         }
       });
     },
@@ -1182,6 +1262,18 @@
     },
     getList() {},
     handleQuery() {
+      // if (this.patientqueryParams.topica == 0) {
+      //   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) {
+      //   this.patientqueryParams.leavehospitaldistrictcodes =
+      //     store.getters.leavehospitaldistrictcodes;
+      //   this.patientqueryParams.leaveldeptcodes = null;
+      // }
       this.handleAddpatient();
     },
     resetQuery() {},
@@ -1215,10 +1307,12 @@
         templatename: "",
         templateid: null,
         libtemplateid: null,
+        kcb:'浜茬埍鐨勬偅鑰�-瀹跺睘锛屾偍濂斤紒鎴戜滑鏄禉涓尰澶т簩闄㈢殑鍖绘姢浜哄憳锛屼负浜嗘洿濂藉湴浜嗚В鎮ㄧ殑搴峰鎯呭喌锛岃鎮ㄦ娊涓�鐐瑰疂璐垫椂闂达紝瀹屾垚杩欎唤闅忚闂嵎銆�',
+        jsy:'鐢熸椿涓婅鍔抽�哥粨鍚堬紝娉ㄦ剰浼戞伅鍜岃惀鍏伙紝閫傚綋閿荤偧锛屾垝鐑熼檺閰掞紝淇濇寔蹇冩儏鑸掔晠锛屽畾鏈熷璇娿�傞偅鏈鍥炶灏卞埌杩欓噷锛岀鎮ㄨ韩浣撳仴搴凤紒',
       };
       this.questionList = [];
       if (this.id) {
-        Questionnairetaskget({ taskid: this.id }).then((res) => {
+        Questionnairetaskgetson({ taskid: this.id }).then((res) => {
           let filteredArray = "";
           if (res.code == 200) {
             this.form = res.data;
@@ -1229,7 +1323,8 @@
             this.overallCase = this.form.patTaskRelevances.concat();
             this.checkList = this.form.preachform.split(",");
             console.log(this.form, "this.form");
-            if (this.form.showDate)this.daytime = this.form.showDate.split(",");
+            if (this.form.showDate)
+              this.daytime = this.form.showDate.split(",");
             if (this.form.showTimeMorn) {
               if (this.form.sendType == 3) {
                 this.time4 = this.form.showTimeMorn;

--
Gitblit v1.9.3