From da407d5de7f1106d494cb8cb13317dded827ba39 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期三, 27 三月 2024 11:19:22 +0800 Subject: [PATCH] 指标完成 --- src/views/repositoryai/templateku/configurat/index.vue | 412 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 295 insertions(+), 117 deletions(-) diff --git a/src/views/repositoryai/templateku/configurat/index.vue b/src/views/repositoryai/templateku/configurat/index.vue index 1178af9..c074384 100644 --- a/src/views/repositoryai/templateku/configurat/index.vue +++ b/src/views/repositoryai/templateku/configurat/index.vue @@ -2,14 +2,27 @@ <div class="Questionnairemanagement"> <!-- 宸︿晶鏍� --> <div class="sidecolumn"> - <div style="height: 400px"> - <el-steps direction="vertical" :active="Editprogress"> - <el-step title="鍩虹淇℃伅"></el-step> - <el-step title="闅忚妯$増棰樼洰"></el-step> - <el-step - title="闅忚妯$増棰勮" - description="鏌ョ湅闅忚妯$増棰勮锛屽彲瀵煎嚭PDF" - ></el-step> + <div> + <el-steps finish-status="success" :active="Editprogress" simple> + <el-step> + <template slot="title"> + <span style="cursor: pointer" @click="Editprogress = 1" + >鍩虹淇℃伅</span + > + </template> + </el-step> + <el-step> + <template slot="title"> + <span style="cursor: pointer" @click="Editprogress = 2" + >闅忚妯$増棰樼洰</span + > + </template> + </el-step> + <el-step description="鏌ョ湅闅忚妯$増棰勮锛屽彲瀵煎嚭PDF"> + <template slot="title"> + <span style="cursor: pointer" @click="preview">闅忚妯$増棰勮</span> + </template> + </el-step> </el-steps> </div> </div> @@ -45,14 +58,19 @@ filterable placeholder="璇烽�夋嫨鍒嗙被" > - <el-option - class="ruleFormaa" - v-for="item in indexAssortlist" - :key="item.id" - :label="item.indexAssortName" - :value="item.id" + <el-option-group + v-for="group in indexAssortlist" + :key="group.id" + :label="group.indexAssortName" > - </el-option> + <el-option + v-for="item in group.ivrLibaTemplateAssortList" + :key="item.id" + :label="item.indexAssortName" + :value="item.id" + > + </el-option> + </el-option-group> </el-select> </el-form-item> </el-col> @@ -287,7 +305,7 @@ </el-form-item> <el-row :gutter="20"> <el-col :span="8"> - <el-form-item label="闅忚鍓嶅鐞�" prop="name"> + <el-form-item label="闅忚鍓嶅鐞嗭紙鏄惁闇�瑕侊級" prop="name"> <el-select v-model="ruleForm.prefollowup" size="medium" @@ -305,7 +323,7 @@ </el-select> </el-form-item ></el-col> <el-col :span="9"> - <el-form-item label="闅忚鍚庡鐞�" prop="region"> + <el-form-item label="闅忚鍚庡鐞嗭紙鏄惁闇�瑕侊級" prop="region"> <el-select v-model="ruleForm.postfollowup" size="medium" @@ -328,7 +346,7 @@ <el-form-item label="闈欓粯鏃堕棿(绉�)" prop="name"> <div style="width: 40%"> <el-input - v-model="ruleForm.name" + v-model="ruleForm.silencetime" ></el-input></div></el-form-item ></el-col> <el-col :span="10"> @@ -339,11 +357,11 @@ ></el-col> </el-row> <el-form-item> - <el-button type="success" @click="nextstep('ruleForm')" + <el-button type="success" plain @click="nextstep('ruleForm')" >涓嬩竴姝�</el-button > <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button> - <el-button @click="Departmenttreatment('ruleForm')" + <el-button type="success" @click="Departmenttreatment('ruleForm')" >淇濆瓨闅忚妯$増鍩虹淇℃伅</el-button > </el-form-item> @@ -372,8 +390,8 @@ <el-table-column label="缂栧彿" align="center" - key="id" - prop="id" + key="guid" + prop="guid" /> <el-table-column label="鏍囬" @@ -444,7 +462,8 @@ <el-form-item label="棰樼洰鏍囬"> <el-input v-model="topicobj.questiontitle" - placeholder="璇疯緭鍏ユ爣棰�" + placeholder="璇蜂粠宸︿晶鍒楄〃閫夋嫨" + :disabled="true" ></el-input> </el-form-item> <el-row :gutter="10"> @@ -490,7 +509,7 @@ > </div> </div> - <div + <!-- <div class="topicxq" v-for="item in topicobj.ivrLibaScriptTargetoptionList" > @@ -549,7 +568,6 @@ > </el-input> </el-form-item> - <el-row :gutter="10"> <el-col :span="16"> <el-form-item label="璇煶鏂囦欢"> @@ -570,9 +588,156 @@ > <el-col :span="8"> <div style="text-align: right; padding-right: 10px"> - <el-button type="danger" round>鍒犻櫎</el-button> + <el-button type="danger" @click="" round>鍒犻櫎</el-button> </div> </el-col> + </el-row> + </div> --> + <Regular + :TargetoptionList="topicobj.ivrLibaScriptTargetoptionList" + @deloption="deloption" + :controlsc="false" + /> + <!-- 鏃犲尮閰嶇被鍨� --> + <div class="topicxq"> + <el-row :gutter="10"> + <el-col :span="12" + ><el-form-item label="鏃犲尮閰嶈瘽鏈�"> + <el-input + type="text" + placeholder="璇疯緭鍏�" + v-model="topicobj.nomatchtext" + show-word-limit + > + </el-input> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="10"> + <el-col :span="12" + ><el-form-item label="澶勭悊"> + <el-input + type="text" + placeholder="(榛樿)鏃犲0" + v-model="topicobj.text" + maxlength="10" + show-word-limit + > + </el-input> </el-form-item + ></el-col> + </el-row> + + <el-row :gutter="10"> + <el-col :span="16"> + <el-form-item label="璇煶鏂囦欢"> + <el-upload + class="upload-demo" + style="display: flex" + action="https://jsonplaceholder.typicode.com/posts/" + :on-change="handleChange" + :file-list="fileList" + :limit="1" + :on-exceed="handleExceed" + > + <el-button size="small" type="primary" + >鐐瑰嚮涓婁紶</el-button + > + </el-upload> + </el-form-item></el-col + > + </el-row> + </div> + <div class="topicxq"> + <el-row :gutter="10"> + <el-col :span="12" + ><el-form-item label="鍚笉娓呰瘽鏈�"> + <el-input + type="text" + placeholder="璇疯緭鍏�" + v-model="topicobj.noclearlytext" + show-word-limit + > + </el-input> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="10"> + <el-col :span="12" + ><el-form-item label="澶勭悊"> + <el-input + type="text" + placeholder="(榛樿)鏃犲0" + v-model="topicobj.text" + maxlength="10" + show-word-limit + > + </el-input> </el-form-item + ></el-col> + </el-row> + + <el-row :gutter="10"> + <el-col :span="16"> + <el-form-item label="璇煶鏂囦欢"> + <el-upload + class="upload-demo" + style="display: flex" + action="https://jsonplaceholder.typicode.com/posts/" + :on-change="handleChange" + :file-list="fileList" + :limit="1" + :on-exceed="handleExceed" + > + <el-button size="small" type="primary" + >鐐瑰嚮涓婁紶</el-button + > + </el-upload> + </el-form-item></el-col + > + </el-row> + </div> + <div class="topicxq"> + <el-row :gutter="10"> + <el-col :span="12" + ><el-form-item label="闈欓粯璇濇湳"> + <el-input + type="text" + placeholder="璇疯緭鍏�" + v-model="topicobj.sliencetext" + show-word-limit + > + </el-input> </el-form-item + ></el-col> + </el-row> + <el-row :gutter="10"> + <el-col :span="12" + ><el-form-item label="澶勭悊"> + <el-input + type="text" + placeholder="(榛樿)鏃犲0" + v-model="topicobj.text" + maxlength="10" + show-word-limit + > + </el-input> </el-form-item + ></el-col> + </el-row> + + <el-row :gutter="10"> + <el-col :span="16"> + <el-form-item label="璇煶鏂囦欢"> + <el-upload + class="upload-demo" + style="display: flex" + action="https://jsonplaceholder.typicode.com/posts/" + :on-change="handleChange" + :file-list="fileList" + :limit="1" + :on-exceed="handleExceed" + > + <el-button size="small" type="primary" + >鐐瑰嚮涓婁紶</el-button + > + </el-upload> + </el-form-item></el-col + > </el-row> </div> </el-form> @@ -580,14 +745,14 @@ </div> </div> - <el-button type="success" @click="nextstep('ruleForm')" - >涓嬩竴姝�</el-button - > - <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button> - <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button> - <el-button @click="Departmenttreatment('ruleForm')" + <el-button type="success" @click="Departmenttreatment('ruleForm')" >淇濆瓨棰樼洰鏁版嵁</el-button > + <el-button type="primary" plain @click="laststep()">涓婁竴姝�</el-button> + <el-button type="success" plain @click="preview('ruleForm')" + >鏌ョ湅棰勮</el-button + > + <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button> </div> <!-- 闅忚妯$増棰勮 --> <div v-if="Editprogress == 3"> @@ -595,39 +760,39 @@ <el-divider></el-divider> <div class="preview-left"> <!-- 鍗曢�� --> - <div class="topic-dev" v-for="item in valssu" :key="item.aaa"> + <div class="topic-dev" v-for="(item,index) in valssu" :key="item.aaa"> <div class="dev-text"> - {{ item.idd }}銆乕鍗曢�塢<span>{{ item.wssd }}</span> + {{ index+1 }}銆乕鍗曢�塢<span>{{ item.questionText }}</span> </div> <div class="dev-xx"> <el-radio-group v-model="radio"> <el-radio - v-for="(items, index) in item.sdadd" + v-for="(items, index) in item.ivrLibaScriptTargetoptionList" :key="index" :label="index" - >{{ items }}</el-radio + >{{ items.targetvalue }}</el-radio > </el-radio-group> </div> </div> <!-- 澶氶�� --> - <div class="topic-dev" v-for="item in valssu" :key="item.aaa"> + <div class="topic-dev" v-for="(item,index) in valssu" :key="item.aaa"> <div class="dev-text"> - {{ item.idd }}銆乕澶氶�塢<span>{{ item.wssd }}</span> + {{ index+1 }}銆乕澶氶�塢<span>{{ item.questionText }}</span> </div> <div class="dev-xx"> <el-checkbox-group v-model="radios"> <el-checkbox - v-for="(items, index) in item.sdadd" - :key="index" - :label="index" + v-for="(items, indexs) in item.ivrLibaScriptTargetoptionList" + :key="indexs" + :label="indexs" > - {{ items }} + {{ items.targetvalue }} </el-checkbox> </el-checkbox-group> </div> </div> - <!-- 濉┖ --> + <!-- 濉┖ <div class="topic-dev" v-for="item in valssu" :key="item.aaa"> <div class="dev-text"> {{ item.idd }}銆乕濉┖]<span>{{ item.wssd }}</span> @@ -636,11 +801,11 @@ <el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="radioas" clearable> </el-input> </div> - </div> + </div> --> </div> <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button> - <el-button>瀵煎嚭涓簆df</el-button> - <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button> + <el-button type="warning">瀵煎嚭涓簆df</el-button> + <el-button type="primary" plain @click="laststep()">涓婁竴姝�</el-button> </div> </div> <!-- 娣诲姞棰樼洰寮圭獥 --> @@ -721,6 +886,7 @@ import { listtag } from "@/api/system/label"; import store from "@/store"; import { listDept } from "@/api/system/dept"; +import Regular from "@/components/Regular"; //姝e垯缁勪欢 import { getFollowupclassify, delFollowupclassify, @@ -733,12 +899,15 @@ delFollowupinfo, Followupinfo, getFollowuplist, + deltargetillness, getillnesslist, illnesslistget, getillness, } from "@/api/AiCentre/index"; export default { + name: "SpeechTemplates", + components: { Regular }, data() { return { Editprogress: 1, //缂栬緫杩涘害 @@ -775,6 +944,7 @@ { value: "1", label: "蹇冨绉�" }, { value: "2", label: "蹇冨唴绉�" }, ], + standbylist: [], themelist: [], languagelist: [], courtyardlist: [], @@ -794,6 +964,8 @@ label: "indexAssortName", }, tempDetpRelevanceslist: [], + delScriptVOList: [], + optionIndex: "", variablelist: [ { variatename: "濮撳悕", variate: "${name}", default: 1 }, { variatename: "鐢佃瘽", variate: "${phone}", default: 1 }, @@ -816,6 +988,7 @@ sdadd: ["sss", "ssccss", "ssaas", "ss"], }, ], + radio:'', addvalue: "娣诲姞棰樼洰", // 棰樼洰琛ㄦ牸鏁版嵁 userList: [ @@ -922,9 +1095,6 @@ // 鎻愪氦 - compileFollowup(this.ruleForm).then((res) => { - this.$modal.msgSuccess("缂栬緫鎴愬姛"); - }); this.illnesslist.forEach((item, index) => { if (!item.id) { addtargetillness(item).then((res) => {}); @@ -933,11 +1103,16 @@ if (this.illnesslistapi.length) { deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); } + compileFollowup(this.ruleForm).then((res) => { + this.$modal.msgSuccess("缂栬緫鎴愬姛"); + this.$router.go(-1); + }); }, // 绉戝澶勭悊 Departmenttreatment() { this.ruleForm.deptNames = JSON.stringify(this.tempDetpRelevanceslist); - console.log(this.tempDetpRelevanceslist); + this.ruleForm.ivrLibaTemplateScriptVOList = + this.ruleForm.ivrLibaTemplateScriptVOList.concat(this.delScriptVOList); const result = this.tempDetpRelevanceslist.map( (subArr) => subArr[subArr.length - 1] ); @@ -995,23 +1170,6 @@ }); }); }, - - /** 鏌ヨ棰樼洰鍒楄〃 */ - getList() { - // this.loading = true; - listUser().then((response) => { - console.log(response); - // this.userList = response.data; - // this.total = response.total; - // this.loading = false; - console.log(this.userList); - }); - // const { rows } = await listUser(); - // console.log(rows); - // this.list = rows; - }, - // 淇敼棰樼洰淇℃伅 - Submittopicobj() {}, // 鎺у埗鏂囦欢 handleChange(file, fileList) { @@ -1093,6 +1251,7 @@ this.getaddtopiclist(); }, getaddtopiclist() { + console.log(11); this.drawer = true; getverbaltricklist(this.queryParams).then((res) => { this.loading = false; @@ -1102,53 +1261,83 @@ }); }, addtopic(row) { - row.isoperation = 1; - this.ruleForm.ivrLibaTemplateScriptVOList.push(row); + console.log(row); + getverbaltrick({ id: row.id }).then((res) => { + console.log(res, "璇︽儏"); + res.data.isoperation = 1; + res.data.pid = this.ruleForm.id; + res.data.ivrLibaScriptTargetoptionList.forEach((item) => { + item.isoperation = 1; + }); + this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data); + }); }, handleDelete(row) { + let index = this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row); this.ruleForm.ivrLibaTemplateScriptVOList.splice( this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row), 1 ); + row.isoperation = 3; + this.delScriptVOList.push(row); }, handleUpdate(row) { - console.log(row.id); - getverbaltrick({ id: row.id }).then((res) => { - this.topicobj = res.data; - console.log(res.data); - }); - }, - handleDelete(item) { - const index = this.userList.indexOf(item); - if (index !== -1) { - this.userList.splice(index, 1); // 浠庣储寮曚綅缃垹闄や竴涓厓绱� - this.sortFn(); + console.log(row); + this.optionIndex = this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row); + if (row.ivrLibaScriptTargetoptionList.length) { + console.log(11); + this.topicobj = row; } else { - console.log("鏈壘鍒拌瀵硅薄"); + getverbaltrick({ id: row.id }).then((res) => { + if (res.code==200) { + this.topicobj = res.data; + console.log(res.data, "topicobj"); + }else{ + console.log('娌℃壘鍒�'); + } + }); } }, syioption(row) { - const index = this.getIndexInArray(this.userList, row); - const item = this.userList.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓� - this.userList.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣� + const index = this.getIndexInArray( + this.ruleForm.ivrLibaTemplateScriptVOList, + row + ); + const item = this.ruleForm.ivrLibaTemplateScriptVOList.splice( + index, + 1 + )[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓� + this.ruleForm.ivrLibaTemplateScriptVOList.splice(index - 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣� this.sortFn(); }, xiayioption(row) { - const index = this.getIndexInArray(this.userList, row); - const item = this.userList.splice(index, 1)[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓� - this.userList.splice(index + 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣� + const index = this.getIndexInArray( + this.ruleForm.ivrLibaTemplateScriptVOList, + row + ); + const item = this.ruleForm.ivrLibaTemplateScriptVOList.splice( + index, + 1 + )[0]; // 绉婚櫎鎸囧畾绱㈠紩澶勭殑鍏冪礌锛屽苟淇濆瓨鍒癷tem鍙橀噺涓� + this.ruleForm.ivrLibaTemplateScriptVOList.splice(index + 1, 0, item); // 灏唅tem鎻掑叆鍒扮储寮曚綅缃殑鍓嶄竴浣� this.sortFn(); }, sortFn() { - this.userList = this.userList.map((item, index) => { - return { - userid: index + 1, - userName: item.userName, - verbaltrick: item.verbaltrick, - }; - }); - console.log(this.userList); + this.ruleForm.ivrLibaTemplateScriptVOList = + this.ruleForm.ivrLibaTemplateScriptVOList.map((item, index) => { + return Object.assign({}, item, { guid: (index + 1).toString() }); + }); + console.log(this.ruleForm.ivrLibaTemplateScriptVOList); }, + // -----------------------璇濇湳閫夐」 + deloption() {}, + // 淇敼棰樼洰淇℃伅 + Submittopicobj() { + this.ruleForm.ivrLibaTemplateScriptVOList[this.optionIndex] = + this.topicobj; + this.$modal.msgSuccess("鏆傚瓨閫夐」鎴愬姛"); + }, + // --------------------- resetForm(formName) { this.$refs[formName].resetFields(); @@ -1195,18 +1384,11 @@ this.inputVisibleillness = false; this.inputValueillness = ""; }, - // 淇濆瓨 - confirmillness() { - this.illnesslist.forEach((item, index) => { - if (!item.id) { - addtargetillness(item).then((res) => {}); - } - }); - if (this.illnesslistapi.length) { - deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); - } - this.illnessVisible = false; - this.$modal.msgSuccess("缂栬緫鎴愬姛"); + // 棰勮--------------- + preview() { + console.log(this.ruleForm); + this.valssu = this.ruleForm.ivrLibaTemplateScriptVOList + this.Editprogress = 3; }, }, }; @@ -1214,14 +1396,9 @@ <style lang="scss" scoped> .Questionnairemanagement { - display: flex; + // display: flex; } .sidecolumn { - width: 250px; - min-height: 100vh; - text-align: center; - // display: flex; - // margin-top: 20px; margin: 20px; margin-bottom: 0; padding: 30px; @@ -1233,9 +1410,8 @@ .leftvlue { // display: flex; // flex: 1; - width: 80%; - margin-top: 20px; - // margin: 20px; + // width: 80%; + margin: 20px; padding: 30px; background: #ffff; border: 1px solid #dcdfe6; @@ -1319,8 +1495,10 @@ .presentation-right { width: 55%; max-height: 688px; - padding: 0 20px; + margin: 0 20px; font-size: 18px; + -webkit-box-shadow: 0 2px 4px 0 rgba(32, 32, 32, 0.12), + 0 0 6px 0 rgba(58, 57, 57, 0.04); overflow: auto; .headline { display: flex; -- Gitblit v1.9.3