1、左侧菜单树样式调整

2、“导出”修改为全量导出
3、文档详情新增预览功能
4、预览新增遮罩功能
This commit is contained in:
pan
2024-09-07 10:51:49 +08:00
parent c567ca9176
commit 37230039da
9 changed files with 137 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
<div class="fbox1">
<div class="fl">
<el-tabs v-model="detailActiveName">
<el-tab-pane label="附件信息" name="first">
<el-tab-pane label="附件信息" name="first" v-loading="previewLoading" element-loading-text="加载中">
<el-table :data="attachmentList" style="width: 100%">
<el-table-column label="序号" width="60" align="center" type="index"></el-table-column>
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
@@ -35,7 +35,7 @@
</el-tabs><!--el-tabs-->
</div><!--fl 左侧页签-->
<preview-util v-if="isPreviewDisable" ref="previewForm" @previewClose="previewClose"></preview-util>
<preview-util v-if="isPreviewDisable" ref="previewForm" @previewClose="previewClose" @previewLoadingClose="previewLoadingClose"></preview-util>
</div><!--fbox1 左右分栏-->
</template>
@@ -80,7 +80,8 @@
replyContent: [],
isPreviewDisable: false,
attFileType: "zip,rar,7z",
total: 0
total: 0,
previewLoading:false,
}
},
created(){
@@ -108,6 +109,10 @@
previewClose(){
this.isPreviewDisable = false
},
/** 关闭预览遮罩 **/
previewLoadingClose(){
this.previewLoading = false
},
previewAuth(row){
if(row.fileUrl == null || row.fileUrl == '' || row.fileUrl == undefined){
return false

View File

@@ -90,7 +90,7 @@
@click="handleAdd"
>工具发布</el-button>
<el-button icon="el-icon-delete" @click="handleDelete(selection)" v-hasPermi="['tool:batch:remove']">批量删除</el-button>
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['tool:export']">导出</el-button>
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['tool:export']">全量导出</el-button>
<el-button icon="el-icon-download" @click="handleOpenBatchExport()" v-hasPermi="['tool:batch:export']">批量导出</el-button>
</div><!--operate 操作按钮-->
<el-table v-loading="loading" :data="toolList" ref="tableRef" @selection-change="handleSelectionChange">
@@ -155,12 +155,12 @@
label="操作"
align="center"
fixed="right"
width="260px"
width="180px"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<!-- && !scope.row.downloadStatus v-if="checkApplyUseBtn(scope.row)"-->
<el-button type="text" icon="el-icon-info" @click="applyUse(scope.row)">申请使用</el-button>
<el-button type="text" icon="el-icon-info" @click="applyUse(scope.row)" v-if="checkApplyUseBtn(scope.row)">申请使用</el-button>
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
<el-button type="text" icon="el-icon-download" v-if="scope.row.downloadStatus" @click="handleFileDownload(scope.row)">下载</el-button>
<el-dropdown size="mini" v-if="selectable(scope.row)" @command="(command) => handleCommand(command, scope.row)">
@@ -516,12 +516,16 @@ export default {
},
checkApplyUseBtn(row){
let result = false;
if(row.recordStatus=='done' && !row.downloadStatus){
//有下载权限就不需要了
if(row.downloadStatus){
return false;
}
if(row.recordStatus=='done'){
result = true;
}
if(row.isHasApplyUse){
/* if(row.isHasApplyUse){
result = false;
}
} */
return result;
},
/**=============================申请使用End================================*/

View File

@@ -29,7 +29,7 @@
</el-form><!--el-form-->
</div><!--el-form-border 表单-->
</el-tab-pane><!--el-tab-pane-->
<el-tab-pane label="关联附件" name="second">
<el-tab-pane label="关联附件" name="second" v-loading="previewLoading" element-loading-text="加载中">
<el-table :data="attachmentList" style="width: 100%">
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
<!-- <el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" >
@@ -49,7 +49,7 @@
<span>{{ parseTime(scope.row.createDate) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" v-if="detailData.downloadStatus">
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-button
size="mini"
@@ -58,7 +58,7 @@
v-if="previewAuth(scope.row)"
@click="handlePreview(scope.row)"
>预览</el-button>
<el-button type="text" icon="el-icon-download" v-if="isDownload" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
<!-- <e-button type="text" icon="el-icon-download" v-if="isDownload && detailData.downloadStatus" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</e-button>-->
</template>
</el-table-column>
</el-table><!--el-table-->
@@ -128,10 +128,10 @@
<i-frame :src="previewUrl" v-if="viewDialogOpen"/>
</el-dialog>
<preview-util v-if="isPreviewDisable" ref="previewForm" @previewClose="previewClose"></preview-util>
<preview-util v-if="isPreviewDisable" ref="previewForm" @previewClose="previewClose" @previewLoadingClose="previewLoadingClose"></preview-util>
<!-- 上传 -->
<AddDoc :show.sync="open" :toolId="detailData.toolId" @callback="getAttachmentList"/>
<!-- <AddDoc :show.sync="open" :toolId="detailData.toolId" @callback="getAttachmentList"/>-->
</div><!--fbox1 左右分栏-->
</template>
@@ -140,22 +140,14 @@
import { listDiscussions, addDiscussions } from "@/api/tool/discussions.js";
import { listReplies, addReplies} from "@/api/tool/replies.js";
import { getTool } from "@/api/tool/tool.js";
import AddDoc from './AddDoc'
import editDocument from "../document/editDocument";
import { Base64 } from 'js-base64';
import iFrame from "@/components/iFrame/index"
import { addCount } from "@/api/tool/downloadCount";
import { listAttachment } from "@/api/attachment/attachment";
import axios from 'axios'
import {
getToken
} from "@/utils/auth";
import previewUtil from '@/components/PreviewUtil/previewUtil.vue'
export default {
name: 'toolDetail',
components: { editDocument, AddDoc, iFrame, previewUtil },
components: { iFrame, previewUtil },
dicts:['sys_normal_disable','tool_type','tool_source','tool_status','doc_class','doc_source'],
props: {
toolDetail: {
@@ -260,6 +252,10 @@
previewClose(){
this.isPreviewDisable = false
},
/** 关闭预览遮罩 **/
previewLoadingClose(){
this.previewLoading = false
},
/** 删除按钮操作 */
handleDelete(row) {
const docIds = row.docId || this.ids;