2025-06-02 21:34:56 +08:00

2 lines
8.2 KiB
JavaScript

import{d as e}from"./finished-BsiARIvQ.js";import{s as l,m as a}from"./process-B2SNzl0p.js";import{l as t}from"./definition-DXmD8XrJ.js";import{_ as n,j as o,H as i,c as s,o as r,F as d,e as u,R as m,w as p,l as c,m as h,h as y,B as g,i as f}from"./index-C-c3zR6K.js";const P={class:"app-container"},w={key:0};const b=n({name:"Deploy",components:{},data:()=>({loading:!0,processLoading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,processTotal:0,myProcessList:[],title:"",open:!1,src:"",definitionList:[],queryParams:{pageNum:1,pageSize:10,name:null,category:null,key:null,tenantId:null,deployTime:null,derivedFrom:null,derivedFromRoot:null,parentDeploymentId:null,engineVersion:null},queryProcessParams:{pageNum:1,pageSize:10,name:null,category:null,key:null,tenantId:null,deployTime:null,derivedFrom:null,derivedFromRoot:null,parentDeploymentId:null,engineVersion:null},form:{},rules:{}}),created(){this.getList()},methods:{getList(){this.loading=!0,a(this.queryParams).then((e=>{this.myProcessList=e.rows,this.total=e.total,this.loading=!1}))},cancel(){this.open=!1,this.reset()},reset(){this.form={id:null,name:null,category:null,key:null,tenantId:null,deployTime:null,derivedFrom:null,derivedFromRoot:null,parentDeploymentId:null,engineVersion:null},this.resetForm("form")},handleQuery(){this.queryParams.pageNum=1,this.getList()},resetQuery(){this.resetForm("queryForm"),this.handleQuery()},handleProcessQuery(){this.queryProcessParams.pageNum=1,this.listDefinition()},resetProcessQuery(){this.resetForm("queryProcessForm"),this.handleProcessQuery()},handleSelectionChange(e){this.ids=e.map((e=>e.procInsId)),this.single=1!==e.length,this.multiple=!e.length},handleAdd(){this.open=!0,this.title="发起流程",this.listDefinition()},listDefinition(){t(this.queryProcessParams).then((e=>{this.definitionList=e.rows,this.processTotal=e.total,this.processLoading=!1}))},handleStartProcess(e){this.$router.push({path:"/flowable/task/myProcess/send/index",query:{deployId:e.deploymentId,procDefId:e.id}})},handleStop(e){const a={instanceId:e.procInsId};l(a).then((e=>{this.$modal.msgSuccess(e.msg),this.getList()}))},handleFlowRecord(e){this.$router.push({path:"/flowable/task/myProcess/detail/index",query:{procInsId:e.procInsId,deployId:e.deployId,taskId:e.taskId}})},handleDelete(l){const a=l.procInsId||this.ids;this.$confirm('是否确认删除流程定义编号为"'+a+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>e(a))).then((()=>{this.getList(),this.$modal.msgSuccess("删除成功")}))}}},[["render",function(e,l,a,t,n,b){const k=o("el-input"),_=o("el-form-item"),I=o("el-date-picker"),q=o("el-button"),C=o("el-form"),S=o("el-col"),v=o("right-toolbar"),T=o("el-row"),F=o("el-table-column"),L=o("el-tag"),V=o("el-table"),D=o("pagination"),Q=o("el-dialog"),x=i("hasPermi"),z=i("loading");return r(),s("div",P,[d(u(C,{model:n.queryParams,ref:"queryForm",inline:!0,"label-width":"68px"},{default:p((()=>[u(_,{label:"名称",prop:"name"},{default:p((()=>[u(k,{modelValue:n.queryParams.name,"onUpdate:modelValue":l[0]||(l[0]=e=>n.queryParams.name=e),placeholder:"请输入名称",clearable:"",onKeyup:c(b.handleQuery,["enter","native"])},null,8,["modelValue","onKeyup"])])),_:1}),u(_,{label:"开始时间",prop:"deployTime"},{default:p((()=>[u(I,{clearable:"",modelValue:n.queryParams.deployTime,"onUpdate:modelValue":l[1]||(l[1]=e=>n.queryParams.deployTime=e),type:"date","value-format":"yyyy-MM-dd",placeholder:"选择时间"},null,8,["modelValue"])])),_:1}),u(_,null,{default:p((()=>[u(q,{type:"primary",icon:"search",onClick:b.handleQuery},{default:p((()=>l[4]||(l[4]=[h("搜索")]))),_:1},8,["onClick"]),u(q,{icon:"refresh",onClick:b.resetQuery},{default:p((()=>l[5]||(l[5]=[h("重置")]))),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"]),[[m,n.showSearch]]),u(T,{gutter:10,class:"mb8"},{default:p((()=>[u(S,{span:1.5},{default:p((()=>[d((r(),y(q,{type:"primary",plain:"",icon:"plus",onClick:b.handleAdd},{default:p((()=>l[6]||(l[6]=[h("新增流程")]))),_:1},8,["onClick"])),[[x,["system:deployment:add"]]])])),_:1}),u(S,{span:1.5},{default:p((()=>[d((r(),y(q,{type:"danger",plain:"",icon:"delete",disabled:n.multiple,onClick:b.handleDelete},{default:p((()=>l[7]||(l[7]=[h("删除")]))),_:1},8,["disabled","onClick"])),[[x,["system:deployment:remove"]]])])),_:1}),u(v,{showSearch:n.showSearch,onQueryTable:b.getList},null,8,["showSearch","onQueryTable"])])),_:1}),d((r(),y(V,{data:n.myProcessList,border:"",onSelectionChange:b.handleSelectionChange},{default:p((()=>[u(F,{type:"selection",width:"55",align:"center"}),u(F,{label:"流程编号",align:"center",prop:"procInsId","show-overflow-tooltip":!0}),u(F,{label:"流程名称",align:"center",prop:"procDefName","show-overflow-tooltip":!0}),u(F,{label:"流程类别",align:"center",prop:"category",width:"100px"}),u(F,{label:"流程版本",align:"center",width:"80px"},{default:p((e=>[u(L,{size:"default"},{default:p((()=>[h("v"+g(e.row.procDefVersion),1)])),_:2},1024)])),_:1}),u(F,{label:"提交时间",align:"center",prop:"createTime",width:"180"}),u(F,{label:"流程状态",align:"center",width:"100"},{default:p((e=>[null==e.row.finishTime?(r(),y(L,{key:0,size:"small"},{default:p((()=>l[8]||(l[8]=[h("进行中")]))),_:1})):f("",!0),null!=e.row.finishTime?(r(),y(L,{key:1,type:"success",size:"small"},{default:p((()=>l[9]||(l[9]=[h("已完成")]))),_:1})):f("",!0)])),_:1}),u(F,{label:"耗时",align:"center",prop:"duration",width:"180"}),u(F,{label:"当前节点",align:"center",prop:"taskName"}),u(F,{label:"办理人",align:"center"},{default:p((e=>[e.row.assigneeName?(r(),s("label",w,[h(g(e.row.assigneeName)+" ",1),u(L,{type:"info",size:"small"},{default:p((()=>[h(g(e.row.assigneeDeptName),1)])),_:2},1024)])):f("",!0)])),_:1}),u(F,{label:"操作",width:"150",fixed:"right","class-name":"small-padding fixed-width"},{default:p((e=>[u(q,{onClick:l=>b.handleFlowRecord(e.row),type:"primary",link:""},{default:p((()=>l[10]||(l[10]=[h("详情")]))),_:2},1032,["onClick"]),u(q,{onClick:l=>b.handleStop(e.row),type:"primary",link:""},{default:p((()=>l[11]||(l[11]=[h("取消申请")]))),_:2},1032,["onClick"]),d((r(),y(q,{onClick:l=>b.handleDelete(e.row),type:"primary",link:""},{default:p((()=>l[12]||(l[12]=[h("删除")]))),_:2},1032,["onClick"])),[[x,["system:deployment:remove"]]])])),_:1})])),_:1},8,["data","onSelectionChange"])),[[z,n.loading]]),d(u(D,{total:n.total,page:n.queryParams.pageNum,limit:n.queryParams.pageSize,onPagination:b.getList},null,8,["total","page","limit","onPagination"]),[[m,n.total>0]]),u(Q,{title:n.title,modelValue:n.open,"onUpdate:modelValue":l[3]||(l[3]=e=>n.open=e),width:"60%","append-to-body":""},{default:p((()=>[d(u(C,{model:n.queryProcessParams,ref:"queryProcessForm",inline:!0,"label-width":"68px"},{default:p((()=>[u(_,{label:"名称",prop:"name"},{default:p((()=>[u(k,{modelValue:n.queryProcessParams.name,"onUpdate:modelValue":l[2]||(l[2]=e=>n.queryProcessParams.name=e),placeholder:"请输入名称",clearable:"",size:"small",onKeyup:c(b.handleQuery,["enter","native"])},null,8,["modelValue","onKeyup"])])),_:1}),u(_,null,{default:p((()=>[u(q,{type:"primary",icon:"search",size:"small",onClick:b.handleProcessQuery},{default:p((()=>l[13]||(l[13]=[h("搜索")]))),_:1},8,["onClick"]),u(q,{icon:"refresh",size:"small",onClick:b.resetProcessQuery},{default:p((()=>l[14]||(l[14]=[h("重置")]))),_:1},8,["onClick"])])),_:1})])),_:1},8,["model"]),[[m,n.showSearch]]),d((r(),y(V,{fit:"",data:n.definitionList,border:""},{default:p((()=>[u(F,{label:"流程名称",align:"center",prop:"name"}),u(F,{label:"流程版本",align:"center"},{default:p((e=>[u(L,{size:"default"},{default:p((()=>[h("v"+g(e.row.version),1)])),_:2},1024)])),_:1}),u(F,{label:"流程分类",align:"center",prop:"category"}),u(F,{label:"操作",align:"center",width:"300","class-name":"small-padding fixed-width"},{default:p((e=>[u(q,{type:"primary",link:"",icon:"edit",onClick:l=>b.handleStartProcess(e.row)},{default:p((()=>l[15]||(l[15]=[h("发起流程")]))),_:2},1032,["onClick"])])),_:1})])),_:1},8,["data"])),[[z,n.processLoading]]),d(u(D,{total:n.processTotal,page:n.queryProcessParams.pageNum,limit:n.queryProcessParams.pageSize,onPagination:b.listDefinition},null,8,["total","page","limit","onPagination"]),[[m,n.processTotal>0]])])),_:1},8,["title","modelValue"])])}]]);export{b as default};