2 lines
8.1 KiB
JavaScript
Raw Normal View History

2025-05-29 15:03:59 +08:00
import{d as Q}from"./finished-5kawINlN.js";import{s as z,m as B}from"./process-DnLyt1wg.js";import{l as R}from"./definition-CHRXcxuP.js";import{_ as K,j as d,H as D,c as V,o as m,F as p,e,R as f,w as t,l as T,m as a,h as c,B as g,i as w}from"./index-CrAWI0wi.js";const U={name:"Deploy",components:{},data(){return{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,B(this.queryParams).then(r=>{this.myProcessList=r.rows,this.total=r.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(r){this.ids=r.map(l=>l.procInsId),this.single=r.length!==1,this.multiple=!r.length},handleAdd(){this.open=!0,this.title="发起流程",this.listDefinition()},listDefinition(){R(this.queryProcessParams).then(r=>{this.definitionList=r.rows,this.processTotal=r.total,this.processLoading=!1})},handleStartProcess(r){this.$router.push({path:"/flowable/task/myProcess/send/index",query:{deployId:r.deploymentId,procDefId:r.id}})},handleStop(r){const l={instanceId:r.procInsId};z(l).then(b=>{this.$modal.msgSuccess(b.msg),this.getList()})},handleFlowRecord(r){this.$router.push({path:"/flowable/task/myProcess/detail/index",query:{procInsId:r.procInsId,deployId:r.deployId,taskId:r.taskId}})},handleDelete(r){const l=r.procInsId||this.ids;this.$confirm('是否确认删除流程定义编号为"'+l+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>Q(l)).then(()=>{this.getList(),this.$modal.msgSuccess("删除成功")})}}},A={class:"app-container"},M={key:0};function j(r,l,b,E,n,i){const k=d("el-input"),y=d("el-form-item"),x=d("el-date-picker"),u=d("el-button"),v=d("el-form"),C=d("el-col"),L=d("right-toolbar"),F=d("el-row"),s=d("el-table-column"),h=d("el-tag"),I=d("el-table"),q=d("pagination"),N=d("el-dialog"),_=D("hasPermi"),S=D("loading");return m(),V("div",A,[p(e(v,{model:n.queryParams,ref:"queryForm",inline:!0,"label-width":"68px"},{default:t(()=>[e(y,{label:"名称",prop:"name"},{default:t(()=>[e(k,{modelValue:n.queryParams.name,"onUpdate:modelValue":l[0]||(l[0]=o=>n.queryParams.name=o),placeholder:"请输入名称",clearable:"",onKeyup:T(i.handleQuery,["enter","native"])},null,8,["modelValue","onKeyup"])]),_:1}),e(y,{label:"开始时间",prop:"deployTime"},{default:t(()=>[e(x,{clearable:"",modelValue:n.queryParams.deployTime,"onUpdate:modelValue":l[1]||(l[1]=o=>n.queryParams.deployTime=o),type:"date","value-format":"yyyy-MM-dd",placeholder:"选择时间"},null,8,["modelValue"])]),_:1}),e(y,null,{default:t(()=>[e(u,{type:"primary",icon:"search",onClick:i.handleQuery},{default:t(()=>l[4]||(l[4]=[a("搜索")])),_:1},8,["onClick"]),e(u,{icon:"refresh",onClick:i.resetQuery},{default:t(()=>l[5]||(l[5]=[a("重置")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"]),[[f,n.showSearch]]),e(F,{gutter:10,class:"mb8"},{default:t(()=>[e(C,{span:1.5},{default:t(()=>[p((m(),c(u,{type:"primary",plain:"",icon:"plus",onClick:i.handleAdd},{default:t(()=>l[6]||(l[6]=[a("新增流程")])),_:1},8,["onClick"])),[[_,["system:deployment:add"]]])]),_:1}),e(C,{span:1.5},{default:t(()=>[p((m(),c(u,