From 32d69fcb07f2325d9b93ce1a8b3716eec73ae70f Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 08 四月 2024 18:24:07 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/tasklist/index.vue                 |   21 ++---
 src/views/repositoryai/templateku/configurat/index.vue   |    1 
 src/views/repositoryai/verbaltrick/particulars/index.vue |   24 +++--
 src/api/AiCentre/SingleTask.js                           |   10 ++
 src/views/patient/propaganda/particty.vue                |  173 +++++++++++++++++++++++++++++-------------
 src/components/SFtable/index.vue                         |    7 +
 6 files changed, 154 insertions(+), 82 deletions(-)

diff --git a/src/api/AiCentre/SingleTask.js b/src/api/AiCentre/SingleTask.js
index 25e352a..fe373e5 100644
--- a/src/api/AiCentre/SingleTask.js
+++ b/src/api/AiCentre/SingleTask.js
@@ -54,4 +54,12 @@
       method: "post",
       data: data,
     });
-  }
\ No newline at end of file
+  }
+    // 鏂板鎴栦慨鏀瑰垹闄ゅ崟涓�浠诲姟
+    export function getTasklist(data) {
+      return request({
+        url: "/smartor/taskcall/list",
+        method: "post",
+        data: data,
+      });
+    }
\ No newline at end of file
diff --git a/src/components/SFtable/index.vue b/src/components/SFtable/index.vue
index eb51795..21b1746 100644
--- a/src/components/SFtable/index.vue
+++ b/src/components/SFtable/index.vue
@@ -42,7 +42,8 @@
       width="120"
     >
       <template slot-scope="scope">
-        <dict-tag :options="usable" :value="scope.row.isavailable" />
+        <dict-tag :options="qyoptions" :value="scope.row.usestate" />
+
       </template>
     </el-table-column>
     <el-table-column
@@ -87,7 +88,7 @@
       mode: [],
       languagelist: [],
       editabshape: [],
-      usable: [],
+      qyoptions: [],
       precedencetype: [],
     };
   },
@@ -129,7 +130,7 @@
   created() {
     this.mode = store.getters.mode;
     this.languagelist = store.getters.languagelist;
-    this.usable = store.getters.usable;
+    this.qyoptions = store.getters.usable;
     this.precedencetype = store.getters.precedencetype;
     this.editabshape = store.getters.editabshape;
   },
diff --git a/src/views/followvisit/tasklist/index.vue b/src/views/followvisit/tasklist/index.vue
index b5a18c6..19d89c1 100644
--- a/src/views/followvisit/tasklist/index.vue
+++ b/src/views/followvisit/tasklist/index.vue
@@ -345,7 +345,6 @@
 
 <script>
 import {
-  listUser,
   getUser,
   delUser,
   addUser,
@@ -353,6 +352,7 @@
   resetUserPwd,
   changeUserStatus,
 } from "@/api/system/user";
