From c4f2875b50f07e6f375cd9c9ec4d8fbc2494d35d Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期二, 27 八月 2024 16:55:54 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/QuestionnaireTask.vue |  701 +++++++++++++++++++++++++++++----------------------------
 1 files changed, 357 insertions(+), 344 deletions(-)

diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index a0697f4..a66736f 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -54,6 +54,7 @@
                     <el-button
                       type="primary"
                       icon="el-icon-edit"
+                      @click="drawermb = true"
                       circle
                     ></el-button>
                   </el-col>
@@ -161,215 +162,15 @@
                     <el-checkbox
                       v-for="(item, index) in checkboxlist"
                       :key="index"
-                      :label="item"
-                    ></el-checkbox>
+                      :label="item.value"
+                    >
+                      {{ item.label }}</el-checkbox
+                    >
                   </el-checkbox-group>
                 </el-form-item>
               </el-form>
             </div>
           </div>
-          <div class="examine-jic">
-            <div class="headline">
-              <div>{{ title }}</div>
-            </div>
-            <div class="examine-jic">
-              <div class="jic-value">
-                <el-row :gutter="20">
-                  <!--鐢ㄦ埛鏁版嵁-->
-
-                  <el-form
-                    :model="topqueryParams"
-                    ref="queryForm"
-                    size="small"
-                    :inline="true"
-                    v-show="showSearch"
-                    label-width="98px"
-                  >
-                    <el-form-item
-                      label="瀹f暀涓婚"
-                      v-if="currenttype == 1 || currenttype == 8"
-                    >
-                      <el-input v-model="topqueryParams.name"></el-input>
-                    </el-form-item>
-                    <el-form-item
-                      label="闅忚鍚嶇О"
-                      v-if="
-                        currenttype == 2 || currenttype == 3 || currenttype == 7
-                      "
-                    >
-                      <el-input
-                        v-model="topqueryParams.name"
-                      ></el-input> </el-form-item
-                    ><el-form-item
-                      label="閫氱煡鍚嶇О"
-                      v-if="currenttype == 4 || currenttype == 5"
-                    >
-                      <el-input
-                        v-model="topqueryParams.name"
-                      ></el-input> </el-form-item
-                    ><el-form-item label="浣撴濂楅" v-if="currenttype == 5">
-                      <el-input v-model="topqueryParams.name"></el-input>
-                    </el-form-item>
-                    <el-form-item label="闂嵎涓婚" v-if="currenttype == 6">
-                      <el-input v-model="topqueryParams.name"></el-input>
-                    </el-form-item>
-                    <el-form-item label="閫傜敤鐤剧梾" v-if="currenttype != 5">
-                      <el-input v-model="topqueryParams.name"></el-input>
-                    </el-form-item>
-
-                    <el-form-item
-                      label="瀹f暀绫诲瀷"
-                      prop="status"
-                      v-if="currenttype == 1 || currenttype == 8"
-                    >
-                      <el-select
-                        v-model="topqueryParams.topic"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in taskoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                    <el-form-item
-                      label="閫氱煡绫诲瀷"
-                      prop="status"
-                      v-if="currenttype == 4 || currenttype == 5"
-                    >
-                      <el-select
-                        v-model="topqueryParams.topic"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in taskoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                    <el-form-item
-                      label="闅忚绫诲瀷"
-                      prop="status"
-                      v-if="
-                        currenttype == 2 || currenttype == 3 || currenttype == 7
-                      "
-                    >
-                      <el-select
-                        v-model="topqueryParams.topic"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in taskoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                    <el-form-item
-                      label="闂嵎绫诲瀷"
-                      prop="status"
-                      v-if="currenttype == 6"
-                    >
-                      <el-select
-                        v-model="topqueryParams.topic"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in taskoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                    <el-form-item label="閫傜敤褰㈠紡" prop="status">
-                      <el-select
-                        v-model="topqueryParams.topica"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in taskoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-
-                    <el-form-item label="閫傜敤绉戝" prop="status">
-                      <el-select
-                        v-model="topqueryParams.topicd"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in topicoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                    <el-form-item>
-                      <el-button
-                        type="primary"
-                        icon="el-icon-search"
-                        size="medium"
-                        @click="handleQuery"
-                        >鎼滅储</el-button
-                      >
-                      <el-button
-                        icon="el-icon-refresh"
-                        size="medium"
-                        @click="resetQuery"
-                        >閲嶇疆</el-button
-                      >
-                    </el-form-item>
-                  </el-form>
-                  <el-divider></el-divider>
-                  <!-- 閫夋嫨妯$増鍒楄〃 -->
-                  <SFtable
-                    @selectfn="selectfn"
-                    :currentList="userList"
-                    :tableLabel="tableLabel"
-                    :serialnumber="false"
-                    :controlsc="false"
-                    :multiplechoice="false"
-                    :typeinfo="1"
-                  />
-                  <pagination
-                    v-show="total > 0"
-                    :total="total"
-                    :page.sync="topqueryParams.pageNum"
-                    :limit.sync="topqueryParams.pageSize"
-                    @pagination="Acquisitiontype"
-                  />
-                </el-row>
-              </div>
-            </div>
-          </div>
-        </div>
-        <el-button type="success" @click="nextstep('ruleForm')">{{
-          quote ? "绔嬪嵆鍒涘缓" : "浠诲姟璇︽儏閰嶇疆"
-        }}</el-button>
-        <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
-      </div>
-
-      <!-- 浠诲姟璇︽儏 -->
-      <div v-if="Editprogress == 2">
-        <el-alert title="鍦ㄦ湰闃舵閫夋嫨瀹f暀鐥呬汉" type="success" effect="dark">
-        </el-alert>
-        <div class="leftvlue-jbxx">
           <div class="examine-jic">
             <div class="headline">
               <div>鍙橀噺鍖归厤閲忓弬</div>
