5563.287c9123.js 12 KB

12
  1. "use strict";(self["webpackChunkbyte_sailing_mobile"]=self["webpackChunkbyte_sailing_mobile"]||[]).push([[5563],{14071:function(e,t,n){n.d(t,{Z:function(){return m}});var l=n(13649),a=(n(64165),n(13813)),o=(n(55449),n(57658),n(73396)),i=n(44870),r=n(87139);const s={class:"common-list"},c={key:0,class:"left-box",style:{"margin-right":"20px"}},u=["onClick"],d=["onClick"];var f={__name:"common-list",props:{data:{type:Array,default:[]},config:{type:Object,default:[]},showMore:{type:Boolean,default:!0},isCheckbox:{type:Boolean,default:!1},optionalKey:{type:String,default:null}},setup(e){const t=(0,o.FN)().proxy;let n=(0,i.iH)([]),f=[];(0,o.YP)((()=>t.data),(e=>{n.value=e.map((e=>(f.length>0&&f.map((t=>{e.id==t.id&&(e.checked=!0)})),e)))}));const h=(0,i.iH)(null),m=()=>{f=[],n.value.map((e=>{e.checked&&(f.push(e),h.value||(h.value=e[t.optionalKey]))})),0==f.length&&(h.value=null),t.$emit("onCheck",f)},p=e=>{t.$emit("onClick",e)};return(t,f)=>{const v=a.XZ,g=l.JO;return(0,o.wg)(),(0,o.iD)("div",s,[(0,o._)("ul",null,[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)((0,i.SU)(n),(t=>((0,o.wg)(),(0,o.iD)("li",{key:t.id},[e.isCheckbox?((0,o.wg)(),(0,o.iD)("div",c,[(0,o.Wm)(v,{modelValue:t.checked,"onUpdate:modelValue":e=>t.checked=e,"icon-size":"15px",shape:"square",onChange:m,disabled:!!h.value&&h.value!=t[e.optionalKey]},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(0,o.kq)("",!0),(0,o._)("div",{class:"center-content",style:{"line-height":"24px"},onClick:e=>p(t)},[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(e.config,(e=>((0,o.wg)(),(0,o.iD)("div",{key:e.prop},[(0,o._)("span",null,(0,r.zw)(e.label)+":",1),(0,o.Uk)((0,r.zw)(t[e.prop]),1)])))),128))],8,u),e.showMore?((0,o.wg)(),(0,o.iD)("div",{key:1,class:"more-box",onClick:e=>p(t)},[(0,o.Wm)(g,{name:"arrow"})],8,d)):(0,o.kq)("",!0)])))),128))])])}}};const h=f;var m=h},85563:function(e,t,n){n.r(t),n.d(t,{default:function(){return g}});var l=n(31441),a=(n(84035),n(55943)),o=(n(90563),n(80147)),i=(n(39292),n(39420)),r=(n(12097),n(57658),n(73396)),s=n(87139),c=n(44870),u=n(14071),d=n(22483),f=n(51836);const h={class:"list"};var m={__name:"tenantDict",setup(e){const t=(0,c.iH)(!1),n=(0,d.yj)(),m=(0,c.iH)({pageNum:1,keyword:null,tenantId:(0,f.bG)().tenantId,code:null}),p=(0,c.iH)(!1),v=(0,r.FN)().proxy,g=(0,c.iH)([]),b=(0,c.iH)([{label:v.t("dict.key"),prop:"dictKey"},{label:v.t("dict.value"),prop:"dictValue"},{label:v.t("dict.sort"),prop:"sort"}]),k=()=>{m.value.pageNum=1,p.value=!1,T("refresh")},x=()=>{T()},y=()=>v.$router.push("/main/working"),w=()=>{v.$router.push({path:"tenantAdd",query:{dictCode:n.query.code}})};v.uploadDdRightBtn(w,v.t("common.add"));const W=e=>{console.log(e),v.$router.push({path:"tenantAdd",query:e})},T=((0,c.iH)([]),e=>{t.value=!0,v.post("dictTenantData/page",m.value).then((n=>{g.value="refresh"===e?n.data.rows:g.value.concat(n.data.rows),10*m.value.pageNum>=n.data.total&&(p.value=!0),m.value.pageNum++,t.value=!1})).catch((e=>{t.value=!1}))});return(0,r.bv)((()=>{m.value.dictCode=n.query.code,T()})),(e,n)=>{const c=i.l2,d=o.ol,f=a.aV,v=l.I8;return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r.Wm)(c,{title:e.$t("dict.name"),"left-text":"","left-arrow":"",onClickLeft:y,onClickRight:w},{right:(0,r.w5)((()=>[(0,r.Uk)((0,s.zw)(e.$t("common.add")),1)])),_:1},8,["title"]),(0,r.Wm)(d,{modelValue:m.value.keyword,"onUpdate:modelValue":n[0]||(n[0]=e=>m.value.keyword=e),placeholder:e.$t("common.pleaseEnterKeywords"),onSearch:k},null,8,["modelValue","placeholder"]),(0,r.Wm)(v,{modelValue:t.value,"onUpdate:modelValue":n[2]||(n[2]=e=>t.value=e),onRefresh:k},{default:(0,r.w5)((()=>[(0,r._)("div",h,[(0,r.Wm)(f,{loading:t.value,"onUpdate:loading":n[1]||(n[1]=e=>t.value=e),finished:p.value,"finished-text":e.$t("common.noMore"),onLoad:x,style:{"margin-bottom":"60px"}},{default:(0,r.w5)((()=>[(0,r.Wm)(u.Z,{data:g.value,onOnClick:W,config:b.value},null,8,["data","config"])])),_:1},8,["loading","finished","finished-text"])])])),_:1},8,["modelValue"])],64)}}},p=n(40089);const v=(0,p.Z)(m,[["__scopeId","data-v-77533db2"]]);var g=v},34373:function(e,t,n){n.d(t,{J:function(){return c}});var l=n(73396),a=n(253),o=n(44870),i=n(47936),r=n(10648);const s=(e,t)=>{const n=(0,o.iH)(),s=()=>{n.value=(0,a.EL)(e).height};return(0,l.bv)((()=>{if((0,l.Y3)(s),t)for(let e=1;e<=3;e++)setTimeout(s,100*e)})),(0,r.h)((()=>(0,l.Y3)(s))),(0,l.YP)([i.bn,i.uK],s),n};function c(e,t){const n=s(e,!0);return e=>(0,l.Wm)("div",{class:t("placeholder"),style:{height:n.value?`${n.value}px`:void 0}},[e()])}},92220:function(e,t,n){n.d(t,{a:function(){return a},d:function(){return o}});var l=n(73396);const a=Symbol(),o=()=>(0,l.f3)(a,null)},64165:function(e,t,n){n(31958),n(20368),n(56742)},55943:function(e,t,n){n.d(t,{aV:function(){return b}});var l=n(11404),a=n(73396),o=n(44870),i=n(610),r=n(5323),s=n(47936),c=n(253),u=n(3444),d=n(92220),f=n(12229);const[h,m,p]=(0,i["do"])("list"),v={error:Boolean,offset:(0,r.SI)(300),loading:Boolean,disabled:Boolean,finished:Boolean,errorText:String,direction:(0,r.SQ)("down"),loadingText:String,finishedText:String,immediateCheck:r.J5};var g=(0,a.aZ)({name:h,props:v,emits:["load","update:error","update:loading"],setup(e,{emit:t,slots:n}){const l=(0,o.iH)(e.loading),i=(0,o.iH)(),r=(0,o.iH)(),h=(0,d.d)(),v=(0,c.eo)(i),g=()=>{(0,a.Y3)((()=>{if(l.value||e.finished||e.disabled||e.error||!1===(null==h?void 0:h.value))return;const{direction:n}=e,a=+e.offset,o=(0,c.EL)(v);if(!o.height||(0,s.xj)(i))return;let u=!1;const d=(0,c.EL)(r);u="up"===n?o.top-d.top<=a:d.bottom-o.bottom<=a,u&&(l.value=!0,t("update:loading",!0),t("load"))}))},b=()=>{if(e.finished){const t=n.finished?n.finished():e.finishedText;if(t)return(0,a.Wm)("div",{class:m("finished-text")},[t])}},k=()=>{t("update:error",!1),g()},x=()=>{if(e.error){const t=n.error?n.error():e.errorText;if(t)return(0,a.Wm)("div",{role:"button",class:m("error-text"),tabindex:0,onClick:k},[t])}},y=()=>{if(l.value&&!e.finished&&!e.disabled)return(0,a.Wm)("div",{class:m("loading")},[n.loading?n.loading():(0,a.Wm)(f.gb,{class:m("loading-icon")},{default:()=>[e.loadingText||p("loading")]})])};return(0,a.YP)((()=>[e.loading,e.finished,e.error]),g),h&&(0,a.YP)(h,(e=>{e&&g()})),(0,a.ic)((()=>{l.value=e.loading})),(0,a.bv)((()=>{e.immediateCheck&&g()})),(0,u.F)({check:g}),(0,c.OR)("scroll",g,{target:v,passive:!0}),()=>{var t;const o=null==(t=n.default)?void 0:t.call(n),s=(0,a.Wm)("div",{ref:r,class:m("placeholder")},null);return(0,a.Wm)("div",{ref:i,role:"feed",class:m(),"aria-busy":l.value},["down"===e.direction?o:s,y(),b(),x(),"up"===e.direction?o:s])}}});const b=(0,l.n)(g)},90563:function(e,t,n){n(31958),n(62939)},39420:function(e,t,n){n.d(t,{l2:function(){return v}});var l=n(11404),a=n(73396),o=n(44870),i=n(610),r=n(5323),s=n(96048),c=n(25322),u=n(34373),d=n(13649);const[f,h]=(0,i["do"])("nav-bar"),m={title:String,fixed:Boolean,zIndex:r.Or,border:r.J5,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:r.J5};var p=(0,a.aZ)({name:f,props:m,emits:["clickLeft","clickRight"],setup(e,{emit:t,slots:n}){const l=(0,o.iH)(),i=(0,u.J)(l,h),r=e=>t("clickLeft",e),f=e=>t("clickRight",e),m=()=>n.left?n.left():[e.leftArrow&&(0,a.Wm)(d.JO,{class:h("arrow"),name:"arrow-left"},null),e.leftText&&(0,a.Wm)("span",{class:h("text")},[e.leftText])],p=()=>n.right?n.right():(0,a.Wm)("span",{class:h("text")},[e.rightText]),v=()=>{const{title:t,fixed:o,border:i,zIndex:u}=e,d=(0,s.As)(u),v=e.leftArrow||e.leftText||n.left,g=e.rightText||n.right;return(0,a.Wm)("div",{ref:l,style:d,class:[h({fixed:o}),{[c.xe]:i,"van-safe-area-top":e.safeAreaInsetTop}]},[(0,a.Wm)("div",{class:h("content")},[v&&(0,a.Wm)("div",{class:[h("left"),e.clickable?c.e9:""],onClick:r},[m()]),(0,a.Wm)("div",{class:[h("title"),"van-ellipsis"]},[n.title?n.title():t]),g&&(0,a.Wm)("div",{class:[h("right"),e.clickable?c.e9:""],onClick:f},[p()])])])};return()=>e.fixed&&e.placeholder?i(v):v()}});const v=(0,l.n)(p)},12097:function(e,t,n){n(31958),n(20368),n(56742)},31441:function(e,t,n){n.d(t,{I8:function(){return k}});var l=n(11404),a=(n(57658),n(73396)),o=n(44870),i=n(610),r=n(5323),s=n(47936),c=n(253),u=n(65261),d=n(12229);const[f,h,m]=(0,i["do"])("pull-refresh"),p=50,v=["pulling","loosing","success"],g={disabled:Boolean,modelValue:Boolean,headHeight:(0,r.SI)(p),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:r.Or,successDuration:(0,r.SI)(500),animationDuration:(0,r.SI)(300)};var b=(0,a.aZ)({name:f,props:g,emits:["change","refresh","update:modelValue"],setup(e,{emit:t,slots:n}){let l;const i=(0,o.iH)(),r=(0,o.iH)(),f=(0,c.eo)(i),g=(0,o.qj)({status:"normal",distance:0,duration:0}),b=(0,u.o)(),k=()=>{if(e.headHeight!==p)return{height:`${e.headHeight}px`}},x=()=>"loading"!==g.status&&"success"!==g.status&&!e.disabled,y=t=>{const n=+(e.pullDistance||e.headHeight);return t>n&&(t=t<2*n?n+(t-n)/2:1.5*n+(t-2*n)/4),Math.round(t)},w=(n,l)=>{const a=+(e.pullDistance||e.headHeight);g.distance=n,g.status=l?"loading":0===n?"normal":n<a?"pulling":"loosing",t("change",{status:g.status,distance:n})},W=()=>{const{status:t}=g;return"normal"===t?"":e[`${t}Text`]||m(t)},T=()=>{const{status:e,distance:t}=g;if(n[e])return n[e]({distance:t});const l=[];return v.includes(e)&&l.push((0,a.Wm)("div",{class:h("text")},[W()])),"loading"===e&&l.push((0,a.Wm)(d.gb,{class:h("loading")},{default:W})),l},C=()=>{g.status="success",setTimeout((()=>{w(0)}),+e.successDuration)},H=e=>{l=0===(0,s.cx)(f.value),l&&(g.duration=0,b.start(e))},S=e=>{x()&&H(e)},I=e=>{if(x()){l||H(e);const{deltaY:t}=b;b.move(e),l&&t.value>=0&&b.isVertical()&&((0,s.PF)(e),w(y(t.value)))}},V=()=>{l&&b.deltaY.value&&x()&&(g.duration=+e.animationDuration,"loosing"===g.status?(w(+e.headHeight,!0),t("update:modelValue",!0),(0,a.Y3)((()=>t("refresh")))):w(0))};return(0,a.YP)((()=>e.modelValue),(t=>{g.duration=+e.animationDuration,t?w(+e.headHeight,!0):n.success||e.successText?C():w(0,!1)})),(0,c.OR)("touchmove",I,{target:r}),()=>{var e;const t={transitionDuration:`${g.duration}ms`,transform:g.distance?`translate3d(0,${g.distance}px, 0)`:""};return(0,a.Wm)("div",{ref:i,class:h()},[(0,a.Wm)("div",{ref:r,class:h("track"),style:t,onTouchstartPassive:S,onTouchend:V,onTouchcancel:V},[(0,a.Wm)("div",{class:h("head"),style:k()},[T()]),null==(e=n.default)?void 0:e.call(n)])])}}});const k=(0,l.n)(b)},84035:function(e,t,n){n(31958),n(62939)},80147:function(e,t,n){n.d(t,{ol:function(){return k}});var l=n(11404),a=n(73396),o=n(44870),i=n(610),r=n(12220),s=n(5323),c=n(47936),u=n(36817),d=n(96401),f=n(3444),h=n(43739);const[m,p,v]=(0,i["do"])("search"),g=(0,r.l7)({},u.Mv,{label:String,shape:(0,s.SQ)("square"),leftIcon:(0,s.SQ)("search"),clearable:s.J5,actionText:String,background:String,showAction:Boolean});var b=(0,a.aZ)({name:m,props:g,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:t,slots:n,attrs:l}){const i=(0,d.M)(),s=(0,o.iH)(),m=()=>{n.action||(t("update:modelValue",""),t("cancel"))},g=n=>{const l=13;n.keyCode===l&&((0,c.PF)(n),t("search",e.modelValue))},b=()=>e.id||`${i}-input`,k=()=>{if(n.label||e.label)return(0,a.Wm)("label",{class:p("label"),for:b()},[n.label?n.label():e.label])},x=()=>{if(e.showAction){const t=e.actionText||v("cancel");return(0,a.Wm)("div",{class:p("action"),role:"button",tabindex:0,onClick:m},[n.action?n.action():t])}},y=()=>{var e;return null==(e=s.value)?void 0:e.blur()},w=()=>{var e;return null==(e=s.value)?void 0:e.focus()},W=e=>t("blur",e),T=e=>t("focus",e),C=e=>t("clear",e),H=e=>t("clickInput",e),S=e=>t("clickLeftIcon",e),I=e=>t("clickRightIcon",e),V=Object.keys(u.Mv),D=()=>{const o=(0,r.l7)({},l,(0,r.ei)(e,V),{id:b()}),i=e=>t("update:modelValue",e);return(0,a.Wm)(h.gN,(0,a.dG)({ref:s,type:"search",class:p("field"),border:!1,onBlur:W,onFocus:T,onClear:C,onKeypress:g,onClickInput:H,onClickLeftIcon:S,onClickRightIcon:I,"onUpdate:modelValue":i},o),(0,r.ei)(n,["left-icon","right-icon"]))};return(0,f.F)({focus:w,blur:y}),()=>{var t;return(0,a.Wm)("div",{class:p({"show-action":e.showAction}),style:{background:e.background}},[null==(t=n.left)?void 0:t.call(n),(0,a.Wm)("div",{class:p("content",e.shape)},[k(),D()]),x()])}}});const k=(0,l.n)(b)},39292:function(e,t,n){n(31958),n(20368),n(56742),n(3094),n(67984)}}]);
  2. //# sourceMappingURL=5563.287c9123.js.map