From 8aca82344ce82cf90f3357b8ba5abe35a0e3a74f Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期四, 15 八月 2024 09:42:38 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/verbaltrick/particulars/index.vue | 209 ++++++++++++++++++++++++++++++++++----------------- 1 files changed, 139 insertions(+), 70 deletions(-) diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue index 0b85d31..fa34236 100644 --- a/src/views/repositoryai/verbaltrick/particulars/index.vue +++ b/src/views/repositoryai/verbaltrick/particulars/index.vue @@ -273,12 +273,13 @@ </el-form-item> </el-col ></el-row> <el-row> - <el-col :span="12"> + <el-col :span="6"> <el-form-item label="闂璇煶" prop="verbaltrickyy"> <el-upload class="upload-demo" :action="uploadImgUrl" :headers="headers" + :show-file-list="false" :on-success=" (response, file) => handleChange(response, file, 1) " @@ -289,14 +290,22 @@ </el-upload> </el-form-item> </el-col> - <el-col :span="6"> </el-col> - <mini-audio - :audio-source=" - indexform.scriptVoice - ? indexform.scriptVoice - : 'https://example.com/example.mp3' - " - ></mini-audio> + <el-col :span="6"> + <span style="font-size: 12px" v-if="indexform.scriptVoice">{{ + indexform.scriptVoice.substring( + indexform.scriptVoice.lastIndexOf("/") + 1 + ) + }}</span> + </el-col> + <el-col :span="6"> + <mini-audio + :audio-source=" + indexform.scriptVoice + ? indexform.scriptVoice + : 'https://example.com/example.mp3' + " + ></mini-audio> + </el-col> </el-row> <el-row> @@ -314,11 +323,12 @@ </el-form-item> </el-col ></el-row> <el-row> - <el-col :span="12"> + <el-col :span="6"> <el-form-item label="鏃犲尮閰嶈闊�" prop="verbaltrickyy"> <el-upload class="upload-demo" :action="uploadImgUrl" + :show-file-list="false" :headers="headers" :on-success=" (response, file) => handleChange(response, file, 2) @@ -330,14 +340,22 @@ </el-upload> </el-form-item> </el-col> - <el-col :span="6"> </el-col> - <mini-audio - :audio-source=" - indexform.nomatchvoice - ? indexform.nomatchvoice - : 'https://example.com/example.mp3' - " - ></mini-audio> + <el-col :span="6"> + <span style="font-size: 12px" v-if="indexform.nomatchvoice">{{ + indexform.nomatchvoice.substring( + indexform.nomatchvoice.lastIndexOf("/") + 1 + ) + }}</span> + </el-col> + <el-col :span="6"> + <mini-audio + :audio-source=" + indexform.nomatchvoice + ? indexform.nomatchvoice + : 'https://example.com/example.mp3' + " + ></mini-audio> + </el-col> </el-row> <el-row> <el-col :span="24"> @@ -354,11 +372,12 @@ </el-form-item> </el-col ></el-row> <el-row> - <el-col :span="12"> + <el-col :span="6"> <el-form-item label="鏃犲0璇煶" prop="verbaltrickyy"> <el-upload class="upload-demo" :action="uploadImgUrl" + :show-file-list="false" :headers="headers" :on-success=" (response, file) => handleChange(response, file, 3) @@ -370,14 +389,22 @@ </el-upload> </el-form-item> </el-col> - <el-col :span="6"> </el-col> - <mini-audio - :audio-source=" - indexform.sliencevoice - ? indexform.sliencevoice - : 'https://example.com/example.mp3' - " - ></mini-audio> + <el-col :span="6"> + <span style="font-size: 12px" v-if="indexform.sliencevoice">{{ + indexform.sliencevoice.substring( + indexform.sliencevoice.lastIndexOf("/") + 1 + ) + }}</span> + </el-col> + <el-col :span="6"> + <mini-audio + :audio-source=" + indexform.sliencevoice + ? indexform.sliencevoice + : 'https://example.com/example.mp3' + " + ></mini-audio> + </el-col> </el-row> <el-row> @@ -395,11 +422,12 @@ </el-form-item> </el-col ></el-row> <el-row> - <el-col :span="12"> + <el-col :span="6"> <el-form-item label="鍚笉娓呰闊�" prop="verbaltrickyy"> <el-upload class="upload-demo" :action="uploadImgUrl" + :show-file-list="false" :headers="headers" :on-success=" (response, file) => handleChange(response, file, 4) @@ -411,14 +439,22 @@ </el-upload> </el-form-item> </el-col> - <el-col :span="6"> </el-col> - <mini-audio - :audio-source=" - indexform.noclearlyvoice - ? indexform.noclearlyvoice - : 'https://example.com/example.mp3' - " - ></mini-audio> + <el-col :span="6"> + <span style="font-size: 12px" v-if="indexform.noclearlyvoice">{{ + indexform.noclearlyvoice.substring( + indexform.noclearlyvoice.lastIndexOf("/") + 1 + ) + }}</span> + </el-col> + <el-col :span="6"> + <mini-audio + :audio-source=" + indexform.noclearlyvoice + ? indexform.noclearlyvoice + : 'https://example.com/example.mp3' + " + ></mini-audio> + </el-col> </el-row> </el-form> <div slot="footer" class="dialog-footer"> @@ -468,7 +504,10 @@ <el-row> <el-col :span="24"> <el-form-item label="鍊肩被鍨�"> - <el-radio-group disabled v-model="indexform.valueType"> + <el-radio-group + :disabled="indexform.targetid" + v-model="indexform.valueType" + > <el-radio :label="1">閫夐」</el-radio> <el-radio :label="2">鏂囨湰</el-radio> <el-radio :label="3">鏁板��</el-radio> @@ -476,16 +515,19 @@ </el-form-item> <el-form-item label="棰樼洰绫诲瀷"> - <el-radio-group disabled v-model="indexform.scriptType"> + <el-radio-group + @input="typeselection" + :disabled="indexform.targetid" + v-model="indexform.scriptType" + > <el-radio :label="1">鍗曢��</el-radio> - <el-radio :label="2">澶氶��</el-radio> - <el-radio :label="3">濉┖</el-radio> + <!-- <el-radio :label="2">澶氶��</el-radio> --> <el-radio :label="4">闂瓟</el-radio> </el-radio-group> </el-form-item> </el-col></el-row > - <div v-if="indexform.valueType == 1"> + <div v-if="indexform.scriptType == 1 || indexform.scriptType == 2"> <el-card class="box-card" style="margin-bottom: 20px"> <Regular :TargetoptionList="indexform.ivrLibaScriptTargetoptionList" @@ -501,14 +543,16 @@ <el-col :span="12"> <el-form-item label="娴嬭瘯杈撳叆" prop="targetvalue"> <el-input - v-model="testvalue" + v-model="indexform.content" placeholder="璇疯緭鍏ユ祴璇曞唴瀹�" maxlength="40" /> </el-form-item> </el-col> <el-col :span="4"> - <el-button type="success">寮�濮嬫祴璇�</el-button> + <el-button type="success" @click="testtagerlist" + >寮�濮嬫祴璇�</el-button + > </el-col> </el-row> <div style="margin-bottom: 20px"> @@ -559,6 +603,17 @@ style="width: 200px" @keyup.enter.native="gettargetInfo" /> + </el-form-item> + <el-form-item label="鎸囨爣绫诲瀷" prop="scriptType"> + <el-select v-model="queryParams.scriptType" placeholder="璇烽�夋嫨"> + <el-option + v-for="(item, index) in qyoptions" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> </el-form-item> <el-form-item> @@ -690,6 +745,7 @@ addvalue: "娣诲姞棰樼洰", languagelist: [], //璇█鍒楄〃 + qyoptions: [], // 鏌ヨ鍙傛暟 queryParams: { pageNum: 1, @@ -707,12 +763,16 @@ this.languagelist = store.getters.languagelist; this.usable = store.getters.usable; this.courtyardlist = store.getters.courtyardlist; + this.qyoptions = store.getters.askvaluetype; }, methods: { // 鑾峰彇璇︽儏鏁版嵁 getverbaltrick() { let id = this.$route.query.id; + this.indexform.language = "鏅�氳瘽"; + this.indexform.isAvailable = "1"; + if (id) { getverbaltrick({ id: id }).then((res) => { this.indexform = res.data; @@ -783,33 +843,21 @@ } }, - // targetchange(res) { - // console.log(res); - // gettargetInfo({ id: res }).then((res) => { - // console.log(res.rows[0]); - // this.$modal - // .confirm('鏄惁娣诲姞"' + res.rows[0].targetname + '"鎸囨爣鐨勯�夐」锛�') - // .then(() => { - // this.indexform.valueType = res.rows[0].valueType; - // this.indexform.scriptType = res.rows[0].scriptType; - // this.indexform.scriptTopic = res.rows[0].targetname; - // this.indexform.targetname = res.rows[0].targetname; - // this.indexform.targetid = res.rows[0].id; - // this.indexform.targetdesc = res.rows[0].targetdesc; - // this.indexform.isAvailable = "0"; - // this.indexform.language = "鏅�氳瘽"; - // this.indexform.isenable = res.rows[0].isenable; - // this.$forceUpdate(); - // res.rows[0].targetoptionList.forEach((item) => { - // item.isoperation = 1; - // this.indexform.ivrLibaScriptTargetoptionList.push(item); - // }); - // }) - // .catch(() => { - // this.$modal.msgSuccess("宸插彇娑�"); - // }); - // }); - // }, + testtagerlist() { + if (this.indexform.content) { + let data = this.indexform; + data.targetoptionList = + this.indexform.ivrLibaScriptTargetoptionList.concat(this.dellist); + testtagerlist(data).then((res) => { + this.$modal.msgSuccess("娴嬭瘯鎴愬姛"); + this.testgovalue = res.msg; + this.getList(); + }); + } else { + this.$modal.msgError("璇峰~鍐欐祴璇曞唴瀹�"); + return; + } + }, // 閫夋嫨鎸囨爣 selectlabel(row) { this.$modal @@ -837,6 +885,7 @@ .catch(() => {}); }, gettargetInfo() { + this.queryParams.suitWay = 2; gettargetInfo(this.queryParams).then((res) => { console.log(res); this.targetList = res.rows; @@ -852,6 +901,25 @@ this.gettargetInfo(); }, + // 棰樼洰绫诲瀷鏇存崲 + typeselection(row) { + if ( + (row == 1 || row == 2) && + !this.indexform.ivrLibaScriptTargetoptionList.length + ) { + this.indexform.ivrLibaScriptTargetoptionList.push({ + guid: 1, + isoperation: 1, + targetvalue: "", + targetregex: "", + targetregex2: "", + dynamiccruxs: [], + nodynamiccruxs: [], + dynamiccruxsJson: "", + nodynamiccruxsJson: "", + }); + } + }, // 涓嬩竴姝� nextstep() { if (this.Editprogress <= 1) { @@ -892,6 +960,7 @@ this.indexform.scriptVoice = response.url; } else if (additionalParam == 2) { this.indexform.nomatchvoice = response.url; + console.log(this.indexform.nomatchvoice); } else if (additionalParam == 3) { this.indexform.sliencevoice = response.url; } else if (additionalParam == 4) { -- Gitblit v1.9.3