Procházet zdrojové kódy

文件点击下载

huahaiyan před 6 roky
rodič
revize
06a8f703b1

+ 10 - 1
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -29,7 +29,11 @@
           </template>
         </el-table-column>
         <el-table-column prop="NeedFileType" label="资质名称" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="FileName" label="资质文件" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="FileName" label="资质文件" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <a :href="'http://'+fileurlcut(scope.row.FileUrl)" target="_blank" class="buttonText">{{scope.row.FileName}}</a>
+          </template>
+        </el-table-column>
         <el-table-column prop="EffectDate" label="有效日期" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.EffectDate+'') }}
@@ -483,6 +487,11 @@
       seachdata() {
         this.initData()
       },
+      fileurlcut(val) {
+        let fileurlall = val
+        let fileurl = fileurlall.split("|")
+        return fileurl[0]
+      },
       jstimehandle(val) {
         if (val === '') {
           return '----'

+ 30 - 15
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/auditoperation.vue

@@ -11,7 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" @click="commitshow = true" v-if="butnshow == 0 && (QualStatus == '1' || QualStatus == '2')">审核</el-button>
+          <el-button type="primary" size="mini" @click="commitshow = true"
+            v-if="butnshow == 0 && (QualStatus == '1' || QualStatus == '2')">审核</el-button>
           <router-link :to="'/oilsupplier/qualchange/qualaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -29,13 +30,21 @@
       </div>
       <el-table :data="subfileList" border>
         <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="OldFileName" label="原文件" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="OldFileName" label="原文件" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <a :href="'http://'+fileurlcut(scope.row.OldFileUrl)" target="_blank" class="buttonText">{{scope.row.OldFileName}}</a>
+          </template>
+        </el-table-column>
         <el-table-column prop="OldEffectDate" label="原有效日期" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.OldEffectDate+'') }}
           </template>
         </el-table-column>
-        <el-table-column prop="FileName" label="变更后文件" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="FileName" label="变更后文件" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <a :href="'http://'+fileurlcut(scope.row.FileUrl)" target="_blank" class="buttonText">{{scope.row.FileName}}</a>
+          </template>
+        </el-table-column>
         <el-table-column prop="EffectDate" label="变更后有效日期" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.EffectDate+'') }}
@@ -47,14 +56,14 @@
       <el-dialog :title="Title" :visible.sync="visible" top="5vh">
         <el-form :model="SubfileForm" label-width="100px">
           <el-row>
-           <el-col :span="12">
-            <el-form-item label="资质文件">
-              <el-upload style="margin-top: 10px;" action="" ref="refuploadattach" :http-request="uploadrequest"
-                class="attach-uploader" :before-upload="beforeAvatarUpload">
-                <i class="el-icon-plus attach-uploader-icon"></i>
-              </el-upload>
-            </el-form-item>
-          </el-col>
+            <el-col :span="12">
+              <el-form-item label="资质文件">
+                <el-upload style="margin-top: 10px;" action="" ref="refuploadattach" :http-request="uploadrequest"
+                  class="attach-uploader" :before-upload="beforeAvatarUpload">
+                  <i class="el-icon-plus attach-uploader-icon"></i>
+                </el-upload>
+              </el-form-item>
+            </el-col>
             <el-col :span="12">
               <el-form-item label="有效日期" required>
                 <el-date-picker style="width: 100%" v-model="SubfileForm.EffectDate" type="date" placeholder="请选择有效日期">
@@ -117,7 +126,7 @@
   import quaapi from '@/api/oilsupplier/qualchange'
   import infoapi from '@/api/oilsupplier/infochange'
   import axios from 'axios'
- // import uploadajax from '../../assets/js/uploadajax.js'
+  // import uploadajax from '../../assets/js/uploadajax.js'
   export default {
     computed: {
       ...mapGetters({
@@ -208,6 +217,7 @@
         },
         butnshow: 0,
         QualId: 0,
+        FileUrl: '',
       }
     },
     created() {
@@ -245,7 +255,7 @@
           .then(res => {
             _this.subfileList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
-            console.log("----this.subfileList---",this.subfileList)
+            console.log("----this.subfileList---", this.subfileList)
           })
           .catch(err => {
             console.error(err)
@@ -255,7 +265,7 @@
         this.auditerOption = []
         infoapi.getAuditer(this.$axios).then(res => {
           this.auditerOption = res.data.item
-          console.log("----res.data.item-----",res.data.item)
+          console.log("----res.data.item-----", res.data.item)
         }).catch(err => {
           console.error(err)
         })
@@ -357,7 +367,7 @@
             })
           })
       },
-       // 判断附件是否上传成功
+      // 判断附件是否上传成功
       attachissuccess() {
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
@@ -388,6 +398,11 @@
         this.getorgtreelist()
         this.commitshow = true
       },
+      fileurlcut(val) {
+        let fileurlall = val
+        let fileurl = fileurlall.split("|")
+        return fileurl[0]
+      },
       jstimehandle(val) {
         if (val === '') {
           return '----'

+ 18 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/operation.vue

@@ -39,13 +39,22 @@
           </template>
         </el-table-column>
         <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="OldFileName" label="原文件" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="OldFileName" label="原文件" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <a :href="'http://'+fileurlcut(scope.row.OldFileUrl+'')" target="_blank" class="buttonText">
+            {{scope.row.OldFileName}}</a>
+          </template>
+        </el-table-column>
         <el-table-column prop="OldEffectDate" label="原有效日期" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.OldEffectDate+'') }}
           </template>
         </el-table-column>
-        <el-table-column prop="FileName" label="变更后文件" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="FileName" label="变更后文件" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <a :href="'http://'+fileurlcut(scope.row.FileUrl)" target="_blank" class="buttonText">{{scope.row.FileName}}</a>
+          </template>
+        </el-table-column>
         <el-table-column prop="EffectDate" label="变更后有效日期" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.EffectDate+'') }}
@@ -471,6 +480,13 @@
           console.error(err)
         })
       },
+
+      fileurlcut(val) {
+        let fileurlall = val
+        let fileurl = fileurlall.split("|")
+        return fileurl[0]
+      },
+
       jstimehandle(val) {
         if (val === '') {
           return '----'