flowList.7z63vEXk.js 3.2 KB

1
  1. import{a3 as t,n as e,k as s,p as a,m as o,w as l,q as i,B as n,C as r,F as d,z as u,o as c,t as f,v as p,E as m,G as h,D as w}from"./index-C9TJPork.js";import{_ as g}from"./u-swipe-action.BhRxbaFQ.js";import{r as _}from"./uni-app.es.CUt9gedF.js";import{_ as y}from"./_plugin-vue_export-helper.BCo6x5W8.js";function k(e){return t({url:"/api/workflow/task",method:"get",data:e,options:{load:!1}})}function b(e){return t({url:`/api/workflow/operator/List/${e.category}`,method:"get",data:e,options:{load:!1}})}const x=y({name:"FlowList",props:{list:{type:Array,default:()=>[]},swipeAction:{type:Boolean,default:!1},category:{type:[String,Number],default:"0"}},data:()=>({options:[{text:"删除",style:{backgroundColor:"#dd524d"}}],title:""}),methods:{open(t){this.list[t].show=!0,this.list.map(((e,s)=>{t!=s&&(this.list[s].show=!1)}))},goDetail(t){const s={opType:t.opType,operatorId:t.id,category:this.category,...t};e({url:"/pages/workFlow/flowBefore/index?config="+this.jnpf.base64.encode(JSON.stringify(s))})},handleClick(e){const s=this.list[e];if([1,2,3,5].includes(s.status))return this.$u.toast("流程正在审核,请勿删除"),void(this.list[e].show=!1);var a;(a=s.id,t({url:"/api/workflow/task/"+a,method:"delete"})).then((t=>{this.$u.toast(t.msg),this.list.splice(e,1)}))},getLableValue(t){var e="";switch(t){case 1:default:e="普通";break;case 2:e="重要";break;case 3:e="紧急"}return e}}},[["render",function(t,e,y,k,b,x){const v=c,C=h,S=w,j=_(s("u-swipe-action"),g);return a(),o(v,{class:"flowLaunch-v"},{default:l((()=>[y.list.length>0?(a(),o(v,{key:0,class:"flow-list"},{default:l((()=>[i(v,{class:"flow-list-box"},{default:l((()=>[(a(!0),n(d,null,r(y.list,((e,s)=>(a(),o(j,{show:e.show,index:s,key:e.id,onClick:t=>x.handleClick(s),onOpen:x.open,options:b.options,btnWidth:160,vibrateShort:!0,disabled:e.swipeAction},{default:l((()=>[i(v,{class:"item",onClick:t=>x.goDetail(e),id:"item"+s,ref_for:!0,ref:"mydom"},{default:l((()=>[i(v,{class:"item-left"},{default:l((()=>[i(v,{class:"item-left-top"},{default:l((()=>[e.delegateUser?(a(),o(v,{key:0,class:"common-lable-entrust"},{default:l((()=>[f(p(y.category?"代理":"委托"),1)])),_:1})):u("",!0),i(v,{class:m(["common-lable",{"urgent-lable":2==e.flowUrgent,"important-lable":3==e.flowUrgent}])},{default:l((()=>[f(p(x.getLableValue(e.flowUrgent)),1)])),_:2},1032,["class"]),i(C,{class:"title u-font-28 u-line-1"},{default:l((()=>[f(p(e.fullName),1)])),_:2},1024)])),_:2},1024),i(C,{class:"title u-line-1 u-font-24"},{default:l((()=>[f("审批节点:"+p(e.currentNodeName),1),i(C,{class:"titInner"},{default:l((()=>[f(p(e.thisStep?e.thisStep:""),1)])),_:2},1024)])),_:2},1024),i(C,{class:"time title u-font-24"},{default:l((()=>[f("发起时间:"),i(C,{class:"titInner"},{default:l((()=>[f(p(e.startTime?t.$u.timeFormat(e.startTime,"yyyy-mm-dd hh:MM:ss"):""),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),i(v,{class:"item-right"},{default:l((()=>[i(S,{src:e.flowStatus,mode:"widthFix",class:"item-right-img"},null,8,["src"])])),_:2},1024)])),_:2},1032,["onClick","id"])])),_:2},1032,["show","index","onClick","onOpen","options","disabled"])))),128))])),_:1})])),_:1})):u("",!0)])),_:1})}],["__scopeId","data-v-ffe12509"]]);export{k as a,x as f,b as g};