【修改】修改权限 修改排序
This commit is contained in:
+86
-115
@@ -32,78 +32,16 @@
|
||||
<el-button type="primary" @click="search">查询</el-button>
|
||||
<el-button type="default" @click="reset">重置</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<div class="tag-item">
|
||||
<el-tooltip :content="tagData[1].name" placement="top">
|
||||
<label class="tag-title">{{ tagData[1].name }}</label>
|
||||
</el-tooltip>
|
||||
<div class="tag-show" :class="{'active': tagData[1].tagShow}">
|
||||
<el-checkbox :indeterminate="tagData[1].isIndeterminate" v-model="tagData[1].checkAll"
|
||||
@change="(val) => handleCheckAllChange(val, 1)">全部
|
||||
</el-checkbox>
|
||||
<el-checkbox-group v-model="q.labelOneId"
|
||||
@change="(val) => handleCheckedTagsChange(val, 1)">
|
||||
<template v-for="item in tagData[1].tags">
|
||||
<el-checkbox :label="item.id" :key="item.id">{{ item.name }}</el-checkbox>
|
||||
</template>
|
||||
</el-checkbox-group>
|
||||
<i @click="switchTagShow(1)"
|
||||
:class="{'el-icon-arrow-down': !tagData[1].tagShow, 'el-icon-arrow-up': tagData[1].tagShow}"></i>
|
||||
</div>
|
||||
</div>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="24">
|
||||
<div class="tag-item">
|
||||
<el-tooltip :content="tagData[2].name" placement="top">
|
||||
<label class="tag-title">{{ tagData[2].name }}</label>
|
||||
</el-tooltip>
|
||||
<div class="tag-show" :class="{'active': tagData[2].tagShow}">
|
||||
<el-checkbox :indeterminate="tagData[2].isIndeterminate" v-model="tagData[2].checkAll"
|
||||
@change="(val) => handleCheckAllChange(val, 2)">全部
|
||||
</el-checkbox>
|
||||
<el-checkbox-group v-model="q.labelTwoId"
|
||||
@change="(val) => handleCheckedTagsChange(val, 2)">
|
||||
<template v-for="item in tagData[2].tags">
|
||||
<el-checkbox :label="item.id" :key="item.id">{{ item.name }}</el-checkbox>
|
||||
</template>
|
||||
</el-checkbox-group>
|
||||
<i @click="switchTagShow(2)"
|
||||
:class="{'el-icon-arrow-down': !tagData[2].tagShow, 'el-icon-arrow-up': tagData[2].tagShow}"></i>
|
||||
</div>
|
||||
</div>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="24">
|
||||
<div class="tag-item">
|
||||
<el-tooltip :content="tagData[3].name" placement="top">
|
||||
<label class="tag-title">{{ tagData[3].name }}</label>
|
||||
</el-tooltip>
|
||||
<div class="tag-show" :class="{'active': tagData[3].tagShow}">
|
||||
<el-checkbox :indeterminate="tagData[3].isIndeterminate" v-model="tagData[3].checkAll"
|
||||
@change="(val) => handleCheckAllChange(val, 3)">全部
|
||||
</el-checkbox>
|
||||
<el-checkbox-group v-model="q.labelThreeId"
|
||||
@change="(val) => handleCheckedTagsChange(val, 3)">
|
||||
<template v-for="item in tagData[3].tags">
|
||||
<el-checkbox :label="item.id" :key="item.id">{{ item.name }}</el-checkbox>
|
||||
</template>
|
||||
</el-checkbox-group>
|
||||
<i @click="switchTagShow(3)"
|
||||
:class="{'el-icon-arrow-down': !tagData[3].tagShow, 'el-icon-arrow-up': tagData[3].tagShow}"></i>
|
||||
</div>
|
||||
</div>
|
||||
</el-col> -->
|
||||
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row class="tag-btn">
|
||||
|
||||
<el-button @click="permissionApp">权限申请</el-button>
|
||||
<el-button v-if="!isAdmin" type="primary" @click="permissionApp(false)">申请权限</el-button>
|
||||
|
||||
<div class="tag-right">
|
||||
<el-button @click="">时间</el-button>
|
||||
<el-button @click="">点击量</el-button>
|
||||
<el-button @click="">下载量</el-button>
|
||||
<el-button @click="clickBtn(1)" :class="{'checkClass':isShowbg1}">时间</el-button>
|
||||
<el-button @click="clickBtn(2)" class="clickNum" :class="{'checkClass':isShowbg2}">点击量</el-button>
|
||||
<el-button @click="clickBtn(3)" :class="{'checkClass':isShowbg3}">下载量</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
@@ -151,33 +89,6 @@
|
||||
<!-- <label class="row-title" >-->
|
||||
<!-- <el-tooltip :content="row.name" placement="top-start">-->
|
||||
<span class="report-name"> {{ row.name }}</span>
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- </label>-->
|
||||
<!-- <div class="row-info">-->
|
||||
<!-- <img v-if="row.fileType === '3'" class="icon-file-type" src="@/assets/imgs/icon-pdf.png" alt="">-->
|
||||
<!-- <img v-if="row.fileType === '4'" class="icon-file-type" src="@/assets/imgs/icon-doc.png" alt="">-->
|
||||
<!-- <img v-if="row.fileType === '1'" class="icon-file-type" src="@/assets/imgs/icon-ppt.png" alt="">-->
|
||||
<!-- <img v-if="row.fileType === '2'" class="icon-file-type" src="@/assets/imgs/icon-excel.png" alt="">-->
|
||||
|
||||
<!-- <div class="row-text">-->
|
||||
<!-- <label class="row-title" @click="goReportDetail(row)">-->
|
||||
<!-- <el-tooltip :content="row.name" placement="top-start">-->
|
||||
<!-- <span>{{row.name}}</span>-->
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- </label>-->
|
||||
<!-- <div class="tag-info">-->
|
||||
<!-- <span class="icon-tag-item"><img src="@/assets/imgs/icon-time.png"-->
|
||||
<!-- alt=""><span>{{row?.year}}</span></span>-->
|
||||
<!-- <span class="icon-tag-item"><img src="@/assets/imgs/icon-tag01.png"-->
|
||||
<!-- alt=""><span class="keyContent">{{getKeyContent(row?.keyContent)}}</span></span>-->
|
||||
<!-- <!– <span class="icon-tag-item"><img src="@/assets/imgs/icon-tag02.png"-->
|
||||
<!-- alt=""><span>{{row.labelTwoName}}</span></span>-->
|
||||
<!-- <span class="icon-tag-item"><img src="@/assets/imgs/icon-tag03.png"-->
|
||||
<!-- alt=""><span>{{row.labelThreeName}}</span></span> –>-->
|
||||
<!-- <!–<span class="icon-tag-item"><span>{{(row.fileSize / 1024 / 1024).toFixed(2) }}MB</span></span>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="mainContent" title="摘要"></vxe-column>
|
||||
@@ -196,12 +107,12 @@
|
||||
<vxe-column show-overflow show-header-overflow field="thumbUp" title="点赞数"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="clicks" title="点击率"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="download" title="下载量"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="year" title="上传人"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="uploader" title="上传人"></vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" @click="previewRow(row)">预览</el-button>
|
||||
<el-button type="text" v-if="isAdmin || row.power == 2 || !row.power " @click="downloadRow(row)">下载</el-button>
|
||||
<el-button type="text" v-if="" @click="permissionApp(row)">申请权限</el-button>
|
||||
<el-button type="text" v-if="isAdmin ||row.power == 1 ||row.power == 2" @click="previewRow(row)">预览</el-button>
|
||||
<el-button type="text" v-if="isAdmin || row.power == 3 || row.power == 2 " @click="downloadRow(row)">下载</el-button>
|
||||
<el-button type="text" v-if="!isAdmin && row.power !== 2" @click="permissionApp(row)">申请权限</el-button>
|
||||
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -250,6 +161,9 @@ export default {
|
||||
name: 'ReportList',
|
||||
data() {
|
||||
return {
|
||||
isShowbg1:true,
|
||||
isShowbg2:false,
|
||||
isShowbg3:false,
|
||||
value:3.7,
|
||||
watermarkText: '', // 水印
|
||||
fullscreen: false,
|
||||
@@ -259,6 +173,9 @@ export default {
|
||||
name: '',
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
orderByClicks:0,
|
||||
orderByDownload:0,
|
||||
orderByTime:1
|
||||
},
|
||||
total: 0,
|
||||
tableData: [],
|
||||
@@ -302,6 +219,28 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickBtn(type){
|
||||
for(let i= 1;i<4;i++){
|
||||
this['isShowbg'+i] = false
|
||||
}
|
||||
this['isShowbg'+type] = true
|
||||
if(type==1){
|
||||
this.q.orderByTime=1
|
||||
this.q.orderByClicks=0
|
||||
this.q.orderByDownload=0
|
||||
|
||||
}else if(type==2){
|
||||
this.q.orderByClicks=1
|
||||
this.q.orderByTime=0
|
||||
this.q.orderByDownload=0
|
||||
|
||||
}else{
|
||||
this.q.orderByDownload=1
|
||||
this.q.orderByClicks=0
|
||||
this.q.orderByTime=0
|
||||
}
|
||||
this.reportList()
|
||||
},
|
||||
getKeyContent(list) {
|
||||
if (list) {
|
||||
let keyContent = []
|
||||
@@ -341,26 +280,34 @@ export default {
|
||||
return item.id
|
||||
})
|
||||
},
|
||||
permissionApp() {
|
||||
if(this.checkList.length <1){
|
||||
this.$message.warning("至少选择一条报告进行权限申请")
|
||||
return
|
||||
}
|
||||
// 有预览权限的时候是否还让继续申请
|
||||
let temp=this.checkList.filter(item =>{
|
||||
if(+item.power == 1 || +item.power == 2){
|
||||
return item.name
|
||||
permissionApp(row) {
|
||||
if(row){
|
||||
this.$router.push({
|
||||
path: '/permission/launch',
|
||||
query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:row.id}
|
||||
})
|
||||
}else{
|
||||
if(this.checkList.length <1){
|
||||
this.$message.warning("至少选择一条报告进行权限申请")
|
||||
return
|
||||
}
|
||||
})
|
||||
if(temp.length>0) {
|
||||
this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!")
|
||||
return
|
||||
// 有预览权限的时候是否还让继续申请
|
||||
let temp=this.checkList.filter(item =>{
|
||||
if(+item.power == 1 || +item.power == 2){
|
||||
return item.name
|
||||
}
|
||||
})
|
||||
if(temp.length>0) {
|
||||
this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!")
|
||||
return
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
path: '/permission/launch',
|
||||
query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:this.checkIds.join(',')}
|
||||
})
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
path: '/permission/launch',
|
||||
query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:this.checkIds.join(',')}
|
||||
})
|
||||
},
|
||||
init() {
|
||||
this.getTreeLabel()
|
||||
@@ -462,7 +409,10 @@ export default {
|
||||
labelTwoId: [],
|
||||
labelThreeId: [],
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
orderByTime:1,
|
||||
orderByDownload:0,
|
||||
orderByClicks:0
|
||||
}
|
||||
this.total = 0
|
||||
this.tableData = []
|
||||
@@ -550,10 +500,31 @@ export default {
|
||||
}
|
||||
|
||||
.tag-btn {
|
||||
.el-button + .el-button {
|
||||
margin-left: 0px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
padding: 18px 13px 11px;
|
||||
.tag-right{
|
||||
float: right;
|
||||
::v-deep .el-button{
|
||||
border: 1px solid #3D87CC;
|
||||
border-radius: 0;
|
||||
color: #3D87CC;
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
.clickNum{
|
||||
border: none;
|
||||
border-top: 1px solid #3D87CC ;
|
||||
border-bottom: 1px solid #3D87CC;
|
||||
}
|
||||
|
||||
}
|
||||
.checkClass{
|
||||
background-color: rgba(64, 158, 255, 1) !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user