瀏覽代碼

资质管理图片上传

lizhenhao 2 年之前
父節點
當前提交
2657060e64
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      src/views/modules/sys/cert/CertForm.vue

+ 5 - 4
src/views/modules/sys/cert/CertForm.vue

@@ -137,20 +137,20 @@
               </vxe-select>
             </template>
           </vxe-table-column>
-          <vxe-table-column min-width="50px" field="fileUrl" align="center" title="文件" :edit-render="{}">
+          <vxe-table-column min-width="50px" field="fileLsUrl" align="center" title="文件" :edit-render="{}">
             <template v-slot="{row}">
-              <img style="height: 43px" class="img" :src="row.fileUrl"/>
+              <img style="height: 43px" class="img" :src="row.fileLsUrl"/>
             </template>
             <template v-slot:edit="scope" >
                 <el-upload slot="reference"
                            class="avatar"
                            style="height: 43px;line-height: 43px"
-                           :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=fileUrl`"
+                           :action="`${$http.BASE_URL}/oss/file/webUpload/fileUpload?dir=sys_cert`"
                            :on-success="(res,file)=> handleAvatarSuccess(res,file,scope)"
                            :before-upload="beforeAvatarUpload"
                            :show-file-list="false">
                   <el-button type="info" slot="trigger" size="mini" style="margin-right: 10px" class="avatar-uploader-table">上传</el-button>
-                  <img style="max-height: 43px;max-width: 56px" slot="tip" :readonly="true" @click="showPhoto(scope.row.fileUrl)" v-if="scope.row.fileUrl" :src="scope.row.fileUrl" class="el-upload-list__item-thumbnail">
+                  <img style="max-height: 43px;max-width: 56px" slot="tip" :readonly="true" @click="showPhoto(scope.row.fileLsUrl)" v-if="scope.row.fileLsUrl" :src="scope.row.fileLsUrl" class="el-upload-list__item-thumbnail">
                 </el-upload>
             </template>
           </vxe-table-column>
@@ -363,6 +363,7 @@ export default {
     },
     handleAvatarSuccess (res, file, scope) {
       this.inputForm.certDTOList[scope.$rowIndex].fileUrl = res.url
+      this.inputForm.certDTOList[scope.$rowIndex].fileLsUrl = res.lsUrl
       this.$forceUpdate()
     },
     showPhoto (fileUrl) {