256 lines
8.9 KiB
Vue
256 lines
8.9 KiB
Vue
<script src="../../api/modules/process.js"></script>
|
|
<template>
|
|
<!-- 此页面主要展示审核和已完成-->
|
|
<div class="process">
|
|
<div class="process_box">
|
|
<process-header v-if="$route.query.type !== 'yiban'" :title="'权限审批'" :proceesNum="prcNum"></process-header>
|
|
<process-header v-else :title="'已办流程'" :proceesNum="prcNum"></process-header>
|
|
<div class="procedure">
|
|
<div class="process_content">
|
|
<span class="base_title">报告基本信息</span>
|
|
<el-row>
|
|
<el-form ref="form" :model="applicationForm" 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" placeholder="请输入申请原因"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
</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>
|
|
<process-footer
|
|
v-if="!disabled"
|
|
showCancel
|
|
:show-transfer="isShowTran"
|
|
:show-submit="isShowSubmit"
|
|
:submitLoading="isSubmit"
|
|
:TransferLoading="tranLoading"
|
|
@transfer="handleTransfer"
|
|
@submit="handleSubmit"
|
|
></process-footer>
|
|
<!-- <process-choose-tree-->
|
|
<!-- dialog-model-->
|
|
<!-- :visible.sync="visibleTree"-->
|
|
<!-- :maxSelected="1"-->
|
|
<!-- :config="{value: '',valueName:''}"-->
|
|
<!-- @confirm="handleDblClick"-->
|
|
<!-- ></process-choose-tree>-->
|
|
<processChooseTree :visible.sync="visibleTree" title="人员列表" dialog-model :config="{
|
|
value: '',
|
|
valueName: ''
|
|
}" :workNumFlag="true" :maxSelected="1" @confirm="handleDblClick"></processChooseTree>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import processHeader from '@/components/ProcessHeader'
|
|
import processFooter from '@/components/ProcessFooter'
|
|
import processChooseTree from '../../components/OrgTable'
|
|
import processApprovalHistory from '@/components/ProcessApprovalHistory'
|
|
import auditOperation from './components/AuditOperation'
|
|
import reportTable from './components/reportTable'
|
|
import { PERMISSION } from '@/utils/Enum/enum'
|
|
import processMixin from "../../components/ProcessMixin";
|
|
export default {
|
|
name: 'launch',
|
|
mixins: [processMixin],
|
|
components: {
|
|
processHeader,
|
|
reportTable,
|
|
processFooter,
|
|
processApprovalHistory,
|
|
auditOperation,
|
|
processChooseTree
|
|
},
|
|
data () {
|
|
return {
|
|
applicationForm2:{
|
|
power:'',
|
|
applyReason:''
|
|
},
|
|
processForm: { prcName : ''},
|
|
visibleTree: false,
|
|
isSubmit: false,
|
|
tranLoading: false,
|
|
isShowTran: true,
|
|
isShowSubmit: true,
|
|
formControl: true,
|
|
disabled:false,
|
|
assignForm: {},
|
|
tableData: [],
|
|
applicationForm: {
|
|
power:'',
|
|
applyReason:''
|
|
},
|
|
q: {
|
|
pageSize: 10000,
|
|
pageNo: 1
|
|
},
|
|
PERMISSION,
|
|
submitjson:{},
|
|
prcType:1
|
|
}
|
|
},
|
|
created () {
|
|
this.taskId=this.$store.getters.handleProcess.taskId
|
|
this.prcNum=this.$store.getters.handleProcess.prcNum
|
|
this.prcId=this.$store.getters.handleProcess.prcId
|
|
this.prcName=this.$store.getters.handleProcess.prcName
|
|
this.$set(this.processForm,'prcName',this.prcName)
|
|
|
|
let params={
|
|
prcId: this.prcId,
|
|
prcType: this.prcType
|
|
}
|
|
if(this.$route.query.type=='yiban'){
|
|
this.disabled=true
|
|
}
|
|
this.getProcessDetail(params).then(res=>{
|
|
this.tableData = JSON.parse(this.processOld.dataJson)
|
|
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'){
|
|
this.disabled=true
|
|
// this.submitjson=JSON.parse(res.processOld.submitJson)
|
|
}else{
|
|
|
|
}
|
|
})
|
|
|
|
|
|
},
|
|
methods: {
|
|
// 获取表格列表 吧查询到的值传给子组件
|
|
reportList(ids) {
|
|
this.$api.report.reportList({id: ids}).then(({data}) => {
|
|
this.tableData = data.records
|
|
})
|
|
},
|
|
// 转办
|
|
handleTransfer() {
|
|
this.visibleTree = true
|
|
},
|
|
// 选择转办
|
|
handleDblClick(treeNode) {
|
|
this.JuggleSub(this.taskId).then(res=> {
|
|
if(res){
|
|
if( treeNode[0].USID == this.$store.getters.userInfo.usid){
|
|
this.$message.warning("您不能转办给自己")
|
|
}else{
|
|
this.$api.process.changeAssignee({
|
|
taskId: this.taskId,
|
|
assignee: treeNode[0].USID,
|
|
userId: this.$store.getters.userInfo.usid,
|
|
pId: this.prcId
|
|
}).then(() => {
|
|
this.$message.success('转办成功')
|
|
this.$router.push({path: '/userCenter/processCenter', query: {id: this.$route.query.id}})
|
|
this.visibleTree = false
|
|
})
|
|
}
|
|
}
|
|
})
|
|
// taskId: this.$store.getters.getHandleInfo.taskId, // 任务id
|
|
// assignee: treeNode[0].userId, // 转办人
|
|
// userId: this.$store.getters.userInfo.userId, // dangqian人
|
|
// pId: this.$store.getters.getHandleInfo.prcId // 流程实例
|
|
|
|
|
|
},
|
|
handleSubmit() {
|
|
this.JuggleSub(this.taskId).then(res=> {
|
|
if(res){
|
|
let submit = JSON.parse(this.processOld.submitJson)
|
|
let dataJson = this.processOld.dataJson
|
|
let submitJson = JSON.stringify({...submit, ...this.$refs.operationRef.examineForm})
|
|
this.completeProcess({
|
|
dataJson,
|
|
submitJson,
|
|
taskId: this.taskId,
|
|
userId: this.$store.getters.userInfo.usid,
|
|
prcType: this.prcType
|
|
})
|
|
}
|
|
})
|
|
// if (this.$refs.operationRef.submit()) {
|
|
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|