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

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
+17
View File
@@ -90,6 +90,14 @@ export default {
data: data
})
},
// 通用流程提交
completeTaskALL(data){
return request({
url: '/api/batchCompleteTask',
method: 'post',
data: data
})
},
// 通用流程详细信息查询
getProcessDetail( data ){
return request({
@@ -116,6 +124,15 @@ export default {
})
},
// 停用流程发起
startProcessALL(data) {
return request({
url: '/api/batchStartProcess',
method: 'post',
data: data
})
},
// 保存到草稿
saveProcess(data) {
return request({
+15 -1
View File
@@ -97,6 +97,20 @@
word-break: break-word;
max-height: 300px;
overflow: auto;
}
.no_border{
.el-form-item .el-input__inner {
height: 40px;
line-height: 40px;
font-size: 14px;
border: none;
}
.el-form-item .el-textarea__inner{
border: none;
}
.el-input.is-disabled .el-input__inner,
.el-textarea.is-disabled .el-textarea__inner{
background-color: #fff;
}
}
+1 -1
View File
@@ -948,7 +948,7 @@ export default {
})
if (this.maxSelected == 1) {
// debugger
//
this.tableChecked = this.config.value
this.isShowOrg = false
}
+23 -8
View File
@@ -1,4 +1,5 @@
<!-- 流程组件公共数据 -->
<script src="../api/modules/process.js"></script>
<script>
export default {
@@ -7,21 +8,23 @@
components: {},
data() {
return {
userId: this.$store.getters.userInfo.usid,
userName:this.$store.getters.userInfo.usname,
processTypeList: [
{
label: '下载申请流程',
value: '1'
label: '下载申请',
value: '3'
},
{
label: '预览申请流程',
label: '预览申请',
value: '1'
},
{
label: '预览+下载申请',
value: '2'
},
{
label: '预览+下载申请流程',
value: '3'
},
{
label: '上传审批流程',
label: '上传审批',
value: '4'
},
],
@@ -115,6 +118,18 @@
})
})
},
// 所有流程的完成任务
completeProcessALL(obj) {
this.$api.process.completeTaskALL(obj).then(res=>{
this.$message['success']('提交成功')
this.$router.push({
path:"/userCenter/processCenter",
query:{
id:'AEHJB8YNJ3'
}
})
})
},
// 获取流程详细信息
getProcessDetail(){
return new Promise((resolve,reject)=>{
+2
View File
@@ -17,6 +17,7 @@ import './assets/css/element-variables.scss'
// ECharts
import 'echarts'
import ECharts from './components/ECharts'
import orgTable from '@/components/OrgTable'
// Api
import Api from './api'
@@ -47,6 +48,7 @@ Vue.use(VXETable)
Vue.use(VueQuillEditor)
Vue.use(ElementUI, { size: 'mini', zIndex: 3000 })
Vue.component('v-chart', ECharts)
Vue.component('orgTable',orgTable)
Vue.use(Api)
Vue.use(Directive)
Vue.use(Filter)
+8 -7
View File
@@ -1,10 +1,11 @@
// 定义枚举
import Esenum from './index.js'
// 权限申请
export const PERMISSION = new Esenum([
export const PERMISSION = [
{ label: '预览', value: "1" },
{ label: '预览+下载', value: "2" }
])
{ label: '预览+下载', value: "2" },
{ label: '下载', value: "3" },
]
// 基础设置的枚举
// export const basMessage = new Esenum([
@@ -16,7 +17,7 @@ export const basMessage = new Esenum({
export const privacyLevelOptions= new Esenum([
export const privacyLevelOptions= [
{
value:'公开(内部公开)',
label:'公开(内部公开)'
@@ -29,8 +30,8 @@ export const privacyLevelOptions= new Esenum([
value:'核心商密',
label:'核心商密'
},
])
export const confidentialLevelOptions = new Esenum([
]
export const confidentialLevelOptions = [
{
value:'不涉及用户隐私',
label:'不涉及用户隐私'
@@ -43,4 +44,4 @@ export const confidentialLevelOptions = new Esenum([
value:'用户敏感信息',
label:'用户敏感信息'
}
])
]
+22 -23
View File
@@ -180,23 +180,22 @@
<!-- </div>-->
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="摘要"></vxe-column>
<vxe-column show-overflow show-header-overflow field="mainContent" title="摘要"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="报告年份"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="报告评级">
<vxe-column show-overflow show-header-overflow field="rating" title="报告评级">
<template #default="{row}">
<el-rate
v-model="value"
v-model="row.rating/2"
disabled
show-score
text-color="#ff9900"
score-template="{value}">
>
</el-rate>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="点赞数"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="点击率"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="下载量"></vxe-column>
<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 title="操作" width="200" fixed="right">
<template #default="{ row }">
@@ -343,24 +342,24 @@ export default {
})
},
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
// }
// })
// if(temp.length>0) {
// this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!")
// return
// }
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
}
})
if(temp.length>0) {
this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!")
return
}
this.$router.push({
path: '/permission/launch',
query: {id: 'AEHJB8YNJ3', isBegin: 1}
query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:this.checkIds.join(',')}
})
},
init() {
@@ -1,74 +1,79 @@
<template>
<div class="AuditOperationBox">
<el-form
ref="examineForm"
:model="examineForm"
:rules="examineFormRules"
size="medium"
class="label-input-form prc-content-border">
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="9">-->
<!-- <el-form-item label="选择赋权时间:" prop="date"-->
<!-- label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-date-picker-->
<!-- v-model="examineForm.date"-->
<!-- type="date"-->
<!-- placeholder="选择赋权时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="审批结果:" prop="flag"
label-width="132px" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-radio-group :disabled="formdisableflag" v-model="examineForm.flag" >
<el-radio :label="'1'">同意</el-radio>
<el-radio :label="'2'">不同意</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">审批意见:</template>
<el-input :disabled="formdisableflag" :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审批意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-button-->
<!-- size="small"-->
<!-- class="form-upload-btn"-->
<!-- icon="el-icon-upload"-->
<!-- @click="clickButtonToUpload('approvalFile')"-->
<!-- >-->
<!-- {{ examineForm.approvalFile === 'null' || examineForm.approvalFile === '' ||-->
<!-- examineForm.approvalFile == null ? '点击上传' : '查看已上传的文件' }}-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<div class="AuditOperationBox">
<el-form
ref="examineForm"
:model="examineForm"
:rules="examineFormRules"
size="medium"
class="label-input-form prc-content-border">
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="9">-->
<!-- <el-form-item label="选择赋权时间:" prop="date"-->
<!-- label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-date-picker-->
<!-- v-model="examineForm.date"-->
<!-- type="date"-->
<!-- placeholder="选择赋权时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">审批意见:</template>
<el-input :disabled="formdisableflag" :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审批意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
<process-footer
v-if="!isDisable"
showCancel
:show-transfer="isShowTran"
:show-agree="isAgree"
:show-no-agree="isNoAgree"
:btyLoading="isBty"
:tyLoading="isTy"
@transfer="handleTransfer"
@submit="handleSubmit"
></process-footer>
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-button-->
<!-- size="small"-->
<!-- class="form-upload-btn"-->
<!-- icon="el-icon-upload"-->
<!-- @click="clickButtonToUpload('approvalFile')"-->
<!-- >-->
<!-- {{ examineForm.approvalFile === 'null' || examineForm.approvalFile === '' ||-->
<!-- examineForm.approvalFile == null ? '点击上传' : '查看已上传的文件' }}-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
</div>
</div>
</template>
<script>
import processFooter from '@/components/ProcessFooter'
export default {
name: 'AuditOperation',
components:{
processFooter,
},
props: {
isDisable:{
type:Boolean,
@@ -76,11 +81,32 @@ export default {
},
examine:{
type:Object
},
taskId:{
type:String,
default:''
},
prcId:{
type:String,
default:''
},
prcType:{
type:Number,
default:''
}
},
data () {
return {
isBty:false,
isTy:false,
isNoAgree: true,
isAgree: true,
visibleTree: false,
isSubmit: false,
tranLoading: false,
isShowTran: true,
isShowSubmit: true,
examineForm: {
planReasonFile: '',
oldName: '',
@@ -107,19 +133,40 @@ export default {
}
},
methods: {
handleTransfer(){
this.$emit('handleTransfer')
},
handleSubmit(type) {
if(type=='n'){
// 校验原因是否填写
this.examineForm.flag=2
if(this.examineForm.approvalOpinion==''){
this.$message.warning("请您填写原因")
return
}
}else{
this.examineForm.flag=1
}
this.$emit('handleSubmit')
// if (this.$refs.operationRef.submit()) {
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
},
/** 在提交表单的校验 通过继续执行 */
submit () {
this.isSubmit = false
let v
this.$refs.examineForm.validate((valid) => {
v=valid
if (valid) {
this.isSubmit = true
return true
} else {
this.$message.warning('请检查表单是否填写正确')
return false
}
})
return v
}
}
@@ -127,11 +174,11 @@ export default {
</script>
<style scoped>
.AssignButton {
font-size: 18px;
}
.AssignButton {
font-size: 18px;
}
.AssignButton:hover {
cursor: pointer;
}
.AssignButton:hover {
cursor: pointer;
}
</style>
@@ -0,0 +1,233 @@
<template>
<div>
<el-drawer
title="编辑"
:visible.sync="isShow"
size="35%"
class="drawerLog"
:wrapperClosable="false"
@close="handleClose"
>
<el-form ref="applicationFormRef" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium" :rules="applicationFormRule"
>
<el-row>
<el-col :span="22">
<el-form-item label="报告名称:" prop="name">
<el-input disabled v-model="applicationForm.name"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
<el-input disabled v-model="applicationForm.confidentialLevel"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="报告隐私等级:" prop="privacyLevel">
<el-input disabled v-model="applicationForm.privacyLevel"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="审批人:" prop="oneApprove">
<el-input readonly :disabled="formControl" v-model="applicationForm.oneApproveName"
@click.native="handleCheck('spr1')"
placeholder="请选择审批人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="二级审批人:" prop="twoApprove">
<el-input readonly :disabled="formControl" v-model="applicationForm.twoApproveName"
@click.native="handleCheck('spr2')"
placeholder="请选择二级审批人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="选择申请权限:" prop="power">
<el-select :disabled="formControl" v-model="applicationForm.power" placeholder="请选择申请权限"
@change="changeType">
<el-option
v-for="item in PERMISSION"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="申请原因:" prop="applyReason">
<el-input :disabled="formControl" type="textarea" v-model="applicationForm.applyReason"
placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="done">
<el-button type="primary" size="medium" @click.native="savaCheck">确定</el-button>
<el-button type="default" size="medium" @click.native="handleClose">取消</el-button>
</div>
</el-drawer>
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
</div>
</template>
<script>
import {PERMISSION} from '@/utils/Enum/enum'
export default {
name: "reportDrawer",
data() {
return {
isShow: false,
visibleOrgTable: false,
treeType: '',
orgTableVal: '',
orgTableValName: '',
formControl: false,
PERMISSION,
applicationForm: {},
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}],
oneApprove: [{
required: true,
message: '请选择审批人',
trigger: 'change'
}],
twoApprove: [{
required: true,
message: '请选择二级审批人',
trigger: 'change'
}],
},
}
},
props: {
form: {
type: Object,
}
},
methods: {
changeType(i) {
let newItem = this.PERMISSION.filter(item=>{
if(i==item.value){
return item
}
})
this.form.powerName = newItem[0].label
},
handleClose() {
this.isShow = false
},
open(form) {
this.isShow = true
if (!form.twoApprove) {
form.oneApprove = ''
form.oneApproveName = ''
form.twoApprove = ''
form.twoApproveName = ''
form.power = ''
form.applyReason = ''
form.prcType = ''
form.powerName=''
}
this.applicationForm = JSON.parse(JSON.stringify(form))
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
})
},
savaCheck() {
this.$refs.applicationFormRef.validate(v => {
if (v) {
this.$emit('update', this.applicationForm)
this.isShow = false
} else {
this.$message.warning("请检查表单")
}
})
},
handleCheck(name) {
if (this.formControl) {
return false
}
this.treeType = name
this.orgTableVal = ''
this.orgTableValName = ''
if (name === 'spr1') {
this.orgTableVal = this.applicationForm.oneApprove ? this.applicationForm.oneApprove : ''
this.orgTableValName = this.applicationForm.oneApproveName ? this.applicationForm.oneApproveName : ''
} else {
this.orgTableVal = this.applicationForm.twoApprove ? this.applicationForm.twoApprove : ''
this.orgTableValName = this.applicationForm.twoApproveName ? this.applicationForm.twoApproveName : ''
}
this.visibleOrgTable = true
},
// 树点击
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
console.log(checkedList, '0009999')
checkedList.map((item, index) => {
parts.push(item.userId || item.USID)
partsName.push(item.uname)
})
if (this.treeType === 'spr1') {
this.applicationForm.oneApprove = parts.toString()
this.applicationForm.oneApproveName = partsName.toString()
} else if (this.treeType === 'spr2') {
this.applicationForm.twoApprove = parts.toString()
this.applicationForm.twoApproveName = partsName.toString()
}
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
},
}
}
</script>
<style lang="scss" scoped>
.drawerLog {
::v-deep .el-drawer__header {
padding: 10px 15px;
color: #555;
font-size: 18px;
}
.done {
position: fixed;
bottom: 20px;
right: 20px;
}
}
</style>
@@ -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])
+63 -54
View File
@@ -7,56 +7,78 @@
<process-header v-else :title="'已办流程'" :proceesNum="prcNum"></process-header>
<div class="procedure">
<div class="process_content">
<span class="base_title">基础信息</span>
<el-form ref="processFormRef" :model="processForm" label-width="150px"
:rules="processFormRule" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="流程名称:" prop="prcName">
<el-input readonly :disabled="formControl " v-model="processForm.prcName" @click.native="handleCheck('spr1')"
placeholder="请输入流程名称"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}" :disabled="formControl"></report-table>
</el-row>
<span class="base_title">报告基本信息</span>
<el-row>
<el-form ref="form" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium" :rules="applicationFormRule"
class="label-input-form no_border" size="medium"
:disabled="formControl">
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="applyReason">
<el-input type="textarea" v-model="applicationForm.applyReason" placeholder="请输入申请原因"></el-input>
<el-form-item label="上传人:" prop="applyReason">
<el-input v-model="applicationForm.applyReason" placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="power">
<el-select v-model="applicationForm.power" placeholder="请选择申请权限">
<el-option
v-for="item in PERMISSION"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="内容摘要:" prop="mainContent">
<el-input v-model="applicationForm.mainContent" placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="报告涉密等级:" prop="applyReason">
<el-input v-model="applicationForm.confidentialLevel" placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="报告隐私等级:" prop="privacyLevel">
<el-input v-model="applicationForm.privacyLevel" placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="process_content">
<span class="base_title">报告权限申请信息</span>
<el-row>
<el-form ref="form" :model="applicationForm2" label-width="150px"
class="label-input-form no_border" size="medium"
:disabled="formControl">
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="applyReason">
<el-input v-model="applicationForm.applyReason" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="申请权限:" prop="power">
<el-input v-model="applicationForm.power" placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="process_content" v-if="$route.query.type !=='yiban'">
<span class="base_title">审核信息</span>
<audit-operation ref="operationRef" :examine="submitjson" :is-disable="disabled"
:prcId="prcId" :prcType="prcType" :taskId="taskId" @handleSubmit="handleSubmit" @handleTransfer="handleTransfer"></audit-operation>
</div>
<div class="process_content">
<span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history>
</div>
<!-- v-if="$route.query.type !=='yiban'"-->
<div class="process_content" v-if="$route.query.type !=='yiban'">
<span class="base_title">审核信息</span>
<audit-operation ref="operationRef" :examine="submitjson" :is-disable="disabled"></audit-operation>
</div>
</div>
<process-footer
v-if="!disabled"
@@ -105,25 +127,9 @@ export default {
},
data () {
return {
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
processFormRule: {
prcName: [{
required: true,
message: '请输入流程名称',
trigger: 'change'
},{
max: 100,
message: '申请原因最多填写100字符',
trigger: 'change'
}]
applicationForm2:{
power:'',
applyReason:''
},
processForm: { prcName : ''},
visibleTree: false,
@@ -164,9 +170,12 @@ export default {
}
this.getProcessDetail(params).then(res=>{
this.tableData = JSON.parse(this.processOld.dataJson)
this.$set(this.applicationForm,'power',this.tableData[0].power)
this.$set(this.applicationForm,'applyReason',this.tableData[0].applyReason)
this.$set(this.applicationForm2,'power',this.tableData.power)
this.$set(this.applicationForm2,'applyReason',this.tableData.applyReason)
this.$set(this.applicationForm,'mainContent',this.tableData.mainContent)
this.$set(this.applicationForm,'privacyLevel',this.tableData.privacyLevel)
this.$set(this.applicationForm,'confidentialLevel',this.tableData.confidentialLevel)
this.$set(this.applicationForm,'applyReason',this.tableData.applyReason)
this.disabled=false
this.formControl= true
if(this.$route.query.type=='yiban'){
+112 -277
View File
@@ -1,3 +1,5 @@
<script src="../../utils/Enum/index.js"></script>
<script src="../../utils/Enum/enum.js"></script>
<template>
<div class="process">
<div class="process_box">
@@ -7,82 +9,17 @@
<div class="procedure">
<div class="process_content">
<span class="base_title">基础信息</span>
<el-form ref="processFormRef" :model="processForm" label-width="150px"
:rules="processFormRule" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="流程名称:" prop="prcName">
<el-input :disabled="formControl || formControlname" v-model="processForm.prcName"
placeholder="请输入流程名称"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<report-table v-model="tableData" @updateTable="getV" :disabled="showTableD"></report-table>
</el-row>
<el-row>
<el-form ref="applicationFormRef" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium" :rules="applicationFormRule"
>
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="applyReason">
<el-input :disabled="formControl" type="textarea" v-model="applicationForm.applyReason"
placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="power">
<el-select :disabled="formControl" v-model="applicationForm.power" placeholder="请选择申请权限">
<el-option
v-for="item in PERMISSION"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="process_content" v-if="initShow">
<span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history>
</div>
<div class="process_content">
<span class="base_title">指派信息</span>
<el-form ref="assignFormRef" :model="assignForm" label-width="150px"
:rules="assignFormRules" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="选择一级审批人员:" prop="oneApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.oneApproveName"
@click.native="handleCheck('spr1')"
placeholder="请选择一级审批人员"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="选择二级审批人员:" prop="twoApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName"
@click.native="handleCheck('spr2')"
placeholder="请选择二级审批人员"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="说明:" prop="remark">
<el-input type="textarea" :disabled="formControl" v-model="assignForm.remark" placeholder="请输入说明"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<process-footer
v-if="!formControl"
@@ -94,10 +31,7 @@
@save="handleSave"
@submit="handleSubmit"
></process-footer>
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
</div>
</div>
</template>
@@ -107,8 +41,8 @@ import processHeader from '@/components/ProcessHeader'
import processFooter from '@/components/ProcessFooter'
import processApprovalHistory from '@/components/ProcessApprovalHistory'
import reportTable from './components/reportTable'
import {PERMISSION} from '@/utils/Enum/enum'
import orgTable from '../../components/OrgTable'
import processMixin from "../../components/ProcessMixin";
export default {
@@ -118,7 +52,6 @@ export default {
reportTable,
processFooter,
processApprovalHistory,
orgTable
},
mixins: [processMixin],
data() {
@@ -135,7 +68,6 @@ export default {
isShowSave: false,
isShowSubmit: true,
formControl: false,
formControlname: false,
assignForm: {
oneApprove: '',
twoApprove: '',
@@ -152,7 +84,6 @@ export default {
pageSize: 10000,
pageNo: 1
},
PERMISSION,
processForm: {
prcName: ''
},
@@ -167,43 +98,27 @@ export default {
trigger: 'change'
}]
},
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
assignFormRules: {
oneApprove: [{
required: true,
message: '请选择一级审批人员',
trigger: 'change'
}],
twoApprove: [{
required: true,
message: '请选择二级审批人员',
trigger: 'change'
}],
remark: [{
max: 500, message: '说明最多填写500字符'
}]
},
prcType: 1,
prcName:''
prcName:'',
params:[] //处理好格式的数据
}
},
async created() {
// 第一次进入此页面 需要清楚校验
if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) {
// this.reportList(this.$route.query.ids)
this.reportList(this.$route.query.ids)
// }
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
}
// 如果是从草稿进入的
if (this.$route.query.isDraft) {
@@ -213,26 +128,8 @@ export default {
this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName
this.getDraftDetail().then(res => {
this.$set(this.processForm,'prcName', this.prcName)
let tableData = JSON.parse(this.processOld.dataJson)
this.$set(this.applicationForm,'power',tableData[0].power)
this.$set(this.applicationForm,'applyReason',tableData[0].applyReason)
if(tableData[0].reportId){
this.tableData=tableData
}
if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
}
this.$nextTick(()=>{
this.$refs.processFormRef.clearValidate()
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
})
})
}
@@ -249,28 +146,7 @@ export default {
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.tableData = JSON.parse(this.processOld.dataJson)
if(this.tableData.length>0){
this.$set(this.applicationForm,'power',this.tableData[0].power)
this.$set(this.applicationForm,'applyReason',this.tableData[0].applyReason)
}
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
//指派信息
// ({oneApprove:this.assignForm.oneApprove,oneApproveName:this.assignForm.oneApproveName,twoApprove:this.assignForm.twoApprove,twoApproveName:this.assignForm.twoApproveName,remark:this.assignForm.remark}= JSON.parse(this.processOld.submitJson))
// this.getProcessDetail().then(res => {
// //基础信息
// let applyReason = JSON.parse(res.processOld.dataJson)
// res.tableData = JSON.parse(res.processOld.dataJson)
// res.applicationForm.power = res.tableData[0].power
// debugger
// res.applicationForm.applyReason = applyReason[0]?.applyReason
//
// //指派信息
// ({oneApprove:res.assignForm.oneApprove,oneApproveName:res.assignForm.oneApproveName,twoApprove:res.assignForm.twoApprove,twoApproveName:res.assignForm.twoApproveName,remark:res.assignForm.remark}= JSON.parse(res.processOld.submitJson))
// })
}
if (this.$route.query.type == 'yiban') {
this.taskId = this.$store.getters.handleProcess.taskId
@@ -282,23 +158,13 @@ export default {
this.showTableD = true
this.$set(this.processForm,'prcName', this.prcName)
this.getProcessDetail().then((res) => {
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.tableData = JSON.parse(this.processOld.dataJson)
this.$set(this.applicationForm,'power',this?.tableData[0].power)
this.$set(this.applicationForm,'applyReason',this?.tableData[0].applyReason)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
})
}
},
methods: {
getV(newValue,jiaVlue)
{
debugger
if(jiaVlue &&jiaVlue.length > 0){
jiaVlue.forEach(item=>{
this.delData.push({
@@ -324,42 +190,7 @@ export default {
})
},
handleCheck(name) {
if (this.formControl) {
return false
}
this.treeType = name
this.orgTableVal = ''
this.orgTableValName = ''
if (name === 'spr1') {
this.orgTableVal = this.assignForm.oneApprove ? this.assignForm.oneApprove : ''
this.orgTableValName = this.assignForm.oneApproveName ? this.assignForm.oneApproveName : ''
} else {
this.orgTableVal = this.assignForm.twoApprove ? this.assignForm.twoApprove : ''
this.orgTableValName = this.assignForm.twoApproveName ? this.assignForm.twoApproveName : ''
}
this.visibleOrgTable = true
},
// 树点击
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
console.log(checkedList, '0009999')
checkedList.map((item, index) => {
parts.push(item.userId || item.USID)
partsName.push(item.uname)
})
this.qcrList = checkedList
if (this.treeType === 'spr1') {
this.assignForm.oneApprove = parts.toString()
this.assignForm.oneApproveName = partsName.toString()
} else if (this.treeType === 'spr2') {
this.assignForm.twoApprove = parts.toString()
this.assignForm.twoApproveName = partsName.toString()
}
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
},
// 获取表格列表 吧查询到的值传给子组件
reportList(ids) {
this.$api.permissionProcess.getReportLisy({
@@ -375,32 +206,54 @@ export default {
})
},
handleReset() {
this.processForm.prcName = ''
if(this.$route.query.taskDefinitionKey == 'reEdit'){
this.processForm.prcName = this.prcName
}
this.applicationForm = {
applyReason: '',
power: ''
}
this.assignForm = {
oneApprove: '',
twoApprove: ''
}
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
},
//判断表格数据是否完整
JuggleTableAll(){
let list= this.tableData.filter(item=>{
if(!item.twoApprove || item.twoApprove=='' || item.power==''){
return item
}
})
if(list.length>0){
return false
}
return true
},
// 整理数据
organizeData() {
let userId = this.$store.getters.userInfo.usid
this.tableData = this.tableData.map(item => {
item = {...item, ...this.applicationForm, userId: userId}
return item
let newParams=[]
newParams=this.tableData.map(item=>{
let obj={}
obj={
prcName:item.name,
prcType:item.power,
createUser:this.userId,
createUserName:this.userName,
userId:this.userId,
submitIson:'',
dataJson:'',
bpnId: this.$store.getters.handleProcess?.id
}
let submitIson={
oneApprove:item.oneApprove,
oneApproveName:item.oneApproveName,
twoApprove:item.twoApprove,
twoApproveName:item.twoApproveName,
}
delete item['oneApprove']
delete item['oneApproveName']
delete item['twoApprove']
delete item['twoApproveName']
let dataJson=item
obj.submitIson=JSON.stringify(submitIson)
obj.dataJson=JSON.stringify(dataJson)
return obj
})
this.params=newParams
},
// 保存
handleSave(){
@@ -440,66 +293,63 @@ export default {
},
// 提交
handleSubmit() {
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
this.$refs.assignFormRef.validate(v => {
this.$refs.applicationFormRef.validate(m => {
this.$refs.processFormRef.validate(async z => {
if (v && m && z) {
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
// 表格数据没有不能提交 需要提示
if (this.tableData.length == 0) {
this.$message.warning('至少需要选择一条报告数据')
} else {
// 调用流程数据
console.log("发送数据")
// 处理表格数据
//如果不是第一次
if (this.initShow) {
let flag=await this.JuggleSub(this.taskId)
if(flag){
console.log(this.delData,"flagflagflagflag")
debugger
if(this.delData){
this.delDatas().then(()=>{
this.organizeData()
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
})
}else{
this.organizeData()
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
// 表格数据没有不能提交 需要提示
if (this.tableData.length == 0) {
this.$message.warning('至少需要选择一条报告数据')
} else {
// 调用流程数据
console.log("发送数据")
// 处理表格数据
}
} else {
this.isSendDraft().then(()=>{
this.organizeData()
this.startProcess()
//如果不是第一次
if (this.initShow) {
let flag= this.JuggleSub(this.taskId)
if(flag){
console.log(this.delData,"flagflagflagflag")
if(this.delData){
this.delDatas().then(()=>{
this.organizeData()
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
})
}else{
this.organizeData()
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
} else {
this.$message.warning('请检查表单填写完整')
}
})
})
})
} else {
if(this.JuggleTableAll()){
this.organizeData()
this.startProcess()
}else{
this.$message.warning("请把表格数据填写完整")
}
// this.isSendDraft().then(()=>{
// })
}
}
},
//修改参数
changeParam() {
@@ -524,24 +374,9 @@ export default {
},
startProcess() {
//把表单都整合到form中
// dataJson与submitJson需要发到completeProcess
let form = {}
form = {
approveData: {
...this.applicationForm, ...this.processForm, ...this.assignForm,
userId: this.$store.getters.userInfo.usid
}, dataMsg: this.tableData
}
form.approvalOpinion = this.assignForm.remark
form.prcType = this.prcType
form.prcName = this.processForm.prcName
form.userId = this.$store.getters.userInfo.usid
form.bpnId = this.$store.getters.handleProcess?.id
//...this.applicationForm,...this.processForm,
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.$api.process.startProcess(form).then(({data}) => {
this.completeProcess({dataJson, submitJson, taskId: data.result, userId: form.userId, prcType: this.prcType})
this.$api.process.startProcessALL(this.params).then(({data}) => {
this.completeProcessALL(this.params)
})
},
//获取流程详细信息
@@ -134,11 +134,11 @@ export default {
},
methods: {
handleTransfer(){
debugger
this.$emit('handleTransfer')
},
handleSubmit(type) {
debugger
if(type=='n'){
// 校验原因是否填写
this.examineForm.flag=2
@@ -265,15 +265,36 @@ export default {
this.tags=JSON.parse(this.processForm.keyContent)
}
if(this.processForm.labelList && typeof this.processForm.labelList[0]=='string'){
this.form.labelList= this.processForm.labelList.map(item=>{
return JSON.parse(item)
this.form.labelList.map(item=>{
return this.getParentsById(cascaderOptions,item)
})
}
}
},
methods: {
/*
* @param list 数据列表
* @param id 后端返回的id
**/
getParentsById(list, id) {
for (let i in list) {
if (list[i].value == id) {
//查询到就返回该数组对象的value
return [list[i].value]
}
if (list[i].children) {
let node = this.getParentsById(list[i].children, id)
if (node !== undefined) {
//查询到把父节把父节点加到数组前面
node.unshift(list[i].value)
return node
}
}
}
},
downFile(id){
if(this.formControl) return
this.$api.report.reportDownload({reportId:'',fileId:id}).then(res=>{
@@ -293,7 +314,7 @@ export default {
parts.push(item.orgCode)
partsName.push(item.orgName)
})
debugger
this.qcrList = checkedList
this.form.department = parts.toString()
this.form.departmentName = partsName.toString()
+1 -1
View File
@@ -93,7 +93,7 @@ export default {
}
},
created () {
debugger
this.taskId=this.$store.getters.handleProcess.taskId
this.prcNum=this.$store.getters.handleProcess.prcNum
this.prcId=this.$store.getters.handleProcess.prcId
@@ -130,7 +130,7 @@ export default {
this.$store.commit('setHandleProcess',params)
switch (row.prcType) {
case '1' :
debugger
if (row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/permission/launch',