@@ -415,6 +216,17 @@
               </div>
             </div>
           </div>
+        </div>
+        <el-button type="success" @click="nextstep('ruleForm')">{{
+          quote ? "绔嬪嵆鍒涘缓" : "浠诲姟璇︽儏閰嶇疆"
+        }}</el-button>
+        <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button>
+      </div>
+      <!-- 浠诲姟璇︽儏 -->
+      <div v-if="Editprogress == 2">
+        <el-alert title="鍦ㄦ湰闃舵閫夋嫨瀹f暀鐥呬汉" type="success" effect="dark">
+        </el-alert>
+        <div class="leftvlue-jbxx">
           <div class="examine-jic">
             <div class="headline">
               <div>鎮h�呭垪琛�</div>
@@ -422,88 +234,6 @@
             <div class="examine-jic">
               <div class="jic-value">
                 <el-row :gutter="20">
-                  <!--鐢ㄦ埛鏁版嵁-->
-                  <el-form
-                    :model="topqueryParams"
-                    ref="queryForm"
-                    size="small"
-                    :inline="true"
-                    v-show="showSearch"
-                    label-width="98px"
-                  >
-                    <el-form-item label="鎮h�呭悕绉�">
-                      <el-input v-model="topqueryParams.name"></el-input>
-                    </el-form-item>
-
-                    <el-form-item label="鎮h�呰寖鍥�" prop="status">
-                      <el-select
-                        v-model="topqueryParams.topic"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in taskoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-
-                    <el-form-item label="鎮h�呯姸鎬�" prop="status">
-                      <el-select
-                        v-model="topqueryParams.topic"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in topicoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                    <el-form-item label="闅忚缁撴灉" prop="status">
-                      <el-select
-                        v-model="topqueryParams.topic"
-                        placeholder="璇烽�夋嫨"
-                      >
-                        <el-option
-                          v-for="item in topicoptions"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        >
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                    <el-form-item label="鎮h�呯數璇�">
-                      <el-input v-model="topqueryParams.name"></el-input>
-                    </el-form-item>
-                    <el-form-item>
-                      <el-button
-                        type="primary"
-                        icon="el-icon-search"
-                        size="medium"
-                        @click="handleQuery"
-                        >鎼滅储</el-button
-                      >
-                      <el-button
-                        icon="el-icon-refresh"
-                        size="medium"
-                        @click="resetQuery"
-                        >閲嶇疆</el-button
-                      >
-                      <el-button
-                        icon="el-icon-upload2"
-                        size="medium"
-                        type="warning"
-                        >褰撳墠鎮h�呬竴閿彂閫�</el-button
-                      >
-                    </el-form-item>
-                  </el-form>
-                  <el-divider></el-divider>
                   <el-row :gutter="10" class="mb8">
                     <el-col :span="1.5">
                       <el-select
