From e014c6f2c4123d811353b4fe59d1b489e0587543 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 22 五月 2024 18:12:02 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/propaganda/particty.vue |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 109 insertions(+), 11 deletions(-)

diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue
index d191f38..54a2be1 100644
--- a/src/views/patient/propaganda/particty.vue
+++ b/src/views/patient/propaganda/particty.vue
@@ -41,7 +41,7 @@
                         placeholder="璇疯緭鍏ヤ换鍔″悕绉�"
                       /> </el-form-item
                   ></el-col>
-                  <el-col :span="12"
+                  <el-col :span="8"
                     ><el-form-item label="妯$増鍚嶇О">
                       <el-input
                         style="width: 220px"
@@ -50,6 +50,13 @@
                         placeholder="璇峰湪涓嬪垪閫夋嫨"
                       /> </el-form-item
                   ></el-col>
+                  <el-col :span="4">
+                    <el-button
+                      type="primary"
+                      icon="el-icon-edit"
+                      circle
+                    ></el-button>
+                  </el-col>
                 </el-row>
 
                 <el-form-item label="浠诲姟鎻忚堪">
@@ -637,6 +644,43 @@
         >
       </span>
     </el-dialog>
+    <el-dialog title="妯$増棰勮" :visible.sync="previewtf" width="60%">
+      <div class="preview-left">
+        <!-- 鍗曢�� -->
+        <div
+          class="topic-dev"
+          v-for="(item, index) in questionList"
+          :key="item.aaa"
+        >
+          <div class="dev-text">
+            {{ index + 1 }}銆�<span>{{ item.questionText }}</span>
+          </div>
+
+          <div class="dev-xx" v-if="item.valueType == 1">
+            <el-radio-group v-model="item.radio">
+              <el-radio
+                v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
+                :key="items.id"
+                :label="items.id"
+                >{{ items.targetvalue }}</el-radio
+              >
+            </el-radio-group>
+          </div>
+          <div v-else>
+            <el-input
+              type="textarea"
+              placeholder="鏈幏鍙栧埌淇℃伅"
+              v-model.sync="item.questionResult"
+              :rows="2"
+            />
+          </div>
+        </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="previewGo">鍓嶅線妯$増璇︽儏淇敼</el-button>
+        <el-button type="primary" @click="previewFn">纭浣跨敤</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -648,6 +692,7 @@
   getlibrarylist,
   getFollowuplist,
   getQtemplatelist,
+  TaskTemplatecomit,
   getTaskInfo,
   gethetaskinfo,
   delhetaskinfo,
@@ -665,13 +710,18 @@
       title: "瀹f暀鍐呭鍒楄〃",
       currenttype: 1, //1瀹f暀2闂ㄨ瘖3鍑洪櫌4澶嶈瘖5浣撴6闂嵎
       id: "",
+      previewid: "",
+      libName: "",
+      libId: null,
       Editprogress: 1, //缂栬緫杩涘害
+      previewtf: false, //棰勮
       loading: false, // 閬僵灞�
       patientloading: false, // 閬僵灞�
       dialogVisiblepatient: false, //娣诲姞鎮h�呭脊妗�
       radio: 1,
       checkboxlist: [],
       tableLabel: [],
+      questionList: [],
 
       // 鎮h�呰〃鍗�
       tableLabelhz: [
@@ -811,6 +861,7 @@
         sendType: 1,
         templatename: "",
         templateid: null,
+        libtemplateid: null,
       },
       taskoptions: [
         {
@@ -967,15 +1018,20 @@
           currenttype == 5 ||
           currenttype == 7
         ) {
-          this.form.templatename = row.templateName;
-          this.form.templateid = row.id;
+          this.libName = row.templateName;
+          this.libId = row.id;
         } else if (this.currenttype == 1) {
-          this.form.templatename = row.preachname;
-          this.form.templateid = row.id;
+          this.libName = row.preachname;
+          this.libId = row.id;
         }
         getvFollowup({ id: row.id }).then((res) => {
           if (res.code == 200) {
+            this.Tasktemplate = res.data;
             const data = res.data;
+            this.questionList = data.ivrLibaTemplateScriptVOList;
+            this.previewtf = true;
+            this.previewid = data.id;
+            console.log(this.questionList, "questionList");
             this.Variablehandling(data.ivrLibaTemplateScriptVOList, 1);
           }
         });
@@ -1097,17 +1153,15 @@
       });
       this.form.patTaskRelevances.push(...this.SelectPatientslist);
       this.dialogVisiblepatient = false;
-      this.assignedVariable()
+      this.assignedVariable();
     },
     // 鍙橀噺澶勭悊璧嬪�兼湇鍔�
     assignedVariable() {
       // 鑾峰彇鎮h�呭垪琛ㄤ俊鎭惊鐜�
-      console.log(this.variableList,'this.variableList');
+      console.log(this.variableList, "this.variableList");
       this.form.patTaskRelevances.forEach((item) => {
-        this.variableList.forEach((item1) => {
-
-        })
-      })
+        this.variableList.forEach((item1) => {});
+      });
       // 鍙栨暟鎹~鍏呭彉閲忔暟缁�
       // 鏁扮粍杞璞″瓨鍏�
     },
@@ -1187,6 +1241,34 @@
       if (this.time2) this.form.sendlimitnbegin = this.time2.join(",");
       if (this.time3) this.form.sendlimitnend = this.time3.join(",");
       console.log(combinedData, "combinedData");
+    },
+    // 鏌ョ湅妯$増
+    previewGo() {
+      this.$router.push({
+        path: "/knowledge/templateku/configurat/",
+        query: { id: this.previewid, task: true, data: this.form },
+      });
+    },
+    previewFn() {
+      let id = this.Tasktemplate.id;
+      this.Tasktemplate.id = null;
+      this.Tasktemplate.ivrLibaTemplateScriptVOList.ivrTaskScriptTargetoptionList =
+        this.Tasktemplate.ivrLibaTemplateScriptVOList.ivrLibaScriptTargetoptionList;
+      this.Tasktemplate.ivrTaskTemplateScriptVOList =
+        this.Tasktemplate.ivrLibaTemplateScriptVOList;
+      this.Tasktemplate.ivrLibaTemplateTagList = null;
+      this.Tasktemplate.tempDetpRelevances = null;
+      this.Tasktemplate.libtemplateid = id;
+      this.Tasktemplate.isoperation = 1;
+      this.Tasktemplate.libtemplatename = this.Tasktemplate.templateName;
+      TaskTemplatecomit(this.Tasktemplate).then((response) => {
+        console.log(response);
+        this.previewtf = false;
+        this.form.templateid = response.data;
+        this.form.libtemplateid = this.libId;
+        this.form.templatename = this.libName;
+        this.$modal.msgSuccess("閫夋嫨鎴愬姛");
+      });
     },
   },
 };
@@ -1280,6 +1362,22 @@
 //     margin: 0 20px;
 //   }
 // }
+.preview-left {
+  margin: 20px;
+  //   margin: 20px;
+  padding: 30px;
+  background: #ffff;
+  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 {
+    margin-bottom: 25px;
+    font-size: 20px !important;
+    .dev-text {
+      margin-bottom: 10px;
+    }
+  }
+}
 .jic-value {
   font-size: 20px;
   border-top: 1px solid #a7abac;

--
Gitblit v1.9.3