【修改】修改权限申请流程

This commit is contained in:
zhoulingpo
2023-05-10 15:07:35 +08:00
parent 0ca1c4c6f5
commit fc0f3245be
16 changed files with 686 additions and 504 deletions
@@ -1,41 +1,45 @@
<template>
<div class="reportTable">
<el-button v-if="!disabled" class="addbtn" size="small" @click="addReport">添加报告</el-button>
<!-- <el-button v-if="!disabled" class="addbtn" size="small" @click="addReport">添加报告</el-button>-->
<el-button v-if="!disabled" class="delbtn" size="small" @click="deleteAll">批量删除</el-button>
<div class="table">
<vxe-table :data="processTable" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="500"
<vxe-table :data="processTable" :empty-render="{name: 'NotData'}" align="center" border stripe max-height="280"
ref="xTable" @checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow field="name" title="报告名称"></vxe-column>
<!-- <vxe-column show-overflow show-header-overflow field="labelTwoName" :title="tagsForm.tags02.name"></vxe-column>-->
<!-- <vxe-column show-overflow show-header-overflow field="labelThreeName" :title="tagsForm.tags03.name"></vxe-column>-->
<vxe-column show-overflow show-header-overflow field="year" title="报告年份" width="200" ></vxe-column>
<vxe-column show-overflow show-header-overflow field="department" title="报告部门"></vxe-column>
<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="confidentialLevel" title="报告涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="报告隐私等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="oneApproveName" title="审批人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="twoApproveName" title="二级审批人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="applyReason" title="申请原因"></vxe-column>
<vxe-column show-overflow show-header-overflow field="powerName" title="申请权限"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right" v-if="!disabled">
<template #default="{ row }">
<template #default="{ row,rowIndex }">
<el-button type="text" class="" @click="editTable(row,rowIndex)">编辑</el-button>
<el-button type="text" class="del-btn" @click="reportDelete(row)">删除</el-button>
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
</template>
</vxe-column>
</vxe-table>
<el-pagination
class="pagination"
@size-change="handleLogSizeChange"
@current-change="handleLogCurrentChange"
:current-page="qLog.pageNo"
:page-sizes="[5, 10, 20]"
:page-size="qLog.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"/>
<reportDialog ref="reportDialog" :tagsForm="tagsForm" :alreadyData="value" @confirm="addReportList"></reportDialog>
<!-- <el-pagination-->
<!-- class="pagination"-->
<!-- @size-change="handleLogSizeChange"-->
<!-- @current-change="handleLogCurrentChange"-->
<!-- :current-page="qLog.pageNo"-->
<!-- :page-sizes="[5, 10, 20]"-->
<!-- :page-size="qLog.pageSize"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- :total="total"/>-->
<reportDrawer ref="reportDrawer" :isShow="editDialog" :form="form" @close="editDialog=false" @update="updateTable"></reportDrawer>
<!-- <reportDialog ref="reportDialog" :tagsForm="tagsForm" :alreadyData="value" @confirm="addReportList"></reportDialog>-->
</div>
</div>
</template>
<script>
import reportDialog from './reportDialog'
import reportDrawer from './reportDrawer'
export default {
name: 'reportTable',
props: {
@@ -50,10 +54,13 @@ export default {
}
},
components: {
reportDialog
reportDrawer
},
data () {
return {
form:{},
formIndex:0,
editDialog: false,
processTable: [],
total: 0,
qLog: {
@@ -62,50 +69,32 @@ export default {
},
copyTableData: [],
checkIds: [],
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: ''},
]
}
}
}
},
watch: {
value () {
this.qLog.pageSize = 10
this.qLog.pageNo = 1
this.total = this.value.length
this.processTable = this.value.slice(0, 9)
this.pageChage(1)
// this.qLog.pageSize = 10
// this.qLog.pageNo = 1
// this.total = this.value.length
// this.processTable = this.value.slice(0, 9)
// this.pageChage(1)
this.processTable = this.value
}
},
created () {
// this.copyTableData = JSON.parse(JSON.stringify(this.tableData))
},
methods: {
updateTable(form){
this.$set(this.processTable,this.formIndex,form)
this.$emit('updateTable',this.processTable)
},
editTable(row,index) {
this.form = JSON.parse(JSON.stringify(row))
this.formIndex=index
this.$refs.reportDrawer.open(this.form)
},
addReportList (list) {
this.$nextTick(()=>{
this.$emit('updateTable', [...this.value , ...list])