From bac13bc1c321bc155c37a3305a7bb6b9d0732d12 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 01 八月 2024 18:37:01 +0800
Subject: [PATCH] 测试完成

---
 src/views/repositoryai/verbaltrick/particulars/index.vue |  182 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 140 insertions(+), 42 deletions(-)

diff --git a/src/views/repositoryai/verbaltrick/particulars/index.vue b/src/views/repositoryai/verbaltrick/particulars/index.vue
index 07ed606..0d082f3 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 }}
@@ -277,19 +277,37 @@
               <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"
+                  :show-file-list="false"
+                  :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">
+              <span style="font-size: 12px">{{
+                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>
             <el-col :span="24">
               <el-form-item label="鏃犲尮閰嶆枃鏈�" prop="noMatchText">
@@ -306,20 +324,39 @@
           ></el-row>
           <el-row>
             <el-col :span="6">
-              <el-form-item label="鏃犲尮閰嶈闊�" prop="matchyy">
+              <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"
+                  :show-file-list="false"
+                  :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">
+              <span style="font-size: 12px">{{
+                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">
               <el-form-item label="鏃犲0鏂囨湰" prop="slienceText">
@@ -336,20 +373,39 @@
           ></el-row>
           <el-row>
             <el-col :span="6">
-              <el-form-item label="鏃犲0璇煶" prop="silentyy">
+              <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"
+                  :show-file-list="false"
+                  :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">
+              <span style="font-size: 12px">{{
+                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>
             <el-col :span="24">
@@ -367,20 +423,39 @@
           ></el-row>
           <el-row>
             <el-col :span="6">
-              <el-form-item label="鍚笉娓呰闊�" prop="vagueyy">
+              <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"
+                  :show-file-list="false"
+                  :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">
+              <span style="font-size: 12px">{{
+                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">
           <el-button type="primary" @click="nextstep">涓嬩竴姝�</el-button>
@@ -455,6 +530,7 @@
                 @syioption="syioption"
                 @xiayioption="xiayioption"
                 :intent="false"
+                :Verbalproblem="false"
               />
             </el-card>
             <el-row :gutter="20">
@@ -594,12 +670,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", //鍗曢�夐閫変腑
@@ -841,17 +922,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 = {
@@ -1128,7 +1211,7 @@
   padding-top: 0;
   padding-bottom: 0;
 }
-.tsgname {
+.tsgnames {
   width: 90px;
   margin-right: 10px;
   text-align: center;
@@ -1140,9 +1223,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