2469.5505f87f.js 12 KB

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