|
@@ -94,6 +94,7 @@
|
|
|
type="primary"
|
|
|
@click="addproject"
|
|
|
v-hasPermi="['filemanager.project.add']"
|
|
|
+ v-if="status != '0'"
|
|
|
>新增</el-button
|
|
|
>
|
|
|
</div>
|
|
@@ -164,21 +165,22 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="small"
|
|
|
-
|
|
|
+ v-if="status != '0'"
|
|
|
@click="updatecurrent(scope.row.id, -2)"
|
|
|
>提交</el-button
|
|
|
>
|
|
|
</div>
|
|
|
<div
|
|
|
- v-if="scope.row.status != '2'"
|
|
|
+ v-if="scope.row.status != '2' && status != '0'"
|
|
|
v-hasPermi="['filemanager.project.edit']"
|
|
|
+
|
|
|
>
|
|
|
<el-button type="text" size="small" @click="editproject(scope.row)"
|
|
|
>编辑</el-button
|
|
|
>
|
|
|
</div>
|
|
|
|
|
|
- <div v-hasPermi="['filemanager.project.remove']">
|
|
|
+ <div v-hasPermi="['filemanager.project.remove']" v-if="status != '0'">
|
|
|
<el-popconfirm
|
|
|
width="220"
|
|
|
title="是否删除项目(项目下的文件也会一并删除)?"
|
|
@@ -192,7 +194,7 @@
|
|
|
<div v-hasPermi="['filemanager.project.filelook']">
|
|
|
<el-button text type="warning" size="small" @click="lookfiles(scope.row)">文件查看</el-button>
|
|
|
</div>
|
|
|
- <div v-if="scope.row.status == '2'">
|
|
|
+ <div v-if="scope.row.status == '2' && status != '0'">
|
|
|
<el-button
|
|
|
size="small"
|
|
|
text
|
|
@@ -241,7 +243,7 @@
|
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="pdfviewshow = false">关闭</el-button>
|
|
|
|
|
|
- <el-button v-hasPermi="['filemanager.project.file.download']" type="primary" @click="downloadfile(currentfile)">
|
|
|
+ <el-button v-if="status != '0'" v-hasPermi="['filemanager.project.file.download']" type="primary" @click="downloadfile(currentfile)">
|
|
|
下载
|
|
|
</el-button>
|
|
|
</div>
|
|
@@ -349,11 +351,11 @@
|
|
|
:before-close="handleClose" size="60%"
|
|
|
>
|
|
|
<div style="position: absolute;right: 20px;bottom: 20px;">
|
|
|
- <el-button type="primary" icon="UploadFilled" v-hasPermi="['filemanager.project.file.upload']" @click="uploadfile">上传文件</el-button>
|
|
|
+ <el-button type="primary" icon="UploadFilled" v-hasPermi="['filemanager.project.file.upload']" v-if="status != '0'" @click="uploadfile">上传文件</el-button>
|
|
|
</div>
|
|
|
<div style="position: absolute;left: 20px;top: 60px;">
|
|
|
- <el-button type="primary" icon="Download" size="small" :disabled="selectfiles.length<1" v-hasPermi="['filemanager.project.file.downloadb']" @click="downloadfilebanch">下载</el-button>
|
|
|
- <el-button type="danger" icon="Delete" size="small" :disabled="selectfiles.length<1" v-hasPermi="['filemanager.project.file.deleteb']" @click="deletefilebanch">删除</el-button>
|
|
|
+ <el-button type="primary" icon="Download" size="small" :disabled="selectfiles.length<1" v-hasPermi="['filemanager.project.file.downloadb']" v-if="status != '0'" @click="downloadfilebanch">下载</el-button>
|
|
|
+ <el-button type="danger" icon="Delete" size="small" :disabled="selectfiles.length<1" v-hasPermi="['filemanager.project.file.deleteb']" v-if="status != '0'" @click="deletefilebanch">删除</el-button>
|
|
|
</div>
|
|
|
|
|
|
<el-table style="width: 100%;height:80vh" :data="filelist" @selection-change="handleSelectionChange">
|
|
@@ -376,9 +378,9 @@
|
|
|
<el-table-column prop="date" label="操作" width="200">
|
|
|
<template #default="scope">
|
|
|
<div style="display: flex;gap:5px">
|
|
|
- <div> <el-button type="danger" v-hasPermi="['filemanager.project.file.delete']" text size="small" @click="filedel(scope.row)">删除</el-button></div>
|
|
|
- <div> <el-button type="warning" v-hasPermi="['filemanager.project.file.preview']" text size="small" @click="filepreview(scope.row)" >预览</el-button></div>
|
|
|
- <div> <el-button type="primary" v-hasPermi="['filemanager.project.file.download']" text size="small" @click="downloadfile(scope.row)">下载</el-button></div>
|
|
|
+ <div> <el-button type="danger" v-hasPermi="['filemanager.project.file.delete']" v-if="status != '0'" text size="small" @click="filedel(scope.row)">删除</el-button></div>
|
|
|
+ <div> <el-button type="warning" v-hasPermi="['filemanager.project.file.preview']" text size="small" @click="filepreview(scope.row)" >预览</el-button></div>
|
|
|
+ <div> <el-button type="primary" v-hasPermi="['filemanager.project.file.download']" v-if="status != '0'" text size="small" @click="downloadfile(scope.row)">下载</el-button></div>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
@@ -445,9 +447,7 @@ const pdfviewshow = ref(false);
|
|
|
const route = useRoute();
|
|
|
|
|
|
var isnormal = false;
|
|
|
-if(userroles.indexOf("superadmin")!=-1){
|
|
|
- isnormal = true
|
|
|
-}
|
|
|
+
|
|
|
const uploadbtnenable = ref(false);
|
|
|
|
|
|
|
|
@@ -479,6 +479,8 @@ const filelist = ref([]);
|
|
|
const currentpage = ref(0);
|
|
|
const totalnum = ref(0);
|
|
|
|
|
|
+const status = ref("0");
|
|
|
+
|
|
|
const getnextdata = (page: number) => {
|
|
|
currentpage.value = page;
|
|
|
if(route.query.status){
|
|
@@ -500,6 +502,17 @@ const getnextdata = (page: number) => {
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
getnextdata(1);
|
|
|
+
|
|
|
+ if(route.query.status!=undefined){
|
|
|
+ status.value = route.query.status+""
|
|
|
+ }
|
|
|
+ if(userroles.indexOf("superadmin")!=-1){
|
|
|
+ isnormal = true
|
|
|
+ status.value ="1";
|
|
|
+ }
|
|
|
+ if(route.fullPath.indexOf("add")!=-1){
|
|
|
+ status.value ="1";
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
|