+import { getTasklist, getlibrarylist } from "@/api/AiCentre/index";
 
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -527,7 +527,7 @@
       // 鏌ヨ鍙傛暟
       topqueryParams: {
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 1000,
         userName: undefined,
         tagid: undefined,
         topic: undefined,
@@ -615,17 +615,14 @@
     });
   },
   methods: {
-    /** 鏌ヨ闂ㄨ瘖闅忚鍒楄〃 */
+    /** 鏌ヨ浠诲姟鍒楄〃 */
     getList() {
-      this.loading = true;
-      listUser(this.addDateRange(this.topqueryParams, this.dateRange)).then(
-        (response) => {
-          console.log(response);
-          this.userList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      // this.loading = true;
+      getTasklist(this.topqueryParams).then((response) => {
+        this.userList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     // 鏌ョ湅闂ㄨ瘖闅忚璇︽儏
     Referencequestion(row) {
diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue
index c60ded7..e0b184f 100644
--- a/src/views/patient/propaganda/particty.vue
+++ b/src/views/patient/propaganda/particty.vue
@@ -11,8 +11,8 @@
           ></el-step>
           <el-step
             icon="el-icon-user"
-            title="瀹f暀瀵硅薄"
-            description="鍦ㄦ湰閮ㄩ�夋嫨瀹f暀鐥呬汉"
+            title="浠讳富浣�"
+            description="鍦ㄦ湰閮ㄩ�夋嫨鏈嶅姟鎮h��"
           ></el-step>
           <el-step icon="el-icon-user" title="妯$増纭"></el-step>
         </el-steps>
@@ -49,10 +49,7 @@
                     <el-radio :label="3">鍗冲埢鍙戦��</el-radio>
                   </el-radio-group>
                 </el-form-item>
-                <el-form-item
-                  label="鍙戦�佹棩鏈燂細"
-                  v-if="currenttype != 2 && form.sendType == 1"
-                >
+                <el-form-item label="鍙戦�佹棩鏈燂細" v-if="form.sendType == 1">
                   <el-date-picker
                     v-model="daytime"
                     @change="changeTimeday"
@@ -64,10 +61,7 @@
                   >
                   </el-date-picker>
                 </el-form-item>
-                <el-form-item
-                  label="鍙戦�佹椂闂存锛�"
-                  v-if="currenttype != 2 && form.sendType == 1"
-                >
+                <el-form-item label="鍙戦�佹椂闂存锛�" v-if="form.sendType == 1">
                   <div style="display: flex">
                     <div style="margin-right: 10px">
                       <span style="font-size: 18px; margin-right: 10px"
@@ -334,21 +328,18 @@
                 <el-row :gutter="20">
                   <el-table :data="variableList" style="width: 100%">
                     <el-table-column
-                      prop="variablename"
+                      prop="name"
                       align="center"
                       label="鍙橀噺鍚嶇О"
                     >
                     </el-table-column>
-                    <el-table-column
-                      prop="character"
-                      align="center"
-                      label="鍖归厤绗�"
-                    >
+                    <el-table-column prop="value" align="center" label="鍖归厤绗�">
                     </el-table-column>
                     <el-table-column label="鏇挎崲鍊�" align="center">
                       <template slot-scope="scope">
                         <el-input
-                          v-model="scope.row.Replacementvalue"
+                          :disabled="scope.row.default"
+                          v-model="scope.row.fill"
                           placeholder="璇疯緭鍏ュ唴瀹�"
                         ></el-input>
                       </template>
@@ -655,6 +646,7 @@
   gethetaskinfo,
   delhetaskinfo,
   Editsingletask,
+  getvFollowup,
 } from "@/api/AiCentre/index";
 import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢
 
@@ -687,38 +679,38 @@
         { label: "瀹f暀鎻忚堪", width: "", prop: "note" },
         { label: "瀹f暀褰㈠紡", width: "", prop: "playType" },
         { label: "閫傜敤鏂瑰紡", width: "", prop: "suitway" },
-        { label: "鍒涘缓鏃ユ湡", width: "", prop: "uploadTime" },
+        { label: "淇敼鏃ユ湡", width: "", prop: "uploadTime" },
         { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "update_by" },
       ],
       tableLabelmz: [
-        { label: "闅忚鍚嶇О", width: "118", prop: "templateName" },
-        { label: "闅忚妯$増", width: "130", prop: "impTemplate" },
-        { label: "鍒涘缓鏃ユ湡", width: "136", prop: "uploadTime" },
-        { label: "鍒涘缓浜猴紙缂猴級", width: "130", prop: "update_by" },
+        { label: "闅忚鍚嶇О", width: "", prop: "templateName" },
+        { label: "涓昏鍐呭", width: "", prop: "note" },
+        { label: "淇敼鏃ユ湡", width: "", prop: "updateTime" },
+        { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "update_by" },
       ],
       tableLabelcy: [
-        { label: "闅忚鍚嶇О", width: "118", prop: "templateName" },
-        { label: "闅忚璁″垝", width: "130", prop: "impTemplate" },
-        { label: "鍒涘缓鏃ユ湡", width: "136", prop: "uploadTime" },
-        { label: "鍒涘缓浜猴紙缂猴級", width: "130", prop: "update_by" },
+        { label: "闅忚鍚嶇О", width: "", prop: "templateName" },
+        { label: "闅忚璁″垝", width: "", prop: "impTemplate" },
+        { label: "淇敼鏃ユ湡", width: "", prop: "uploadTime" },
+        { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "update_by" },
       ],
       tableLabelfz: [
-        { label: "閫氱煡鍚嶇О", width: "118", prop: "templateName" },
-        { label: "閫氱煡妯$増", width: "130", prop: "impTemplate" },
-        { label: "鍒涘缓鏃ユ湡", width: "136", prop: "uploadTime" },
-        { label: "鍒涘缓浜猴紙缂猴級", width: "130", prop: "update_by" },
+        { label: "閫氱煡鍚嶇О", width: "", prop: "templateName" },
+        { label: "閫氱煡妯$増", width: "", prop: "impTemplate" },
+        { label: "淇敼鏃ユ湡", width: "", prop: "uploadTime" },
+        { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "update_by" },
       ],
       tableLabeltj: [
-        { label: "閫氱煡鍚嶇О", width: "118", prop: "name" },
-        { label: "閫氱煡妯$増", width: "130", prop: "impTemplate" },
-        { label: "鍒涘缓鏃ユ湡", width: "136", prop: "uploadTime" },
-        { label: "鍒涘缓浜猴紙缂猴級", width: "130", prop: "update_by" },
+        { label: "閫氱煡鍚嶇О", width: "", prop: "name" },
+        { label: "閫氱煡妯$増", width: "", prop: "impTemplate" },
+        { label: "淇敼鏃ユ湡", width: "", prop: "uploadTime" },
+        { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "update_by" },
       ],
       tableLabelwj: [
-        { label: "闂嵎鍚嶇О", width: "118", prop: "name" },
-        { label: "闂嵎妯$増", width: "130", prop: "impTemplate" },
-        { label: "鍒涘缓鏃ユ湡", width: "136", prop: "uploadTime" },
-        { label: "鍒涘缓浜猴紙缂猴級", width: "130", prop: "update_by" },
+        { label: "闂嵎鍚嶇О", width: "", prop: "name" },
+        { label: "闂嵎妯$増", width: "", prop: "impTemplate" },
+        { label: "淇敼鏃ユ湡", width: "", prop: "uploadTime" },
+        { label: "鍒涘缓浜猴紙缂猴級", width: "", prop: "update_by" },
       ],
       // 鍙橀噺
       tableLabelvariable: [
@@ -762,21 +754,44 @@
       sonuserList: [], //閫変腑鎮h�呭垪琛�
       variableList: [
         {
-          variablename: "濮撳悕",
-          character: "${name}",
-          Replacementvalue: "榫欏偛澶�",
+          name: "濮撳悕",
+          value: "${name}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true,
         },
         {
-          variablename: "鍦板潃",
-          character: "${dzz}",
-          Replacementvalue: "榫欏",
+          name: "鍦板潃",
+          value: "${dzz}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true,
         },
         {
-          variablename: "鐢佃瘽",
-          character: "${dhh}",
-          Replacementvalue: "鍏釜鍏�",
+          name: "鐢佃瘽",
+          value: "${dhh}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true,
         },
       ], //鍙橀噺鍒楄〃
+      transitionList: [
+        {
+          name: "濮撳悕",
+          value: "${name}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true,
+        },
+        {
+          name: "鍦板潃",
+          value: "${dzz}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true,
+        },
+        {
+          name: "鐢佃瘽",
+          value: "${dhh}",
+          fill: "娲惧彂鏃惰嚜鍔ㄥ尮閰�",
+          default: true,
+        },
+      ],
       variableListTime: [],
       tasktopic: null, //鏂板绫诲瀷
       SelectPatientslist: [],
@@ -930,11 +945,14 @@
     // 淇濆瓨
     submitForm(formName) {
       this.form.serviceform = this.checkList.join(",");
-      this.form.textParam = {
-        濮撳悕: { "${name}": "榫欏偛澶�" },
-        鍦板潃: { "${dzz}": "榫欏" },
-        鐢佃瘽: { "${dhh}": "鍏釜鍏�" },
-      };
+      const filteredArray = this.variableList.filter(
+        (item) =>
+          item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
+      );
+      console.log(filteredArray, "瀛樺墠鍙橀噺");
+      this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+
+
       if (this.form.id) {
         this.form.isoperation = 2;
       } else {
@@ -961,17 +979,62 @@
       // });
     },
     // ----------------------琛ㄦ牸瀛愮粍浠朵簨浠�
-    // 閫夋嫨
+    // 閫夋嫨妯$増
     selectfn(row, type) {
       console.log(row);
       console.log(type);
+      // 妯$増鎯呭喌涓嬭幏鍙栨ā鐗堜俊鎭�
       if (type == 1) {
-        this.form.templatename = row.preachname;
-        this.form.templateid = row.templateid;
+        if (
+          this.currenttype == 2 ||
+          this.currenttype == 4 ||
+          this.currenttype == 3
+        ) {
+          this.form.templatename = row.templateName;
+          this.form.templateid = row.id;
+        } else if (this.currenttype == 1) {
+          this.form.templatename = row.preachname;
+          this.form.templateid = row.id;
+        }
+        getvFollowup({ id: row.id }).then((res) => {
+          if (res.code == 200) {
+            const data = res.data;
+            this.Variablehandling(data.ivrLibaTemplateScriptVOList, 1);
+          }
+        });
       } else if (type == 2) {
       } else if (type == 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);
+      }
+    },
     // 瀛愪换鍔′簩绾у脊妗�
     handleAddpatient(row) {
       getTaskpatient(this.patientqueryParams).then((response) => {
diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue
index 8783cfb..0182187 100644
--- a/src/views/repositoryai/templateku/configurat/index.vue
+++ b/src/views/repositoryai/templateku/configurat/index.vue
@@ -1216,6 +1216,7 @@
           item.isoperation = 1;
         });
         this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
+        this.sortFn();
       });
     },
     handleDelete(row) {
diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue
index af6b4ff..5fedafb 100644
--- a/src/views/repositoryai/verbaltrick/particulars/index.vue
+++ b/src/views/repositoryai/verbaltrick/particulars/index.vue
@@ -605,8 +605,8 @@
       testgovalue: "",
       topicobj: {},
       indexform: {
-        ivrLibaScriptTargetoptionList:[],
-        ivrLibaScriptTagList:[]
+        ivrLibaScriptTargetoptionList: [],
+        ivrLibaScriptTagList: [],
       },
       mode: [],
       questionclass: [],
@@ -696,18 +696,20 @@
 
     // 淇濆瓨璇︾粏淇℃伅
     Saveproblem() {
-      console.log(this.variablelist);
+      console.log(this.indexform);
       this.indexform.otherdata = JSON.stringify(this.variablelist);
-      this.indexform.suitway = this.indexform.suitway.join(",");
-      
+      if (this.indexform.suitway) {
+        this.indexform.suitway = this.indexform.suitway.join(",");
+      }
+
       if (this.indexform.id) {
         this.indexform.ivrLibaScriptTargetoptionList =
-        this.indexform.ivrLibaScriptTargetoptionList.map((res) => {
-          if (res.isoperation!=1) {
-            res.isoperation = 2;
-          }
-          return res;
-        });
+          this.indexform.ivrLibaScriptTargetoptionList.map((res) => {
+            if (res.isoperation != 1) {
+              res.isoperation = 2;
+            }
+            return res;
+          });
         this.indexform.isoperation = 2;
         compileverbaltrick(this.indexform).then((res) => {
           if (res.code == 200) {

--
Gitblit v1.9.3