From 0700456fd5717931c424c2e46552561716f1eb81 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 04 七月 2024 21:44:44 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/Missioncreation.vue |  366 +++++++++++----------------------------------------
 1 files changed, 83 insertions(+), 283 deletions(-)

diff --git a/src/views/patient/propaganda/Missioncreation.vue b/src/views/patient/propaganda/Missioncreation.vue
index f92b03b..6c05224 100644
--- a/src/views/patient/propaganda/Missioncreation.vue
+++ b/src/views/patient/propaganda/Missioncreation.vue
@@ -169,196 +169,6 @@
               </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 ? "绔嬪嵆鍒涘缓" : "浠诲姟璇︽儏閰嶇疆"
@@ -465,7 +275,7 @@
                         </el-option>
                       </el-select>
                     </el-form-item>
-                    <el-form-item label="闅忚缁撴灉" prop="status">
+                    <el-form-item label="瀹f暀缁撴灉" prop="status">
                       <el-select
                         v-model="topqueryParams.topic"
                         placeholder="璇烽�夋嫨"
@@ -668,34 +478,7 @@
     <el-dialog title="妯$増棰勮" :visible.sync="previewtf" width="60%">
       <div class="preview-left">
         <!-- 鍗曢�� -->
-        <div
-          class="topic-dev"
-          v-for="(item, index) in questionList"
-          :key="item.id"
-        >
-          <div class="dev-text">
-            {{ index + 1 }}銆�<span>{{ item.script }}</span>
-          </div>
-
-          <div class="dev-xx" v-if="item.scripttype != 3">
-            <el-radio-group v-model="item.radio">
-              <el-radio
-                v-for="(items, index) in item.svyLibTemplateTargetoptions"
-                :key="items.id"
-                :label="items.id"
-                >{{ 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>
+        <div v-html="richText"></div>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="previewGo">鍓嶅線妯$増璇︽儏淇敼</el-button>
@@ -703,13 +486,13 @@
       </span>
     </el-dialog>
     <el-drawer
-      title="闅忚鍐呭鍒楄〃"
+      title="瀹f暀鍐呭鍒楄〃"
       :visible.sync="drawermb"
       direction="rtl"
       size="50%"
     >
       <div class="headline"></div>
-      <div class="examine-jic">
+      <div style="margin: 20px">
         <div class="jic-value">
           <el-row :gutter="20">
             <!--鐢ㄦ埛鏁版嵁-->
@@ -729,7 +512,7 @@
                 <el-input v-model="topqueryParams.name"></el-input>
               </el-form-item>
               <el-form-item
-                label="闅忚鍚嶇О"
+                label="瀹f暀鍚嶇О"
                 v-if="currenttype == 2 || currenttype == 3 || currenttype == 7"
               >
                 <el-input
@@ -783,7 +566,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item
-                label="闅忚绫诲瀷"
+                label="瀹f暀绫诲瀷"
                 prop="status"
                 v-if="currenttype == 2 || currenttype == 3 || currenttype == 7"
               >
@@ -878,6 +661,8 @@
 
 <script>
 import { messagelistpatient } from "@/api/patient/homepage";
+import axios from "axios";
+
 import store from "@/store";
 import {
   getTaskpatient,
@@ -885,7 +670,7 @@
   getFollowuplist,
   getQtemplatelist,
   TaskQuestioncomit,
-  Questionnairetaskget,
+  getTaskInfo,
   gethetaskinfo,
   delhetaskinfo,
   Editsingletask,
@@ -916,6 +701,7 @@
       checkboxlist: [],
       tableLabel: [],
       questionList: [],
+      richText: "<p>Hello, <strong>world</strong>!</p>",
       // 鎮h�呰〃鍗�
       tableLabelhz: [
         { label: "搴忓彿", width: "", prop: "patid" },
@@ -927,12 +713,13 @@
         { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "update_by" },
       ],
 
-      tableLabelwj: [
-        { label: "搴忓彿", width: "", prop: "svyid" },
-        { label: "闂嵎鍚嶇О", width: "", prop: "svyname" },
-        { label: "闂嵎姒傝堪", width: "", prop: "description" },
-        { label: "淇敼鏃ユ湡", width: "", prop: "updateTime" },
-        { label: "鍒涘缓浜�", width: "", prop: "createBy" },
+      tableLabelxj: [
+        { label: "瀹f暀鍚嶇О", width: "", prop: "preachname" },
+        { label: "瀹f暀鎻忚堪", width: "", prop: "note" },
+        { label: "瀹f暀褰㈠紡", width: "", prop: "playType" },
+        { label: "閫傜敤鏂瑰紡", width: "", prop: "suitway" },
+        { label: "淇敼鏃ユ湡", width: "", prop: "uploadTime" },
+        { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "updateBy" },
       ],
       // 鍙橀噺
       tableLabelvariable: [
@@ -1104,10 +891,14 @@
         isavailable: "",
       };
       this.currenttype = this.$route.query.type;
-      this.title = "闂嵎鍐呭鍒楄〃";
-      this.tableLabel = this.tableLabelwj;
-      this.checkboxlist = ["绾夸笅锛堢焊璐級", "绾夸笂锛堢煭淇�/閽夐拤鐨勬枃鏈�侀棶鍗烽摼鎺ワ級"];
-      getQtemplatelist(queryParams).then((response) => {
+      this.title = "瀹f暀鍐呭鍒楄〃";
+      this.tableLabel = this.tableLabelxj;
+      this.checkboxlist = [
+        "绾夸笅锛堢焊璐級",
+        "绾夸笂锛堢煭淇�/閽夐拤鐨勬枃鏈棰戯級",
+        "瀹f暀閾炬帴",
+      ];
+      getlibrarylist(queryParams).then((response) => {
         this.userList = response.rows;
         this.total = response.total;
       });
@@ -1145,7 +936,7 @@
           }
           this.$router.push({
             path: "/followvisit/tasklist",
-            query: { tasktopic: 6 },
+            query: { tasktopic: 1 },
           });
         }
       });
@@ -1154,49 +945,62 @@
     // 纭閫夋嫨妯$増鏀惧叆浠诲姟妯$増
     selectfn(row, type) {
       // 妯$増鎯呭喌涓嬭幏鍙栨ā鐗堜俊鎭�
-      if (type == 1) {
-        this.libName = row.svyname;
-        this.libId = row.svyid;
-        console.log(row, "row");
-        this.Tasktemplate = row;
-        this.questionList = row.svyLibScripts;
-        this.previewtf = true;
-        this.previewid = row.svyid;
-        console.log(this.questionList, "questionList");
-        this.Variablehandling(row.svyLibScripts, 1);
-      } else if (type == 2) {
-      } else if (type == 3) {
-      }
+      this.libName = row.preachname;
+      this.richText = null;
+      this.libId = row.id;
+      console.log(row, "row");
+      this.Tasktemplate = row;
+      this.previewtf = true;
+      this.previewid = row.svyid;
+      console.log(this.questionList, "questionList");
+      // this.Variablehandling(row.svyLibScripts, 1);
+      console.log(row.richText);
+      axios
+        .get(row.richText)
+        .then((response) => {
+          console.log(response.data, "鏁版嵁"); // 杈撳嚭鑾峰彇鍒扮殑鏂囦欢鍐呭
+          this.richText = response.data;
+          this.richText = this.addStyleToImages(this.richText);
+        })
+        .catch((error) => {
+          console.error("Failed to fetch file:", error);
+        });
+    },
+    addStyleToImages(html) {
+      return html.replace(
+        /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
+        '<img$1style="width:100%;height:auto;"$3>'
+      );
     },
     // 澶勭悊闂灞傚彉閲�
-    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) {
-              Variablist.push({
-                value: item.variate,
-                fill: "",
-                name: item.variatename,
-              });
-            }
-          });
-        });
-        console.log(Variablist, "Variablist");
-        const Aarr = Variablist.filter(
-          (obj, index, self) =>
-            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);
-      }
-    },
+    // 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) {
+    //           Variablist.push({
+    //             value: item.variate,
+    //             fill: "",
+    //             name: item.variatename,
+    //           });
+    //         }
+    //       });
+    //     });
+    //     console.log(Variablist, "Variablist");
+    //     const Aarr = Variablist.filter(
+    //       (obj, index, self) =>
+    //         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);
+    //   }
+    // },
     // 瀛愪换鍔′簩绾у脊妗�
     handleAddpatient(row) {
       console.log(this.overallCase, "ssaaa");
@@ -1305,7 +1109,7 @@
     // 鑾峰彇璇︽儏
     Getdetails() {
       if (this.id) {
-        Questionnairetaskget({ taskid: this.id }).then((res) => {
+        getTaskInfo({ taskid: this.id }).then((res) => {
           let filteredArray = "";
           console.log(2233);
           if (res.code == 200) {
@@ -1441,13 +1245,9 @@
       });
     },
     previewFn() {
-      let id = this.Tasktemplate.id;
       this.Tasktemplate.id = null;
-      this.Tasktemplate.svyLibScripts.svyTaskTemplateTargetoptions =
-        this.Tasktemplate.svyLibScripts.svyLibTemplateTargetoptions;
-      this.Tasktemplate.svyTaskTemplateScriptVOS =
-        this.Tasktemplate.svyLibScripts;
-      this.Tasktemplate.templateid = id;
+
+      this.Tasktemplate.templateid = this.libId;
       this.Tasktemplate.isoperation = 1;
       TaskQuestioncomit(this.Tasktemplate).then((response) => {
         console.log(response);

--
Gitblit v1.9.3