2 lines
6.2 KiB
JavaScript
2 lines
6.2 KiB
JavaScript
import{R as J,S as P,T as L,U as G,I as Q,y as H,w as K,C as M,G as X,H as Y,A as Z,B as ee,V as te}from"./element-plus.b3353ca6.js";import{K as le,e as ae}from"./@element-plus.b89f1627.js";import{f as ne,a as oe,b as se}from"./approve.cdf281c2.js";import{u as ue}from"./index.892155dd.js";import{d as W,e as ce,r as I,s as _e,a0 as q,o,c as v,V as t,M as e,T as _,U as b,u as B,W as E,a8 as A,a as N,L as d,S as R}from"./@vue.ab566ce7.js";import{a as re}from"./flow.ec77bb69.js";import{u as ie}from"./vue-router.87ebc608.js";const de={class:"edit-popup"},pe={class:"steps-cls"},fe={key:0},me=_(" \u901A\u8FC7 "),be=_(" \u62D2\u7EDD "),ve=_(" \u64A4\u9500 "),ke=W({name:"projectEdit"}),Fe=W({...ke,props:{approve_id:Number},emits:["off"],setup(C,{expose:$,emit:g}){const y=C,f=ue(),r=ce(()=>f.userInfo);let x=I(0);const k=I("");I("");const T=_e(),l=q({id:"",title:"",create_user:1,check_status:0,flow_name:"",check_status_text:"",current_check_user:"",create_user_name:"admin",copy_user:"admin",current_check_user_ids:[],content:{},step:[{flow_step:"",flow_user:"",is_active:"",flow_step_text:""}],record:[{title:"",content:"",check_time:"",status:0,status_text:""}]}),s=async n=>{for(const a in l)n[a]!=null&&n[a]!=null&&(l[a]=n[a])},m=()=>{var n;(n=T.value)==null||n.open()},U=async()=>{await oe({id:y.approve_id,revoke_reason:k.value}),g("off")},F=async n=>{await se({id:y.approve_id,check_status:n,check_reason:k.value}),g("off")},h=(n,a)=>a==0?l.create_user_name+"\u521B\u5EFA":n==null?void 0:n.flow_step_text;return ne({id:y.approve_id}).then(n=>{x.value=n.step.findIndex(a=>(a==null?void 0:a.is_active)==1),s(n)}),$({open:m,setFormData:s}),(n,a)=>{const u=J,D=P,V=L,S=G,j=Q,c=H,i=K,z=M;return o(),v("div",de,[t(z,null,{default:e(()=>[t(D,{column:3,title:"\u5BA1\u6279\u8BE6\u60C5",border:""},{default:e(()=>[t(u,{label:"\u5BA1\u6279\u4E3B\u9898","label-align":"left",align:"left","label-class-name":"my-label"},{default:e(()=>[_(b(l.title),1)]),_:1}),t(u,{label:"\u5BA1\u6279\u6D41\u7A0B","label-align":"left",align:"left","label-class-name":"my-label"},{default:e(()=>[_(b(l.flow_name),1)]),_:1}),t(u,{label:"\u5BA1\u6838\u72B6\u6001","label-align":"left",align:"left","label-class-name":"my-label"},{default:e(()=>[_(b(l.check_status_text),1)]),_:1}),t(u,{label:"\u7533\u8BF7\u4EBA","label-align":"left",align:"left","label-class-name":"my-label"},{default:e(()=>[_(b(l.create_user_name),1)]),_:1}),t(u,{label:"\u5F53\u524D\u5BA1\u6279\u4EBA","label-align":"left",align:"left","label-class-name":"my-label"},{default:e(()=>[_(b(l.current_check_user),1)]),_:1}),t(u,{label:"\u6284\u9001\u4EBA","label-align":"left",align:"left","label-class-name":"my-label"},{default:e(()=>[_(b(l.copy_user),1)]),_:1})]),_:1}),t(D,{column:1,border:""},{default:e(()=>{var O;return[t(u,{label:"\u5BA1\u6279\u6D41\u7A0B","label-align":"left",align:"left"},{default:e(()=>[t(S,{active:B(x),simple:"","align-center":!0},{default:e(()=>[(o(!0),v(E,null,A(l.step,(p,w)=>(o(),d(V,{title:h(p,w),icon:w==0?B(le):B(ae),key:w},null,8,["title","icon"]))),128))]),_:1},8,["active"])]),_:1}),t(u,{label:"\u5BA1\u6279\u8BB0\u5F55","label-align":"left",align:"left"},{default:e(()=>[N("div",pe,[t(S,{direction:"vertical",active:l.record.length,"align-center":!0,space:50,style:{"margin-top":"20px"}},{default:e(()=>[(o(!0),v(E,null,A(l.record,(p,w)=>(o(),d(V,{title:p.check_time+" "+p.title,key:w},null,8,["title"]))),128))]),_:1},8,["active"])])]),_:1}),((O=l==null?void 0:l.current_check_user_ids)==null?void 0:O.includes(String(B(r).id)))&&l.check_status!=3?(o(),v("div",fe,[t(u,{label:"\u64CD\u4F5C","label-align":"left",align:"left"},{default:e(()=>[t(c,{label:"\u610F\u89C1"},{default:e(()=>[t(j,{modelValue:k.value,"onUpdate:modelValue":a[0]||(a[0]=p=>k.value=p),clearable:"",placeholder:"\u8BF7\u8F93\u5165",type:"textarea"},null,8,["modelValue"])]),_:1}),t(c,{label:"\u5BA1\u6279"},{default:e(()=>[t(i,{type:"primary",onClick:a[1]||(a[1]=p=>F(1))},{default:e(()=>[me]),_:1}),t(i,{onClick:a[2]||(a[2]=p=>F(2))},{default:e(()=>[be]),_:1}),(l==null?void 0:l.check_status)==0&&l.create_user==B(r).id&&l.check_status!=3?(o(),d(i,{key:0,onClick:U},{default:e(()=>[ve]),_:1})):R("",!0)]),_:1})]),_:1})])):R("",!0)]}),_:1})]),_:1})])}}});const ge=N("div",{class:"card-header"},[N("span",null,"\u5BA1\u6279\u6D41\u7A0B")],-1),ye=_(" \u63D0\u4EA4 "),De={__name:"index",props:{id:Number,flows:Object,submitApi:Object},emits:["off"],setup(C,{emit:$}){const g=C,y=ie(),f=q({flow_id:"",path:y.path,id:g.id}),r=I({}),x=async()=>{let s=await re({id:f.flow_id});r.value=s},k=s=>s.flow_step==1?"\u5F53\u524D\u90E8\u95E8\u8D1F\u8D23\u4EBA":s.flow_user.map(m=>[m.name]).join(","),T=async()=>{await g.submitApi({...f}),$("off")},l=s=>["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341"][s];return(s,m)=>{const U=X,F=Y,h=H,n=Z,a=ee,u=L,D=G,V=te,S=K,j=M;return o(),d(j,null,{header:e(()=>[ge]),default:e(()=>[N("div",null,[t(a,null,{default:e(()=>[t(n,{span:8},{default:e(()=>[t(h,{label:"\u5BA1\u6279\u6D41\u7A0B",prop:"flow_cate"},{default:e(()=>[t(F,{class:"flex-1",modelValue:f.flow_id,"onUpdate:modelValue":m[0]||(m[0]=c=>f.flow_id=c),clearable:"",onChange:x,placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6279\u7C7B\u578B"},{default:e(()=>[(o(!0),v(E,null,A(C.flows,(c,i)=>(o(),d(U,{key:i,label:c.name,value:parseInt(c.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),r.value.id?(o(),d(a,{key:0},{default:e(()=>[t(n,{span:24},{default:e(()=>[t(h,{label:"\u5BA1\u6279\u6D41\u7A0B",prop:"mailing_no"},{default:e(()=>[t(D,{"align-center":"",active:r.value.flow_list.length},{default:e(()=>[(o(!0),v(E,null,A(r.value.flow_list,(c,i)=>(o(),d(u,{title:`\u7B2C${l(i+1)}\u7EA7\u5BA1\u6279`,description:k(c),key:s.idnex},null,8,["title","description"]))),128))]),_:1},8,["active"])]),_:1})]),_:1})]),_:1})):R("",!0),r.value.id?(o(),d(a,{key:1},{default:e(()=>[t(n,{span:24},{default:e(()=>[t(h,{label:"\u6284\u9001\u4EBA",prop:"mailing_no"},{default:e(()=>[(o(!0),v(E,null,A(r.value.copy_uids,(c,i)=>(o(),d(V,{key:i,class:"ml-2"},{default:e(()=>[_(b(c.name),1)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})):R("",!0),t(a,null,{default:e(()=>[t(S,{onClick:T,type:"primary",disabled:!f.flow_id},{default:e(()=>[ye]),_:1},8,["disabled"])]),_:1})])]),_:1})}}};export{De as _,Fe as a};
|