@@ -552,6 +282,7 @@
                     :currentList="overallCase"
                     :tableLabel="tableLabelhz"
                     :serialnumber="false"
+                    :searchTrue="true"
                     :multiplechoice="false"
                     :controlxz="false"
                     :typeinfo="2"
@@ -577,7 +308,7 @@
     </div>
     <!-- 娣诲姞鎮h�� -->
     <el-dialog
-      title="娣诲姞娲惧彂鎮h��"
+      title="閫夋嫨鎮h��"
       :visible.sync="dialogVisiblepatient"
       width="70%"
       :before-close="handleClosehz"
@@ -596,28 +327,10 @@
               label-width="98px"
             >
               <el-form-item label="鎮h�呭悕绉帮細">
-                <el-input v-model="patientqueryParams.name"></el-input>
-              </el-form-item>
-
-              <el-form-item label="灏辫瘖绉戝" prop="status">
-                <el-select
-                  v-model="patientqueryParams.topic"
-                  placeholder="璇烽�夋嫨"
-                >
-                  <el-option-group
-                    v-for="group in topicoptions[0].children"
-                    :key="group.deptName"
-                    :label="group.deptName"
-                  >
-                    <el-option
-                      v-for="item in group.children"
-                      :key="item.deptId"
-                      :label="item.deptName"
-                      :value="item.deptId"
-                    >
-                    </el-option>
-                  </el-option-group>
-                </el-select>
+                <el-input
+                  v-model="patientqueryParams.name"
+                  @keyup.enter.native="handleQuery"
+                ></el-input>
               </el-form-item>
 
               <el-form-item>
@@ -668,31 +381,59 @@
       <div class="preview-left">
         <!-- 鍗曢�� -->
         <div
-          class="topic-dev"
-          v-for="(item, index) in questionList"
-          :key="item.id"
+          class="scriptTopic-dev"
+          v-for="item in questionList"
+          :key="item.sort"
+          v-if="item.scriptType == 1"
         >
           <div class="dev-text">
