【修改】增加权限

This commit is contained in:
zhoulingpo
2023-05-23 11:53:04 +08:00
parent d4735589ef
commit e4e643bebd
2 changed files with 79 additions and 35 deletions
+71 -35
View File
@@ -29,13 +29,14 @@
</el-row>
<el-row >
<div class="operate-box">
<el-button @click="openLog">操作日志</el-button>
<el-button @click="openLog" v-btn-permission="'HHXMA8B6AS'">操作日志</el-button>
<el-button v-btn-permission="'9S7NYLJ9UF'" @click="openTags">标签维护</el-button>
<el-button @click="openReportAdd">报告上传</el-button>
<el-button @click="changeName" v-btn-permission="'W3G98WZE5H'">更改上传人</el-button>
</div>
</el-row>
</div>
<div class="table">
<div class="table">
<el-row>
<el-col :span="4" class="treeList">
<el-input placeholder="输入关键字进行过滤" v-model="filterText">
@@ -65,7 +66,9 @@
</el-col>
<el-col :span="20" style="padding-left: 15px">
<div class="table">
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 320px)'">
<vxe-table ref="xTable" :data="tableData" @checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent"
:empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 320px)'">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
<template #default="{ row, rowIndex }">
{{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }}
@@ -82,6 +85,7 @@
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="报告涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="报告隐私等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" title="报告上传时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createUserName" title="上传人"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }">
<el-button type="text" @click="openReportModify('modify', row)">编辑</el-button>
@@ -110,7 +114,7 @@
<el-select v-model="doNames" multiple collapse-tags placeholder="请选择操作类型"
@change="handleTyleChange">
<el-option label="新增" value="新增"></el-option>
<el-option label="修改" value="修改"></el-option>
<el-option label="编辑" value="编辑"></el-option>
<el-option label="删除" value="删除"></el-option>
<el-option label="预览" value="预览"></el-option>
<el-option label="下载" value="下载"></el-option>
@@ -181,7 +185,10 @@
</el-dialog>
<labelModalVue ref="labelModalVue" @updateList="updateList"></labelModalVue>
<!--报告上传-->
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
</div>
</template>
@@ -199,6 +206,9 @@ export default {
},
data() {
return {
visibleOrgTable:false,
orgTableVal:'',
orgTableValName:'',
treeKey:'',
watermarkText: '', // 水印
fullscreen: false,
@@ -221,37 +231,10 @@ export default {
treeData: [
],
filterText:'',
filterText2:'',
filterText2:'',
checkedKeys:[],
tagsForm: {
tags01: {
name: '',
parentId: '0',
type: '1',
id: '',
childList: [
// {name: '无', type: '1', id: '', parentId: ''},
]
},
tags02: {
name: '',
parentId: '0',
type: '2',
id: '',
childList: [
// {name: '无', type: '2', id: '', parentId: ''},
]
},
tags03: {
name: '',
parentId: '0',
type: '3',
id: '',
childList: [
// {name: '无', type: '3', id: '', parentId: ''},
]
},
},
checkIds:[],
checkList: [],
/* =============================================== 报告上传 =============================================== */
dialogReport: false, // 报告上传
reportF: {
@@ -328,6 +311,59 @@ export default {
},
methods: {
isTreeOk(checkedList){
const parts = []
const partsName = []
console.log(checkedList, '0009999')
checkedList.map((item, index) => {
parts.push(item.userId || item.USID)
partsName.push(item.uname)
})
// 调用更改接口
this.$api.report.changeUploader({
reportIds:this.checkIds,
userId:parts.toString()
}).then(res=>{
if(res.ok){
this.$message.success(res.data)
}
this.reportList();
})
},
changeName(){
if(this.checkList.length==0){
this.$message.warning('请至少选择一条报告')
return
}
let already=this.checkList.filter(item =>{
if( +item.isAct == 0){
return item
}
})
if(already.length>0) {
let name=already.map(item=>item.name)
this.$message.warning("当前选择的"+name.join(',')+"已经在流程中")
return
}
this.checkList.
this.orgTableVal = ''
this.orgTableValName = ''
this.visibleOrgTable = true
},
selectAllEvent({checked}) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkList = records
this.checkIds = records.map(item => {
return item.id
})
},
selectChangeEvent({checked}) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkList = records
this.checkIds = records.map(item => {
return item.id
})
},
setCheckedNodes(node, checked) {
node.checked = checked;
if (node.children && node.children.length > 0) {