刘湘琪 лет назад: 2
Родитель
Сommit
5be2da1d8b

+ 8 - 5
src/views/enterprise/project/components/EntEnclosure.vue

@@ -2,9 +2,9 @@
   <div class="app-container">
     <h3 class="toolbar">
       <div class="tool">
-        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload">一键上传</el-button>
+        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload" v-if="userType == 'ENT_ADMIN'">一键上传</el-button>
         <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownload">批量下载</el-button>
-        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte">批量删除</el-button>
+        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte" v-if="userType == 'ENT_ADMIN'">批量删除</el-button>
       </div>
     </h3>
     <el-table v-loading="loading" :data="list" border @selection-change="handleSelectionChange" style="width: 100%" @select-all="selectAll">
@@ -15,7 +15,7 @@
         <template slot-scope="scope">
           <el-button type="text" @click="handleView(scope.row)">查看</el-button>
           <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
-          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleDelete(scope.row)" v-if="userType == 'ENT_ADMIN'">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -53,6 +53,11 @@
         }
       };
     },
+    computed: {
+      userType() {
+        return this.$store.state.user.userType
+      }
+    },
     created() {
       this.id = this.$route.query.id || undefined;
       this.getData()
@@ -61,8 +66,6 @@
       getData() {
         getProjectInfoApi(this.id).then(res => {
           let obj = res.data.entProject || {}
-          console.log("%%%%%%%%%%%%%")
-          console.log(obj.id)
           this.dataId = obj.id //企业资料id
           this.getList()
         })

+ 8 - 3
src/views/enterprise/project/components/FinDataEnclosure.vue

@@ -2,9 +2,9 @@
   <div class="app-container">
     <h3 class="toolbar">
       <div class="tool">
-        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload">一键上传</el-button>
+        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload" v-if="userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN'">一键上传</el-button>
         <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownload">批量下载</el-button>
-        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte">批量删除</el-button>
+        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte" v-if="userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN'">批量删除</el-button>
       </div>
     </h3>
     <el-table v-loading="loading" :data="list" border @selection-change="handleSelectionChange" style="width: 100%" @select-all="selectAll">
@@ -15,7 +15,7 @@
         <template slot-scope="scope">
           <el-button type="text" @click="handleView(scope.row)">查看</el-button>
           <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
-          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleDelete(scope.row)" v-if="userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN'">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -57,6 +57,11 @@
       this.id = this.$route.query.id || undefined;
       this.getData()
     },
+    computed: {
+      userType() {
+        return this.$store.state.user.userType
+      }
+    },
     methods: {
       getData() {
         getProjectInfoApi(this.id).then(res => {

+ 8 - 3
src/views/enterprise/project/components/FinEnclosure.vue

@@ -2,9 +2,9 @@
   <div class="app-container">
     <h3 class="toolbar">
       <div class="tool">
-        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload">一键上传</el-button>
+        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload" v-if="userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN'">一键上传</el-button>
         <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownload">批量下载</el-button>
-        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte">批量删除</el-button>
+        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte" v-if="userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN'">批量删除</el-button>
       </div>
     </h3>
     <el-table v-loading="loading" :data="list" border @selection-change="handleSelectionChange" style="width: 100%" @select-all="selectAll">
@@ -15,7 +15,7 @@
         <template slot-scope="scope">
           <el-button type="text" @click="handleView(scope.row)">查看</el-button>
           <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
-          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleDelete(scope.row)" v-if="userType == 'ENT_FIN' || userType == 'ENT_ADMIN_FIN'">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -53,6 +53,11 @@
         }
       };
     },
+    computed: {
+      userType() {
+        return this.$store.state.user.userType
+      }
+    },
     created() {
       this.id = this.$route.query.id || undefined;
       this.getData()

+ 8 - 3
src/views/enterprise/project/components/TechEnclosure.vue

@@ -2,9 +2,9 @@
   <div class="app-container">
     <h3 class="toolbar">
       <div class="tool">
-        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload">一键上传</el-button>
+        <el-button type="primary" plain icon="el-icon-upload2" size="mini" @click="handleUpload" v-if="userType == 'ENT_TECH' || userType == 'ENT_ADMIN_TECH'">一键上传</el-button>
         <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownload">批量下载</el-button>
-        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte">批量删除</el-button>
+        <el-button type="primary" plain icon="el-icon-delete" size="mini" @click="handleBatchDelte" v-if="userType == 'ENT_TECH' || userType == 'ENT_ADMIN_TECH'">批量删除</el-button>
       </div>
     </h3>
     <el-table v-loading="loading" :data="list" border @selection-change="handleSelectionChange" style="width: 100%" @select-all="selectAll">
@@ -15,7 +15,7 @@
         <template slot-scope="scope">
           <el-button type="text" @click="handleView(scope.row)">查看</el-button>
           <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
-          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button type="text" @click="handleDelete(scope.row)" v-if="userType == 'ENT_TECH' || userType == 'ENT_ADMIN_TECH'">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -53,6 +53,11 @@
         }
       };
     },
+    computed: {
+      userType() {
+        return this.$store.state.user.userType
+      }
+    },
     created() {
       this.id = this.$route.query.id || undefined;
       this.getData()