-            {{ index + 1 }}銆�<span>{{ item.script }}</span>
+            {{ item.sort }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span>
           </div>
-
-          <div class="dev-xx" v-if="item.scripttype != 3">
-            <el-radio-group v-model="item.radio">
+          <div class="dev-xx">
+            <el-radio-group v-model="item.remark">
               <el-radio
                 v-for="(items, index) in item.svyLibTemplateTargetoptions"
-                :key="items.id"
-                :label="items.id"
-                >{{ items.optioncontent }}
-              </el-radio>
+                :key="index"
+                :label="index"
+                >{{ items.optioncontent }}</el-radio
+              >
             </el-radio-group>
           </div>
-          <div v-else>
-            <el-input
-              type="textarea"
-              placeholder="鏈幏鍙栧埌淇℃伅"
-              v-model.sync="item.questionResult"
-              :rows="2"
-            />
+        </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 == 3"
+        >
+          <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>
         </div>
       </div>
@@ -701,6 +442,177 @@
         <el-button type="primary" @click="previewFn">纭浣跨敤</el-button>
       </span>
     </el-dialog>
+    <el-drawer
+      title="闂嵎鍐呭鍒楄〃"
+      :visible.sync="drawermb"
+      direction="rtl"
+      size="50%"
+    >
+      <div class="headline"></div>
+      <div class="examine-jic">
+        <div class="jic-value">
+          <el-row :gutter="20">
+            <!--鐢ㄦ埛鏁版嵁-->
+
+            <el-form
+              :model="topqueryParams"
+              ref="queryForm"
+              size="small"
+              :inline="true"
+              v-show="showSearch"
+              label-width="98px"
+            >
+              <el-form-item
+                label="瀹f暀涓婚"
+                v-if="currenttype == 1 || currenttype == 8"
+              >
+                <el-input v-model="topqueryParams.name"></el-input>
+              </el-form-item>
+              <el-form-item
+                label="闂嵎鍚嶇О"
+                v-if="currenttype == 2 || currenttype == 3 || currenttype == 7"
+              >
+                <el-input
+                  v-model="topqueryParams.name"
+                ></el-input> </el-form-item
+              ><el-form-item
+                label="閫氱煡鍚嶇О"
+                v-if="currenttype == 4 || currenttype == 5"
+              >
+                <el-input
+                  v-model="topqueryParams.name"
+                ></el-input> </el-form-item
+              ><el-form-item label="浣撴濂楅" v-if="currenttype == 5">
+                <el-input v-model="topqueryParams.name"></el-input>
+              </el-form-item>
+              <el-form-item label="闂嵎涓婚" v-if="currenttype == 6">
+                <el-input v-model="topqueryParams.name"></el-input>
+              </el-form-item>
+              <el-form-item label="閫傜敤鐤剧梾" v-if="currenttype != 5">
+                <el-input v-model="topqueryParams.name"></el-input>
+              </el-form-item>
+
+              <el-form-item
+                label="瀹f暀绫诲瀷"
+                prop="status"
+                v-if="currenttype == 1 || currenttype == 8"
+              >
+                <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨">
+                  <el-option
+                    v-for="item in taskoptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item
+                label="閫氱煡绫诲瀷"
+                prop="status"
+                v-if="currenttype == 4 || currenttype == 5"
+              >
+                <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨">
+                  <el-option
+                    v-for="item in taskoptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item
+                label="闂嵎绫诲瀷"
+                prop="status"
+                v-if="currenttype == 2 || currenttype == 3 || currenttype == 7"
+              >
+                <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨">
+                  <el-option
+                    v-for="item in taskoptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item
+                label="闂嵎绫诲瀷"
+                prop="status"
+                v-if="currenttype == 6"
+              >
+                <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨">
+                  <el-option
+                    v-for="item in taskoptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="閫傜敤褰㈠紡" prop="status">
+                <el-select v-model="topqueryParams.topica" placeholder="璇烽�夋嫨">
+                  <el-option
+                    v-for="item in taskoptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+
+              <el-form-item label="閫傜敤绉戝" prop="status">
+                <el-select v-model="topqueryParams.topicd" placeholder="璇烽�夋嫨">
+                  <el-option
+                    v-for="item in topicoptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item>
+                <el-button
+                  type="primary"
+                  icon="el-icon-search"
+                  size="medium"
+                  @click="handleQuery"
+                  >鎼滅储</el-button
+                >
+                <el-button
+                  icon="el-icon-refresh"
+                  size="medium"
+                  @click="resetQuery"
+                  >閲嶇疆</el-button
+                >
+              </el-form-item>
+            </el-form>
+            <el-divider></el-divider>
+            <!-- 閫夋嫨妯$増鍒楄〃 -->
+            <SFtable
+              @selectfn="selectfn"
+              :currentList="userList"
+              :tableLabel="tableLabel"
+              :serialnumber="false"
+              :controlsc="false"
+              :multiplechoice="false"
+              :typeinfo="1"
+            />
+            <pagination
+              v-show="total > 0"
+              :total="total"
+              :page.sync="topqueryParams.pageNum"
+              :limit.sync="topqueryParams.pageSize"
+              @pagination="Acquisitiontype"
+            />
+          </el-row>
+        </div>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -716,7 +628,7 @@
   Questionnairetaskget,
   gethetaskinfo,
   delhetaskinfo,
-  Questionnairetaskdetails,
+  Editsingletask,
 } from "@/api/AiCentre/index";
 import { listDept } from "@/api/system/dept";
 
@@ -735,6 +647,7 @@
       allpids: [],
       libId: null, //妯℃澘搴撴ā鐗坕d
       Editprogress: 1, //缂栬緫杩涘害
+      drawermb: false, //閫夋嫨妯$増寮圭獥
       previewtf: false, //棰勮
       loading: false, // 閬僵灞�
       patientloading: false, // 閬僵灞�
@@ -813,6 +726,7 @@
       multiple: true,
       // 鐢ㄦ埛琛ㄦ牸鏁版嵁
       userList: [], //妯$増鍒楄〃
+      multiplechoice: [], //澶氶�夌粨鏋�
       patientuserList: [], //閫夋嫨鎮h�呭垪琛�
       sonuserList: [], //閫変腑鎮h�呭垪琛�
       delvariableList: [], //鍒犻櫎鍙橀噺涓存椂瀛樺偍
