From 8c79267eb478e2986c5293d3fb48f1c3da18c544 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 17 一月 2025 15:55:32 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/QuestionnaireTask.vue |  159 ++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 128 insertions(+), 31 deletions(-)

diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index d3fd30b..f8220ea 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -413,13 +413,13 @@
                     :controlxz="false"
                     :typeinfo="2"
                   />
-                  <pagination
+                  <!-- <pagination
                     v-show="total > 0"
                     :total="total"
                     :page.sync="topqueryParams.pageNum"
                     :limit.sync="topqueryParams.pageSize"
                     @pagination="getList"
-                  />
+                  /> -->
                 </el-row>
               </div>
             </div>
@@ -494,16 +494,15 @@
               @handleSelectionChange="handleSelectionChange"
               :currentList="patientuserList"
               :tableLabel="tableLabelhz"
+              :heights="600"
               :serialnumber="false"
               :center="false"
               :typeinfo="3"
             />
           </el-row>
           <pagination
-            v-show="patienttotal > 0"
+            v-show="patienttotal > 0&&this.patientqueryParams.allhosp != 6"
             :total="patienttotal"
-            :page.sync="patientqueryParams.pageNum"
-            :limit.sync="patientqueryParams.pageSize"
             @pagination="handleAddpatient"
           />
         </div>
@@ -651,7 +650,7 @@
                     </el-select> </el-form-item
                 ></el-col>
               </el-row>
-              <el-row>
+              <!-- <el-row>
                 <el-col :span="20"
                   ><el-form-item label="閫傜敤鐥呭尯" prop="region">
                     <el-select
@@ -672,7 +671,7 @@
                       </el-option>
                     </el-select> </el-form-item
                 ></el-col>
-              </el-row>
+              </el-row> -->
 
               <div class="xinz-infs">
                 <el-form-item>
@@ -872,9 +871,9 @@
 import { messagelistpatient } from "@/api/patient/homepage";
 import store from "@/store";
 import {
-  getTaskpatient,
+  getTaskpatientQC,
   getlibrarylist,
-  getFollowuplist,
+  Externallist,
   getQtemplatelist,
   getQtemplateobj,
   TaskQuestioncomit,
@@ -998,6 +997,8 @@
         pageNum: 1, //
         pageSize: 10,
         topica: 1, //0鍏ㄩ儴1绉戝2鐥呭尯
+        leavehospitaldistrictcodes: [],
+        leaveldeptcodes: [],
       },
       topicoptions: [{ children: [{ children: [] }] }],
       showSearch: true, //
@@ -1090,6 +1091,10 @@
           value: "3",
           label: "浣撴鐥呬汉",
         },
+        {
+          value: "6",
+          label: "闄㈠鎮h��",
+        },
       ],
       source: [
         {
@@ -1133,7 +1138,11 @@
         },
         {
           value: 7,
-          label: "鎮h�呮姤鍛�",
+          label: "鎮h�呮棩甯告姤鍛�",
+        },
+        {
+          value: 9,
+          label: "鎮h�呭紓甯告姤鍛�",
         },
 
         {
@@ -1163,6 +1172,12 @@
         sendType: [
           { required: true, message: "鍙戦�佽缃笉鑳戒负绌�", trigger: "blur" },
         ],
+        deptcode: [
+          { required: true, message: "閫傜敤绉戝涓嶈兘涓虹┖", trigger: "blur" },
+        ],
+        // leavehospitaldistrictcode: [
+        //   { required: true, message: "閫傜敤鐥呭尯涓嶈兘涓虹┖", trigger: "blur" },
+        // ],
       },
       // 绉戝闄㈠尯鏌ヨ鍏ュ弬
       queryParamsdept: {
@@ -1249,9 +1264,14 @@
             label: "绾歌川",
           },
           {
+            value: "4",
+            label: "鐭俊",
+          },
+          {
             value: "5",
             label: "寰俊鍏紬鍙�",
           },
+          { label: "寰俊灏忕▼搴�", value: 6 },
         ];
       } else if (this.form.serviceType == 6) {
         this.checkboxlist = [
@@ -1277,7 +1297,7 @@
             label: "鏅鸿兘鏈哄櫒浜�",
           },
         ];
