From ca4592da86db14fae371a4c2b76af5dd2d7e12d0 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期一, 15 四月 2024 14:19:23 +0800 Subject: [PATCH] 测试完成 --- src/views/patient/propaganda/particty.vue | 219 ++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 144 insertions(+), 75 deletions(-) diff --git a/src/views/patient/propaganda/particty.vue b/src/views/patient/propaganda/particty.vue index c60ded7..d659f2a 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" @@ -75,6 +69,7 @@ > <el-time-picker is-range + arrow-control @change="changeTime" v-model="time1" range-separator="鑷�" @@ -91,6 +86,7 @@ > <el-time-picker is-range + arrow-control @change="changeTime" v-model="time2" range-separator="鑷�" @@ -107,6 +103,7 @@ > <el-time-picker is-range + arrow-control @change="changeTime" v-model="time3" range-separator="鑷�" @@ -334,21 +331,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> @@ -650,11 +644,12 @@ getlibrarylist, getFollowuplist, getQtemplatelist, - edithetask, + getTaskInfo, addhetask, gethetaskinfo, delhetaskinfo, Editsingletask, + getvFollowup, } from "@/api/AiCentre/index"; import SFtable from "@/components/SFtable"; //琛ㄦ牸缁勪欢 @@ -687,38 +682,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 +757,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: [], @@ -809,8 +827,7 @@ created() { this.id = this.$route.query.id; this.form.type = this.$route.query.type; - this.Addsubtask(); - this.Getsubtask(); + this.Getdetails(); this.Acquisitiontype(); }, @@ -930,17 +947,19 @@ // 淇濆瓨 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 { this.form.isoperation = 1; } - Editsingletask(this.form).then((response) => { + Editsingletask(this.form).then((res) => { if (res.code == 200) { if (this.form.id) { this.$modal.msgSuccess("鏂板鎴愬姛"); @@ -961,15 +980,60 @@ // }); }, // ----------------------琛ㄦ牸瀛愮粍浠朵簨浠� - // 閫夋嫨 + // 閫夋嫨妯$増 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); } }, // 瀛愪换鍔′簩绾у脊妗� @@ -1014,12 +1078,22 @@ Acknowledgereference() { this.quote = true; }, - // 鏂板瀛愪换鍔� - Addsubtask() { - this.topqueryParams.pguid = 2; - // addsvr_prjtask(this.topqueryParams).then((res) => { - // console.log(res); - // }); + // 鑾峰彇璇︽儏 + Getdetails() { + if (this.id) { + getTaskInfo({ taskid: this.id }).then((res) => { + const filteredArray = ""; + if (res.code == 200) { + this.form = res.data; + this.checkList = this.form.serviceform.split(","); + filteredArray = this.convertFormat1ToFormat2(this.form.textParam); + this.variableList = this.transitionList.concat(filteredArray); + } else { + this.$modal.msgError(res.code); + } + console.log(res); + }); + } }, // 鏂板娲鹃�佹偅鑰� AddDispatchpatients() { @@ -1030,16 +1104,6 @@ this.dialogVisiblepatient = false; }, - // 鏌ヨ瀛愪换鍔″垪琛� - Getsubtask() { - this.topqueryParams.pguid = 2; - console.log(this.topqueryParams, "aa"); - messagelistpatient(this.topqueryParams).then((res) => { - this.userList = res.rows; - this.total = res.total; - console.log(this.userList, "ss"); - }); - }, // 鍙橀噺--------------- variableEdit(index, row) { console.log(index, row); @@ -1105,6 +1169,11 @@ } } this.form.sendTimeslot = combinedData; + // 灞曠ず鏁版嵁涓存椂瀛樺偍鏃ユ湡銆佹棭銆佷腑銆佹櫄 + this.form.sendlimitabegin = this.daytime.join(","); + this.form.sendlimitaend = this.time1.join(","); + this.form.sendlimitnbegin = this.time2.join(","); + this.form.sendlimitnend = this.time3.join(","); console.log(combinedData, "combinedData"); }, }, -- Gitblit v1.9.3