mirror of
https://gitee.com/myxzgzs/boyue-kfcode-hasfj.git
synced 2025-06-21 18:09:36 +08:00
2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
import{f as A}from"./finished-5kawINlN.js";import{F as E,a as H}from"./index-CSt_GYBb.js";import{f as z}from"./definition-CHRXcxuP.js";import{a as G,c as V,d as P,r as X,b as M,e as Q,f as W}from"./todo-DB3o-Pr4.js";import{B as Y}from"./index-CTXhDomq.js";import"./vue-treeselect-DSnm48_Q.js";import{_ as Z,c as T,e as l,w as t,j as n,f as m,m as r,I as C,J as R,h as f,i as k,B as c,o as u}from"./index-CrAWI0wi.js";import"./user-Bxl06CMk.js";import"./StrUtil-DZsLURBF.js";import"./role-pNEACQin.js";const $={name:"Record",components:{BpmnViewer:Y,FlowUser:H,FlowRole:E},props:{},data(){return{eventName:"click",flowData:{},activeName:"1",loading:!0,flowRecordList:[],rules:{},taskForm:{returnTaskShow:!1,delegateTaskShow:!1,defaultTaskShow:!0,comment:"",procInsId:"",instanceId:"",deployId:"",taskId:"",procDefId:"",targetKey:"",variables:{}},returnTaskList:[],completeTitle:null,completeOpen:!1,returnTitle:null,returnOpen:!1,rejectOpen:!1,rejectTitle:null,checkSendUser:!1,checkSendRole:!1,checkType:"single",taskName:null,startUser:null,multiInstanceVars:"",formJson:{}}},created(){this.$route.query&&(this.taskName=this.$route.query.taskName,this.startUser=this.$route.query.startUser,this.taskForm.deployId=this.$route.query.deployId,this.taskForm.taskId=this.$route.query.taskId,this.taskForm.procInsId=this.$route.query.procInsId,this.taskForm.executionId=this.$route.query.executionId,this.taskForm.instanceId=this.$route.query.procInsId,this.taskForm.taskId&&this.getFlowTaskForm(this.taskForm.taskId),this.getFlowRecordList(this.taskForm.procInsId,this.taskForm.deployId))},methods:{handleClick(s,e){s.index==="2"&&z({procInsId:this.taskForm.procInsId,deployId:this.taskForm.deployId}).then(i=>{this.flowData=i.data})},setIcon(s){return s?"el-icon-check":"el-icon-time"},setColor(s){return s?"#2bc418":"#b3bdbb"},handleUserSelect(s){if(s)if(s instanceof Array){const e=s.map(i=>i.userId.toString());this.multiInstanceVars?this.taskForm.variables[this.multiInstanceVars]=e:this.taskForm.variables.approval=e.join(",")}else this.taskForm.variables.approval=s.userId.toString()},handleRoleSelect(s,e){if(s)if(s instanceof Array){const i=s.map(h=>h.roleId.toString());this.taskForm.variables.approval=i.join(",")}else this.taskForm.variables.approval=s},getFlowRecordList(s,e){const i=this;A({procInsId:s,deployId:e}).then(a=>{i.flowRecordList=a.data.flowList}).catch(a=>{this.goBack()})},getFlowTaskForm(s){s&&W({taskId:s}).then(e=>{this.$refs.vFormRef.setFormJson(e.data.formJson),this.formJson=e.data.formJson,this.$nextTick(()=>{this.$refs.vFormRef.setFormData(e.data)})})},handleDelegate(){this.taskForm.delegateTaskShow=!0,this.taskForm.defaultTaskShow=!1},handleAssign(){},goBack(){const s={path:"/task/todo",query:{t:Date.now()}};this.$tab.closeOpenPage(s)},handleReject(){this.rejectOpen=!0,this.rejectTitle="驳回流程"},taskReject(){this.$refs.taskForm.validate(s=>{s&&Q(this.taskForm).then(e=>{this.$modal.msgSuccess(e.msg),this.goBack()})})},handleReturn(){this.returnOpen=!0,this.returnTitle="退回流程",M(this.taskForm).then(s=>{this.returnTaskList=s.data})},taskReturn(){this.$refs.taskForm.validate(s=>{s&&X(this.taskForm).then(e=>{this.$modal.msgSuccess(e.msg),this.goBack()})})},cancelTask(){this.taskForm.returnTaskShow=!1,this.taskForm.defaultTaskShow=!0,this.returnTaskList=[]},submitDeleteTask(){this.$refs.taskForm.validate(s=>{s&&P(this.taskForm).then(e=>{this.$modal.msgSuccess(e.msg),this.goBack()})})},cancelDelegateTask(){this.taskForm.delegateTaskShow=!1,this.taskForm.defaultTaskShow=!0,this.returnTaskList=[]},handleComplete(){this.completeOpen=!0,this.completeTitle="流程审批",this.submitForm()},taskComplete(){if(!this.taskForm.variables&&this.checkSendUser){this.$modal.msgError("请选择流程接收人员!");return}if(!this.taskForm.variables&&this.checkSendRole){this.$modal.msgError("请选择流程接收角色组!");return}if(!this.taskForm.comment){this.$modal.msgError("请输入审批意见!");return}this.taskForm?V(this.taskForm).then(s=>{this.$modal.msgSuccess(s.msg),this.goBack()}):V(this.taskForm).then(s=>{this.$modal.msgSuccess(s.msg),this.goBack()})},submitForm(){const s={taskId:this.taskForm.taskId};G(s).then(e=>{this.$refs.vFormRef.getFormData().then(h=>{Object.assign(this.taskForm.variables,h),this.taskForm.variables.formJson=this.formJson,console.log(this.taskForm,"流程审批提交表单数据1")}).catch(h=>{});const i=e.data;i&&i.dataType==="dynamic"&&(i.type==="assignee"?(this.checkSendUser=!0,this.checkType="single"):i.type==="candidateUsers"?(this.checkSendUser=!0,this.checkType="multiple"):i.type==="candidateGroups"?this.checkSendRole=!0:(this.multiInstanceVars=i.vars,this.checkSendUser=!0,this.checkType="multiple"))})},handleButtonClick(s){this[s]()}}},ee={class:"app-container"},te={style:{display:"flex","justify-content":"center",gap:"10px","margin-top":"20px"}},le={class:"block"},se={style:{"font-weight":"700"}},oe={class:"dialog-footer"},ae={class:"dialog-footer"},re={class:"dialog-footer"};function ne(s,e,i,h,a,d){const _=n("el-tag"),p=n("el-button"),U=n("v-form-render"),v=n("el-col"),F=n("el-tab-pane"),g=n("el-descriptions-item"),x=n("el-descriptions"),S=n("el-card"),N=n("el-timeline-item"),j=n("el-timeline"),O=n("bpmn-viewer"),B=n("el-tabs"),D=n("flow-user"),L=n("flow-role"),y=n("el-form-item"),b=n("el-input"),I=n("el-form"),w=n("el-dialog"),q=n("el-radio-button"),J=n("el-radio-group");return u(),T("div",ee,[l(S,{class:"box-card"},{header:t(()=>[e[12]||(e[12]=m("span",{class:"el-icon-document"},"待办任务",-1)),l(_,{style:{"margin-left":"10px"}},{default:t(()=>[r("发起人:"+c(a.startUser),1)]),_:1}),l(_,null,{default:t(()=>[r("任务节点:"+c(a.taskName),1)]),_:1}),l(p,{style:{float:"right"},size:"small",type:"danger",onClick:d.goBack},{default:t(()=>e[11]||(e[11]=[r("关闭")])),_:1},8,["onClick"])]),default:t(()=>[l(B,{"tab-position":"top",modelValue:a.activeName,"onUpdate:modelValue":e[0]||(e[0]=o=>a.activeName=o),onTabClick:d.handleClick},{default:t(()=>[l(F,{label:"表单信息",name:"1"},{default:t(()=>[l(v,{span:16,offset:4},{default:t(()=>[l(U,{ref:"vFormRef"},null,512),m("div",te,[l(p,{type:"primary",onClick:d.handleComplete},{default:t(()=>e[13]||(e[13]=[r("审 批")])),_:1},8,["onClick"]),l(p,{type:"warning",onClick:d.handleReturn},{default:t(()=>e[14]||(e[14]=[r("退 回")])),_:1},8,["onClick"]),l(p,{type:"danger",onClick:d.handleReject},{default:t(()=>e[15]||(e[15]=[r("驳 回")])),_:1},8,["onClick"])])]),_:1})]),_:1}),l(F,{label:"流转记录",name:"2"},{default:t(()=>[l(v,{span:16,offset:4},{default:t(()=>[m("div",le,[l(j,null,{default:t(()=>[(u(!0),T(C,null,R(a.flowRecordList,(o,K)=>(u(),f(N,{key:K,icon:d.setIcon(o.finishTime),color:d.setColor(o.finishTime)},{default:t(()=>[m("p",se,c(o.taskName),1),l(S,{"body-style":{padding:"10px"}},{default:t(()=>[l(x,{class:"margin-top",column:1,size:"small",border:""},{default:t(()=>[o.assigneeName?(u(),f(g,{key:0,"label-class-name":"my-label"},{label:t(()=>e[16]||(e[16]=[m("i",{class:"el-icon-user"},null,-1),r("办理人")])),default:t(()=>[r(" "+c(o.assigneeName)+" ",1),l(_,{type:"info",size:"small"},{default:t(()=>[r(c(o.deptName),1)]),_:2},1024)]),_:2},1024)):k("",!0),o.candidate?(u(),f(g,{key:1,"label-class-name":"my-label"},{label:t(()=>e[17]||(e[17]=[m("i",{class:"el-icon-user"},null,-1),r("候选办理")])),default:t(()=>[r(" "+c(o.candidate),1)]),_:2},1024)):k("",!0),l(g,{"label-class-name":"my-label"},{label:t(()=>e[18]||(e[18]=[m("i",{class:"el-icon-date"},null,-1),r("接收时间")])),default:t(()=>[r(" "+c(o.createTime),1)]),_:2},1024),o.finishTime?(u(),f(g,{key:2,"label-class-name":"my-label"},{label:t(()=>e[19]||(e[19]=[m("i",{class:"el-icon-date"},null,-1),r("处理时间")])),default:t(()=>[r(" "+c(o.finishTime),1)]),_:2},1024)):k("",!0),o.duration?(u(),f(g,{key:3,"label-class-name":"my-label"},{label:t(()=>e[20]||(e[20]=[m("i",{class:"el-icon-time"},null,-1),r("耗时")])),default:t(()=>[r(" "+c(o.duration),1)]),_:2},1024)):k("",!0),o.comment?(u(),f(g,{key:4,"label-class-name":"my-label"},{label:t(()=>e[21]||(e[21]=[m("i",{class:"el-icon-tickets"},null,-1),r("处理意见")])),default:t(()=>[r(" "+c(o.comment.comment),1)]),_:2},1024)):k("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1032,["icon","color"]))),128))]),_:1})])]),_:1})]),_:1}),l(F,{label:"流程图",name:"3"},{default:t(()=>[l(O,{flowData:a.flowData,procInsId:a.taskForm.procInsId},null,8,["flowData","procInsId"])]),_:1})]),_:1},8,["modelValue","onTabClick"]),l(w,{title:a.completeTitle,modelValue:a.completeOpen,"onUpdate:modelValue":e[3]||(e[3]=o=>a.completeOpen=o),width:"60%","append-to-body":""},{footer:t(()=>[m("span",oe,[l(p,{onClick:e[2]||(e[2]=o=>a.completeOpen=!1)},{default:t(()=>e[22]||(e[22]=[r("取 消")])),_:1}),l(p,{type:"primary",onClick:d.taskComplete},{default:t(()=>e[23]||(e[23]=[r("确 定")])),_:1},8,["onClick"])])]),default:t(()=>[l(I,{ref:"taskForm",model:a.taskForm},{default:t(()=>[l(y,{prop:"targetKey"},{default:t(()=>[a.checkSendUser?(u(),f(D,{key:0,checkType:a.checkType,onHandleUserSelect:d.handleUserSelect},null,8,["checkType","onHandleUserSelect"])):k("",!0),a.checkSendRole?(u(),f(L,{key:1,onHandleRoleSelect:d.handleRoleSelect},null,8,["onHandleRoleSelect"])):k("",!0)]),_:1}),l(y,{label:"处理意见","label-width":"80px",prop:"comment",rules:[{required:!0,message:"请输入处理意见",trigger:"blur"}]},{default:t(()=>[l(b,{type:"textarea",modelValue:a.taskForm.comment,"onUpdate:modelValue":e[1]||(e[1]=o=>a.taskForm.comment=o),placeholder:"请输入处理意见"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),l(w,{title:a.returnTitle,modelValue:a.returnOpen,"onUpdate:modelValue":e[7]||(e[7]=o=>a.returnOpen=o),width:"40%","append-to-body":""},{footer:t(()=>[m("span",ae,[l(p,{onClick:e[6]||(e[6]=o=>a.returnOpen=!1)},{default:t(()=>e[24]||(e[24]=[r("取 消")])),_:1}),l(p,{type:"primary",onClick:d.taskReturn},{default:t(()=>e[25]||(e[25]=[r("确 定")])),_:1},8,["onClick"])])]),default:t(()=>[l(I,{ref:"taskForm",model:a.taskForm,"label-width":"80px"},{default:t(()=>[l(y,{label:"退回节点",prop:"targetKey"},{default:t(()=>[l(J,{modelValue:a.taskForm.targetKey,"onUpdate:modelValue":e[4]||(e[4]=o=>a.taskForm.targetKey=o)},{default:t(()=>[(u(!0),T(C,null,R(a.returnTaskList,o=>(u(),f(q,{key:o.id,label:o.id},{default:t(()=>[r(c(o.name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(y,{label:"退回意见",prop:"comment",rules:[{required:!0,message:"请输入意见",trigger:"blur"}]},{default:t(()=>[l(b,{style:{width:"50%"},type:"textarea",modelValue:a.taskForm.comment,"onUpdate:modelValue":e[5]||(e[5]=o=>a.taskForm.comment=o),placeholder:"请输入意见"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),l(w,{title:a.rejectTitle,modelValue:a.rejectOpen,"onUpdate:modelValue":e[10]||(e[10]=o=>a.rejectOpen=o),width:"40%","append-to-body":""},{footer:t(()=>[m("span",re,[l(p,{onClick:e[9]||(e[9]=o=>a.rejectOpen=!1)},{default:t(()=>e[26]||(e[26]=[r("取 消")])),_:1}),l(p,{type:"primary",onClick:d.taskReject},{default:t(()=>e[27]||(e[27]=[r("确 定")])),_:1},8,["onClick"])])]),default:t(()=>[l(I,{ref:"taskForm",model:a.taskForm,"label-width":"80px"},{default:t(()=>[l(y,{label:"驳回意见",prop:"comment",rules:[{required:!0,message:"请输入意见",trigger:"blur"}]},{default:t(()=>[l(b,{style:{width:"50%"},type:"textarea",modelValue:a.taskForm.comment,"onUpdate:modelValue":e[8]||(e[8]=o=>a.taskForm.comment=o),placeholder:"请输入意见"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["title","modelValue"])]),_:1})])}const ye=Z($,[["render",ne],["__scopeId","data-v-6572822c"]]);export{ye as default};
|