liuxiangqi 2 years ago
parent
commit
62366b1ebb

+ 1 - 2
src/views/enterprise/ent/basicInfo.vue

@@ -139,8 +139,7 @@
         <th>其他附件</th>
         <td>
           <div v-for="(file, index) in list" :key="index">
-            <a class="link" style="margin-right: 10px;">{{file.fileName}}</a>
-            <el-button type="text" @click="handleView(file.id)">查看</el-button>
+            <a class="link" :href="file.url" target="_blank">{{file.fileName}}</a>
           </div>
         </td>
       </tr>

+ 8 - 22
src/views/enterprise/ent/edit.vue

@@ -302,17 +302,6 @@
           <th>其他附件</th>
           <td colspan="3">
             <el-form-item prop="attachIds" label-width="0">
-              <!-- <FileUpload :files="form.fileList" @input="handleSaleSuccess" :multiple="true" :params="params">上传材料</FileUpload>
-              <el-table v-loading="loading" :data="list" border style="width: 100%;margin-top: 5px;margin-bottom: 5px;" v-if="type == 'update' || type == 'updateEnt'">
-                <el-table-column label="序号" type="index" width="50" align="center"></el-table-column>
-                <el-table-column label="文件名称" prop="fileName" align="center"></el-table-column>
-                <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-                  <template slot-scope="scope">
-                    <el-button type="text" @click="handleView(scope.row)">查看</el-button>
-                    <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
-                  </template>
-                </el-table-column>
-              </el-table> -->
               <el-upload
                 class="upload-demo"
                 :action="action"
@@ -322,6 +311,7 @@
                 :before-remove="beforeRemove"
                 :on-success="handleFileSuccess"
                 multiple
+                :data="params"
                 :file-list="form.fileList">
                 <el-button size="small" type="primary">点击上传</el-button>
               </el-upload>
@@ -432,7 +422,6 @@ export default {
       disabledVisible: false,
       form: {
         id: '',
-        fileList: [],
         serviceDate: [],
         fileList: [],
         listedFlag: 1,
@@ -614,8 +603,9 @@ export default {
     if(this.form.id) {
       this.disabledVisible = true
       this.params.dataId = this.$route.params.id
-      this.getData()
-      this.getEnclosureData()
+      this.getData().then(res => {
+        this.getEnclosureData()
+      })
     }else{
       this.getProvinceData()
     }
@@ -623,19 +613,20 @@ export default {
   methods: {
     validLicense(val) {
       validLicenseApi(val).then(res => {
-        // true存在
         if(res.data) {
           this.$message.error('统一社会信用代码已经存在,不可以重复注册');
         }
       })
     },
-    getEnclosureData() {
+    async getEnclosureData() {
       getEnclosureApi(this.attachType, this.dataId).then(res => {
         this.list = res.data.records
         this.list.map(item => {
           item.name = item.fileName
         })
         this.$set(this.form, 'fileList', this.list)
+        this.$forceUpdate()
+        console.log(this.form.fileList, "this.form.fileList")
       })
     },
     handleUpload() {
@@ -645,7 +636,7 @@ export default {
       })
     },
 
-    getData() {
+    async getData() {
       this.loading = true
       getEntInfoByIdApi(this.form.id).then(res => {
         this.loading = false
@@ -774,11 +765,6 @@ export default {
         })
     },
     handleRemove(file, fileList) {
-      // v-if="type == 'update' || type == 'updateEnt'"
-      console.log("handleRemove", fileList, file)
-      if(this.type == 'update' || this.type == 'updateEnt') {
-
-      }
     },
     //选择省份
     getCityData() {

+ 3 - 2
src/views/enterprise/project/index.vue

@@ -98,10 +98,11 @@
             <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
           </template>
           
-          <template v-if="roleType == 'entAdmin' || roleType == 'entUser' || roleType == 'manager'">
+          <!-- <template v-if="roleType == 'entAdmin' || roleType == 'entUser' || roleType == 'manager'">
             <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
-          </template>
+          </template> -->
           <template v-if="roleType == 'entAdmin' || roleType == 'entUser'">
+            <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
             <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
             <template v-if="scope.row.finCompRate == '100.0%' && scope.row.reportState == '1'">
               <el-button type="text" @click="handleDeclare(scope.row)">提交申报</el-button>