2 lines
8.2 KiB
JavaScript
Raw Permalink Normal View History

2025-06-02 21:34:56 +08:00
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"]]])])),