From 3d50e2c6d8cd86ee10b4353ad6365c59f588dbc4 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 31 七月 2024 17:22:02 +0800
Subject: [PATCH] 测试完成
---
src/views/repositoryai/verbaltrick/particulars/index.vue | 153 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 107 insertions(+), 46 deletions(-)
diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue
index 6300473..0b85d31 100644
--- a/src/views/repositoryai/verbaltrick/particulars/index.vue
+++ b/src/views/repositoryai/verbaltrick/particulars/index.vue
@@ -246,7 +246,7 @@
<div style="display: flex; margin-bottom: 10px">
<div
v-for="item in variablelist"
- class="tsgname"
+ :class="item.default ? 'tsgname' : 'tsgnames'"
@click="tsgnameto(item)"
>
{{ item.variatename }}
@@ -273,23 +273,32 @@
</el-form-item> </el-col
></el-row>
<el-row>
- <el-col :span="6">
+ <el-col :span="12">
<el-form-item label="闂璇煶" prop="verbaltrickyy">
<el-upload
class="upload-demo"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :file-list="fileList"
+ :action="uploadImgUrl"
+ :headers="headers"
+ :on-success="
+ (response, file) => handleChange(response, file, 1)
+ "
+ accept=".wav,.mp3"
:limit="1"
- :on-exceed="handleExceed"
>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
</el-upload>
- <!-- <el-input v-model="indexform.userName" maxlength="66"
- show-word-limit /> -->
</el-form-item>
- </el-col></el-row
- >
+ </el-col>
+ <el-col :span="6"> </el-col>
+ <mini-audio
+ :audio-source="
+ indexform.scriptVoice
+ ? indexform.scriptVoice
+ : 'https://example.com/example.mp3'
+ "
+ ></mini-audio>
+ </el-row>
+
<el-row>
<el-col :span="24">
<el-form-item label="鏃犲尮閰嶆枃鏈�" prop="noMatchText">
@@ -305,21 +314,31 @@
</el-form-item> </el-col
></el-row>
<el-row>
- <el-col :span="6">
- <el-form-item label="鏃犲尮閰嶈闊�" prop="matchyy">
+ <el-col :span="12">
+ <el-form-item label="鏃犲尮閰嶈闊�" prop="verbaltrickyy">
<el-upload
class="upload-demo"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :file-list="fileList"
+ :action="uploadImgUrl"
+ :headers="headers"
+ :on-success="
+ (response, file) => handleChange(response, file, 2)
+ "
+ accept=".wav,.mp3"
:limit="1"
- :on-exceed="handleExceed"
>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
</el-upload>
</el-form-item>
- </el-col></el-row
- >
+ </el-col>
+ <el-col :span="6"> </el-col>
+ <mini-audio
+ :audio-source="
+ indexform.nomatchvoice
+ ? indexform.nomatchvoice
+ : 'https://example.com/example.mp3'
+ "
+ ></mini-audio>
+ </el-row>
<el-row>
<el-col :span="24">
<el-form-item label="鏃犲0鏂囨湰" prop="slienceText">
@@ -335,21 +354,31 @@
</el-form-item> </el-col
></el-row>
<el-row>
- <el-col :span="6">
- <el-form-item label="鏃犲0璇煶" prop="silentyy">
+ <el-col :span="12">
+ <el-form-item label="鏃犲0璇煶" prop="verbaltrickyy">
<el-upload
class="upload-demo"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :file-list="fileList"
+ :action="uploadImgUrl"
+ :headers="headers"
+ :on-success="
+ (response, file) => handleChange(response, file, 3)
+ "
+ accept=".wav,.mp3"
:limit="1"
- :on-exceed="handleExceed"
>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
</el-upload>
</el-form-item>
- </el-col></el-row
- >
+ </el-col>
+ <el-col :span="6"> </el-col>
+ <mini-audio
+ :audio-source="
+ indexform.sliencevoice
+ ? indexform.sliencevoice
+ : 'https://example.com/example.mp3'
+ "
+ ></mini-audio>
+ </el-row>
<el-row>
<el-col :span="24">
@@ -366,21 +395,31 @@
</el-form-item> </el-col
></el-row>
<el-row>
- <el-col :span="6">
- <el-form-item label="鍚笉娓呰闊�" prop="vagueyy">
+ <el-col :span="12">
+ <el-form-item label="鍚笉娓呰闊�" prop="verbaltrickyy">
<el-upload
class="upload-demo"
- action="https://jsonplaceholder.typicode.com/posts/"
- :on-change="handleChange"
- :file-list="fileList"
+ :action="uploadImgUrl"
+ :headers="headers"
+ :on-success="
+ (response, file) => handleChange(response, file, 4)
+ "
+ accept=".wav,.mp3"
:limit="1"
- :on-exceed="handleExceed"
>
<el-button size="small" type="primary">鐐瑰嚮涓婁紶</el-button>
</el-upload>
</el-form-item>
- </el-col></el-row
- >
+ </el-col>
+ <el-col :span="6"> </el-col>
+ <mini-audio
+ :audio-source="
+ indexform.noclearlyvoice
+ ? indexform.noclearlyvoice
+ : 'https://example.com/example.mp3'
+ "
+ ></mini-audio>
+ </el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="nextstep">涓嬩竴姝�</el-button>
@@ -595,12 +634,17 @@
} from "@/api/AiCentre/index";
import Regular from "@/components/Regular"; //姝e垯缁勪欢
import store from "@/store";
+import { getToken } from "@/utils/auth";
export default {
name: "Verbalproblem",
components: { Regular },
data() {
return {
+ headers: {
+ Authorization: "Bearer " + getToken(),
+ },
+ uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/uploadSort",
Editprogress: 1, //缂栬緫杩涘害
loading: false, // 閬僵灞�
radio: "false", //鍗曢�夐閫変腑
@@ -842,17 +886,19 @@
},
// 鏂囦欢----------------------
// 鎺у埗鏂囦欢
- handleChange(file, fileList) {
- this.fileList = fileList.slice(-3);
+ handleChange(response, file, additionalParam) {
+ console.log(response);
+ if (additionalParam == 1) {
+ this.indexform.scriptVoice = response.url;
+ } else if (additionalParam == 2) {
+ this.indexform.nomatchvoice = response.url;
+ } else if (additionalParam == 3) {
+ this.indexform.sliencevoice = response.url;
+ } else if (additionalParam == 4) {
+ this.indexform.noclearlyvoice = response.url;
+ }
},
- // 鏂囦欢瓒呭嚭涓暟闄愬埗鏃剁殑閽╁瓙
- handleExceed(files, fileList) {
- this.$message.warning(
- `褰撳墠闄愬埗閫夋嫨 1 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${
- files.length + fileList.length
- } 涓枃浠禶
- );
- },
+
// 鏍囩-----------------
gettabList() {
const tagqueryParams = {
@@ -1129,7 +1175,7 @@
padding-top: 0;
padding-bottom: 0;
}
-.tsgname {
+.tsgnames {
width: 90px;
margin-right: 10px;
text-align: center;
@@ -1141,9 +1187,24 @@
font-size: 18px;
border-radius: 5px;
}
-.tsgname:hover {
+.tsgnames:hover {
background: #3366f5;
}
+.tsgname {
+ width: 90px;
+ margin-right: 10px;
+ text-align: center;
+ cursor: pointer;
+ height: 40px;
+ line-height: 40px;
+ background: #66c18c;
+ color: #ffff;
+ font-size: 18px;
+ border-radius: 5px;
+}
+.tsgname:hover {
+ background: #20894d;
+}
.tsgnamebj {
width: 90px;
margin-left: 15px;
--
Gitblit v1.9.3