@@ -887,7 +801,9 @@
 
   created() {
     this.id = this.$route.query.id;
-    this.form.hospType = this.$route.query.type;
+    this.form.type = this.$route.query.type;
+    this.form.typename = this.$route.query.typename;
+    this.form.serviceType = Number(this.$route.query.serviceType);
     this.listDept();
     this.Acquisitiontype();
     this.Getdetails();
@@ -932,7 +848,70 @@
       this.currenttype = this.$route.query.type;
       this.title = "闂嵎鍐呭鍒楄〃";
       this.tableLabel = this.tableLabelwj;
-      this.checkboxlist = ["绾夸笅锛堢焊璐級", "绾夸笂锛堢煭淇�/閽夐拤鐨勬枃鏈�侀棶鍗烽摼鎺ワ級"];
+      if (this.form.serviceType == 1) {
+        this.checkboxlist = [
+          {
+            value: "1",
+            label: "浜哄伐",
+          },
+
+          {
+            value: "2",
+            label: "绾歌川",
+          },
+        ];
+      } else if (this.form.serviceType == 6) {
+        this.checkboxlist = [
+          {
+            value: "3",
+            label: "鐢佃瘽",
+          },
+          {
+            value: "4",
+            label: "鐭俊",
+          },
+          {
+            value: "5",
+            label: "寰俊鍏紬鍙�",
+          },
+          {
+            value: "6",
+            label: "寰俊灏忕▼搴�",
+          },
+
+          {
+            value: "8",
+            label: "鏅鸿兘鏈哄櫒浜�",
+          },
+        ];
+      } else if (this.form.serviceType == 7) {
+        this.checkboxlist = [
+          {
+            value: "1",
+            label: "浜哄伐",
+          },
+          {
+            value: "2",
+            label: "绾歌川",
+          },
+          {
+            value: "3",
+            label: "鐢佃瘽",
+          },
+          {
+            value: "4",
+            label: "鐭俊",
+          },
+          {
+            value: "5",
+            label: "寰俊鍏紬鍙�",
+          },
+          {
+            value: "6",
+            label: "寰俊灏忕▼搴�",
+          },
+        ];
+      }
       getQtemplatelist(queryParams).then((response) => {
         this.userList = response.rows;
         this.total = response.total;
@@ -945,8 +924,12 @@
     },
     // 淇濆瓨
     submitForm(formName) {
-      // this.form.preachform = this.checkList.join(",");
-      this.formatFn(1);
+      this.form.preachform = this.checkList.join(",");
+
+      if (!this.form.patTaskRelevances[0]) {
+        this.$modal.msgError("璇烽�夋嫨鐥呬汉");
+        return;
+      }
       this.form.hospType = this.currenttype;
       const filteredArray = this.variableList.filter(
         (item) =>
@@ -959,7 +942,10 @@
       } else {
         this.form.isoperation = 1;
       }
-      Questionnairetaskdetails(this.form).then((res) => {
+      if (!this.form.type) {
+        this.form.type = this.$route.query.type;
+      }
+      Editsingletask(this.form).then((res) => {
         if (res.code == 200) {
           if (this.form.taskid) {
             this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -982,11 +968,10 @@
         this.libId = row.svyid;
         console.log(row, "row");
         this.Tasktemplate = row;
-        this.questionList = row.svyLibScripts;
+        this.questionList = row.svyTemplateLibScripts;
         this.previewtf = true;
         this.previewid = row.svyid;
-        console.log(this.questionList, "questionList");
-        this.Variablehandling(row.svyLibScripts, 1);
+        this.Variablehandling(row.svyTemplateLibScripts, 1);
       } else if (type == 2) {
       } else if (type == 3) {
       }
@@ -995,10 +980,8 @@
     Variablehandling(arr, type) {
       let Variablist = [];
       if (type == 1) {
-        console.log(arr);
         // 寰幆闂
         arr.forEach((res) => {
-          console.log(JSON.parse(res.otherdata), "ss");
           // 寰幆閫夐」
           JSON.parse(res.otherdata).forEach((item) => {
             if (item.default != 1) {
@@ -1016,6 +999,7 @@
             index ===
             self.findIndex((t) => t.name === obj.name && t.value === obj.value)
         );
+
         this.variableList = this.transitionList.concat(Aarr);
         // this.form.textParam = this.convertFormat2ToFormat1(this.variableList);
       }
@@ -1027,6 +1011,29 @@
       this.overallCase.forEach((item) => {
         this.allpids.push(item.patid);
       });
+      if (this.patientqueryParams.allhosp == 1) {
+        this.tableLabelhz = [
+          { label: "搴忓彿", width: "", prop: "patid" },
+          { label: "鎮h�呭悕绉�", width: "", prop: "name" },
+          { label: "鎬у埆", width: "", prop: "sex" },
+          { label: "骞撮緞", width: "", prop: "age" },
+          { label: "涓讳换鍖诲笀", width: "", prop: "drname" },
+          { label: "灏辫瘖绉戝", width: "", prop: "deptName" },
+          { label: "鍏ラ櫌鏃ユ湡", width: "", prop: "inhosptime" },
+          { label: "鍒涘缓浜�", width: "", prop: "createBy" },
+        ];
+      } else if (this.patientqueryParams.allhosp == 2) {
+        this.tableLabelhz = [
+          { label: "搴忓彿", width: "", prop: "patid" },
+          { label: "鎮h�呭悕绉�", width: "", prop: "name" },
+          { label: "鎬у埆", width: "", prop: "sex" },
+          { label: "骞撮緞", width: "", prop: "age" },
+          { label: "璇婃柇", width: "", prop: "diagname" },
+          { label: "灏辫瘖绉戝", width: "", prop: "deptName" },
+          { label: "鍏ラ櫌鏃ユ湡", width: "", prop: "inhosptime" },
+          { label: "鍒涘缓浜�", width: "", prop: "createBy" },
+        ];
+      }
       if (this.allpids[0]) {
         this.patientqueryParams.pids = this.allpids;
         console.log(this.patientqueryParams.pids);
@@ -1058,6 +1065,7 @@
         const isExist = this.overallCase.find((obj) => obj.name == item.name);
         if (!isExist) {
           item.isoperation = 1;
+          item.patid = item.id;
           item.hospType = this.patientqueryParams.allhosp;
           this.overallCase.push(item);
           this.form.patTaskRelevances.push(item);
@@ -1138,7 +1146,7 @@
               ? this.form.patTaskRelevances
               : [];
             this.overallCase = this.form.patTaskRelevances.concat();
-            this.formatFn(2);
+            this.checkList = this.form.preachform.split(",");
             console.log(this.form.showDate, "this.form");
             this.daytime = this.form.showDate.split(",");
             if (this.form.showTimeMorn) {
@@ -1259,17 +1267,21 @@
     // 鏌ョ湅妯$増
     previewGo() {
       this.$router.push({
-        path: "/knowledge/templateku/configurat/",
+        path: "/knowledge/tpuconfigurat/",
         query: { id: this.previewid, task: true, data: this.form },
       });
     },
     previewFn() {
       let id = this.Tasktemplate.id;
       this.Tasktemplate.id = null;
-      this.Tasktemplate.svyLibScripts.svyTaskTemplateTargetoptions =
-        this.Tasktemplate.svyLibScripts.svyLibTemplateTargetoptions;
+      console.log(this.Tasktemplate);
+
+        this.Tasktemplate.svyTemplateLibScripts.forEach((item) => {
+          item.svyTaskTemplateTargetoptions =
+          item.svyLibTemplateTargetoptions;
+      });
       this.Tasktemplate.svyTaskTemplateScriptVOS =
-        this.Tasktemplate.svyLibScripts;
+        this.Tasktemplate.svyTemplateLibScripts;
       this.Tasktemplate.templateid = id;
       this.Tasktemplate.isoperation = 1;
       TaskQuestioncomit(this.Tasktemplate).then((response) => {
@@ -1345,6 +1357,7 @@
     0 0 6px 0 rgba(0, 0, 0, 0.04);
 }
 .examine-jic {
+  margin: 20px;
   .headline {
     font-size: 24px;
     border-left: 5px solid #41a1be;
@@ -1411,7 +1424,7 @@
   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);
-  .topic-dev {
+  .scriptTopic-dev {
     margin-bottom: 25px;
     font-size: 20px !important;
     .dev-text {

--
Gitblit v1.9.3