沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
提交 | 用户 | 时间
314507 1 import{e as se,bN as re,d as A,bz as oe,f as ie,ad as M,cg as ue,o as i,g as p,B as a,j as ne,n as me,a as e,aB as pe,aP as de,_ as fe,q as ce,a0 as ve,u as ye,Q as ge,r as o,b as _e,aA as be,P as xe,k as r,I as N,c as V,F as U,i as I,C as D,O as E,D as Q,am as he,ap as ke,K as we,L as Ce,U as Se,V as Ve,$ as Ue,R as Ie,S as Pe,W as Be,Z as qe}from"./index-BP6bNRoi.js";import{_ as ze}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{E as Ae}from"./el-card-bU92WWV4.js";import{E as De}from"./el-image-CQbvaLia.js";import{b as Ee,a as Fe}from"./index-C5h6z2YM.js";import{g as Re,a as Te}from"./index-DMqCuIfZ.js";import{b as $e}from"./formCreate-4fM2e5HN.js";import{_ as je}from"./ProcessInstanceBpmnViewer.vue_vue_type_style_index_0_lang-BqVMBg67.js";import{C as Le}from"./index-qIioACxn.js";import{u as Me}from"./tagsView-DQpvPGX0.js";import{g as Ne}from"./index-vFgEqmZu.js";import"./bpmn-embedded-DgbZ9dtA.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import"./XTextButton-B6L8upsJ.js";import"./XButton-BfzTlH8o.js";import"./index-CeFKtjBg.js";import"./el-tree-select-pYALMRc9.js";import"./tree-BBZY150N.js";import"./index-NsInNyZ_.js";import"./index-BdNokKwC.js";import"./index-DkNlrmPs.js";import"./index-Y1ylnZaQ.js";import"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import"./index-BZESAUPP.js";import"./constants-CuOBQ73z.js";import"./index-ox_WxZBR.js";import"./el-drawer-CuGR_O5R.js";import"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import"./color-DXkOL5Tu.js";import"./index-BRcqC2Y4.js";import"./formatTime-DwR9f7DP.js";const Qe=se({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:re,default:""},truncated:{type:Boolean},lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),Ze=A({name:"ElText"}),Ge=ce(fe(A({...Ze,props:Qe,setup(F){const b=F,C=oe(),m=ie("text"),x=M(()=>[m.b(),m.m(b.type),m.m(C.value),m.is("truncated",b.truncated),m.is("line-clamp",!ue(b.lineClamp))]);return(h,k)=>(i(),p(de(h.tag),{class:me(e(x)),style:pe({"-webkit-line-clamp":h.lineClamp})},{default:a(()=>[ne(h.$slots,"default")]),_:3},8,["class","style"]))}}),[["__file","text.vue"]])),Ke={class:"flex"},Oe={class:"clearfix"},We={class:"el-icon-document"},Xe=A({name:"BpmProcessInstanceCreate",__name:"index",setup(F){const b=ve(),{push:C,currentRoute:m}=ye(),x=ge(),{delView:h}=Me(),k=b.query.processInstanceId,P=o(!0),S=o([]),w=o(""),B=o([]),Z=M(()=>B.value.filter(l=>l.category==w.value)),d=o(),f=o({rule:[],option:{},value:{}}),c=o(),R=o(null),v=o([]),y=o({}),T=o(),q=o({}),$=o([]),j=async(l,t)=>{var g;if(c.value=l,v.value=[],y.value={},q.value={},l.formType==10){$e(f,l.formConf,l.formFields,t);const n=await Fe(l.id);if(n&&(R.value=n.bpmnXml,v.value=n.startUserSelectTasks,((g=v.value)==null?void 0:g.length)>0)){f.value.rule.push({type:"startUserSelect",props:{title:"\u6307\u5B9A\u5BA1\u6279\u4EBA"}});for(const _ of v.value)y.value[_.id]=[],q.value[_.id]=[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6279\u4EBA",trigger:"blur"}];$.value=await Ne()}}else l.formCustomCreatePath&&await C({path:l.formCustomCreatePath})},G=async l=>{var t;if(d.value&&c.value){((t=v.value)==null?void 0:t.length)>0&&await T.value.validate(),d.value.btn.loading(!0);try{await Te({processDefinitionId:c.value.id,variables:l,startUserSelectAssignees:y.value}),x.success("\u53D1\u8D77\u6D41\u7A0B\u6210\u529F"),h(e(m)),await C({name:"BpmProcessInstanceMy"})}finally{d.value.btn.loading(!1)}}};return _e(()=>{(async()=>{P.value=!0;try{if(S.value=await Le.getCategorySimpleList(),S.value.length>0&&(w.value=S.value[0].code),B.value=await Ee({suspensionState:1}),(k==null?void 0:k.length)>0){const l=await Re(k);if(!l)return void x.error("\u91CD\u65B0\u53D1\u8D77\u6D41\u7A0B\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u6D41\u7A0B\u5B9E\u4F8B\u4E0D\u5B58\u5728");const t=B.value.find(g=>{var n;return g.key==((n=l.processDefinition)==null?void 0:n.key)});if(!t)return void x.error("\u91CD\u65B0\u53D1\u8D77\u6D41\u7A0B\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u6D41\u7A0B\u5B9A\u4E49\u4E0D\u5B58\u5728");await j(t,l.formVariables)}}finally{P.value=!1}})()}),(l,t)=>{const g=De,n=Ge,_=Ae,z=he,K=ke,O=we,W=Ce,L=ze,X=Se,H=Ve,J=Ue,Y=Ie,ee=Pe,ae=Be,le=be("form-create"),te=qe;return e(c)?(i(),p(L,{key:1},{default:a(()=>[r(_,{class:"box-card"},{default:a(()=>[D("div",Oe,[D("span",We,"\u7533\u8BF7\u4FE1\u606F\u3010"+Q(e(c).name)+"\u3011",1),r(H,{style:{float:"right"},type:"primary",onClick:t[1]||(t[1]=s=>c.value=void 0)},{default:a(()=>[r(X,{icon:"ep:delete"}),E(" \u9009\u62E9\u5176\u5B83\u6D41\u7A0B ")]),_:1})]),r(z,{span:16,offset:6,style:{"margin-top":"20px"}},{default:a(()=>[r(le,{rule:e(f).rule,api:e(d),"onUpdate:api":t[2]||(t[2]=s=>N(d)?d.value=s:null),modelValue:e(f).value,"onUpdate:modelValue":t[3]||(t[3]=s=>e(f).value=s),option:e(f).option,onSubmit:G},{"type-startUserSelect":a(()=>[r(z,{span:24},{default:a(()=>[r(_,{class:"mb-10px"},{header:a(()=>[E("\u6307\u5B9A\u5BA1\u6279\u4EBA")]),default:a(()=>[r(ae,{model:e(y),rules:e(q),ref_key:"startUserSelectAssigneesFormRef",ref:T},{default:a(()=>[(i(!0),V(U,null,I(e(v),s=>(i(),p(ee,{key:s.id,label:`\u4EFB\u52A1\u3010${s.name}\u3011`,prop:s.id},{default:a(()=>[r(Y,{modelValue:e(y)[s.id],"onUpdate:modelValue":u=>e(y)[s.id]=u,multiple:"",placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6279\u4EBA"},{default:a(()=>[(i(!0),V(U,null,I(e($),u=>(i(),p(J,{key:u.id,label:u.nickname,value:u.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label","prop"]))),128))]),_:1},8,["model","rules"])]),_:1})]),_:1})]),_:1},8,["rule","api","modelValue","option"])]),_:1})]),_:1}),r(je,{"bpmn-xml":e(R)},null,8,["bpmn-xml"])]),_:1})):xe((i(),p(L,{key:0},{default:a(()=>[r(W,{"tab-position":"left",modelValue:e(w),"onUpdate:modelValue":t[0]||(t[0]=s=>N(w)?w.value=s:null)},{default:a(()=>[(i(!0),V(U,null,I(e(S),s=>(i(),p(O,{label:s.name,name:s.code,key:s.code},{default:a(()=>[r(K,{gutter:20},{default:a(()=>[(i(!0),V(U,null,I(e(Z),u=>(i(),p(z,{lg:6,sm:12,xs:24,key:u.id},{default:a(()=>[r(_,{shadow:"hover",class:"mb-20px cursor-pointer",onClick:He=>j(u)},{default:a(()=>[D("div",Ke,[r(g,{src:u.icon,class:"w-32px h-32px"},null,8,["src"]),r(n,{class:"!ml-10px",size:"large"},{default:a(()=>[E(Q(u.name),1)]),_:2},1024)])]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])]),_:1})),[[te,e(P)]])}}});export{Xe as default};