flowList.DDRTPvPd.js 3.0 KB

1
  1. import{P as t,n as e,X as s,t as a,p as l,w as o,v as i,x as r,y as n,B as d,H as u,q as c,I as f,G as m}from"./index-P0fyQ2Em.js";import{S as p}from"./index.CIHFpOa3.js";import{_ as h}from"./_plugin-vue_export-helper.BCo6x5W8.js";function g(e){return t({url:"/api/workflow/task",method:"get",data:e,options:{load:!1}})}function w(e){return t({url:`/api/workflow/operator/List/${e.category}`,method:"get",data:e,options:{load:!1}})}const y=h({name:"FlowList",components:{SwipeItem:p},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{index:s}=e,a=this.list[s];if([1,2,3,5].includes(a.status))return this.$u.toast("流程正在审核,请勿删除"),void(this.list[s].show=!1);var l;(l=a.id,t({url:"/api/workflow/task/"+l,method:"delete"})).then((t=>{this.$u.toast(t.msg),this.list.splice(s,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,p,h,g,w){const y=c,_=f,b=m,k=s("SwipeItem");return a(),l(y,{class:"flowLaunch-v"},{default:o((()=>[p.list.length>0?(a(),l(y,{key:0,class:"flow-list"},{default:o((()=>[i(y,{class:"flow-list-box"},{default:o((()=>[i(k,{list:p.list,buttons:g.options,onAction:w.handleClick,ref:"swipeItem",marginB:20,borderR:10},{default:o((({item:e,index:s})=>[i(y,{class:"item",onClick:t=>w.goDetail(e),id:"item"+s,ref:"mydom"},{default:o((()=>[i(y,{class:"item-left"},{default:o((()=>[i(y,{class:"item-left-top"},{default:o((()=>[e.delegateUser?(a(),l(y,{key:0,class:"common-lable-entrust"},{default:o((()=>[r(n(p.category?"代理":"委托"),1)])),_:1})):d("",!0),i(y,{class:u(["common-lable",{"urgent-lable":2==e.flowUrgent,"important-lable":3==e.flowUrgent}])},{default:o((()=>[r(n(w.getLableValue(e.flowUrgent)),1)])),_:2},1032,["class"]),i(_,{class:"title u-font-28 u-line-1"},{default:o((()=>[r(n(e.fullName),1)])),_:2},1024)])),_:2},1024),i(_,{class:"title u-line-1 u-font-24"},{default:o((()=>[r("审批节点:"+n(e.currentNodeName),1),i(_,{class:"titInner"},{default:o((()=>[r(n(e.thisStep?e.thisStep:""),1)])),_:2},1024)])),_:2},1024),i(_,{class:"time title u-font-24"},{default:o((()=>[r("发起时间:"),i(_,{class:"titInner"},{default:o((()=>[r(n(e.startTime?t.$u.timeFormat(e.startTime,"yyyy-mm-dd hh:MM:ss"):""),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),i(y,{class:"item-right"},{default:o((()=>[i(b,{src:e.flowStatus,mode:"widthFix",class:"item-right-img"},null,8,["src"])])),_:2},1024)])),_:2},1032,["onClick","id"])])),_:1},8,["list","buttons","onAction"])])),_:1})])),_:1})):d("",!0)])),_:1})}],["__scopeId","data-v-e7048a00"]]);export{g as a,y as f,w as g};