-      } else if (this.form.serviceType == 7) {
+      } else if (this.form.serviceType == 7 || this.form.serviceType == 9) {
         this.checkboxlist = [
           {
             value: "1",
@@ -1304,7 +1324,12 @@
             label: "寰俊灏忕▼搴�",
           },
         ];
-      } else if (this.form.serviceType == 2 || this.form.serviceType == 3) {
+      } else if (
+        this.form.serviceType == 2 ||
+        this.form.serviceType == 3 ||
+        this.form.serviceType == 5 ||
+        this.form.serviceType == 4
+      ) {
         this.checkboxlist = [
           {
             value: "1",
@@ -1360,6 +1385,7 @@
           xh: 1,
         },
       ];
+
       if (this.checkList[0]) {
         this.form.preachform = this.checkList.join(",");
       } else {
@@ -1402,6 +1428,14 @@
       this.form.leavehospitaldistrictcodes = store.getters.belongWards.map(
         (obj) => obj.districtCode
       );
+      console.log(this.form.longTask);
+      console.log(this.form.preachform);
+
+      if (this.form.longTask && this.form.preachform == 6) {
+        this.form.patCycle = 1;
+      }
+      //
+      this.form.labelinfo = 1;
       Editsingletask(this.form).then((res) => {
         if (res.code == 200) {
           if (this.form.taskid) {
@@ -1422,8 +1456,15 @@
       getTaskQuestioncomit(this.form.templateid).then((res) => {
         if (res.code == 200) {
           this.objyl = res.data;
-          this.objyl.isoperation = 2;
+          if (this.objyl.taskid == data.taskId) {
+            this.objyl.isoperation = 2;
+          } else {
+            this.objyl.isoperation = 1;
+          }
           this.objyl.taskid = data.taskId;
+          if (!this.objyl.sendDay) {
+            this.objyl.sendDay = "5";
+          }
           TaskQuestioncomit(this.objyl).then((response) => {
             this.previewtf = false;
             this.form.libtemplateid = this.objyl.svyid;
@@ -1534,7 +1575,11 @@
       this.overallCase.forEach((item) => {
         this.allpids.push(item.patid);
       });
-      if (this.patientqueryParams.allhosp == 1) {
+      if (
+        this.patientqueryParams.allhosp == 1 ||
+        (this.patientqueryParams.allhosp == 1 &&
+          this.patientqueryParams.cry == 1)
+      ) {
         this.tableLabelhz = [
           // { label: "鍏ラ櫌鏃ユ湡", width: "170", prop: "starttime" },
           { label: "鍑洪櫌鏃ユ湡", width: "150", prop: "endtime" },
@@ -1550,7 +1595,7 @@
         ];
       } else if (this.patientqueryParams.allhosp == 4) {
         this.tableLabelhz = [
-        { label: "鍏ラ櫌鏃ユ湡", width: "150", prop: "starttime" },
+          { label: "鍏ラ櫌鏃ユ湡", width: "150", prop: "starttime" },
           { label: "鎮h��", width: "", prop: "name" },
           { label: "韬唤璇�", width: "200", prop: "idcardno" },
           { label: "鎬у埆", width: "", prop: "sex" },
@@ -1572,6 +1617,7 @@
         this.patientqueryParams.cry = 1;
       } else if (this.patientqueryParams.allhosp == 4) {
         this.patientqueryParams.cry = 0;
+        this.patientqueryParams.allhosp = "1";
       }
       // 鏉ユ簮鍒ゆ柇
 
@@ -1591,7 +1637,7 @@
         this.patientqueryParams.leavehospitaldistrictcodes =
           store.getters.belongWards.map((obj) => obj.districtCode);
       }
-      getTaskpatient(this.patientqueryParams).then((response) => {
+      getTaskpatientQC(this.patientqueryParams).then((response) => {
         this.patientuserList = response.rows;
         this.patientuserList.forEach((item) => {
           if (item.endtime) {
@@ -1661,12 +1707,25 @@
           let indexa = this.overallCase.indexOf(row);
           let indexb = this.form.patTaskRelevances.indexOf(row);
           this.overallCase.splice(indexa, 1);
-          this.form.patTaskRelevances[indexb].isoperation = 3;
+          if (!this.form.taskid) {
+            this.form.patTaskRelevances.splice(indexa, 1);
+          } else {
+            this.form.patTaskRelevances[indexb].isoperation = 3;
+          }
           this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
         });
     },
     getList() {},
     handleQuery() {
+      // 鑾峰彇澶栭儴鎮h��
+      console.log(this.patientqueryParams.allhosp, "aaalll");
+
+      if (this.patientqueryParams.allhosp == 6) {
+        this.Externallist();
+        console.log();
+
+        return;
+      }
       if (this.patientqueryParams.topica == 0) {
         this.patientqueryParams.leavehospitaldistrictcodes =
           store.getters.leavehospitaldistrictcodes;
@@ -1679,8 +1738,43 @@
           store.getters.leavehospitaldistrictcodes;
         this.patientqueryParams.leaveldeptcodes = null;
       }
+
+      if (
+        !this.patientqueryParams.leavehospitaldistrictcodes ||
+        !this.patientqueryParams.leavehospitaldistrictcodes[0]
+      )
+        this.patientqueryParams.leavehospitaldistrictcodes = null;
+      if (
+        !this.patientqueryParams.leaveldeptcodes ||
+        !this.patientqueryParams.leaveldeptcodes[0]
+      )
+        this.patientqueryParams.leaveldeptcodes = null;
       this.handleAddpatient();
     },
+    // 鑾峰彇澶栭儴鎮h�呭鍏ュ垪琛�
+    Externallist() {
+      this.tableLabelhz = [
+        { label: "鎮h��", width: "", prop: "name" },
+        { label: "韬唤璇�", width: "200", prop: "idcardno" },
+        { label: "鎬у埆", width: "", prop: "sex" },
+        { label: "骞撮緞", width: "", prop: "age" },
+        { label: "鍑洪櫌澶╂暟", width: "", prop: "endDay" },
+      ];
+      this.patientqueryParams.pageSize = 1000;
+
+      Externallist(this.patientqueryParams).then((response) => {
+        this.patientuserList = response.rows;
+        this.patientuserList.forEach((item) => {
+          if (item.endtime) {
+            item.endDay = this.daysBetween(item.endtime);
+          }
+        });
+        this.dialogVisiblepatient = true;
+        this.patienttotal = response.total;
+        this.loading = false;
+      });
+    },
+
     resetQuery() {},
     handleQuerymb() {
       getQtemplatelist(this.topqueryParams).then((response) => {
@@ -1753,25 +1847,25 @@
             this.$modal.msgError(res.code);
           }
 
-        if (this.newadd) {
-          this.neWaddfn();
-        }
+          if (this.newadd) {
+            this.neWaddfn();
+          }
         });
       }
     },
     // 渚濈収鏂板鏃跺鐞�
-    neWaddfn(){
-      this.id=null;
-      this.form.taskName='';
+    neWaddfn() {
+      this.id = null;
+      this.form.taskName = "";
       this.form.taskid = null;
-      this.overallCase=[];
-      this.form.patTaskRelevances=[];
-      this.daytime=[]; //鏃ユ湡
-      this.applydaytime=[]; //璁$畻鏃ユ湡
-      this.time1=""; //涓婂崍鏃堕棿娈�
-      this.time2=""; //涓嬪崍鏃堕棿娈�
-      this.time3=""; //鏅氫笂鏃堕棿娈�
-      this.time4=""; //鏅氫笂鏃堕棿娈�
+      this.overallCase = [];
+      this.form.patTaskRelevances = [];
+      this.daytime = []; //鏃ユ湡
+      this.applydaytime = []; //璁$畻鏃ユ湡
+      this.time1 = ""; //涓婂崍鏃堕棿娈�
+      this.time2 = ""; //涓嬪崍鏃堕棿娈�
+      this.time3 = ""; //鏅氫笂鏃堕棿娈�
+      this.time4 = ""; //鏅氫笂鏃堕棿娈�
     },
     // 鑾峰彇绉戝鍒楄〃
     listDept() {
@@ -1900,6 +1994,9 @@
 
       this.objyl.isoperation = 1;
       console.log(this.objyl.id);
+      if (!this.objyl.sendDay) {
+        this.objyl.sendDay = "5";
+      }
 
       if (this.objyl.id) {
         deleteTaskQuestioncomit(this.objyl.id).then((res) => {

--
Gitblit v1.9.3