|
@@ -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()
|
|
|
})
|