1、新增文档和工具统计

2、样式调整
3、文件下载分页(还有一部分没有调整)
This commit is contained in:
pan 2024-09-05 22:35:43 +08:00
parent 72d894b846
commit dd9940e78e
10 changed files with 211 additions and 32 deletions

View File

@ -9,6 +9,16 @@ export function listCount(query) {
})
}
// 查询工具下载统计列表
export function listDocCount(query) {
return request({
url: '/system/count/doc/list',
method: 'get',
params: query
})
}
// 根据详情统计
export function userDownList(query) {
return request({

View File

@ -4,6 +4,7 @@
<el-tabs v-model="detailActiveName">
<el-tab-pane label="附件信息" name="first">
<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" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
@ -22,6 +23,13 @@
</template>
</el-table-column>
</el-table><!--el-table-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getAttachmentList"
/>
</el-tab-pane><!--el-tab-pane-->
</el-tabs><!--el-tabs-->
</div><!--fl 左侧页签-->
@ -70,6 +78,7 @@
replyContent: [],
isPreviewDisable: false,
attFileType: "zip,rar,7z",
total: 0
}
},
created(){

View File

@ -173,6 +173,13 @@
<el-button type="text" icon="el-icon-download" v-if="isShowOperation(scope.row)" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
</template>
</el-table-column>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getAttachmentList"
/>
</el-table><!--el-table-->
</div>
</div><!--fl 左侧页签-->
@ -359,6 +366,11 @@
pageNum: 1,
pageSize: 10,
},
queryParams: {
pageNum: 1,
pageSize: 10,
},
total: 0
}
},
@ -587,7 +599,7 @@
self.$set(fileData, "size", fileData.fileSize)
self.dataFile.push(fileData) */
self.getAttachemntList()
self.getAttachmentList()
});
})
},
@ -615,7 +627,7 @@
type:'success',  //
duration:1200,  //, 0 1200
});
self.getAttachemntList()
self.getAttachmentList()
}).catch(err =>{
this.discussionContent = null
console.error("handleDiscussions==err==", err)
@ -623,10 +635,10 @@
});
})
},
getAttachemntList() {
getAttachmentList() {
let self = this
this.$set(this.docQueryParams,'del',"0")
this.$set(this.docQueryParams,'businessId',this.form.docId)
this.$set(this.queryParams,'del',"0")
this.$set(this.queryParams,'businessId',this.form.docId)
listAttachment({businessId:this.form.docId}).then(res => {
self.attachmentList = res.rows;
self.total = res.total;
@ -682,7 +694,7 @@
duration:1200,  //, 0 1200
});
self.cancelReplySon(parentIndex, repIndex)
self.getAttachemntList()
self.getAttachmentList()
}).catch(err =>{
console.error("submitReplySon==err==", err)
self.$modal.msgError("发布失败");
@ -718,7 +730,7 @@
duration:1200,  //, 0 1200
});
self.cancelReply(index)
self.getAttachemntList()
self.getAttachmentList()
}).catch(err =>{
console.error("handleDiscussions==err==", err)
self.$modal.msgError("发布失败");

View File

@ -121,16 +121,16 @@
<el-table v-loading="loading" :data="docList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="文档编号" align="center" prop="docCode" width="120" />
<el-table-column label="文档名称" align="center" prop="docName" :show-overflow-tooltip="true" />
<el-table-column label="文档类别" align="center" prop="docType" :show-overflow-tooltip="true" width="80">
<el-table-column label="文档编号" prop="docCode" width="120" />
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
<el-table-column label="文档类别" prop="docType" :show-overflow-tooltip="true" width="80">
<template slot-scope="scope">
<dict-tag :options="dict.type.doc_class" :value="scope.row.docType"/>
</template>
</el-table-column>·
<el-table-column label="负责人" align="center" prop="docPrincipalsName" :show-overflow-tooltip="true" width="100" />
<el-table-column label="归属单位" align="center" prop="docRespDeptName" :show-overflow-tooltip="true" width="80" />
<el-table-column label="文档来源" align="center" prop="docSource" width="100">
<el-table-column label="负责人" prop="docPrincipalsName" :show-overflow-tooltip="true" width="100" />
<el-table-column label="归属单位" prop="docRespDeptName" :show-overflow-tooltip="true" width="80" />
<el-table-column label="文档来源" prop="docSource" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.doc_source" :value="scope.row.docSource"/>
</template>

View File

@ -7,7 +7,7 @@
<!-- -->
<div class="tjbox2" v-if="isPieChart">
<PieChart
height="400px"
height="285px"
:data="toolTypeData"
:legendData="toolTypeLegendData"
legendBottom="5"
@ -22,7 +22,7 @@
<div slot="header" class="clearfix"><span class="tline">文档来源统计</span></div>
<div class="tjbox2" v-if="isPieChart">
<PieChart
height="400px"
height="285px"
:data="toolSourceData"
:legendData="toolSourceLegendData"
legendBottom="5"
@ -34,11 +34,109 @@
</el-col><!--el-col-->
</el-row><!--el-row-->
<el-row :gutter="20">
<el-col :span="24">
<el-card>
<div slot="header" class="clearfix"><span class="tline">文档下载统计</span></div>
<div class="tjbox2">
<el-form label-width="70px" ref="queryForm" :model="queryParams">
<div class="search">
<div class="sl">
<el-form-item label="下载时间">
<el-date-picker
v-model="dateRange"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="文档编号" prop="docCode">
<el-input
v-model="queryParams.docCode"
placeholder="请输入文档编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="文档名称" prop="docName">
<el-input
v-model="queryParams.docName"
placeholder="请输入文档名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</div>
<div class="sr">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
</div>
</div>
</el-form>
<!-- <img src="images/tjt6.jpg" /> -->
</div>
<div class="rt">
<el-table v-loading="downLoading" :data="toolDownStatList">
<el-table-column type="index" label="序号" width="50" />
<el-table-column label="文档编号" align="center" key="docCode" prop="docCode" />
<el-table-column label="文档名称" align="center" key="docName" prop="docName" :show-overflow-tooltip="true" />
<el-table-column label="下载次数" align="center" key="docDownNum" prop="docDownNum" width="120" />
<el-table-column
label="操作"
align="center"
width="250"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="downTotal>0"
:total="downTotal"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getDocDownStatistics"
/>
</div><!--rt -->
</el-card><!--el-card-->
</el-col><!--el-col-->
</el-row><!--el-row-->
<!-- <DownStatDetail :show.sync="detailDrawerOpen" :toolId="toolId" :toolName="toolName" /> -->
<el-dialog
:title="`${toolName}下载详情统计`"
:visible.sync="detailDrawerOpen"
width="85%"
append-to-body
@open="openEvent"
@close="detailDrawerOpen = false"
>
<el-table :data="toolDownDetailStatList" v-loading="loading">
<el-table-column label="下载用户" align="center" key="nickName" prop="nickName" min-width="120" />
<el-table-column label="附件名称" align="center" key="attName" prop="attName" :show-overflow-tooltip="true" />
<el-table-column label="下载次数" align="center" key="toolDownNum" prop="toolDownNum" min-width="120" />
<el-table-column label="下载时间" align="center" key="createTime" prop="createTime" min-width="120" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams1.pageNum"
:limit.sync="queryParams1.pageSize"
@pagination="getDocDownDetailStatistics"
/>
</el-dialog>
</div>
</template>
<script>
import { getStatistics } from "@/api/document/document";
import { listDocCount,userDownList } from "@/api/tool/downloadCount";
import PieChart from './PieChart'
export default {
@ -82,11 +180,13 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
docCode: null,
docName: null,
},
queryParams1: {
pageNum: 1,
pageSize: 10,
toolId: ''
businessId: ''
},
//
detailDrawerOpen: false,
@ -101,9 +201,21 @@ export default {
},
created () {
this.getCountData()
// this.getToolDownStatistics()
this.getDocDownStatistics()
},
methods: {
openEvent() {
this.getDocDownDetailStatistics()
},
getDocDownDetailStatistics() {
let self = this
this.loading = true
userDownList(this.addDateRange(this.queryParams1)).then(res => {
self.total = res?.total
self.toolDownDetailStatList = res?.rows || []
self.loading = false
}).catch(() => { self.loading = false });
},
//
reset() {
this.toolDownStatList = []
@ -116,6 +228,7 @@ export default {
*/
handleQuery() {
this.queryParams.pageNum = 1
this.getDocDownStatistics()
},
/** 统计类型、类别、状态**/
getCountData(){
@ -160,7 +273,24 @@ export default {
self.pageloading= false
console.error(err)
});
}
},
handleDetail(row){
this.$set(this.queryParams1, "businessId", row.businessId)
this.detailDrawerOpen = true
},
/**
* 获取工具下载列表数据
*/
getDocDownStatistics() {
let self = this
this.downLoading = true
listDocCount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
console.info("res.total=============", res.total)
self.downTotal = res.total
self.toolDownStatList = res?.rows || []
self.downLoading = false
}).catch(() => { self.downLoading = false });
},
}
}
</script>

