huangmp 2 лет назад
Родитель
Сommit
f8cdbac1e3

+ 2 - 3
src/components/audio-upload/index.vue

@@ -3,7 +3,6 @@
     <div class="plugin-video">
       <div tabindex="0" class="el-upload el-upload--text" @click.prevent.stop="videoboxHandle">
         <video v-if="value" ref="myVideo" class="video" :src="getImgSrc()" controls="controls"></video>
-
         <i v-else class="el-icon-plus pic-uploader-icon"></i>
       </div>
     </div>
@@ -69,8 +68,8 @@ export default {
     openImg () {
       this.visible = true
     },
-    refreshPic (imagePath) {
-      this.$emit('input', imagePath)
+    refreshPic (filePath) {
+      this.$emit('input', filePath)
     },
     deleteImg () {
       this.$emit('input', '')

+ 4 - 2
src/views/modules/prod/qrCodeTemplate-add-or-update.vue

@@ -97,9 +97,11 @@ export default {
     async dataFormSubmit () {
       try{
         let imgUrlArr = this.dataForm.templateUrl.split(",");
-        let imgUrlArr2 = this.dataForm.templateUseUrl.split(",");
+        if(this.dataForm.templateUseUrl){
+          let imgUrlArr2 = this.dataForm.templateUseUrl.split(",");
+          await Promise.all(imgUrlArr2.map(this.checkImageSize));
+        }
         await Promise.all(imgUrlArr.map(this.checkImageSize));
-        await Promise.all(imgUrlArr2.map(this.checkImageSize));
         this.$http({
           url: this.$http.adornUrl('/prod/qrCodeTemplate'),
           method: this.dataForm.templateId ? 'put' : 'post',

+ 1 - 1
src/views/modules/prod/voiceTemplate-add-or-update.vue

@@ -15,7 +15,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="语音地址" prop="templateUrl">
-        <audio-upload v-model="dataForm.templateUrl" :limit="20"></audio-upload>
+        <audio-upload v-model="dataForm.templateUrl" :limit="1"></audio-upload>
       </el-form-item>
       <el-form-item label="是否禁用" prop="status">
         <el-select v-model="dataForm.status" clearable filterable>

+ 1 - 1
src/views/modules/prod/voiceTemplate.vue

@@ -45,7 +45,7 @@
                   :src="resourcesUrl + scope.row.templateUrl"
                   v-if="scope.row.templateUrl"
                   controls="controls"
-                  style="width:260px;height:87.5px;"
+                  style="width:260px;height:60px;"
               />
             </template>
           </el-table-column>