9 lines
325 KiB
JavaScript
9 lines
325 KiB
JavaScript
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((a=>t.resolve(e()).then((()=>a))),(a=>t.resolve(e()).then((()=>{throw a}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";function t(e,t,...a){uni.__log__?uni.__log__(e,t,...a):console[e].apply(console,[...a,t])}function a(e,t){return"string"==typeof e?t:e}const n=t=>(a,n=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,a,n)},i=n("onShow"),s=n("onLaunch"),o=n("onLoad"),r=n("onReachBottom"),l=n("onPullDownRefresh");let c=!1;function d(e){if(c)return;if(uni.getStorageSync("logintime")&&uni.getStorageSync("logintime")+36e5<=Date.now())return c=!0,t("log","at utils/http.js:11","token超时"),uni.removeStorageSync("logintime"),uni.navigateTo({url:"/pages/login/login"}),void(c=!1);e.url="https://36.112.48.190/jeecg-boot"+e.url;let a=uni.getStorageSync("token")||"";return e.header={"content-type":"application/json;charset=utf-8","X-Access-Token":a},new Promise((function(t,a){uni.request(e).then((e=>{if(wx.hideLoading(),e[0])uni.showToast({title:"数据获取失败",icon:"none",duration:1500}),t(!1);else{let a=e.data;if(t(a),c)return;500==a.code&&uni.showToast({title:a.message,icon:"none",duration:1500}),510==a.code&&(c=!0,uni.showToast({title:a.message,icon:"none",duration:1500}),uni.removeStorageSync("token"),uni.removeStorageSync("user"),uni.removeStorageSync("role"),uni.navigateTo({url:"/pages/login/login"}),uni.removeStorageSync("logintime"),c=!1)}})).catch((e=>{uni.hideLoading(),a(e)}))}))}function u(e){return d({url:"/sys/permission/getUserPermissionByToken",method:"get",data:e})}var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p,f,g={exports:{}};
|
||
/*! https://mths.be/base64 v1.0.0 by @mathias | MIT license */p=g,f=g.exports,function(e){var t=f,a=p&&p.exports==t&&p,n="object"==typeof h&&h;n.global!==n&&n.window!==n||(e=n);var i=function(e){this.message=e};(i.prototype=new Error).name="InvalidCharacterError";var s=function(e){throw new i(e)},o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=/[\t\n\f\r ]/g,l={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var t,a,n,i,r=e.length%3,l="",c=-1,d=e.length-r;++c<d;)t=e.charCodeAt(c)<<16,a=e.charCodeAt(++c)<<8,n=e.charCodeAt(++c),l+=o.charAt((i=t+a+n)>>18&63)+o.charAt(i>>12&63)+o.charAt(i>>6&63)+o.charAt(63&i);return 2==r?(t=e.charCodeAt(c)<<8,a=e.charCodeAt(++c),l+=o.charAt((i=t+a)>>10)+o.charAt(i>>4&63)+o.charAt(i<<2&63)+"="):1==r&&(i=e.charCodeAt(c),l+=o.charAt(i>>2)+o.charAt(i<<4&63)+"=="),l},decode:function(e){var t=(e=String(e).replace(r,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var a,n,i=0,l="",c=-1;++c<t;)n=o.indexOf(e.charAt(c)),a=i%4?64*a+n:n,i++%4&&(l+=String.fromCharCode(255&a>>(-2*i&6)));return l},version:"1.0.0"};if(t&&!t.nodeType)if(a)a.exports=l;else for(var c in l)l.hasOwnProperty(c)&&(t[c]=l[c]);else e.base64=l}(h);const y=m(g.exports);
|
||
/*!
|
||
* pinia v2.1.7
|
||
* (c) 2023 Eduardo San Martin Morote
|
||
* @license MIT
|
||
*/
|
||
let v;const w=e=>v=e,k=Symbol();function b(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var _,S;(S=_||(_={})).direct="direct",S.patchObject="patch object",S.patchFunction="patch function";const E=()=>{};function x(t,a,n,i=E){t.push(a);const s=()=>{const e=t.indexOf(a);e>-1&&(t.splice(e,1),i())};return!n&&e.getCurrentScope()&&e.onScopeDispose(s),s}function N(e,...t){e.slice().forEach((e=>{e(...t)}))}const V=e=>e();function C(t,a){t instanceof Map&&a instanceof Map&&a.forEach(((e,a)=>t.set(a,e))),t instanceof Set&&a instanceof Set&&a.forEach(t.add,t);for(const n in a){if(!a.hasOwnProperty(n))continue;const i=a[n],s=t[n];b(s)&&b(i)&&t.hasOwnProperty(n)&&!e.isRef(i)&&!e.isReactive(i)?t[n]=C(s,i):t[n]=i}return t}const T=Symbol();const{assign:D}=Object;function B(t,a,n={},i,s,o){let r;const l=D({actions:{}},n),c={deep:!0};let d,u,h,m=[],p=[];const f=i.state.value[t];let g;function y(a){let n;d=u=!1,"function"==typeof a?(a(i.state.value[t]),n={type:_.patchFunction,storeId:t,events:h}):(C(i.state.value[t],a),n={type:_.patchObject,payload:a,storeId:t,events:h});const s=g=Symbol();e.nextTick().then((()=>{g===s&&(d=!0)})),u=!0,N(m,n,i.state.value[t])}o||f||(i.state.value[t]={}),e.ref({});const v=o?function(){const{state:e}=n,t=e?e():{};this.$patch((e=>{D(e,t)}))}:E;function k(e,a){return function(){w(i);const n=Array.from(arguments),s=[],o=[];function r(e){s.push(e)}function l(e){o.push(e)}let c;N(p,{args:n,name:e,store:B,after:r,onError:l});try{c=a.apply(this&&this.$id===t?this:B,n)}catch(d){throw N(o,d),d}return c instanceof Promise?c.then((e=>(N(s,e),e))).catch((e=>(N(o,e),Promise.reject(e)))):(N(s,c),c)}}const S={_p:i,$id:t,$onAction:x.bind(null,p),$patch:y,$reset:v,$subscribe(a,n={}){const s=x(m,a,n.detached,(()=>o())),o=r.run((()=>e.watch((()=>i.state.value[t]),(e=>{("sync"===n.flush?u:d)&&a({storeId:t,type:_.direct,events:h},e)}),D({},c,n))));return s},$dispose:function(){r.stop(),m=[],p=[],i._s.delete(t)}},B=e.reactive(S);i._s.set(t,B);const I=(i._a&&i._a.runWithContext||V)((()=>i._e.run((()=>(r=e.effectScope()).run(a)))));for(const w in I){const a=I[w];if(e.isRef(a)&&(A=a,!e.isRef(A)||!A.effect)||e.isReactive(a))o||(!f||b(P=a)&&P.hasOwnProperty(T)||(e.isRef(a)?a.value=f[w]:C(a,f[w])),i.state.value[t][w]=a);else if("function"==typeof a){const e=k(w,a);I[w]=e,l.actions[w]=a}}var P,A;return D(B,I),D(e.toRaw(B),I),Object.defineProperty(B,"$state",{get:()=>i.state.value[t],set:e=>{y((t=>{D(t,e)}))}}),i._p.forEach((e=>{D(B,r.run((()=>e({store:B,app:i._a,pinia:i,options:l}))))})),f&&o&&n.hydrate&&n.hydrate(B.$state,f),d=!0,u=!0,B}function I(t,a,n){let i,s;const o="function"==typeof a;function r(t,n){const r=e.hasInjectionContext();(t=t||(r?e.inject(k,null):null))&&w(t),(t=v)._s.has(i)||(o?B(i,a,s,t):function(t,a,n,i){const{state:s,actions:o,getters:r}=a,l=n.state.value[t];let c;c=B(t,(function(){l||(n.state.value[t]=s?s():{});const a=e.toRefs(n.state.value[t]);return D(a,o,Object.keys(r||{}).reduce(((a,i)=>(a[i]=e.markRaw(e.computed((()=>{w(n);const e=n._s.get(t);return r[i].call(e,e)}))),a)),{}))}),a,n,0,!0)}(i,s,t));return t._s.get(i)}return"string"==typeof t?(i=t,s=o?n:a):(s=t,i=t.id),r.$id=i,r}const P=I("user",{state:()=>({userinfo:uni.getStorageSync("user")&&JSON.parse(uni.getStorageSync("user"))||{},token:uni.getStorageSync("token")||null,role:uni.getStorageSync("role")||null,allowPage:uni.getStorageSync("allowPage")||null,position:uni.getStorageSync("position")||null,positionSwitch:uni.getStorageSync("positionSwitch")||null,wendu:uni.getStorageSync("wendu")||null,wenduIcon:uni.getStorageSync("wenduIcon")||null,isgray:uni.getStorageSync("isgray")||0}),getters:{},actions:{setUserInfo(e){this.userinfo=e},setToken(e){this.token=e},setRole(e){this.role=e},setPosition(e){this.position=e},setPositionSwitch(e){this.positionSwitch=e},setWeather(e,t){this.wendu=e,this.wenduIcon=t},setAllowPage(e){this.allowPage=e},setIsgray(e){this.isgray=e}}}),A=(e,t)=>{const a=e.__vccOpts||e;for(const[n,i]of t)a[n]=i;return a},M=A({__name:"login",setup(a){const n=P(),{proxy:i}=e.getCurrentInstance(),s=e.ref(!1),r=e.ref(!0),l=e.ref(""),c=e.ref(""),u=()=>{if(!l.value.trim())return i.$toast("请输入账号");if(!c.value.trim())return i.$toast("请输入密码");let e=y.encode(encodeURIComponent(l.value)),a=y.encode(encodeURIComponent(c.value));var s;uni.showLoading({title:"登录中..."}),(s={username:e,password:a,ip:h()},d({url:"/sys/sinopecLogin",method:"post",data:s})).then((e=>{e.success&&(uni.setStorageSync("token",e.result.token),n.setToken(e.result.token),(()=>{let e={un:l.value};r.value&&(e.pw=c.value),uni.setStorageSync("accountObj",JSON.stringify(e))})(),function(e){return d({url:"/appConnet/app/queryRoleByRoleIds",method:"get",data:e})}({roles:e.result.userInfo.roles}).then((t=>{uni.setStorageSync("logintime",Date.now()),uni.setStorageSync("role",t),n.setRole(t),uni.setStorageSync("user",JSON.stringify(e.result.userInfo)),n.setUserInfo(e.result.userInfo),uni.switchTab({url:"/pages/tab/index"})})))})).catch((e=>{t("log","at pages/login/login.vue:130",e)}))};function h(){let e;if("Android"==plus.os.name){let s=plus.android.importClass("android.content.Context"),o=plus.android.runtimeMainActivity().getSystemService(s.CONNECTIVITY_SERVICE);plus.android.importClass(o);let r=o.getLinkProperties(o.getActiveNetwork()),l=plus.android.invoke(r,"getLinkAddresses");plus.android.importClass(l);for(var t=0;t<l.size();t++){let a=plus.android.invoke(l.get(t),"getAddress");e=plus.android.invoke(a,"getHostAddress")}if(""==e){var a=plus.android.runtimeMainActivity().getSystemService(s.WIFI_SERVICE),n=plus.android.invoke(a,"getConnectionInfo"),i=plus.android.invoke(n,"getIpAddress");0!=i&&(e=(255&i)+"."+(i>>8&255)+"."+(i>>16&255)+"."+(i>>24&255))}}return e}return e.ref([]),o((()=>{if(uni.getStorageSync("accountObj")){let e=JSON.parse(uni.getStorageSync("accountObj"));l.value=e.un?e.un:"",c.value=e.pw?e.pw:""}})),(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(n).isgray})},[e.createElementVNode("view",{class:"logo f-col aic"},[e.createElementVNode("image",{src:"/static/login/logo.png"})]),e.createElementVNode("view",{class:"form f-col aic"},[e.createElementVNode("view",{class:"box f-row aic"},[e.createElementVNode("image",{src:"/static/login/phone.png"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>l.value=e),type:"text",placeholder:"请输入统一身份认证","placeholder-style":"font-size: 28rpx;color: #999999;"},null,512),[[e.vModelText,l.value]])]),e.createElementVNode("view",{class:"box f-row aic"},[e.createElementVNode("image",{src:"/static/login/pwd.png"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=e=>c.value=e),type:s.value?"text":"password",placeholder:"请输入密码","placeholder-style":"font-size: 28rpx;color: #999999;"},null,8,["type"]),[[e.vModelDynamic,c.value]]),s.value?(e.openBlock(),e.createElementBlock("image",{key:0,src:"/static/login/eye.png",onClick:a[2]||(a[2]=e=>s.value=!s.value)})):(e.openBlock(),e.createElementBlock("image",{key:1,src:"/static/login/eye-off.png",onClick:a[3]||(a[3]=e=>s.value=!s.value)}))])]),e.createElementVNode("view",{class:"pwd f-row aic"},[e.createElementVNode("view",{style:{display:"inline-block"},onClick:a[4]||(a[4]=e=>r.value=!r.value)},[e.createElementVNode("view",{class:"f-row aic"},[r.value?(e.openBlock(),e.createElementBlock("image",{key:1,src:"/static/login/checked.png"})):(e.openBlock(),e.createElementBlock("image",{key:0,src:"/static/login/nocheck.png"})),e.createElementVNode("text",null,"记住密码")])])]),e.createElementVNode("view",{class:"login f-col aic"},[e.createElementVNode("view",{onClick:u}," 登录 ")])],2))}},[["__scopeId","data-v-c41e1a8c"]]),R=[{font_class:"arrow-down",unicode:""},{font_class:"arrow-left",unicode:""},{font_class:"arrow-right",unicode:""},{font_class:"arrow-up",unicode:""},{font_class:"auth",unicode:""},{font_class:"auth-filled",unicode:""},{font_class:"back",unicode:""},{font_class:"bars",unicode:""},{font_class:"calendar",unicode:""},{font_class:"calendar-filled",unicode:""},{font_class:"camera",unicode:""},{font_class:"camera-filled",unicode:""},{font_class:"cart",unicode:""},{font_class:"cart-filled",unicode:""},{font_class:"chat",unicode:""},{font_class:"chat-filled",unicode:""},{font_class:"chatboxes",unicode:""},{font_class:"chatboxes-filled",unicode:""},{font_class:"chatbubble",unicode:""},{font_class:"chatbubble-filled",unicode:""},{font_class:"checkbox",unicode:""},{font_class:"checkbox-filled",unicode:""},{font_class:"checkmarkempty",unicode:""},{font_class:"circle",unicode:""},{font_class:"circle-filled",unicode:""},{font_class:"clear",unicode:""},{font_class:"close",unicode:""},{font_class:"closeempty",unicode:""},{font_class:"cloud-download",unicode:""},{font_class:"cloud-download-filled",unicode:""},{font_class:"cloud-upload",unicode:""},{font_class:"cloud-upload-filled",unicode:""},{font_class:"color",unicode:""},{font_class:"color-filled",unicode:""},{font_class:"compose",unicode:""},{font_class:"contact",unicode:""},{font_class:"contact-filled",unicode:""},{font_class:"down",unicode:""},{font_class:"bottom",unicode:""},{font_class:"download",unicode:""},{font_class:"download-filled",unicode:""},{font_class:"email",unicode:""},{font_class:"email-filled",unicode:""},{font_class:"eye",unicode:""},{font_class:"eye-filled",unicode:""},{font_class:"eye-slash",unicode:""},{font_class:"eye-slash-filled",unicode:""},{font_class:"fire",unicode:""},{font_class:"fire-filled",unicode:""},{font_class:"flag",unicode:""},{font_class:"flag-filled",unicode:""},{font_class:"folder-add",unicode:""},{font_class:"folder-add-filled",unicode:""},{font_class:"font",unicode:""},{font_class:"forward",unicode:""},{font_class:"gear",unicode:""},{font_class:"gear-filled",unicode:""},{font_class:"gift",unicode:""},{font_class:"gift-filled",unicode:""},{font_class:"hand-down",unicode:""},{font_class:"hand-down-filled",unicode:""},{font_class:"hand-up",unicode:""},{font_class:"hand-up-filled",unicode:""},{font_class:"headphones",unicode:""},{font_class:"heart",unicode:""},{font_class:"heart-filled",unicode:""},{font_class:"help",unicode:""},{font_class:"help-filled",unicode:""},{font_class:"home",unicode:""},{font_class:"home-filled",unicode:""},{font_class:"image",unicode:""},{font_class:"image-filled",unicode:""},{font_class:"images",unicode:""},{font_class:"images-filled",unicode:""},{font_class:"info",unicode:""},{font_class:"info-filled",unicode:""},{font_class:"left",unicode:""},{font_class:"link",unicode:""},{font_class:"list",unicode:""},{font_class:"location",unicode:""},{font_class:"location-filled",unicode:""},{font_class:"locked",unicode:""},{font_class:"locked-filled",unicode:""},{font_class:"loop",unicode:""},{font_class:"mail-open",unicode:""},{font_class:"mail-open-filled",unicode:""},{font_class:"map",unicode:""},{font_class:"map-filled",unicode:""},{font_class:"map-pin",unicode:""},{font_class:"map-pin-ellipse",unicode:""},{font_class:"medal",unicode:""},{font_class:"medal-filled",unicode:""},{font_class:"mic",unicode:""},{font_class:"mic-filled",unicode:""},{font_class:"micoff",unicode:""},{font_class:"micoff-filled",unicode:""},{font_class:"minus",unicode:""},{font_class:"minus-filled",unicode:""},{font_class:"more",unicode:""},{font_class:"more-filled",unicode:""},{font_class:"navigate",unicode:""},{font_class:"navigate-filled",unicode:""},{font_class:"notification",unicode:""},{font_class:"notification-filled",unicode:""},{font_class:"paperclip",unicode:""},{font_class:"paperplane",unicode:""},{font_class:"paperplane-filled",unicode:""},{font_class:"person",unicode:""},{font_class:"person-filled",unicode:""},{font_class:"personadd",unicode:""},{font_class:"personadd-filled",unicode:""},{font_class:"personadd-filled-copy",unicode:""},{font_class:"phone",unicode:""},{font_class:"phone-filled",unicode:""},{font_class:"plus",unicode:""},{font_class:"plus-filled",unicode:""},{font_class:"plusempty",unicode:""},{font_class:"pulldown",unicode:""},{font_class:"pyq",unicode:""},{font_class:"qq",unicode:""},{font_class:"redo",unicode:""},{font_class:"redo-filled",unicode:""},{font_class:"refresh",unicode:""},{font_class:"refresh-filled",unicode:""},{font_class:"refreshempty",unicode:""},{font_class:"reload",unicode:""},{font_class:"right",unicode:""},{font_class:"scan",unicode:""},{font_class:"search",unicode:""},{font_class:"settings",unicode:""},{font_class:"settings-filled",unicode:""},{font_class:"shop",unicode:""},{font_class:"shop-filled",unicode:""},{font_class:"smallcircle",unicode:""},{font_class:"smallcircle-filled",unicode:""},{font_class:"sound",unicode:""},{font_class:"sound-filled",unicode:""},{font_class:"spinner-cycle",unicode:""},{font_class:"staff",unicode:""},{font_class:"staff-filled",unicode:""},{font_class:"star",unicode:""},{font_class:"star-filled",unicode:""},{font_class:"starhalf",unicode:""},{font_class:"trash",unicode:""},{font_class:"trash-filled",unicode:""},{font_class:"tune",unicode:""},{font_class:"tune-filled",unicode:""},{font_class:"undo",unicode:""},{font_class:"undo-filled",unicode:""},{font_class:"up",unicode:""},{font_class:"top",unicode:""},{font_class:"upload",unicode:""},{font_class:"upload-filled",unicode:""},{font_class:"videocam",unicode:""},{font_class:"videocam-filled",unicode:""},{font_class:"vip",unicode:""},{font_class:"vip-filled",unicode:""},{font_class:"wallet",unicode:""},{font_class:"wallet-filled",unicode:""},{font_class:"weibo",unicode:""},{font_class:"weixin",unicode:""}];const O=A({name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customPrefix:{type:String,default:""},fontFamily:{type:String,default:""}},data:()=>({icons:R}),computed:{unicode(){let e=this.icons.find((e=>e.font_class===this.type));return e?e.unicode:""},iconSize(){return"number"==typeof(e=this.size)||/^[0-9]*$/g.test(e)?e+"px":e;var e},styleObj(){return""!==this.fontFamily?`color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`:`color: ${this.color}; font-size: ${this.iconSize};`}},methods:{_onClick(){this.$emit("click")}}},[["render",function(t,a,n,i,s,o){return e.openBlock(),e.createElementBlock("text",{style:e.normalizeStyle(o.styleObj),class:e.normalizeClass(["uni-icons",["uniui-"+n.type,n.customPrefix,n.customPrefix?n.type:""]]),onClick:a[0]||(a[0]=(...e)=>o._onClick&&o._onClick(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)}],["__scopeId","data-v-5610c8db"]]);function L(e,t){return`${F(e)} ${$(e,t)}`}function F(e){e=J(e);const t=(e=new Date(e)).getFullYear(),a=e.getMonth()+1,n=e.getDate();return`${t}-${j(a)}-${j(n)}`}function $(e,t){e=J(e);const a=(e=new Date(e)).getHours(),n=e.getMinutes(),i=e.getSeconds();return t?`${j(a)}:${j(n)}`:`${j(a)}:${j(n)}:${j(i)}`}function j(e){return e<10&&(e=`0${e}`),e}function U(e){return e?"00:00":"00:00:00"}function z(e,t){return(e=new Date(J(e)))<=(t=new Date(J(t)))}function H(e){return e.match(/((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g)}const q=/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?)?$/;function J(e){return"string"==typeof e&&q.test(e)&&(e=e.replace(/-/g,"/")),e}const W=A({props:{weeks:{type:Object,default:()=>({})},calendar:{type:Object,default:()=>({})},selected:{type:Array,default:()=>[]},checkHover:{type:Boolean,default:!1}},methods:{choiceDate(e){this.$emit("change",e)},handleMousemove(e){this.$emit("handleMouse",e)}}},[["render",function(t,a,n,i,s,o){return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uni-calendar-item__weeks-box",{"uni-calendar-item--disable":n.weeks.disable,"uni-calendar-item--before-checked-x":n.weeks.beforeMultiple,"uni-calendar-item--multiple":n.weeks.multiple,"uni-calendar-item--after-checked-x":n.weeks.afterMultiple}]),onClick:a[0]||(a[0]=e=>o.choiceDate(n.weeks)),onMouseenter:a[1]||(a[1]=e=>o.handleMousemove(n.weeks))},[e.createElementVNode("view",{class:e.normalizeClass(["uni-calendar-item__weeks-box-item",{"uni-calendar-item--checked":n.calendar.fullDate===n.weeks.fullDate&&(n.calendar.userChecked||!n.checkHover),"uni-calendar-item--checked-range-text":n.checkHover,"uni-calendar-item--before-checked":n.weeks.beforeMultiple,"uni-calendar-item--multiple":n.weeks.multiple,"uni-calendar-item--after-checked":n.weeks.afterMultiple,"uni-calendar-item--disable":n.weeks.disable}])},[n.selected&&n.weeks.extraInfo?(e.openBlock(),e.createElementBlock("text",{key:0,class:"uni-calendar-item__weeks-box-circle"})):e.createCommentVNode("",!0),e.createElementVNode("text",{class:"uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text"},e.toDisplayString(n.weeks.date),1)],2),e.createElementVNode("view",{class:e.normalizeClass({"uni-calendar-item--today":n.weeks.isToday})},null,2)],34)}],["__scopeId","data-v-a5fd30c1"]]),Y=["{","}"];const K=/^(?:\d)+/,G=/^(?:\w)+/;const Q="zh-Hans",Z="zh-Hant",X="en",ee=Object.prototype.hasOwnProperty,te=(e,t)=>ee.call(e,t),ae=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,a=Y){if(!t)return[e];let n=this._caches[e];return n||(n=function(e,[t,a]){const n=[];let i=0,s="";for(;i<e.length;){let o=e[i++];if(o===t){s&&n.push({type:"text",value:s}),s="";let t="";for(o=e[i++];void 0!==o&&o!==a;)t+=o,o=e[i++];const r=o===a,l=K.test(t)?"list":r&&G.test(t)?"named":"unknown";n.push({value:t,type:l})}else s+=o}return s&&n.push({type:"text",value:s}),n}(e,a),this._caches[e]=n),function(e,t){const a=[];let n=0;const i=Array.isArray(t)?"list":(s=t,null!==s&&"object"==typeof s?"named":"unknown");var s;if("unknown"===i)return a;for(;n<e.length;){const s=e[n];switch(s.type){case"text":a.push(s.value);break;case"list":a.push(t[parseInt(s.value,10)]);break;case"named":"named"===i&&a.push(t[s.value])}n++}return a}(n,t)}};function ne(e,t){if(!e)return;if(e=e.trim().replace(/_/g,"-"),t&&t[e])return e;if("chinese"===(e=e.toLowerCase()))return Q;if(0===e.indexOf("zh"))return e.indexOf("-hans")>-1?Q:e.indexOf("-hant")>-1?Z:(a=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==a.indexOf(e)))?Z:Q);var a;let n=[X,"fr","es"];t&&Object.keys(t).length>0&&(n=Object.keys(t));const i=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,n);return i||void 0}class ie{constructor({locale:e,fallbackLocale:t,messages:a,watcher:n,formater:i}){this.locale=X,this.fallbackLocale=X,this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=i||ae,this.messages=a||{},this.setLocale(e||X),n&&this.watchLocale(n)}setLocale(e){const t=this.locale;this.locale=ne(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,a=!0){const n=this.messages[e];n?a?Object.assign(n,t):Object.keys(t).forEach((e=>{te(n,e)||(n[e]=t[e])})):this.messages[e]=t}f(e,t,a){return this.formater.interpolate(e,t,a).join("")}t(e,t,a){let n=this.message;return"string"==typeof t?(t=ne(t,this.messages))&&(n=this.messages[t]):a=t,te(n,e)?this.formater.interpolate(n[e],a).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function se(e,t={},a,n){"string"!=typeof e&&([e,t]=[t,e]),"string"!=typeof e&&(e="undefined"!=typeof uni&&uni.getLocale?uni.getLocale():"undefined"!=typeof global&&global.getLocale?global.getLocale():X),"string"!=typeof a&&(a="undefined"!=typeof __uniConfig&&__uniConfig.fallbackLocale||X);const i=new ie({locale:e,fallbackLocale:a,messages:t,watcher:n});let s=(e,t)=>{if("function"!=typeof getApp)s=function(e,t){return i.t(e,t)};else{let e=!1;s=function(t,a){const n=getApp().$vm;return n&&(n.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(n,i))),i.t(t,a)}}return s(e,t)};return{i18n:i,f:(e,t,a)=>i.f(e,t,a),t:(e,t)=>s(e,t),add:(e,t,a=!0)=>i.add(e,t,a),watch:e=>i.watchLocale(e),getLocale:()=>i.getLocale(),setLocale:e=>i.setLocale(e)}}const oe={en:{"uni-datetime-picker.selectDate":"select date","uni-datetime-picker.selectTime":"select time","uni-datetime-picker.selectDateTime":"select date and time","uni-datetime-picker.startDate":"start date","uni-datetime-picker.endDate":"end date","uni-datetime-picker.startTime":"start time","uni-datetime-picker.endTime":"end time","uni-datetime-picker.ok":"ok","uni-datetime-picker.clear":"clear","uni-datetime-picker.cancel":"cancel","uni-datetime-picker.year":"-","uni-datetime-picker.month":"","uni-calender.MON":"MON","uni-calender.TUE":"TUE","uni-calender.WED":"WED","uni-calender.THU":"THU","uni-calender.FRI":"FRI","uni-calender.SAT":"SAT","uni-calender.SUN":"SUN","uni-calender.confirm":"confirm"},"zh-Hans":{"uni-datetime-picker.selectDate":"选择日期","uni-datetime-picker.selectTime":"选择时间","uni-datetime-picker.selectDateTime":"选择日期时间","uni-datetime-picker.startDate":"开始日期","uni-datetime-picker.endDate":"结束日期","uni-datetime-picker.startTime":"开始时间","uni-datetime-picker.endTime":"结束时间","uni-datetime-picker.ok":"确定","uni-datetime-picker.clear":"清除","uni-datetime-picker.cancel":"取消","uni-datetime-picker.year":"年","uni-datetime-picker.month":"月","uni-calender.SUN":"日","uni-calender.MON":"一","uni-calender.TUE":"二","uni-calender.WED":"三","uni-calender.THU":"四","uni-calender.FRI":"五","uni-calender.SAT":"六","uni-calender.confirm":"确认"},"zh-Hant":{"uni-datetime-picker.selectDate":"選擇日期","uni-datetime-picker.selectTime":"選擇時間","uni-datetime-picker.selectDateTime":"選擇日期時間","uni-datetime-picker.startDate":"開始日期","uni-datetime-picker.endDate":"結束日期","uni-datetime-picker.startTime":"開始时间","uni-datetime-picker.endTime":"結束时间","uni-datetime-picker.ok":"確定","uni-datetime-picker.clear":"清除","uni-datetime-picker.cancel":"取消","uni-datetime-picker.year":"年","uni-datetime-picker.month":"月","uni-calender.SUN":"日","uni-calender.MON":"一","uni-calender.TUE":"二","uni-calender.WED":"三","uni-calender.THU":"四","uni-calender.FRI":"五","uni-calender.SAT":"六","uni-calender.confirm":"確認"}},{t:re}=se(oe),le={name:"UniDatetimePicker",data:()=>({indicatorStyle:"height: 50px;",visible:!1,fixNvueBug:{},dateShow:!0,timeShow:!0,title:"日期和时间",time:"",year:1920,month:0,day:0,hour:0,minute:0,second:0,startYear:1920,startMonth:1,startDay:1,startHour:0,startMinute:0,startSecond:0,endYear:2120,endMonth:12,endDay:31,endHour:23,endMinute:59,endSecond:59}),options:{virtualHost:!0},props:{type:{type:String,default:"datetime"},value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},start:{type:[Number,String],default:""},end:{type:[Number,String],default:""},returnType:{type:String,default:"string"},disabled:{type:[Boolean,String],default:!1},border:{type:[Boolean,String],default:!0},hideSecond:{type:[Boolean,String],default:!1}},watch:{modelValue:{handler(e){e?(this.parseValue(J(e)),this.initTime(!1)):(this.time="",this.parseValue(Date.now()))},immediate:!0},type:{handler(e){"date"===e?(this.dateShow=!0,this.timeShow=!1,this.title="日期"):"time"===e?(this.dateShow=!1,this.timeShow=!0,this.title="时间"):(this.dateShow=!0,this.timeShow=!0,this.title="日期和时间")},immediate:!0},start:{handler(e){this.parseDatetimeRange(J(e),"start")},immediate:!0},end:{handler(e){this.parseDatetimeRange(J(e),"end")},immediate:!0},months(e){this.checkValue("month",this.month,e)},days(e){this.checkValue("day",this.day,e)},hours(e){this.checkValue("hour",this.hour,e)},minutes(e){this.checkValue("minute",this.minute,e)},seconds(e){this.checkValue("second",this.second,e)}},computed:{years(){return this.getCurrentRange("year")},months(){return this.getCurrentRange("month")},days(){return this.getCurrentRange("day")},hours(){return this.getCurrentRange("hour")},minutes(){return this.getCurrentRange("minute")},seconds(){return this.getCurrentRange("second")},ymd(){return[this.year-this.minYear,this.month-this.minMonth,this.day-this.minDay]},hms(){return[this.hour-this.minHour,this.minute-this.minMinute,this.second-this.minSecond]},currentDateIsStart(){return this.year===this.startYear&&this.month===this.startMonth&&this.day===this.startDay},currentDateIsEnd(){return this.year===this.endYear&&this.month===this.endMonth&&this.day===this.endDay},minYear(){return this.startYear},maxYear(){return this.endYear},minMonth(){return this.year===this.startYear?this.startMonth:1},maxMonth(){return this.year===this.endYear?this.endMonth:12},minDay(){return this.year===this.startYear&&this.month===this.startMonth?this.startDay:1},maxDay(){return this.year===this.endYear&&this.month===this.endMonth?this.endDay:this.daysInMonth(this.year,this.month)},minHour(){return"datetime"===this.type?this.currentDateIsStart?this.startHour:0:"time"===this.type?this.startHour:void 0},maxHour(){return"datetime"===this.type?this.currentDateIsEnd?this.endHour:23:"time"===this.type?this.endHour:void 0},minMinute(){return"datetime"===this.type?this.currentDateIsStart&&this.hour===this.startHour?this.startMinute:0:"time"===this.type?this.hour===this.startHour?this.startMinute:0:void 0},maxMinute(){return"datetime"===this.type?this.currentDateIsEnd&&this.hour===this.endHour?this.endMinute:59:"time"===this.type?this.hour===this.endHour?this.endMinute:59:void 0},minSecond(){return"datetime"===this.type?this.currentDateIsStart&&this.hour===this.startHour&&this.minute===this.startMinute?this.startSecond:0:"time"===this.type?this.hour===this.startHour&&this.minute===this.startMinute?this.startSecond:0:void 0},maxSecond(){return"datetime"===this.type?this.currentDateIsEnd&&this.hour===this.endHour&&this.minute===this.endMinute?this.endSecond:59:"time"===this.type?this.hour===this.endHour&&this.minute===this.endMinute?this.endSecond:59:void 0},selectTimeText:()=>re("uni-datetime-picker.selectTime"),okText:()=>re("uni-datetime-picker.ok"),clearText:()=>re("uni-datetime-picker.clear"),cancelText:()=>re("uni-datetime-picker.cancel")},mounted(){},methods:{lessThanTen:e=>e<10?"0"+e:e,parseTimeType(e){if(e){let t=e.split(":");this.hour=Number(t[0]),this.minute=Number(t[1]),this.second=Number(t[2])}},initPickerValue(e){let t=null;e?t=this.compareValueWithStartAndEnd(e,this.start,this.end):(t=Date.now(),t=this.compareValueWithStartAndEnd(t,this.start,this.end)),this.parseValue(t)},compareValueWithStartAndEnd(e,t,a){let n=null;return e=this.superTimeStamp(e),t=this.superTimeStamp(t),a=this.superTimeStamp(a),n=t&&a?e<t?new Date(t):e>a?new Date(a):new Date(e):t&&!a?t<=e?new Date(e):new Date(t):!t&&a?e<=a?new Date(e):new Date(a):new Date(e),n},superTimeStamp(e){let t="";if("time"===this.type&&e&&"string"==typeof e){const e=new Date;t=e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()+" "}return Number(e)&&(e=parseInt(e),t=0),this.createTimeStamp(t+e)},parseValue(e){if(e){if("time"===this.type&&"string"==typeof e)this.parseTimeType(e);else{let t=null;t=new Date(e),"time"!==this.type&&(this.year=t.getFullYear(),this.month=t.getMonth()+1,this.day=t.getDate()),"date"!==this.type&&(this.hour=t.getHours(),this.minute=t.getMinutes(),this.second=t.getSeconds())}this.hideSecond&&(this.second=0)}},parseDatetimeRange(e,t){if(!e)return"start"===t&&(this.startYear=1920,this.startMonth=1,this.startDay=1,this.startHour=0,this.startMinute=0,this.startSecond=0),void("end"===t&&(this.endYear=2120,this.endMonth=12,this.endDay=31,this.endHour=23,this.endMinute=59,this.endSecond=59));if("time"===this.type){const a=e.split(":");this[t+"Hour"]=Number(a[0]),this[t+"Minute"]=Number(a[1]),this[t+"Second"]=Number(a[2])}else{if(!e)return void("start"===t?this.startYear=this.year-60:this.endYear=this.year+60);Number(e)&&(e=parseInt(e));const a=/[0-9]:[0-9]/;"datetime"!==this.type||"end"!==t||"string"!=typeof e||a.test(e)||(e+=" 23:59:59");const n=new Date(e);this[t+"Year"]=n.getFullYear(),this[t+"Month"]=n.getMonth()+1,this[t+"Day"]=n.getDate(),"datetime"===this.type&&(this[t+"Hour"]=n.getHours(),this[t+"Minute"]=n.getMinutes(),this[t+"Second"]=n.getSeconds())}},getCurrentRange(e){const t=[];for(let a=this["min"+this.capitalize(e)];a<=this["max"+this.capitalize(e)];a++)t.push(a);return t},capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),checkValue(e,t,a){-1===a.indexOf(t)&&(this[e]=a[0])},daysInMonth:(e,t)=>new Date(e,t,0).getDate(),createTimeStamp(e){if(e)return"number"==typeof e?e:(e=e.replace(/-/g,"/"),"date"===this.type&&(e+=" 00:00:00"),Date.parse(e))},createDomSting(){const e=this.year+"-"+this.lessThanTen(this.month)+"-"+this.lessThanTen(this.day);let t=this.lessThanTen(this.hour)+":"+this.lessThanTen(this.minute);return this.hideSecond||(t=t+":"+this.lessThanTen(this.second)),"date"===this.type?e:"time"===this.type?t:e+" "+t},initTime(e=!0){this.time=this.createDomSting(),e&&("timestamp"===this.returnType&&"time"!==this.type?(this.$emit("change",this.createTimeStamp(this.time)),this.$emit("input",this.createTimeStamp(this.time)),this.$emit("update:modelValue",this.createTimeStamp(this.time))):(this.$emit("change",this.time),this.$emit("input",this.time),this.$emit("update:modelValue",this.time)))},bindDateChange(e){const t=e.detail.value;this.year=this.years[t[0]],this.month=this.months[t[1]],this.day=this.days[t[2]]},bindTimeChange(e){const t=e.detail.value;this.hour=this.hours[t[0]],this.minute=this.minutes[t[1]],this.second=this.seconds[t[2]]},initTimePicker(){if(this.disabled)return;const e=J(this.time);this.initPickerValue(e),this.visible=!this.visible},tiggerTimePicker(e){this.visible=!this.visible},clearTime(){this.time="",this.$emit("change",this.time),this.$emit("input",this.time),this.$emit("update:modelValue",this.time),this.tiggerTimePicker()},setTime(){this.initTime(),this.tiggerTimePicker()}}};const ce=A(le,[["render",function(t,a,n,i,s,o){return e.openBlock(),e.createElementBlock("view",{class:"uni-datetime-picker"},[e.createElementVNode("view",{onClick:a[0]||(a[0]=(...e)=>o.initTimePicker&&o.initTimePicker(...e))},[e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("view",{class:e.normalizeClass(["uni-datetime-picker-timebox-pointer",{"uni-datetime-picker-disabled":n.disabled,"uni-datetime-picker-timebox":n.border}])},[e.createElementVNode("text",{class:"uni-datetime-picker-text"},e.toDisplayString(s.time),1),s.time?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-datetime-picker-time"},[e.createElementVNode("text",{class:"uni-datetime-picker-text"},e.toDisplayString(o.selectTimeText),1)]))],2)]),!0)]),s.visible?(e.openBlock(),e.createElementBlock("view",{key:0,id:"mask",class:"uni-datetime-picker-mask",onClick:a[1]||(a[1]=(...e)=>o.tiggerTimePicker&&o.tiggerTimePicker(...e))})):e.createCommentVNode("",!0),s.visible?(e.openBlock(),e.createElementBlock("view",{key:1,class:e.normalizeClass(["uni-datetime-picker-popup",[s.dateShow&&s.timeShow?"":"fix-nvue-height"]]),style:e.normalizeStyle(s.fixNvueBug)},[e.createElementVNode("view",{class:"uni-title"},[e.createElementVNode("text",{class:"uni-datetime-picker-text"},e.toDisplayString(o.selectTimeText),1)]),s.dateShow?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-datetime-picker__container-box"},[e.createElementVNode("picker-view",{class:"uni-datetime-picker-view","indicator-style":s.indicatorStyle,value:o.ymd,onChange:a[2]||(a[2]=(...e)=>o.bindDateChange&&o.bindDateChange(...e))},[e.createElementVNode("picker-view-column",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.years,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-datetime-picker-item",key:a},[e.createElementVNode("text",{class:"uni-datetime-picker-item"},e.toDisplayString(o.lessThanTen(t)),1)])))),128))]),e.createElementVNode("picker-view-column",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.months,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-datetime-picker-item",key:a},[e.createElementVNode("text",{class:"uni-datetime-picker-item"},e.toDisplayString(o.lessThanTen(t)),1)])))),128))]),e.createElementVNode("picker-view-column",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.days,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-datetime-picker-item",key:a},[e.createElementVNode("text",{class:"uni-datetime-picker-item"},e.toDisplayString(o.lessThanTen(t)),1)])))),128))])],40,["indicator-style","value"]),e.createElementVNode("text",{class:"uni-datetime-picker-sign sign-left"},"-"),e.createElementVNode("text",{class:"uni-datetime-picker-sign sign-right"},"-")])):e.createCommentVNode("",!0),s.timeShow?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-datetime-picker__container-box"},[e.createElementVNode("picker-view",{class:e.normalizeClass(["uni-datetime-picker-view",[n.hideSecond?"time-hide-second":""]]),"indicator-style":s.indicatorStyle,value:o.hms,onChange:a[3]||(a[3]=(...e)=>o.bindTimeChange&&o.bindTimeChange(...e))},[e.createElementVNode("picker-view-column",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.hours,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-datetime-picker-item",key:a},[e.createElementVNode("text",{class:"uni-datetime-picker-item"},e.toDisplayString(o.lessThanTen(t)),1)])))),128))]),e.createElementVNode("picker-view-column",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.minutes,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-datetime-picker-item",key:a},[e.createElementVNode("text",{class:"uni-datetime-picker-item"},e.toDisplayString(o.lessThanTen(t)),1)])))),128))]),n.hideSecond?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("picker-view-column",{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.seconds,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-datetime-picker-item",key:a},[e.createElementVNode("text",{class:"uni-datetime-picker-item"},e.toDisplayString(o.lessThanTen(t)),1)])))),128))]))],42,["indicator-style","value"]),e.createElementVNode("text",{class:e.normalizeClass(["uni-datetime-picker-sign",[n.hideSecond?"sign-center":"sign-left"]])},":",2),n.hideSecond?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,class:"uni-datetime-picker-sign sign-right"},":"))])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"uni-datetime-picker-btn"},[e.createElementVNode("view",{onClick:a[4]||(a[4]=(...e)=>o.clearTime&&o.clearTime(...e))},[e.createElementVNode("text",{class:"uni-datetime-picker-btn-text"},e.toDisplayString(o.clearText),1)]),e.createElementVNode("view",{class:"uni-datetime-picker-btn-group"},[e.createElementVNode("view",{class:"uni-datetime-picker-cancel",onClick:a[5]||(a[5]=(...e)=>o.tiggerTimePicker&&o.tiggerTimePicker(...e))},[e.createElementVNode("text",{class:"uni-datetime-picker-btn-text"},e.toDisplayString(o.cancelText),1)]),e.createElementVNode("view",{onClick:a[6]||(a[6]=(...e)=>o.setTime&&o.setTime(...e))},[e.createElementVNode("text",{class:"uni-datetime-picker-btn-text"},e.toDisplayString(o.okText),1)])])])],6)):e.createCommentVNode("",!0)])}],["__scopeId","data-v-8a3925ff"]]),{t:de}=se(oe),ue={components:{calendarItem:W,timePicker:ce},options:{virtualHost:!0},props:{date:{type:String,default:""},defTime:{type:[String,Object],default:""},selectableTimes:{type:[Object],default:()=>({})},selected:{type:Array,default:()=>[]},startDate:{type:String,default:""},endDate:{type:String,default:""},startPlaceholder:{type:String,default:""},endPlaceholder:{type:String,default:""},range:{type:Boolean,default:!1},hasTime:{type:Boolean,default:!1},insert:{type:Boolean,default:!0},showMonth:{type:Boolean,default:!0},clearDate:{type:Boolean,default:!0},checkHover:{type:Boolean,default:!0},hideSecond:{type:[Boolean],default:!1},pleStatus:{type:Object,default:()=>({before:"",after:"",data:[],fulldate:""})},defaultValue:{type:[String,Object,Array],default:""}},data:()=>({show:!1,weeks:[],calendar:{},nowDate:{},aniMaskShow:!1,firstEnter:!0,time:"",timeRange:{startTime:"",endTime:""},tempSingleDate:"",tempRange:{before:"",after:""}}),watch:{date:{immediate:!0,handler(e){this.range||(this.tempSingleDate=e,setTimeout((()=>{this.init(e)}),100))}},defTime:{immediate:!0,handler(e){this.range?(this.timeRange.startTime=e.start,this.timeRange.endTime=e.end):this.time=e}},startDate(e){this.cale&&(this.cale.setStartDate(e),this.cale.setDate(this.nowDate.fullDate),this.weeks=this.cale.weeks)},endDate(e){this.cale&&(this.cale.setEndDate(e),this.cale.setDate(this.nowDate.fullDate),this.weeks=this.cale.weeks)},selected(e){this.cale&&(this.cale.setSelectInfo(this.nowDate.fullDate,e),this.weeks=this.cale.weeks)},pleStatus:{immediate:!0,handler(e){const{before:t,after:a,fulldate:n,which:i}=e;this.tempRange.before=t,this.tempRange.after=a,setTimeout((()=>{if(n)if(this.cale.setHoverMultiple(n),t&&a){if(this.cale.lastHover=!0,this.rangeWithinMonth(a,t))return;this.setDate(t)}else this.cale.setMultiple(n),this.setDate(this.nowDate.fullDate),this.calendar.fullDate="",this.cale.lastHover=!1;else{if(!this.cale)return;this.cale.setDefaultMultiple(t,a),"left"===i&&t?(this.setDate(t),this.weeks=this.cale.weeks):a&&(this.setDate(a),this.weeks=this.cale.weeks),this.cale.lastHover=!0}}),16)}}},computed:{timepickerStartTime(){return(this.range?this.tempRange.before:this.calendar.fullDate)===this.startDate?this.selectableTimes.start:""},timepickerEndTime(){return(this.range?this.tempRange.after:this.calendar.fullDate)===this.endDate?this.selectableTimes.end:""},selectDateText:()=>de("uni-datetime-picker.selectDate"),startDateText(){return this.startPlaceholder||de("uni-datetime-picker.startDate")},endDateText(){return this.endPlaceholder||de("uni-datetime-picker.endDate")},okText:()=>de("uni-datetime-picker.ok"),yearText:()=>de("uni-datetime-picker.year"),monthText:()=>de("uni-datetime-picker.month"),MONText:()=>de("uni-calender.MON"),TUEText:()=>de("uni-calender.TUE"),WEDText:()=>de("uni-calender.WED"),THUText:()=>de("uni-calender.THU"),FRIText:()=>de("uni-calender.FRI"),SATText:()=>de("uni-calender.SAT"),SUNText:()=>de("uni-calender.SUN"),confirmText:()=>de("uni-calender.confirm")},created(){this.cale=new class{constructor({selected:e,startDate:t,endDate:a,range:n}={}){this.date=this.getDateObj(new Date),this.selected=e||[],this.startDate=t,this.endDate=a,this.range=n,this.cleanMultipleStatus(),this.weeks={},this.lastHover=!1}setDate(e){const t=this.getDateObj(e);this.getWeeks(t.fullDate)}cleanMultipleStatus(){this.multipleStatus={before:"",after:"",data:[]}}setStartDate(e){this.startDate=e}setEndDate(e){this.endDate=e}getPreMonthObj(e){e=J(e);const t=(e=new Date(e)).getMonth();e.setMonth(t-1);const a=e.getMonth();return 0!==t&&a-t==0&&e.setMonth(a-1),this.getDateObj(e)}getNextMonthObj(e){e=J(e);const t=(e=new Date(e)).getMonth();e.setMonth(t+1);const a=e.getMonth();return a-t>1&&e.setMonth(a-1),this.getDateObj(e)}getDateObj(e){return e=J(e),{fullDate:F(e=new Date(e)),year:e.getFullYear(),month:j(e.getMonth()+1),date:j(e.getDate()),day:e.getDay()}}getPreMonthDays(e,t){const a=[];for(let n=e-1;n>=0;n--){const e=t.month-1;a.push({date:new Date(t.year,e,-n).getDate(),month:e,disable:!0})}return a}getCurrentMonthDays(e,t){const a=[],n=this.date.fullDate;for(let i=1;i<=e;i++){const e=`${t.year}-${t.month}-${j(i)}`,s=n===e,o=this.selected&&this.selected.find((t=>{if(this.dateEqual(e,t.date))return t}));this.startDate&&z(this.startDate,e),this.endDate&&z(e,this.endDate);let r=this.multipleStatus.data,l=-1;this.range&&r&&(l=r.findIndex((t=>this.dateEqual(t,e))));const c=-1!==l;a.push({fullDate:e,year:t.year,date:i,multiple:!!this.range&&c,beforeMultiple:this.isLogicBefore(e,this.multipleStatus.before,this.multipleStatus.after),afterMultiple:this.isLogicAfter(e,this.multipleStatus.before,this.multipleStatus.after),month:t.month,disable:this.startDate&&!z(this.startDate,e)||this.endDate&&!z(e,this.endDate),isToday:s,userChecked:!1,extraInfo:o})}return a}_getNextMonthDays(e,t){const a=[],n=t.month+1;for(let i=1;i<=e;i++)a.push({date:i,month:n,disable:!0});return a}getInfo(e){return e||(e=new Date),this.calendar.find((t=>t.fullDate===this.getDateObj(e).fullDate))}dateEqual(e,t){return e=new Date(J(e)),t=new Date(J(t)),e.valueOf()===t.valueOf()}isLogicBefore(e,t,a){let n=t;return t&&a&&(n=z(t,a)?t:a),this.dateEqual(n,e)}isLogicAfter(e,t,a){let n=a;return t&&a&&(n=z(t,a)?a:t),this.dateEqual(n,e)}geDateAll(e,t){var a=[],n=e.split("-"),i=t.split("-"),s=new Date;s.setFullYear(n[0],n[1]-1,n[2]);var o=new Date;o.setFullYear(i[0],i[1]-1,i[2]);for(var r=s.getTime()-864e5,l=o.getTime()-864e5,c=r;c<=l;)c+=864e5,a.push(this.getDateObj(new Date(parseInt(c))).fullDate);return a}setMultiple(e){if(!this.range)return;let{before:t,after:a}=this.multipleStatus;if(t&&a){if(!this.lastHover)return void(this.lastHover=!0);this.multipleStatus.before=e,this.multipleStatus.after="",this.multipleStatus.data=[],this.multipleStatus.fulldate="",this.lastHover=!1}else t?(this.multipleStatus.after=e,z(this.multipleStatus.before,this.multipleStatus.after)?this.multipleStatus.data=this.geDateAll(this.multipleStatus.before,this.multipleStatus.after):this.multipleStatus.data=this.geDateAll(this.multipleStatus.after,this.multipleStatus.before),this.lastHover=!0):(this.multipleStatus.before=e,this.multipleStatus.after=void 0,this.lastHover=!1);this.getWeeks(e)}setHoverMultiple(e){if(!this.range||this.lastHover)return;const{before:t}=this.multipleStatus;t?(this.multipleStatus.after=e,z(this.multipleStatus.before,this.multipleStatus.after)?this.multipleStatus.data=this.geDateAll(this.multipleStatus.before,this.multipleStatus.after):this.multipleStatus.data=this.geDateAll(this.multipleStatus.after,this.multipleStatus.before)):this.multipleStatus.before=e,this.getWeeks(e)}setDefaultMultiple(e,t){this.multipleStatus.before=e,this.multipleStatus.after=t,e&&t&&(z(e,t)?(this.multipleStatus.data=this.geDateAll(e,t),this.getWeeks(t)):(this.multipleStatus.data=this.geDateAll(t,e),this.getWeeks(e)))}getWeeks(e){const{year:t,month:a}=this.getDateObj(e),n=new Date(t,a-1,1).getDay(),i=this.getPreMonthDays(n,this.getDateObj(e)),s=new Date(t,a,0).getDate(),o=42-n-s,r=[...i,...this.getCurrentMonthDays(s,this.getDateObj(e)),...this._getNextMonthDays(o,this.getDateObj(e))],l=new Array(6);for(let c=0;c<r.length;c++){const e=Math.floor(c/7);l[e]||(l[e]=new Array(7)),l[e][c%7]=r[c]}this.calendar=r,this.weeks=l}}({selected:this.selected,startDate:this.startDate,endDate:this.endDate,range:this.range}),this.init(this.date)},methods:{leaveCale(){this.firstEnter=!0},handleMouse(e){if(e.disable)return;if(this.cale.lastHover)return;let{before:t,after:a}=this.cale.multipleStatus;t&&(this.calendar=e,this.cale.setHoverMultiple(this.calendar.fullDate),this.weeks=this.cale.weeks,this.firstEnter&&(this.$emit("firstEnterCale",this.cale.multipleStatus),this.firstEnter=!1))},rangeWithinMonth(e,t){const[a,n]=e.split("-"),[i,s]=t.split("-");return a===i&&n===s},maskClick(){this.close(),this.$emit("maskClose")},clearCalender(){this.range?(this.timeRange.startTime="",this.timeRange.endTime="",this.tempRange.before="",this.tempRange.after="",this.cale.multipleStatus.before="",this.cale.multipleStatus.after="",this.cale.multipleStatus.data=[],this.cale.lastHover=!1):(this.time="",this.tempSingleDate=""),this.calendar.fullDate="",this.setDate(new Date)},bindDateChange(e){const t=e.detail.value+"-1";this.setDate(t)},init(e){if(this.cale&&(this.cale.setDate(e||new Date),this.weeks=this.cale.weeks,this.nowDate=this.cale.getInfo(e),this.calendar={...this.nowDate},!e&&(this.calendar.fullDate="",this.defaultValue&&!this.range))){const e=new Date(this.defaultValue),t=F(e),a=e.getFullYear(),n=e.getMonth()+1,i=e.getDate(),s=e.getDay();this.calendar={fullDate:t,year:a,month:n,date:i,day:s},this.tempSingleDate=t,this.time=$(e,this.hideSecond)}},open(){this.clearDate&&!this.insert&&(this.cale.cleanMultipleStatus(),this.init(this.date)),this.show=!0,this.$nextTick((()=>{setTimeout((()=>{this.aniMaskShow=!0}),50)}))},close(){this.aniMaskShow=!1,this.$nextTick((()=>{setTimeout((()=>{this.show=!1,this.$emit("close")}),300)}))},confirm(){this.setEmit("confirm"),this.close()},change(e){(this.insert||e)&&this.setEmit("change")},monthSwitch(){let{year:e,month:t}=this.nowDate;this.$emit("monthSwitch",{year:e,month:Number(t)})},setEmit(e){this.range||(this.calendar.fullDate||(this.calendar=this.cale.getInfo(new Date),this.tempSingleDate=this.calendar.fullDate),this.hasTime&&!this.time&&(this.time=$(new Date,this.hideSecond)));let{year:t,month:a,date:n,fullDate:i,extraInfo:s}=this.calendar;this.$emit(e,{range:this.cale.multipleStatus,year:t,month:a,date:n,time:this.time,timeRange:this.timeRange,fulldate:i,extraInfo:s||{}})},choiceDate(e){if(e.disable)return;this.calendar=e,this.calendar.userChecked=!0,this.cale.setMultiple(this.calendar.fullDate,!0),this.weeks=this.cale.weeks,this.tempSingleDate=this.calendar.fullDate;const t=new Date(this.cale.multipleStatus.before).getTime(),a=new Date(this.cale.multipleStatus.after).getTime();t>a&&a?(this.tempRange.before=this.cale.multipleStatus.after,this.tempRange.after=this.cale.multipleStatus.before):(this.tempRange.before=this.cale.multipleStatus.before,this.tempRange.after=this.cale.multipleStatus.after),this.change(!0)},changeMonth(e){let t;"pre"===e?t=this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate:"next"===e&&(t=this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate),this.setDate(t),this.monthSwitch()},setDate(e){this.cale.setDate(e),this.weeks=this.cale.weeks,this.nowDate=this.cale.getInfo(e)}}};const he={name:"UniDatetimePicker",options:{virtualHost:!0},components:{Calendar:A(ue,[["render",function(t,n,i,s,o,r){const l=e.resolveComponent("calendar-item"),c=e.resolveComponent("time-picker"),d=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:"uni-calendar",onMouseleave:n[8]||(n[8]=(...e)=>r.leaveCale&&r.leaveCale(...e))},[!i.insert&&o.show?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-calendar__mask",{"uni-calendar--mask-show":o.aniMaskShow}]),onClick:n[0]||(n[0]=(...e)=>r.maskClick&&r.maskClick(...e))},null,2)):e.createCommentVNode("",!0),i.insert||o.show?(e.openBlock(),e.createElementBlock("view",{key:1,class:e.normalizeClass(["uni-calendar__content",{"uni-calendar--fixed":!i.insert,"uni-calendar--ani-show":o.aniMaskShow,"uni-calendar__content-mobile":o.aniMaskShow}])},[e.createElementVNode("view",{class:e.normalizeClass(["uni-calendar__header",{"uni-calendar__header-mobile":!i.insert}])},[e.createElementVNode("view",{class:"uni-calendar__header-btn-box",onClick:n[1]||(n[1]=e.withModifiers((e=>r.changeMonth("pre")),["stop"]))},[e.createElementVNode("view",{class:"uni-calendar__header-btn uni-calendar--left"})]),e.createElementVNode("picker",{mode:"date",value:i.date,fields:"month",onChange:n[2]||(n[2]=(...e)=>r.bindDateChange&&r.bindDateChange(...e))},[e.createElementVNode("text",{class:"uni-calendar__header-text"},e.toDisplayString((o.nowDate.year||"")+r.yearText+(o.nowDate.month||"")+r.monthText),1)],40,["value"]),e.createElementVNode("view",{class:"uni-calendar__header-btn-box",onClick:n[3]||(n[3]=e.withModifiers((e=>r.changeMonth("next")),["stop"]))},[e.createElementVNode("view",{class:"uni-calendar__header-btn uni-calendar--right"})]),i.insert?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"dialog-close",onClick:n[4]||(n[4]=(...e)=>r.maskClick&&r.maskClick(...e))},[e.createElementVNode("view",{class:"dialog-close-plus","data-id":"close"}),e.createElementVNode("view",{class:"dialog-close-plus dialog-close-rotate","data-id":"close"})]))],2),e.createElementVNode("view",{class:"uni-calendar__box"},[i.showMonth?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-calendar__box-bg"},[e.createElementVNode("text",{class:"uni-calendar__box-bg-text"},e.toDisplayString(o.nowDate.month),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"uni-calendar__weeks",style:{"padding-bottom":"7px"}},[e.createElementVNode("view",{class:"uni-calendar__weeks-day"},[e.createElementVNode("text",{class:"uni-calendar__weeks-day-text"},e.toDisplayString(r.SUNText),1)]),e.createElementVNode("view",{class:"uni-calendar__weeks-day"},[e.createElementVNode("text",{class:"uni-calendar__weeks-day-text"},e.toDisplayString(r.MONText),1)]),e.createElementVNode("view",{class:"uni-calendar__weeks-day"},[e.createElementVNode("text",{class:"uni-calendar__weeks-day-text"},e.toDisplayString(r.TUEText),1)]),e.createElementVNode("view",{class:"uni-calendar__weeks-day"},[e.createElementVNode("text",{class:"uni-calendar__weeks-day-text"},e.toDisplayString(r.WEDText),1)]),e.createElementVNode("view",{class:"uni-calendar__weeks-day"},[e.createElementVNode("text",{class:"uni-calendar__weeks-day-text"},e.toDisplayString(r.THUText),1)]),e.createElementVNode("view",{class:"uni-calendar__weeks-day"},[e.createElementVNode("text",{class:"uni-calendar__weeks-day-text"},e.toDisplayString(r.FRIText),1)]),e.createElementVNode("view",{class:"uni-calendar__weeks-day"},[e.createElementVNode("text",{class:"uni-calendar__weeks-day-text"},e.toDisplayString(r.SATText),1)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.weeks,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-calendar__weeks",key:a},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"uni-calendar__weeks-item",key:a},[e.createVNode(l,{class:"uni-calendar-item--hook",weeks:t,calendar:o.calendar,selected:i.selected,checkHover:i.range,onChange:r.choiceDate,onHandleMouse:r.handleMouse},null,8,["weeks","calendar","selected","checkHover","onChange","onHandleMouse"])])))),128))])))),128))]),i.insert||i.range||!i.hasTime?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-date-changed uni-calendar--fixed-top",style:{padding:"0 80px"}},[e.createElementVNode("view",{class:"uni-date-changed--time-date"},e.toDisplayString(o.tempSingleDate?o.tempSingleDate:r.selectDateText),1),e.createVNode(c,{type:"time",start:r.timepickerStartTime,end:r.timepickerEndTime,modelValue:o.time,"onUpdate:modelValue":n[5]||(n[5]=e=>o.time=e),disabled:!o.tempSingleDate,border:!1,"hide-second":i.hideSecond,class:"time-picker-style"},null,8,["start","end","modelValue","disabled","hide-second"])])),!i.insert&&i.range&&i.hasTime?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-date-changed uni-calendar--fixed-top"},[e.createElementVNode("view",{class:"uni-date-changed--time-start"},[e.createElementVNode("view",{class:"uni-date-changed--time-date"},e.toDisplayString(o.tempRange.before?o.tempRange.before:r.startDateText),1),e.createVNode(c,{type:"time",start:r.timepickerStartTime,modelValue:o.timeRange.startTime,"onUpdate:modelValue":n[6]||(n[6]=e=>o.timeRange.startTime=e),border:!1,"hide-second":i.hideSecond,disabled:!o.tempRange.before,class:"time-picker-style"},null,8,["start","modelValue","hide-second","disabled"])]),e.createElementVNode("view",{style:{"line-height":"50px"}},[e.createVNode(d,{type:"arrowthinright",color:"#999"})]),e.createElementVNode("view",{class:"uni-date-changed--time-end"},[e.createElementVNode("view",{class:"uni-date-changed--time-date"},e.toDisplayString(o.tempRange.after?o.tempRange.after:r.endDateText),1),e.createVNode(c,{type:"time",end:r.timepickerEndTime,modelValue:o.timeRange.endTime,"onUpdate:modelValue":n[7]||(n[7]=e=>o.timeRange.endTime=e),border:!1,"hide-second":i.hideSecond,disabled:!o.tempRange.after,class:"time-picker-style"},null,8,["end","modelValue","hide-second","disabled"])])])):e.createCommentVNode("",!0),i.insert?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:2,class:"uni-date-changed uni-date-btn--ok"}))],2)):e.createCommentVNode("",!0)],32)}],["__scopeId","data-v-8dc4a3ee"]]),TimePicker:ce},data:()=>({isRange:!1,hasTime:!1,displayValue:"",inputDate:"",calendarDate:"",pickerTime:"",calendarRange:{startDate:"",startTime:"",endDate:"",endTime:""},displayRangeValue:{startDate:"",endDate:""},tempRange:{startDate:"",startTime:"",endDate:"",endTime:""},startMultipleStatus:{before:"",after:"",data:[],fulldate:""},endMultipleStatus:{before:"",after:"",data:[],fulldate:""},pickerVisible:!1,pickerPositionStyle:null,isEmitValue:!1,isPhone:!1,isFirstShow:!0,i18nT:()=>{}}),props:{type:{type:String,default:"datetime"},value:{type:[String,Number,Array,Date],default:""},modelValue:{type:[String,Number,Array,Date],default:""},start:{type:[Number,String],default:""},end:{type:[Number,String],default:""},returnType:{type:String,default:"string"},placeholder:{type:String,default:""},startPlaceholder:{type:String,default:""},endPlaceholder:{type:String,default:""},rangeSeparator:{type:String,default:"-"},border:{type:[Boolean],default:!0},disabled:{type:[Boolean],default:!1},clearIcon:{type:[Boolean],default:!0},hideSecond:{type:[Boolean],default:!1},defaultValue:{type:[String,Object,Array],default:""}},watch:{type:{immediate:!0,handler(e){this.hasTime=-1!==e.indexOf("time"),this.isRange=-1!==e.indexOf("range")}},modelValue:{immediate:!0,handler(e){this.isEmitValue?this.isEmitValue=!1:this.initPicker(e)}},start:{immediate:!0,handler(e){e&&(this.calendarRange.startDate=F(e),this.hasTime&&(this.calendarRange.startTime=$(e)))}},end:{immediate:!0,handler(e){e&&(this.calendarRange.endDate=F(e),this.hasTime&&(this.calendarRange.endTime=$(e,this.hideSecond)))}}},computed:{timepickerStartTime(){return(this.isRange?this.tempRange.startDate:this.inputDate)===this.calendarRange.startDate?this.calendarRange.startTime:""},timepickerEndTime(){return(this.isRange?this.tempRange.endDate:this.inputDate)===this.calendarRange.endDate?this.calendarRange.endTime:""},mobileCalendarTime(){const e={start:this.tempRange.startTime,end:this.tempRange.endTime};return this.isRange?e:this.pickerTime},mobSelectableTime(){return{start:this.calendarRange.startTime,end:this.calendarRange.endTime}},datePopupWidth(){return this.isRange?653:301},singlePlaceholderText(){return this.placeholder||("date"===this.type?this.selectDateText:this.selectDateTimeText)},startPlaceholderText(){return this.startPlaceholder||this.startDateText},endPlaceholderText(){return this.endPlaceholder||this.endDateText},selectDateText(){return this.i18nT("uni-datetime-picker.selectDate")},selectDateTimeText(){return this.i18nT("uni-datetime-picker.selectDateTime")},selectTimeText(){return this.i18nT("uni-datetime-picker.selectTime")},startDateText(){return this.startPlaceholder||this.i18nT("uni-datetime-picker.startDate")},startTimeText(){return this.i18nT("uni-datetime-picker.startTime")},endDateText(){return this.endPlaceholder||this.i18nT("uni-datetime-picker.endDate")},endTimeText(){return this.i18nT("uni-datetime-picker.endTime")},okText(){return this.i18nT("uni-datetime-picker.ok")},clearText(){return this.i18nT("uni-datetime-picker.clear")},showClearIcon(){return this.clearIcon&&!this.disabled&&(this.displayValue||this.displayRangeValue.startDate&&this.displayRangeValue.endDate)}},created(){this.initI18nT(),this.platform()},methods:{initI18nT(){const e=se(oe);this.i18nT=e.t},initPicker(e){if(!e&&!this.defaultValue||Array.isArray(e)&&!e.length)this.$nextTick((()=>{this.clear(!1)}));else if(Array.isArray(e)||this.isRange){const[t,a]=e;if(!t&&!a)return;const n=F(t),i=$(t,this.hideSecond),s=F(a),o=$(a,this.hideSecond),r=n,l=s;this.displayRangeValue.startDate=this.tempRange.startDate=r,this.displayRangeValue.endDate=this.tempRange.endDate=l,this.hasTime&&(this.displayRangeValue.startDate=`${n} ${i}`,this.displayRangeValue.endDate=`${s} ${o}`,this.tempRange.startTime=i,this.tempRange.endTime=o);const c={before:n,after:s};this.startMultipleStatus=Object.assign({},this.startMultipleStatus,c,{which:"right"}),this.endMultipleStatus=Object.assign({},this.endMultipleStatus,c,{which:"left"})}else e?(this.displayValue=this.inputDate=this.calendarDate=F(e),this.hasTime&&(this.pickerTime=$(e,this.hideSecond),this.displayValue=`${this.displayValue} ${this.pickerTime}`)):this.defaultValue&&(this.inputDate=this.calendarDate=F(this.defaultValue),this.hasTime&&(this.pickerTime=$(this.defaultValue,this.hideSecond)))},updateLeftCale(e){const t=this.$refs.left;t.cale.setHoverMultiple(e.after),t.setDate(this.$refs.left.nowDate.fullDate)},updateRightCale(e){const t=this.$refs.right;t.cale.setHoverMultiple(e.after),t.setDate(this.$refs.right.nowDate.fullDate)},platform(){if("undefined"!=typeof navigator)return void(this.isPhone=-1!==navigator.userAgent.toLowerCase().indexOf("mobile"));const{windowWidth:e}=uni.getSystemInfoSync();this.isPhone=e<=500,this.windowWidth=e},show(){if(this.$emit("show"),this.disabled)return;if(this.platform(),this.isPhone)return void setTimeout((()=>{this.$refs.mobile.open()}),0);this.pickerPositionStyle={top:"10px"};uni.createSelectorQuery().in(this).select(".uni-date-editor").boundingClientRect((e=>{this.windowWidth-e.left<this.datePopupWidth&&(this.pickerPositionStyle.right=0)})).exec(),setTimeout((()=>{if(this.pickerVisible=!this.pickerVisible,!this.isPhone&&this.isRange&&this.isFirstShow){this.isFirstShow=!1;const{startDate:e,endDate:t}=this.calendarRange;e&&t?this.diffDate(e,t)<30&&this.$refs.right.changeMonth("pre"):this.isPhone&&(this.$refs.right.cale.lastHover=!1)}}),50)},close(){setTimeout((()=>{this.pickerVisible=!1,this.$emit("maskClick",this.value),this.$refs.mobile&&this.$refs.mobile.close()}),20)},setEmit(e){"timestamp"!==this.returnType&&"date"!==this.returnType||(Array.isArray(e)?(this.hasTime||(e[0]=e[0]+" 00:00:00",e[1]=e[1]+" 00:00:00"),e[0]=this.createTimestamp(e[0]),e[1]=this.createTimestamp(e[1]),"date"===this.returnType&&(e[0]=new Date(e[0]),e[1]=new Date(e[1]))):(this.hasTime||(e+=" 00:00:00"),e=this.createTimestamp(e),"date"===this.returnType&&(e=new Date(e)))),this.$emit("update:modelValue",e),this.$emit("input",e),this.$emit("change",e),this.isEmitValue=!0},createTimestamp:e=>(e=J(e),Date.parse(new Date(e))),singleChange(e){this.calendarDate=this.inputDate=e.fulldate,this.hasTime||this.confirmSingleChange()},confirmSingleChange(){if(!H(this.inputDate)){const e=new Date;this.calendarDate=this.inputDate=F(e),this.pickerTime=$(e,this.hideSecond)}let e,t,a=!1;if(this.start){let n=this.start;"number"==typeof this.start&&(n=L(this.start,this.hideSecond)),[e,t]=n.split(" "),this.start&&!z(e,this.inputDate)&&(a=!0,this.inputDate=e)}let n,i,s=!1;if(this.end){let e=this.end;"number"==typeof this.end&&(e=L(this.end,this.hideSecond)),[n,i]=e.split(" "),this.end&&!z(this.inputDate,n)&&(s=!0,this.inputDate=n)}this.hasTime?(a&&(this.pickerTime=t||U(this.hideSecond)),s&&(this.pickerTime=i||U(this.hideSecond)),this.pickerTime||(this.pickerTime=$(Date.now(),this.hideSecond)),this.displayValue=`${this.inputDate} ${this.pickerTime}`):this.displayValue=this.inputDate,this.setEmit(this.displayValue),this.pickerVisible=!1},leftChange(e){const{before:t,after:a}=e.range;this.rangeChange(t,a);const n={before:e.range.before,after:e.range.after,data:e.range.data,fulldate:e.fulldate};this.startMultipleStatus=Object.assign({},this.startMultipleStatus,n),this.$emit("calendarClick",e)},rightChange(e){const{before:t,after:a}=e.range;this.rangeChange(t,a);const n={before:e.range.before,after:e.range.after,data:e.range.data,fulldate:e.fulldate};this.endMultipleStatus=Object.assign({},this.endMultipleStatus,n),this.$emit("calendarClick",e)},mobileChange(e){if(this.isRange){const{before:t,after:a}=e.range;if(!t)return;if(this.handleStartAndEnd(t,a,!0),this.hasTime){const{startTime:t,endTime:a}=e.timeRange;this.tempRange.startTime=t,this.tempRange.endTime=a}this.confirmRangeChange()}else this.hasTime?this.displayValue=e.fulldate+" "+e.time:this.displayValue=e.fulldate,this.setEmit(this.displayValue);this.$refs.mobile.close()},rangeChange(e,t){e&&t&&(this.handleStartAndEnd(e,t,!0),this.hasTime||this.confirmRangeChange())},confirmRangeChange(){if(!this.tempRange.startDate||!this.tempRange.endDate)return void(this.pickerVisible=!1);let e,t;H(this.tempRange.startDate)||(this.tempRange.startDate=F(Date.now())),H(this.tempRange.endDate)||(this.tempRange.endDate=F(Date.now()));let a,n,i=!1,s=!1;if(this.start){let e=this.start;"number"==typeof this.start&&(e=L(this.start,this.hideSecond)),[a,n]=e.split(" "),this.start&&!z(this.start,this.tempRange.startDate)&&(i=!0,this.tempRange.startDate=a),this.start&&!z(this.start,this.tempRange.endDate)&&(s=!0,this.tempRange.endDate=a)}let o,r,l=!1,c=!1;if(this.end){let e=this.end;"number"==typeof this.end&&(e=L(this.end,this.hideSecond)),[o,r]=e.split(" "),this.end&&!z(this.tempRange.startDate,this.end)&&(l=!0,this.tempRange.startDate=o),this.end&&!z(this.tempRange.endDate,this.end)&&(c=!0,this.tempRange.endDate=o)}this.hasTime?(i?this.tempRange.startTime=n||U(this.hideSecond):l&&(this.tempRange.startTime=r||U(this.hideSecond)),this.tempRange.startTime||(this.tempRange.startTime=$(Date.now(),this.hideSecond)),s?this.tempRange.endTime=n||U(this.hideSecond):c&&(this.tempRange.endTime=r||U(this.hideSecond)),this.tempRange.endTime||(this.tempRange.endTime=$(Date.now(),this.hideSecond)),e=this.displayRangeValue.startDate=`${this.tempRange.startDate} ${this.tempRange.startTime}`,t=this.displayRangeValue.endDate=`${this.tempRange.endDate} ${this.tempRange.endTime}`):(e=this.displayRangeValue.startDate=this.tempRange.startDate,t=this.displayRangeValue.endDate=this.tempRange.endDate),z(e,t)||([e,t]=[t,e]),this.displayRangeValue.startDate=e,this.displayRangeValue.endDate=t;const d=[e,t];this.setEmit(d),this.pickerVisible=!1},handleStartAndEnd(e,t,a=!1){if(!e)return;t||(t=e);const n=a?"tempRange":"range",i=z(e,t);this[n].startDate=i?e:t,this[n].endDate=i?t:e},dateCompare:(e,t)=>(e=new Date(e.replace("-","/").replace("-","/")))<=(t=new Date(t.replace("-","/").replace("-","/"))),diffDate(e,t){e=new Date(e.replace("-","/").replace("-","/"));const a=((t=new Date(t.replace("-","/").replace("-","/")))-e)/864e5;return Math.abs(a)},clear(e=!0){this.isRange?(this.displayRangeValue.startDate="",this.displayRangeValue.endDate="",this.tempRange.startDate="",this.tempRange.startTime="",this.tempRange.endDate="",this.tempRange.endTime="",this.isPhone?this.$refs.mobile&&this.$refs.mobile.clearCalender():(this.$refs.left&&this.$refs.left.clearCalender(),this.$refs.right&&this.$refs.right.clearCalender(),this.$refs.right&&this.$refs.right.changeMonth("next")),e&&(this.$emit("change",[]),this.$emit("input",[]),this.$emit("update:modelValue",[]))):(this.displayValue="",this.inputDate="",this.pickerTime="",this.isPhone?this.$refs.mobile&&this.$refs.mobile.clearCalender():this.$refs.pcSingle&&this.$refs.pcSingle.clearCalender(),e&&(this.$emit("change",""),this.$emit("input",""),this.$emit("update:modelValue","")))},calendarClick(e){this.$emit("calendarClick",e)}}};const me=A(he,[["render",function(t,n,i,s,o,r){const l=a(e.resolveDynamicComponent("uni-icons"),O),c=e.resolveComponent("time-picker"),d=e.resolveComponent("Calendar");return e.openBlock(),e.createElementBlock("view",{class:"uni-date"},[e.createElementVNode("view",{class:"uni-date-editor",onClick:n[1]||(n[1]=(...e)=>r.show&&r.show(...e))},[e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("view",{class:e.normalizeClass(["uni-date-editor--x",{"uni-date-editor--x__disabled":i.disabled,"uni-date-x--border":i.border}])},[o.isRange?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-date-x uni-date-range"},[e.createVNode(l,{class:"icon-calendar",type:"calendar",color:"#c0c4cc",size:"22"}),e.createElementVNode("view",{class:"uni-date__x-input text-center"},e.toDisplayString(o.displayRangeValue.startDate||r.startPlaceholderText),1),e.createElementVNode("view",{class:"range-separator"},e.toDisplayString(i.rangeSeparator),1),e.createElementVNode("view",{class:"uni-date__x-input text-center"},e.toDisplayString(o.displayRangeValue.endDate||r.endPlaceholderText),1)])):(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-date-x uni-date-single"},[e.createVNode(l,{class:"icon-calendar",type:"calendar",color:"#c0c4cc",size:"22"}),e.createElementVNode("view",{class:"uni-date__x-input"},e.toDisplayString(o.displayValue||r.singlePlaceholderText),1)])),r.showClearIcon?(e.openBlock(),e.createElementBlock("view",{key:2,class:"uni-date__icon-clear",onClick:n[0]||(n[0]=e.withModifiers(((...e)=>r.clear&&r.clear(...e)),["stop"]))},[e.createVNode(l,{type:"clear",color:"#c0c4cc",size:"22"})])):e.createCommentVNode("",!0)],2)]),!0)]),e.withDirectives(e.createElementVNode("view",{class:"uni-date-mask--pc",onClick:n[2]||(n[2]=(...e)=>r.close&&r.close(...e))},null,512),[[e.vShow,o.pickerVisible]]),o.isPhone?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("view",{key:0,ref:"datePicker",class:"uni-date-picker__container"},[o.isRange?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-date-range--x",style:e.normalizeStyle(o.pickerPositionStyle)},[e.createElementVNode("view",{class:"uni-popper__arrow"}),o.hasTime?(e.openBlock(),e.createElementBlock("view",{key:0,class:"popup-x-header uni-date-changed"},[e.createElementVNode("view",{class:"popup-x-header--datetime"},[e.withDirectives(e.createElementVNode("input",{class:"uni-date__input uni-date-range__input",type:"text","onUpdate:modelValue":n[7]||(n[7]=e=>o.tempRange.startDate=e),placeholder:r.startDateText},null,8,["placeholder"]),[[e.vModelText,o.tempRange.startDate]]),e.createVNode(c,{type:"time",modelValue:o.tempRange.startTime,"onUpdate:modelValue":n[9]||(n[9]=e=>o.tempRange.startTime=e),start:r.timepickerStartTime,border:!1,disabled:!o.tempRange.startDate,hideSecond:i.hideSecond},{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("input",{class:"uni-date__input uni-date-range__input",type:"text","onUpdate:modelValue":n[8]||(n[8]=e=>o.tempRange.startTime=e),placeholder:r.startTimeText,disabled:!o.tempRange.startDate},null,8,["placeholder","disabled"]),[[e.vModelText,o.tempRange.startTime]])])),_:1},8,["modelValue","start","disabled","hideSecond"])]),e.createVNode(l,{type:"arrowthinright",color:"#999",style:{"line-height":"40px"}}),e.createElementVNode("view",{class:"popup-x-header--datetime"},[e.withDirectives(e.createElementVNode("input",{class:"uni-date__input uni-date-range__input",type:"text","onUpdate:modelValue":n[10]||(n[10]=e=>o.tempRange.endDate=e),placeholder:r.endDateText},null,8,["placeholder"]),[[e.vModelText,o.tempRange.endDate]]),e.createVNode(c,{type:"time",modelValue:o.tempRange.endTime,"onUpdate:modelValue":n[12]||(n[12]=e=>o.tempRange.endTime=e),end:r.timepickerEndTime,border:!1,disabled:!o.tempRange.endDate,hideSecond:i.hideSecond},{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("input",{class:"uni-date__input uni-date-range__input",type:"text","onUpdate:modelValue":n[11]||(n[11]=e=>o.tempRange.endTime=e),placeholder:r.endTimeText,disabled:!o.tempRange.endDate},null,8,["placeholder","disabled"]),[[e.vModelText,o.tempRange.endTime]])])),_:1},8,["modelValue","end","disabled","hideSecond"])])])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"popup-x-body"},[e.createVNode(d,{ref:"left",showMonth:!1,"start-date":o.calendarRange.startDate,"end-date":o.calendarRange.endDate,range:!0,pleStatus:o.endMultipleStatus,onChange:r.leftChange,onFirstEnterCale:r.updateRightCale,style:{padding:"0 8px"}},null,8,["start-date","end-date","pleStatus","onChange","onFirstEnterCale"]),e.createVNode(d,{ref:"right",showMonth:!1,"start-date":o.calendarRange.startDate,"end-date":o.calendarRange.endDate,range:!0,onChange:r.rightChange,pleStatus:o.startMultipleStatus,onFirstEnterCale:r.updateLeftCale,style:{padding:"0 8px","border-left":"1px solid #F1F1F1"}},null,8,["start-date","end-date","onChange","pleStatus","onFirstEnterCale"])]),o.hasTime?(e.openBlock(),e.createElementBlock("view",{key:1,class:"popup-x-footer"},[e.createElementVNode("text",{onClick:n[13]||(n[13]=(...e)=>r.clear&&r.clear(...e))},e.toDisplayString(r.clearText),1),e.createElementVNode("text",{class:"confirm-text",onClick:n[14]||(n[14]=(...e)=>r.confirmRangeChange&&r.confirmRangeChange(...e))},e.toDisplayString(r.okText),1)])):e.createCommentVNode("",!0)],4)):(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-date-single--x",style:e.normalizeStyle(o.pickerPositionStyle)},[e.createElementVNode("view",{class:"uni-popper__arrow"}),o.hasTime?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-date-changed popup-x-header"},[e.withDirectives(e.createElementVNode("input",{class:"uni-date__input text-center",type:"text","onUpdate:modelValue":n[3]||(n[3]=e=>o.inputDate=e),placeholder:r.selectDateText},null,8,["placeholder"]),[[e.vModelText,o.inputDate]]),e.createVNode(c,{type:"time",modelValue:o.pickerTime,"onUpdate:modelValue":n[5]||(n[5]=e=>o.pickerTime=e),border:!1,disabled:!o.inputDate,start:r.timepickerStartTime,end:r.timepickerEndTime,hideSecond:i.hideSecond,style:{width:"100%"}},{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("input",{class:"uni-date__input text-center",type:"text","onUpdate:modelValue":n[4]||(n[4]=e=>o.pickerTime=e),placeholder:r.selectTimeText,disabled:!o.inputDate},null,8,["placeholder","disabled"]),[[e.vModelText,o.pickerTime]])])),_:1},8,["modelValue","disabled","start","end","hideSecond"])])):e.createCommentVNode("",!0),e.createVNode(d,{ref:"pcSingle",showMonth:!1,"start-date":o.calendarRange.startDate,"end-date":o.calendarRange.endDate,date:o.calendarDate,onChange:r.singleChange,"default-value":i.defaultValue,style:{padding:"0 8px"}},null,8,["start-date","end-date","date","onChange","default-value"]),o.hasTime?(e.openBlock(),e.createElementBlock("view",{key:1,class:"popup-x-footer"},[e.createElementVNode("text",{class:"confirm-text",onClick:n[6]||(n[6]=(...e)=>r.confirmSingleChange&&r.confirmSingleChange(...e))},e.toDisplayString(r.okText),1)])):e.createCommentVNode("",!0)],4))],512)),[[e.vShow,o.pickerVisible]]),o.isPhone?(e.openBlock(),e.createBlock(d,{key:1,ref:"mobile",clearDate:!1,date:o.calendarDate,defTime:r.mobileCalendarTime,"start-date":o.calendarRange.startDate,"end-date":o.calendarRange.endDate,selectableTimes:r.mobSelectableTime,startPlaceholder:i.startPlaceholder,endPlaceholder:i.endPlaceholder,"default-value":i.defaultValue,pleStatus:o.endMultipleStatus,showMonth:!1,range:o.isRange,hasTime:o.hasTime,insert:!1,hideSecond:i.hideSecond,onConfirm:r.mobileChange,onMaskClose:r.close,onChange:r.calendarClick},null,8,["date","defTime","start-date","end-date","selectableTimes","startPlaceholder","endPlaceholder","default-value","pleStatus","range","hasTime","hideSecond","onConfirm","onMaskClose","onChange"])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-17511ee3"]]);const pe=A({name:"UniDrawer",components:{},emits:["change"],props:{mode:{type:String,default:""},mask:{type:Boolean,default:!0},maskClick:{type:Boolean,default:!0},width:{type:Number,default:220}},data:()=>({visibleSync:!1,showDrawer:!1,rightMode:!1,watchTimer:null,drawerWidth:220}),created(){this.drawerWidth=this.width,this.rightMode="right"===this.mode},methods:{clear(){},close(e){("mask"!==e||this.maskClick)&&this.visibleSync&&this._change("showDrawer","visibleSync",!1)},open(){this.visibleSync||this._change("visibleSync","showDrawer",!0)},_change(e,t,a){this[e]=a,this.watchTimer&&clearTimeout(this.watchTimer),this.watchTimer=setTimeout((()=>{this[t]=a,this.$emit("change",a)}),a?50:300)}}},[["render",function(t,a,n,i,s,o){return s.visibleSync?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass([{"uni-drawer--visible":s.showDrawer},"uni-drawer"]),onTouchmove:a[1]||(a[1]=e.withModifiers(((...e)=>o.clear&&o.clear(...e)),["stop","prevent"]))},[e.createElementVNode("view",{class:e.normalizeClass(["uni-drawer__mask",{"uni-drawer__mask--visible":s.showDrawer&&n.mask}]),onClick:a[0]||(a[0]=e=>o.close("mask"))},null,2),e.createElementVNode("view",{class:e.normalizeClass(["uni-drawer__content",{"uni-drawer--right":s.rightMode,"uni-drawer--left":!s.rightMode,"uni-drawer__content--visible":s.showDrawer}]),style:e.normalizeStyle({width:s.drawerWidth+"px"})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)],34)):e.createCommentVNode("",!0)}],["__scopeId","data-v-8b8b609c"]]);function fe(e){return d({url:"/act/task/list",method:"get",data:e})}function ge(e){return d({url:"/act/task/taskHistoryList",method:"get",data:e})}function ye(e){return d({url:"/act/task/myApplyProcessList",method:"get",data:e})}function ve(e){return d({url:"/cxcoagwfb/cxcOaGwfb/bpmlist",method:"get",data:e})}function we(e){return d({url:"/cxctz/cxcTz/list",method:"get",data:e})}function ke(e){return d({url:"/cxcoaflgf/cxcOaFlgf/zslist",method:"get",data:e})}function be(e){return d({url:"/cxcjyglsjzdgl/cxcJyglSjzdgl/zslist",method:"get",data:e})}function _e(e){return d({url:"/cxczd/cxcZdgl/list",method:"get",data:e})}function Se(e){return d({url:"/process/extActFlowData/getProcessInfo",method:"get",data:e})}function Ee(e){return d({url:"/act/task/processHistoryList",method:"get",data:e})}function xe(e){return d({url:"/act/task/processComplete",method:"post",data:e})}const Ne=A({__name:"customNav",setup(t){e.useCssVars((e=>({bc08538a:a})));const a=wx.getSystemInfoSync().statusBarHeight+44+"px";return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:""},[e.createElementVNode("view",{class:"nav"},[e.renderSlot(t.$slots,"default",{},void 0,!0)]),e.createElementVNode("view",{class:"place"})]))}},[["__scopeId","data-v-566e182b"]]),Ve="https://36.112.48.190/jeecg-boot/sys/common/static/",Ce=(e,t,a)=>{uni.showToast({title:e,icon:t||"none",duration:a||2e3})},Te=(e,a)=>{u({token:P().token,type:"mobile"}).then((t=>{var n;if(t.success){De((null==(n=t.result)?void 0:n.menu)||[]).some((t=>-1!==e.indexOf(t)))?a():Ce("无查看权限!")}})).catch((e=>{t("log","at utils/index.js:35","err@",e)}))},De=(e,t=[])=>e.length?(e.forEach((e=>{e.children&&t.push(...De(e.children)),t.push(e.path)})),t):[];function Be(e){t("log","at utils/index.js:78","url",e);var a=plus.downloader.createDownload(e,{filename:`_downloads/wgt-${Date.now()}.wgt`},(function(e,a){if(200==a){var n=plus.io.convertLocalFileSystemURL(e.filename);t("log","at utils/index.js:86","fileSaveUrl",n),i=n,plus.runtime.install(i,{force:!0},(()=>{uni.showModal({title:"更新",content:"更新成功,请点击确认后重启",showCancel:!1,success(e){e.confirm&&plus.runtime.restart()}})}),(()=>uni.showToast({title:"安装失败!",icon:"error"})))}else plus.downloader.clear(),uni.showToast({title:"App下载失败!",icon:"error"});var i}));let n=plus.nativeUI.showWaiting("正在下載");a.start(),a.addEventListener("statechanged",((e,t)=>{switch(e.state){case 1:n.setTitle("正在下载");break;case 2:n.setTitle("已连接到服务器");break;case 3:parseInt(parseFloat(e.downloadedSize)/parseFloat(e.totalSize)*100),n.setTitle(" 正在下载");break;case 4:plus.nativeUI.closeWaiting()}}))}const Ie=()=>{let e=new Date;return(new Date).getTime(),`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,0)}-${e.getDate().toString().padStart(2,0)}`},Pe=()=>{const e=P();uni.getLocation({type:"wgs84",success:function(a){uni.request({url:"http://api.tianditu.gov.cn/geocoder",method:"GET",data:{postStr:JSON.stringify({lon:a.longitude,lat:a.latitude,ver:1}),type:"geocode",tk:"30fe0f0c1b2320e112bde797f3ddaff4"},success:function(n){let i=n.data;if(0==i.status){const t=i.result.addressComponent;let n=t.city?t.city:t.province;uni.setStorageSync("position",n),e.setPosition(n),Ae(a.latitude,a.longitude)}else t("log","at utils/index.js:224",i.message)},fail:function(e){Ce("获取定位失败"),t("log","at utils/index.js:229","地址解析失败"+e)}})}})},Ae=(e,t)=>{P();let a={};a.lat=e,a.lon=t,Me(a)},Me=e=>{const a=P();uni.request({url:"https://api.openweathermap.org/data/2.5/weather",method:"GET",data:{...e,appid:"600a60694b0e453dfbaafa862f1d1482",lang:"zh_cn"},success:function(e){uni.setStorageSync("wendu",Math.round(e.data.main.temp-273.15)),uni.setStorageSync("wenduIcon",e.data.weather[0].icon),a.setWeather(Math.round(e.data.main.temp-273.15),e.data.weather[0].icon)},fail:function(e){Ce("天气获取失败"),t("log","at utils/index.js:270","天气获取失败"+e)}})},Re=e=>{uni.downloadFile({url:Ve+e,success:function(e){var t=e.tempFilePath;uni.openDocument({filePath:t,showMenu:!0,fail:function(e){Ce(e.errMsg)}})},fail:function(e){t("error","at utils/index.js:289","文件下载失败",e)}})},Oe=e=>`https://36.112.48.190/jeecg-boot/sys/common/static//${e}`,Le=A({__name:"index",setup(n){e.useCssVars((e=>({"3ced4932":f})));const s=P();i((()=>{c(),E(),V()}));const o=e.ref([]),c=()=>{var e;(e={zslb:6},d({url:"/CxcDaping/cxcDaping/list",method:"get",data:e})).then((e=>{if(e.success){let t=e.result.records[0].wenjian.split(",");o.value=t.map((e=>"https://36.112.48.190/jeecg-boot/sys/common/static/"+e))}}))},u=e.ref(0),h=e.ref(0),m=["公文","公告","制度","法规"],p=e=>{h.value=e,k=1,b=!1,_.value=[],x()},f=wx.getSystemInfoSync().statusBarHeight+44+"px",g=e.ref(null),y=e=>{g.value.close(),v(e)},v=(e,t,a,n)=>{if(!t||1!=t||"detail"!=n){if(t&&3==t&&a)return Re(a.mingcheng);t&&2==t&&(e+=`&zhiduid=${h.value}`),Te(e,(()=>{uni.navigateTo({url:e})}))}},w=e.ref([{text:"我的任务",path:"/pages/task/index?id=0"},{text:"历史任务",path:"/pages/task/index?id=2"}]);let k=1,b=!1;const _=e.ref([]),S=e.ref([]),E=()=>{var e;d({url:"/zhgl_zbgl/zhglZbglZbb/homepageList",method:"get",data:e}).then((e=>{e.success&&(S.value=e.result.records.slice(0,2))})).catch((e=>{t("log","at pages/tab/index.vue:299","err",e)}))},x=()=>{b=!0,(0==h.value?_e:be)({pageNo:k,pageSize:15}).then((e=>{if(e.success){let t=0==h.value?"zbbm_dictText":"sbbm";_.value=[..._.value,...N(e.result.records,"zdmc",t,null)]}b=!1})).catch((e=>{t("log","at pages/tab/index.vue:332","err",e)}))},N=(e,t,a,n)=>(e.map((e=>{e._title=e[t],e._time=e[a],e._depart=e[n]})),e);l((()=>{k=1,b=!1,_.value=[],c(),E(),V(),uni.stopPullDownRefresh()}));const V=()=>{0==u.value?(b=!0,ve({pageNo:k,pageSize:15}).then((e=>{e.success&&(_.value=[..._.value,...N(e.result.records,"fwbt","fwtime",null)]),b=!1})).catch((e=>{t("log","at pages/tab/index.vue:273","err",e)}))):1==u.value?(b=!0,we({pageNo:k,pageSize:15}).then((e=>{e.success&&(_.value=[..._.value,...N(e.result.records,"neirong","fbdw","createTime")]),b=!1})).catch((e=>{t("log","at pages/tab/index.vue:288","err",e)}))):2==u.value?x():3==u.value&&(b=!0,ke({pageNo:k,pageSize:15}).then((e=>{e.success&&(_.value=[..._.value,...N(e.result.records,"flfgmc","ssbm",null)]),b=!1})).catch((e=>{t("log","at pages/tab/index.vue:315","err",e)})))};return r((()=>{b||(k++,V())})),(t,n)=>{const i=a(e.resolveDynamicComponent("uni-datetime-picker"),me),r=a(e.resolveDynamicComponent("uni-icons"),O),l=a(e.resolveDynamicComponent("uni-drawer"),pe);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(s).isgray}])},[e.createElementVNode("view",{class:"nav"},[e.createElementVNode("view",{class:"nav_box f-row aic jcb"},[e.createElementVNode("view",{class:"menu",onClick:n[0]||(n[0]=e=>{g.value.open()})},[e.createElementVNode("image",{src:"/static/index/menu.png",mode:""})]),e.createElementVNode("view",{class:"weather_calender f-row aic"},[e.createElementVNode("view",{class:"position f-row aic"},[e.createElementVNode("image",{src:"/static/index/position.png",mode:""}),e.createElementVNode("text",null,e.toDisplayString(e.unref(s).position?e.unref(s).position:"暂未定位"),1)]),e.createElementVNode("view",{class:"position f-row aic"},[e.createElementVNode("image",{style:{height:"80rpx",width:"80rpx"},src:`http://openweathermap.org/img/w/${e.unref(s).wenduIcon}.png`,mode:""},null,8,["src"]),e.createElementVNode("text",null,e.toDisplayString(e.unref(s).wendu)+"℃",1)]),e.createVNode(i,{type:"date"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"position f-row aic"},[e.createElementVNode("image",{src:"/static/index/calendar.png",mode:""}),e.createElementVNode("text",null,e.toDisplayString(e.unref(Ie)()),1)])])),_:1})])])]),e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("swiper",{class:"swiper",autoplay:""},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,((t,a)=>(e.openBlock(),e.createElementBlock("swiper-item",{key:a,class:"swiper-item"},[e.createElementVNode("image",{src:t,mode:"aspectFill"},null,8,["src"])])))),128))])]),e.createElementVNode("view",{class:"wrapper f-col aic"},[e.createElementVNode("view",{class:"onduty"},[e.createElementVNode("view",{class:"title f-row aic jcb"},[e.createTextVNode(" 值班信息 "),e.createElementVNode("view",{class:"more",onClick:n[1]||(n[1]=e=>v("/pages/zhiban/index"))},[e.createTextVNode(" 查看更多 "),e.createElementVNode("image",{src:"/static/index/back.png",mode:""})])]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"info_title f-row aic"},[e.createElementVNode("view",{class:""}," 日期 "),e.createElementVNode("view",{class:""}," 带班领导 "),e.createElementVNode("view",{class:""}," 值班领导 "),e.createElementVNode("view",{class:""}," 值班干部 ")]),e.createElementVNode("view",{class:"data_box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["data"," f-row","aic",{first:0==a}])},[e.createElementVNode("view",{class:""},e.toDisplayString(t.date),1),e.createElementVNode("view",{class:""},e.toDisplayString(t.dbld_dictText),1),e.createElementVNode("view",{class:""},e.toDisplayString(t.zbld_dictText),1),e.createElementVNode("view",{class:""},e.toDisplayString(t.zbgbrealname),1)],2)))),256))])])]),e.createElementVNode("view",{class:"list_wrapper"},[e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:"list_title f-row aic jca"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,((t,a)=>e.createElementVNode("view",{class:e.normalizeClass({active:u.value==a}),onClick:e=>(e=>{u.value=e,k=1,b=!1,_.value=[],V()})(a)},e.toDisplayString(t),11,["onClick"]))),64))]),2==u.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-row aic zhidu"},[e.createElementVNode("view",{class:e.normalizeClass({active:0==h.value}),onClick:n[2]||(n[2]=e=>p(0))}," 厂级制度 ",2),e.createElementVNode("view",{class:e.normalizeClass({active:1==h.value}),onClick:n[3]||(n[3]=e=>p(1))}," 上级制度 ",2)])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{style:{"padding-top":"24rpx"},class:"more",onClick:n[4]||(n[4]=e=>v(`/pages/document/index?id=${u.value}`,u.value))},[e.createTextVNode(" 查看更多 "),e.createElementVNode("image",{src:"/static/index/back.png",mode:""})]),e.createElementVNode("view",{class:"list_box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"list",key:a,onClick:e=>v(`/pages/document/detail?data=${JSON.stringify(t)}&id=${u.value}`,u.value,t,"detail")},[e.createElementVNode("view",{class:"topic"},e.toDisplayString(t._title),1),t._time||t._depart?(e.openBlock(),e.createElementBlock("view",{key:0,class:"time_Box f-row aic"},[t._time?(e.openBlock(),e.createElementBlock("view",{key:0,class:"time"},e.toDisplayString(t._time),1)):e.createCommentVNode("",!0),t._depart?(e.openBlock(),e.createElementBlock("view",{key:1,class:"look f-row aic"},e.toDisplayString(t._depart),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],8,["onClick"])))),128))])])]),e.createVNode(l,{ref_key:"showLeft",ref:g,mode:"left",width:156},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"menu_list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"f-row aic jcb",key:a,onClick:e=>y(t.path)},[e.createElementVNode("text",null,e.toDisplayString(t.text),1),e.createVNode(r,{type:"right",size:"20",color:"#333333"})],8,["onClick"])))),128))])])),_:1},512)],2)}}},[["__scopeId","data-v-9d755f89"]]),Fe={__name:"office",setup(a){e.useCssVars((e=>({"3924a663":i})));const n=P();new Array(7).fill(0).map(((e,t)=>t)),e.ref([]);const i=wx.getSystemInfoSync().statusBarHeight+44+"px";o((()=>{c()}));const s=e.ref([]),r=e.ref([]),l=e.ref([]),c=()=>{u({token:n.token,type:"mobile"}).then((e=>{var t,a,n;if(e.success){let i=e.result.menu;i.map((e=>e.children=null==e?void 0:e.children.filter((e=>{var t;return null==(t=null==e?void 0:e.meta)?void 0:t.icon})))),i=i.filter((e=>{var t;return null==(t=null==e?void 0:e.children)?void 0:t.length})),l.value=null==(a=null==(t=i[0])?void 0:t.meta)?void 0:a.title,s.value=i,r.value=null==(n=i.slice(0,1)[0])?void 0:n.children}})).catch((e=>{t("log","at pages/tab/office.vue:103",e)}))};return(t,a)=>{var i,o,l;return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(n).isgray})},[e.createElementVNode("view",{class:"nav"}),e.createElementVNode("view",{class:"placeholder"}),(null==(i=r.value)?void 0:i.length)||(null==(o=s.value)?void 0:o.length)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"title f-col aic",style:{"padding-top":"30rpx"}}," 暂无权限,请联系管理员! ")),e.createElementVNode("view",{class:"content"},[(null==(l=s.value)?void 0:l.length)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.meta.title),1),e.createElementVNode("view",{class:"info_box f-row aic"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.children,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"info f-col aic",onClick:e=>{return a=t.path,void Te(a,(()=>{uni.navigateTo({url:a})}));var a},key:a},[e.createElementVNode("view",{class:"img f-row aic"},[e.createElementVNode("image",{src:`../../static/office/${t.meta.icon}.png`},null,8,["src"])]),e.createElementVNode("view",{class:"text"},e.toDisplayString(t.meta.title),1)],8,["onClick"])))),128))])])))),128))])):e.createCommentVNode("",!0)])],2)}}},$e=A(Fe,[["__scopeId","data-v-dc6eb4fe"]]),je=A({__name:"dataCom",props:{title:{type:String,default:""},list:{type:Array,default:function(){return[]}}},setup(t){e.useCssVars((e=>({"09ebbe2f":s.value})));const n=t,i=e.ref(!1),s=e.ref(null);return e.watch((()=>n.list),(()=>{e.nextTick((()=>{uni.createSelectorQuery().select(".data_box").boundingClientRect((e=>{s.value=((null==e?void 0:e.height)||0)+"px"})).exec()}))}),{immediate:!0}),(n,s)=>{const o=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:""},[e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"item_box"},[e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"title_box f-row aic jcb"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t.title),1),t.list.length>6?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-row aic more",onClick:s[0]||(s[0]=e=>i.value=!i.value)},[e.createElementVNode("text",null,e.toDisplayString(i.value?"收起":"展开"),1),i.value?(e.openBlock(),e.createBlock(o,{key:1,type:"up",color:"#999999"})):(e.openBlock(),e.createBlock(o,{key:0,type:"down",color:"#999999"}))])):e.createCommentVNode("",!0)]),e.createElementVNode("view",{class:e.normalizeClass(["data_wrapper",{close:t.list.length>6&&i.value}])},[e.createElementVNode("view",{class:"data_box f-row aic"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"data f-col aic"},[e.createElementVNode("view",{class:""},e.toDisplayString(null==t?void 0:t.dailyVolume),1),e.createElementVNode("text",null,e.toDisplayString(t.gas),1)])))),256))])],2)])])])])}}},[["__scopeId","data-v-40acdf41"]]),Ue=A({__name:"product",setup(a){e.useCssVars((e=>({"4b26338b":l})));const n=P(),i=[{gas:"今日进气总量",dailyVolume:"28392"},{gas:"今日进气总量",dailyVolume:"28392"},{gas:"今日输差百分数",dailyVolume:"0.32"},{gas:"实时进气总量",dailyVolume:"28392"},{gas:"实时进气总量",dailyVolume:"28392"},{gas:"实时输差百分数",dailyVolume:"0.32"}],s=e.ref([]);let r;o((()=>{c()}));const l=wx.getSystemInfoSync().statusBarHeight+44+"px",c=()=>{var e;d({url:"/scdt.cxcscdtjldrb/cxcScdtJldRb/indexChartScdtData",method:"get",data:e}).then((e=>{e.success&&(s.value=u(e.result.today),r=[{text:"安全管理",img:"../../static/tab/anquan.png",path:"/pages/safe/manage"},{text:"生产数据",img:"../../static/tab/product.png",path:`/pages/product/index?shishi=${JSON.stringify(i)}&product=${JSON.stringify(s.value)}`},{text:"运输管理",img:"../../static/tab/yunshu.png",path:""},{text:"设备台账",img:"../../static/tab/taizhang.png",path:""},{text:"车辆派遣",img:"../../static/tab/cheliang.png",path:""},{text:"事项审批",img:"../../static/tab/shenpi.png",path:""}])})).catch((e=>{t("log","at pages/tab/product.vue:112",e)}))},u=e=>{let t=new Map;return e.forEach((e=>{if(t.has(e.gas)){let a=t.get(e.gas);t.set(e.gas,{...e,dailyVolume:Number(e.dailyVolume+ +a.dailyVolume).toFixed(4)})}else t.set(e.gas,e)})),[...t.values()]};return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(n).isgray})},[e.createElementVNode("view",{class:"nav"}),e.createElementVNode("view",{class:"content"},[e.createElementVNode("view",{class:"info f-col aic"},[e.createElementVNode("view",{class:"item_box"},[e.createVNode(je,{title:"实时输差",list:i}),e.createVNode(je,{title:"偏远计量点",list:i}),e.createVNode(je,{title:"生产实时数据",list:s.value},null,8,["list"]),e.createElementVNode("view",{class:"item"},[e.createElementVNode("view",{class:"title_box other f-row aic jcb"},[e.createElementVNode("view",{class:"title"}," 其他信息 ")]),e.createElementVNode("view",{class:"other_box f-row aic"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"data",key:a,onClick:e=>{return a=t.path,void Te(a,(()=>{a&&uni.navigateTo({url:a})}));var a}},[e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("image",{src:t.img,mode:""},null,8,["src"]),e.createElementVNode("view",{class:""},e.toDisplayString(t.text),1)])],8,["onClick"])))),128))])])])])])],2))}},[["__scopeId","data-v-43ccc1f0"]]),{registerUTSInterface:ze,initUTSProxyClass:He,initUTSProxyFunction:qe,initUTSPackageName:Je,initUTSIndexClassName:We,initUTSClassName:Ye}=uni,Ke="wuwxStepCounter",Ge=qe(!1,{moduleName:"计步器(兼容Android和iOS)",moduleType:"",errMsg:"",main:!0,package:Je(Ke,true),class:We(Ke,true),name:"startStepCountingUpdatesByJs",params:[{name:"options",type:"UTSSDKModulesWuwxStepCounterStartStepCountingUpdatesOptionsJSONObject"}],return:""}),Qe=A({__name:"my",setup(a){const n=P(),s=e.ref(0);Ge({handler:(e,t,a)=>{s.value=e}});const o=e.ref(plus.runtime.version),r=e.ref([{img:"../../static/my/xiaoxi.png",text:"接受消息推送",path:""}]),l=e.ref(!1),c=e.ref(n.positionSwitch),d=e=>{e&&Te(e,(()=>{uni.navigateTo({url:e})}))},u=e=>{uni.navigateTo({url:e})},h=()=>{c.value=!c.value,uni.setStorageSync("positionSwitch",c.value),n.setPositionSwitch(c.value),c.value||Ce("定位已关闭"),Pe()},m=()=>{uni.scanCode({success:function(e){t("log","at pages/tab/my.vue:169","扫码结果",e)}})};i((()=>{f()}));const p=e.ref(0),f=()=>{fe({pageNo:1,pageSize:4,_t:(new Date).getTime()}).then((e=>{e.success&&(p.value=e.result.total)}))};return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(n).isgray})},[e.createElementVNode("view",{class:"nav"},[e.createElementVNode("view",{class:"user f-row aic"},[e.createElementVNode("view",{class:"avatar"},[e.createElementVNode("image",{onClick:a[0]||(a[0]=e=>u("/pages/useredit/useredit")),src:e.unref(Oe)(e.unref(n).userinfo.avatar),mode:""},null,8,["src"])]),e.createElementVNode("view",{class:"f-row aic jcb right"},[e.createElementVNode("view",{class:"name_job",onClick:a[1]||(a[1]=e=>u("/pages/useredit/useredit"))},[e.createElementVNode("view",{class:"f-row aic"},[e.createElementVNode("view",{class:"name"},e.toDisplayString(e.unref(n).userinfo.realname),1)]),e.createElementVNode("view",{class:"job"},e.toDisplayString(e.unref(n).role),1)]),e.createElementVNode("view",{class:"shezhi"},[e.createElementVNode("image",{onClick:m,style:{width:"50rpx",height:"50rpx","margin-right":"20rpx"},src:"/static/tab/scan.png"})])])]),e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"msg f-row aic jca"},[e.createElementVNode("view",{class:"box f-col aic",onClick:a[2]||(a[2]=e=>d("/pages/task/todotask"))},[e.createElementVNode("view",{class:"num"},e.toDisplayString(p.value),1),e.createElementVNode("text",null,"今日待办任务")]),e.createElementVNode("view",{class:"box f-col aic"},[e.createElementVNode("view",{class:"num"},e.toDisplayString(s.value),1),e.createElementVNode("text",null,"步数")]),e.createElementVNode("view",{class:"box f-col aic",onClick:a[3]||(a[3]=e=>d("/pages/useredit/addressbook"))},[e.createElementVNode("view",{class:"num"}," 34 "),e.createElementVNode("text",null,"通讯录")])])])]),e.createElementVNode("view",{class:"operate"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,((t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"f-row aic jcb item",key:n,onClick:e=>d(t.path)},[e.createElementVNode("view",{class:"left f-row aic"},[e.createElementVNode("image",{src:t.img,mode:""},null,8,["src"]),e.createElementVNode("text",null,e.toDisplayString(t.text),1)]),e.createElementVNode("view",{class:"right f-row aic"},[e.withDirectives(e.createElementVNode("view",{class:"switch",onClick:a[4]||(a[4]=e=>l.value=!l.value)},[e.withDirectives(e.createElementVNode("image",{src:"/static/my/open.png",mode:""},null,512),[[e.vShow,l.value]]),e.withDirectives(e.createElementVNode("image",{src:"/static/my/close.png",mode:""},null,512),[[e.vShow,!l.value]])],512),[[e.vShow,0==n]]),e.withDirectives(e.createElementVNode("view",{class:"switch",onClick:h},[e.withDirectives(e.createElementVNode("image",{src:"/static/my/open.png",mode:""},null,512),[[e.vShow,c.value]]),e.withDirectives(e.createElementVNode("image",{src:"/static/my/close.png",mode:""},null,512),[[e.vShow,!c.value]])],512),[[e.vShow,2==n]]),e.withDirectives(e.createElementVNode("view",{class:"version"}," 当前版本v"+e.toDisplayString(o.value),513),[[e.vShow,3==n]])])],8,["onClick"])))),128))])],2))}},[["__scopeId","data-v-41cd4ade"]]),Ze=A({__name:"tasklistCom",props:{taskArr:{type:Array,default:()=>[]},currentIndex:{type:Number,default:0}},emits:["jump"],setup(t,{emit:a}){const{proxy:n}=e.getCurrentInstance(),i=a,s=e=>{i("jump",e)},o=e=>{var t;(t={taskId:e},d({url:"/act/task/claim",method:"put",data:t})).then((e=>{e.success&&(n.$toast(e.message),setTimeout((function(){uni.redirectTo({url:"./index?id=0"})}),500))}))};return(a,n)=>(e.openBlock(),e.createElementBlock("view",{class:"list_box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.taskArr,((a,n)=>(e.openBlock(),e.createElementBlock("view",{class:"list",key:n,onClick:e=>s(`/pages/task/handle?info=${JSON.stringify(a)}&type=${t.currentIndex}`)},[e.createElementVNode("view",{class:"title f-row aic jcb"},[e.createElementVNode("view",null,[e.createElementVNode("view",null,e.toDisplayString(a.bpmBizTitle),1)]),e.createElementVNode("text",null,e.toDisplayString(a.durationStr),1)]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",null," 申请理由:"+e.toDisplayString(a.bpmBizTitle),1),e.createElementVNode("view",null," 当前环节:"+e.toDisplayString(a.taskName),1),e.createElementVNode("view",null," 流程名称:"+e.toDisplayString(a.processDefinitionName),1),e.createElementVNode("view",null," 发起人:"+e.toDisplayString(a.processApplyUserName),1),e.createElementVNode("view",null," 开始时间:"+e.toDisplayString(a.taskBeginTime),1),1==t.currentIndex?(e.openBlock(),e.createElementBlock("view",{key:0}," 结束时间:"+e.toDisplayString(a.taskEndTime),1)):e.createCommentVNode("",!0)]),0==t.currentIndex&&a.taskAssigneeName?(e.openBlock(),e.createElementBlock("view",{key:0,class:"btn f-row aic jcb"},[e.createElementVNode("view",{class:"entrust",onClick:e.withModifiers((e=>s(`/pages/userlist/index?isradio=1&id=${a.id}`)),["stop"])}," 委托 ",8,["onClick"]),e.createElementVNode("view",{class:"handle",onClick:e=>s(`/pages/task/handle?info=${JSON.stringify(a)}&type=${t.currentIndex}`)}," 办理 ",8,["onClick"])])):e.createCommentVNode("",!0),0!=t.currentIndex||a.taskAssigneeName?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:1,class:"btn f-row aic jcb"},[e.createElementVNode("view"),e.createElementVNode("view",{class:"handle",onClick:e=>o(a.id)}," 签收 ",8,["onClick"])]))],8,["onClick"])))),128))]))}},[["__scopeId","data-v-31891b43"]]),Xe=A({__name:"index",setup(a){const n=P();let s="";o((e=>{d.value=+e.id,s=e.title})),i((()=>{p.value=[],u=1,h=10,m=!1,f()}));const c=e.ref([{text:"我的任务",id:0},{text:"历史任务",id:1}]);e.ref("");const d=e.ref(0);let u=1,h=10,m=!1;const p=e.ref([]),f=()=>{m=!0,uni.showLoading({title:"加载中..."}),(0==d.value?fe:ge)({pageNo:u,pageSize:h,_t:(new Date).getTime(),processDefinitionName:s}).then((e=>{var t;if(e.success){if(!e.result.records.length)return Ce("没有更多了~");p.value=[...p.value,...(null==(t=null==e?void 0:e.result)?void 0:t.records)||[]],m=!1}})).catch((e=>{t("log","at pages/task/index.vue:84",e)}))};r((()=>{m||(u++,f())})),l((()=>{u=1,h=10,m=!1,p.value=[],f(),uni.stopPullDownRefresh()}));const g=e=>{Te(e,(()=>{uni.navigateTo({url:e})}))};return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(n).isgray})},[e.createElementVNode("view",{class:"nav"},[e.createElementVNode("view",{class:"tab_box f-row aic jca"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({active:a==d.value}),key:a,onClick:e=>(e=>{p.value=[],u=1,h=10,m=!1,d.value=e,f()})(a)},e.toDisplayString(t.text),11,["onClick"])))),128))])]),e.createElementVNode("view",{class:"tasklist"},[e.createVNode(Ze,{onJump:g,taskArr:p.value,currentIndex:d.value},null,8,["taskArr","currentIndex"])])],2))}},[["__scopeId","data-v-965734c1"]]);class et{constructor(e,t){this.options=e,this.animation=uni.createAnimation({...e}),this.currentStepAnimates={},this.next=0,this.$=t}_nvuePushAnimates(e,t){let a=this.currentStepAnimates[this.next],n={};if(n=a||{styles:{},config:{}},tt.includes(e)){n.styles.transform||(n.styles.transform="");let a="";"rotate"===e&&(a="deg"),n.styles.transform+=`${e}(${t+a}) `}else n.styles[e]=`${t}`;this.currentStepAnimates[this.next]=n}_animateRun(e={},t={}){let a=this.$.$refs.ani.ref;if(a)return new Promise(((n,i)=>{nvueAnimation.transition(a,{styles:e,...t},(e=>{n()}))}))}_nvueNextAnimate(e,t=0,a){let n=e[t];if(n){let{styles:i,config:s}=n;this._animateRun(i,s).then((()=>{t+=1,this._nvueNextAnimate(e,t,a)}))}else this.currentStepAnimates={},"function"==typeof a&&a(),this.isEnd=!0}step(e={}){return this.animation.step(e),this}run(e){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((()=>{"function"==typeof e&&e()}),this.$.durationTime)}}const tt=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"];function at(e,t){if(t)return clearTimeout(t.timer),new et(e,t)}tt.concat(["opacity","backgroundColor"],["width","height","left","right","top","bottom"]).forEach((e=>{et.prototype[e]=function(...t){return this.animation[e](...t),this}}));const nt=A({name:"uniTransition",emits:["click","change"],props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:()=>"fade"},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})},customClass:{type:String,default:""},onceRender:{type:Boolean,default:!1}},data:()=>({isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}),watch:{show:{handler(e){e?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject(){let e={...this.styles,"transition-duration":this.duration/1e3+"s"},t="";for(let a in e){t+=this.toLine(a)+":"+e[a]+";"}return t},transformStyles(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init(e={}){e.duration&&(this.durationTime=e.duration),this.animation=at(Object.assign(this.config,e),this)},onClick(){this.$emit("click",{detail:this.isShow})},step(e,a={}){if(this.animation){for(let a in e)try{"object"==typeof e[a]?this.animation[a](...e[a]):this.animation[a](e[a])}catch(Sa){t("error","at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:148",`方法 ${a} 不存在`)}return this.animation.step(a),this}},run(e){this.animation&&this.animation.run(e)},open(){clearTimeout(this.timer),this.transform="",this.isShow=!0;let{opacity:e,transform:t}=this.styleInit(!1);void 0!==e&&(this.opacity=e),this.transform=t,this.$nextTick((()=>{this.timer=setTimeout((()=>{this.animation=at(this.config,this),this.tranfromInit(!1).step(),this.animation.run(),this.$emit("change",{detail:this.isShow})}),20)}))},close(e){this.animation&&this.tranfromInit(!0).step().run((()=>{this.isShow=!1,this.animationData=null,this.animation=null;let{opacity:e,transform:t}=this.styleInit(!1);this.opacity=e||1,this.transform=t,this.$emit("change",{detail:this.isShow})}))},styleInit(e){let t={transform:""},a=(e,a)=>{"fade"===a?t.opacity=this.animationType(e)[a]:t.transform+=this.animationType(e)[a]+" "};return"string"==typeof this.modeClass?a(e,this.modeClass):this.modeClass.forEach((t=>{a(e,t)})),t},tranfromInit(e){let t=(e,t)=>{let a=null;"fade"===t?a=e?0:1:(a=e?"-100%":"0","zoom-in"===t&&(a=e?.8:1),"zoom-out"===t&&(a=e?1.2:1),"slide-right"===t&&(a=e?"100%":"0"),"slide-bottom"===t&&(a=e?"100%":"0")),this.animation[this.animationMode()[t]](a)};return"string"==typeof this.modeClass?t(e,this.modeClass):this.modeClass.forEach((a=>{t(e,a)})),this.animation},animationType:e=>({fade:e?0:1,"slide-top":`translateY(${e?"0":"-100%"})`,"slide-right":`translateX(${e?"0":"100%"})`,"slide-bottom":`translateY(${e?"0":"100%"})`,"slide-left":`translateX(${e?"0":"-100%"})`,"zoom-in":`scaleX(${e?1:.8}) scaleY(${e?1:.8})`,"zoom-out":`scaleX(${e?1:1.2}) scaleY(${e?1:1.2})`}),animationMode:()=>({fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}),toLine:e=>e.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(t,a,n,i,s,o){return e.withDirectives((e.openBlock(),e.createElementBlock("view",{ref:"ani",animation:s.animationData,class:e.normalizeClass(n.customClass),style:e.normalizeStyle(o.transformStyles),onClick:a[0]||(a[0]=(...e)=>o.onClick&&o.onClick(...e))},[e.renderSlot(t.$slots,"default")],14,["animation"])),[[e.vShow,s.isShow]])}]]),it={name:"uniPopup",components:{},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},borderRadius:{type:String}},watch:{type:{handler:function(e){this.config[e]&&this[this.config[e]](!0)},immediate:!0},isDesktop:{handler:function(e){this.config[e]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(e){this.mkclick=e},immediate:!0},isMaskClick:{handler:function(e){this.mkclick=e},immediate:!0},showPopup(e){}},data(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{backgroundColor:"transparent",borderRadius:this.borderRadius||"0",position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:"top"}},computed:{getStyles(){let e={backgroundColor:this.bg};return this.borderRadius,e=Object.assign(e,{borderRadius:this.borderRadius}),e},isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted(){(()=>{const{windowWidth:e,windowHeight:t,windowTop:a,safeArea:n,screenHeight:i,safeAreaInsets:s}=uni.getSystemInfoSync();this.popupWidth=e,this.popupHeight=t+(a||0),n&&this.safeArea?this.safeAreaInsets=s.bottom:this.safeAreaInsets=0})()},unmounted(){this.setH5Visible()},activated(){this.setH5Visible(!this.showPopup)},deactivated(){this.setH5Visible(!0)},created(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible(e=!0){},closeMask(){this.maskShow=!1},disableMask(){this.mkclick=!1},clear(e){e.stopPropagation(),this.clearPropagation=!0},open(e){if(this.showPopup)return;e&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(e)||(e=this.type),this.config[e]?(this[this.config[e]](),this.$emit("change",{show:!0,type:e})):t("error","at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:298","缺少类型:",e)},close(e){this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showPopup=!1}),300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top(e){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},e||(this.showPopup=!0,this.showTrans=!0,this.$nextTick((()=>{this.messageChild&&"message"===this.type&&this.messageChild.timerClose()})))},bottom(e){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},e||(this.showPopup=!0,this.showTrans=!0)},center(e){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center",borderRadius:this.borderRadius||"0"},e||(this.showPopup=!0,this.showTrans=!0)},left(e){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)},right(e){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)}}};const st=A(it,[["render",function(t,n,i,s,o,r){const l=a(e.resolveDynamicComponent("uni-transition"),nt);return o.showPopup?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["uni-popup",[o.popupstyle,r.isDesktop?"fixforpc-z-index":""]])},[e.createElementVNode("view",{onTouchstart:n[1]||(n[1]=(...e)=>r.touchstart&&r.touchstart(...e))},[o.maskShow?(e.openBlock(),e.createBlock(l,{key:"1",name:"mask","mode-class":"fade",styles:o.maskClass,duration:o.duration,show:o.showTrans,onClick:r.onTap},null,8,["styles","duration","show","onClick"])):e.createCommentVNode("",!0),e.createVNode(l,{key:"2","mode-class":o.ani,name:"content",styles:o.transClass,duration:o.duration,show:o.showTrans,onClick:r.onTap},{default:e.withCtx((()=>[e.createElementVNode("view",{class:e.normalizeClass(["uni-popup__wrapper",[o.popupstyle]]),style:e.normalizeStyle(r.getStyles),onClick:n[0]||(n[0]=(...e)=>r.clear&&r.clear(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)],6)])),_:3},8,["mode-class","styles","duration","show","onClick"])],32)],2)):e.createCommentVNode("",!0)}],["__scopeId","data-v-9c09fb6f"]]),ot={__name:"handle",setup(t){const n=P(),{proxy:i}=e.getCurrentInstance(),s=e.ref(null),r=e.ref("同意"),l=e.ref(null),c=e=>{l.value=e,s.value.open()},u=()=>{s.value.close()},h=e.ref(null),m=e.ref(""),p=e=>{var t;(t={taskId:e},d({url:"/process/extActProcessNode/getProcessNodeInfo",method:"get",data:t})).then((e=>{e.success&&(m.value=e.result.dataId,h.value=e.result.formUrlMobile)}))},f=()=>{uni.navigateBack()},g=e.ref(!1);let y=null;const v=()=>{if(!r.value.trim())return i.$toast("请输入审批意见");let e={};if(1==l.value){if(null==b.value)return i.$toast("请选择驳回节点");e.processModel=3,e.rejectModelNode=k.value[b.value].TASK_DEF_KEY_,w(e)}else g.value?Te("/pages/userlist/index",(()=>{u(),uni.navigateTo({url:`/pages/userlist/index?id=${x.value.id}&isradio=1&nextnode=${JSON.stringify(y)}&reason=${r.value}`})})):(e.processModel=1,w(e))},w=e=>{xe({taskId:x.value.id,reason:r.value,...e}).then((e=>{e.success&&(i.$toast(e.message),setTimeout((()=>{uni.navigateBack()}),2e3))}))},k=e.ref([]),b=e.ref(null),_=e=>{b.value=e.detail.value},S=e=>{var t;(t={taskId:x.value.id},d({url:"/act/task/getProcessTaskTransInfo",method:"get",data:t})).then((e=>{e.success&&(k.value=e.result.histListNode,y=e.result.transitionList)}))},E=e=>{var t;(t={procInstId:e},d({url:"/process/extActProcessNode/getHisProcessNodeInfo",method:"get",data:t})).then((e=>{e.success&&(m.value=e.result.dataId,h.value=e.result.formUrlMobile)}))},x=e.ref(null);let N=null;return o((e=>{if(x.value=JSON.parse(e.info),N=e.type,1==N)return E(x.value.processInstanceId);p(x.value.id),S()})),(t,i)=>{const o=a(e.resolveDynamicComponent("uni-icons"),O),d=a(e.resolveDynamicComponent("uni-popup"),st);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(n).isgray}])},[e.createVNode(Ne,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"f-row aic box"},[e.createElementVNode("view",{class:"back",onClick:f},[e.createVNode(o,{type:"left",size:"20",color:"#fff"})]),e.createElementVNode("view",{class:"avatar"},[e.createElementVNode("image",{src:e.unref(Oe)(e.unref(n).userinfo.avatar),mode:""},null,8,["src"])]),e.createElementVNode("view",{class:"name"},e.toDisplayString(x.value.processApplyUserName)+"的"+e.toDisplayString(x.value.processDefinitionName),1),0==e.unref(N)?(e.openBlock(),e.createElementBlock("view",{key:0,class:"status"}," 待审批 ")):(e.openBlock(),e.createElementBlock("view",{key:1,class:"status",style:{"background-color":"#7AC756"}}," 已处理 "))])])),_:1}),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),{dataId:m.value},null,8,["dataId"])),e.createElementVNode("view",{class:"btn f-row aic jcb"},[e.createElementVNode("view",{class:"refuse",onClick:i[0]||(i[0]=e=>c(1))}," 拒绝 "),e.createElementVNode("view",{class:"agree",onClick:i[1]||(i[1]=e=>c(2))}," 同意 ")]),e.createVNode(d,{ref_key:"popup",ref:s,type:"center"},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"popup"},[e.createElementVNode("view",{class:"title"}," 审批意见 "),e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"input f-col"},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":i[2]||(i[2]=e=>r.value=e),name:"",id:"",maxlength:"200",placeholder:"请输入"},null,512),[[e.vModelText,r.value]]),e.createElementVNode("view",{class:""},e.toDisplayString(r.value.length)+"/200 ",1)])]),2==l.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"agree_operate f-row aic",onClick:i[3]||(i[3]=e=>g.value=!g.value)},[g.value?(e.openBlock(),e.createElementBlock("image",{key:0,src:"/static/login/checked.png",mode:""})):(e.openBlock(),e.createElementBlock("image",{key:1,src:"/static/login/nocheck.png",mode:""})),e.createElementVNode("view",{class:""}," 指定下一步操作人 ")])):(e.openBlock(),e.createElementBlock("view",{key:1,class:""},[e.createElementVNode("picker",{value:b.value,range:k.value,"range-key":"NAME_",onChange:_},[e.createElementVNode("view",{class:"node"},e.toDisplayString(null!=b.value?k.value[b.value].NAME_:"请选择驳回节点"),1)],40,["value","range"])])),e.createElementVNode("view",{class:"popbtn f-row aic"},[e.createElementVNode("view",{class:"cancel",onClick:u}," 取消 "),e.createElementVNode("view",{class:"confirm",onClick:v}," 确定 ")])])])),_:1},512)],2)}}},rt=A(ot,[["__scopeId","data-v-fdf803b7"]]),lt=A({__name:"message_list",setup(t){const a=P();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(a).isgray})},[e.createElementVNode("view",{class:"list"},[e.createElementVNode("view",{class:"item f-row aic"},[e.createElementVNode("view",{class:"f-row aic"},[e.createElementVNode("image",{src:"/static/system.png",mode:""})]),e.createElementVNode("view",{class:"name_info"},[e.createElementVNode("view",{class:"name_time f-row aic jcb"},[e.createElementVNode("view",{class:"name"}," 系统通知 "),e.createElementVNode("view",{class:"time"}," 1分钟前 ")]),e.createElementVNode("view",{class:"info"}," 关于年假通知关于年假通知关于年假通知关于年假通知关于年假通知关于年假通知关于年假通知 ")])]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,((t,a)=>e.createElementVNode("view",{class:"item f-row aic",key:a,onClick:n[0]||(n[0]=e=>{var t;Te(t="/pages/talk/conversation",(()=>{uni.navigateTo({url:t})}))})},[e.createElementVNode("view",{class:"f-row aic"},[e.createElementVNode("image",{src:"",mode:""})]),e.createElementVNode("view",{class:"name_info"},[e.createElementVNode("view",{class:"name_time f-row aic jcb"},[e.createElementVNode("view",{class:"name"}," 系统通知 "),e.createElementVNode("view",{class:"time"}," 1分钟前 ")]),e.createElementVNode("view",{class:"info"}," 关于年假通知 ")])]))),64))])],2))}},[["__scopeId","data-v-f59fee84"]]),ct=A({__name:"conversation",setup(t){const a=P();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(a).isgray}])},[e.createElementVNode("view",{class:"list"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(14,((t,a)=>e.createElementVNode("view",{class:"item",key:a},[e.withDirectives(e.createElementVNode("view",{class:"left f-row aic"},[e.createElementVNode("view",{class:"avatar f-row aic"},[e.createElementVNode("image",{src:"/static/system.png",mode:""})]),e.createElementVNode("view",{class:"content"}," 你今天在干嘛呢?为什么这么久不回我信息,真的生气了 ")],512),[[e.vShow,a%2==0]]),e.withDirectives(e.createElementVNode("view",{class:"right f-row aic"},[e.createElementVNode("view",{class:"content"}," 请问如何退款? "),e.createElementVNode("view",{class:"avatar f-row aic"},[e.createElementVNode("image",{src:"",mode:""})])],512),[[e.vShow,a%2!=0]])]))),64))]),e.createElementVNode("view",{class:"input_box f-row aic jce"},[e.createElementVNode("input",{type:"text",placeholder:"请输入内容......","placeholder-style":"font-size: 28rpx;color: #999999;"}),e.createElementVNode("view",{class:"send"}," 发送 ")])],2))}},[["__scopeId","data-v-00b966b0"]]),dt=A({__name:"system",setup(t){const a=P();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(a).isgray}])},[e.createElementVNode("view",{class:"list"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,((t,a)=>e.createElementVNode("view",{class:"item",key:a},[e.createElementVNode("view",{class:"left f-row aic"},[e.createElementVNode("view",{class:"avatar f-row aic"},[e.createElementVNode("image",{src:"/static/system.png",mode:""})]),e.createElementVNode("view",{class:"content"}," 你今天在干嘛呢?为什么这么久不回我信息,真的生气了 ")])]))),64))])],2))}},[["__scopeId","data-v-2f0571e9"]]),ut=A({__name:"index",setup(n){e.useCssVars((e=>({e9493420:e.cusnavbarheight})));const i=P(),s=e.ref(!0),c=e.ref(""),d=e.ref([]);let u=1,h=!1;const m=(e,t,a,n)=>(e.map((e=>{e._title=e[t],e._time=e[a],e._depart=e[n]})),e),p=()=>{if(c.value.trim())return"*"+c.value+"*"},f=()=>{u=1,h=!1,d.value=[],w()};e.watch(c,((e,t)=>{e.trim()||w()}));const g=()=>{uni.navigateBack()},y=e.ref(null);let v=null;o((e=>{y.value=e.id,v=e.zhiduid,w()}));const w=()=>{0==y.value?(h=!0,ve({pageNo:u,pageSize:15,fwbt:p()}).then((e=>{e.success&&(d.value=[...d.value,...m(e.result.records,"fwbt","fwtime",null)]),h=!1})).catch((e=>{t("log","at pages/document/index.vue:89","err",e)}))):1==y.value?(h=!0,we({pageNo:u,pageSize:15,neirong:p()}).then((e=>{e.success&&(d.value=[...d.value,...m(e.result.records,"neirong","fbdw","createTime")]),h=!1})).catch((e=>{t("log","at pages/document/index.vue:142","err",e)}))):2==y.value?(h=!0,(0==v?_e:be)({pageNo:u,pageSize:15,zdmc:p()}).then((e=>{if(e.success){let t=0==v?"zbbm_dictText":"sbbm";d.value=[...d.value,...m(e.result.records,"zdmc",t,null)]}h=!1})).catch((e=>{t("log","at pages/document/index.vue:108","err",e)}))):3==y.value&&(h=!0,ke({pageNo:u,pageSize:15,flfgmc:p()}).then((e=>{e.success&&(d.value=[...d.value,...m(e.result.records,"flfgmc","ssbm",null)]),h=!1})).catch((e=>{t("log","at pages/document/index.vue:125","err",e)})))};return l((()=>{u=1,h=!1,d.value=[],w(),uni.stopPullDownRefresh()})),r((()=>{h||(u++,w())})),(t,n)=>{const o=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(i).isgray}])},[e.createVNode(Ne,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"nav_box f-row aic jcb"},[e.createElementVNode("view",{class:"back f-row aic",onClick:g},[e.createVNode(o,{type:"left",size:"20",color:"#fff"})]),e.createElementVNode("view",{class:"search f-row aic"},[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=e=>c.value=e),onConfirm:f,onBlur:n[1]||(n[1]=e=>s.value=!c.value),onFocus:n[2]||(n[2]=e=>s.value=!1)},null,544),[[e.vModelText,c.value]]),s.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-row aic"},[e.createElementVNode("image",{src:"/static/search.png",mode:""}),e.createElementVNode("text",null,"搜索")])):e.createCommentVNode("",!0)])])])),_:1}),e.createElementVNode("view",{class:"list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item",key:a,onClick:e=>((e,t)=>{if(3==y.value)return Re(t.mingcheng);Te(e,(()=>{uni.navigateTo({url:e})}))})(`/pages/document/detail?data=${JSON.stringify(t)}&id=${y.value}`,t)},[e.createElementVNode("view",{class:"title"},e.toDisplayString(t._title),1),e.createElementVNode("view",{class:"time_box f-row aic"},[e.createElementVNode("view",{class:"time"},e.toDisplayString(t._time),1),t._depart?(e.openBlock(),e.createElementBlock("view",{key:0,class:"look f-row aic"},e.toDisplayString(t._depart),1)):e.createCommentVNode("",!0)])],8,["onClick"])))),128))])],2)}}},[["__scopeId","data-v-18757efe"]]),ht=A({__name:"detail",setup(t){const a=P(),n=e.ref({});return o((e=>{n.value=JSON.parse(e.data),0==e.id?n.value.pdf=n.value.wjbt:2==e.id?n.value.jdwj?n.value.pdf=n.value.jdwj+","+n.value.sszd:n.value.pdf=n.value.sszd:3==e.id&&(n.value.pdf=n.value.mingcheng)})),(t,i)=>{var s,o;return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(a).isgray}])},[e.createElementVNode("view",{class:"title_box"},[e.createElementVNode("view",{class:"title"},e.toDisplayString(n.value._title),1),e.createElementVNode("view",{class:"time"},e.toDisplayString(n.value._time),1)]),e.createElementVNode("view",{class:"document f-row"},[e.createElementVNode("text",{class:""}," 附件: "),e.createElementVNode("view",{class:"f-col"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(null==(o=null==(s=n.value)?void 0:s.pdf)?void 0:o.split(","),((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",style:{padding:"5rpx 0"},onClick:a=>e.unref(Re)(t)},e.toDisplayString(t),9,["onClick"])))),256))])])],2)}}},[["__scopeId","data-v-b79b801f"]]),mt=A({__name:"index",setup(t){const n=P(),i=e.ref(!0),s=e.ref("");o((()=>{}));const r=()=>{uni.navigateBack()};return(t,o)=>{const l=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(n).isgray})},[e.createVNode(Ne,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"nav_box f-row aic jcb"},[e.createElementVNode("view",{class:"back f-row aic",onClick:r},[e.createVNode(l,{type:"left",size:"20",color:"#fff"})]),e.createElementVNode("view",{class:"search f-row aic"},[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=e=>s.value=e),onConfirm:o[1]||(o[1]=(...e)=>t.search&&t.search(...e)),onBlur:o[2]||(o[2]=e=>i.value=!s.value),onFocus:o[3]||(o[3]=e=>i.value=!1)},null,544),[[e.vModelText,s.value]]),i.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-row aic"},[e.createElementVNode("image",{src:"/static/search.png",mode:""}),e.createElementVNode("text",null,"搜索")])):e.createCommentVNode("",!0)])])])),_:1}),e.createElementVNode("view",{class:"list_box"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,((t,a)=>e.createElementVNode("view",{class:"list",key:a,onClick:o[4]||(o[4]=e=>{var t;Te(t="/pages/meeting/detail?id=1",(()=>{uni.navigateTo({url:t})}))})},[e.createElementVNode("view",{class:"title f-row aic jcb"},[e.createElementVNode("view",{class:""}," 年度部门讨论会议 "),e.createElementVNode("text",null,"1分钟前")]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 发起人: "),e.createElementVNode("text",null,"周如意")]),e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 会议日期: "),e.createElementVNode("text",null,"周如意")]),e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 会议地点: "),e.createElementVNode("text",null,"周如意")]),e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 会议内容: "),e.createElementVNode("text",null,"周如意")])]),e.createElementVNode("view",{class:"handled f-row"},[e.createElementVNode("view",{class:"refused"}," 已拒绝 ")])]))),64))])],2)}}},[["__scopeId","data-v-c839cafa"]]),pt=A({__name:"detail",setup(a){const n=P();o((()=>{i()}));const i=()=>{var e;(e={mainid:1},d({url:"/zhgl_hygl/zhglHyglHyyc/listbymainid",method:"get",data:e})).then((e=>{e.success})).catch((e=>{t("log","at pages/meeting/detail.vue:94",e)}))};return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(n).isgray}])},[e.createElementVNode("view",{class:"list_box"},[e.createElementVNode("view",{class:"list"},[e.createElementVNode("view",{class:"title f-row aic jcb"},[e.createElementVNode("view",{class:""}," 年度部门讨论会议 "),e.createElementVNode("text",null,"1分钟前")]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 会议状态: "),e.createElementVNode("text",null,"待开始/已开始/已结束")]),e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 发起人: "),e.createElementVNode("text",null,"周如意")]),e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 会议日期: "),e.createElementVNode("text",null,"周如意")]),e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 会议地点: "),e.createElementVNode("text",null,"周如意")]),e.createElementVNode("view",{class:"f-row aic jcb"},[e.createElementVNode("view",{class:""}," 会议内容: "),e.createElementVNode("text",null,"周如意")]),e.createElementVNode("view",{class:""},[e.createElementVNode("view",{class:""}," 参与人员: "),e.createElementVNode("view",{class:"person f-row aic"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,((t,a)=>e.createElementVNode("view",{class:"item f-col aic",key:a},[e.createElementVNode("image",{src:"",mode:""}),e.createElementVNode("view",{class:"name"}," 周如意 ")]))),64))])])])])]),e.createElementVNode("view",{class:"btn f-row aic jcb"},[e.createElementVNode("view",{class:"refuse"}," 拒绝 "),e.createElementVNode("view",{class:"agree",onClick:a[0]||(a[0]=(...e)=>t.openpop&&t.openpop(...e))}," 同意 ")])],2))}},[["__scopeId","data-v-7441efc4"]]),ft={pages:[{path:"pages/login/login",style:{navigationStyle:"custom"}},{path:"pages/tab/index",style:{navigationStyle:"custom",enablePullDownRefresh:!0}},{path:"pages/tab/office",style:{navigationStyle:"custom"}},{path:"pages/tab/product",style:{navigationStyle:"custom"}},{path:"pages/tab/my",style:{navigationStyle:"custom"}},{path:"pages/task/index",style:{enablePullDownRefresh:!0,"app-plus":{titleNView:{titleText:"我的任务",titleColor:"#fff"}}}},{path:"pages/task/handle",style:{navigationStyle:"custom"}},{path:"pages/talk/message_list",style:{navigationBarTitleText:"消息",enablePullDownRefresh:!0,navigationBarTextStyle:"white"}},{path:"pages/talk/conversation",style:{navigationBarTitleText:"昵称",enablePullDownRefresh:!0,navigationBarTextStyle:"white"}},{path:"pages/talk/system",style:{navigationBarTitleText:"系统通知",enablePullDownRefresh:!0,navigationBarTextStyle:"white"}},{path:"pages/document/index",style:{navigationStyle:"custom",enablePullDownRefresh:!0}},{path:"pages/document/detail",style:{navigationBarTitleText:"详情",navigationBarTextStyle:"white"}},{path:"pages/meeting/index",style:{navigationStyle:"custom"}},{path:"pages/meeting/detail",style:{navigationBarTitleText:"详情",enablePullDownRefresh:!1,navigationBarTextStyle:"white"}},{path:"pages/leave/application",style:{navigationBarTitleText:"请假申请",enablePullDownRefresh:!1,navigationBarTextStyle:"white"}},{path:"pages/checkin/index",style:{navigationStyle:"custom"}},{path:"pages/useredit/useredit",style:{navigationBarTitleText:"资料编辑",navigationBarTextStyle:"white"}},{path:"pages/useredit/address",style:{navigationBarTitleText:"地址",enablePullDownRefresh:!1,navigationBarTextStyle:"white"}},{path:"pages/useredit/add_address",style:{navigationBarTitleText:"添加地址",enablePullDownRefresh:!1,navigationBarTextStyle:"white"}},{path:"pages/useredit/addressbook",style:{navigationBarTitleText:"通讯录",enablePullDownRefresh:!1,navigationBarTextStyle:"white"}},{path:"pages/task/todotask",style:{navigationBarTitleText:"今日待办任务",enablePullDownRefresh:!1,navigationBarTextStyle:"white"}},{path:"pages/safe/manage",style:{navigationStyle:"custom"}},{path:"pages/product/index",style:{navigationBarTitleText:"生产数据",enablePullDownRefresh:!1,navigationBarTextStyle:"white"}},{path:"pages/userlist/index",style:{navigationBarTitleText:"",navigationBarTextStyle:"white"}},{path:"pages/safe/detail",style:{navigationStyle:"custom"}},{path:"pages/zhiban/index",style:{navigationBarTitleText:"值班信息",navigationBarTextStyle:"white"}},{path:"pages/task/self",style:{navigationBarTitleText:"本人发起",navigationBarTextStyle:"white"}}],tabBar:{color:"#333333",selectedColor:"#01508B",borderStyle:"black",backgroundColor:"#FFFFFF",list:[{text:"首页",pagePath:"pages/tab/index",iconPath:"static/tab/index1.png",selectedIconPath:"static/tab/index2.png"},{text:"办公",pagePath:"pages/tab/office",iconPath:"static/tab/office1.png",selectedIconPath:"static/tab/office2.png"},{text:"生产",pagePath:"pages/tab/product",iconPath:"static/tab/product1.png",selectedIconPath:"static/tab/product2.png"},{text:"我的",pagePath:"pages/tab/my",iconPath:"static/tab/user1.png",selectedIconPath:"static/tab/user2.png"}],midButton:{width:"65px",height:"75px",text:"",iconPath:"static/tab/todo.png",iconWidth:"50px"}},globalStyle:{"app-plus":{titleNView:{backgroundImage:"linear-gradient(to left , #256FBC, #044D87)"}}},uniIdRouter:{}};function gt(e,t,a){return e(a={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&a.path)}},a.exports),a.exports}var yt=gt((function(e,t){var a;e.exports=(a=a||function(e,t){var a=Object.create||function(){function e(){}return function(t){var a;return e.prototype=t,a=new e,e.prototype=null,a}}(),n={},i=n.lib={},s=i.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,a=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var s=0;s<i;s++){var o=a[s>>>2]>>>24-s%4*8&255;t[n+s>>>2]|=o<<24-(n+s)%4*8}else for(s=0;s<i;s+=4)t[n+s>>>2]=a[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,a=this.sigBytes;t[a>>>2]&=4294967295<<32-a%4*8,t.length=e.ceil(a/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var a,n=[],i=function(t){var a=987654321,n=4294967295;return function(){var i=((a=36969*(65535&a)+(a>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},s=0;s<t;s+=4){var r=i(4294967296*(a||e.random()));a=987654071*r(),n.push(4294967296*r()|0)}return new o.init(n,t)}}),r=n.enc={},l=r.Hex={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],i=0;i<a;i++){var s=t[i>>>2]>>>24-i%4*8&255;n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n+=2)a[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(a,t/2)}},c=r.Latin1={stringify:function(e){for(var t=e.words,a=e.sigBytes,n=[],i=0;i<a;i++){var s=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var t=e.length,a=[],n=0;n<t;n++)a[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(a,t)}},d=r.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var a=this._data,n=a.words,i=a.sigBytes,s=this.blockSize,r=i/(4*s),l=(r=t?e.ceil(r):e.max((0|r)-this._minBufferSize,0))*s,c=e.min(4*l,i);if(l){for(var d=0;d<l;d+=s)this._doProcessBlock(n,d);var u=n.splice(0,l);a.sigBytes-=c}return new o.init(u,c)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=u.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,a){return new e.init(a).finalize(t)}},_createHmacHelper:function(e){return function(t,a){return new h.HMAC.init(e,a).finalize(t)}}});var h=n.algo={};return n}(Math),a)})),vt=yt,wt=(gt((function(e,t){var a;e.exports=(a=vt,function(e){var t=a,n=t.lib,i=n.WordArray,s=n.Hasher,o=t.algo,r=[];!function(){for(var t=0;t<64;t++)r[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=o.MD5=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var n=t+a,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var s=this._hash.words,o=e[t+0],l=e[t+1],m=e[t+2],p=e[t+3],f=e[t+4],g=e[t+5],y=e[t+6],v=e[t+7],w=e[t+8],k=e[t+9],b=e[t+10],_=e[t+11],S=e[t+12],E=e[t+13],x=e[t+14],N=e[t+15],V=s[0],C=s[1],T=s[2],D=s[3];V=c(V,C,T,D,o,7,r[0]),D=c(D,V,C,T,l,12,r[1]),T=c(T,D,V,C,m,17,r[2]),C=c(C,T,D,V,p,22,r[3]),V=c(V,C,T,D,f,7,r[4]),D=c(D,V,C,T,g,12,r[5]),T=c(T,D,V,C,y,17,r[6]),C=c(C,T,D,V,v,22,r[7]),V=c(V,C,T,D,w,7,r[8]),D=c(D,V,C,T,k,12,r[9]),T=c(T,D,V,C,b,17,r[10]),C=c(C,T,D,V,_,22,r[11]),V=c(V,C,T,D,S,7,r[12]),D=c(D,V,C,T,E,12,r[13]),T=c(T,D,V,C,x,17,r[14]),V=d(V,C=c(C,T,D,V,N,22,r[15]),T,D,l,5,r[16]),D=d(D,V,C,T,y,9,r[17]),T=d(T,D,V,C,_,14,r[18]),C=d(C,T,D,V,o,20,r[19]),V=d(V,C,T,D,g,5,r[20]),D=d(D,V,C,T,b,9,r[21]),T=d(T,D,V,C,N,14,r[22]),C=d(C,T,D,V,f,20,r[23]),V=d(V,C,T,D,k,5,r[24]),D=d(D,V,C,T,x,9,r[25]),T=d(T,D,V,C,p,14,r[26]),C=d(C,T,D,V,w,20,r[27]),V=d(V,C,T,D,E,5,r[28]),D=d(D,V,C,T,m,9,r[29]),T=d(T,D,V,C,v,14,r[30]),V=u(V,C=d(C,T,D,V,S,20,r[31]),T,D,g,4,r[32]),D=u(D,V,C,T,w,11,r[33]),T=u(T,D,V,C,_,16,r[34]),C=u(C,T,D,V,x,23,r[35]),V=u(V,C,T,D,l,4,r[36]),D=u(D,V,C,T,f,11,r[37]),T=u(T,D,V,C,v,16,r[38]),C=u(C,T,D,V,b,23,r[39]),V=u(V,C,T,D,E,4,r[40]),D=u(D,V,C,T,o,11,r[41]),T=u(T,D,V,C,p,16,r[42]),C=u(C,T,D,V,y,23,r[43]),V=u(V,C,T,D,k,4,r[44]),D=u(D,V,C,T,S,11,r[45]),T=u(T,D,V,C,N,16,r[46]),V=h(V,C=u(C,T,D,V,m,23,r[47]),T,D,o,6,r[48]),D=h(D,V,C,T,v,10,r[49]),T=h(T,D,V,C,x,15,r[50]),C=h(C,T,D,V,g,21,r[51]),V=h(V,C,T,D,S,6,r[52]),D=h(D,V,C,T,p,10,r[53]),T=h(T,D,V,C,b,15,r[54]),C=h(C,T,D,V,l,21,r[55]),V=h(V,C,T,D,w,6,r[56]),D=h(D,V,C,T,N,10,r[57]),T=h(T,D,V,C,y,15,r[58]),C=h(C,T,D,V,E,21,r[59]),V=h(V,C,T,D,f,6,r[60]),D=h(D,V,C,T,_,10,r[61]),T=h(T,D,V,C,m,15,r[62]),C=h(C,T,D,V,k,21,r[63]),s[0]=s[0]+V|0,s[1]=s[1]+C|0,s[2]=s[2]+T|0,s[3]=s[3]+D|0},_doFinalize:function(){var t=this._data,a=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;a[i>>>5]|=128<<24-i%32;var s=e.floor(n/4294967296),o=n;a[15+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),a[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(a.length+1),this._process();for(var r=this._hash,l=r.words,c=0;c<4;c++){var d=l[c];l[c]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return r},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,a,n,i,s,o){var r=e+(t&a|~t&n)+i+o;return(r<<s|r>>>32-s)+t}function d(e,t,a,n,i,s,o){var r=e+(t&n|a&~n)+i+o;return(r<<s|r>>>32-s)+t}function u(e,t,a,n,i,s,o){var r=e+(t^a^n)+i+o;return(r<<s|r>>>32-s)+t}function h(e,t,a,n,i,s,o){var r=e+(a^(t|~n))+i+o;return(r<<s|r>>>32-s)+t}t.MD5=s._createHelper(l),t.HmacMD5=s._createHmacHelper(l)}(Math),a.MD5)})),gt((function(e,t){var a,n,i;e.exports=(n=(a=vt).lib.Base,i=a.enc.Utf8,void(a.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var a=e.blockSize,n=4*a;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var s=this._oKey=t.clone(),o=this._iKey=t.clone(),r=s.words,l=o.words,c=0;c<a;c++)r[c]^=1549556828,l[c]^=909522486;s.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,a=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(a))}})))})),gt((function(e,t){e.exports=vt.HmacMD5}))),kt=gt((function(e,t){e.exports=vt.enc.Utf8})),bt=gt((function(e,t){var a,n,i;e.exports=(i=(n=a=vt).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,a=e.sigBytes,n=this._map;e.clamp();for(var i=[],s=0;s<a;s+=3)for(var o=(t[s>>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,r=0;r<4&&s+.75*r<a;r++)i.push(n.charAt(o>>>6*(3-r)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,a=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<a.length;s++)n[a.charCodeAt(s)]=s}var o=a.charAt(64);if(o){var r=e.indexOf(o);-1!==r&&(t=r)}return function(e,t,a){for(var n=[],s=0,o=0;o<t;o++)if(o%4){var r=a[e.charCodeAt(o-1)]<<o%4*2,l=a[e.charCodeAt(o)]>>>6-o%4*2;n[s>>>2]|=(r|l)<<24-s%4*8,s++}return i.create(n,s)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},a.enc.Base64)}));const _t="FUNCTION",St="pending",Et="rejected";function xt(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function Nt(e){return"object"===xt(e)}function Vt(e){return"function"==typeof e}function Ct(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}const Tt="REJECTED",Dt="NOT_PENDING";class Bt{constructor({createPromise:e,retryRule:t=Tt}={}){this.createPromise=e,this.status=null,this.promise=null,this.retryRule=t}get needRetry(){if(!this.status)return!0;switch(this.retryRule){case Tt:return this.status===Et;case Dt:return this.status!==St}}exec(){return this.needRetry?(this.status=St,this.promise=this.createPromise().then((e=>(this.status="fulfilled",Promise.resolve(e))),(e=>(this.status=Et,Promise.reject(e)))),this.promise):this.promise}}function It(e){return e&&"string"==typeof e?JSON.parse(e):e}const Pt=It([]);It("");const At=It("[]")||[];let Mt="";try{Mt="__UNI__F0AFD30"}catch(Sa){}let Rt={};function Ot(e,t={}){var a,n;return a=Rt,n=e,Object.prototype.hasOwnProperty.call(a,n)||(Rt[e]=t),Rt[e]}Rt=uni._globalUniCloudObj?uni._globalUniCloudObj:uni._globalUniCloudObj={};const Lt=["invoke","success","fail","complete"],Ft=Ot("_globalUniCloudInterceptor");function $t(e,t){Ft[e]||(Ft[e]={}),Nt(t)&&Object.keys(t).forEach((a=>{Lt.indexOf(a)>-1&&function(e,t,a){let n=Ft[e][t];n||(n=Ft[e][t]=[]),-1===n.indexOf(a)&&Vt(a)&&n.push(a)}(e,a,t[a])}))}function jt(e,t){Ft[e]||(Ft[e]={}),Nt(t)?Object.keys(t).forEach((a=>{Lt.indexOf(a)>-1&&function(e,t,a){const n=Ft[e][t];if(!n)return;const i=n.indexOf(a);i>-1&&n.splice(i,1)}(e,a,t[a])})):delete Ft[e]}function Ut(e,t){return e&&0!==e.length?e.reduce(((e,a)=>e.then((()=>a(t)))),Promise.resolve()):Promise.resolve()}function zt(e,t){return Ft[e]&&Ft[e][t]||[]}function Ht(e){$t("callObject",e)}const qt=Ot("_globalUniCloudListener"),Jt="response",Wt="needLogin",Yt="refreshToken",Kt="clientdb",Gt="cloudfunction",Qt="cloudobject";function Zt(e){return qt[e]||(qt[e]=[]),qt[e]}function Xt(e,t){const a=Zt(e);a.includes(t)||a.push(t)}function ea(e,t){const a=Zt(e),n=a.indexOf(t);-1!==n&&a.splice(n,1)}function ta(e,t){const a=Zt(e);for(let n=0;n<a.length;n++)(0,a[n])(t)}let aa,na=!1;function ia(){return aa||(aa=new Promise((e=>{na&&e(),function t(){if("function"==typeof getCurrentPages){const t=getCurrentPages();t&&t[0]&&(na=!0,e())}na||setTimeout((()=>{t()}),30)}()})),aa)}function sa(e){const t={};for(const a in e){const n=e[a];Vt(n)&&(t[a]=Ct(n))}return t}class oa extends Error{constructor(e){super(e.message),this.errMsg=e.message||e.errMsg||"unknown system error",this.code=this.errCode=e.code||e.errCode||"SYSTEM_ERROR",this.errSubject=this.subject=e.subject||e.errSubject,this.cause=e.cause,this.requestId=e.requestId}toJson(e=0){if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJson?this.cause.toJson(e):this.cause}}}var ra={request:e=>uni.request(e),uploadFile:e=>uni.uploadFile(e),setStorageSync:(e,t)=>uni.setStorageSync(e,t),getStorageSync:e=>uni.getStorageSync(e),removeStorageSync:e=>uni.removeStorageSync(e),clearStorageSync:()=>uni.clearStorageSync()};function la(e){return e&&la(e.__v_raw)||e}function ca(){return{token:ra.getStorageSync("uni_id_token")||ra.getStorageSync("uniIdToken"),tokenExpired:ra.getStorageSync("uni_id_token_expired")}}function da({token:e,tokenExpired:t}={}){e&&ra.setStorageSync("uni_id_token",e),t&&ra.setStorageSync("uni_id_token_expired",t)}let ua,ha;function ma(){return ua||(ua=uni.getSystemInfoSync()),ua}function pa(){let e,t;try{if(uni.getLaunchOptionsSync){if(uni.getLaunchOptionsSync.toString().indexOf("not yet implemented")>-1)return;const{scene:a,channel:n}=uni.getLaunchOptionsSync();e=n,t=a}}catch(a){}return{channel:e,scene:t}}function fa(){const e=uni.getLocale&&uni.getLocale()||"en";if(ha)return{...ha,locale:e,LOCALE:e};const t=ma(),{deviceId:a,osName:n,uniPlatform:i,appId:s}=t,o=["pixelRatio","brand","model","system","language","version","platform","host","SDKVersion","swanNativeVersion","app","AppPlatform","fontSizeSetting"];for(let r=0;r<o.length;r++)delete t[o[r]];return ha={PLATFORM:i,OS:n,APPID:s,DEVICEID:a,...pa(),...t},{...ha,locale:e,LOCALE:e}}var ga=function(e,t){let a="";return Object.keys(e).sort().forEach((function(t){e[t]&&(a=a+"&"+t+"="+e[t])})),a=a.slice(1),wt(a,t).toString()},ya=function(e,t){return new Promise(((a,n)=>{t(Object.assign(e,{complete(e){e||(e={});const t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400){const a=e.data&&e.data.error&&e.data.error.code||"SYS_ERR",i=e.data&&e.data.error&&e.data.error.message||e.errMsg||"request:fail";return n(new oa({code:a,message:i,requestId:t}))}const i=e.data;if(i.error)return n(new oa({code:i.error.code,message:i.error.message,requestId:t}));i.result=i.data,i.requestId=t,delete i.data,a(i)}}))}))},va=function(e){return bt.stringify(kt.parse(e))},wa=class{constructor(e){["spaceId","clientSecret"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),this.config=Object.assign({},{endpoint:0===e.spaceId.indexOf("mp-")?"https://api.next.bspapp.com":"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=ra,this._getAccessTokenPromiseHub=new Bt({createPromise:()=>this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((e=>{if(!e.result||!e.result.accessToken)throw new oa({code:"AUTH_FAILED",message:"获取accessToken失败"});this.setAccessToken(e.result.accessToken)})),retryRule:Dt})}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){this.accessToken=e}requestWrapped(e){return ya(e,this.adapter.request)}requestAuth(e){return this.requestWrapped(e)}request(e,t){return Promise.resolve().then((()=>this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch((t=>new Promise(((e,a)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?a(t):e()})).then((()=>this.getAccessToken())).then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})))):this.getAccessToken().then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)}))))}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=ga(t.data,this.config.clientSecret),t}setupRequest(e,t){const a=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};return"auth"!==t&&(a.token=this.accessToken,n["x-basement-token"]=this.accessToken),n["x-serverless-sign"]=ga(a,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:a,dataType:"json",header:n}}getAccessToken(){return this._getAccessTokenPromiseHub.exec()}async authorize(){await this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,name:a,filePath:n,fileType:i,onUploadProgress:s}){return new Promise(((o,r)=>{const l=this.adapter.uploadFile({url:e,formData:t,name:a,filePath:n,fileType:i,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?o(e):r(new oa({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){r(new oa({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((e=>{s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}async uploadFile({filePath:e,cloudPath:t,fileType:a="image",cloudPathAsRealPath:n=!1,onUploadProgress:i,config:s}){if("string"!==xt(t))throw new oa({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new oa({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new oa({code:"INVALID_PARAM",message:"cloudPath不合法"});const o=s&&s.envType||this.config.envType;if(n&&("/"!==t[0]&&(t="/"+t),t.indexOf("\\")>-1))throw new oa({code:"INVALID_PARAM",message:"使用cloudPath作为路径时,cloudPath不可包含“\\”"});const r=(await this.getOSSUploadOptionsFromPath({env:o,filename:n?t.split("/").pop():t,fileId:n?t:void 0})).result,l="https://"+r.cdnDomain+"/"+r.ossPath,{securityToken:c,accessKeyId:d,signature:u,host:h,ossPath:m,id:p,policy:f,ossCallbackUrl:g}=r,y={"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:d,Signature:u,host:h,id:p,key:m,policy:f,success_action_status:200};if(c&&(y["x-oss-security-token"]=c),g){const e=JSON.stringify({callbackUrl:g,callbackBody:JSON.stringify({fileId:p,spaceId:this.config.spaceId}),callbackBodyType:"application/json"});y.callback=va(e)}const v={url:"https://"+r.host,formData:y,fileName:"file",name:"file",filePath:e,fileType:a};if(await this.uploadFileToOSS(Object.assign({},v,{onUploadProgress:i})),g)return{success:!0,filePath:e,fileID:l};if((await this.reportOSSUpload({id:p})).success)return{success:!0,filePath:e,fileID:l};throw new oa({code:"UPLOAD_FAILED",message:"文件上传失败"})}getTempFileURL({fileList:e}={}){return new Promise(((t,a)=>{Array.isArray(e)&&0!==e.length||a(new oa({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),t({fileList:e.map((e=>({fileID:e,tempFileURL:e})))})}))}async getFileInfo({fileList:e}={}){if(!Array.isArray(e)||0===e.length)throw new oa({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const t={method:"serverless.file.resource.info",params:JSON.stringify({id:e.map((e=>e.split("?")[0])).join(",")})};return{fileList:(await this.request(this.setupRequest(t))).result}}},ka={init(e){const t=new wa(e),a={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return a},t.customAuth=t.auth,t}};const ba="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";var _a,Sa;(Sa=_a||(_a={})).local="local",Sa.none="none",Sa.session="session";var Ea=function(){},xa=gt((function(e,t){var a;e.exports=(a=vt,function(e){var t=a,n=t.lib,i=n.WordArray,s=n.Hasher,o=t.algo,r=[],l=[];!function(){function t(t){for(var a=e.sqrt(t),n=2;n<=a;n++)if(!(t%n))return!1;return!0}function a(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(r[i]=a(e.pow(n,.5))),l[i]=a(e.pow(n,1/3)),i++),n++}();var c=[],d=o.SHA256=s.extend({_doReset:function(){this._hash=new i.init(r.slice(0))},_doProcessBlock:function(e,t){for(var a=this._hash.words,n=a[0],i=a[1],s=a[2],o=a[3],r=a[4],d=a[5],u=a[6],h=a[7],m=0;m<64;m++){if(m<16)c[m]=0|e[t+m];else{var p=c[m-15],f=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[m-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[m]=f+c[m-7]+y+c[m-16]}var v=n&i^n&s^i&s,w=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),k=h+((r<<26|r>>>6)^(r<<21|r>>>11)^(r<<7|r>>>25))+(r&d^~r&u)+l[m]+c[m];h=u,u=d,d=r,r=o+k|0,o=s,s=i,i=n,n=k+(w+v)|0}a[0]=a[0]+n|0,a[1]=a[1]+i|0,a[2]=a[2]+s|0,a[3]=a[3]+o|0,a[4]=a[4]+r|0,a[5]=a[5]+d|0,a[6]=a[6]+u|0,a[7]=a[7]+h|0},_doFinalize:function(){var t=this._data,a=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return a[i>>>5]|=128<<24-i%32,a[14+(i+64>>>9<<4)]=e.floor(n/4294967296),a[15+(i+64>>>9<<4)]=n,t.sigBytes=4*a.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=s._createHelper(d),t.HmacSHA256=s._createHmacHelper(d)}(Math),a.SHA256)})),Na=xa,Va=gt((function(e,t){e.exports=vt.HmacSHA256}));const Ca=()=>{let e;if(!Promise){e=()=>{},e.promise={};const t=()=>{throw new oa({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}const t=new Promise(((t,a)=>{e=(e,n)=>e?a(e):t(n)}));return e.promise=t,e};function Ta(e){return void 0===e}function Da(e){return"[object Null]"===Object.prototype.toString.call(e)}var Ba;!function(e){e.WEB="web",e.WX_MP="wx_mp"}(Ba||(Ba={}));const Ia={adapter:null,runtime:void 0},Pa=["anonymousUuidKey"];class Aa extends Ea{constructor(){super(),Ia.adapter.root.tcbObject||(Ia.adapter.root.tcbObject={})}setItem(e,t){Ia.adapter.root.tcbObject[e]=t}getItem(e){return Ia.adapter.root.tcbObject[e]}removeItem(e){delete Ia.adapter.root.tcbObject[e]}clear(){delete Ia.adapter.root.tcbObject}}function Ma(e,t){switch(e){case"local":return t.localStorage||new Aa;case"none":return new Aa;default:return t.sessionStorage||new Aa}}class Ra{constructor(e){if(!this._storage){this._persistence=Ia.adapter.primaryStorage||e.persistence,this._storage=Ma(this._persistence,Ia.adapter);const t=`access_token_${e.env}`,a=`access_token_expire_${e.env}`,n=`refresh_token_${e.env}`,i=`anonymous_uuid_${e.env}`,s=`login_type_${e.env}`,o=`user_info_${e.env}`;this.keys={accessTokenKey:t,accessTokenExpireKey:a,refreshTokenKey:n,anonymousUuidKey:i,loginTypeKey:s,userInfoKey:o}}}updatePersistence(e){if(e===this._persistence)return;const t="local"===this._persistence;this._persistence=e;const a=Ma(e,Ia.adapter);for(const n in this.keys){const e=this.keys[n];if(t&&Pa.includes(n))continue;const i=this._storage.getItem(e);Ta(i)||Da(i)||(a.setItem(e,i),this._storage.removeItem(e))}this._storage=a}setStore(e,t,a){if(!this._storage)return;const n={version:a||"localCachev1",content:t},i=JSON.stringify(n);try{this._storage.setItem(e,i)}catch(s){throw s}}getStore(e,t){try{if(!this._storage)return}catch(n){return""}t=t||"localCachev1";const a=this._storage.getItem(e);return a&&a.indexOf(t)>=0?JSON.parse(a).content:""}removeStore(e){this._storage.removeItem(e)}}const Oa={},La={};function Fa(e){return Oa[e]}class $a{constructor(e,t){this.data=t||null,this.name=e}}class ja extends $a{constructor(e,t){super("error",{error:e,data:t}),this.error=e}}const Ua=new class{constructor(){this._listeners={}}on(e,t){return a=e,n=t,(i=this._listeners)[a]=i[a]||[],i[a].push(n),this;var a,n,i}off(e,t){return function(e,t,a){if(a&&a[e]){const n=a[e].indexOf(t);-1!==n&&a[e].splice(n,1)}}(e,t,this._listeners),this}fire(e,t){if(e instanceof ja)return console.error(e.error),this;const a="string"==typeof e?new $a(e,t||{}):e,n=a.name;if(this._listens(n)){a.target=this;const e=this._listeners[n]?[...this._listeners[n]]:[];for(const t of e)t.call(this,a)}return this}_listens(e){return this._listeners[e]&&this._listeners[e].length>0}};function za(e,t){Ua.on(e,t)}function Ha(e,t={}){Ua.fire(e,t)}function qa(e,t){Ua.off(e,t)}const Ja="loginStateChanged",Wa="loginStateExpire",Ya="loginTypeChanged",Ka="anonymousConverted",Ga="refreshAccessToken";var Qa;!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Qa||(Qa={}));const Za=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],Xa={"X-SDK-Version":"1.3.5"};function en(e,t,a){const n=e[t];e[t]=function(t){const i={},s={};a.forEach((a=>{const{data:n,headers:o}=a.call(e,t);Object.assign(i,n),Object.assign(s,o)}));const o=t.data;return o&&(()=>{var e;if(e=o,"[object FormData]"!==Object.prototype.toString.call(e))t.data={...o,...i};else for(const t in i)o.append(t,i[t])})(),t.headers={...t.headers||{},...s},n.call(e,t)}}function tn(){const e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:{...Xa,"x-seqid":e}}}class an{constructor(e={}){var t;this.config=e,this._reqClass=new Ia.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:`请求在${this.config.timeout/1e3}s内未完成,已中断`,restrictedMethods:["post"]}),this._cache=Fa(this.config.env),this._localCache=(t=this.config.env,La[t]),en(this._reqClass,"post",[tn]),en(this._reqClass,"upload",[tn]),en(this._reqClass,"download",[tn])}async post(e){return await this._reqClass.post(e)}async upload(e){return await this._reqClass.upload(e)}async download(e){return await this._reqClass.download(e)}async refreshAccessToken(){let e,t;this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken());try{e=await this._refreshAccessTokenPromise}catch(a){t=a}if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,t)throw t;return e}async _refreshAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:a,loginTypeKey:n,anonymousUuidKey:i}=this._cache.keys;this._cache.removeStore(e),this._cache.removeStore(t);let s=this._cache.getStore(a);if(!s)throw new oa({message:"未登录CloudBase"});const o={refresh_token:s},r=await this.request("auth.fetchAccessTokenWithRefreshToken",o);if(r.data.code){const{code:e}=r.data;if("SIGN_PARAM_INVALID"===e||"REFRESH_TOKEN_EXPIRED"===e||"INVALID_REFRESH_TOKEN"===e){if(this._cache.getStore(n)===Qa.ANONYMOUS&&"INVALID_REFRESH_TOKEN"===e){const e=this._cache.getStore(i),t=this._cache.getStore(a),n=await this.send("auth.signInAnonymously",{anonymous_uuid:e,refresh_token:t});return this.setRefreshToken(n.refresh_token),this._refreshAccessToken()}Ha(Wa),this._cache.removeStore(a)}throw new oa({code:r.data.code,message:`刷新access token失败:${r.data.code}`})}if(r.data.access_token)return Ha(Ga),this._cache.setStore(e,r.data.access_token),this._cache.setStore(t,r.data.access_token_expire+Date.now()),{accessToken:r.data.access_token,accessTokenExpire:r.data.access_token_expire};r.data.refresh_token&&(this._cache.removeStore(a),this._cache.setStore(a,r.data.refresh_token),this._refreshAccessToken())}async getAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:a}=this._cache.keys;if(!this._cache.getStore(a))throw new oa({message:"refresh token不存在,登录状态异常"});let n=this._cache.getStore(e),i=this._cache.getStore(t),s=!0;return this._shouldRefreshAccessTokenHook&&!(await this._shouldRefreshAccessTokenHook(n,i))&&(s=!1),(!n||!i||i<Date.now())&&s?this.refreshAccessToken():{accessToken:n,accessTokenExpire:i}}async request(e,t,a){const n=`x-tcb-trace_${this.config.env}`;let i="application/x-www-form-urlencoded";const s={action:e,env:this.config.env,dataVersion:"2019-08-16",...t};if(-1===Za.indexOf(e)){const{refreshTokenKey:e}=this._cache.keys;this._cache.getStore(e)&&(s.access_token=(await this.getAccessToken()).accessToken)}let o;if("storage.uploadFile"===e){o=new FormData;for(let e in o)o.hasOwnProperty(e)&&void 0!==o[e]&&o.append(e,s[e]);i="multipart/form-data"}else{i="application/json",o={};for(let e in s)void 0!==s[e]&&(o[e]=s[e])}let r={headers:{"content-type":i}};a&&a.onUploadProgress&&(r.onUploadProgress=a.onUploadProgress);const l=this._localCache.getStore(n);l&&(r.headers["X-TCB-Trace"]=l);const{parse:c,inQuery:d,search:u}=t;let h={env:this.config.env};c&&(h.parse=!0),d&&(h={...d,...h});let m=function(e,t,a={}){const n=/\?/.test(t);let i="";for(let s in a)""===i?!n&&(t+="?"):i+="&",i+=`${s}=${encodeURIComponent(a[s])}`;return/^http(s)?\:\/\//.test(t+=i)?t:`${e}${t}`}(ba,"//tcb-api.tencentcloudapi.com/web",h);u&&(m+=u);const p=await this.post({url:m,data:o,...r}),f=p.header&&p.header["x-tcb-trace"];if(f&&this._localCache.setStore(n,f),200!==Number(p.status)&&200!==Number(p.statusCode)||!p.data)throw new oa({code:"NETWORK_ERROR",message:"network request error"});return p}async send(e,t={}){const a=await this.request(e,t,{onUploadProgress:t.onUploadProgress});if("ACCESS_TOKEN_EXPIRED"===a.data.code&&-1===Za.indexOf(e)){await this.refreshAccessToken();const a=await this.request(e,t,{onUploadProgress:t.onUploadProgress});if(a.data.code)throw new oa({code:a.data.code,message:a.data.message});return a.data}if(a.data.code)throw new oa({code:a.data.code,message:a.data.message});return a.data}setRefreshToken(e){const{accessTokenKey:t,accessTokenExpireKey:a,refreshTokenKey:n}=this._cache.keys;this._cache.removeStore(t),this._cache.removeStore(a),this._cache.setStore(n,e)}}const nn={};function sn(e){return nn[e]}class on{constructor(e){this.config=e,this._cache=Fa(e.env),this._request=sn(e.env)}setRefreshToken(e){const{accessTokenKey:t,accessTokenExpireKey:a,refreshTokenKey:n}=this._cache.keys;this._cache.removeStore(t),this._cache.removeStore(a),this._cache.setStore(n,e)}setAccessToken(e,t){const{accessTokenKey:a,accessTokenExpireKey:n}=this._cache.keys;this._cache.setStore(a,e),this._cache.setStore(n,t)}async refreshUserInfo(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e)}}class rn{constructor(e){if(!e)throw new oa({code:"PARAM_ERROR",message:"envId is not defined"});this._envId=e,this._cache=Fa(this._envId),this._request=sn(this._envId),this.setUserInfo()}linkWithTicket(e){if("string"!=typeof e)throw new oa({code:"PARAM_ERROR",message:"ticket must be string"});return this._request.send("auth.linkWithTicket",{ticket:e})}linkWithRedirect(e){e.signInWithRedirect()}updatePassword(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}updateEmail(e){return this._request.send("auth.updateEmail",{newEmail:e})}updateUsername(e){if("string"!=typeof e)throw new oa({code:"PARAM_ERROR",message:"username must be a string"});return this._request.send("auth.updateUsername",{username:e})}async getLinkedUidList(){const{data:e}=await this._request.send("auth.getLinkedUidList",{});let t=!1;const{users:a}=e;return a.forEach((e=>{e.wxOpenId&&e.wxPublicId&&(t=!0)})),{users:a,hasPrimaryUid:t}}setPrimaryUid(e){return this._request.send("auth.setPrimaryUid",{uid:e})}unlink(e){return this._request.send("auth.unlink",{platform:e})}async update(e){const{nickName:t,gender:a,avatarUrl:n,province:i,country:s,city:o}=e,{data:r}=await this._request.send("auth.updateUserInfo",{nickName:t,gender:a,avatarUrl:n,province:i,country:s,city:o});this.setLocalUserInfo(r)}async refresh(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setUserInfo(){const{userInfoKey:e}=this._cache.keys,t=this._cache.getStore(e);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((e=>{this[e]=t[e]})),this.location={country:t.country,province:t.province,city:t.city}}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e),this.setUserInfo()}}class ln{constructor(e){if(!e)throw new oa({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=Fa(e);const{refreshTokenKey:t,accessTokenKey:a,accessTokenExpireKey:n}=this._cache.keys,i=this._cache.getStore(t),s=this._cache.getStore(a),o=this._cache.getStore(n);this.credential={refreshToken:i,accessToken:s,accessTokenExpire:o},this.user=new rn(e)}get isAnonymousAuth(){return this.loginType===Qa.ANONYMOUS}get isCustomAuth(){return this.loginType===Qa.CUSTOM}get isWeixinAuth(){return this.loginType===Qa.WECHAT||this.loginType===Qa.WECHAT_OPEN||this.loginType===Qa.WECHAT_PUBLIC}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}class cn extends on{async signIn(){this._cache.updatePersistence("local");const{anonymousUuidKey:e,refreshTokenKey:t}=this._cache.keys,a=this._cache.getStore(e)||void 0,n=this._cache.getStore(t)||void 0,i=await this._request.send("auth.signInAnonymously",{anonymous_uuid:a,refresh_token:n});if(i.uuid&&i.refresh_token){this._setAnonymousUUID(i.uuid),this.setRefreshToken(i.refresh_token),await this._request.refreshAccessToken(),Ha(Ja),Ha(Ya,{env:this.config.env,loginType:Qa.ANONYMOUS,persistence:"local"});const e=new ln(this.config.env);return await e.user.refresh(),e}throw new oa({message:"匿名登录失败"})}async linkAndRetrieveDataWithTicket(e){const{anonymousUuidKey:t,refreshTokenKey:a}=this._cache.keys,n=this._cache.getStore(t),i=this._cache.getStore(a),s=await this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:n,refresh_token:i,ticket:e});if(s.refresh_token)return this._clearAnonymousUUID(),this.setRefreshToken(s.refresh_token),await this._request.refreshAccessToken(),Ha(Ka,{env:this.config.env}),Ha(Ya,{loginType:Qa.CUSTOM,persistence:"local"}),{credential:{refreshToken:s.refresh_token}};throw new oa({message:"匿名转化失败"})}_setAnonymousUUID(e){const{anonymousUuidKey:t,loginTypeKey:a}=this._cache.keys;this._cache.removeStore(t),this._cache.setStore(t,e),this._cache.setStore(a,Qa.ANONYMOUS)}_clearAnonymousUUID(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}class dn extends on{async signIn(e){if("string"!=typeof e)throw new oa({code:"PARAM_ERROR",message:"ticket must be a string"});const{refreshTokenKey:t}=this._cache.keys,a=await this._request.send("auth.signInWithTicket",{ticket:e,refresh_token:this._cache.getStore(t)||""});if(a.refresh_token)return this.setRefreshToken(a.refresh_token),await this._request.refreshAccessToken(),Ha(Ja),Ha(Ya,{env:this.config.env,loginType:Qa.CUSTOM,persistence:this.config.persistence}),await this.refreshUserInfo(),new ln(this.config.env);throw new oa({message:"自定义登录失败"})}}class un extends on{async signIn(e,t){if("string"!=typeof e)throw new oa({code:"PARAM_ERROR",message:"email must be a string"});const{refreshTokenKey:a}=this._cache.keys,n=await this._request.send("auth.signIn",{loginType:"EMAIL",email:e,password:t,refresh_token:this._cache.getStore(a)||""}),{refresh_token:i,access_token:s,access_token_expire:o}=n;if(i)return this.setRefreshToken(i),s&&o?this.setAccessToken(s,o):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Ha(Ja),Ha(Ya,{env:this.config.env,loginType:Qa.EMAIL,persistence:this.config.persistence}),new ln(this.config.env);throw n.code?new oa({code:n.code,message:`邮箱登录失败: ${n.message}`}):new oa({message:"邮箱登录失败"})}async activate(e){return this._request.send("auth.activateEndUserMail",{token:e})}async resetPasswordWithToken(e,t){return this._request.send("auth.resetPasswordWithToken",{token:e,newPassword:t})}}class hn extends on{async signIn(e,t){if("string"!=typeof e)throw new oa({code:"PARAM_ERROR",message:"username must be a string"});"string"!=typeof t&&(t="",console.warn("password is empty"));const{refreshTokenKey:a}=this._cache.keys,n=await this._request.send("auth.signIn",{loginType:Qa.USERNAME,username:e,password:t,refresh_token:this._cache.getStore(a)||""}),{refresh_token:i,access_token_expire:s,access_token:o}=n;if(i)return this.setRefreshToken(i),o&&s?this.setAccessToken(o,s):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Ha(Ja),Ha(Ya,{env:this.config.env,loginType:Qa.USERNAME,persistence:this.config.persistence}),new ln(this.config.env);throw n.code?new oa({code:n.code,message:`用户名密码登录失败: ${n.message}`}):new oa({message:"用户名密码登录失败"})}}class mn{constructor(e){this.config=e,this._cache=Fa(e.env),this._request=sn(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),za(Ya,this._onLoginTypeChanged)}get currentUser(){const e=this.hasLoginState();return e&&e.user||null}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}anonymousAuthProvider(){return new cn(this.config)}customAuthProvider(){return new dn(this.config)}emailAuthProvider(){return new un(this.config)}usernameAuthProvider(){return new hn(this.config)}async signInAnonymously(){return new cn(this.config).signIn()}async signInWithEmailAndPassword(e,t){return new un(this.config).signIn(e,t)}signInWithUsernameAndPassword(e,t){return new hn(this.config).signIn(e,t)}async linkAndRetrieveDataWithTicket(e){return this._anonymousAuthProvider||(this._anonymousAuthProvider=new cn(this.config)),za(Ka,this._onAnonymousConverted),await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e)}async signOut(){if(this.loginType===Qa.ANONYMOUS)throw new oa({message:"匿名用户不支持登出操作"});const{refreshTokenKey:e,accessTokenKey:t,accessTokenExpireKey:a}=this._cache.keys,n=this._cache.getStore(e);if(!n)return;const i=await this._request.send("auth.logout",{refresh_token:n});return this._cache.removeStore(e),this._cache.removeStore(t),this._cache.removeStore(a),Ha(Ja),Ha(Ya,{env:this.config.env,loginType:Qa.NULL,persistence:this.config.persistence}),i}async signUpWithEmailAndPassword(e,t){return this._request.send("auth.signUpWithEmailAndPassword",{email:e,password:t})}async sendPasswordResetEmail(e){return this._request.send("auth.sendPasswordResetEmail",{email:e})}onLoginStateChanged(e){za(Ja,(()=>{const t=this.hasLoginState();e.call(this,t)}));const t=this.hasLoginState();e.call(this,t)}onLoginStateExpired(e){za(Wa,e.bind(this))}onAccessTokenRefreshed(e){za(Ga,e.bind(this))}onAnonymousConverted(e){za(Ka,e.bind(this))}onLoginTypeChanged(e){za(Ya,(()=>{const t=this.hasLoginState();e.call(this,t)}))}async getAccessToken(){return{accessToken:(await this._request.getAccessToken()).accessToken,env:this.config.env}}hasLoginState(){const{refreshTokenKey:e}=this._cache.keys;return this._cache.getStore(e)?new ln(this.config.env):null}async isUsernameRegistered(e){if("string"!=typeof e)throw new oa({code:"PARAM_ERROR",message:"username must be a string"});const{data:t}=await this._request.send("auth.isUsernameRegistered",{username:e});return t&&t.isRegistered}getLoginState(){return Promise.resolve(this.hasLoginState())}async signInWithTicket(e){return new dn(this.config).signIn(e)}shouldRefreshAccessToken(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}getUserInfo(){return this._request.send("auth.getUserInfo",{}).then((e=>e.code?e:{...e.data,requestId:e.seqId}))}getAuthHeader(){const{refreshTokenKey:e,accessTokenKey:t}=this._cache.keys,a=this._cache.getStore(e);return{"x-cloudbase-credentials":this._cache.getStore(t)+"/@@/"+a}}_onAnonymousConverted(e){const{env:t}=e.data;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}_onLoginTypeChanged(e){const{loginType:t,persistence:a,env:n}=e.data;n===this.config.env&&(this._cache.updatePersistence(a),this._cache.setStore(this._cache.keys.loginTypeKey,t))}}const pn=function(e,t){t=t||Ca();const a=sn(this.config.env),{cloudPath:n,filePath:i,onUploadProgress:s,fileType:o="image"}=e;return a.send("storage.getUploadMetadata",{path:n}).then((e=>{const{data:{url:r,authorization:l,token:c,fileId:d,cosFileId:u},requestId:h}=e,m={key:n,signature:l,"x-cos-meta-fileid":u,success_action_status:"201","x-cos-security-token":c};a.upload({url:r,data:m,file:i,name:n,fileType:o,onUploadProgress:s}).then((e=>{201===e.statusCode?t(null,{fileID:d,requestId:h}):t(new oa({code:"STORAGE_REQUEST_FAIL",message:`STORAGE_REQUEST_FAIL: ${e.data}`}))})).catch((e=>{t(e)}))})).catch((e=>{t(e)})),t.promise},fn=function(e,t){t=t||Ca();const a=sn(this.config.env),{cloudPath:n}=e;return a.send("storage.getUploadMetadata",{path:n}).then((e=>{t(null,e)})).catch((e=>{t(e)})),t.promise},gn=function({fileList:e},t){if(t=t||Ca(),!e||!Array.isArray(e))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};for(let n of e)if(!n||"string"!=typeof n)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"};const a={fileid_list:e};return sn(this.config.env).send("storage.batchDeleteFile",a).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},yn=function({fileList:e},t){t=t||Ca(),e&&Array.isArray(e)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});let a=[];for(let i of e)"object"==typeof i?(i.hasOwnProperty("fileID")&&i.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),a.push({fileid:i.fileID,max_age:i.maxAge})):"string"==typeof i?a.push({fileid:i}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"});const n={file_list:a};return sn(this.config.env).send("storage.batchGetDownloadUrl",n).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},vn=async function({fileID:e},t){const a=(await yn.call(this,{fileList:[{fileID:e,maxAge:600}]})).fileList[0];if("SUCCESS"!==a.code)return t?t(a):new Promise((e=>{e(a)}));const n=sn(this.config.env);let i=a.download_url;if(i=encodeURI(i),!t)return n.download({url:i});t(await n.download({url:i}))},wn=function({name:e,data:t,query:a,parse:n,search:i},s){const o=s||Ca();let r;try{r=t?JSON.stringify(t):""}catch(c){return Promise.reject(c)}if(!e)return Promise.reject(new oa({code:"PARAM_ERROR",message:"函数名不能为空"}));const l={inQuery:a,parse:n,search:i,function_name:e,request_data:r};return sn(this.config.env).send("functions.invokeFunction",l).then((e=>{if(e.code)o(null,e);else{let a=e.data.response_data;if(n)o(null,{result:a,requestId:e.requestId});else try{a=JSON.parse(e.data.response_data),o(null,{result:a,requestId:e.requestId})}catch(t){o(new oa({message:"response data must be json"}))}}return o.promise})).catch((e=>{o(e)})),o.promise},kn={timeout:15e3,persistence:"session"},bn={};class _n{constructor(e){this.config=e||this.config,this.authObj=void 0}init(e){switch(Ia.adapter||(this.requestClient=new Ia.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:`请求在${(e.timeout||5e3)/1e3}s内未完成,已中断`})),this.config={...kn,...e},!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new _n(this.config)}auth({persistence:e}={}){if(this.authObj)return this.authObj;const t=e||Ia.adapter.primaryStorage||kn.persistence;var a;return t!==this.config.persistence&&(this.config.persistence=t),function(e){const{env:t}=e;Oa[t]=new Ra(e),La[t]=new Ra({...e,persistence:"local"})}(this.config),a=this.config,nn[a.env]=new an(a),this.authObj=new mn(this.config),this.authObj}on(e,t){return za.apply(this,[e,t])}off(e,t){return qa.apply(this,[e,t])}callFunction(e,t){return wn.apply(this,[e,t])}deleteFile(e,t){return gn.apply(this,[e,t])}getTempFileURL(e,t){return yn.apply(this,[e,t])}downloadFile(e,t){return vn.apply(this,[e,t])}uploadFile(e,t){return pn.apply(this,[e,t])}getUploadMetadata(e,t){return fn.apply(this,[e,t])}registerExtension(e){bn[e.name]=e}async invokeExtension(e,t){const a=bn[e];if(!a)throw new oa({message:`扩展${e} 必须先注册`});return await a.invoke(t,this)}useAdapters(e){const{adapter:t,runtime:a}=function(e){const t=(a=e,"[object Array]"===Object.prototype.toString.call(a)?e:[e]);var a;for(const n of t){const{isMatch:e,genAdapter:t,runtime:a}=n;if(e())return{adapter:t(),runtime:a}}}(e)||{};t&&(Ia.adapter=t),a&&(Ia.runtime=a)}}var Sn=new _n;function En(e,t,a){void 0===a&&(a={});var n=/\?/.test(t),i="";for(var s in a)""===i?!n&&(t+="?"):i+="&",i+=s+"="+encodeURIComponent(a[s]);return/^http(s)?:\/\//.test(t+=i)?t:""+e+t}class xn{post(e){const{url:t,data:a,headers:n}=e;return new Promise(((e,i)=>{ra.request({url:En("https:",t),data:a,method:"POST",header:n,success(t){e(t)},fail(e){i(e)}})}))}upload(e){return new Promise(((t,a)=>{const{url:n,file:i,data:s,headers:o,fileType:r}=e,l=ra.uploadFile({url:En("https:",n),name:"file",formData:Object.assign({},s),filePath:i,fileType:r,header:o,success(e){const a={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&s.success_action_status&&(a.statusCode=parseInt(s.success_action_status,10)),t(a)},fail(e){a(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((t=>{e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}const Nn={setItem(e,t){ra.setStorageSync(e,t)},getItem:e=>ra.getStorageSync(e),removeItem(e){ra.removeStorageSync(e)},clear(){ra.clearStorageSync()}};var Vn={genAdapter:function(){return{root:{},reqClass:xn,localStorage:Nn,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};Sn.useAdapters(Vn);const Cn=Sn,Tn=Cn.init;Cn.init=function(e){e.env=e.spaceId;const t=Tn.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;const a=t.auth;return t.auth=function(e){const t=a.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((e=>{var a;t[e]=(a=t[e],function(e){e=e||{};const{success:t,fail:n,complete:i}=sa(e);if(!(t||n||i))return a.call(this,e);a.call(this,e).then((e=>{t&&t(e),i&&i(e)}),(e=>{n&&n(e),i&&i(e)}))}).bind(t)})),t},t.customAuth=t.auth,t};var Dn=Cn,Bn=class extends wa{getAccessToken(){return new Promise(((e,t)=>{const a="Anonymous_Access_token";this.setAccessToken(a),e(a)}))}setupRequest(e,t){const a=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};"auth"!==t&&(a.token=this.accessToken,n["x-basement-token"]=this.accessToken),n["x-serverless-sign"]=ga(a,this.config.clientSecret);const i=fa();n["x-client-info"]=encodeURIComponent(JSON.stringify(i));const{token:s}=ca();return n["x-client-token"]=s,{url:this.config.requestUrl,method:"POST",data:a,dataType:"json",header:JSON.parse(JSON.stringify(n))}}uploadFileToOSS({url:e,formData:t,name:a,filePath:n,fileType:i,onUploadProgress:s}){return new Promise(((o,r)=>{const l=this.adapter.uploadFile({url:e,formData:t,name:a,filePath:n,fileType:i,success(e){e&&e.statusCode<400?o(e):r(new oa({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){r(new oa({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((e=>{s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}uploadFile({filePath:e,cloudPath:t,fileType:a="image",onUploadProgress:n}){if(!t)throw new oa({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});let i;return this.getOSSUploadOptionsFromPath({cloudPath:t}).then((t=>{const{url:s,formData:o,name:r}=t.result;i=t.result.fileUrl;const l={url:s,formData:o,name:r,filePath:e,fileType:a};return this.uploadFileToOSS(Object.assign({},l,{onUploadProgress:n}))})).then((()=>this.reportOSSUpload({cloudPath:t}))).then((t=>new Promise(((a,n)=>{t.success?a({success:!0,filePath:e,fileID:i}):n(new oa({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:e})};return this.request(this.setupRequest(t)).then((e=>{if(e.success)return e.result;throw new oa({code:"DELETE_FILE_FAILED",message:"删除文件失败"})}))}getTempFileURL({fileList:e,maxAge:t}={}){if(!Array.isArray(e)||0===e.length)throw new oa({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const a={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:e,maxAge:t})};return this.request(this.setupRequest(a)).then((e=>{if(e.success)return{fileList:e.result.fileList.map((e=>({fileID:e.fileID,tempFileURL:e.tempFileURL})))};throw new oa({code:"GET_TEMP_FILE_URL_FAILED",message:"获取临时文件链接失败"})}))}},In={init(e){const t=new Bn(e),a={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return a},t.customAuth=t.auth,t}},Pn=gt((function(e,t){e.exports=vt.enc.Hex}));function An(e="",t={}){const{data:a,functionName:n,method:i,headers:s,signHeaderKeys:o=[],config:r}=t,l=Date.now(),c="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),d=Object.assign({},s,{"x-from-app-id":r.spaceAppId,"x-from-env-id":r.spaceId,"x-to-env-id":r.spaceId,"x-from-instance-id":l,"x-from-function-name":n,"x-client-timestamp":l,"x-alipay-source":"client","x-request-id":c,"x-alipay-callid":c,"x-trace-id":c}),u=["x-from-app-id","x-from-env-id","x-to-env-id","x-from-instance-id","x-from-function-name","x-client-timestamp"].concat(o),[h="",m=""]=e.split("?")||[],p=function(e){const t=e.signedHeaders.join(";"),a=e.signedHeaders.map((t=>`${t.toLowerCase()}:${e.headers[t]}\n`)).join(""),n=Na(e.body).toString(Pn),i=`${e.method.toUpperCase()}\n${e.path}\n${e.query}\n${a}\n${t}\n${n}\n`,s=Na(i).toString(Pn),o=`HMAC-SHA256\n${e.timestamp}\n${s}\n`,r=Va(o,e.secretKey).toString(Pn);return`HMAC-SHA256 Credential=${e.secretId}, SignedHeaders=${t}, Signature=${r}`}({path:h,query:m,method:i,headers:d,timestamp:l,body:JSON.stringify(a),secretId:r.accessKey,secretKey:r.secretKey,signedHeaders:u.sort()});return{url:`${r.endpoint}${e}`,headers:Object.assign({},d,{Authorization:p})}}function Mn({url:e,data:t,method:a="POST",headers:n={}}){return new Promise(((i,s)=>{ra.request({url:e,method:a,data:t,header:n,dataType:"json",complete:(e={})=>{const t=n["x-trace-id"]||"";if(!e.statusCode||e.statusCode>=400){const{message:a,errMsg:n,trace_id:i}=e.data||{};return s(new oa({code:"SYS_ERR",message:a||n||"request:fail",requestId:i||t}))}i({status:e.statusCode,data:e.data,headers:e.header,requestId:t})}})}))}function Rn(e,t){const{path:a,data:n,method:i="GET"}=e,{url:s,headers:o}=An(a,{functionName:"",data:n,method:i,headers:{"x-alipay-cloud-mode":"oss","x-data-api-type":"oss","x-expire-timestamp":Date.now()+6e4},signHeaderKeys:["x-data-api-type","x-expire-timestamp"],config:t});return Mn({url:s,data:n,method:i,headers:o}).then((e=>{const t=e.data||{};if(!t.success)throw new oa({code:e.errCode,message:e.errMsg,requestId:e.requestId});return t.data||{}})).catch((e=>{throw new oa({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}function On(e=""){const t=e.trim().replace(/^cloud:\/\//,""),a=t.indexOf("/");if(a<=0)throw new oa({code:"INVALID_PARAM",message:"fileID不合法"});const n=t.substring(0,a),i=t.substring(a+1);return n!==this.config.spaceId&&console.warn("file ".concat(e," does not belong to env ").concat(this.config.spaceId)),i}function Ln(e=""){return"cloud://".concat(this.config.spaceId,"/").concat(e.replace(/^\/+/,""))}var Fn={init:e=>{e.provider="alipay";const t=new class{constructor(e){if(["spaceId","spaceAppId","accessKey","secretKey"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),e.endpoint){if("string"!=typeof e.endpoint)throw new Error("endpoint must be string");if(!/^https:\/\//.test(e.endpoint))throw new Error("endpoint must start with https://");e.endpoint=e.endpoint.replace(/\/$/,"")}this.config=Object.assign({},e,{endpoint:e.endpoint||`https://${e.spaceId}.api-hz.cloudbasefunction.cn`})}callFunction(e){return function(e,t){const{name:a,data:n}=e,i="POST",{url:s,headers:o}=An("/functions/invokeFunction",{functionName:a,data:n,method:i,headers:{"x-to-function-name":a},signHeaderKeys:["x-to-function-name"],config:t});return Mn({url:s,data:n,method:i,headers:o}).then((e=>({errCode:0,success:!0,requestId:e.requestId,result:e.data}))).catch((e=>{throw new oa({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}(e,this.config)}uploadFileToOSS({url:e,filePath:t,fileType:a,formData:n,onUploadProgress:i}){return new Promise(((s,o)=>{const r=ra.uploadFile({url:e,filePath:t,fileType:a,formData:n,name:"file",success(e){e&&e.statusCode<400?s(e):o(new oa({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){o(new oa({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof i&&r&&"function"==typeof r.onProgressUpdate&&r.onProgressUpdate((e=>{i({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}async uploadFile({filePath:e,cloudPath:t="",fileType:a="image",onUploadProgress:n}){if("string"!==xt(t))throw new oa({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new oa({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new oa({code:"INVALID_PARAM",message:"cloudPath不合法"});const i=await Rn({path:"/".concat(t.replace(/^\//,""),"?post_url")},this.config),{file_id:s,upload_url:o,form_data:r}=i,l=r&&r.reduce(((e,t)=>(e[t.key]=t.value,e)),{});return this.uploadFileToOSS({url:o,filePath:e,fileType:a,formData:l,onUploadProgress:n}).then((()=>({fileID:s})))}async getTempFileURL({fileList:e}){return new Promise(((t,a)=>{(!e||e.length<0)&&a(new oa({errCode:"INVALID_PARAM",errMsg:"fileList不能为空数组"})),e.length>50&&a(new oa({errCode:"INVALID_PARAM",errMsg:"fileList数组长度不能超过50"}));const n=[];for(const i of e){"string"!==xt(i)&&a(new oa({errCode:"INVALID_PARAM",errMsg:"fileList的元素必须是非空的字符串"}));const e=On.call(this,i);n.push({file_id:e,expire:600})}Rn({path:"/?download_url",data:{file_list:n},method:"POST"},this.config).then((e=>{const{file_list:a=[]}=e;t({fileList:a.map((e=>({fileID:Ln.call(this,e.file_id),tempFileURL:e.download_url})))})})).catch((e=>a(e)))}))}}(e);return t.auth=function(){return{signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!0)}}},t}};function $n({data:e}){let t;t=fa();const a=JSON.parse(JSON.stringify(e||{}));if(Object.assign(a,{clientInfo:t}),!a.uniIdToken){const{token:e}=ca();e&&(a.uniIdToken=e)}return a}const jn=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}];var Un=/[\\^$.*+?()[\]{}|]/g,zn=RegExp(Un.source);function Hn(e,t,a){return e.replace(new RegExp((n=t)&&zn.test(n)?n.replace(Un,"\\$&"):n,"g"),a);var n}const qn=2e4,Jn={code:20101,message:"Invalid client"};function Wn(e){const{errSubject:t,subject:a,errCode:n,errMsg:i,code:s,message:o,cause:r}=e||{};return new oa({subject:t||a||"uni-secure-network",code:n||s||qn,message:i||o,cause:r})}let Yn;function Kn({secretType:e}={}){return"request"===e||"response"===e||"both"===e}function Gn({name:e,data:t={}}={}){return"DCloud-clientDB"===e&&"encryption"===t.redirectTo&&"getAppClientKey"===t.action}function Qn({functionName:e,result:t,logPvd:a}){}function Zn(e){const t=e.callFunction,a=function(a){const n=a.name;a.data=$n.call(e,{data:a.data});const i={aliyun:"aliyun",tencent:"tcb",tcb:"tcb",alipay:"alipay"}[this.config.provider],s=Kn(a),o=Gn(a),r=s||o;return t.call(this,a).then((e=>(e.errCode=0,!r&&Qn.call(this,{functionName:n,result:e,logPvd:i}),Promise.resolve(e))),(e=>(!r&&Qn.call(this,{functionName:n,result:e,logPvd:i}),e&&e.message&&(e.message=function({message:e="",extraInfo:t={},formatter:a=[]}={}){for(let n=0;n<a.length;n++){const{rule:i,content:s,mode:o}=a[n],r=e.match(i);if(!r)continue;let l=s;for(let e=1;e<r.length;e++)l=Hn(l,`{$${e}}`,r[e]);for(const e in t)l=Hn(l,`{${e}}`,t[e]);return"replace"===o?l:e+l}return e}({message:`[${a.name}]: ${e.message}`,formatter:jn,extraInfo:{functionName:n}})),Promise.reject(e))))};e.callFunction=function(t){const{provider:n,spaceId:i}=e.config,s=t.name;let o,r;return t.data=t.data||{},o=a,o=o.bind(e),r=Gn(t)?a.call(e,t):Kn(t)?new Yn({secretType:t.secretType,uniCloudIns:e}).wrapEncryptDataCallFunction(a.bind(e))(t):function({provider:e,spaceId:t,functionName:a}={}){const{appId:n,uniPlatform:i,osName:s}=ma();let o=i;"app"===i&&(o=s);const r=function({provider:e,spaceId:t}={}){const a=Pt;if(!a)return{};e=function(e){return"tencent"===e?"tcb":e}(e);const n=a.find((a=>a.provider===e&&a.spaceId===t));return n&&n.config}({provider:e,spaceId:t});if(!r||!r.accessControl||!r.accessControl.enable)return!1;const l=r.accessControl.function||{},c=Object.keys(l);if(0===c.length)return!0;const d=function(e,t){let a,n,i;for(let s=0;s<e.length;s++){const o=e[s];o!==t?"*"!==o?o.split(",").map((e=>e.trim())).indexOf(t)>-1&&(n=o):i=o:a=o}return a||n||i}(c,a);if(!d)return!1;if((l[d]||[]).find(((e={})=>e.appId===n&&(e.platform||"").toLowerCase()===o.toLowerCase())))return!0;throw console.error(`此应用[appId: ${n}, platform: ${o}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`),Wn(Jn)}({provider:n,spaceId:i,functionName:s})?new Yn({secretType:t.secretType,uniCloudIns:e}).wrapVerifyClientCallFunction(a.bind(e))(t):o(t),Object.defineProperty(r,"result",{get:()=>(console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{})}),r.then((e=>("undefined"!=typeof UTSJSONObject&&(e.result=new UTSJSONObject(e.result)),e)))}}Yn=class{constructor(){throw Wn({message:"Platform app is not enabled, please check whether secure network module is enabled in your manifest.json"})}};const Xn=Symbol("CLIENT_DB_INTERNAL");function ei(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=Xn,e.inspect=null,e.__v_raw=void 0,new Proxy(e,{get(e,a,n){if("_uniClient"===a)return null;if("symbol"==typeof a)return e[a];if(a in e||"string"!=typeof a){const t=e[a];return"function"==typeof t?t.bind(e):t}return t.get(e,a,n)}})}function ti(e){return{on:(t,a)=>{e[t]=e[t]||[],e[t].indexOf(a)>-1||e[t].push(a)},off:(t,a)=>{e[t]=e[t]||[];const n=e[t].indexOf(a);-1!==n&&e[t].splice(n,1)}}}const ai=["db.Geo","db.command","command.aggregate"];function ni(e,t){return ai.indexOf(`${e}.${t}`)>-1}function ii(e){switch(xt(e=la(e))){case"array":return e.map((e=>ii(e)));case"object":return e._internalType===Xn||Object.keys(e).forEach((t=>{e[t]=ii(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function si(e){return e&&e.content&&e.content.$method}class oi{constructor(e,t,a){this.content=e,this.prevStage=t||null,this.udb=null,this._database=a}toJSON(){let e=this;const t=[e.content];for(;e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((e=>({$method:e.$method,$param:ii(e.$param)})))}}toString(){return JSON.stringify(this.toJSON())}getAction(){const e=this.toJSON().$db.find((e=>"action"===e.$method));return e&&e.$param&&e.$param[0]}getCommand(){return{$db:this.toJSON().$db.filter((e=>"action"!==e.$method))}}get isAggregate(){let e=this;for(;e;){const t=si(e),a=si(e.prevStage);if("aggregate"===t&&"collection"===a||"pipeline"===t)return!0;e=e.prevStage}return!1}get isCommand(){let e=this;for(;e;){if("command"===si(e))return!0;e=e.prevStage}return!1}get isAggregateCommand(){let e=this;for(;e;){const t=si(e),a=si(e.prevStage);if("aggregate"===t&&"command"===a)return!0;e=e.prevStage}return!1}getNextStageFn(e){const t=this;return function(){return ri({$method:e,$param:ii(Array.from(arguments))},t,t._database)}}get count(){return this.isAggregate?this.getNextStageFn("count"):function(){return this._send("count",Array.from(arguments))}}get remove(){return this.isCommand?this.getNextStageFn("remove"):function(){return this._send("remove",Array.from(arguments))}}get(){return this._send("get",Array.from(arguments))}get add(){return this.isCommand?this.getNextStageFn("add"):function(){return this._send("add",Array.from(arguments))}}update(){return this._send("update",Array.from(arguments))}end(){return this._send("end",Array.from(arguments))}get set(){return this.isCommand?this.getNextStageFn("set"):function(){throw new Error("JQL禁止使用set方法")}}_send(e,t){const a=this.getAction(),n=this.getCommand();return n.$db.push({$method:e,$param:ii(t)}),this._database._callCloudFunction({action:a,command:n})}}function ri(e,t,a){return ei(new oi(e,t,a),{get(e,t){let n="db";return e&&e.content&&(n=e.content.$method),ni(n,t)?ri({$method:t},e,a):function(){return ri({$method:t,$param:ii(Array.from(arguments))},e,a)}}})}function li({path:e,method:t}){return class{constructor(){this.param=Array.from(arguments)}toJSON(){return{$newDb:[...e.map((e=>({$method:e}))),{$method:t,$param:this.param}]}}toString(){return JSON.stringify(this.toJSON())}}}function ci(e,t={}){return ei(new e(t),{get:(e,t)=>ni("db",t)?ri({$method:t},null,e):function(){return ri({$method:t,$param:ii(Array.from(arguments))},null,e)}})}class di extends class{constructor({uniClient:e={},isJQL:t=!1}={}){this._uniClient=e,this._authCallBacks={},this._dbCallBacks={},e._isDefault&&(this._dbCallBacks=Ot("_globalUniCloudDatabaseCallback")),t||(this.auth=ti(this._authCallBacks)),this._isJQL=t,Object.assign(this,ti(this._dbCallBacks)),this.env=ei({},{get:(e,t)=>({$env:t})}),this.Geo=ei({},{get:(e,t)=>li({path:["Geo"],method:t})}),this.serverDate=li({path:[],method:"serverDate"}),this.RegExp=li({path:[],method:"RegExp"})}getCloudEnv(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}_callback(e,t){const a=this._dbCallBacks;a[e]&&a[e].forEach((e=>{e(...t)}))}_callbackAuth(e,t){const a=this._authCallBacks;a[e]&&a[e].forEach((e=>{e(...t)}))}multiSend(){const e=Array.from(arguments),t=e.map((e=>{const t=e.getAction(),a=e.getCommand();if("getTemp"!==a.$db[a.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:a}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}{_parseResult(e){return this._isJQL?e.result:e}_callCloudFunction({action:e,command:t,multiCommand:a,queryList:n}){function i(e,t){if(a&&n)for(let a=0;a<n.length;a++){const i=n[a];i.udb&&"function"==typeof i.udb.setResult&&(t?i.udb.setResult(t):i.udb.setResult(e.result.dataList[a]))}}const s=this,o=this._isJQL?"databaseForJQL":"database";function r(e){return s._callback("error",[e]),Ut(zt(o,"fail"),e).then((()=>Ut(zt(o,"complete"),e))).then((()=>(i(null,e),ta(Jt,{type:Kt,content:e}),Promise.reject(e))))}const l=Ut(zt(o,"invoke")),c=this._uniClient;return l.then((()=>c.callFunction({name:"DCloud-clientDB",type:"CLIENT_DB",data:{action:e,command:t,multiCommand:a}}))).then((e=>{const{code:t,message:a,token:n,tokenExpired:l,systemInfo:c=[]}=e.result;if(c)for(let i=0;i<c.length;i++){const{level:e,message:t,detail:a}=c[i],n=console["warn"===e?"error":e]||console.log;let s="[System Info]"+t;a&&(s=`${s}\n详细信息:${a}`),n(s)}if(t)return r(new oa({code:t,message:a,requestId:e.requestId}));e.result.errCode=e.result.errCode||e.result.code,e.result.errMsg=e.result.errMsg||e.result.message,n&&l&&(da({token:n,tokenExpired:l}),this._callbackAuth("refreshToken",[{token:n,tokenExpired:l}]),this._callback("refreshToken",[{token:n,tokenExpired:l}]),ta(Yt,{token:n,tokenExpired:l}));const d=[{prop:"affectedDocs",tips:"affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"},{prop:"code",tips:"code不再推荐使用,请使用errCode替代"},{prop:"message",tips:"message不再推荐使用,请使用errMsg替代"}];for(let i=0;i<d.length;i++){const{prop:t,tips:a}=d[i];if(t in e.result){const n=e.result[t];Object.defineProperty(e.result,t,{get:()=>(console.warn(a),n)})}}return u=e,Ut(zt(o,"success"),u).then((()=>Ut(zt(o,"complete"),u))).then((()=>{i(u,null);const e=s._parseResult(u);return ta(Jt,{type:Kt,content:e}),Promise.resolve(e)}));var u}),(e=>(/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),r(new oa({code:e.code||"SYSTEM_ERROR",message:e.message,requestId:e.requestId})))))}}const ui="token无效,跳转登录页面",hi="token过期,跳转登录页面",mi={TOKEN_INVALID_TOKEN_EXPIRED:hi,TOKEN_INVALID_INVALID_CLIENTID:ui,TOKEN_INVALID:ui,TOKEN_INVALID_WRONG_TOKEN:ui,TOKEN_INVALID_ANONYMOUS_USER:ui},pi={"uni-id-token-expired":hi,"uni-id-check-token-failed":ui,"uni-id-token-not-exist":ui,"uni-id-check-device-feature-failed":ui};function fi(e,t){let a="";return a=e?`${e}/${t}`:t,a.replace(/^\//,"")}function gi(e=[],t=""){const a=[],n=[];return e.forEach((e=>{!0===e.needLogin?a.push(fi(t,e.path)):!1===e.needLogin&&n.push(fi(t,e.path))})),{needLoginPage:a,notNeedLoginPage:n}}function yi(e){return e.split("?")[0].replace(/^\//,"")}function vi(){return function(e){let t=e&&e.$page&&e.$page.fullPath||"";return t?("/"!==t.charAt(0)&&(t="/"+t),t):t}(function(){const e=getCurrentPages();return e[e.length-1]}())}function wi(){return yi(vi())}function ki(e="",t={}){if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;const a=t.list,n=yi(e);return a.some((e=>e.pagePath===n))}const bi=!!ft.uniIdRouter,{loginPage:_i,routerNeedLogin:Si,resToLogin:Ei,needLoginPage:xi,notNeedLoginPage:Ni,loginPageInTabBar:Vi}=function({pages:e=[],subPackages:t=[],uniIdRouter:a={},tabBar:n={}}=ft){const{loginPage:i,needLogin:s=[],resToLogin:o=!0}=a,{needLoginPage:r,notNeedLoginPage:l}=gi(e),{needLoginPage:c,notNeedLoginPage:d}=function(e=[]){const t=[],a=[];return e.forEach((e=>{const{root:n,pages:i=[]}=e,{needLoginPage:s,notNeedLoginPage:o}=gi(i,n);t.push(...s),a.push(...o)})),{needLoginPage:t,notNeedLoginPage:a}}(t);return{loginPage:i,routerNeedLogin:s,resToLogin:o,needLoginPage:[...r,...c],notNeedLoginPage:[...l,...d],loginPageInTabBar:ki(i,n)}}();if(xi.indexOf(_i)>-1)throw new Error(`Login page [${_i}] should not be "needLogin", please check your pages.json`);function Ci(e){const t=wi();if("/"===e.charAt(0))return e;const[a,n]=e.split("?"),i=a.replace(/^\//,"").split("/"),s=t.split("/");s.pop();for(let o=0;o<i.length;o++){const e=i[o];".."===e?s.pop():"."!==e&&s.push(e)}return""===s[0]&&s.shift(),"/"+s.join("/")+(n?"?"+n:"")}function Ti({redirect:e}){const t=yi(e),a=yi(_i);return wi()!==a&&t!==a}function Di({api:e,redirect:t}={}){if(!t||!Ti({redirect:t}))return;const a=(i=t,"/"!==(n=_i).charAt(0)&&(n="/"+n),i?n.indexOf("?")>-1?n+`&uniIdRedirectUrl=${encodeURIComponent(i)}`:n+`?uniIdRedirectUrl=${encodeURIComponent(i)}`:n);var n,i;Vi?"navigateTo"!==e&&"redirectTo"!==e||(e="switchTab"):"switchTab"===e&&(e="navigateTo");const s={navigateTo:uni.navigateTo,redirectTo:uni.redirectTo,switchTab:uni.switchTab,reLaunch:uni.reLaunch};setTimeout((()=>{s[e]({url:a})}),0)}function Bi({url:e}={}){const t={abortLoginPageJump:!1,autoToLoginPage:!1},a=function(){const{token:e,tokenExpired:t}=ca();let a;if(e){if(t<Date.now()){const e="uni-id-token-expired";a={errCode:e,errMsg:pi[e]}}}else{const e="uni-id-check-token-failed";a={errCode:e,errMsg:pi[e]}}return a}();if(function(e){const t=yi(Ci(e));return!(Ni.indexOf(t)>-1)&&(xi.indexOf(t)>-1||Si.some((t=>{return a=e,new RegExp(t).test(a);var a})))}(e)&&a){if(a.uniIdRedirectUrl=e,Zt(Wt).length>0)return setTimeout((()=>{ta(Wt,a)}),0),t.abortLoginPageJump=!0,t;t.autoToLoginPage=!0}return t}function Ii(){!function(){const e=vi(),{abortLoginPageJump:t,autoToLoginPage:a}=Bi({url:e});t||a&&Di({api:"redirectTo",redirect:e})}();const e=["navigateTo","redirectTo","reLaunch","switchTab"];for(let t=0;t<e.length;t++){const a=e[t];uni.addInterceptor(a,{invoke(e){const{abortLoginPageJump:t,autoToLoginPage:n}=Bi({url:e.url});return t?e:n?(Di({api:a,redirect:Ci(e.url)}),!1):e}})}}function Pi(){this.onResponse((e=>{const{type:t,content:a}=e;let n=!1;switch(t){case"cloudobject":n=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in pi}(a);break;case"clientdb":n=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in mi}(a)}n&&function(e={}){const t=Zt(Wt);ia().then((()=>{const a=vi();if(a&&Ti({redirect:a}))return t.length>0?ta(Wt,Object.assign({uniIdRedirectUrl:a},e)):void(_i&&Di({api:"navigateTo",redirect:a}))}))}(a)}))}function Ai(e){var t;(t=e).onResponse=function(e){Xt(Jt,e)},t.offResponse=function(e){ea(Jt,e)},function(e){e.onNeedLogin=function(e){Xt(Wt,e)},e.offNeedLogin=function(e){ea(Wt,e)},bi&&(Ot("_globalUniCloudStatus").needLoginInit||(Ot("_globalUniCloudStatus").needLoginInit=!0,ia().then((()=>{Ii.call(e)})),Ei&&Pi.call(e)))}(e),function(e){e.onRefreshToken=function(e){Xt(Yt,e)},e.offRefreshToken=function(e){ea(Yt,e)}}(e)}let Mi;const Ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Oi=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Li(){const e=ca().token||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let a;try{a=JSON.parse((n=t[1],decodeURIComponent(Mi(n).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(i){throw new Error("获取当前用户信息出错,详细错误信息为:"+i.message)}var n;return a.tokenExpired=1e3*a.exp,delete a.exp,delete a.iat,a}Mi="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Oi.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var a,n,i="",s=0;s<e.length;)t=Ri.indexOf(e.charAt(s++))<<18|Ri.indexOf(e.charAt(s++))<<12|(a=Ri.indexOf(e.charAt(s++)))<<6|(n=Ri.indexOf(e.charAt(s++))),i+=64===a?String.fromCharCode(t>>16&255):64===n?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var Fi=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(gt((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const a="chooseAndUploadFile:ok",n="chooseAndUploadFile:fail";function i(e,t){return e.tempFiles.forEach(((e,a)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+a+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((e=>e.path))),e}function s(e,t,{onChooseFile:n,onUploadProgress:i}){return t.then((e=>{if(n){const t=n(e);if(void 0!==t)return Promise.resolve(t).then((t=>void 0===t?e:t))}return e})).then((t=>!1===t?{errMsg:a,tempFilePaths:[],tempFiles:[]}:function(e,t,n=5,i){(t=Object.assign({},t)).errMsg=a;const s=t.tempFiles,o=s.length;let r=0;return new Promise((a=>{for(;r<n;)l();function l(){const n=r++;if(n>=o)return void(!s.find((e=>!e.url&&!e.errMsg))&&a(t));const c=s[n];e.uploadFile({provider:c.provider,filePath:c.path,cloudPath:c.cloudPath,fileType:c.fileType,cloudPathAsRealPath:c.cloudPathAsRealPath,onUploadProgress(e){e.index=n,e.tempFile=c,e.tempFilePath=c.path,i&&i(e)}}).then((e=>{c.url=e.fileID,n<o&&l()})).catch((e=>{c.errMsg=e.errMsg||e.message,n<o&&l()}))}}))}(e,t,5,i)))}t.initChooseAndUploadFile=function(e){return function(t={type:"all"}){return"image"===t.type?s(e,function(e){const{count:t,sizeType:a,sourceType:s=["album","camera"],extension:o}=e;return new Promise(((e,r)=>{uni.chooseImage({count:t,sizeType:a,sourceType:s,extension:o,success(t){e(i(t,"image"))},fail(e){r({errMsg:e.errMsg.replace("chooseImage:fail",n)})}})}))}(t),t):"video"===t.type?s(e,function(e){const{camera:t,compressed:a,maxDuration:s,sourceType:o=["album","camera"],extension:r}=e;return new Promise(((e,l)=>{uni.chooseVideo({camera:t,compressed:a,maxDuration:s,sourceType:o,extension:r,success(t){const{tempFilePath:a,duration:n,size:s,height:o,width:r}=t;e(i({errMsg:"chooseVideo:ok",tempFilePaths:[a],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:a,size:s,type:t.tempFile&&t.tempFile.type||"",width:r,height:o,duration:n,fileType:"video",cloudPath:""}]},"video"))},fail(e){l({errMsg:e.errMsg.replace("chooseVideo:fail",n)})}})}))}(t),t):s(e,function(e){const{count:t,extension:a}=e;return new Promise(((e,s)=>{let o=uni.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(o=wx.chooseMessageFile),"function"!=typeof o)return s({errMsg:n+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});o({type:"all",count:t,extension:a,success(t){e(i(t))},fail(e){s({errMsg:e.errMsg.replace("chooseFile:fail",n)})}})}))}(t),t)}}})));function $i(e){return{props:{localdata:{type:Array,default:()=>[]},options:{type:[Object,Array],default:()=>({})},spaceInfo:{type:Object,default:()=>({})},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:()=>({mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{},mixinDatacomError:null}),created(){this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((()=>{var e=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{if("manual"===this.loadtime)return;let a=!1;const n=[];for(let i=2;i<e.length;i++)e[i]!==t[i]&&(n.push(e[i]),a=!0);e[0]!==t[0]&&(this.mixinDatacomPage.current=this.pageCurrent),this.mixinDatacomPage.size=this.pageSize,this.onMixinDatacomPropsChange(a,n)}))},methods:{onMixinDatacomPropsChange(e,t){},mixinDatacomEasyGet({getone:e=!1,success:t,fail:a}={}){this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomError=null,this.mixinDatacomGet().then((a=>{this.mixinDatacomLoading=!1;const{data:n,count:i}=a.result;this.getcount&&(this.mixinDatacomPage.count=i),this.mixinDatacomHasMore=n.length<this.pageSize;const s=e?n.length?n[0]:void 0:n;this.mixinDatacomResData=s,t&&t(s)})).catch((e=>{this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=e,this.mixinDatacomError=e,a&&a(e)})))},mixinDatacomGet(t={}){let a;t=t||{},a="undefined"!=typeof __uniX&&__uniX?e.databaseForJQL(this.spaceInfo):e.database(this.spaceInfo);const n=t.action||this.action;n&&(a=a.action(n));const i=t.collection||this.collection;a=Array.isArray(i)?a.collection(...i):a.collection(i);const s=t.where||this.where;s&&Object.keys(s).length&&(a=a.where(s));const o=t.field||this.field;o&&(a=a.field(o));const r=t.foreignKey||this.foreignKey;r&&(a=a.foreignKey(r));const l=t.groupby||this.groupby;l&&(a=a.groupBy(l));const c=t.groupField||this.groupField;c&&(a=a.groupField(c)),!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(a=a.distinct());const d=t.orderby||this.orderby;d&&(a=a.orderBy(d));const u=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,h=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,m=void 0!==t.getcount?t.getcount:this.getcount,p=void 0!==t.gettree?t.gettree:this.gettree,f=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,g={getCount:m},y={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return p&&(g.getTree=y),f&&(g.getTreePath=y),a=a.skip(h*(u-1)).limit(h).get(g),a}}}}function ji(e){return Ot("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}",e.config.spaceId))}async function Ui({openid:e,callLoginByWeixin:t=!1}={}){throw ji(this),new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `app`")}async function zi(e){const t=ji(this);return t.initPromise||(t.initPromise=Ui.call(this,e).then((e=>e)).catch((e=>{throw delete t.initPromise,e}))),t.initPromise}function Hi(e){const t={getSystemInfo:uni.getSystemInfo,getPushClientId:uni.getPushClientId};return function(a){return new Promise(((n,i)=>{t[e]({...a,success(e){n(e)},fail(e){i(e)}})}))}}class qi extends class{constructor(){this._callback={}}addListener(e,t){this._callback[e]||(this._callback[e]=[]),this._callback[e].push(t)}on(e,t){return this.addListener(e,t)}removeListener(e,t){if(!t)throw new Error('The "listener" argument must be of type function. Received undefined');const a=this._callback[e];if(!a)return;const n=function(e,t){for(let a=e.length-1;a>=0;a--)if(e[a]===t)return a;return-1}(a,t);a.splice(n,1)}off(e,t){return this.removeListener(e,t)}removeAllListener(e){delete this._callback[e]}emit(e,...t){const a=this._callback[e];if(a)for(let n=0;n<a.length;n++)a[n](...t)}}{constructor(){super(),this._uniPushMessageCallback=this._receivePushMessage.bind(this),this._currentMessageId=-1,this._payloadQueue=[]}init(){return Promise.all([Hi("getSystemInfo")(),Hi("getPushClientId")()]).then((([{appId:e}={},{cid:t}={}]=[])=>{if(!e)throw new Error("Invalid appId, please check the manifest.json file");if(!t)throw new Error("Invalid push client id");this._appId=e,this._pushClientId=t,this._seqId=Date.now()+"-"+Math.floor(9e5*Math.random()+1e5),this.emit("open"),this._initMessageListener()}),(e=>{throw this.emit("error",e),this.close(),e}))}async open(){return this.init()}_isUniCloudSSE(e){if("receive"!==e.type)return!1;const t=e&&e.data&&e.data.payload;return!(!t||"UNI_CLOUD_SSE"!==t.channel||t.seqId!==this._seqId)}_receivePushMessage(e){if(!this._isUniCloudSSE(e))return;const t=e&&e.data&&e.data.payload,{action:a,messageId:n,message:i}=t;this._payloadQueue.push({action:a,messageId:n,message:i}),this._consumMessage()}_consumMessage(){for(;;){const e=this._payloadQueue.find((e=>e.messageId===this._currentMessageId+1));if(!e)break;this._currentMessageId++,this._parseMessagePayload(e)}}_parseMessagePayload(e){const{action:t,messageId:a,message:n}=e;"end"===t?this._end({messageId:a,message:n}):"message"===t&&this._appendMessage({messageId:a,message:n})}_appendMessage({messageId:e,message:t}={}){this.emit("message",t)}_end({messageId:e,message:t}={}){this.emit("end",t),this.close()}_initMessageListener(){uni.onPushMessage(this._uniPushMessageCallback)}_destroy(){uni.offPushMessage(this._uniPushMessageCallback)}toJSON(){return{appId:this._appId,pushClientId:this._pushClientId,seqId:this._seqId}}close(){this._destroy(),this.emit("close")}}const Ji={tcb:Dn,tencent:Dn,aliyun:ka,private:In,alipay:Fn};let Wi=new class{init(e){let t={};const a=Ji[e.provider];if(!a)throw new Error("未提供正确的provider参数");var n;return t=a.init(e),function(e){e._initPromiseHub||(e._initPromiseHub=new Bt({createPromise:function(){let t=Promise.resolve();t=new Promise((e=>{setTimeout((()=>{e()}),1)}));const a=e.auth();return t.then((()=>a.getLoginState())).then((e=>e?Promise.resolve():a.signInAnonymously()))}}))}(t),Zn(t),function(e){const t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),(n=t).database=function(e){if(e&&Object.keys(e).length>0)return n.init(e).database();if(this._database)return this._database;const t=ci(di,{uniClient:n});return this._database=t,t},n.databaseForJQL=function(e){if(e&&Object.keys(e).length>0)return n.init(e).databaseForJQL();if(this._databaseForJQL)return this._databaseForJQL;const t=ci(di,{uniClient:n,isJQL:!0});return this._databaseForJQL=t,t},function(e){e.getCurrentUserInfo=Li,e.chooseAndUploadFile=Fi.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return $i(e)}}),e.SSEChannel=qi,e.initSecureNetworkByWeixin=function(e){return function({openid:t,callLoginByWeixin:a=!1}={}){return zi.call(e,{openid:t,callLoginByWeixin:a})}}(e),e.importObject=function(t){return function(a,n={}){n=function(e,t={}){return e.customUI=t.customUI||e.customUI,e.parseSystemError=t.parseSystemError||e.parseSystemError,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),"object"==typeof t.secretMethods&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},n);const{customUI:i,loadingOptions:s,errorOptions:o,parseSystemError:r}=n,l=!i;return new Proxy({},{get(i,c){switch(c){case"toString":return"[object UniCloudObject]";case"toJSON":return{}}return function({fn:e,interceptorName:t,getCallbackArgs:a}={}){return async function(...n){const i=a?a({params:n}):{};let s,o;try{return await Ut(zt(t,"invoke"),{...i}),s=await e(...n),await Ut(zt(t,"success"),{...i,result:s}),s}catch(r){throw o=r,await Ut(zt(t,"fail"),{...i,error:o}),o}finally{await Ut(zt(t,"complete"),o?{...i,error:o}:{...i,result:s})}}}({fn:async function i(...d){let u;l&&uni.showLoading({title:s.title,mask:s.mask});const h={name:a,type:"OBJECT",data:{method:c,params:d}};"object"==typeof n.secretMethods&&function(e,t){const a=t.data.method,n=e.secretMethods||{},i=n[a]||n["*"];i&&(t.secretType=i)}(n,h);let m=!1;try{u=await t.callFunction(h)}catch(e){m=!0,u={result:new oa(e)}}const{errSubject:p,errCode:f,errMsg:g,newToken:y}=u.result||{};if(l&&uni.hideLoading(),y&&y.token&&y.tokenExpired&&(da(y),ta(Yt,{...y})),f){let e=g;if(m&&r&&(e=(await r({objectName:a,methodName:c,params:d,errSubject:p,errCode:f,errMsg:g})).errMsg||g),l)if("toast"===o.type)uni.showToast({title:e,icon:"none"});else{if("modal"!==o.type)throw new Error(`Invalid errorOptions.type: ${o.type}`);{const{confirm:t}=await async function({title:e,content:t,showCancel:a,cancelText:n,confirmText:i}={}){return new Promise(((s,o)=>{uni.showModal({title:e,content:t,showCancel:a,cancelText:n,confirmText:i,success(e){s(e)},fail(){s({confirm:!1,cancel:!0})}})}))}({title:"提示",content:e,showCancel:o.retry,cancelText:"取消",confirmText:o.retry?"重试":"确定"});if(o.retry&&t)return i(...d)}}const t=new oa({subject:p,code:f,message:g,requestId:u.requestId});throw t.detail=u.result,ta(Jt,{type:Qt,content:t}),t}return ta(Jt,{type:Qt,content:u.result}),u.result},interceptorName:"callObject",getCallbackArgs:function({params:e}={}){return{objectName:a,methodName:c,params:e}}})}})}}(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((e=>{if(!t[e])return;const a=t[e];t[e]=function(){return a.apply(t,Array.from(arguments))},t[e]=function(e,t){return function(a){let n=!1;if("callFunction"===t){const e=a&&a.type||_t;n=e!==_t}const i="callFunction"===t&&!n,s=this._initPromiseHub.exec();a=a||{};const{success:o,fail:r,complete:l}=sa(a),c=s.then((()=>n?Promise.resolve():Ut(zt(t,"invoke"),a))).then((()=>e.call(this,a))).then((e=>n?Promise.resolve(e):Ut(zt(t,"success"),e).then((()=>Ut(zt(t,"complete"),e))).then((()=>(i&&ta(Jt,{type:Gt,content:e}),Promise.resolve(e))))),(e=>n?Promise.reject(e):Ut(zt(t,"fail"),e).then((()=>Ut(zt(t,"complete"),e))).then((()=>(ta(Jt,{type:Gt,content:e}),Promise.reject(e))))));if(!(o||r||l))return c;c.then((e=>{o&&o(e),l&&l(e),i&&ta(Jt,{type:Gt,content:e})}),(e=>{r&&r(e),l&&l(e),i&&ta(Jt,{type:Gt,content:e})}))}}(t[e],e).bind(t)})),t.init=this.init,t}};(()=>{const e=At;let t={};if(e&&1===e.length)t=e[0],Wi=Wi.init(t),Wi._isDefault=!0;else{const t=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];let a;a=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在uniCloud目录右键关联服务空间",t.forEach((e=>{Wi[e]=function(){return console.error(a),Promise.reject(new oa({code:"SYS_ERR",message:a}))}}))}Object.assign(Wi,{get mixinDatacom(){return $i(Wi)}}),Ai(Wi),Wi.addInterceptor=$t,Wi.removeInterceptor=jt,Wi.interceptObject=Ht})();var Yi=Wi;const Ki="chooseAndUploadFile:fail";function Gi(e,t){return e.tempFiles.forEach(((e,a)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+a+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((e=>e.path))),e}function Qi(e,t=5,a){const n=(e=JSON.parse(JSON.stringify(e))).length;let i=0,s=this;return new Promise((o=>{for(;i<t;)r();function r(){let t=i++;if(t>=n)return void(!e.find((e=>!e.url&&!e.errMsg))&&o(e));const l=e[t],c=s.files.findIndex((e=>e.uuid===l.uuid));l.url="",delete l.errMsg,Yi.uploadFile({filePath:l.path,cloudPath:l.cloudPath,fileType:l.fileType,onUploadProgress:e=>{e.index=c,a&&a(e)}}).then((e=>{l.url=e.fileID,l.index=c,t<n&&r()})).catch((e=>{l.errMsg=e.errMsg||e.message,l.index=c,t<n&&r()}))}}))}function Zi(e,{onChooseFile:t,onUploadProgress:a}){return e.then((e=>{if(t){const a=t(e);if(void 0!==a)return Promise.resolve(a).then((t=>void 0===t?e:t))}return e})).then((e=>!1===e?{errMsg:"chooseAndUploadFile:ok",tempFilePaths:[],tempFiles:[]}:e))}function Xi(e={type:"all"}){return"image"===e.type?Zi(function(e){const{count:t,sizeType:a=["original","compressed"],sourceType:n,extension:i}=e;return new Promise(((e,s)=>{uni.chooseImage({count:t,sizeType:a,sourceType:n,extension:i,success(t){e(Gi(t,"image"))},fail(e){s({errMsg:e.errMsg.replace("chooseImage:fail",Ki)})}})}))}(e),e):"video"===e.type?Zi(function(e){const{count:t,camera:a,compressed:n,maxDuration:i,sourceType:s,extension:o}=e;return new Promise(((e,t)=>{uni.chooseVideo({camera:a,compressed:n,maxDuration:i,sourceType:s,extension:o,success(t){const{tempFilePath:a,duration:n,size:i,height:s,width:o}=t;e(Gi({errMsg:"chooseVideo:ok",tempFilePaths:[a],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:a,size:i,type:t.tempFile&&t.tempFile.type||"",width:o,height:s,duration:n,fileType:"video",cloudPath:""}]},"video"))},fail(e){t({errMsg:e.errMsg.replace("chooseVideo:fail",Ki)})}})}))}(e),e):Zi(function(e){const{count:t,extension:a}=e;return new Promise(((e,n)=>{let i=uni.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(i=wx.chooseMessageFile),"function"!=typeof i)return n({errMsg:Ki+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});i({type:"all",count:t,extension:a,success(t){e(Gi(t))},fail(e){n({errMsg:e.errMsg.replace("chooseFile:fail",Ki)})}})}))}(e),e)}const es=e=>{const t=e.lastIndexOf("."),a=e.length;return{name:e.substring(0,t),ext:e.substring(t+1,a)}},ts=e=>{if(Array.isArray(e))return e;return e.replace(/(\[|\])/g,"").split(",")},as=async(e,t="image")=>{const a=es(e.name).ext.toLowerCase();let n={name:e.name,uuid:e.uuid,extname:a||"",cloudPath:e.cloudPath,fileType:e.fileType,thumbTempFilePath:e.thumbTempFilePath,url:e.path||e.path,size:e.size,image:{},path:e.path,video:{}};if("image"===t){const t=await(i=e.path,new Promise(((e,t)=>{uni.getImageInfo({src:i,success(t){e(t)},fail(e){t(e)}})})));delete n.video,n.image.width=t.width,n.image.height=t.height,n.image.location=t.path}else delete n.image;var i;return n};const ns=A({name:"uniFilePicker",components:{uploadImage:A({name:"uploadImage",emits:["uploadFiles","choose","delFile"],props:{filesList:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},disablePreview:{type:Boolean,default:!1},limit:{type:[Number,String],default:9},imageStyles:{type:Object,default:()=>({width:"auto",height:"auto",border:{}})},delIcon:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1}},computed:{styles(){return Object.assign({width:"auto",height:"auto",border:{}},this.imageStyles)},boxStyle(){const{width:e="auto",height:t="auto"}=this.styles;let a={};"auto"===t?"auto"!==e?(a.height=this.value2px(e),a["padding-top"]=0):a.height=0:(a.height=this.value2px(t),a["padding-top"]=0),a.width="auto"===e?"auto"!==t?this.value2px(t):"33.3%":this.value2px(e);let n="";for(let i in a)n+=`${i}:${a[i]};`;return n},borderStyle(){let{border:e}=this.styles,t={};if("boolean"==typeof e)t.border=e?"1px #eee solid":"none";else{let a=e&&e.width||1;a=this.value2px(a);let n=e&&e.radius||3;n=this.value2px(n),t={"border-width":a,"border-style":e&&e.style||"solid","border-color":e&&e.color||"#eee","border-radius":n}}let a="";for(let n in t)a+=`${n}:${t[n]};`;return a}},methods:{uploadFiles(e,t){this.$emit("uploadFiles",e)},choose(){this.$emit("choose")},delFile(e){this.$emit("delFile",e)},prviewImage(e,t){let a=[];1===Number(this.limit)&&this.disablePreview&&!this.disabled&&this.$emit("choose"),this.disablePreview||(this.filesList.forEach((e=>{a.push(e.url)})),uni.previewImage({urls:a,current:t}))},value2px:e=>("number"==typeof e?e+="px":-1===e.indexOf("%")&&(e=-1!==e.indexOf("px")?e:e+"px"),e)}},[["render",function(t,a,n,i,s,o){return e.openBlock(),e.createElementBlock("view",{class:"uni-file-picker__container"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.filesList,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"file-picker__box",key:a,style:e.normalizeStyle(o.boxStyle)},[e.createElementVNode("view",{class:"file-picker__box-content",style:e.normalizeStyle(o.borderStyle)},[e.createElementVNode("image",{class:"file-image",src:t.url,mode:"aspectFill",onClick:e.withModifiers((e=>o.prviewImage(t,a)),["stop"])},null,8,["src","onClick"]),n.delIcon&&!n.readonly?(e.openBlock(),e.createElementBlock("view",{key:0,class:"icon-del-box",onClick:e.withModifiers((e=>o.delFile(a)),["stop"])},[e.createElementVNode("view",{class:"icon-del"}),e.createElementVNode("view",{class:"icon-del rotate"})],8,["onClick"])):e.createCommentVNode("",!0),t.progress&&100!==t.progress||0===t.progress?(e.openBlock(),e.createElementBlock("view",{key:1,class:"file-picker__progress"},[e.createElementVNode("progress",{class:"file-picker__progress-item",percent:-1===t.progress?0:t.progress,"stroke-width":"4",backgroundColor:t.errMsg?"#ff5a5f":"#EBEBEB"},null,8,["percent","backgroundColor"])])):e.createCommentVNode("",!0),t.errMsg?(e.openBlock(),e.createElementBlock("view",{key:2,class:"file-picker__mask",onClick:e.withModifiers((e=>o.uploadFiles(t,a)),["stop"])}," 点击重试 ",8,["onClick"])):e.createCommentVNode("",!0)],4)],4)))),128)),n.filesList.length<n.limit&&!n.readonly?(e.openBlock(),e.createElementBlock("view",{key:0,class:"file-picker__box",style:e.normalizeStyle(o.boxStyle)},[e.createElementVNode("view",{class:"file-picker__box-content is-add",style:e.normalizeStyle(o.borderStyle),onClick:a[0]||(a[0]=(...e)=>o.choose&&o.choose(...e))},[e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("view",{class:"icon-add"}),e.createElementVNode("view",{class:"icon-add rotate"})]),!0)],4)],4)):e.createCommentVNode("",!0)])}],["__scopeId","data-v-86b162f5"]]),uploadFile:A({name:"uploadFile",emits:["uploadFiles","choose","delFile"],props:{filesList:{type:Array,default:()=>[]},delIcon:{type:Boolean,default:!0},limit:{type:[Number,String],default:9},showType:{type:String,default:""},listStyles:{type:Object,default:()=>({border:!0,dividline:!0,borderStyle:{}})},readonly:{type:Boolean,default:!1}},computed:{list(){let e=[];return this.filesList.forEach((t=>{e.push(t)})),e},styles(){return Object.assign({border:!0,dividline:!0,"border-style":{}},this.listStyles)},borderStyle(){let{borderStyle:e,border:t}=this.styles,a={};if(t){let t=e&&e.width||1;t=this.value2px(t);let n=e&&e.radius||5;n=this.value2px(n),a={"border-width":t,"border-style":e&&e.style||"solid","border-color":e&&e.color||"#eee","border-radius":n}}else a.border="none";let n="";for(let i in a)n+=`${i}:${a[i]};`;return n},borderLineStyle(){let e={},{borderStyle:t}=this.styles;if(t&&t.color&&(e["border-color"]=t.color),t&&t.width){let a=t&&t.width||1,n=t&&t.style||0;"number"==typeof a?a+="px":a=a.indexOf("px")?a:a+"px",e["border-width"]=a,"number"==typeof n?n+="px":n=n.indexOf("px")?n:n+"px",e["border-top-style"]=n}let a="";for(let n in e)a+=`${n}:${e[n]};`;return a}},methods:{uploadFiles(e,t){this.$emit("uploadFiles",{item:e,index:t})},choose(){this.$emit("choose")},delFile(e){this.$emit("delFile",e)},value2px:e=>("number"==typeof e?e+="px":e=-1!==e.indexOf("px")?e:e+"px",e)}},[["render",function(t,a,n,i,s,o){return e.openBlock(),e.createElementBlock("view",{class:"uni-file-picker__files"},[n.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"files-button",onClick:a[0]||(a[0]=(...e)=>o.choose&&o.choose(...e))},[e.renderSlot(t.$slots,"default",{},void 0,!0)])),o.list.length>0?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-file-picker__lists is-text-box",style:e.normalizeStyle(o.borderStyle)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.list,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uni-file-picker__lists-box",{"files-border":0!==a&&o.styles.dividline}]),key:a,style:e.normalizeStyle(0!==a&&o.styles.dividline&&o.borderLineStyle)},[e.createElementVNode("view",{class:"uni-file-picker__item"},[e.createElementVNode("view",{class:"files__name"},e.toDisplayString(t.name),1),n.delIcon&&!n.readonly?(e.openBlock(),e.createElementBlock("view",{key:0,class:"icon-del-box icon-files",onClick:e=>o.delFile(a)},[e.createElementVNode("view",{class:"icon-del icon-files"}),e.createElementVNode("view",{class:"icon-del rotate"})],8,["onClick"])):e.createCommentVNode("",!0)]),t.progress&&100!==t.progress||0===t.progress?(e.openBlock(),e.createElementBlock("view",{key:0,class:"file-picker__progress"},[e.createElementVNode("progress",{class:"file-picker__progress-item",percent:-1===t.progress?0:t.progress,"stroke-width":"4",backgroundColor:t.errMsg?"#ff5a5f":"#EBEBEB"},null,8,["percent","backgroundColor"])])):e.createCommentVNode("",!0),"error"===t.status?(e.openBlock(),e.createElementBlock("view",{key:1,class:"file-picker__mask",onClick:e.withModifiers((e=>o.uploadFiles(t,a)),["stop"])}," 点击重试 ",8,["onClick"])):e.createCommentVNode("",!0)],6)))),128))],4)):e.createCommentVNode("",!0)])}],["__scopeId","data-v-e61666c7"]])},options:{virtualHost:!0},emits:["select","success","fail","progress","delete","update:modelValue","input"],props:{modelValue:{type:[Array,Object],default:()=>[]},value:{type:[Array,Object],default:()=>[]},disabled:{type:Boolean,default:!1},disablePreview:{type:Boolean,default:!1},delIcon:{type:Boolean,default:!0},autoUpload:{type:Boolean,default:!0},limit:{type:[Number,String],default:9},mode:{type:String,default:"grid"},fileMediatype:{type:String,default:"image"},fileExtname:{type:[Array,String],default:()=>[]},title:{type:String,default:""},listStyles:{type:Object,default:()=>({border:!0,dividline:!0,borderStyle:{}})},imageStyles:{type:Object,default:()=>({width:"auto",height:"auto"})},readonly:{type:Boolean,default:!1},returnType:{type:String,default:"array"},sizeType:{type:Array,default:()=>["original","compressed"]},sourceType:{type:Array,default:()=>["album","camera"]},provider:{type:String,default:""}},data:()=>({files:[],localValue:[]}),watch:{value:{handler(e,t){this.setValue(e,t)},immediate:!0},modelValue:{handler(e,t){this.setValue(e,t)},immediate:!0}},computed:{filesList(){let e=[];return this.files.forEach((t=>{e.push(t)})),e},showType(){return"image"===this.fileMediatype?this.mode:"list"},limitLength(){return"object"===this.returnType?1:this.limit?this.limit>=9?9:this.limit:1}},created(){Yi.config&&Yi.config.provider||(this.noSpace=!0,Yi.chooseAndUploadFile=Xi),this.form=this.getForm("uniForms"),this.formItem=this.getForm("uniFormsItem"),this.form&&this.formItem&&this.formItem.name&&(this.rename=this.formItem.name,this.form.inputChildrens.push(this))},methods:{clearFiles(e){0===e||e?this.files.splice(e,1):(this.files=[],this.$nextTick((()=>{this.setEmit()}))),this.$nextTick((()=>{this.setEmit()}))},upload(){let e=[];return this.files.forEach(((t,a)=>{"ready"!==t.status&&"error"!==t.status||e.push(Object.assign({},t))})),this.uploadFiles(e)},async setValue(e,t){const a=async e=>{let t="";return t=e.fileID?e.fileID:e.url,/cloud:\/\/([\w.]+\/?)\S*/.test(t)&&(e.fileID=t,e.url=await this.getTempFileURL(t)),e.url&&(e.path=e.url),e};if("object"===this.returnType)e?await a(e):e={};else{e||(e=[]);for(let t=0;t<e.length;t++){let n=e[t];await a(n)}}this.localValue=e,this.form&&this.formItem&&!this.is_reset&&(this.is_reset=!1,this.formItem.setValue(this.localValue));let n=Object.keys(e).length>0?e:[];this.files=[].concat(n)},choose(){this.disabled||(this.files.length>=Number(this.limitLength)&&"grid"!==this.showType&&"array"===this.returnType?uni.showToast({title:`您最多选择 ${this.limitLength} 个文件`,icon:"none"}):this.chooseFiles())},chooseFiles(){const e=ts(this.fileExtname);Yi.chooseAndUploadFile({type:this.fileMediatype,compressed:!1,sizeType:this.sizeType,sourceType:this.sourceType,extension:e.length>0?e:void 0,count:this.limitLength-this.files.length,onChooseFile:this.chooseFileCallback,onUploadProgress:e=>{this.setProgress(e,e.index)}}).then((e=>{this.setSuccessAndError(e.tempFiles)})).catch((e=>{t("log","at uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue:364","选择失败",e)}))},async chooseFileCallback(e){const t=ts(this.fileExtname);(1===Number(this.limitLength)&&this.disablePreview&&!this.disabled||"object"===this.returnType)&&(this.files=[]);let{filePaths:a,files:n}=((e,t)=>{let a=[],n=[];return t&&0!==t.length?(e.tempFiles.forEach((e=>{const i=es(e.name).ext.toLowerCase();-1!==t.indexOf(i)&&(n.push(e),a.push(e.path))})),n.length!==e.tempFiles.length&&uni.showToast({title:`当前选择了${e.tempFiles.length}个文件 ,${e.tempFiles.length-n.length} 个文件格式不正确`,icon:"none",duration:5e3}),{filePaths:a,files:n}):{filePaths:a,files:n}})(e,t);t&&t.length>0||(a=e.tempFilePaths,n=e.tempFiles);let i=[];for(let s=0;s<n.length&&!(this.limitLength-this.files.length<=0);s++){n[s].uuid=Date.now();let e=await as(n[s],this.fileMediatype);e.progress=0,e.status="ready",this.files.push(e),i.push({...e,file:n[s]})}this.$emit("select",{tempFiles:i,tempFilePaths:a}),e.tempFiles=n,this.autoUpload&&!this.noSpace||(e.tempFiles=[]),e.tempFiles.forEach(((e,t)=>{this.provider&&(e.provider=this.provider);const a=e.name.split("."),n=a.pop(),i=a.join(".").replace(/[\s\/\?<>\\:\*\|":]/g,"_");e.cloudPath=i+"_"+Date.now()+"_"+t+"."+n}))},uploadFiles(e){return e=[].concat(e),Qi.call(this,e,5,(e=>{this.setProgress(e,e.index,!0)})).then((e=>(this.setSuccessAndError(e),e))).catch((e=>{t("log","at uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue:437",e)}))},async setSuccessAndError(e,t){let a=[],n=[],i=[],s=[];for(let o=0;o<e.length;o++){const t=e[o],r=t.uuid?this.files.findIndex((e=>e.uuid===t.uuid)):t.index;if(-1===r||!this.files)break;if("request:fail"===t.errMsg)this.files[r].url=t.path,this.files[r].status="error",this.files[r].errMsg=t.errMsg,n.push(this.files[r]),s.push(this.files[r].url);else{this.files[r].errMsg="",this.files[r].fileID=t.url;/cloud:\/\/([\w.]+\/?)\S*/.test(t.url)?this.files[r].url=await this.getTempFileURL(t.url):this.files[r].url=t.url,this.files[r].status="success",this.files[r].progress+=1,a.push(this.files[r]),i.push(this.files[r].fileID)}}a.length>0&&(this.setEmit(),this.$emit("success",{tempFiles:this.backObject(a),tempFilePaths:i})),n.length>0&&this.$emit("fail",{tempFiles:this.backObject(n),tempFilePaths:s})},setProgress(e,t,a){this.files.length;const n=Math.round(100*e.loaded/e.total);let i=t;a||(i=this.files.findIndex((t=>t.uuid===e.tempFile.uuid))),-1!==i&&this.files[i]&&(this.files[i].progress=n-1,this.$emit("progress",{index:i,progress:parseInt(n),tempFile:this.files[i]}))},delFile(e){this.$emit("delete",{index:e,tempFile:this.files[e],tempFilePath:this.files[e].url}),this.files.splice(e,1),this.$nextTick((()=>{this.setEmit()}))},getFileExt(e){const t=e.lastIndexOf("."),a=e.length;return{name:e.substring(0,t),ext:e.substring(t+1,a)}},setEmit(){let e=[];"object"===this.returnType?(e=this.backObject(this.files)[0],this.localValue=e||null):(e=this.backObject(this.files),this.localValue||(this.localValue=[]),this.localValue=[...e]),this.$emit("update:modelValue",this.localValue)},backObject(e){let t=[];return e.forEach((e=>{t.push({extname:e.extname,fileType:e.fileType,image:e.image,name:e.name,path:e.path,size:e.size,fileID:e.fileID,url:e.url,uuid:e.uuid,status:e.status,cloudPath:e.cloudPath})})),t},async getTempFileURL(e){e={fileList:[].concat(e)};return(await Yi.getTempFileURL(e)).fileList[0].tempFileURL||""},getForm(e="uniForms"){let t=this.$parent,a=t.$options.name;for(;a!==e;){if(t=t.$parent,!t)return!1;a=t.$options.name}return t}}},[["render",function(t,a,n,i,s,o){const r=e.resolveComponent("upload-image"),l=e.resolveComponent("upload-file");return e.openBlock(),e.createElementBlock("view",{class:"uni-file-picker"},[n.title?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-file-picker__header"},[e.createElementVNode("text",{class:"file-title"},e.toDisplayString(n.title),1),e.createElementVNode("text",{class:"file-count"},e.toDisplayString(o.filesList.length)+"/"+e.toDisplayString(o.limitLength),1)])):e.createCommentVNode("",!0),"image"===n.fileMediatype&&"grid"===o.showType?(e.openBlock(),e.createBlock(r,{key:1,readonly:n.readonly,"image-styles":n.imageStyles,"files-list":o.filesList,limit:o.limitLength,disablePreview:n.disablePreview,delIcon:n.delIcon,onUploadFiles:o.uploadFiles,onChoose:o.choose,onDelFile:o.delFile},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("view",{class:"is-add"},[e.createElementVNode("view",{class:"icon-add"}),e.createElementVNode("view",{class:"icon-add rotate"})])]),!0)])),_:3},8,["readonly","image-styles","files-list","limit","disablePreview","delIcon","onUploadFiles","onChoose","onDelFile"])):e.createCommentVNode("",!0),"image"!==n.fileMediatype||"grid"!==o.showType?(e.openBlock(),e.createBlock(l,{key:2,readonly:n.readonly,"list-styles":n.listStyles,"files-list":o.filesList,showType:o.showType,delIcon:n.delIcon,onUploadFiles:o.uploadFiles,onChoose:o.choose,onDelFile:o.delFile},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createElementVNode("button",{type:"primary",size:"mini"},"选择文件")]),!0)])),_:3},8,["readonly","list-styles","files-list","showType","delIcon","onUploadFiles","onChoose","onDelFile"])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-086f9922"]]);function is(e){let t="";for(let a in e){t+=`${a}:${e[a]};`}return t}const ss=A({name:"uni-easyinput",emits:["click","iconClick","update:modelValue","input","focus","blur","confirm","clear","eyes","change","keyboardheightchange"],model:{prop:"modelValue",event:"update:modelValue"},options:{virtualHost:!0},inject:{form:{from:"uniForm",default:null},formItem:{from:"uniFormItem",default:null}},props:{name:String,value:[Number,String],modelValue:[Number,String],type:{type:String,default:"text"},clearable:{type:Boolean,default:!0},autoHeight:{type:Boolean,default:!1},placeholder:{type:String,default:" "},placeholderStyle:String,focus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},clearSize:{type:[Number,String],default:24},inputBorder:{type:Boolean,default:!0},prefixIcon:{type:String,default:""},suffixIcon:{type:String,default:""},trim:{type:[Boolean,String],default:!1},cursorSpacing:{type:Number,default:0},passwordIcon:{type:Boolean,default:!0},adjustPosition:{type:Boolean,default:!0},primaryColor:{type:String,default:"#2979ff"},styles:{type:Object,default:()=>({color:"#333",backgroundColor:"#fff",disableColor:"#F7F6F6",borderColor:"#e5e5e5"})},errorMessage:{type:[String,Boolean],default:""}},data:()=>({focused:!1,val:"",showMsg:"",border:!1,isFirstBorder:!1,showClearIcon:!1,showPassword:!1,focusShow:!1,localMsg:"",isEnter:!1}),computed:{isVal(){const e=this.val;return!(!e&&0!==e)},msg(){return this.localMsg||this.errorMessage},inputMaxlength(){return Number(this.maxlength)},boxStyle(){return`color:${this.inputBorder&&this.msg?"#e43d33":this.styles.color};`},inputContentClass(){return function(e){let t="";for(let a in e)e[a]&&(t+=`${a} `);return t}({"is-input-border":this.inputBorder,"is-input-error-border":this.inputBorder&&this.msg,"is-textarea":"textarea"===this.type,"is-disabled":this.disabled,"is-focused":this.focusShow})},inputContentStyle(){const e=this.focusShow?this.primaryColor:this.styles.borderColor;return is({"border-color":(this.inputBorder&&this.msg?"#dd524d":e)||"#e5e5e5","background-color":this.disabled?this.styles.disableColor:this.styles.backgroundColor})},inputStyle(){return is({"padding-right":"password"===this.type||this.clearable||this.prefixIcon?"":"10px","padding-left":this.prefixIcon?"":"10px"})}},watch:{value(e){this.val=null!==e?e:""},modelValue(e){this.val=null!==e?e:""},focus(e){this.$nextTick((()=>{this.focused=this.focus,this.focusShow=this.focus}))}},created(){this.init(),this.form&&this.formItem&&this.$watch("formItem.errMsg",(e=>{this.localMsg=e}))},mounted(){this.$nextTick((()=>{this.focused=this.focus,this.focusShow=this.focus}))},methods:{init(){this.value||0===this.value?this.val=this.value:this.modelValue||0===this.modelValue||""===this.modelValue?this.val=this.modelValue:this.val=""},onClickIcon(e){this.$emit("iconClick",e)},onEyes(){this.showPassword=!this.showPassword,this.$emit("eyes",this.showPassword)},onInput(e){let t=e.detail.value;this.trim&&("boolean"==typeof this.trim&&this.trim&&(t=this.trimStr(t)),"string"==typeof this.trim&&(t=this.trimStr(t,this.trim))),this.errMsg&&(this.errMsg=""),this.val=t,this.$emit("input",t),this.$emit("update:modelValue",t)},onFocus(){this.$nextTick((()=>{this.focused=!0})),this.$emit("focus",null)},_Focus(e){this.focusShow=!0,this.$emit("focus",e)},onBlur(){this.focused=!1,this.$emit("blur",null)},_Blur(e){if(e.detail.value,this.focusShow=!1,this.$emit("blur",e),!1===this.isEnter&&this.$emit("change",this.val),this.form&&this.formItem){const{validateTrigger:e}=this.form;"blur"===e&&this.formItem.onFieldChange()}},onConfirm(e){this.$emit("confirm",this.val),this.isEnter=!0,this.$emit("change",this.val),this.$nextTick((()=>{this.isEnter=!1}))},onClear(e){this.val="",this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("clear")},onkeyboardheightchange(e){this.$emit("keyboardheightchange",e)},trimStr:(e,t="both")=>"both"===t?e.trim():"left"===t?e.trimLeft():"right"===t?e.trimRight():"start"===t?e.trimStart():"end"===t?e.trimEnd():"all"===t?e.replace(/\s+/g,""):e}},[["render",function(t,n,i,s,o,r){const l=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["uni-easyinput",{"uni-easyinput-error":r.msg}]),style:e.normalizeStyle(r.boxStyle)},[e.createElementVNode("view",{class:e.normalizeClass(["uni-easyinput__content",r.inputContentClass]),style:e.normalizeStyle(r.inputContentStyle)},[i.prefixIcon?(e.openBlock(),e.createBlock(l,{key:0,class:"content-clear-icon",type:i.prefixIcon,color:"#c0c4cc",onClick:n[0]||(n[0]=e=>r.onClickIcon("prefix")),size:"22"},null,8,["type"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"left",{},void 0,!0),"textarea"===i.type?(e.openBlock(),e.createElementBlock("textarea",{key:1,class:e.normalizeClass(["uni-easyinput__content-textarea",{"input-padding":i.inputBorder}]),name:i.name,value:o.val,placeholder:i.placeholder,placeholderStyle:i.placeholderStyle,disabled:i.disabled,"placeholder-class":"uni-easyinput__placeholder-class",maxlength:r.inputMaxlength,focus:o.focused,autoHeight:i.autoHeight,"cursor-spacing":i.cursorSpacing,"adjust-position":i.adjustPosition,onInput:n[1]||(n[1]=(...e)=>r.onInput&&r.onInput(...e)),onBlur:n[2]||(n[2]=(...e)=>r._Blur&&r._Blur(...e)),onFocus:n[3]||(n[3]=(...e)=>r._Focus&&r._Focus(...e)),onConfirm:n[4]||(n[4]=(...e)=>r.onConfirm&&r.onConfirm(...e)),onKeyboardheightchange:n[5]||(n[5]=(...e)=>r.onkeyboardheightchange&&r.onkeyboardheightchange(...e))},null,42,["name","value","placeholder","placeholderStyle","disabled","maxlength","focus","autoHeight","cursor-spacing","adjust-position"])):(e.openBlock(),e.createElementBlock("input",{key:2,type:"password"===i.type?"text":i.type,class:"uni-easyinput__content-input",style:e.normalizeStyle(r.inputStyle),name:i.name,value:o.val,password:!o.showPassword&&"password"===i.type,placeholder:i.placeholder,placeholderStyle:i.placeholderStyle,"placeholder-class":"uni-easyinput__placeholder-class",disabled:i.disabled,maxlength:r.inputMaxlength,focus:o.focused,confirmType:i.confirmType,"cursor-spacing":i.cursorSpacing,"adjust-position":i.adjustPosition,onFocus:n[6]||(n[6]=(...e)=>r._Focus&&r._Focus(...e)),onBlur:n[7]||(n[7]=(...e)=>r._Blur&&r._Blur(...e)),onInput:n[8]||(n[8]=(...e)=>r.onInput&&r.onInput(...e)),onConfirm:n[9]||(n[9]=(...e)=>r.onConfirm&&r.onConfirm(...e)),onKeyboardheightchange:n[10]||(n[10]=(...e)=>r.onkeyboardheightchange&&r.onkeyboardheightchange(...e))},null,44,["type","name","value","password","placeholder","placeholderStyle","disabled","maxlength","focus","confirmType","cursor-spacing","adjust-position"])),"password"===i.type&&i.passwordIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[r.isVal?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(["content-clear-icon",{"is-textarea-icon":"textarea"===i.type}]),type:o.showPassword?"eye-slash-filled":"eye-filled",size:22,color:o.focusShow?i.primaryColor:"#c0c4cc",onClick:r.onEyes},null,8,["class","type","color","onClick"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),i.suffixIcon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[i.suffixIcon?(e.openBlock(),e.createBlock(l,{key:0,class:"content-clear-icon",type:i.suffixIcon,color:"#c0c4cc",onClick:n[11]||(n[11]=e=>r.onClickIcon("suffix")),size:"22"},null,8,["type"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[i.clearable&&r.isVal&&!i.disabled&&"textarea"!==i.type?(e.openBlock(),e.createBlock(l,{key:0,class:e.normalizeClass(["content-clear-icon",{"is-textarea-icon":"textarea"===i.type}]),type:"clear",size:i.clearSize,color:r.msg?"#dd524d":o.focusShow?i.primaryColor:"#c0c4cc",onClick:r.onClear},null,8,["class","size","color","onClick"])):e.createCommentVNode("",!0)],64)),e.renderSlot(t.$slots,"right",{},void 0,!0)],6)],6)}],["__scopeId","data-v-d17898f6"]]);function os(e){return"string"==typeof e}function rs(e,t=50){if(!Array.isArray(e)||!e.length)return e;const a=[];return e.forEach(((e,n)=>{const i=Math.floor(n/t);a[i]||(a[i]=[]),a[i].push(e)})),a}const ls=A(e.defineComponent({__name:"data-select-item",props:{node:{type:Object,default:()=>({})},choseParent:{type:Boolean,default:!0},dataLabel:{type:String,default:"name"},dataValue:{type:String,default:"value"},dataChildren:{type:String,default:"children"},border:{type:Boolean,default:!1},linkage:{type:Boolean,default:!1},lazyLoadChildren:{type:Boolean,default:!1},level:{type:Number,default:0}},setup(t){const{nodeClick:n,nameClick:i,loadNode:s,initData:o,addNode:r}=e.inject("nodeFn"),l=t,c=e.ref([]),d=e.ref([]),u=e.ref([]);return e.watchEffect((()=>{l.node.showChildren&&l.node[l.dataChildren]&&l.node[l.dataChildren].length&&(function(){const e=[...d.value];d.value=[],e.forEach((e=>e()))}(),function(e){const t=rs(e);c.value=(null==t?void 0:t[0])||[],function(e,t){for(let a=t;a<e.length;a++){let t=null;t=setTimeout((()=>{c.value.push(...e[a])}),500*a),d.push((()=>clearTimeout(t)))}}(t,1)}(l.node[l.dataChildren]))})),(d,h)=>{const m=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["customthree-tree-select-content",{border:t.border&&t.node[t.dataChildren]&&t.node[t.dataChildren].length&&t.node.showChildren}]),style:e.normalizeStyle({marginLeft:(t.level?14:0)+"px"})},[t.node.visible?(e.openBlock(),e.createElementBlock("view",{key:0,class:"custom-tree-select-item"},[e.createElementVNode("view",{class:"item-content"},[e.createElementVNode("view",{class:"left",onClick:h[0]||(h[0]=e.withModifiers((e=>{var a,n;(a=t.node).visible&&(!(null==(n=a[l.dataChildren])?void 0:n.length)&&l.lazyLoadChildren?(u.value.push(a[l.dataValue].toString()),s(a).then((e=>{r(a,o(e,a.visible))})).finally((()=>{u.value=[]}))):i(a))}),["stop"]))},[e.createElementVNode("view",{class:"icon-group"},[t.node[t.dataChildren]&&t.node[t.dataChildren].length?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["right-icon",{active:t.node.showChildren}])},[e.createVNode(m,{type:"right",size:"14",color:"#333"})],2)):(e.openBlock(),e.createElementBlock("view",{key:1,class:"smallcircle-filled"},[e.createVNode(m,{class:"smallcircle-filled-icon",type:"smallcircle-filled",size:"10",color:"#333"})]))]),u.value.includes(t.node[l.dataValue].toString())?(e.openBlock(),e.createElementBlock("view",{key:0,class:"loading-icon-box"},[e.createVNode(m,{class:"loading-icon",type:"spinner-cycle",size:"14",color:"#333"})])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"name",style:e.normalizeStyle(t.node.disabled?"color: #999":"")},[e.createElementVNode("text",null,e.toDisplayString(t.node[t.dataLabel]),1)],4)]),t.choseParent||!t.choseParent&&!t.node[t.dataChildren]||!t.choseParent&&t.node[t.dataChildren]&&!t.node[t.dataChildren].length?(e.openBlock(),e.createElementBlock("view",{key:0,class:e.normalizeClass(["check-box",{disabled:t.node.disabled}]),onClick:h[1]||(h[1]=e.withModifiers((a=>!t.node.disabled&&e.unref(n)(t.node)),["stop"]))},[!t.node.checked&&t.node.partChecked&&t.linkage?(e.openBlock(),e.createElementBlock("view",{key:0,class:"part-checked"})):e.createCommentVNode("",!0),t.node.checked?(e.openBlock(),e.createBlock(m,{key:1,type:"checkmarkempty",size:"18",color:t.node.disabled?"#333":"#007aff"},null,8,["color"])):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),t.node.showChildren&&t.node[t.dataChildren]&&t.node[t.dataChildren].length?(e.openBlock(),e.createElementBlock("view",{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a=>(e.openBlock(),e.createBlock(ls,{key:a[t.dataValue],node:a,dataLabel:t.dataLabel,dataValue:t.dataValue,dataChildren:t.dataChildren,choseParent:t.choseParent,lazyLoadChildren:t.lazyLoadChildren,border:t.border,linkage:t.linkage,level:t.level+1},null,8,["node","dataLabel","dataValue","dataChildren","choseParent","lazyLoadChildren","border","linkage","level"])))),128))])):e.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-b14c1821"]]),cs=A(e.defineComponent({__name:"treeSelect",props:{canSelectAll:{type:Boolean,default:!1},safeArea:{type:Boolean,default:!0},search:{type:Boolean,default:!1},clearResetSearch:{type:Boolean,default:!1},animation:{type:Boolean,default:!0},"is-mask-click":{type:Boolean,default:!0},"mask-background-color":{type:String,default:"rgba(0,0,0,0.4)"},"background-color":{type:String,default:"none"},"safe-area":{type:Boolean,default:!0},choseParent:{type:Boolean,default:!1},placeholder:{type:String,default:"请选择"},confirmText:{type:String,default:"确认"},confirmTextColor:{type:String,default:"#007aff"},dataSource:{type:Array,default:()=>[]},dataLabel:{type:String,default:"name"},dataValue:{type:String,default:"id"},dataChildren:{type:String,default:"children"},linkage:{type:Boolean,default:!1},removeLinkage:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},mutiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},deleteSource:{type:Boolean,default:!1},showChildren:{type:Boolean,default:!1},border:{type:Boolean,default:!1},lazyLoadChildren:{type:Boolean,default:!1},load:{type:Function,default:function(){}},modelValue:{type:[Array,String],default:()=>[]}},emits:["update:modelValue","change","maskClick","select-change","removeSelect"],setup(t,{emit:n}){const i=t,s=n,o=e.ref("500px"),r=e.ref([]),l=e.ref([]),c=e.ref([]),d=e.ref([]),u=e.ref(!1),h=e.ref(!1),m=e.ref(0),p=e.ref(""),f=e.ref(null),g=new Set;e.provide("nodeFn",{nodeClick:B,nameClick:I,loadNode:i.load,initData:E,addNode:function(e,t){C(e,r.value)[i.dataChildren]=t,I(e)}});const y=e.computed((()=>{const e=null===i.modelValue?"":i.modelValue;return os(e)?e.length?e.split(","):[]:e.map((e=>e.toString()))}));function v(t=!1){x(),t?i.clearResetSearch&&N(r.value):N(w(p.value,r.value)),m.val=10,e.nextTick((()=>{m.value=0})),uni.hideKeyboard()}function w(e,t){const a=[];return t.forEach((t=>{var n,s;if(t.visible)if(t[i.dataLabel].toString().toLowerCase().indexOf(e.toLowerCase())>-1)a.push(t);else if(null==(n=t[i.dataChildren])?void 0:n.length){const n=w(e,t[i.dataChildren]);(null==n?void 0:n.length)&&(e&&!t.showChildren&&(null==(s=t[i.dataChildren])?void 0:s.length)&&(t.showChildren=!0),a.push({...t,[i.dataChildren]:n}))}})),a}async function k(){i.disabled||(u.value=!0,f.value.open(),N(r.value))}function b(){f.value.close()}function _(e){e.show||(x(),p.value="",u.value=!1),s("change",e)}function S(){s("maskClick")}function E(e,t){var a;if(!Array.isArray(e))return[];const n=[];for(let s=0;s<e.length;s++){const o={[i.dataLabel]:e[s][i.dataLabel],[i.dataValue]:e[s][i.dataValue]};o.checked=y.value.includes(e[s][i.dataValue].toString()),o.disabled=Boolean(e[s].disabled),o.partChecked=Boolean(void 0!==e[s].partChecked&&e[s].partChecked),o.partChecked&&o.partCheckedSet.add(o[i.dataValue]),!o.partChecked&&(h.value=!1);const r=void 0===t||t,l=void 0===e[s].visible||Boolean(e[s].visible);o.visible=r===l?r:!(!r||!l),o.showChildren="showChildren"in e[s]&&null!=e[s].showChildren?e[s].showChildren:i.showChildren,!e[s].visible||e[s].disabled||e[s].checked||(h.value=!1),(null==(a=e[s][i.dataChildren])?void 0:a.length)&&(o[i.dataChildren]=E(e[s][i.dataChildren],o.visible)),n.push(o)}return n}function x(){const e=[...c.value];c.value=[],e.forEach((e=>e()))}function N(e){const t=rs(e);l.value=(null==t?void 0:t[0])||[],function(e,t){for(let a=t;a<e.length;a++){let t=null;t=setTimeout((()=>{l.value.push(...e[a])}),500*a),c.push((()=>clearTimeout(t)))}}(t,1)}function V(e,t,a=!1){var n;const o=[...e];let r=!0;for(a&&(d.value=[]);o.length;){const e=o.shift();t.includes(e[i.dataValue].toString())?(e.checked=!0,e.partChecked=!1,g.delete(e[i.dataValue]),a&&d.value.push(e)):(e.checked=!1,e.visible&&!e.disabled&&(r=!1),g.has(e[i.dataValue])?e.partChecked=!0:e.partChecked=!1),(null==(n=e[i.dataChildren])?void 0:n.length)&&o.push(...e[i.dataChildren])}h.value=r,a&&s("select-change",[...d.value])}function C(e,t){var a;const n=[...t];for(;n.length;){const t=n.shift();if(t[i.dataValue]===e[i.dataValue])return t;(null==(a=t[i.dataChildren])?void 0:a.length)&&n.push(...t[i.dataChildren])}return{}}function T(e){var t;if(!(null==(t=e[i.dataChildren])?void 0:t.length))return[];const a=e[i.dataChildren].reduce(((e,t)=>t.visible?[...e,t]:e),[]);for(let n=0;n<e[i.dataChildren].length;n++)a.push(...T(e[i.dataChildren][n]));return a}function D(e,t){var a;let n=[];for(let s=0;s<t.length;s++){if(t[s][i.dataValue]===e[i.dataValue])return!0;if(null==(a=t[s][i.dataChildren])?void 0:a.length){const a=D(e,t[s][i.dataChildren]);"boolean"==typeof a&&a?n=[t[s]]:Array.isArray(a)&&a.length&&(n=[...a,t[s]])}}return n}function B(e,t){const a=C(e,r.value);if(a.checked="boolean"==typeof t?t:!a.checked,a.partChecked=!1,g.delete(a[i.dataValue]),i.mutiple)if(i.linkage){let e=[...y.value];const t=D(a,r.value),n=T(a).filter((e=>!e.disabled));if(a.checked){if(e=Array.from(new Set([...e,a[i.dataValue].toString()])),n.length&&(e=Array.from(new Set([...e,...n.map((e=>e[i.dataValue].toString()))])),n.forEach((e=>{e.partChecked=!1,g.delete(e[i.dataValue])}))),t.length){let a=!1;for(;t.length;){const n=t.shift();if(!n.disabled)if(a)n.partChecked=!0,g.add(n[i.dataValue]);else{n[i.dataChildren].filter((e=>e.visible&&!e.disabled)).every((e=>e.checked))?(n.checked=!0,n.partChecked=!1,g.delete(n[i.dataValue]),e=Array.from(new Set([...e,n[i.dataValue].toString()]))):(n.partChecked=!0,g.add(n[i.dataValue]),a=!0)}}}}else e=e.filter((e=>e!==a[i.dataValue].toString())),n.length&&n.forEach((t=>{e=e.filter((e=>e!==t[i.dataValue].toString()))})),t.length&&t.forEach((t=>{e.includes(t[i.dataValue].toString())&&(t.checked=!1),e=e.filter((e=>e!==t[i.dataValue].toString()));const a=t[i.dataChildren].filter((e=>e.visible&&!e.disabled)).some((e=>e.checked||e.partChecked));t.partChecked=a,a?g.add(t[i.dataValue]):g.delete(t[i.dataValue])}));s("update:modelValue",os(i.modelValue)?e.join(","):e)}else{let e=null;e=a.checked?Array.from(new Set([...y.value,a[i.dataValue].toString()])):y.value.filter((e=>e!==a[i.dataValue].toString())),s("update:modelValue",os(i.modelValue)?e.join(","):e)}else{let e=[];a.checked&&(e=[a[i.dataValue].toString()]),s("update:modelValue",os(i.modelValue)?e.join(","):e)}}function I(e){const t=!e.showChildren;C(e,r.value).showChildren=t,C(e,l.value).showChildren=t}function P(){if(h.value=!h.value,h.value){if(!i.mutiple)return void uni.showToast({title:"单选模式下不能全选",icon:"none",duration:1e3});let e=[];r.value.forEach((t=>{var a;(t.visible||t.disabled&&t.checked)&&(e=Array.from(new Set([...e,t[i.dataValue].toString()])),(null==(a=t[i.dataChildren])?void 0:a.length)&&(e=Array.from(new Set([...e,...T(t).filter((e=>!e.disabled||e.disabled&&e.checked)).map((e=>e[i.dataValue].toString()))]))))})),s("update:modelValue",os(i.modelValue)?e.join(","):e)}else A()}function A(){if(i.disabled)return;g.clear();const e=[];d.value.forEach((t=>{t.visible&&t.checked&&t.disabled&&e.push(t[i.dataValue])})),s("update:modelValue",os(i.modelValue)?e.join(","):e)}return e.onMounted((()=>{!function({screenHeight:e}){o.value=`${Math.floor(.7*e)}px`}(uni.getSystemInfoSync())})),e.watch((()=>i.dataSource),(e=>{e&&(r.value=E(e),u.value&&(x(),N(r.value)))}),{immediate:!0,deep:!0}),e.watch((()=>i.modelValue),(e=>{const t=e?Array.isArray(e)?e:e.split(","):[];V(r.value,t,!0),l.value.length&&V(l.value,t)}),{immediate:!0}),(n,c)=>{const u=a(e.resolveDynamicComponent("uni-icons"),O),g=a(e.resolveDynamicComponent("uni-easyinput"),ss),w=a(e.resolveDynamicComponent("uni-popup"),st);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:e.normalizeClass(["select-list",{disabled:t.disabled},{active:y.value.length}]),onClick:k},[e.createElementVNode("view",{class:"left"},[y.value.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"select-items"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(a=>(e.openBlock(),e.createElementBlock("view",{class:"select-item",key:a[t.dataValue]},[e.createElementVNode("view",{class:"name"},[e.createElementVNode("text",null,e.toDisplayString(a[t.dataLabel]),1)]),t.disabled||a.disabled||!t.deleteSource?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"close",onClick:e.withModifiers((e=>function(e){if(h.value=!1,i.linkage)B(e,!1),s("removeSelect",e);else{const t=y.value.filter((t=>t!==e[i.dataValue].toString()));s("removeSelect",e),s("update:modelValue",os(i.modelValue)?t.join(","):t)}}(a)),["stop"])},[e.createVNode(u,{type:"closeempty",size:"16",color:"#999"})],8,["onClick"]))])))),128))])):(e.openBlock(),e.createElementBlock("view",{key:1,class:"no-data"},[e.createElementVNode("text",null,e.toDisplayString(t.placeholder),1)]))]),e.createElementVNode("view",null,[y.value.length&&t.clearable?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(u,{key:0,type:"bottom",color:"#333333"})),e.createElementVNode("view",{onClick:c[0]||(c[0]=e.withModifiers((()=>{}),["stop"]))},[y.value.length&&t.clearable?(e.openBlock(),e.createBlock(u,{key:0,type:"clear",size:"24",color:"#c0c4cc",onClick:A})):e.createCommentVNode("",!0)])])],2),e.createVNode(w,{ref_key:"popup",ref:f,animation:t.animation,"is-mask-click":n.isMaskClick,"mask-background-color":n.maskBackgroundColor,"background-color":n.backgroundColor,"safe-area":t.safeArea,type:"bottom",onChange:_,onMaskClick:S},{default:e.withCtx((()=>[e.createElementVNode("view",{class:"popup-content",style:e.normalizeStyle({height:o.value})},[e.createElementVNode("view",{class:"title"},[t.mutiple&&t.canSelectAll?(e.openBlock(),e.createElementBlock("view",{key:0,class:"left",onClick:P},[e.createElementVNode("text",null,e.toDisplayString(h.value?"取消全选":"全选"),1)])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"center"},[e.createElementVNode("text",null,e.toDisplayString(t.placeholder),1)]),e.createElementVNode("view",{class:"right",style:e.normalizeStyle({color:t.confirmTextColor}),onClick:b},[e.createElementVNode("text",null,e.toDisplayString(t.confirmText),1)],4)]),t.search?(e.openBlock(),e.createElementBlock("view",{key:0,class:"search-box"},[e.createVNode(g,{maxlength:-1,prefixIcon:"search",placeholder:"搜索",modelValue:p.value,"onUpdate:modelValue":c[1]||(c[1]=e=>p.value=e),"confirm-type":"search",onConfirm:c[2]||(c[2]=e=>v(!1)),onClear:c[3]||(c[3]=e=>v(!0))},null,8,["modelValue"]),e.createElementVNode("button",{type:"primary",size:"mini",class:"search-btn",onClick:c[4]||(c[4]=e=>v(!1))},"搜索")])):e.createCommentVNode("",!0),r.value.length?(e.openBlock(),e.createElementBlock("view",{key:1,class:"select-content"},[e.createElementVNode("scroll-view",{class:"scroll-view-box","scroll-top":m.value,"scroll-y":"true",onTouchmove:c[5]||(c[5]=e.withModifiers((()=>{}),["stop"]))},[l.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:0,class:"no-data center"},[e.createElementVNode("text",null,"暂无数据")])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(a=>(e.openBlock(),e.createBlock(ls,{key:a[t.dataValue],node:a,dataLabel:t.dataLabel,dataValue:t.dataValue,dataChildren:t.dataChildren,choseParent:t.choseParent,border:t.border,linkage:t.linkage,lazyLoadChildren:t.lazyLoadChildren},null,8,["node","dataLabel","dataValue","dataChildren","choseParent","border","linkage","lazyLoadChildren"])))),128)),e.createElementVNode("view",{class:"sentry"})],40,["scroll-top"])])):(e.openBlock(),e.createElementBlock("view",{key:2,class:"no-data center"},[e.createElementVNode("text",null,"暂无数据")]))],4)])),_:1},8,["animation","is-mask-click","mask-background-color","background-color","safe-area"])],64)}}}),[["__scopeId","data-v-0768d7c7"]]),ds={__name:"application",setup(n){const i=P(),{proxy:s}=e.getCurrentInstance(),r=e.ref(i.userinfo.realname),l=e.ref(""),c=e.ref(i.userinfo.phone),u=e.ref(""),h=e.ref([]),m=e.ref(""),p=e=>{m.value=e.detail.value},f=e.ref(""),g=e=>{f.value=e.detail.value},y=e.ref([]),v=e.ref(null),w=e.ref(!0),k=e.ref(""),b=e.ref(""),_=e.ref(""),S=e.ref([]),E={width:64,height:64,border:{color:"#dce7e1",width:2,style:"dashed",radius:"2px"}};o((()=>{C()}));const x=e=>{e.tempFilePaths;for(let t=0;t<e.tempFilePaths.length;t++){let a="职工请假/"+i.userinfo.orgCode+"/"+i.userinfo.realname;uni.uploadFile({url:"https://36.112.48.190/jeecg-boot/sys/common/upload/",filePath:e.tempFilePaths[t],name:"file",formData:{appPath:a},success:e=>{S.value.push(JSON.parse(e.data).message)}})}},N=()=>{return c.value.trim()?u.value?m.value?f.value?w.value&&null==v.value?s.$toast("请选择审批领导"):b.value.trim()?_.value.trim()?void(e={username:i.userinfo.username,phone:c.value,type:u.value,begintime:m.value,endtime:f.value,examineleader:y.value[v.value].username,address:b.value,reason:_.value,zwmc:k.value,path:S.value.toString()},d({url:"/CxcQxj/cxcQxj/add",method:"post",data:e})).then((e=>{e.success?V(e.message):s.$toast(e.message)})):s.$toast("请输入请假事由"):s.$toast("请输入请假地点"):s.$toast("请选择结束时间"):s.$toast("请选择开始时间"):s.$toast("请选择请假类型"):s.$toast("请输入联系方式");var e},V=e=>{var a;(a={flowCode:"dev_cxc_qxj",id:e,formUrl:"modules/qxj/modules/CxcQxjBpmModel",formUrlMobile:"leaveApplication"},d({url:"/process/extActProcess/startMutilProcess",method:"post",data:a})).then((e=>{e.success&&(s.$toast(e.message),setTimeout((()=>{uni.navigateBack()}),2e3))})).catch((e=>{t("log","at pages/leave/application.vue:235",e)}))},C=()=>{var e,t,a;(e="1838487445813645313",d({url:"/sys/category/findtree",method:"get",data:{pid:e}})).then((e=>{e.success&&(h.value=e.result)})),(t=i.userinfo.orgCode,d({url:"/sys/sysDepart/queryDepNameByDepCode",method:"get",data:{code:t}})).then((e=>{e.success&&(l.value=e.result)})),(a=i.userinfo.username,d({url:"/CxcQxj/cxcQxj/queryZwmcByUsername",method:"get",data:{username:a}})).then((e=>{e.success?(y.value=e.result.list,k.value=e.result.zwmc,"单位专家"!=k.value&&"正职"!=k.value&&"高级主管"!=k.value||(w.value=!1)):s.$toast(e.message)}))},T=e=>{v.value=e.detail.value};return(t,n)=>{const s=a(e.resolveDynamicComponent("uni-icons"),O),o=a(e.resolveDynamicComponent("uni-file-picker"),ns);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(i).isgray})},[e.createElementVNode("view",{class:"form"},[e.createElementVNode("view",{class:"f-row aic jcb input_box"},[e.createElementVNode("view",{class:"title"}," 职工姓名: "),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=e=>r.value=e),disabled:""},null,512),[[e.vModelText,r.value]])]),e.createElementVNode("view",{class:"f-row aic jcb input_box"},[e.createElementVNode("view",{class:"title"}," 工作单位: "),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":n[1]||(n[1]=e=>l.value=e),disabled:""},null,512),[[e.vModelText,l.value]])]),e.createElementVNode("view",{class:"f-row aic jcb input_box"},[e.createElementVNode("view",{class:"title"}," 联系方式: "),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>c.value=e)},null,512),[[e.vModelText,c.value]])]),e.createElementVNode("view",{class:"f-row aic jcb input_box"},[e.createElementVNode("view",{class:"title"}," 请假类型: "),e.createVNode(cs,{dataSource:h.value,modelValue:u.value,"onUpdate:modelValue":n[3]||(n[3]=e=>u.value=e),dataValue:"name"},null,8,["dataSource","modelValue"])]),e.createElementVNode("picker",{mode:"date",fields:"day",onChange:p,value:m.value},[e.createElementVNode("view",{class:"f-row aic jcb box"},[e.createElementVNode("view",{class:"title"}," 开始时间: "),e.createElementVNode("view",{class:"f-row aic"},[e.createElementVNode("view",{class:e.normalizeClass([{choose:!m.value},{choosed:m.value}])},e.toDisplayString(m.value?m.value:"请选择"),3),e.createVNode(s,{type:"bottom",color:"#333333"})])])],40,["value"]),e.createElementVNode("picker",{mode:"date",fields:"day",onChange:g,value:f.value},[e.createElementVNode("view",{class:"f-row aic jcb box"},[e.createElementVNode("view",{class:"title"}," 截止时间: "),e.createElementVNode("view",{class:"f-row aic"},[e.createElementVNode("view",{class:e.normalizeClass([{choose:!f.value},{choosed:f.value}])},e.toDisplayString(f.value?f.value:"请选择"),3),e.createVNode(s,{type:"bottom",color:"#333333"})])])],40,["value"]),w.value?(e.openBlock(),e.createElementBlock("picker",{key:0,onChange:T,value:v.value,range:y.value,"range-key":"realname"},[e.createElementVNode("view",{class:"f-row aic jcb box"},[e.createElementVNode("view",{class:"title"}," 审批领导: "),e.createElementVNode("view",{class:"f-row aic"},[e.createElementVNode("view",{class:e.normalizeClass([{choose:null==v.value},{choosed:null!=v.value}])},e.toDisplayString(null!=v.value?y.value[v.value].realname:"请选择"),3),e.createVNode(s,{type:"bottom",color:"#333333"})])])],40,["value","range"])):e.createCommentVNode("",!0),e.createElementVNode("view",{class:"f-row aic jcb input_box"},[e.createElementVNode("view",{class:"title"}," 请假地点: "),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":n[4]||(n[4]=e=>b.value=e),placeholder:"请输入","nplaceholder-style":"font-size: 28rpx;color: #999999;"},null,512),[[e.vModelText,b.value]])]),e.createElementVNode("view",{class:"f-row aic jcb input_box"},[e.createElementVNode("view",{class:"title"}," 请假事由: "),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":n[5]||(n[5]=e=>_.value=e),placeholder:"请输入","placeholder-style":"font-size: 28rpx;color: #999999;"},null,512),[[e.vModelText,_.value]])]),e.createElementVNode("view",{class:"f-row aic jcb input_box"},[e.createElementVNode("view",{class:"title"}," 上传附件: "),e.createVNode(o,{onSelect:x,"image-styles":E})])]),e.createElementVNode("view",{class:"btn f-col aic"},[e.createElementVNode("view",{onClick:N}," 提交 ")])],2)}}},us=A(ds,[["__scopeId","data-v-6e3acbe9"]]),hs=A({__name:"index",setup(t){const n=P(),i=()=>{uni.navigateBack()};return(t,s)=>{const o=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(n).isgray}])},[e.createVNode(Ne,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"nav_box f-row aic"},[e.createElementVNode("view",{class:"back",onClick:i},[e.createVNode(o,{type:"left",size:"20",color:"#fff"})]),e.createElementVNode("view",{class:"avatar"},[e.createElementVNode("image",{src:e.unref(n).userinfo.avatar,mode:""},null,8,["src"])]),e.createElementVNode("view",{class:"f-col"},[e.createElementVNode("view",{class:"name"},e.toDisplayString(e.unref(n).userinfo.realname),1),e.createElementVNode("view",{class:"position"},e.toDisplayString(e.unref(n).role),1)])])])),_:1}),e.createElementVNode("view",{class:"time_box f-row aic jcb"},[e.createElementVNode("view",{class:"box"},[e.createElementVNode("view",{class:"time f-row aic"},[e.createElementVNode("view",{class:""}," 上班 9:30 "),e.createElementVNode("image",{src:"/static/checkin/chenggong.png",mode:""})]),e.createElementVNode("view",{class:"text"}," 重庆市渝北区上弯路 ")]),e.createElementVNode("view",{class:"box"},[e.createElementVNode("view",{class:"time f-row aic"},[e.createElementVNode("view",{class:""}," 下班 16:30 "),e.createElementVNode("image",{src:"/static/checkin/shibai.png",mode:""})]),e.createElementVNode("view",{class:"text"}," 打卡已超时 ")])]),e.createElementVNode("view",{class:"checkin"},[e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"status f-col aic"},[e.createElementVNode("image",{src:"/static/checkin/position4.png",mode:""}),e.createElementVNode("text",null,"打卡失败")]),e.createElementVNode("view",{class:e.normalizeClass(["circle","f-col","aic","out","check","success","fail"])},[e.createElementVNode("view",{class:"title"}," 上班打卡 "),e.createElementVNode("view",{class:"time"}," 9:00 "),e.createElementVNode("view",{class:"ontime"}," 已超时 ")])])])],2)}}},[["__scopeId","data-v-f70ab478"]]),ms=A({__name:"useredit",setup(n){const i=P(),s=()=>{uni.chooseImage({count:1,success:e=>{const a=e.tempFilePaths,n="用户头像/"+i.userinfo.realname;uni.uploadFile({url:"https://36.112.48.190/jeecg-boot/sys/common/upload",filePath:a[0],name:"file",formData:{appPath:n},success:e=>{var a;uni.showLoading({title:"上传中..."}),r.avatar=JSON.parse(e.data).message,(a={avatar:r.avatar,id:i.userinfo.id},d({url:"/sys/user/editApp",method:"PUT",data:a})).then((e=>{e&&uni.showToast({title:e,icon:"success",duration:2e3})})).catch((e=>{t("log","at pages/useredit/useredit.vue:97",e)}))},fail(e){t("log","at pages/useredit/useredit.vue:101","图片上传出错",e)}})}})},r=e.reactive({avatar:"",realname:"",phone:""}),l=()=>{uni.showModal({title:"退出登录",content:"您确认要退出登录吗?",success(e){e.confirm&&(uni.removeStorageSync("token"),uni.removeStorageSync("user"),uni.removeStorageSync("role"),uni.removeStorageSync("logintime"),uni.reLaunch({url:"/pages/login/login"}))}})};return o((()=>{uni.setNavigationBarColor({frontColor:"#ffffff",backgroundColor:"#bebebe"})})),(t,n)=>{const o=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:e.normalizeClass(["content",{gray:1==e.unref(i).isgray}])},[e.createElementVNode("view",{class:"box"},[e.createElementVNode("view",null,"头像"),e.createElementVNode("view",{style:{display:"flex","align-items":"center"}},[e.createElementVNode("button",{class:"head-btn",onClick:s},[r.avatar?(e.openBlock(),e.createElementBlock("image",{key:1,class:"head-img",src:e.unref(Oe)(r.avatar)},null,8,["src"])):(e.openBlock(),e.createElementBlock("image",{key:0,class:"head-img",src:e.unref(Oe)(e.unref(i).userinfo.avatar),mode:""},null,8,["src"]))]),e.createVNode(o,{type:"right",size:"24"})])]),e.createElementVNode("view",{class:"box",style:{"padding-top":"30rpx","padding-bottom":"30rpx"}},[e.createElementVNode("view",null,"姓名"),e.withDirectives(e.createElementVNode("input",{disabled:"",style:{"text-align":"right"},type:"nickname","placeholder-style":"font-size: 32rpx;color: #999999;","onUpdate:modelValue":n[0]||(n[0]=t=>e.unref(i).userinfo.realname=t),placeholder:"请输入姓名"},null,512),[[e.vModelText,e.unref(i).userinfo.realname]])]),e.createElementVNode("view",{class:"box",style:{"padding-top":"30rpx","padding-bottom":"30rpx"}},[e.createElementVNode("view",null,"手机号"),e.withDirectives(e.createElementVNode("input",{disabled:"",style:{"text-align":"right"},type:"nickname","onUpdate:modelValue":n[1]||(n[1]=t=>e.unref(i).userinfo.phone=t),placeholder:"请输入手机号","placeholder-style":"font-size: 32rpx;color: #999999;"},null,512),[[e.vModelText,e.unref(i).userinfo.phone]])]),e.createElementVNode("view",{class:"box",style:{"padding-top":"30rpx","padding-bottom":"30rpx"}},[e.createElementVNode("view",null,"劳动合同号"),e.withDirectives(e.createElementVNode("input",{style:{"text-align":"right"},type:"nickname",disabled:"","onUpdate:modelValue":n[2]||(n[2]=t=>e.unref(i).userinfo.workNo=t),placeholder:"请输入劳动合同号","placeholder-style":"font-size: 32rpx;color: #999999;"},null,512),[[e.vModelText,e.unref(i).userinfo.workNo]])])],2),e.createElementVNode("view",{class:"line"}),e.createElementVNode("view",{class:"btn",onClick:l}," 退出登录 ")],64)}}},[["__scopeId","data-v-3dbb4317"]]),ps=A({__name:"address",setup(t){const a=P();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(a).isgray}])},[e.createElementVNode("view",{class:"list"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(2,((t,a)=>e.createElementVNode("view",{class:"item",key:a},[e.createElementVNode("view",{class:"province f-row aic"},[e.createElementVNode("view",{class:""}," 浙江省,杭州市 "),e.createElementVNode("image",{src:"/static/my/default.png",mode:""})]),e.createElementVNode("view",{class:"address f-row jcb"},[e.createElementVNode("view",{class:""}," 重庆 重庆市 渝北区 龙溪街道花卉园东路黄金 宝高级住宅小区 "),e.createElementVNode("image",{src:"/static/my/edit.png",mode:""})]),e.createElementVNode("view",{class:"set f-row aic jcb"},[e.createElementVNode("view",{class:"f-row aic"},[e.createElementVNode("image",{src:"/static/login/nocheck.png",mode:""}),e.createTextVNode(" 设为默认地址 ")]),e.createElementVNode("view",{class:""}," 删除 ")])]))),64))]),e.createElementVNode("view",{class:"btn f-col aic"},[e.createElementVNode("view",{class:"",onClick:n[0]||(n[0]=e=>{var t;Te(t="/pages/useredit/add_address",(()=>{uni.navigateTo({url:t})}))})}," +添加收货地址 ")])],2))}},[["__scopeId","data-v-837db36d"]]),fs=A({__name:"add_address",setup(t){const a=P();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(a).isgray}])},[e.createElementVNode("view",{class:"area f-row jcb"},[e.createElementVNode("view",{class:"title topic"}," 所在地区 "),e.createElementVNode("input",{type:"text",placeholder:"省、市、区、街道"})]),e.createElementVNode("view",{class:"area f-row jcb"},[e.createElementVNode("view",{class:"title topic"}," 详细地址 "),e.createElementVNode("textarea",{placeholder:"小区楼栋/乡村名称"})]),e.createElementVNode("view",{class:"area f-row jcb"},[e.createElementVNode("view",{class:"title"}," 设为默认地址 "),e.createElementVNode("image",{src:"/static/login/checked.png",mode:""})]),e.createElementVNode("view",{class:"btn f-col aic"},[e.createElementVNode("view",{class:""}," 保存 ")])],2))}},[["__scopeId","data-v-c71fcfcd"]]),gs=A({__name:"addressbook",setup(t){const a=P();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(a).isgray})},[e.createElementVNode("view",{class:"list"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,((t,a)=>e.createElementVNode("view",{class:"item f-row aic jcb",key:a},[e.createElementVNode("view",{class:"user f-row aic"},[e.createElementVNode("image",{src:"",mode:""}),e.createElementVNode("view",{class:"name_job"},[e.createElementVNode("view",{class:"name"}," 我是晴天 "),e.createElementVNode("view",{class:"job"}," 销售部-销售总监 ")])]),e.createElementVNode("view",{class:"btn"}," 电话联系 ")]))),64))])],2))}},[["__scopeId","data-v-e9ce91fd"]]),ys=A({__name:"extendCom",props:{title:{type:String,default:""},img:{type:String,default:""},list:{type:Array,default:function(){return[]}},total:{type:Number,default:0}},setup(a){e.useCssVars((e=>({"02538693":s.value})));const n=a,i=e.ref(!1),s=e.ref(null),o=e.getCurrentInstance();e.watch((()=>n.list),(()=>{e.nextTick((()=>{uni.createSelectorQuery().in(o.proxy).select(".item_box").boundingClientRect((e=>{s.value=(null==e?void 0:e.height)+"px",t("log","at bpm/extendCom.vue:82","moreHeight",s.value)})).exec()}))}),{immediate:!0});const r=e=>{let t=null;Te("/pages/task/index",(()=>{if("待办事项"==n.title&&(t=0),"已办事项"==n.title&&(t=2),"本人发起"==n.title)return uni.navigateTo({url:`/pages/task/self?title=${e}`});uni.navigateTo({url:`/pages/task/index?id=${t}&title=${e}`})}))};return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"todo f-col aic"},[e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"title_box f-row aic jcb",onClick:n[0]||(n[0]=e=>r(""))},[e.createElementVNode("view",{class:"title f-row aic"},[e.createElementVNode("image",{src:`/static/my/${a.img}.png`,mode:""},null,8,["src"]),e.createTextVNode(" "+e.toDisplayString(a.title),1)]),e.createElementVNode("view",{class:"num"},e.toDisplayString(a.total),1)]),a.list.length?(e.openBlock(),e.createElementBlock("view",{key:0,class:"list"},[e.createElementVNode("view",{class:e.normalizeClass(["box",{close:a.list.length>5&&i.value}])},[e.createElementVNode("view",{class:"item_box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.list,((t,a)=>(e.openBlock(),e.createElementBlock("view",{onClick:e=>r(t.title),class:"item f-row aic",key:a},[e.createElementVNode("view",{class:""},e.toDisplayString(t.title),1),e.createElementVNode("text",null,e.toDisplayString(t.num),1)],8,["onClick"])))),128))])],2),e.withDirectives(e.createElementVNode("view",{class:"more",onClick:n[1]||(n[1]=e=>i.value=!i.value)},e.toDisplayString(i.value?"收起":"显示更多"),513),[[e.vShow,a.list.length>5]])])):e.createCommentVNode("",!0)])])]))}},[["__scopeId","data-v-10bcc98c"]]),vs={__name:"todotask",setup(a){const n=P();o((()=>{r(),d(),m()}));const i=e.ref([]),s=e.ref(0),r=()=>{fe({pageNo:1,pageSize:4,_t:(new Date).getTime()}).then((e=>{var a,n,o,r;(null==e?void 0:e.success)&&((null==(a=null==e?void 0:e.result)?void 0:a.total)>4?fe({pageNo:1,pageSize:null==(n=null==e?void 0:e.result)?void 0:n.total,_t:(new Date).getTime()}).then((e=>{var t,a;(null==e?void 0:e.success)&&(i.value=[...i.value,...p(null==(t=null==e?void 0:e.result)?void 0:t.records)],s.value=null==(a=null==e?void 0:e.result)?void 0:a.total)})).catch((e=>{t("log","at pages/task/todotask.vue:53","err",e)})):(i.value=[...i.value,...p(null==(o=null==e?void 0:e.result)?void 0:o.records)],s.value=null==(r=null==e?void 0:e.result)?void 0:r.total))})).catch((e=>{t("log","at pages/task/todotask.vue:62",e)}))},l=e.ref([]),c=e.ref(0),d=()=>{ge({pageNo:1,pageSize:4,_t:(new Date).getTime()}).then((e=>{e.success&&(e.result.total>4?ge({pageNo:1,pageSize:e.result.total,_t:(new Date).getTime()}).then((e=>{e.success&&(l.value=[...l.value,...p(e.result.records)],c.value=e.result.total)})).catch((e=>{t("log","at pages/task/todotask.vue:87",e)})):(l.value=[...l.value,...p(e.result.records)],c.value=e.result.total))})).catch((e=>{t("log","at pages/task/todotask.vue:96",e)}))},u=e.ref([]),h=e.ref(0);e.ref([]);const m=()=>{ye({pageNo:1,pageSize:4,_t:(new Date).getTime()}).then((e=>{e.success&&(e.result.total>4?ye({pageNo:1,pageSize:e.result.total,_t:(new Date).getTime()}).then((e=>{e.success&&(u.value=[...u.value,...p(e.result.records)],h.value=e.result.total)})).catch((e=>{t("log","at pages/task/todotask.vue:122",e)})):(u.value=[...u.value,...p(e.result.records)],h.value=e.result.total))})).catch((e=>{t("log","at pages/task/todotask.vue:132",e)}))},p=e=>{let t=(e.length?e.map((e=>e.processDefinitionName||e.prcocessDefinitionName)):[]).reduce(((e,t)=>(t in e?e[t]++:e[t]=1,e)),{});return Object.entries(t).map((([e,t])=>({title:e,num:t})))};return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(n).isgray}])},[e.createVNode(ys,{title:"待办事项",img:"todo",list:i.value,total:s.value},null,8,["list","total"]),e.createVNode(ys,{title:"已办事项",img:"done",list:l.value,total:c.value},null,8,["list","total"]),e.createVNode(ys,{title:"本人发起",img:"self",list:u.value,total:h.value},null,8,["list","total"])],2))}},ws=A({__name:"safeCom",setup:t=>(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"list f-row aic jcb"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(20,((t,n)=>e.createElementVNode("view",{class:"item",key:n,onClick:a[0]||(a[0]=e=>{var t;Te(t="/pages/safe/detail",(()=>{uni.navigateTo({url:t})}))})},[e.createElementVNode("view",{class:""},[e.createElementVNode("image",{src:"",mode:""})]),e.createElementVNode("view",{class:"text"}," 五月天“突然好想你”线上演唱会精彩回放 ")]))),64))]))},[["__scopeId","data-v-bc41e6b3"]]),ks=A({__name:"manage",setup(t){const n=P(),i=e.ref(!0),s=e.ref("");return(t,o)=>{const r=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(n).isgray}])},[e.createVNode(Ne,null,{default:e.withCtx((()=>[e.createElementVNode("view",{class:"nav_box f-row aic jcb"},[e.createElementVNode("view",{class:"back f-row aic",onClick:o[0]||(o[0]=(...e)=>t.back&&t.back(...e))},[e.createVNode(r,{type:"left",size:"20",color:"#fff"})]),e.createElementVNode("view",{class:"search f-row aic"},[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=e=>s.value=e),onConfirm:o[2]||(o[2]=(...e)=>t.search&&t.search(...e)),onBlur:o[3]||(o[3]=e=>i.value=!s.value),onFocus:o[4]||(o[4]=e=>i.value=!1)},null,544),[[e.vModelText,s.value]]),i.value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"f-row aic"},[e.createElementVNode("image",{src:"/static/search.png",mode:""}),e.createElementVNode("text",null,"搜索")])):e.createCommentVNode("",!0)])])])),_:1}),e.createElementVNode("view",{class:""},[e.createVNode(ws)])],2)}}},[["__scopeId","data-v-02e8f217"]]),bs={__name:"index",setup(t){const a=P(),n=e.ref([]),i=e.ref([]);return o((e=>{n.value=JSON.parse(e.shishi),i.value=JSON.parse(e.product)})),(t,s)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["f-col","aic",{gray:1==e.unref(a).isgray}])},[e.createVNode(je,{title:"实时输差",list:n.value},null,8,["list"]),e.createVNode(je,{title:"偏远计量点",list:n.value},null,8,["list"]),e.createVNode(je,{title:"生产实时数据",list:i.value},null,8,["list"])],2))}},_s={en:{"uni-load-more.contentdown":"Pull up to show more","uni-load-more.contentrefresh":"loading...","uni-load-more.contentnomore":"No more data"},"zh-Hans":{"uni-load-more.contentdown":"上拉显示更多","uni-load-more.contentrefresh":"正在加载...","uni-load-more.contentnomore":"没有更多数据了"},"zh-Hant":{"uni-load-more.contentdown":"上拉顯示更多","uni-load-more.contentrefresh":"正在加載...","uni-load-more.contentnomore":"沒有更多數據了"}};let Ss;setTimeout((()=>{Ss=uni.getSystemInfoSync().platform}),16);const{t:Es}=se(_s);const xs=A({name:"UniLoadMore",emits:["clickLoadMore"],props:{status:{type:String,default:"more"},showIcon:{type:Boolean,default:!0},iconType:{type:String,default:"auto"},iconSize:{type:Number,default:24},color:{type:String,default:"#777777"},contentText:{type:Object,default:()=>({contentdown:"",contentrefresh:"",contentnomore:""})},showText:{type:Boolean,default:!0}},data:()=>({webviewHide:!1,platform:Ss,imgBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII="}),computed:{iconSnowWidth(){return 2*(Math.floor(this.iconSize/24)||1)},contentdownText(){return this.contentText.contentdown||Es("uni-load-more.contentdown")},contentrefreshText(){return this.contentText.contentrefresh||Es("uni-load-more.contentrefresh")},contentnomoreText(){return this.contentText.contentnomore||Es("uni-load-more.contentnomore")}},mounted(){var e=getCurrentPages(),t=e[e.length-1].$getAppWebview();t.addEventListener("hide",(()=>{this.webviewHide=!0})),t.addEventListener("show",(()=>{this.webviewHide=!1}))},methods:{onClick(){this.$emit("clickLoadMore",{detail:{status:this.status}})}}},[["render",function(t,a,n,i,s,o){return e.openBlock(),e.createElementBlock("view",{class:"uni-load-more",onClick:a[0]||(a[0]=(...e)=>o.onClick&&o.onClick(...e))},[!s.webviewHide&&("circle"===n.iconType||"auto"===n.iconType&&"android"===s.platform)&&"loading"===n.status&&n.showIcon?(e.openBlock(),e.createElementBlock("view",{key:0,style:e.normalizeStyle({width:n.iconSize+"px",height:n.iconSize+"px"}),class:"uni-load-more__img uni-load-more__img--android-MP"},[e.createElementVNode("view",{class:"uni-load-more__img-icon",style:e.normalizeStyle({borderTopColor:n.color,borderTopWidth:n.iconSize/12})},null,4),e.createElementVNode("view",{class:"uni-load-more__img-icon",style:e.normalizeStyle({borderTopColor:n.color,borderTopWidth:n.iconSize/12})},null,4),e.createElementVNode("view",{class:"uni-load-more__img-icon",style:e.normalizeStyle({borderTopColor:n.color,borderTopWidth:n.iconSize/12})},null,4)],4)):!s.webviewHide&&"loading"===n.status&&n.showIcon?(e.openBlock(),e.createElementBlock("view",{key:1,style:e.normalizeStyle({width:n.iconSize+"px",height:n.iconSize+"px"}),class:"uni-load-more__img uni-load-more__img--ios-H5"},[e.createElementVNode("image",{src:s.imgBase64,mode:"widthFix"},null,8,["src"])],4)):e.createCommentVNode("",!0),n.showText?(e.openBlock(),e.createElementBlock("text",{key:2,class:"uni-load-more__text",style:e.normalizeStyle({color:n.color})},e.toDisplayString("more"===n.status?o.contentdownText:"loading"===n.status?o.contentrefreshText:o.contentnomoreText),5)):e.createCommentVNode("",!0)])}],["__scopeId","data-v-a7e112cc"]]),Ns={props:{localdata:{type:[Array,Object],default:()=>[]},spaceInfo:{type:Object,default:()=>({})},collection:{type:String,default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:500},getcount:{type:[Boolean,String],default:!1},getone:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},manual:{type:Boolean,default:!1},value:{type:[Array,String,Number],default:()=>[]},modelValue:{type:[Array,String,Number],default:()=>[]},preload:{type:Boolean,default:!1},stepSearh:{type:Boolean,default:!0},selfField:{type:String,default:""},parentField:{type:String,default:""},multiple:{type:Boolean,default:!1},map:{type:Object,default:()=>({text:"text",value:"value"})}},data(){return{loading:!1,errorMessage:"",loadMore:{contentdown:"",contentrefresh:"",contentnomore:""},dataList:[],selected:[],selectedIndex:0,page:{current:this.pageCurrent,size:this.pageSize,count:0}}},computed:{isLocalData(){return!this.collection.length},isCloudData(){return this.collection.length>0},isCloudDataList(){return this.isCloudData&&!this.parentField&&!this.selfField},isCloudDataTree(){return this.isCloudData&&this.parentField&&this.selfField},dataValue(){return(Array.isArray(this.modelValue)?this.modelValue.length>0:null!==this.modelValue||void 0!==this.modelValue)?this.modelValue:this.value},hasValue(){return"number"==typeof this.dataValue||null!=this.dataValue&&this.dataValue.length>0}},created(){this.$watch((()=>{var e=[];return["pageCurrent","pageSize","spaceInfo","value","modelValue","localdata","collection","action","field","orderby","where","getont","getcount","gettree"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{for(let a=2;a<e.length&&e[a]==t[a];a++);e[0]!=t[0]&&(this.page.current=this.pageCurrent),this.page.size=this.pageSize,this.onPropsChange()})),this._treeData=[]},methods:{onPropsChange(){this._treeData=[]},async loadData(){this.isLocalData?this.loadLocalData():this.isCloudDataList?this.loadCloudDataList():this.isCloudDataTree&&this.loadCloudDataTree()},async loadLocalData(){this._treeData=[],this._extractTree(this.localdata,this._treeData);let e=this.dataValue;void 0!==e&&(Array.isArray(e)&&(e=e[e.length-1],"object"==typeof e&&e[this.map.value]&&(e=e[this.map.value])),this.selected=this._findNodePath(e,this.localdata))},async loadCloudDataList(){if(!this.loading){this.loading=!0;try{let e=(await this.getCommand()).result.data;this._treeData=e,this._updateBindData(),this._updateSelected(),this.onDataChange()}catch(Sa){this.errorMessage=Sa}finally{this.loading=!1}}},async loadCloudDataTree(){if(!this.loading){this.loading=!0;try{let e={field:this._cloudDataPostField(),where:this._cloudDataTreeWhere()};this.gettree&&(e.startwith=`${this.selfField}=='${this.dataValue}'`);let t=(await this.getCommand(e)).result.data;this._treeData=t,this._updateBindData(),this._updateSelected(),this.onDataChange()}catch(Sa){this.errorMessage=Sa}finally{this.loading=!1}}},async loadCloudDataNode(e){if(!this.loading){this.loading=!0;try{let t={field:this._cloudDataPostField(),where:this._cloudDataNodeWhere()};e((await this.getCommand(t)).result.data)}catch(Sa){this.errorMessage=Sa}finally{this.loading=!1}}},getCloudDataValue(){return this.isCloudDataList?this.getCloudDataListValue():this.isCloudDataTree?this.getCloudDataTreeValue():void 0},getCloudDataListValue(){let e=[],t=this._getForeignKeyByField();return t&&e.push(`${t} == '${this.dataValue}'`),e=e.join(" || "),this.where&&(e=`(${this.where}) && (${e})`),this.getCommand({field:this._cloudDataPostField(),where:e}).then((e=>(this.selected=e.result.data,e.result.data)))},getCloudDataTreeValue(){return this.getCommand({field:this._cloudDataPostField(),getTreePath:{startWith:`${this.selfField}=='${this.dataValue}'`}}).then((e=>{let t=[];return this._extractTreePath(e.result.data,t),this.selected=t,t}))},getCommand(e={}){let t=Yi.database(this.spaceInfo);const a=e.action||this.action;a&&(t=t.action(a));const n=e.collection||this.collection;t=t.collection(n);const i=e.where||this.where;i&&Object.keys(i).length&&(t=t.where(i));const s=e.field||this.field;s&&(t=t.field(s));const o=e.orderby||this.orderby;o&&(t=t.orderBy(o));const r=void 0!==e.pageCurrent?e.pageCurrent:this.page.current,l=void 0!==e.pageSize?e.pageSize:this.page.size,c={getCount:void 0!==e.getcount?e.getcount:this.getcount,getTree:void 0!==e.gettree?e.gettree:this.gettree};return e.getTreePath&&(c.getTreePath=e.getTreePath),t=t.skip(l*(r-1)).limit(l).get(c),t},_cloudDataPostField(){let e=[this.field];return this.parentField&&e.push(`${this.parentField} as parent_value`),e.join(",")},_cloudDataTreeWhere(){let e=[],t=this.selected,a=this.parentField;if(a&&e.push(`${a} == null || ${a} == ""`),t.length)for(var n=0;n<t.length-1;n++)e.push(`${a} == '${t[n].value}'`);let i=[];return this.where&&i.push(`(${this.where})`),e.length&&i.push(`(${e.join(" || ")})`),i.join(" && ")},_cloudDataNodeWhere(){let e=[],t=this.selected;return t.length&&e.push(`${this.parentField} == '${t[t.length-1].value}'`),e=e.join(" || "),this.where?`(${this.where}) && (${e})`:e},_getWhereByForeignKey(){let e=[],t=this._getForeignKeyByField();return t&&e.push(`${t} == '${this.dataValue}'`),this.where?`(${this.where}) && (${e.join(" || ")})`:e.join(" || ")},_getForeignKeyByField(){let e=this.field.split(","),t=null;for(let a=0;a<e.length;a++){const n=e[a].split("as");if(!(n.length<2)&&"value"===n[1].trim()){t=n[0].trim();break}}return t},_updateBindData(e){const{dataList:t,hasNodes:a}=this._filterData(this._treeData,this.selected);let n=!1===this._stepSearh&&!a;return e&&(e.isleaf=n),this.dataList=t,this.selectedIndex=t.length-1,!n&&this.selected.length<t.length&&this.selected.push({value:null,text:"请选择"}),{isleaf:n,hasNodes:a}},_updateSelected(){let e=this.dataList,t=this.selected,a=this.map.text,n=this.map.value;for(let i=0;i<t.length;i++){let s=t[i].value,o=e[i];for(let e=0;e<o.length;e++){let r=o[e];if(r[n]===s){t[i].text=r[a];break}}}},_filterData(e,t){let a=[],n=!0;a.push(e.filter((e=>null===e.parent_value||void 0===e.parent_value||""===e.parent_value)));for(let i=0;i<t.length;i++){let s=t[i].value,o=e.filter((e=>e.parent_value===s));o.length?a.push(o):n=!1}return{dataList:a,hasNodes:n}},_extractTree(e,t,a){let n=this.map.value;for(let i=0;i<e.length;i++){let s=e[i],o={};for(let e in s)"children"!==e&&(o[e]=s[e]);null!=a&&""!==a&&(o.parent_value=a),t.push(o);let r=s.children;r&&this._extractTree(r,t,s[n])}},_extractTreePath(e,t){for(let a=0;a<e.length;a++){let n=e[a],i={};for(let e in n)"children"!==e&&(i[e]=n[e]);t.push(i);let s=n.children;s&&this._extractTreePath(s,t)}},_findNodePath(e,t,a=[]){let n=this.map.text,i=this.map.value;for(let s=0;s<t.length;s++){let o=t[s],r=o.children,l=o[n],c=o[i];if(a.push({value:c,text:l}),c===e)return a;if(r){const t=this._findNodePath(e,r,a);if(t.length)return t}a.pop()}return[]}}};const Vs={name:"UniDataPicker",emits:["popupopened","popupclosed","nodeclick","input","change","update:modelValue","inputclick"],mixins:[Ns],components:{DataPickerView:A({name:"UniDataPickerView",emits:["nodeclick","change","datachange","update:modelValue"],mixins:[Ns],props:{managedMode:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!0}},created(){this.managedMode||this.$nextTick((()=>{this.loadData()}))},methods:{onPropsChange(){this._treeData=[],this.selectedIndex=0,this.$nextTick((()=>{this.loadData()}))},handleSelect(e){this.selectedIndex=e},handleNodeClick(e,t,a){if(e.disable)return;const n=this.dataList[t][a],i=n[this.map.text],s=n[this.map.value];if(t<this.selected.length-1?(this.selected.splice(t,this.selected.length-t),this.selected.push({text:i,value:s})):t===this.selected.length-1&&this.selected.splice(t,1,{text:i,value:s}),n.isleaf)return void this.onSelectedChange(n,n.isleaf);const{isleaf:o,hasNodes:r}=this._updateBindData();this.isLocalData?this.onSelectedChange(n,!r||o):this.isCloudDataList?this.onSelectedChange(n,!0):this.isCloudDataTree&&(o?this.onSelectedChange(n,n.isleaf):r||this.loadCloudDataNode((e=>{e.length?(this._treeData.push(...e),this._updateBindData(n)):n.isleaf=!0,this.onSelectedChange(n,n.isleaf)})))},updateData(e){this._treeData=e.treeData,this.selected=e.selected,this._treeData.length?this._updateBindData():this.loadData()},onDataChange(){this.$emit("datachange")},onSelectedChange(e,t){t&&this._dispatchEvent(),e&&this.$emit("nodeclick",e)},_dispatchEvent(){this.$emit("change",this.selected.slice(0))}}},[["render",function(t,n,i,s,o,r){const l=a(e.resolveDynamicComponent("uni-load-more"),xs);return e.openBlock(),e.createElementBlock("view",{class:"uni-data-pickerview"},[t.isCloudDataList?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("scroll-view",{key:0,class:"selected-area","scroll-x":"true"},[e.createElementVNode("view",{class:"selected-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.selected,((a,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["selected-item",{"selected-item-active":n==t.selectedIndex}]),key:n,onClick:e=>r.handleSelect(n)},[e.createElementVNode("text",null,e.toDisplayString(a.text||""),1)],10,["onClick"])))),128))])])),e.createElementVNode("view",{class:"tab-c"},[e.createElementVNode("scroll-view",{class:"list","scroll-y":!0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList[t.selectedIndex],((a,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["item",{"is-disabled":!!a.disable}]),key:n,onClick:e=>r.handleNodeClick(a,t.selectedIndex,n)},[e.createElementVNode("text",{class:"item-text"},e.toDisplayString(a[t.map.text]),1),t.selected.length>t.selectedIndex&&a[t.map.value]==t.selected[t.selectedIndex].value?(e.openBlock(),e.createElementBlock("view",{key:0,class:"check"})):e.createCommentVNode("",!0)],10,["onClick"])))),128))]),t.loading?(e.openBlock(),e.createElementBlock("view",{key:0,class:"loading-cover"},[e.createVNode(l,{class:"load-more",contentText:t.loadMore,status:"loading"},null,8,["contentText"])])):e.createCommentVNode("",!0),t.errorMessage?(e.openBlock(),e.createElementBlock("view",{key:1,class:"error-message"},[e.createElementVNode("text",{class:"error-text"},e.toDisplayString(t.errorMessage),1)])):e.createCommentVNode("",!0)])])}],["__scopeId","data-v-c0c521c5"]])},props:{options:{type:[Object,Array],default:()=>({})},popupTitle:{type:String,default:"请选择"},placeholder:{type:String,default:"请选择"},heightMobile:{type:String,default:""},readonly:{type:Boolean,default:!1},clearIcon:{type:Boolean,default:!0},border:{type:Boolean,default:!0},split:{type:String,default:"/"},ellipsis:{type:Boolean,default:!0}},data:()=>({isOpened:!1,inputSelected:[]}),created(){this.$nextTick((()=>{this.load()}))},watch:{localdata:{handler(){this.load()},deep:!0}},methods:{clear(){this._dispatchEvent([])},onPropsChange(){this._treeData=[],this.selectedIndex=0,this.load()},load(){this.readonly?this._processReadonly(this.localdata,this.dataValue):this.isLocalData?(this.loadData(),this.inputSelected=this.selected.slice(0)):(this.isCloudDataList||this.isCloudDataTree)&&(this.loading=!0,this.getCloudDataValue().then((e=>{this.loading=!1,this.inputSelected=e})).catch((e=>{this.loading=!1,this.errorMessage=e})))},show(){this.isOpened=!0,setTimeout((()=>{this.$refs.pickerView.updateData({treeData:this._treeData,selected:this.selected,selectedIndex:this.selectedIndex})}),200),this.$emit("popupopened")},hide(){this.isOpened=!1,this.$emit("popupclosed")},handleInput(){this.readonly?this.$emit("inputclick"):this.show()},handleClose(e){this.hide()},onnodeclick(e){this.$emit("nodeclick",e)},ondatachange(e){this._treeData=this.$refs.pickerView._treeData},onchange(e){this.hide(),this.$nextTick((()=>{this.inputSelected=e})),this._dispatchEvent(e)},_processReadonly(e,t){if(e.findIndex((e=>e.children))>-1){let e;return Array.isArray(t)?(e=t[t.length-1],"object"==typeof e&&e.value&&(e=e.value)):e=t,void(this.inputSelected=this._findNodePath(e,this.localdata))}if(!this.hasValue)return void(this.inputSelected=[]);let a=[];for(let s=0;s<t.length;s++){var n=t[s],i=e.find((e=>e.value==n));i&&a.push(i)}a.length&&(this.inputSelected=a)},_filterForArray(e,t){var a=[];for(let s=0;s<t.length;s++){var n=t[s],i=e.find((e=>e.value==n));i&&a.push(i)}return a},_dispatchEvent(e){let t={};if(e.length){for(var a=new Array(e.length),n=0;n<e.length;n++)a[n]=e[n].value;t=e[e.length-1]}else t.value="";this.formItem&&this.formItem.setValue(t.value),this.$emit("input",t.value),this.$emit("update:modelValue",t.value),this.$emit("change",{detail:{value:e}})}}};const Cs=A(Vs,[["render",function(t,n,i,s,o,r){const l=a(e.resolveDynamicComponent("uni-load-more"),xs),c=a(e.resolveDynamicComponent("uni-icons"),O),d=e.resolveComponent("data-picker-view");return e.openBlock(),e.createElementBlock("view",{class:"uni-data-tree"},[e.createElementVNode("view",{class:"uni-data-tree-input",onClick:n[1]||(n[1]=(...e)=>r.handleInput&&r.handleInput(...e))},[e.renderSlot(t.$slots,"default",{options:i.options,data:o.inputSelected,error:t.errorMessage},(()=>[e.createElementVNode("view",{class:e.normalizeClass(["input-value",{"input-value-border":i.border}])},[t.errorMessage?(e.openBlock(),e.createElementBlock("text",{key:0,class:"selected-area error-text"},e.toDisplayString(t.errorMessage),1)):t.loading&&!o.isOpened?(e.openBlock(),e.createElementBlock("view",{key:1,class:"selected-area"},[e.createVNode(l,{class:"load-more",contentText:t.loadMore,status:"loading"},null,8,["contentText"])])):o.inputSelected.length?(e.openBlock(),e.createElementBlock("scroll-view",{key:2,class:"selected-area","scroll-x":"true"},[e.createElementVNode("view",{class:"selected-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.inputSelected,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"selected-item",key:a},[e.createElementVNode("text",{class:"text-color"},e.toDisplayString(t.text),1),a<o.inputSelected.length-1?(e.openBlock(),e.createElementBlock("text",{key:0,class:"input-split-line"},e.toDisplayString(i.split),1)):e.createCommentVNode("",!0)])))),128))])])):(e.openBlock(),e.createElementBlock("text",{key:3,class:"selected-area placeholder"},e.toDisplayString(i.placeholder),1)),i.clearIcon&&!i.readonly&&o.inputSelected.length?(e.openBlock(),e.createElementBlock("view",{key:4,class:"icon-clear",onClick:n[0]||(n[0]=e.withModifiers(((...e)=>r.clear&&r.clear(...e)),["stop"]))},[e.createVNode(c,{type:"clear",color:"#c0c4cc",size:"24"})])):e.createCommentVNode("",!0),i.clearIcon&&o.inputSelected.length||i.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("view",{key:5,class:"arrow-area"},[e.createElementVNode("view",{class:"input-arrow"})]))],2)]),!0)]),o.isOpened?(e.openBlock(),e.createElementBlock("view",{key:0,class:"uni-data-tree-cover",onClick:n[2]||(n[2]=(...e)=>r.handleClose&&r.handleClose(...e))})):e.createCommentVNode("",!0),o.isOpened?(e.openBlock(),e.createElementBlock("view",{key:1,class:"uni-data-tree-dialog"},[e.createElementVNode("view",{class:"uni-popper__arrow"}),e.createElementVNode("view",{class:"dialog-caption"},[e.createElementVNode("view",{class:"title-area"},[e.createElementVNode("text",{class:"dialog-title"},e.toDisplayString(i.popupTitle),1)]),e.createElementVNode("view",{class:"dialog-close",onClick:n[3]||(n[3]=(...e)=>r.handleClose&&r.handleClose(...e))},[e.createElementVNode("view",{class:"dialog-close-plus","data-id":"close"}),e.createElementVNode("view",{class:"dialog-close-plus dialog-close-rotate","data-id":"close"})])]),e.createVNode(d,{class:"picker-view",ref:"pickerView",modelValue:t.dataValue,"onUpdate:modelValue":n[4]||(n[4]=e=>t.dataValue=e),localdata:t.localdata,preload:t.preload,collection:t.collection,field:t.field,orderby:t.orderby,where:t.where,"step-searh":t.stepSearh,"self-field":t.selfField,"parent-field":t.parentField,"managed-mode":!0,map:t.map,ellipsis:i.ellipsis,onChange:r.onchange,onDatachange:r.ondatachange,onNodeclick:r.onnodeclick},null,8,["modelValue","localdata","preload","collection","field","orderby","where","step-searh","self-field","parent-field","map","ellipsis","onChange","onDatachange","onNodeclick"])])):e.createCommentVNode("",!0)])}],["__scopeId","data-v-0b9ed1e5"]]),Ts={__name:"index",setup(n){const i=P(),{proxy:s}=e.getCurrentInstance(),r=e.ref([]),l=()=>{var e;d({url:"/sys/sysDepart/queryTreeList",method:"get",data:e}).then((e=>{r.value=e.result,h=e.result[0].id,u(e.result[0].id)})).catch((e=>{t("log","at pages/userlist/index.vue:98",e)}))},c=e.ref([]),u=(e,a,n)=>{var i;(i={id:e,username:a||"",realname:n||""},d({url:"/sys/user/queryUserByDepId",method:"get",data:i})).then((e=>{e.success&&(c.value=e.result)})).catch((e=>{t("log","at pages/userlist/index.vue:113",e)}))};let h=null,m=[];const p=e=>{u(e.id),h=e.id,-1!=m.indexOf(e.title)?m.splice(m.indexOf(e.title),1,e.title):m.push(e.title)},f=e.ref([]);let g=0,y=null,v=null,w=null;o((e=>{g=e.isradio,y=e.id,w=e.reason,e.nextnode&&(v=JSON.parse(e.nextnode)),l()}));const k=e.ref(""),b=e.ref(""),_=()=>{(k.value.trim()||b.value.trim())&&(c.value=[],u(h,k.value,b.value))},S=()=>{k.value="",b.value="",c.value=[],u(h,k.value,b.value)},E=()=>{if(!f.value.length)return s.$toast("请选择被委托人");var e;(e={taskAssignee:c.value.filter((e=>e.id==f.value[0]))[0].username,taskId:y},d({url:"/act/task/taskEntrust",method:"put",data:e})).then((e=>{e.success&&(s.$toast(e.message),setTimeout((()=>{uni.navigateBack()}),2e3))}))},x=()=>{v?N():E()},N=()=>{xe({taskId:y,reason:w,processModel:1,nextnode:v[0].nextnode,nextUserName:c.value.filter((e=>e.id==f.value[0]))[0].realname,nextUserId:f.value[0]}).then((e=>{s.$toast(e.message),setTimeout((()=>{uni.navigateBack()}),2e3)}))};return(n,s)=>{const o=a(e.resolveDynamicComponent("uni-data-picker"),Cs),l=a(e.resolveDynamicComponent("uni-icons"),O);return e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(i).isgray}])},[e.createVNode(o,{onPopupclosed:s[0]||(s[0]=e=>(e=>{t("log","at pages/userlist/index.vue:129","qqq",e)})(e)),"step-searh":!1,map:{text:"departName",value:"id"},localdata:r.value,"popup-title":"请选择部门",placeholder:"请选择部门",onNodeclick:p},null,8,["localdata"]),e.createElementVNode("view",{class:"search_box"},[e.createElementVNode("view",{class:"username f-row aic"},[e.createTextVNode(" 用户姓名:"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[1]||(s[1]=e=>b.value=e),type:"text",placeholder:"请输入姓名","placeholder-style":"color: grey;font-size: 28rpx;"},null,512),[[e.vModelText,b.value]])]),e.createElementVNode("view",{class:"username f-row aic"},[e.createTextVNode(" 用户账号:"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[2]||(s[2]=e=>k.value=e),type:"text",placeholder:"请输入账号","placeholder-style":"color: grey;font-size: 28rpx;"},null,512),[[e.vModelText,k.value]])]),e.createElementVNode("view",{class:"btn f-row aic jca"},[e.createElementVNode("view",{class:"f-row aic",onClick:_},[e.createVNode(l,{type:"search",size:"15",color:"#fff"}),e.createTextVNode(" 查询 ")]),e.createElementVNode("view",{class:"f-row aic",onClick:S},[e.createVNode(l,{type:"refreshempty",size:"15",color:"#fff"}),e.createTextVNode(" 重置 ")])])]),e.createElementVNode("view",{class:"list"},[e.createElementVNode("view",{class:"title f-row aic box"},[e.createElementVNode("view",{class:""}),e.createElementVNode("view",{class:""}," 序号 "),e.createElementVNode("view",{class:"username"}," 用户账号 "),e.createElementVNode("view",{class:""}," 用户姓名 ")]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"item f-row aic box",key:a},[e.createElementVNode("view",{class:"f-row aic img",onClick:e=>(e=>{if(g){if(-1!=f.value.indexOf(e))return;f.value.splice(f.value.indexOf(e),1,e)}else-1!=f.value.indexOf(e)?f.value.splice(f.value.indexOf(e),1):f.value.push(e)})(t.id)},[f.value.includes(t.id)?(e.openBlock(),e.createElementBlock("image",{key:0,src:"/static/login/checked.png",mode:""})):(e.openBlock(),e.createElementBlock("image",{key:1,src:"/static/login/nocheck.png",mode:""}))],8,["onClick"]),e.createElementVNode("view",{class:"order"},e.toDisplayString(a+1),1),e.createElementVNode("view",{class:"username f-col aic"},[e.createElementVNode("view",{class:""},e.toDisplayString(t.username),1)]),e.createElementVNode("view",{class:"realname"},[e.createElementVNode("view",{class:""},e.toDisplayString(t.realname),1)])])))),128))]),e.createElementVNode("view",{class:"confirm f-col aic"},[e.createElementVNode("view",{class:"",onClick:x}," 确认 ")])],2)}}},Ds=A(Ts,[["__scopeId","data-v-a805c56c"]]),Bs=A({__name:"detail",setup(t){const a=P();return(t,n)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["content",{gray:1==e.unref(a).isgray}])},[e.createElementVNode("view",{class:""},[e.createElementVNode("video",{src:""}),e.createElementVNode("view",{class:"title"}," 五月天“突然好想你”线上演唱会精彩回放,这里就是标题 ")]),e.createElementVNode("view",{class:"listcom"},[e.createVNode(ws)])],2))}},[["__scopeId","data-v-ab4e5d54"]]);var Is={exports:{}};!function(e,t){e.exports=function(){var e=1e3,t=6e4,a=36e5,n="millisecond",i="second",s="minute",o="hour",r="day",l="week",c="month",d="quarter",u="year",h="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}},y=function(e,t,a){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(a)+e},v={s:y,z:function(e){var t=-e.utcOffset(),a=Math.abs(t),n=Math.floor(a/60),i=a%60;return(t<=0?"+":"-")+y(n,2,"0")+":"+y(i,2,"0")},m:function e(t,a){if(t.date()<a.date())return-e(a,t);var n=12*(a.year()-t.year())+(a.month()-t.month()),i=t.clone().add(n,c),s=a-i<0,o=t.clone().add(n+(s?-1:1),c);return+(-(n+(a-i)/(s?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:u,w:l,d:r,D:h,h:o,m:s,s:i,ms:n,Q:d}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",k={};k[w]=g;var b="$isDayjsObject",_=function(e){return e instanceof N||!(!e||!e[b])},S=function e(t,a,n){var i;if(!t)return w;if("string"==typeof t){var s=t.toLowerCase();k[s]&&(i=s),a&&(k[s]=a,i=s);var o=t.split("-");if(!i&&o.length>1)return e(o[0])}else{var r=t.name;k[r]=t,i=r}return!n&&i&&(w=i),i||!n&&w},E=function(e,t){if(_(e))return e.clone();var a="object"==typeof t?t:{};return a.date=e,a.args=arguments,new N(a)},x=v;x.l=S,x.i=_,x.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var N=function(){function g(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[b]=!0}var y=g.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,a=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,s=(n[7]||"0").substring(0,3);return a?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return x},y.isValid=function(){return!(this.$d.toString()===m)},y.isSame=function(e,t){var a=E(e);return this.startOf(t)<=a&&a<=this.endOf(t)},y.isAfter=function(e,t){return E(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<E(e)},y.$g=function(e,t,a){return x.u(e)?this[t]:this.set(a,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var a=this,n=!!x.u(t)||t,d=x.p(e),m=function(e,t){var i=x.w(a.$u?Date.UTC(a.$y,t,e):new Date(a.$y,t,e),a);return n?i:i.endOf(r)},p=function(e,t){return x.w(a.toDate()[e].apply(a.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),a)},f=this.$W,g=this.$M,y=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case u:return n?m(1,0):m(31,11);case c:return n?m(1,g):m(0,g+1);case l:var w=this.$locale().weekStart||0,k=(f<w?f+7:f)-w;return m(n?y-k:y+(6-k),g);case r:case h:return p(v+"Hours",0);case o:return p(v+"Minutes",1);case s:return p(v+"Seconds",2);case i:return p(v+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var a,l=x.p(e),d="set"+(this.$u?"UTC":""),m=(a={},a[r]=d+"Date",a[h]=d+"Date",a[c]=d+"Month",a[u]=d+"FullYear",a[o]=d+"Hours",a[s]=d+"Minutes",a[i]=d+"Seconds",a[n]=d+"Milliseconds",a)[l],p=l===r?this.$D+(t-this.$W):t;if(l===c||l===u){var f=this.clone().set(h,1);f.$d[m](p),f.init(),this.$d=f.set(h,Math.min(this.$D,f.daysInMonth())).$d}else m&&this.$d[m](p);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[x.p(e)]()},y.add=function(n,d){var h,m=this;n=Number(n);var p=x.p(d),f=function(e){var t=E(m);return x.w(t.date(t.date()+Math.round(e*n)),m)};if(p===c)return this.set(c,this.$M+n);if(p===u)return this.set(u,this.$y+n);if(p===r)return f(1);if(p===l)return f(7);var g=(h={},h[s]=t,h[o]=a,h[i]=e,h)[p]||1,y=this.$d.getTime()+n*g;return x.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,a=this.$locale();if(!this.isValid())return a.invalidDate||m;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=x.z(this),s=this.$H,o=this.$m,r=this.$M,l=a.weekdays,c=a.months,d=a.meridiem,u=function(e,a,i,s){return e&&(e[a]||e(t,n))||i[a].slice(0,s)},h=function(e){return x.s(s%12||12,e,"0")},p=d||function(e,t,a){var n=e<12?"AM":"PM";return a?n.toLowerCase():n};return n.replace(f,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return x.s(t.$y,4,"0");case"M":return r+1;case"MM":return x.s(r+1,2,"0");case"MMM":return u(a.monthsShort,r,c,3);case"MMMM":return u(c,r);case"D":return t.$D;case"DD":return x.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return u(a.weekdaysMin,t.$W,l,2);case"ddd":return u(a.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(s);case"HH":return x.s(s,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return p(s,o,!0);case"A":return p(s,o,!1);case"m":return String(o);case"mm":return x.s(o,2,"0");case"s":return String(t.$s);case"ss":return x.s(t.$s,2,"0");case"SSS":return x.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(n,h,m){var p,f=this,g=x.p(h),y=E(n),v=(y.utcOffset()-this.utcOffset())*t,w=this-y,k=function(){return x.m(f,y)};switch(g){case u:p=k()/12;break;case c:p=k();break;case d:p=k()/3;break;case l:p=(w-v)/6048e5;break;case r:p=(w-v)/864e5;break;case o:p=w/a;break;case s:p=w/t;break;case i:p=w/e;break;default:p=w}return m?p:x.a(p)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return k[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var a=this.clone(),n=S(e,t,!0);return n&&(a.$L=n),a},y.clone=function(){return x.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},g}(),V=N.prototype;return E.prototype=V,[["$ms",n],["$s",i],["$m",s],["$H",o],["$W",r],["$M",c],["$y",u],["$D",h]].forEach((function(e){V[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),E.extend=function(e,t){return e.$i||(e(t,N,E),e.$i=!0),E},E.locale=S,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=k[w],E.Ls=k,E.p={},E}()}(Is);const Ps=m(Is.exports),As={__name:"index",setup(a){const n=P(),i=e.ref([]);o((()=>{l()}));const s=e.ref(Ps().format("YYYY-MM")),r=e=>{s.value=e.detail.value,l()},l=()=>{let[e,a]=s.value.split("-");var n;(n={year:e,month:a},d({url:"/zhgl_zbgl/zhglZbglZbb/list",method:"get",data:n})).then((e=>{i.value=e.result.records})).catch((e=>{t("log","at pages/zhiban/index.vue:73",e)}))};return(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass(["f-col","aic",{gray:1==e.unref(n).isgray}])},[e.createElementVNode("picker",{fields:"month",mode:"date",onChange:r,value:s.value},[e.createElementVNode("view",{class:"date"},e.toDisplayString(s.value)+" 点击选择月份",1)],40,["value"]),e.createElementVNode("view",{class:"info"},[e.createElementVNode("view",{class:"info_title f-row aic"},[e.createElementVNode("view",{class:""}," 日期 "),e.createElementVNode("view",{class:""}," 带班领导 "),e.createElementVNode("view",{class:""}," 值班领导 "),e.createElementVNode("view",{class:""}," 值班干部 ")]),e.createElementVNode("view",{class:"data_box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"data f-row aic"},[e.createElementVNode("view",{class:""},e.toDisplayString(t.date),1),e.createElementVNode("view",{class:""},e.toDisplayString(t.dbld_dictText),1),e.createElementVNode("view",{class:""},e.toDisplayString(t.zbld_dictText),1),e.createElementVNode("view",{class:""},e.toDisplayString(t.zbgbrealname),1)])))),256))])])],2))}},Ms=A(As,[["__scopeId","data-v-54de2922"]]),Rs={__name:"self",setup(a){const n=P(),i=e.ref([]);let s="";o((e=>{s=e.title,d()}));let l=1,c=!1;const d=()=>{c=!0,uni.showLoading({title:"加载中..."}),ye({pageNo:l,pageSize:10,_t:(new Date).getTime(),processName:s}).then((e=>{if(e.success){if(!e.result.records.length)return Ce("没有更多了~");let t=e.result.records;t.map((e=>{e.processApplyUserName=e.startUserName,e.processDefinitionName=e.prcocessDefinitionName,e.taskBeginTime=e.startTime})),i.value=[...i.value,...t],c=!1}})).catch((e=>{t("log","at pages/task/self.vue:59",e)}))},u=e=>{Te(e,(()=>{uni.navigateTo({url:e})}))};return r((()=>{c||(l++,d())})),(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:e.normalizeClass({gray:1==e.unref(n).isgray})},[e.createVNode(Ze,{onJump:u,taskArr:i.value,currentIndex:2},null,8,["taskArr"])],2))}};__definePage("pages/login/login",M),__definePage("pages/tab/index",Le),__definePage("pages/tab/office",$e),__definePage("pages/tab/product",Ue),__definePage("pages/tab/my",Qe),__definePage("pages/task/index",Xe),__definePage("pages/task/handle",rt),__definePage("pages/talk/message_list",lt),__definePage("pages/talk/conversation",ct),__definePage("pages/talk/system",dt),__definePage("pages/document/index",ut),__definePage("pages/document/detail",ht),__definePage("pages/meeting/index",mt),__definePage("pages/meeting/detail",pt),__definePage("pages/leave/application",us),__definePage("pages/checkin/index",hs),__definePage("pages/useredit/useredit",ms),__definePage("pages/useredit/address",ps),__definePage("pages/useredit/add_address",fs),__definePage("pages/useredit/addressbook",gs),__definePage("pages/task/todotask",vs),__definePage("pages/safe/manage",ks),__definePage("pages/product/index",bs),__definePage("pages/userlist/index",Ds),__definePage("pages/safe/detail",Bs),__definePage("pages/zhiban/index",Ms),__definePage("pages/task/self",Rs);const Os="https://36.112.48.190/jeecg-boot/sys/common/static/",Ls=I("updateApp",(()=>{const a=e.reactive({force:!1,hasNew:!1,content:"",url:"",wgtUrl:""}),n=uni.getSystemInfoSync();return{checkAppUpdate:function(e=!1){try{d({url:"/sys/common/upDateApp",method:"get",data:i}).then((async e=>{let{result:i}=e;i.apkUrl=Os+i.apkUrl,i.wgtUrl=Os+i.wgtUrl,t("log","at store/update.js:40","更新",i),a.wgtUrl=i.wgtUrl,"android"===n.osName?(a.apkUrl=i.apkUrl,a.hasNew=await((e,t=!1)=>new Promise((a=>{const n=e=>e.replace(/\./g,"");if(t)plus.runtime.getProperty(plus.runtime.appid,(t=>{const i=t.version;a(+n(e)>+n(i))}));else{const t=plus.runtime.version;a(+n(e)>+n(t))}})))(i.versionCode,"wgt"==i.update)):a.url="itms-apps://itunes.apple.com/cn/app/id123456?mt=8",a.hasNew&&uni.showModal({title:"更新",content:"发现新版本,请更新",success(e){var t,a;e.confirm?(t=i.update,a=i,"wgt"!=t?plus.runtime.openURL(a.apkUrl):Be(a.wgtUrl)):plus.runtime.quit()}})}))}catch(s){a.hasNew=!1}var i},...e.toRefs(a),systemInfo:n}})),Fs={__name:"App",setup:e=>(s((()=>{uni.onTabBarMidButtonTap((()=>{Te("/pages/task/index",(()=>{uni.navigateTo({url:"/pages/task/index?id=0"})}))})),Ls().checkAppUpdate(),Pe()})),i((()=>{var e;(e={id:"1827997127165677570"},d({url:"/CxcJurisdiction/cxcJurisdiction/queryById",method:"get",data:e})).then((e=>{if(e.success){const t=P();uni.setStorageSync("isgray",e.result.value),t.setIsgray(e.result.value)}}))})),()=>{})},$s=A({__name:"index",props:{dataId:{type:String,default:""}},setup(t){const n=t,i=e.ref([]),s={width:64,height:64,border:{color:"#dce7e1",width:2,style:"dashed",radius:"2px"}},o=e.ref({}),r=()=>{var e;(e={id:n.dataId},d({url:"/CxcQxj/cxcQxj/queryById",method:"get",data:e})).then((e=>{e.success&&(o.value=e.result.records[0],i.value=o.value.path.split(",").map((e=>{const t=e.split("/").pop(),a=t.split(".").pop();return{name:t,extname:a,url:Oe(e)}})))}))},l=e.ref([]),c=e=>{Ee({processInstanceId:e}).then((e=>{e.success&&(l.value=e.result.records)}))};return e.onMounted((()=>{r(),Se({flowCode:"dev_cxc_qxj",dataId:n.dataId}).then((e=>{e.success&&c(e.result.processInstanceId)}))})),(t,n)=>{const r=a(e.resolveDynamicComponent("uni-file-picker"),ns);return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"info_box"},[e.createElementVNode("view",{class:"title"}," 申请信息 "),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 请假职工: "),e.createElementVNode("text",null,e.toDisplayString(o.value.username_dictText),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 所属单位: "),e.createElementVNode("text",null,e.toDisplayString(o.value.sysOrgCode_dictText),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 联系方式: "),e.createElementVNode("text",null,e.toDisplayString(o.value.phone),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 请假类型: "),e.createElementVNode("text",null,e.toDisplayString(o.value.type),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 请假开始时间: "),e.createElementVNode("text",null,e.toDisplayString(o.value.begintime),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 请假结束时间: "),e.createElementVNode("text",null,e.toDisplayString(o.value.endtime),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 请假天数: "),e.createElementVNode("text",null,e.toDisplayString(o.value.days),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 审批人: "),e.createElementVNode("text",null,e.toDisplayString(o.value.examineleader_dictText),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 请假地点: "),e.createElementVNode("text",null,e.toDisplayString(o.value.address),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 请假原因: "),e.createElementVNode("text",null,e.toDisplayString(o.value.reason),1)]),e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",null," 附件: "),e.createVNode(r,{modelValue:i.value,"onUpdate:modelValue":n[0]||(n[0]=e=>i.value=e),"image-styles":s},null,8,["modelValue"])])])]),e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"progress"},[e.createElementVNode("view",{class:"title"}," 审批流程 "),e.createElementVNode("view",{class:"progress_box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"box",key:a},[e.createElementVNode("view",{class:"topic f-row aic"},[e.createElementVNode("view",null,e.toDisplayString(t.name),1),e.createElementVNode("view",{class:e.normalizeClass(["status",{complete:"已完成"==t.deleteReason},{refuse:"已拒绝"==t.deleteReason}])},e.toDisplayString(t.deleteReason),3)]),e.createElementVNode("view",{class:"name_time"},e.toDisplayString(t.assigneeName)+" | "+e.toDisplayString(t.endTime),1)])))),128))])])])],64)}}},[["__scopeId","data-v-4dc4d50b"]]),js=A({__name:"processCom",props:{info:{type:Array,default:()=>[]}},setup:t=>(a,n)=>(e.openBlock(),e.createElementBlock("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"info_box"},[e.createElementVNode("view",{class:"title"}," 申请信息 "),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.info,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"",key:a},[e.createElementVNode("view",{class:"info f-row aic jcb"},[e.createElementVNode("view",{class:""},e.toDisplayString(t.title)+": ",1),"事项内容"==t.title?(e.openBlock(),e.createElementBlock("rich-text",{key:0,nodes:t.data},null,8,["nodes"])):(e.openBlock(),e.createElementBlock("text",{key:1},e.toDisplayString(t.data),1))])])))),128))])]))},[["__scopeId","data-v-8f3f5a9f"]]),Us=A({__name:"supervise",props:{dataId:{type:String,default:""}},setup(a){const n=a,i=[{title:"基本信息",id:1},{title:"事项详情",id:2},{title:"添加下级",id:3},{title:"节点顺序",id:4},{title:"运行计划",id:5}],s=e.ref(1),o=e.ref([]),r=()=>{var e;(e={id:n.dataId},d({url:"/cxcdbxt/dbSxxq/queryById",method:"get",data:e})).then((e=>{if(e.success&&(1==s.value&&l(e.result.jbxxid),2==s.value)){let t=e.result;o.value=[{title:"承办部门",data:t.zbdw},{title:"协办部门",data:t.xbdw},{title:"部门领导",data:t.fgld},{title:"办理人员",data:t.dbry},{title:"要求反馈时间",data:t.yqfksj},{title:"节点名称",data:""},{title:"预计完成时间",data:""},{title:"实际反馈时间",data:t.sjfksj},{title:"自评价",data:t.zpj},{title:"发起时间",data:t.fqsj},{title:"序号",data:""},{title:"概述",data:""},{title:"时间进度",data:""},{title:"事项内容",data:t.sxnr}]}}))},l=e=>{var t;(t={id:e},d({url:"/cxcdbxt/dbJbxx/queryById",method:"get",data:t})).then((e=>{if(e.success){let t=e.result;o.value=[{title:"督办分类",data:t.fl},{title:"协办部门",data:t.xbbm},{title:"督办部门",data:t.cbbm},{title:"督办人员",data:t.dbry},{title:"督办部门负责人",data:t.zrr},{title:"是否涉密",data:t.sfsm},{title:"计划完成时间",data:t.jhwcsj},{title:"实际完成时间",data:t.wcsj},{title:"完成状态",data:t.wczt},{title:"备注",data:t.bz},{title:"督办事项",data:t.dbsx},{title:"时间进度",data:t.sjjd}]}}))},c=e.ref([]),u=e=>{t("log","at bpm/supervise.vue:199","000",e),Ee({processInstanceId:e}).then((e=>{t("log","at bpm/supervise.vue:203","0088800",e),e.success&&(c.value=e.result.records)}))};return e.onMounted((()=>{r(),Se({flowCode:"dev_db_sxxq_001",dataId:n.dataId}).then((e=>{e.success&&u(e.result.processInstanceId)}))})),(t,a)=>(e.openBlock(),e.createElementBlock("view",{class:""},[e.createElementVNode("view",{class:"tab f-row aic"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,((t,a)=>e.createElementVNode("view",{class:e.normalizeClass({active:s.value==t.id}),key:a,onClick:e=>{return a=t.id,s.value=a,void r();var a}},e.toDisplayString(t.title),11,["onClick"]))),64))]),e.createVNode(js,{info:o.value},null,8,["info"]),e.createElementVNode("view",{class:"f-col aic"},[e.createElementVNode("view",{class:"progress"},[e.createElementVNode("view",{class:"title"}," 审批流程 "),e.createElementVNode("view",{class:"progress_box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,((t,a)=>(e.openBlock(),e.createElementBlock("view",{class:"box",key:a},[e.createElementVNode("view",{class:"topic f-row aic"},[e.createElementVNode("view",{class:""},e.toDisplayString(t.name),1),e.createElementVNode("view",{class:e.normalizeClass(["status",{complete:"已完成"==t.deleteReason},{refuse:"已拒绝"==t.deleteReason}])},e.toDisplayString(t.deleteReason),3)]),e.createElementVNode("view",{class:"name_time"},e.toDisplayString(t.assigneeName)+" | "+e.toDisplayString(t.endTime),1)])))),128))])])])]))}},[["__scopeId","data-v-c842b888"]]),zs=function(){const t=e.effectScope(!0),a=t.run((()=>e.ref({})));let n=[],i=[];const s=e.markRaw({install(e){w(s),s._a=e,e.provide(k,s),e.config.globalProperties.$pinia=s,i.forEach((e=>n.push(e))),i=[]},use(e){return this._a?n.push(e):i.push(e),this},_p:n,_a:null,_e:t,_s:new Map,state:a});return s}();const{app:Hs,Vuex:qs,Pinia:Js}=function(){const t=e.createVueApp(Fs);return t.use(zs),t.component("leaveApplication",$s),t.component("supervise",Us),t.config.globalProperties.$toast=Ce,{app:t}}();uni.Vuex=qs,uni.Pinia=Js,Hs.provide("__globalStyles",__uniConfig.styles),Hs._component.mpType="app",Hs._component.render=()=>{},Hs.mount("#app")}(Vue);
|