View File

@ -49,12 +49,13 @@
</el-card><!--el-card-->
</el-col><!--el-col-->
</el-row><!--el-row-->
<el-row :gutter="20">
<el-col :span="24">
<el-card>
<div slot="header" class="clearfix"><span class="tline">工具下载</span></div>
<div slot="header" class="clearfix"><span class="tline">工具下载统计</span></div>
<div class="tjbox2">
<el-form label-width="70px" ref="queryForm">
<el-form label-width="70px" ref="queryForm" :model="queryParams" >
<div class="search">
<div class="sl">
<el-form-item label="下载时间">
@ -131,6 +132,7 @@
>
<el-table :data="toolDownDetailStatList" v-loading="loading">
<el-table-column label="下载用户" align="center" key="nickName" prop="nickName" min-width="120" />
<el-table-column label="附件名称" align="center" key="attName" prop="attName" :show-overflow-tooltip="true" />
<el-table-column label="下载次数" align="center" key="toolDownNum" prop="toolDownNum" min-width="120" />
<el-table-column label="下载时间" align="center" key="createTime" prop="createTime" min-width="120" />
</el-table>
@ -142,6 +144,7 @@
@pagination="getToolDownDetailStatistics"
/>
</el-dialog>
</div>
</template>
@ -200,7 +203,7 @@ export default {
queryParams1: {
pageNum: 1,
pageSize: 10,
toolId: ''
businessId: ''
},
//
detailDrawerOpen: false,
@ -251,14 +254,13 @@ export default {
let self = this
this.downLoading = true
listCount(this.addDateRange(this.queryParams, this.dateRange)).then(res => {
self.total = res?.total
self.downTotal = res?.total
self.toolDownStatList = res?.rows || []
self.downLoading = false
}).catch(() => { self.downLoading = false });
},
handleDetail(row){
this.$set(this.queryParams1, "toolId", row.toolId)
this.$set(this.queryParams1, "businessId", row.businessId)
this.detailDrawerOpen = true
},
/** 统计类型、类别、状态**/

View File

@ -4,6 +4,7 @@
<el-tabs v-model="detailActiveName">
<el-tab-pane label="附件信息" name="first">
<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" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
@ -23,6 +24,13 @@
</template>
</el-table-column>
</el-table><!--el-table-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getAttachmentList"
/>
</el-tab-pane><!--el-tab-pane-->
</el-tabs><!--el-tabs-->
</div><!--fl 左侧页签-->
@ -72,7 +80,7 @@
replyContent: [],
isPreviewDisable: false,
attFileType: "zip,rar,7z",
total: 0
}
},
created(){

View File

@ -95,15 +95,15 @@
</div><!--operate 操作按钮-->
<el-table v-loading="loading" :data="toolList" ref="tableRef" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode" v-if="columns[0].visible" />
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="工具类别" align="center" key="toolType" prop="toolType" v-if="columns[2].visible" :show-overflow-tooltip="true" >
<el-table-column label="工具编号" key="toolCode" prop="toolCode" v-if="columns[0].visible" />
<el-table-column label="工具名称" key="toolName" prop="toolName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
<el-table-column label="工具类别" key="toolType" prop="toolType" v-if="columns[2].visible" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
</template>
</el-table-column>
<el-table-column label="归属单位" align="center" key="toolRespDeptName" prop="toolRespDeptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="负责人" align="center" key="toolPrincipalsName" prop="toolPrincipalsName" v-if="columns[4].visible" width="120" />
<el-table-column label="归属单位" key="toolRespDeptName" prop="toolRespDeptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
<el-table-column label="负责人" key="toolPrincipalsName" prop="toolPrincipalsName" v-if="columns[4].visible" width="120" />
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.tool_status" :value="scope.row.status"/>

View File

@ -63,6 +63,13 @@
</el-table-column>
</el-table><!--el-table-->
</el-tab-pane><!--el-tab-pane-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getAttachmentList"
/>
</el-tabs><!--el-tabs-->
</div><!--fl 左侧页签-->
<div class="fr">
@ -196,7 +203,8 @@
pdfFileData: null, //
previewLoading:false,
previewUseFront: "txt,doc,docx,pdf",
isPreviewDisable: false
isPreviewDisable: false,
total: 0
}
},

View File

@ -246,7 +246,7 @@
</div><!--operate 操作按钮-->
<el-table :data="attachmentList" style="width: 100%">
<!-- <el-table-column type="selection" width="50" align="center"> </el-table-column>-->
<el-table-column label="序号" width="60" type="index"></el-table-column>
<el-table-column label="序号" width="60" align="center" type="index"></el-table-column>
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">