| 1 |
- var f=(m,h,c)=>new Promise((e,d)=>{var o=t=>{try{n(c.next(t))}catch(l){d(l)}},a=t=>{try{n(c.throw(t))}catch(l){d(l)}},n=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,a);n((c=c.apply(m,h)).next())});import{b as k,B as M}from"./index-985aa6f5.js";import{d as y,e as D,Z as A,r as p,o as v,q as B,y as C,af as _,m as x,F as S,D as w,s as I,g as T,f as u,I as V,w as F,j as L}from"./index-610a1d46.js";import"./useWindowSizeFn-1829b247.js";const N={class:"wrap shortcut"},R=["onClick"],j={class:"shortcut-item_icon"},q={class:"shortcut-item_name"},E=y({__name:"shortcutModal",emits:["success","register"],setup(m,{emit:h}){const c=D(()=>"快捷入口"),e=A({total:4,curr:1}),d=D(()=>"(已选"+e.curr+"/"+e.total+")"),o=p(!1),a=p([{iconDefault:"shortcut-1|svg",iconDisabled:"shortcut-11|svg",name:"标准项目",route:"/bizArchives/index",selected:!1},{iconDefault:"shortcut-2|svg",iconDisabled:"shortcut-22|svg",name:"分包商管理",route:"/bizArchives/index",selected:!1},{iconDefault:"shortcut-3|svg",iconDisabled:"shortcut-33|svg",name:"供应商管理",route:"/bizVisit/check",selected:!0},{iconDefault:"shortcut-4|svg",iconDisabled:"shortcut-44|svg",name:"记录模板维护",route:"/bizArchives/handover_shifts",selected:!1},{iconDefault:"shortcut-5|svg",iconDisabled:"shortcut-55|svg",name:"客户管理",route:"/bizArchives/index",selected:!1},{iconDefault:"shortcut-6|svg",iconDisabled:"shortcut-66|svg",name:"文件管理",route:"/bizArchives/index",selected:!1},{iconDefault:"shortcut-7|svg",iconDisabled:"shortcut-77|svg",name:"原始记录",route:"/bizVisit/check",selected:!0},{iconDefault:"sun|svg",iconDisabled:"sun|svg",name:"检测报告",route:"/bizArchives/handover_shifts",selected:!1}]),[n,{setModalProps:t,closeModal:l}]=k(i=>f(this,null,function*(){t({confirmLoading:!1}),g()}));function z(i){e.curr==e.total&&!i.selected||(a.value=a.value.map(r=>(r.name==i.name&&(r.selected=!r.selected),r)),g())}function g(){e.curr=a.value.filter(i=>i.selected).length,e.curr==e.total?o.value=!0:o.value=!1}function b(){return f(this,null,function*(){h("success"),l()})}return(i,r)=>(v(),B(u(M),{title:u(c),subTitle:u(d),canFullscreen:!1,onRegister:u(n),onOk:b,onCancel:b,width:"580px"},{default:C(()=>[_("div",N,[(v(!0),x(S,null,w(a.value,s=>(v(),x("div",{class:I(["shortcut-item",s.selected?"shortcut-item--seleted":"",!s.selected&&o.value?"shortcut-item--disabled":""]),key:s.name,onClick:O=>z(s)},[_("div",j,[T(u(V),{icon:o.value?s.iconDisabled:s.iconDefault,size:40},null,8,["icon"])]),_("div",q,F(s.name),1)],10,R))),128))])]),_:1},8,["title","subTitle","onRegister"]))}});const H=L(E,[["__scopeId","data-v-8f75a23d"]]);export{H as default};
|