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

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 data: data
}) })
}, },
// 通用流程提交
completeTaskALL(data){
return request({
url: '/api/batchCompleteTask',
method: 'post',
data: data
})
},
// 通用流程详细信息查询 // 通用流程详细信息查询
getProcessDetail( data ){ getProcessDetail( data ){
return request({ return request({
@@ -116,6 +124,15 @@ export default {
}) })
}, },
// 停用流程发起
startProcessALL(data) {
return request({
url: '/api/batchStartProcess',
method: 'post',
data: data
})
},
// 保存到草稿 // 保存到草稿
saveProcess(data) { saveProcess(data) {
return request({ return request({
+15 -1
View File
@@ -97,6 +97,20 @@
word-break: break-word; word-break: break-word;
max-height: 300px; max-height: 300px;
overflow: auto; 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) { if (this.maxSelected == 1) {
// debugger //
this.tableChecked = this.config.value this.tableChecked = this.config.value
this.isShowOrg = false this.isShowOrg = false
} }
+25 -10
View File
@@ -1,4 +1,5 @@
<!-- 流程组件公共数据 --> <!-- 流程组件公共数据 -->
<script src="../api/modules/process.js"></script>
<script> <script>
export default { export default {
@@ -7,21 +8,23 @@
components: {}, components: {},
data() { data() {
return { return {
userId: this.$store.getters.userInfo.usid,
userName:this.$store.getters.userInfo.usname,
processTypeList: [ processTypeList: [
{ {
label: '下载申请流程', label: '下载申请',
value: '1'
},
{
label: '预览申请流程',
value: '2'
},
{
label: '预览+下载申请流程',
value: '3' value: '3'
}, },
{ {
label: '上传审批流程', label: '预览申请',
value: '1'
},
{
label: '预览+下载申请',
value: '2'
},
{
label: '上传审批',
value: '4' 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(){ getProcessDetail(){
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
+2
View File
@@ -17,6 +17,7 @@ import './assets/css/element-variables.scss'
// ECharts // ECharts
import 'echarts' import 'echarts'
import ECharts from './components/ECharts' import ECharts from './components/ECharts'
import orgTable from '@/components/OrgTable'
// Api // Api
import Api from './api' import Api from './api'
@@ -47,6 +48,7 @@ Vue.use(VXETable)
Vue.use(VueQuillEditor) Vue.use(VueQuillEditor)
Vue.use(ElementUI, { size: 'mini', zIndex: 3000 }) Vue.use(ElementUI, { size: 'mini', zIndex: 3000 })
Vue.component('v-chart', ECharts) Vue.component('v-chart', ECharts)
Vue.component('orgTable',orgTable)
Vue.use(Api) Vue.use(Api)
Vue.use(Directive) Vue.use(Directive)
Vue.use(Filter) Vue.use(Filter)
+8 -7
View File
@@ -1,10 +1,11 @@
// 定义枚举 // 定义枚举
import Esenum from './index.js' import Esenum from './index.js'
// 权限申请 // 权限申请
export const PERMISSION = new Esenum([ export const PERMISSION = [
{ label: '预览', value: "1" }, { label: '预览', value: "1" },
{ label: '预览+下载', value: "2" } { label: '预览+下载', value: "2" },
]) { label: '下载', value: "3" },
]
// 基础设置的枚举 // 基础设置的枚举
// export const basMessage = new Esenum([ // export const basMessage = new Esenum([
@@ -16,7 +17,7 @@ export const basMessage = new Esenum({
export const privacyLevelOptions= new Esenum([ export const privacyLevelOptions= [
{ {
value:'公开(内部公开)', value:'公开(内部公开)',
label:'公开(内部公开)' label:'公开(内部公开)'
@@ -29,8 +30,8 @@ export const privacyLevelOptions= new Esenum([
value:'核心商密', value:'核心商密',
label:'核心商密' label:'核心商密'
}, },
]) ]
export const confidentialLevelOptions = new Esenum([ export const confidentialLevelOptions = [
{ {
value:'不涉及用户隐私', value:'不涉及用户隐私',
label:'不涉及用户隐私' label:'不涉及用户隐私'
@@ -43,4 +44,4 @@ export const confidentialLevelOptions = new Esenum([
value:'用户敏感信息', value:'用户敏感信息',
label:'用户敏感信息' label:'用户敏感信息'
} }
]) ]
+22 -23
View File
@@ -180,23 +180,22 @@
<!-- </div>--> <!-- </div>-->
</template> </template>
</vxe-column> </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>
<vxe-column show-overflow show-header-overflow field="year" title="报告评级"> <vxe-column show-overflow show-header-overflow field="rating" title="报告评级">
<template #default="{row}"> <template #default="{row}">
<el-rate <el-rate
v-model="value" v-model="row.rating/2"
disabled disabled
show-score
text-color="#ff9900" text-color="#ff9900"
score-template="{value}"> >
</el-rate> </el-rate>
</template> </template>
</vxe-column> </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="year" title="点击率"></vxe-column> <vxe-column show-overflow show-header-overflow field="clicks" title="点击率"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" 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="year" title="上传人"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right"> <vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
@@ -343,24 +342,24 @@ export default {
}) })
}, },
permissionApp() { permissionApp() {
// if(this.checkList.length <1){ if(this.checkList.length <1){
// this.$message.warning("至少选择一条报告进行权限申请") this.$message.warning("至少选择一条报告进行权限申请")
// return return
// } }
// // 有预览权限的时候是否还让继续申请 // 有预览权限的时候是否还让继续申请
// let temp=this.checkList.filter(item =>{ let temp=this.checkList.filter(item =>{
// if(+item.power == 1 || +item.power == 2){ if(+item.power == 1 || +item.power == 2){
// return item.name return item.name
// } }
// }) })
// if(temp.length>0) { if(temp.length>0) {
// this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!") this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!")
// return return
// } }
this.$router.push({ this.$router.push({
path: '/permission/launch', path: '/permission/launch',
query: {id: 'AEHJB8YNJ3', isBegin: 1} query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:this.checkIds.join(',')}
}) })
}, },
init() { init() {
@@ -19,18 +19,6 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </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-row :gutter="24">
<el-col :span="24"> <el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item"> <el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
@@ -44,6 +32,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-row :gutter="24">-->
<!-- <el-col :span="24">--> <!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"--> <!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
@@ -63,12 +62,18 @@
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import processFooter from '@/components/ProcessFooter'
export default { export default {
name: 'AuditOperation', name: 'AuditOperation',
components:{
processFooter,
},
props: { props: {
isDisable:{ isDisable:{
type:Boolean, type:Boolean,
@@ -76,11 +81,32 @@ export default {
}, },
examine:{ examine:{
type:Object type:Object
},
taskId:{
type:String,
default:''
},
prcId:{
type:String,
default:''
},
prcType:{
type:Number,
default:''
} }
}, },
data () { data () {
return { return {
isBty:false,
isTy:false,
isNoAgree: true,
isAgree: true,
visibleTree: false,
isSubmit: false,
tranLoading: false,
isShowTran: true,
isShowSubmit: true,
examineForm: { examineForm: {
planReasonFile: '', planReasonFile: '',
oldName: '', oldName: '',
@@ -107,19 +133,40 @@ export default {
} }
}, },
methods: { 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 () { submit () {
this.isSubmit = false let v
this.$refs.examineForm.validate((valid) => { this.$refs.examineForm.validate((valid) => {
v=valid
if (valid) { if (valid) {
this.isSubmit = true
return true return true
} else { } else {
this.$message.warning('请检查表单是否填写正确') this.$message.warning('请检查表单是否填写正确')
return false return false
} }
}) })
return v
} }
} }
@@ -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> <template>
<div class="reportTable"> <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> <el-button v-if="!disabled" class="delbtn" size="small" @click="deleteAll">批量删除</el-button>
<div class="table"> <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"> ref="xTable" @checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<vxe-column type="checkbox" width="60"></vxe-column> <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="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="confidentialLevel" title="报告涉密等级"></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="privacyLevel" title="报告隐私等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="报告年份" width="200" ></vxe-column> <vxe-column show-overflow show-header-overflow field="oneApproveName" title="审批人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="department" title="报告部门"></vxe-column> <vxe-column show-overflow show-header-overflow field="twoApproveName" title="二级审批人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="涉密等级"></vxe-column> <vxe-column show-overflow show-header-overflow field="applyReason" title="申请原因"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" 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"> <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" class="del-btn" @click="reportDelete(row)">删除</el-button>
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>--> <!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
</template> </template>
</vxe-column> </vxe-column>
</vxe-table> </vxe-table>
<el-pagination <!-- <el-pagination-->
class="pagination" <!-- class="pagination"-->
@size-change="handleLogSizeChange" <!-- @size-change="handleLogSizeChange"-->
@current-change="handleLogCurrentChange" <!-- @current-change="handleLogCurrentChange"-->
:current-page="qLog.pageNo" <!-- :current-page="qLog.pageNo"-->
:page-sizes="[5, 10, 20]" <!-- :page-sizes="[5, 10, 20]"-->
:page-size="qLog.pageSize" <!-- :page-size="qLog.pageSize"-->
layout="total, sizes, prev, pager, next, jumper" <!-- layout="total, sizes, prev, pager, next, jumper"-->
:total="total"/> <!-- :total="total"/>-->
<reportDialog ref="reportDialog" :tagsForm="tagsForm" :alreadyData="value" @confirm="addReportList"></reportDialog> <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>
</div> </div>
</template> </template>
<script> <script>
import reportDialog from './reportDialog' import reportDrawer from './reportDrawer'
export default { export default {
name: 'reportTable', name: 'reportTable',
props: { props: {
@@ -50,10 +54,13 @@ export default {
} }
}, },
components: { components: {
reportDialog reportDrawer
}, },
data () { data () {
return { return {
form:{},
formIndex:0,
editDialog: false,
processTable: [], processTable: [],
total: 0, total: 0,
qLog: { qLog: {
@@ -62,50 +69,32 @@ export default {
}, },
copyTableData: [], copyTableData: [],
checkIds: [], 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: { watch: {
value () { value () {
this.qLog.pageSize = 10 // this.qLog.pageSize = 10
this.qLog.pageNo = 1 // this.qLog.pageNo = 1
this.total = this.value.length // this.total = this.value.length
this.processTable = this.value.slice(0, 9) // this.processTable = this.value.slice(0, 9)
this.pageChage(1) // this.pageChage(1)
this.processTable = this.value
} }
}, },
created () { created () {
// this.copyTableData = JSON.parse(JSON.stringify(this.tableData)) // this.copyTableData = JSON.parse(JSON.stringify(this.tableData))
}, },
methods: { 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) { addReportList (list) {
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$emit('updateTable', [...this.value , ...list]) this.$emit('updateTable', [...this.value , ...list])
+63 -54
View File
@@ -7,56 +7,78 @@
<process-header v-else :title="'已办流程'" :proceesNum="prcNum"></process-header> <process-header v-else :title="'已办流程'" :proceesNum="prcNum"></process-header>
<div class="procedure"> <div class="procedure">
<div class="process_content"> <div class="process_content">
<span class="base_title">基础信息</span> <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>
<el-row> <el-row>
<el-form ref="form" :model="applicationForm" label-width="150px" <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"> :disabled="formControl">
<el-row> <el-row>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="申请原因:" prop="applyReason"> <el-form-item label="上传人:" prop="applyReason">
<el-input type="textarea" v-model="applicationForm.applyReason" placeholder="请输入申请原因"></el-input> <el-input v-model="applicationForm.applyReason" placeholder="请输入申请原因"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="power"> </el-row>
<el-select v-model="applicationForm.power" placeholder="请选择申请权限"> <el-row>
<el-option <el-col :span="24">
v-for="item in PERMISSION" <el-form-item label="内容摘要:" prop="mainContent">
:key="item.value" <el-input v-model="applicationForm.mainContent" placeholder="请输入申请原因"></el-input>
:label="item.label"
:value="item.value"> </el-form-item>
</el-option> </el-col>
</el-select> </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-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-row> </el-row>
</div> </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"> <div class="process_content">
<span class="base_title">审批历史</span> <span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history> <process-approval-history :prcNum="prcNum"></process-approval-history>
</div> </div>
<!-- v-if="$route.query.type !=='yiban'"--> <!-- 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> </div>
<process-footer <process-footer
v-if="!disabled" v-if="!disabled"
@@ -105,25 +127,9 @@ export default {
}, },
data () { data () {
return { return {
applicationFormRule: { applicationForm2:{
applyReason: [{ power:'',
max: 500, message: '申请原因最多填写500字符' applyReason:''
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
processFormRule: {
prcName: [{
required: true,
message: '请输入流程名称',
trigger: 'change'
},{
max: 100,
message: '申请原因最多填写100字符',
trigger: 'change'
}]
}, },
processForm: { prcName : ''}, processForm: { prcName : ''},
visibleTree: false, visibleTree: false,
@@ -164,9 +170,12 @@ export default {
} }
this.getProcessDetail(params).then(res=>{ this.getProcessDetail(params).then(res=>{
this.tableData = JSON.parse(this.processOld.dataJson) this.tableData = JSON.parse(this.processOld.dataJson)
this.$set(this.applicationForm,'power',this.tableData[0].power) this.$set(this.applicationForm2,'power',this.tableData.power)
this.$set(this.applicationForm,'applyReason',this.tableData[0].applyReason) 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.disabled=false
this.formControl= true this.formControl= true
if(this.$route.query.type=='yiban'){ if(this.$route.query.type=='yiban'){
+71 -236
View File
@@ -1,3 +1,5 @@
<script src="../../utils/Enum/index.js"></script>
<script src="../../utils/Enum/enum.js"></script>
<template> <template>
<div class="process"> <div class="process">
<div class="process_box"> <div class="process_box">
@@ -7,82 +9,17 @@
<div class="procedure"> <div class="procedure">
<div class="process_content"> <div class="process_content">
<span class="base_title">基础信息</span> <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> <el-row>
<report-table v-model="tableData" @updateTable="getV" :disabled="showTableD"></report-table> <report-table v-model="tableData" @updateTable="getV" :disabled="showTableD"></report-table>
</el-row> </el-row>
<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> </el-row>
</div> </div>
<div class="process_content" v-if="initShow"> <div class="process_content" v-if="initShow">
<span class="base_title">审批历史</span> <span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history> <process-approval-history :prcNum="prcNum"></process-approval-history>
</div> </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> </div>
<process-footer <process-footer
v-if="!formControl" v-if="!formControl"
@@ -94,10 +31,7 @@
@save="handleSave" @save="handleSave"
@submit="handleSubmit" @submit="handleSubmit"
></process-footer> ></process-footer>
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
</div> </div>
</div> </div>
</template> </template>
@@ -107,8 +41,8 @@ import processHeader from '@/components/ProcessHeader'
import processFooter from '@/components/ProcessFooter' import processFooter from '@/components/ProcessFooter'
import processApprovalHistory from '@/components/ProcessApprovalHistory' import processApprovalHistory from '@/components/ProcessApprovalHistory'
import reportTable from './components/reportTable' import reportTable from './components/reportTable'
import {PERMISSION} from '@/utils/Enum/enum'
import orgTable from '../../components/OrgTable'
import processMixin from "../../components/ProcessMixin"; import processMixin from "../../components/ProcessMixin";
export default { export default {
@@ -118,7 +52,6 @@ export default {
reportTable, reportTable,
processFooter, processFooter,
processApprovalHistory, processApprovalHistory,
orgTable
}, },
mixins: [processMixin], mixins: [processMixin],
data() { data() {
@@ -135,7 +68,6 @@ export default {
isShowSave: false, isShowSave: false,
isShowSubmit: true, isShowSubmit: true,
formControl: false, formControl: false,
formControlname: false,
assignForm: { assignForm: {
oneApprove: '', oneApprove: '',
twoApprove: '', twoApprove: '',
@@ -152,7 +84,6 @@ export default {
pageSize: 10000, pageSize: 10000,
pageNo: 1 pageNo: 1
}, },
PERMISSION,
processForm: { processForm: {
prcName: '' prcName: ''
}, },
@@ -167,43 +98,27 @@ export default {
trigger: 'change' trigger: 'change'
}] }]
}, },
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
assignFormRules: { assignFormRules: {
oneApprove: [{
required: true,
message: '请选择一级审批人员',
trigger: 'change'
}],
twoApprove: [{
required: true,
message: '请选择二级审批人员',
trigger: 'change'
}],
remark: [{ remark: [{
max: 500, message: '说明最多填写500字符' max: 500, message: '说明最多填写500字符'
}] }]
}, },
prcType: 1, prcType: 1,
prcName:'' prcName:'',
params:[] //处理好格式的数据
} }
}, },
async created() { async created() {
// 第一次进入此页面 需要清楚校验 // 第一次进入此页面 需要清楚校验
if (this.$route.query.isBegin) { if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) { // if (this.$route.query.ids.split(',').length > 0) {
// this.reportList(this.$route.query.ids) this.reportList(this.$route.query.ids)
// } // }
this.isShowSave = true this.isShowSave = true
this.$store.commit('setHandleProcess','') this.$store.commit('setHandleProcess','')
this.handleReset()
} }
// 如果是从草稿进入的 // 如果是从草稿进入的
if (this.$route.query.isDraft) { if (this.$route.query.isDraft) {
@@ -213,26 +128,8 @@ export default {
this.prcId = this.$store.getters.handleProcess?.prcId this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName this.prcName = this.$store.getters.handleProcess?.prcName
this.getDraftDetail().then(res => { 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) let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason // this.applicationForm.applyReason = applyReason.applyReason
this.tableData = JSON.parse(this.processOld.dataJson) 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') { if (this.$route.query.type == 'yiban') {
this.taskId = this.$store.getters.handleProcess.taskId this.taskId = this.$store.getters.handleProcess.taskId
@@ -282,23 +158,13 @@ export default {
this.showTableD = true this.showTableD = true
this.$set(this.processForm,'prcName', this.prcName) this.$set(this.processForm,'prcName', this.prcName)
this.getProcessDetail().then((res) => { 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: { methods: {
getV(newValue,jiaVlue) getV(newValue,jiaVlue)
{ {
debugger
if(jiaVlue &&jiaVlue.length > 0){ if(jiaVlue &&jiaVlue.length > 0){
jiaVlue.forEach(item=>{ jiaVlue.forEach(item=>{
this.delData.push({ 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) { reportList(ids) {
this.$api.permissionProcess.getReportLisy({ this.$api.permissionProcess.getReportLisy({
@@ -375,32 +206,54 @@ export default {
}) })
}, },
handleReset() { handleReset() {
this.processForm.prcName = ''
if(this.$route.query.taskDefinitionKey == 'reEdit'){ if(this.$route.query.taskDefinitionKey == 'reEdit'){
this.processForm.prcName = this.prcName this.processForm.prcName = this.prcName
} }
this.applicationForm = { },
applyReason: '', //判断表格数据是否完整
power: '' JuggleTableAll(){
let list= this.tableData.filter(item=>{
if(!item.twoApprove || item.twoApprove=='' || item.power==''){
return item
} }
this.assignForm = {
oneApprove: '',
twoApprove: ''
}
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
}) })
if(list.length>0){
return false
}
return true
}, },
// 整理数据 // 整理数据
organizeData() { organizeData() {
let userId = this.$store.getters.userInfo.usid let newParams=[]
this.tableData = this.tableData.map(item => {
item = {...item, ...this.applicationForm, userId: userId} newParams=this.tableData.map(item=>{
return 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(){ handleSave(){
@@ -440,11 +293,7 @@ export default {
}, },
// 提交 // 提交
handleSubmit() { 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 // 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
// 表格数据没有不能提交 需要提示 // 表格数据没有不能提交 需要提示
if (this.tableData.length == 0) { if (this.tableData.length == 0) {
@@ -456,10 +305,10 @@ export default {
//如果不是第一次 //如果不是第一次
if (this.initShow) { if (this.initShow) {
let flag=await this.JuggleSub(this.taskId) let flag= this.JuggleSub(this.taskId)
if(flag){ if(flag){
console.log(this.delData,"flagflagflagflag") console.log(this.delData,"flagflagflagflag")
debugger
if(this.delData){ if(this.delData){
this.delDatas().then(()=>{ this.delDatas().then(()=>{
this.organizeData() this.organizeData()
@@ -488,18 +337,19 @@ export default {
} }
} else { } else {
this.isSendDraft().then(()=>{ if(this.JuggleTableAll()){
this.organizeData() this.organizeData()
this.startProcess() this.startProcess()
})
}
}
}else{ }else{
this.$message.warning('请检查表单填写完整') this.$message.warning("请把表格数据填写完整")
} }
}) // this.isSendDraft().then(()=>{
})
}) // })
}
}
}, },
//修改参数 //修改参数
changeParam() { changeParam() {
@@ -524,24 +374,9 @@ export default {
}, },
startProcess() { startProcess() {
//把表单都整合到form中 //把表单都整合到form中
// dataJson与submitJson需要发到completeProcess
let form = {} this.$api.process.startProcessALL(this.params).then(({data}) => {
form = { this.completeProcessALL(this.params)
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})
}) })
}, },
//获取流程详细信息 //获取流程详细信息
@@ -134,11 +134,11 @@ export default {
}, },
methods: { methods: {
handleTransfer(){ handleTransfer(){
debugger
this.$emit('handleTransfer') this.$emit('handleTransfer')
}, },
handleSubmit(type) { handleSubmit(type) {
debugger
if(type=='n'){ if(type=='n'){
// 校验原因是否填写 // 校验原因是否填写
this.examineForm.flag=2 this.examineForm.flag=2
@@ -265,15 +265,36 @@ export default {
this.tags=JSON.parse(this.processForm.keyContent) this.tags=JSON.parse(this.processForm.keyContent)
} }
if(this.processForm.labelList && typeof this.processForm.labelList[0]=='string'){ if(this.processForm.labelList && typeof this.processForm.labelList[0]=='string'){
this.form.labelList= this.processForm.labelList.map(item=>{ this.form.labelList.map(item=>{
return JSON.parse(item) return this.getParentsById(cascaderOptions,item)
}) })
} }
} }
}, },
methods: { 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){ downFile(id){
if(this.formControl) return if(this.formControl) return
this.$api.report.reportDownload({reportId:'',fileId:id}).then(res=>{ this.$api.report.reportDownload({reportId:'',fileId:id}).then(res=>{
@@ -293,7 +314,7 @@ export default {
parts.push(item.orgCode) parts.push(item.orgCode)
partsName.push(item.orgName) partsName.push(item.orgName)
}) })
debugger
this.qcrList = checkedList this.qcrList = checkedList
this.form.department = parts.toString() this.form.department = parts.toString()
this.form.departmentName = partsName.toString() this.form.departmentName = partsName.toString()
+1 -1
View File
@@ -93,7 +93,7 @@ export default {
} }
}, },
created () { created () {
debugger
this.taskId=this.$store.getters.handleProcess.taskId this.taskId=this.$store.getters.handleProcess.taskId
this.prcNum=this.$store.getters.handleProcess.prcNum this.prcNum=this.$store.getters.handleProcess.prcNum
this.prcId=this.$store.getters.handleProcess.prcId this.prcId=this.$store.getters.handleProcess.prcId
@@ -130,7 +130,7 @@ export default {
this.$store.commit('setHandleProcess',params) this.$store.commit('setHandleProcess',params)
switch (row.prcType) { switch (row.prcType) {
case '1' : case '1' :
debugger
if (row.taskDefinitionKey == 'reEdit') { if (row.taskDefinitionKey == 'reEdit') {
this.$router.push({ this.$router.push({
path: '/permission/launch', path: '/permission/launch',