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/patient/propaganda/particty.vue | 173 +++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 118 insertions(+), 55 deletions(-)
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) => {
--
Gitblit v1.9.3