@partex/one-core 1.1.27 → 1.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/one-core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var ct=Object.defineProperty;var it=(o,t,a)=>t in o?ct(o,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[t]=a;var se=(o,t,a)=>(it(o,typeof t!="symbol"?t+"":t,a),a);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),q=require("vue-router"),d=require("naive-ui"),be=require("axios"),ie=require("md5"),W=require("vue-i18n"),U=q.createRouter({history:q.createWebHistory(),routes:[],scrollBehavior:()=>({left:0,top:0})}),ge=document.querySelector("html");U.beforeEach(()=>{ge==null||ge.removeAttribute("style")});const dt=Object.prototype.hasOwnProperty;function ho(o,t){const a=[];for(const s in o){if(!dt.call(o,s))continue;const r=o[s],c=encodeURIComponent(s);let l;typeof r=="object"?l=ho(r,t?t+"["+c+"]":c):l=(t?t+"["+c+"]":c)+"="+encodeURIComponent(r),a.push(l)}return a.join("&")}const{notification:we}=d.createDiscreteApi(["notification"],{configProviderProps:{themeOverrides:{common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}}},notificationProviderProps:{placement:"top"}}),ae=be.create({timeout:3e5,responseType:"json",headers:{platformType:"T1"}});let Ce=be.CancelToken.source();ae.interceptors.request.use(o=>{var a;o.cancelToken=Ce.token;const t=A("token",!1);if(o.headers&&t&&(o.headers["X-Auth-Token"]=t),((a=o.method)==null?void 0:a.toLocaleUpperCase())==="GET"){const s=ho(o.data);s&&(o.url=`${o.url}?${s}`)}return o},o=>Promise.reject(o));ae.interceptors.response.use(o=>{const t=o.data;if(o.config.responseType==="blob"||o.config.responseType==="text")return Promise.resolve(o.data);if(t.ok)return Promise.resolve(t.data);{let a=t.message;return(a.indexOf("Connection refused")>-1||a.indexOf("finishConnect")>-1)&&(a="网络错误,请稍后重试"),we.error({content:a,duration:3e3}),Promise.reject(a)}},o=>{if(o&&o.code==="ECONNABORTED"&&o.config&&o.config.url&&o.config.url.indexOf("auth/user/getCurrentUserInfo")>-1&&(Mo(),U.replace("/custom/500")),o&&o.response)switch(o.response.status){case 401:case 403:re("token"),window.location.href="/login";break;default:return we.destroyAll(),we.error({content:"系统正在维护中,请稍后再试!",duration:3e3}),Promise.reject()}else return Promise.reject()});const ut=()=>{Ce.cancel(),Ce=be.CancelToken.source()},T=e.reactive({needUpdate:!1,download:!1,theme:!1,isMobile:!1,lang:"zh-CN",platformName:"智能效率监测平台",platformType:"T1",platformUrl:"/iot/home/all",platformMainUrl:""});function ke(o){T.download=o}function pt(o){T.lang=o}function oe(o){j("lang",o,0),T.lang=o;const t=document.body;t.dataset.lang=o}function _e(o){T.theme=o;const t=document.body,a=document.querySelector("meta[name=theme-color]");a&&(o?(a.setAttribute("content","#2b2b2d"),t.dataset.theme="dark"):(a.setAttribute("content","#ffffff"),t.dataset.theme=""))}function go(o){T.platformName=o.platformName,T.platformType=o.platformType,T.platformUrl=o.platformUrl,T.platformMainUrl=(o==null?void 0:o.platformMainUrl)||""}function mt(o){T.platformName=o}function ft(o){T.needUpdate=o}const wo=()=>{T.isMobile=window.screen.availWidth<769};window.addEventListener("resize",wo);wo();const ht=()=>x("api/auth/user/logout"),gt=()=>x("api/manager/message/markReadAll"),wt=()=>x("api/auth/user/updateTenantRenewalStatus"),Nt=o=>x("api/manager/job/remove",o),vt=o=>x("api/manager/job/retry",{jobId:o}),Ct=o=>new Promise((t,a)=>{const s=fe(o);x("api/manager/job/page",s).then(r=>{const c=me(r);t(c)}).catch(()=>{a()})}),No=o=>new Promise((t,a)=>{const s=new FormData;s.append("jobType","EXPORT"),Object.keys(o).forEach(r=>{o.query&&r==="query"?s.append("query",JSON.stringify(o.query)):s.append(r,o[r])}),Ie("api/manager/job/submit",s).then(()=>{ke(!0),t()}).catch(r=>{a(r)})}),yt=o=>new Promise((t,a)=>{const s=fe(o);s.status===-1&&(s.status=""),x("api/manager/message/messagePage",s).then(r=>{const c=me(r);t({data:c,unRead:r.unRead})}).catch(()=>{a()})}),bt=o=>x("api/manager/message/markRead",{messageId:o}),ao=o=>{const t=JSON.parse(JSON.stringify(o));return t.password=ie(t.password),x("api/user/v2/login",t)},kt=()=>new Promise((o,t)=>{x("api/auth/user/getCurrentUserInfo",{},"json",1e4).then(a=>{const s=["046459"];a.commissioner=!1,s.includes(String(a.tenantLoginCode))&&(a.commissioner=!0);const r=a.ownedProducts?JSON.parse(a.ownedProducts):[];switch(r.includes(2)?a.platform_tdm=!0:a.platform_tdm=!1,r.includes(3)?a.platform_qms=!0:a.platform_qms=!1,r.includes(4)?a.platform_twin=!0:a.platform_twin=!1,r.includes(5)?a.platform_maintain=!0:a.platform_maintain=!1,r.includes(6)?a.platform_simple_tdm=!0:a.platform_simple_tdm=!1,a.systemType){case"Premium":a.systemType=1;break;case"Flagship":a.systemType=2;break;default:a.systemType=0;break}a.info=JSON.parse(a.info),o(a)}).catch(()=>{t()})});let vo=!0;const u=e.reactive({commissioner:!1,factoryId:"",tenantLoginCode:"",thirdUserId:"",userId:"",email:"",name:"",realName:"",phone:"",description:"",tenantName:"",oeeStatus:0,ncFlg:0,info:{type:0,id:"",viewType:1,interval:5,theme:"light"},kind:0,systemType:0,password:"",enable:!0,platform_tdm:!1,platform_qms:!1,platform_twin:!1,platform_maintain:!1,platform_simple_tdm:!1,authorizationGroupArray:[],authorizationMachineArray:[],iot_menu_authorization:[],tdm_menu_authorization:[],qms_menu_authorization:[],maintain_menu_authorization:[],endTime:0,tenantStatus:1,renewalStatus:0,roleId:1,industryCategory:"0"});function _t(o){vo=o}function Ve(o){const t=window.location.host;if(t.includes("partexiot")){const a=A("token",!1);u.industryCategory=o.industryCategory||"0",!t.includes("vpn")&&vo&&(o.industryCategory==="0"&&t.includes("printing")&&(window.location.href=`https://www.partexiot.cn/auth?auth=${a}`),o.industryCategory==="1"&&!t.includes("printing")&&(window.location.href=`https://printing.partexiot.cn/auth?auth=${a}`))}if(u.commissioner=o.commissioner,u.factoryId=o.factoryId,u.tenantLoginCode=o.tenantLoginCode,u.userId=o.userId,u.email=o.email,u.name=o.name,u.realName=o.realName,u.tenantName=o.tenantName,u.phone=o.phone,u.info=o.info,u.kind=o.kind,u.oeeStatus=o.oeeStatus||0,u.ncFlg=o.ncFlg||0,u.systemType=o.systemType,u.platform_tdm=o.platform_tdm,u.platform_qms=o.platform_qms,u.platform_twin=o.platform_twin,u.platform_maintain=o.platform_maintain,u.platform_simple_tdm=o.platform_simple_tdm,u.authorizationGroupArray=o.authorizationGroupArray||[],u.authorizationMachineArray=o.authorizationMachineArray||[],u.iot_menu_authorization=o.iot_menu_authorization||[],u.tdm_menu_authorization=o.tdm_menu_authorization||[],u.qms_menu_authorization=o.qms_menu_authorization||[],u.maintain_menu_authorization=o.maintain_menu_authorization||[],u.endTime=o.endTime??0,u.tenantStatus=o.tenantStatus??1,u.renewalStatus=o.renewalStatus??0,u.roleId=o.roleId||0,u.kind===1){const a=o.info,s=String(o.info.type);s==="0"&&U.replace(`/dashboard/list?machGroupId=${a.id}&theme=${a.theme||"light"}`),s==="1"&&U.replace(`/dashboard/single?machId=${a.id}&type=${a.viewType??1}&theme=${a.theme||"light"}`),s==="2"&&U.push(`/dashboard/carousel?theme=${a.theme||"light"}`),s==="3"&&U.push(`/dashboard/carouselist?theme=${a.theme||"light"}`),s==="4"&&U.push(`/dashboard/performance?schemeId=${a.id}&theme=${a.theme||"light"}`)}}function de(){return new Promise((o,t)=>{kt().then(a=>{Ve(a),o(a)}).catch(()=>{t()})})}function ue(){u.factoryId="",u.commissioner=!1,u.tenantLoginCode="",u.userId="",u.email="",u.name="",u.realName="",u.tenantName="",u.phone="",u.description="",u.info={type:0,id:"",viewType:1,interval:5,theme:"light"},u.kind=0,u.systemType=0,u.oeeStatus=0,u.ncFlg=0,u.password="",u.enable=!0,u.platform_tdm=!1,u.platform_qms=!1,u.platform_twin=!1,u.platform_maintain=!1,u.platform_simple_tdm=!1,u.authorizationGroupArray=[],u.authorizationMachineArray=[],u.iot_menu_authorization=[],u.tdm_menu_authorization=[],u.qms_menu_authorization=[],u.maintain_menu_authorization=[],u.endTime=0,u.tenantStatus=1,u.renewalStatus=0,u.roleId=1}async function $e(){await ht().catch(()=>null),re("token"),ue(),window.location.href="/login"}const S=(o,t)=>{const a=o.__vccOpts||o;for(const[s,r]of t)a[s]=r;return a},Vt={},$t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},St=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1),Tt=[St];function Bt(o,t){return e.openBlock(),e.createElementBlock("svg",$t,Tt)}const Co=S(Vt,[["render",Bt]]),It={},Dt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pt=e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M8 6h12"}),e.createElementVNode("path",{d:"M6 12h12"}),e.createElementVNode("path",{d:"M4 18h12"})],-1),Et=[Pt];function Mt(o,t){return e.openBlock(),e.createElementBlock("svg",Dt,Et)}const yo=S(It,[["render",Mt]]),xt={},Ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},zt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0z",fill:"currentColor"})],-1),At=[zt];function Rt(o,t){return e.openBlock(),e.createElementBlock("svg",Ot,At)}const bo=S(xt,[["render",Rt]]),Lt={},Ut={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},qt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.53 11.72l-.084-.072a.75.75 0 0 0-.976.072l-2.72 2.72V7.75l-.007-.102A.75.75 0 0 0 12 7l-.102.007a.75.75 0 0 0-.648.743v6.692L8.53 11.72l-.085-.073a.75.75 0 0 0-.976 1.133l4 4.002l.084.072a.75.75 0 0 0 .976-.072l4.001-4l.073-.085a.75.75 0 0 0-.073-.977zM6.25 3A3.25 3.25 0 0 0 3 6.25v11.5A3.25 3.25 0 0 0 6.25 21h11.5A3.25 3.25 0 0 0 21 17.75V6.25A3.25 3.25 0 0 0 17.75 3H6.25zM4.5 6.25c0-.966.784-1.75 1.75-1.75h11.5c.966 0 1.75.784 1.75 1.75v11.5a1.75 1.75 0 0 1-1.75 1.75H6.25a1.75 1.75 0 0 1-1.75-1.75V6.25z",fill:"currentColor"})],-1),jt=[qt];function Ft(o,t){return e.openBlock(),e.createElementBlock("svg",Ut,jt)}const ko=S(Lt,[["render",Ft]]),Gt={},Ht={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Jt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M20.026 17.001c-2.762 4.784-8.879 6.423-13.663 3.661A9.965 9.965 0 0 1 3.13 17.68a.75.75 0 0 1 .365-1.132c3.767-1.348 5.785-2.91 6.956-5.146c1.232-2.353 1.551-4.93.689-8.463a.75.75 0 0 1 .769-.927a9.961 9.961 0 0 1 4.457 1.327c4.784 2.762 6.423 8.879 3.66 13.662z",fill:"currentColor"})],-1),Wt=[Jt];function Kt(o,t){return e.openBlock(),e.createElementBlock("svg",Ht,Wt)}const _o=S(Gt,[["render",Kt]]),Qt={},Xt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Zt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 2a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 2zm5 10a5 5 0 1 1-10 0a5 5 0 0 1 10 0zm4.25.75a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zM12 19a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 19zm-7.75-6.25a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zm-.03-8.53a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 0 1-1.06 1.06l-1.5-1.5a.75.75 0 0 1 0-1.06zm1.06 15.56a.75.75 0 1 1-1.06-1.06l1.5-1.5a.75.75 0 1 1 1.06 1.06l-1.5 1.5zm14.5-15.56a.75.75 0 0 0-1.06 0l-1.5 1.5a.75.75 0 0 0 1.06 1.06l1.5-1.5a.75.75 0 0 0 0-1.06zm-1.06 15.56a.75.75 0 1 0 1.06-1.06l-1.5-1.5a.75.75 0 1 0-1.06 1.06l1.5 1.5z",fill:"currentColor"})],-1),Yt=[Zt];function en(o,t){return e.openBlock(),e.createElementBlock("svg",Xt,Yt)}const Vo=S(Qt,[["render",en]]),on={},tn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},nn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 10a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 3a2 2 0 1 1 0 4a2 2 0 0 1 0-4z",fill:"currentColor"})],-1),an=[nn];function rn(o,t){return e.openBlock(),e.createElementBlock("svg",tn,an)}const $o=S(on,[["render",rn]]),ln={},sn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},cn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})],-1),dn=[cn];function un(o,t){return e.openBlock(),e.createElementBlock("svg",sn,dn)}const So=S(ln,[["render",un]]),pn={},mn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},fn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 4.5a7.5 7.5 0 1 0 7.419 6.392c-.067-.454.265-.892.724-.892c.37 0 .696.256.752.623A9 9 0 1 1 18 5.292V4.25a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-.75.75h-3a.75.75 0 0 1 0-1.5h1.35a7.474 7.474 0 0 0-5.1-2z",fill:"currentColor"})],-1),hn=[fn];function gn(o,t){return e.openBlock(),e.createElementBlock("svg",mn,hn)}const te=S(pn,[["render",gn]]),wn={},Nn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},vn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M17.75 3A3.25 3.25 0 0 1 21 6.25v5.772a6.471 6.471 0 0 0-1.5-.709V8.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.063c.173.534.412 1.037.709 1.5H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h11.5zm0 1.5H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75zm5.25 13a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0zm-5-3a.5.5 0 0 0-1 0v4.793l-1.646-1.647a.5.5 0 0 0-.708.708l2.5 2.5a.5.5 0 0 0 .708 0l2.5-2.5a.5.5 0 0 0-.708-.708L18 19.293V14.5z",fill:"currentColor"})],-1),Cn=[vn];function yn(o,t){return e.openBlock(),e.createElementBlock("svg",Nn,Cn)}const pe=S(wn,[["render",yn]]),bn={},kn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_n=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.5 5.75c0-.69.56-1.25 1.25-1.25h2a.75.75 0 0 0 0-1.5h-2A2.75 2.75 0 0 0 3 5.75v2a.75.75 0 0 0 1.5 0v-2zm0 12.5c0 .69.56 1.25 1.25 1.25h2a.75.75 0 0 1 0 1.5h-2A2.75 2.75 0 0 1 3 18.25v-2a.75.75 0 0 1 1.5 0v2zM18.25 4.5c.69 0 1.25.56 1.25 1.25v2a.75.75 0 0 0 1.5 0v-2A2.75 2.75 0 0 0 18.25 3h-2a.75.75 0 0 0 0 1.5h2zm1.25 13.75c0 .69-.56 1.25-1.25 1.25h-2a.75.75 0 0 0 0 1.5h2A2.75 2.75 0 0 0 21 18.25v-2a.75.75 0 0 0-1.5 0v2z",fill:"currentColor"})],-1),Vn=[_n];function $n(o,t){return e.openBlock(),e.createElementBlock("svg",kn,Vn)}const Sn=S(bn,[["render",$n]]),Tn={},Bn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},In=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})],-1),Dn=[In];function Pn(o,t){return e.openBlock(),e.createElementBlock("svg",Bn,Dn)}const To=S(Tn,[["render",Pn]]),En={},Mn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},xn=e.createElementVNode("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3c7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112s112 50.1 112 112s-50.1 112-112 112z",fill:"currentColor"},null,-1),On=[xn];function zn(o,t){return e.openBlock(),e.createElementBlock("svg",Mn,On)}const Bo=S(En,[["render",zn]]),An={},Rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ln=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M20 4.746a2.75 2.75 0 0 0-2.75-2.75H4.75A2.75 2.75 0 0 0 2 4.746v12.5a2.75 2.75 0 0 0 2.75 2.75h6.666l.105-.42c.096-.384.253-.748.463-1.08H4.75c-.69 0-1.25-.56-1.25-1.25v-12.5c0-.69.56-1.25 1.25-1.25h12.5c.69 0 1.25.56 1.25 1.25v7.113c.437-.4.956-.66 1.5-.781V4.746zm-4 9.608V6.73l-.007-.1A.744.744 0 0 0 15.25 6a.74.74 0 0 0-.75.73v8.541l.007.099c.017.125.067.24.142.337L16 14.355zm-8.507-5.71A.75.75 0 0 0 6.75 8a.748.748 0 0 0-.75.747v6.507l.007.101c.05.365.363.645.743.645c.414 0 .75-.334.75-.746V8.746l-.007-.101zm4.214 2.973a.73.73 0 0 0-.732-.62a.73.73 0 0 0-.725.733l.035 3.547l.008.099a.731.731 0 0 0 .732.62a.73.73 0 0 0 .725-.733l-.035-3.548l-.008-.098zm7.393 1.052l-5.903 5.902a2.686 2.686 0 0 0-.706 1.248l-.458 1.83a1.087 1.087 0 0 0 1.319 1.319l1.83-.458a2.685 2.685 0 0 0 1.248-.706l5.902-5.903A2.286 2.286 0 0 0 19.1 12.67z",fill:"currentColor"})],-1),Un=[Ln];function qn(o,t){return e.openBlock(),e.createElementBlock("svg",Rn,Un)}const Io=S(An,[["render",qn]]),jn={},Fn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Gn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.397 4.554l.073-.084a.75.75 0 0 1 .976-.073l.084.073L12 10.939l6.47-6.47a.75.75 0 1 1 1.06 1.061L13.061 12l6.47 6.47a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073L12 13.061l-6.47 6.47a.75.75 0 0 1-1.06-1.061L10.939 12l-6.47-6.47a.75.75 0 0 1-.072-.976l.073-.084l-.073.084z",fill:"currentColor"})],-1),Hn=[Gn];function Jn(o,t){return e.openBlock(),e.createElementBlock("svg",Fn,Hn)}const ne=S(jn,[["render",Jn]]),Wn={},Kn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Qn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M22 6.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zM17 7l.001 2.504a.5.5 0 1 1-1 0V7h-2.505a.5.5 0 0 1 0-1H16V3.5a.5.5 0 0 1 1 0V6h2.503a.5.5 0 1 1 0 1h-2.502zm2.5 7v-1.732A6.518 6.518 0 0 0 21 11.19v7.56a3.25 3.25 0 0 1-3.066 3.245L17.75 22H6.25a3.25 3.25 0 0 1-3.245-3.066L3 18.75V7.25a3.25 3.25 0 0 1 3.066-3.245L6.25 4h4.248a6.451 6.451 0 0 0-.422 1.5H6.25a1.75 1.75 0 0 0-1.744 1.606L4.5 7.25V14H9a.75.75 0 0 1 .743.648l.007.102a2.25 2.25 0 0 0 4.495.154l.005-.154a.75.75 0 0 1 .648-.743L15 14h4.5zm-15 1.5v3.25a1.75 1.75 0 0 0 1.606 1.744l.144.006h11.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V15.5h-3.825a3.752 3.752 0 0 1-3.475 2.995l-.2.005a3.752 3.752 0 0 1-3.632-2.812l-.043-.188H4.5z",fill:"currentColor"})],-1),Xn=[Qn];function Zn(o,t){return e.openBlock(),e.createElementBlock("svg",Kn,Xn)}const Do=S(Wn,[["render",Zn]]),Yn={},ea={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},oa=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552a6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713a4.25 4.25 0 0 0-8.489 0a.75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087zM22 16.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zm-6-3a.5.5 0 0 1 1 0v4.793l1.646-1.647a.5.5 0 0 1 .708.708l-2.5 2.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 .708-.708L16 18.293V13.5z",fill:"currentColor"})],-1),ta=[oa];function na(o,t){return e.openBlock(),e.createElementBlock("svg",ea,ta)}const Po=S(Yn,[["render",na]]),Se=window.localStorage;function Ne(o,t){Se.setItem(o,JSON.stringify(t))}function ro(o){const t=Se.getItem(o);return t?JSON.parse(t):null}function aa(o){Se.removeItem(o)}function lo(){return Date.parse(String(new Date))}const ra="local-";class la{constructor(t=""){se(this,"namespace");se(this,"mapKey");se(this,"map");this.namespace=t,this.mapKey=ra+this.namespace,this.map=ro(this.mapKey)||{}}set(t,a,s=0){const r=this.getReallyKey(t),c={expires:s,time:lo()};Ne(r,a),this.map[t]=c,Ne(this.mapKey,this.map)}getReallyKey(t){return this.namespace+"-"+t}get(t,a){const s=this.getReallyKey(t),r=this.map[t];if(r){const c=ro(s);if(r.expires>0){if(lo()-r.time<=r.expires)return c===!1||c?c:a;this.delete(t)}else return c===!1||c?c:a}return a}delete(t){const a=this.getReallyKey(t);delete this.map[t],Ne(this.mapKey,this.map),aa(a)}deleteAll(){for(const t in this.map)this.delete(t)}}const Te=new la("partex"),Be="/apiserver/";d.darkTheme.common.cardColor="#32323b";d.darkTheme.common.primaryColor="#b274ef";d.darkTheme.common.primaryColorHover="#b274ef";d.darkTheme.common.borderRadius="16px";d.darkTheme.common.borderRadiusSmall="8px";d.darkTheme.DataTable.tdColor="#2d2d31";const sa={common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}},ca=d.darkTheme;function j(o,t,a=3e4){if(typeof a=="string"){let s=0;const r=a.split(" ");switch(r[1]){case"Minutes":s=6e4;break;case"Hours":s=36e5;break;case"Day":s=864e5;break;case"Week":s=6048e5;break}a=Number(r[0])*s}Te.set(o,t,a)}function A(o,t){return Te.get(o,t)}const re=o=>{Te.delete(o)},Eo=(o=0)=>{const t=document.documentElement;t&&(t.scrollTop=o,setTimeout(()=>{t.scrollTop=o},100))},Mo=()=>{const o=document.querySelectorAll(".partex-loading");o&&o.length>0&&o.forEach(t=>{const a=t.parentNode;a==null||a.removeChild(t)})};function me(o,t=!1){let a=o.records;t&&(a=a.map((r,c)=>({key:c,...r})));const s=parseInt(o.size);return{query:{page:Number(o.current),pageCount:parseInt(o.pages),pageSize:s>29?s:30,itemCount:parseInt(o.total),pageSizes:[30,40,50],showQuickJumper:!0,showSizePicker:!0,pageSlot:8,prefix:()=>e.h("div",{},{default:()=>`共${o.total}条`})},records:a}}function fe(o){if(!o.query)return o;const t={};return o.query.page&&(t.current=o.query.page),o.query.pageSize&&(t.size=o.query.pageSize),o.query.isGetAll&&(t.isGetAll=o.query.isGetAll),o.query.keyword&&(t.keyword=o.query.keyword),o.query.columnKey&&(t.columnKey=o.query.columnKey),o.query.order&&(t.order=o.query.order),{...o,query:t}}const F=(o,t="yyyy-MM-dd")=>{if(!o)return"";typeof o=="string"&&(o=o.replace(/年/g,"-").replace(/月/g,"-").replace(/日/g,""));let a=new Date(o);if(typeof o=="string"&&isNaN(a.getTime())&&(a=new Date(parseInt(o))),isNaN(a.getTime()))return"---";const s={"M+":a.getMonth()+1,"d+":a.getDate(),"h+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(a.getFullYear()+"").substr(4-RegExp.$1.length)));for(const r in s)if(new RegExp("("+r+")").test(t)){let c=s[r];RegExp.$1.length!==1&&(c=("00"+s[r]).substr((""+s[r]).length)),t=t.replace(RegExp.$1,c)}return t},Z=(o,t="default",a,s=!1,r=!1,c)=>o?e.h(d.NButton,{size:"small",type:t,text:!0,disabled:s,loading:r,onClick:a},{default:()=>c||null,icon:()=>e.h(d.NIcon,{},{default:()=>e.h(o,{},{default:()=>null})})}):e.h(d.NButton,{size:"small",type:t,text:!0,disabled:s,loading:r,onClick:a},{default:()=>c||null}),Y=(o,t)=>e.h(d.NTooltip,{},{trigger:()=>o,default:()=>t}),ia=(o,t=!1,a=!1)=>e.h(d.NPopconfirm,{placement:"left","on-positive-click":()=>o()},{default:()=>e.h("span",{},{default:()=>T.lang==="zh-CN"?"删除后无法恢复,是否确认删除?":"Are you sure you want to delete ?"}),trigger:()=>Y(Z(To,"error",void 0,t,a),T.lang==="zh-CN"?"删除":"Delete")}),le=o=>{const t=[];return o.forEach(a=>{a.type==="detail"&&t.push(Y(Z(Bo,"primary",a.onClick,a.disabled,a.loading),T.lang==="zh-CN"?"详情":"Detail")),a.type==="edit"&&t.push(Y(Z(Io,"success",a.onClick,a.disabled,a.loading),T.lang==="zh-CN"?"编辑":"Edit")),a.type==="delete"&&t.push(ia(a.onClick,a.disabled,a.loading)),a.type==="custom"&&t.push(Y(Z(a.icon,a.color,a.onClick,a.disabled,a.loading,a.buttonText),a.text)),a.type==="tips"&&t.push(e.h(d.NPopconfirm,{placement:"left","on-positive-click":()=>a.onClick()},{default:()=>e.h("span",{},{default:()=>a.tips}),trigger:()=>Y(Z(a.icon,a.color,void 0,a.disabled,a.loading,a.buttonText),a.text)}))}),e.h("div",{class:"action-flex"},{default:()=>t})},ee=o=>{try{return window.btoa(encodeURI(JSON.stringify(o)))}catch{return""}},ye=o=>{try{return JSON.parse(decodeURI(window.atob(o)))}catch{return""}},da=(o,t=500)=>{const a=o;let s;const r=function(...l){s||(s=setTimeout(function(){s&&clearTimeout(s),s=void 0,a.apply(r,l)},t))};return r};function ua(o,t){o.requestFullscreen?(t&&(o.onfullscreenchange=t),o.requestFullscreen()):o.mozRequestFullScreen?(t&&(o.onmozfullscreenchange=t),o.mozRequestFullScreen()):o.webkitRequestFullscreen?(t&&(o.onwebkitfullscreenchange=t),o.webkitRequestFullscreen()):o.msRequestFullscreen&&(t&&(o.onmsfullscreenchange=t),o.msRequestFullscreen())}function pa(o,t=0){const a=["","k","m","b","t"],s=Math.floor(Math.log10(Math.abs(o))/3),r=Math.max(0,Math.min(s,a.length-1)),c=a[r];return c?(o/Math.pow(10,r*3)).toFixed(t)+c:(o/Math.pow(10,r*3)).toFixed(0)}const xo=(o,t,a="json")=>ae({url:`${Be}${o}`,method:"GET",data:t,responseType:a}),x=(o,t={},a="json",s=3e5)=>ae({url:`${Be}${o}`,method:"POST",data:t,responseType:a,timeout:s}),Ie=(o,t)=>ae({headers:{"Content-Type":"multipart/form-data"},url:`${Be}${o}`,method:"POST",data:t}),ma=o=>!!(u.kind===-1||u.kind===99||u.iot_menu_authorization.includes(o)),fa=o=>u.platform_tdm?u.kind===-1||u.kind===99||o==="home"?!0:u.tdm_menu_authorization.includes(o):!1,ha=o=>u.platform_qms?u.kind===-1||u.kind===99||o==="home"?!0:u.qms_menu_authorization.includes(o):!1,ga=o=>u.platform_twin?(u.kind===-1||u.kind===99||o==="home",!0):!1,wa=o=>!!(u.kind===-1||u.kind===99||u.maintain_menu_authorization.includes(o)),Na=e.defineComponent({name:"OcTimePickRange",components:{NInputGroup:d.NInputGroup,NTimePicker:d.NTimePicker},props:{value:{required:!0,type:Array,default:()=>[]},format:{required:!1,type:String,default:"HH:mm"},disabled:{required:!1,type:Boolean,default:!1},clearable:{required:!1,type:Boolean,default:!1}},emits:["on-update:value"],setup(o,{emit:t}){const a=e.ref(null),s=e.ref(null),r=l=>{a.value=l,t("on-update:value",[a.value,s.value])},c=l=>{s.value=l,t("on-update:value",[a.value,s.value])};return e.onMounted(()=>{o.value&&(a.value=o.value[0],s.value=o.value[1])}),e.watch(()=>o.value,l=>{l&&(a.value=l[0],s.value=l[1])}),{startTime:a,endTime:s,updateStartValue:r,updateEndValue:c}}}),va=o=>(e.pushScopeId("data-v-8ef98aeb"),o=o(),e.popScopeId(),o),Ca=va(()=>e.createElementVNode("span",{class:"oc-time-picker-separator"},"-",-1));function ya(o,t,a,s,r,c){const l=e.resolveComponent("NTimePicker"),i=e.resolveComponent("NInputGroup");return e.openBlock(),e.createBlock(i,{class:"oc-time-picker"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.startTime,clearable:o.clearable,"on-update:value":o.updateStartValue,format:o.format,disabled:o.disabled},null,8,["value","clearable","on-update:value","format","disabled"]),Ca,e.createVNode(l,{value:o.endTime,clearable:o.clearable,format:o.format,disabled:o.disabled,"on-update:value":o.updateEndValue},null,8,["value","clearable","format","disabled","on-update:value"])]),_:1})}const ba=S(Na,[["render",ya],["__scopeId","data-v-8ef98aeb"]]),ka=e.defineComponent({name:"OcSearchBarItem",components:{NIcon:d.NIcon,NButton:d.NButton,NGrid:d.NGrid,NGridItem:d.NGridItem,NInput:d.NInput,NInputNumber:d.NInputNumber,NSelect:d.NSelect,NTooltip:d.NTooltip,NPopover:d.NPopover,NDataTable:d.NDataTable,NCascader:d.NCascader,NTreeSelect:d.NTreeSelect,NDatePicker:d.NDatePicker,NInputGroup:d.NInputGroup,NInputGroupLabel:d.NInputGroupLabel,OcTimePickRange:ba},props:{cols:{type:Number,default:4},small:{type:Boolean,default:!1}},setup(o,{expose:t}){const a=e.ref({}),s=e.ref(!0),r=e.ref(!0),c=e.ref(0),l=e.ref({}),i=e.ref({}),p=e.ref([{key:"label"}]),N=(g,w,y)=>{const D=y.options.filter(P=>String(P.label).toLocaleLowerCase().indexOf(String(w).toLocaleLowerCase())>-1)||[];l.value[g].options=D,D.length===0?l.value[g].display=!1:l.value[g].display=!0},C=g=>{var P;Object.keys(g).forEach(E=>{const M=g[E];M.show=M.show??!0,M.type==="dropdown"&&(l.value[E]={display:!1,options:M.options}),M.type==="group"&&(M.inputTemp=M.input.options[i.value[E]?i.value[E]:M.options[0].value])});let w=0;const y=o.small?1:o.cols,D=Object.keys(g);if(Object.keys(g).length>0)for(let E=0;E<=y;E++)(P=g[D[E]])!=null&&P.show&&(w=w+1);c.value=y-w>=0?y-w-1:-1,w>y?r.value=!0:r.value=!1,o.small&&(s.value=!1,r.value=!1),a.value=g},v=g=>{l.value[g].options.length===0?l.value[g].display=!1:l.value[g].display=!0},m=()=>{s.value=!s.value};return t({getValues:()=>{const g=JSON.stringify(i.value,(w,y)=>y===void 0?null:y);return JSON.parse(g)},setValues:g=>{i.value=g},dataFactory:C}),{more:r,offset:c,dataList:a,collapsed:s,searchData:i,dropDisplay:l,columnsPopover:p,showMore:m,dropValueChange:N,dropDisplayToggle:v}}}),_a={class:"oc-search-bar-line"},Va={key:0,class:"oc-search-action-more"},$a=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",fill:"currentColor"})])],-1),Sa=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})])],-1);function Ta(o,t,a,s,r,c){const l=e.resolveComponent("NGridItem"),i=e.resolveComponent("NInputGroupLabel"),p=e.resolveComponent("NInput"),N=e.resolveComponent("NInputNumber"),C=e.resolveComponent("NSelect"),v=e.resolveComponent("NDataTable"),m=e.resolveComponent("NPopover"),h=e.resolveComponent("NCascader"),V=e.resolveComponent("NTreeSelect"),g=e.resolveComponent("OcTimePickRange"),w=e.resolveComponent("NDatePicker"),y=e.resolveComponent("NInputGroup"),D=e.resolveComponent("NGrid"),P=e.resolveComponent("NIcon"),E=e.resolveComponent("NButton"),M=e.resolveComponent("NTooltip");return e.openBlock(),e.createElementBlock("div",_a,[e.createVNode(D,{"x-gap":"15","y-gap":"15",cols:o.small?1:o.cols,"collapsed-rows":1,collapsed:o.collapsed},{default:e.withCtx(()=>[o.offset>-1?(e.openBlock(),e.createBlock(l,{key:0,offset:o.offset},null,8,["offset"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dataList,(n,k,R)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${k}_${R}`},[n.show?(e.openBlock(),e.createBlock(l,{key:0},{default:e.withCtx(()=>[n.type!=="group"?(e.openBlock(),e.createBlock(y,{key:0},{default:e.withCtx(()=>{var O;return[e.createVNode(i,{class:"oc-group-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof n.title=="string"?n.title:n.title()),1)]),_:2},1024),n.type==="input"?(e.openBlock(),e.createBlock(p,{key:0,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="number"?(e.openBlock(),e.createBlock(N,{key:1,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),min:n==null?void 0:n.min,max:n==null?void 0:n.max,step:(n==null?void 0:n.step)||1,"show-button":(n==null?void 0:n.showButton)||!0,"update-value-on-input":!1,validator:n==null?void 0:n.validator,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0},e.createSlots({_:2},[n!=null&&n.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n==null?void 0:n.suffix),1)]),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="select"?(e.openBlock(),e.createBlock(C,{key:2,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,"show-checkmark":!1,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),options:n.options,multiple:n.multiple,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="dropdown"?(e.openBlock(),e.createBlock(m,{key:3,width:"trigger",trigger:"manual",style:{padding:"5px"},"show-arrow":!1,show:(O=o.dropDisplay[k])==null?void 0:O.display,"on-clickoutside":()=>{o.dropDisplay[k].display=!1}},{trigger:e.withCtx(()=>[e.createVNode(p,{value:o.searchData[k],disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),clearable:n.clearable??!0,"on-update:value":b=>{o.searchData[k]=b,o.dropValueChange(k,b,n)},onClick:b=>o.dropDisplayToggle(k),onFocus:b=>o.dropDisplayToggle(k)},null,8,["value","disabled","placeholder","clearable","on-update:value","onClick","onFocus"])]),default:e.withCtx(()=>{var b;return[e.createVNode(v,{columns:o.columnsPopover,data:((b=o.dropDisplay[k])==null?void 0:b.options)||[],"max-height":300,bordered:!1,"bottom-bordered":!1,"row-props":G=>({style:"cursor: pointer;",onClick:()=>{o.searchData[k]=G.value,o.dropDisplay[k].display=!1}}),size:"small","virtual-scroll":"",class:"oc-popover-table"},null,8,["columns","data","row-props"])]}),_:2},1032,["show","on-clickoutside"])):e.createCommentVNode("",!0),n.type==="cascader"?(e.openBlock(),e.createBlock(h,{key:4,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),options:n.options,"check-strategy":n.checkStrategy||"all",multiple:n.multiple,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="treeSelect"?(e.openBlock(),e.createBlock(V,{key:5,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),options:n.options,"check-strategy":n.checkStrategy||"all",multiple:n.multiple,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="timePicker"?(e.openBlock(),e.createBlock(g,{key:6,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,"onOnUpdate:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=[...b]},format:n==null?void 0:n.format,clearable:n.clearable??!0},null,8,["value","onUpdate:value","disabled","onOnUpdate:value","format","clearable"])):e.createCommentVNode("",!0),n.type==="datePicker"?(e.openBlock(),e.createBlock(w,{key:7,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),type:n.dateType,format:n==null?void 0:n.format,"is-date-disabled":n==null?void 0:n.isDateDisabled,shortcuts:n==null?void 0:n.shortcuts,"update-value-on-close":n.dateType!=="year","on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"close-on-select":""},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):e.createCommentVNode("",!0)]}),_:2},1024)):e.createCommentVNode("",!0),n.type==="group"?(e.openBlock(),e.createBlock(y,{key:1},{default:e.withCtx(()=>{var O,b,G,K,H,J,$,_,f,I,z,Q,ze,Ae,Re,Le,Ue,qe,je,Fe,Ge,He,Je,We,Ke,Qe,Xe,Ze,Ye,eo,oo,to,no;return[e.createVNode(C,{value:o.searchData[k],"onUpdate:value":B=>o.searchData[k]=B,options:n.options,"show-checkmark":!1,style:e.normalizeStyle(n.width?typeof n.width=="number"?{width:`${n.width}px`}:{width:n.width}:{}),"on-update:value":B=>{n.inputTemp=n.input.options[B],n.inputTemp.type==="datePicker"&&n.inputTemp.dateType.indexOf("range")>-1?o.searchData[n.input.key]=null:o.searchData[n.input.key]="",n.updateValue?n.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=B},class:"oc-group-select",placeholder:" "},null,8,["value","onUpdate:value","options","style","on-update:value"]),((O=n.inputTemp)==null?void 0:O.type)==="input"?(e.openBlock(),e.createBlock(p,{key:0,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,disabled:(b=n.inputTemp)==null?void 0:b.disabled,placeholder:typeof((G=n.inputTemp)==null?void 0:G.placeholder)=="string"?(K=n.inputTemp)==null?void 0:K.placeholder:((H=n.inputTemp)==null?void 0:H.placeholder)&&((J=n.inputTemp)==null?void 0:J.placeholder()),"on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):e.createCommentVNode("",!0),(($=n.inputTemp)==null?void 0:$.type)==="number"?(e.openBlock(),e.createBlock(N,{key:1,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,disabled:(_=n.inputTemp)==null?void 0:_.disabled,placeholder:typeof((f=n.inputTemp)==null?void 0:f.placeholder)=="string"?(I=n.inputTemp)==null?void 0:I.placeholder:((z=n.inputTemp)==null?void 0:z.placeholder)&&((Q=n.inputTemp)==null?void 0:Q.placeholder()),min:(ze=n.inputTemp)==null?void 0:ze.min,max:(Ae=n.inputTemp)==null?void 0:Ae.max,step:((Re=n.inputTemp)==null?void 0:Re.step)||1,"show-button":((Le=n.inputTemp)==null?void 0:Le.showButton)||!0,"update-value-on-input":!1,validator:(Ue=n.inputTemp)==null?void 0:Ue.validator,"on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,style:{flex:"1"}},e.createSlots({_:2},[(qe=n.inputTemp)!=null&&qe.suffix?{name:"suffix",fn:e.withCtx(()=>{var B;return[e.createTextVNode(e.toDisplayString((B=n.inputTemp)==null?void 0:B.suffix),1)]}),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):e.createCommentVNode("",!0),((je=n.inputTemp)==null?void 0:je.type)==="datePicker"?(e.openBlock(),e.createBlock(w,{key:2,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,disabled:(Fe=n.inputTemp)==null?void 0:Fe.disabled,placeholder:typeof((Ge=n.inputTemp)==null?void 0:Ge.placeholder)=="string"?(He=n.inputTemp)==null?void 0:He.placeholder:((Je=n.inputTemp)==null?void 0:Je.placeholder)&&((We=n.inputTemp)==null?void 0:We.placeholder()),type:n.inputTemp.dateType,format:(Ke=n.inputTemp)==null?void 0:Ke.format,"is-date-disabled":(Qe=n.inputTemp)==null?void 0:Qe.isDateDisabled,shortcuts:(Xe=n.inputTemp)==null?void 0:Xe.shortcuts,"update-value-on-close":n.inputTemp.dateType!=="year","on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,"close-on-select":"",style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):e.createCommentVNode("",!0),((Ze=n.inputTemp)==null?void 0:Ze.type)==="select"?(e.openBlock(),e.createBlock(C,{key:3,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,"show-checkmark":!1,disabled:(Ye=n.inputTemp)==null?void 0:Ye.disabled,placeholder:typeof((eo=n.inputTemp)==null?void 0:eo.placeholder)=="string"?(oo=n.inputTemp)==null?void 0:oo.placeholder:((to=n.inputTemp)==null?void 0:to.placeholder)&&((no=n.inputTemp)==null?void 0:no.placeholder()),options:n.inputTemp.options,multiple:n.inputTemp.multiple,"on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0)]}),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["cols","collapsed"]),o.more?(e.openBlock(),e.createElementBlock("div",Va,[e.createVNode(M,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(E,{onClick:o.showMore},{icon:e.withCtx(()=>[o.collapsed?(e.openBlock(),e.createBlock(P,{key:0},{default:e.withCtx(()=>[$a]),_:1})):(e.openBlock(),e.createBlock(P,{key:1},{default:e.withCtx(()=>[Sa]),_:1}))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.more")),1)]),_:1})])):e.createCommentVNode("",!0)])}const Ba=S(ka,[["render",Ta]]),Ia=e.defineComponent({name:"OcSearchBarPop",props:{value:{required:!0,type:Boolean,default:!1}},emits:["on-update:value"],setup(o,{emit:t}){return{close:()=>{t("on-update:value",!1)}}}}),Da={class:"oc-search-bar-pop"},Pa={class:"oc-search-bar-pop-plan"},Ea={class:"oc-search-bar-pop-action"},Ma={class:"oc-search-bar-pop-content"};function xa(o,t,a,s,r,c){return e.withDirectives((e.openBlock(),e.createElementBlock("div",Da,[e.createElementVNode("div",{class:"oc-search-bar-pop-mask",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))}),e.createElementVNode("div",Pa,[e.createElementVNode("div",Ea,[e.renderSlot(o.$slots,"action")]),e.createElementVNode("div",Ma,[e.renderSlot(o.$slots,"default")])])],512)),[[e.vShow,o.value]])}const Oa=S(Ia,[["render",xa]]),za=e.defineComponent({name:"OcSearchBar",components:{NSpace:d.NSpace,NIcon:d.NIcon,NTooltip:d.NTooltip,NButton:d.NButton,NPopover:d.NPopover,OcSearchBarItem:Ba,OcSearchBarPop:Oa},props:{value:{required:!0,type:Object,default:()=>({})},defaultValue:{required:!0,type:Object,default:()=>({})},data:{required:!0,type:Object,default:()=>({})},loading:{type:Boolean,default:!1},cols:{type:Number,default:4},small:{type:Boolean,default:!1},autoSubmit:{type:Boolean,default:!0},cache:{type:Boolean,default:!0},resetButton:{type:Boolean,default:!0}},emits:["update:loading","on-update:value"],setup(o,{emit:t,slots:a,expose:s}){const r=q.useRoute(),c=q.useRouter(),l=e.ref(),i=e.ref({}),p=e.ref(!1),N=e.ref(!!a.header),C=e.ref(!!a.action),v=(g=!1)=>{if(!o.loading&&l.value){const w=l.value.getValues();if(!g&&w.query&&(w.query.page=1),t("update:loading",!0),t("on-update:value",w,g),o.cache){const y=r.path,D=ee(w),P=ee(y);c.replace(`${y}?cursor=${D}&routerId=${P}`)}}},m=()=>{o.loading||(h(JSON.parse(JSON.stringify(o.defaultValue))),v())},h=(g,w=!1)=>{if(l.value&&l.value.setValues(JSON.parse(JSON.stringify(g))),V(o.data),w)c.replace(r.path);else if(o.cache){const y=r.path,D=ee(g),P=ee(y);c.replace(`${y}?cursor=${D}&routerId=${P}`)}},V=g=>{l.value&&l.value.dataFactory(g)};return s({setValues:h,setData:V}),e.onMounted(()=>{setTimeout(()=>{let g=o.value;if(o.cache){const{cursor:w,routerId:y}=r.query;if(w&&y){const D=r.path,P=ye(y),E=ye(w);P===D&&(g=E)}}l.value&&l.value.setValues(JSON.parse(JSON.stringify(g))),l.value&&l.value.dataFactory(o.data),o.autoSubmit&&v(!0)},100)}),e.onBeforeUnmount(()=>{}),{itemRef:l,drawer:p,isSlotHeader:N,isSlotAction:C,headerStore:T,itemData:i,doSearch:v,clearAll:m}}}),Aa={key:0,class:"oc-search-bar-title"},Ra={key:1,class:"oc-search-bar-popover"},La=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",fill:"currentColor"})])],-1),Ua=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})])],-1),qa=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})])],-1),ja={key:0},Fa=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M26 6H4v3.17l7.41 7.42l.59.58V26h4v-2h2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-8l-7.41-7.41A2 2 0 0 1 2 9.17V6a2 2 0 0 1 2-2h22z",fill:"currentColor"}),e.createElementVNode("path",{d:"M29.71 11.29l-3-3a1 1 0 0 0-1.42 0L16 17.59V22h4.41l9.3-9.29a1 1 0 0 0 0-1.42zM19.59 20H18v-1.59l5-5L24.59 15zM26 13.59L24.41 12L26 10.41L27.59 12z",fill:"currentColor"})],-1),Ga={class:"oc-search-bar-center"},Ha=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})])],-1),Ja=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})])],-1);function Wa(o,t,a,s,r,c){const l=e.resolveComponent("OcSearchBarItem"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NSpace"),C=e.resolveComponent("OcSearchBarPop"),v=e.resolveComponent("NTooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["oc-search-bar",{small:!o.isSlotHeader&&(o.small||o.headerStore.isMobile)}]),onKeyup:t[6]||(t[6]=e.withKeys(m=>o.doSearch(!1),["enter"]))},[o.isSlotHeader?(e.openBlock(),e.createElementBlock("span",Aa,[e.renderSlot(o.$slots,"header")])):e.createCommentVNode("",!0),o.small||o.headerStore.isMobile?(e.openBlock(),e.createElementBlock("div",Ra,[e.createVNode(C,{value:o.drawer,"onUpdate:value":t[2]||(t[2]=m=>o.drawer=m),"onOnUpdate:value":t[3]||(t[3]=m=>o.drawer=m)},{action:e.withCtx(()=>[e.createVNode(N,{size:15,justify:"space-between",wrap:!1},{default:e.withCtx(()=>[e.createVNode(p,{onClick:t[0]||(t[0]=m=>o.drawer=!1)},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[La]),_:1})]),_:1}),o.resetButton?(e.openBlock(),e.createBlock(p,{key:0,loading:o.loading,onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Ua]),_:1})]),_:1},8,["loading","onClick"])):e.createCommentVNode("",!0),e.createVNode(p,{loading:o.loading,class:"button-primary",onClick:t[1]||(t[1]=()=>{o.drawer=!1,o.doSearch(!1)})},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[qa]),_:1})]),_:1},8,["loading"])]),_:1}),o.isSlotAction?(e.openBlock(),e.createElementBlock("br",ja)):e.createCommentVNode("",!0),o.isSlotAction?(e.openBlock(),e.createBlock(N,{key:1,size:15,justify:"space-between",class:"oc-search-action"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"action")]),_:3})):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(l,{ref:"itemRef",loading:o.loading,small:""},null,8,["loading"])]),_:3},8,["value"]),e.createVNode(p,{onClick:t[4]||(t[4]=m=>o.drawer=!0)},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Fa]),_:1})]),_:1})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",Ga,[e.createVNode(l,{ref:"itemRef",loading:o.loading,cols:o.cols},null,8,["loading","cols"]),e.createVNode(N,{size:15,wrap:!1,style:{"padding-left":"15px"}},{default:e.withCtx(()=>[e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,class:"button-primary",onClick:t[5]||(t[5]=m=>o.doSearch(!1))},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Ha]),_:1})]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.search")),1)]),_:1}),o.resetButton?(e.openBlock(),e.createBlock(v,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Ja]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.reset")),1)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(N,{size:15,wrap:!1,class:"oc-search-action"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"action")]),_:3})],64))],34)}const Oo=S(za,[["render",Wa]]),Ka=e.defineComponent({name:"HeaderPop",components:{NSpace:d.NSpace,NInput:d.NInput,NPopover:d.NPopover,NTooltip:d.NTooltip,NButton:d.NButton,NIcon:d.NIcon,NDataTable:d.NDataTable,IconSearch:So,IconArrowClockwise:te,IconArrowSquareDown:ko},setup(){const{t:o}=W.useI18n(),t=e.ref(!1),a=d.useNotification(),s=e.ref([]),r=e.ref(""),c=e.ref(!1),l=e.ref({page:1,pageCount:1,pageSize:30}),i=e.ref([{title:()=>o("Common.importer.fileName"),key:"jobName",width:300,render(h){return e.h("div",{},{default:()=>[e.h("p",{},{default:()=>h.jobName||"--"}),e.h("p",{style:{color:"rgba(var(--font), 0.6)"}},{default:()=>F(h.commitTime,"yyyy-MM-dd hh:mm:ss")})]})}},{title:()=>o("Common.importer.status"),key:"jobStatus",align:"center",width:90,render(h){let V=o("Common.processing");return h.jobStatus===1&&(V=o("Common.success")),h.jobStatus===2&&(V=o("Common.failed")),e.h("span",{},{default:()=>V})}},{title:()=>o("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(h){const V=[{type:"delete",onClick:()=>{Nt([h.jobId]).then(()=>{a.success({content:()=>o("Notice.success"),duration:3e3}),v()}).catch(()=>{a.error({content:()=>o("Notice.error"),duration:3e3})})}}];return h.jobStatus===2?V.unshift({type:"custom",onClick:()=>{vt(h.jobId).then(()=>{a.success({content:()=>o("Notice.success"),duration:3e3}),v()}).catch(()=>{a.error({content:()=>o("Notice.error"),duration:3e3})})},icon:te,color:"info",text:o("Common.importer.retry")}):V.unshift({type:"custom",disabled:h.jobStatus!==1,onClick:()=>{window.open(h.downloadUrl)},icon:pe,color:"success",text:o("Common.importer.btnDownload")}),le(V)}}]),p=h=>{l.value.page=h,v()},N=h=>{l.value.pageSize=h,l.value.page=1,v()},C=()=>{l.value.page=1,v()},v=()=>{c.value||(c.value=!0,Ct({jobType:"EXPORT",jobName:r.value,query:l.value}).then(h=>{l.value=h.query,s.value=h.records,c.value=!1}).catch(()=>{c.value=!1}))},m=h=>{ke(h),t.value=h};return v(),e.watch(()=>T.download,h=>{t.value=h,h&&v()}),{jobName:r,loading:c,columns:i,coldata:s,query:l,popDownload:t,init:v,pageChange:p,pageSizeChange:N,doSearch:C,popDownloadUpdate:m}}}),Qa={class:"header-download"};function Xa(o,t,a,s,r,c){const l=e.resolveComponent("IconArrowSquareDown"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NInput"),C=e.resolveComponent("IconSearch"),v=e.resolveComponent("NTooltip"),m=e.resolveComponent("IconArrowClockwise"),h=e.resolveComponent("NSpace"),V=e.resolveComponent("NDataTable"),g=e.resolveComponent("NPopover");return e.openBlock(),e.createBlock(g,{trigger:"click",placement:"bottom-end",show:o.popDownload,"show-arrow":!1,"on-update:show":o.popDownloadUpdate,style:{width:"650px"}},{trigger:e.withCtx(()=>[e.createVNode(p,{text:"",style:{"margin-left":"15px"}},{icon:e.withCtx(()=>[e.createVNode(i,{class:"com-header-icon"},{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(h,{justify:"end"},{default:e.withCtx(()=>[e.createElementVNode("span",Qa,e.toDisplayString(o.$t("Common.validDays")),1),e.createVNode(N,{value:o.jobName,"onUpdate:value":t[0]||(t[0]=w=>o.jobName=w),type:"text",clearable:"",placeholder:o.$t("Common.importer.fileName")},null,8,["value","placeholder"]),e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,class:"button-primary",onClick:o.doSearch},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(C)]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.search")),1)]),_:1}),e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(m)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1})]),_:1}),e.createVNode(V,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1},8,["show","on-update:show"])}const Za=S(Ka,[["render",Xa]]),Ya=e.defineComponent({name:"HeaderPop",components:{NBadge:d.NBadge,NPopover:d.NPopover,NSpace:d.NSpace,NTooltip:d.NTooltip,NButton:d.NButton,NIcon:d.NIcon,NDataTable:d.NDataTable,NRadioGroup:d.NRadioGroup,NRadioButton:d.NRadioButton,IconAlert:Co,IconClear:yo,IconArrowClockwise:te},setup(){const{t:o}=W.useI18n(),t=e.ref(0),a=e.ref(0),s=e.ref([]),r=e.ref(""),c=e.ref(!1),l=e.ref({page:1,pageCount:1,pageSize:30}),i=e.ref([{title:()=>o("Common.message.title2"),key:"messageContent",width:300,render(h){return[e.h("div",{class:h.status===1?"card-grey-txt":""},{default:()=>h.messageContent}),e.h("div",{class:"card-grey-txt"},{default:()=>F(h.createTime,"yyyy-MM-dd hh:mm:ss")})]}},{title:()=>o("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(h){return h.status===0?le([{type:"custom",color:"primary",text:o("Common.message.read"),buttonText:o("Common.message.read"),onClick:()=>{bt(h.messageId).then(()=>{m()}).catch(()=>{m()})}}]):e.h("div",{},{default:()=>`${h.updateByName} ${o("Common.message.read")}`})}}]),p=h=>{l.value.page=1,t.value=h,m()},N=()=>{gt().then(()=>{m()}).catch(()=>{m()})},C=h=>{l.value.page=h,m()},v=h=>{l.value.pageSize=h,l.value.page=1,m()},m=()=>{c.value||(c.value=!0,yt({status:t.value,query:l.value}).then(h=>{a.value=h.unRead,l.value=h.data.query,s.value=h.data.records,c.value=!1}).catch(()=>{c.value=!1}))};return m(),{badge:a,radios:t,jobName:r,loading:c,columns:i,coldata:s,query:l,clearAll:N,pageChange:C,pageSizeChange:v,init:m,radiosChecked:p}}}),er={class:"com-title"};function or(o,t,a,s,r,c){const l=e.resolveComponent("IconAlert"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NBadge"),C=e.resolveComponent("NRadioButton"),v=e.resolveComponent("NRadioGroup"),m=e.resolveComponent("IconClear"),h=e.resolveComponent("NTooltip"),V=e.resolveComponent("IconArrowClockwise"),g=e.resolveComponent("NSpace"),w=e.resolveComponent("NDataTable"),y=e.resolveComponent("NPopover");return e.openBlock(),e.createBlock(y,{trigger:"click",placement:"bottom-end","show-arrow":!1,style:{width:"650px"}},{trigger:e.withCtx(()=>[e.createVNode(N,{value:o.badge,max:99},{default:e.withCtx(()=>[e.createVNode(p,{text:"",style:{"margin-left":"30px"}},{icon:e.withCtx(()=>[e.createVNode(i,{class:"com-header-icon"},{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),_:1})]),_:1},8,["value"])]),default:e.withCtx(()=>[e.createVNode(g,{justify:"space-between"},{default:e.withCtx(()=>[e.createElementVNode("div",er,e.toDisplayString(o.$t("Common.message.title")),1),e.createVNode(v,{value:o.radios,"onUpdate:value":t[0]||(t[0]=D=>o.radios=D),name:"radios","on-update:value":o.radiosChecked},{default:e.withCtx(()=>[e.createVNode(C,{key:"0",value:0,label:o.$t("Common.message.unRead")},null,8,["label"]),e.createVNode(C,{key:"-1",value:-1,label:o.$t("Common.message.all")},null,8,["label"]),e.createVNode(C,{key:"1",value:1,label:o.$t("Common.message.read")},null,8,["label"])]),_:1},8,["value","on-update:value"]),e.createElementVNode("div",null,[e.createVNode(h,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(m)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.message.readAll")),1)]),_:1}),e.createVNode(h,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(V)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1})])]),_:1}),e.createVNode(w,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1})}const tr=S(Ya,[["render",or]]),nr=e.defineComponent({name:"OcHeader",components:{Pop:Za,Message:tr,NDropdown:d.NDropdown,NMenu:d.NMenu,NIcon:d.NIcon,NButton:d.NButton,NDrawer:d.NDrawer,NDrawerContent:d.NDrawerContent,NCard:d.NCard,IconWeatherSunny:Vo,IconWeatherMoon:_o,IconGridDots:$o,IconDismiss:ne},props:{qiankun:{type:Boolean,default:!1},mainUrl:{type:String,default:"https://www.partexiot.cn"},language:{type:Boolean,default:!1},report:{type:Boolean,default:!1},menuOptions:{required:!0,type:Array,default:()=>[]}},setup(o){const{t}=W.useI18n(),a=q.useRoute(),s=q.useRouter(),r=d.useNotification(),c=e.ref(""),l=e.ref("/iot/home"),i=e.ref(!1),p=e.ref(!1),N=e.ref(void 0),C=e.ref(10),v=e.ref([]),m=e.ref(""),h=e.ref(A("lang","zh-CN")),V=f=>{i.value=f,_e(f),j("theme",f,0)},g=f=>{const I=f.split("/");l.value=`/${I[1]}/${I[2]}`,Eo()},w=f=>{f.disabled||(g(f.key),s.push(f.key))},y=f=>{if(!f.disabled){if(f.children)return;g(f.key),s.push(f.key),p.value=!1}},D=f=>e.h("div",{onClick:()=>w(f)},{default:()=>f.label}),P=f=>e.h("div",{onClick:()=>y(f)},{default:()=>f.label}),E=f=>f.icon?e.h(d.NIcon,{size:24,onClick:()=>w(f)},{default:()=>f.icon&&f.icon()}):!1,M=f=>{o.qiankun?window.location.href=`${o.mainUrl||"https://www.partexiot.cn"}${f}`:s.replace(f)},n=()=>{p.value=!1},k=()=>{let f=T.platformMainUrl||T.platformUrl;T.platformMainUrl==="auto"&&(u.industryCategory==="0"?f="https://www.partexiot.cn":u.industryCategory==="1"&&(f="https://printing.partexiot.cn"));const I=[{label:t("Platform.iot"),key:f}];return u.platform_tdm&&I.push({label:t("Platform.tdm"),key:"/tdm/home"}),u.platform_qms&&I.push({label:t("Platform.qms"),key:"/qms/home"}),u.platform_twin&&I.push({label:t("Platform.twin"),key:"/twin/home"}),u.platform_maintain&&I.push({label:t("Platform.maintain"),key:"/maintain/home"}),I},R=()=>{const f=[{label:u.tenantName,key:"tenantName"}];return f.push({label:`主题 ${i?"亮":"暗"}`,key:"theme"},{label:`语言 ${h.value==="zh-CN"?"EN":"中文"}`,key:"language"}),f.push({label:t("Common.dropdownMenu.software"),key:"app",children:[{label:t("Common.dropdownMenu.android"),key:"android"},{label:t("Common.dropdownMenu.ios"),key:"ios"},{label:t("Common.dropdownMenu.chrome"),key:"chrome"},{label:t("Common.dropdownMenu.edge"),key:"edge"},{label:t("Common.dropdownMenu.dashboard_IoT"),key:"dashboard_IoT"},{label:t("Common.dropdownMenu.dashboard_Prt"),key:"dashboard_Prt"}]}),o.report&&f.push({label:t("Common.dropdownMenu.report"),key:"report"}),f.push({label:t("Common.dropdownMenu.info"),key:"info"},{label:t("Common.dropdownMenu.logout"),key:"logout"}),f},O=async f=>{f==="logout"&&$e(),f==="theme"&&V(!i.value),f==="language"&&H(),f==="info"&&s.push("/custom/my"),f==="report"&&s.push("/custom/report"),f==="android"&&window.open("http://miiot.partexiot.cn/dk7u"),f==="ios"&&window.open("https://apps.apple.com/cn/app/id1587313547"),f==="chrome"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/chrome_installer.exe"),f==="edge"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/MicrosoftEdgeSetup.exe"),f==="dashboard_IoT"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94IoT_v1.2.0.zip"),f==="dashboard_Prt"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94%E5%8D%B0%E5%88%B7%E7%89%88_v1.2.0.zip")},b=()=>{wt().then(()=>{r.success({content:"续订请求已发送,七个工作日内将会有专人联系",duration:3e3})}).catch(()=>{r.error({content:()=>t("Notice.error"),duration:3e3})})},G=()=>{if(u.tenantStatus===0&&u.renewalStatus===0){const f=document.getElementById("app");f&&f.classList.add("outrange"),r.info({action:()=>e.h(d.NSpace,{size:[15,15]},{default:()=>e.h(d.NButton,{class:"button-primary","on-click":()=>{b()}},{default:()=>"立即续订"})}),closable:!1,content:`您的订阅已于${F(u.endTime)}到期,如需继续使用请联系我们`,title:"到期提示"})}if(u.tenantStatus===2&&u.renewalStatus===0){let f=`您的订阅即将于${F(u.endTime)}到期,请联系管理员进行续订`,I=[e.h(d.NButton,{secondary:!0,"on-click":()=>{r.destroyAll()}},{default:()=>"了解"})];u.kind===99&&(f=`您的订阅即将于${F(u.endTime)}到期,为保证持续有效的提供服务请立即续订`,I=[e.h(d.NButton,{secondary:!0,"on-click":()=>{r.destroyAll()}},{default:()=>"稍后提示我"}),e.h(d.NButton,{class:"button-primary","on-click":()=>{b()}},{default:()=>"立即续订"})]),r.info({action:()=>e.h(d.NSpace,{size:[15,15]},{default:()=>I}),closable:!1,content:f,title:"温馨提示"})}},K=()=>{s.push(T.platformUrl)},H=()=>{h.value=h.value==="zh-CN"?"en-US":"zh-CN",oe(h.value)},J=()=>{c.value=t("Platform.iot"),a.path.indexOf("tdm")>-1&&(c.value=t("Platform.tdm")),a.path.indexOf("qms")>-1&&(c.value=t("Platform.qms")),a.path.indexOf("twin")>-1&&(c.value=t("Platform.twin")),a.path.indexOf("maintain")>-1&&(c.value=t("Platform.maintain")),mt(c.value)},$=A("theme",!1);V($),"backdropFilter"in document.documentElement.style||"WebkitBackdropFilter"in document.documentElement.style||document.body.classList.add("not-support-backdrop");const _=()=>{if(u.tenantStatus===0){const f=document.body;f&&f.classList.add("outrange")}};return e.onMounted(()=>{oe(h.value),G(),g(a.path),J(),_(),v.value=k()}),e.watch(()=>T.isMobile,()=>{window.screen.availWidth<=1300&&window.screen.availWidth>=1030?m.value="tiny-menu":window.screen.availWidth<769?m.value="hide-menu":m.value=""}),e.watch(()=>T.lang,()=>{J()}),e.watch(()=>a.path,f=>{g(f),_()}),e.watch(()=>T.needUpdate,f=>{if(f){N.value=setInterval(()=>{C.value=C.value-1,C.value<=0&&(clearInterval(window.versionMonitor),clearInterval(N.value),N.value=void 0,I.destroy())},1e3);const I=r.create({title:"检测到系统有新版本需要更新",content:()=>`是否立即更新?更新需要重新加载页面,请确保所有项目都已经保存完毕。${C.value}秒后自动关闭`,meta:F(new Date,"yyyy-MM-dd hh:mm:ss"),onClose:()=>{clearInterval(window.versionMonitor)},action:()=>e.h(d.NSpace,{justify:"space-between"},{default:()=>[e.h(d.NButton,{quaternary:!0,onClick:()=>{clearInterval(window.versionMonitor),I.destroy()}},{default:()=>"稍后"}),e.h(d.NButton,{type:"primary",onClick:()=>{window.location.reload()}},{default:()=>"更新"})]})})}}),{userStore:u,headerStore:T,theme:i,activeMenu:l,lang:h,platformName:c,platformOption:v,showMenu:p,menuType:m,changeLang:H,setDropdownMenu:R,renderMenuLabel:D,renderMenuLabel2:P,renderMenuIcon:E,indexClick:K,platformClick:M,dropdownClick:O,changeTheme:V,closeModel:n}}}),ar={class:"oc-header"},rr={class:"menu"},lr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 160h352"}),e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 256h352"}),e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 352h352"})],-1),sr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M17.754 14a2.249 2.249 0 0 1 2.249 2.25v.918a2.75 2.75 0 0 1-.513 1.598c-1.545 2.164-4.07 3.235-7.49 3.235c-3.421 0-5.944-1.072-7.486-3.236a2.75 2.75 0 0 1-.51-1.596v-.92A2.249 2.249 0 0 1 6.251 14h11.502zM12 2.005a5 5 0 1 1 0 10a5 5 0 0 1 0-10z",fill:"currentColor"})])],-1);function cr(o,t,a,s,r,c){const l=e.resolveComponent("IconGridDots"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NDropdown"),C=e.resolveComponent("NMenu"),v=e.resolveComponent("Pop"),m=e.resolveComponent("Message"),h=e.resolveComponent("IconWeatherMoon"),V=e.resolveComponent("IconWeatherSunny"),g=e.resolveComponent("NDrawerContent"),w=e.resolveComponent("NDrawer");return e.openBlock(),e.createElementBlock("header",ar,[o.platformOption.length>1?(e.openBlock(),e.createBlock(N,{key:0,trigger:"hover",placement:"bottom-start",size:"huge",options:o.platformOption,onSelect:o.platformClick},{default:e.withCtx(()=>[e.createVNode(p,{style:{padding:"0 14px 0 0"}},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),_:1})]),_:1},8,["options","onSelect"])):e.createCommentVNode("",!0),e.createElementVNode("a",{href:"javascript:;",class:"logo",onClick:t[0]||(t[0]=(...y)=>o.indexClick&&o.indexClick(...y))}),e.createElementVNode("a",{href:"javascript:;",class:"platform-txt",onClick:t[1]||(t[1]=(...y)=>o.indexClick&&o.indexClick(...y))}," | "+e.toDisplayString(o.platformName),1),e.createElementVNode("div",rr,[e.createVNode(C,{value:o.activeMenu,"onUpdate:value":t[2]||(t[2]=y=>o.activeMenu=y),mode:"horizontal",options:o.menuOptions,"render-icon":o.renderMenuIcon,"render-label":o.renderMenuLabel,class:e.normalizeClass(["header-menu",o.menuType])},null,8,["value","options","render-icon","render-label","class"]),o.headerStore.isMobile?(e.openBlock(),e.createBlock(p,{key:0,onClick:t[3]||(t[3]=y=>o.showMenu=!0)},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[lr]),_:1})]),_:1})):e.createCommentVNode("",!0),o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:1})),o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:2})),o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(p,{key:3,style:{"margin-left":"15px"},onClick:t[4]||(t[4]=y=>o.changeTheme(!o.theme))},{icon:e.withCtx(()=>[e.withDirectives(e.createVNode(i,{color:"#8e54c8"},{default:e.withCtx(()=>[e.createVNode(h)]),_:1},512),[[e.vShow,o.theme]]),e.withDirectives(e.createVNode(i,{color:"#f2a651"},{default:e.withCtx(()=>[e.createVNode(V)]),_:1},512),[[e.vShow,!o.theme]])]),_:1})),o.language&&!o.headerStore.isMobile?(e.openBlock(),e.createBlock(p,{key:4,class:"com-header-icon",onClick:o.changeLang},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.lang==="zh-CN"?"EN":"中文"),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(N,{trigger:"click",placement:"bottom-end",options:o.setDropdownMenu(),onSelect:o.dropdownClick},{default:e.withCtx(()=>[e.createVNode(p,{text:"",class:"user",title:o.userStore.name},e.createSlots({default:e.withCtx(()=>[o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.userStore.name),1)],64))]),_:2},[o.headerStore.isMobile?{name:"icon",fn:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[sr]),_:1})]),key:"0"}:void 0]),1032,["title"])]),_:1},8,["options","onSelect"])]),e.createVNode(w,{show:o.showMenu,"onUpdate:show":t[6]||(t[6]=y=>o.showMenu=y)},{default:e.withCtx(()=>[e.createVNode(g,{title:o.platformName,"native-scrollbar":!1,closable:""},{default:e.withCtx(()=>[e.createVNode(C,{value:o.activeMenu,"onUpdate:value":t[5]||(t[5]=y=>o.activeMenu=y),"default-expand-all":!0,options:o.menuOptions,"render-label":o.renderMenuLabel2},null,8,["value","options","render-label"])]),_:1},8,["title"])]),_:1},8,["show"])])}const zo=S(nr,[["render",cr]]),ir=e.defineComponent({name:"OcFooter",props:{version:{type:String,default:""}}}),dr={class:"footer"},ur=e.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),pr=e.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"footer-record"}," 沪ICP备 18025935号-3 ",-1);function mr(o,t,a,s,r,c){return e.openBlock(),e.createElementBlock("footer",dr,[e.createTextVNode(" Copyright "),ur,e.createTextVNode(" 2020-2024 "+e.toDisplayString(o.$t("Common.title"))+" ",1),o.version?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("v"+e.toDisplayString(o.version)+" ",1)],64)):e.createCommentVNode("",!0),pr])}const Ao=S(ir,[["render",mr]]),fr=e.defineComponent({name:"OcBack",components:{IconChevronLeft:bo,NButton:d.NButton,NIcon:d.NIcon},props:{to:{type:String,default:""}},setup(o){const t=q.useRouter();return{back:()=>{o.to?t.push(o.to):t.back()}}}});function hr(o,t,a,s,r,c){const l=e.resolveComponent("IconChevronLeft"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton");return e.openBlock(),e.createBlock(p,{text:"",onClick:o.back},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(o.$t("Common.back")),1)]),_:1},8,["onClick"])}const Ro=S(fr,[["render",hr]]),Lo=o=>{const t=new FormData;return Object.keys(o).forEach(a=>{o.query&&a==="query"?t.append("query",JSON.stringify(o.query)):t.append(a,o[a])}),Ie("api/manager/job/submit",t)},gr=o=>new Promise((t,a)=>{const s=fe(o);x("api/manager/job/page",s).then(r=>{const c=me(r);t(c)}).catch(()=>{a()})}),wr=(o,t={})=>xo(o,t,"blob"),Nr=e.defineComponent({name:"OcImporter",components:{IconDismiss:ne,IconArrowClockwise:te,IconMailInboxAdd:Do,IconCloudArrowDown:Po,NModal:d.NModal,NCard:d.NCard,NSpace:d.NSpace,NUpload:d.NUpload,NButton:d.NButton,NTooltip:d.NTooltip,NIcon:d.NIcon,NDataTable:d.NDataTable},props:{show:{required:!0,type:Boolean,default:!1},type:{required:!0,type:String,default:""},params:{required:!1,type:String,default:""},file:{required:!0,type:String,default:""},steam:{type:Boolean,default:!1}},emits:["update:show"],setup(o,{emit:t}){const{t:a}=W.useI18n(),s=d.useNotification(),r=e.ref(!1),c=e.ref(!1),l=e.ref({page:1,pageCount:1,pageSize:30}),i=e.ref([{title:"#",width:60,align:"center",key:"index",render(g,w){return e.h("span",{},{default:()=>w+1})}},{title:a("Common.importer.fileName"),key:"jobName",fixed:"left"},{title:a("Common.importer.status"),key:"jobStatus",width:120,render(g){let w=a("Common.processing");return g.jobStatus===1&&(w=a("Common.success")),g.jobStatus===2&&(w=a("Common.failed")),e.h("span",{},{default:()=>w})}},{title:a("Common.importer.createTime"),key:"commitTime",width:200,render(g){return e.h("div",{},{default:()=>F(g.commitTime,"yyyy-MM-dd hh:mm:ss")})}},{title:a("Common.action"),key:"action",align:"center",fixed:"right",width:120,render(g){return le([{type:"custom",disabled:g.jobStatus===0,onClick:()=>{window.open(g.downloadUrl)},icon:pe,color:"success",text:a("Common.importer.btnDownload")}])}}]),p=e.ref([]),N=()=>{t("update:show",!1)},C=g=>{l.value.page=g,h()},v=g=>{l.value.pageSize=g,l.value.page=1,h()},m=g=>new Promise((w,y)=>{g.file.file&&Lo({jobType:"IMPORT",jobTypeName:o.type,jobParams:o.params,file:g.file.file}).then(()=>{h(),w()}).catch(()=>{h(),y()}),y()}),h=()=>{c.value=!0,gr({jobType:"IMPORT",jobTypeName:o.type,query:l.value}).then(g=>{c.value=!1,p.value=g.records,l.value=g.query}).catch(()=>{c.value=!1})},V=()=>{o.steam?wr(o.file).then(g=>{const w=document.createElement("a");w.style.display="none",w.download="刀组品号导入模板.xls",w.href=URL.createObjectURL(g),document.body.appendChild(w),w.click(),URL.revokeObjectURL(w.href),document.body.removeChild(w)}).catch(()=>{s.error({content:()=>a("Notice.error"),duration:3e3})}):window.open(`${o.file}?v=${Date.now()}`)};return e.watch(()=>o.show,g=>{r.value=g,g&&(l.value={page:1,pageCount:1,pageSize:30},h())}),{modal:r,columns:i,coldata:p,query:l,loading:c,init:h,closeModel:N,pageChange:C,pageSizeChange:v,beforeUpload:m,downloadFile:V}}}),vr={class:"header-download"};function Cr(o,t,a,s,r,c){const l=e.resolveComponent("IconMailInboxAdd"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NUpload"),C=e.resolveComponent("IconCloudArrowDown"),v=e.resolveComponent("IconArrowClockwise"),m=e.resolveComponent("NTooltip"),h=e.resolveComponent("IconDismiss"),V=e.resolveComponent("NSpace"),g=e.resolveComponent("NDataTable"),w=e.resolveComponent("NCard"),y=e.resolveComponent("NModal");return e.openBlock(),e.createBlock(y,{show:o.modal,"onUpdate:show":t[0]||(t[0]=D=>o.modal=D),"on-mask-click":o.closeModel},{default:e.withCtx(()=>[e.createVNode(w,{style:{width:"900px"}},{header:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.importer.title"))+" ",1),e.createElementVNode("span",vr,e.toDisplayString(o.$t("Common.validDays")),1)]),"header-extra":e.withCtx(()=>[e.createVNode(V,{justify:"end"},{default:e.withCtx(()=>[e.createVNode(N,{"on-before-upload":o.beforeUpload,accept:".xlsx,.xls","show-file-list":!1},{default:e.withCtx(()=>[e.createVNode(p,null,{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.importer.file")),1)]),_:1})]),_:1},8,["on-before-upload"]),e.renderSlot(o.$slots,"default"),e.createVNode(p,{onClick:o.downloadFile},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(C)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.importer.download")),1)]),_:1},8,["onClick"]),e.createVNode(m,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(v)]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1}),e.createVNode(p,{quaternary:"",onClick:o.closeModel},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(h)]),_:1})]),_:1},8,["onClick"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(g,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":"500","max-height":"500","scroll-x":"600",remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:3})]),_:3},8,["show","on-mask-click"])}const Uo=S(Nr,[["render",Cr]]),yr=e.defineComponent({name:"OcLogin",components:{NTabs:d.NTabs,NTabPane:d.NTabPane,NForm:d.NForm,NFormItem:d.NFormItem,NDropdown:d.NDropdown,NInput:d.NInput,NButton:d.NButton,NGrid:d.NGrid,NGi:d.NGi,NPopover:d.NPopover},props:{platform:{required:!1,type:String,default:"智能效率监测平台"},version:{type:String,default:""},info:{required:!1,type:Object,default:()=>({href:"",text:""})}},setup(){const{t:o}=W.useI18n(),t=e.ref(A("lang","zh-CN")),a=d.useNotification(),s=q.useRouter(),r=e.ref("1"),c=e.ref(),l=e.ref(),i=e.ref(),p=e.ref(),N=e.ref(!1),C=e.ref(!1),v=e.ref(!1),m=e.ref({phone:"",name:"",password:""}),h=e.ref({name:{required:!0,message:()=>o("Common.login.userNameMessage"),trigger:"blur"},phone:{required:!0,validator:($,_)=>_?/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(_):!1,message:()=>o("Common.login.mobileMessage"),trigger:"blur"},password:{required:!0,message:()=>o("Common.login.passwordMessage"),trigger:"input"}}),V=e.ref([]),g=e.ref([]),w=e.ref([]),y=e.ref([]),D=()=>{const $=A("loginOption",{}),_=[];Object.keys($).forEach(f=>{_.push({label:f,key:f})}),V.value=_,g.value=_},P=()=>{const $=A("phoneOption",{}),_=[];Object.keys($).forEach(f=>{_.push({label:f,key:f})}),w.value=_,y.value=_},E=$=>{j("token",$,0),de().then(_=>{a.success({content:()=>o("Notice.success"),duration:3e3}),_.kind!==1&&s.replace(T.platformUrl)}).catch(()=>{a.error({content:()=>o("Notice.error"),duration:3e3}),m.value.password="",N.value=!1})},M=()=>{var $,_;N.value||(N.value=!0,r.value==="0"?($=l.value)==null||$.validate(f=>{f?N.value=!1:ao({type:r.value,...m.value}).then(I=>{const z=A("loginOption",{});z[m.value.name]=!0,j("loginOption",z,0),E(I)}).catch(()=>{m.value.password="",N.value=!1})}):(_=c.value)==null||_.validate(f=>{f?N.value=!1:ao({type:r.value,...m.value}).then(I=>{const z=A("phoneOption",{});z[m.value.name]=!0,j("phoneOption",z,0),E(I)}).catch(()=>{m.value.password="",N.value=!1})}))},n=$=>{m.value.name=$;const _=g.value.filter(f=>f.label.indexOf($)>-1);V.value=_,_.length===0?v.value=!1:v.value=!0},k=$=>{m.value.name=$,v.value=!1,i.value.focus(),setTimeout(()=>{var _;(_=l.value)==null||_.restoreValidation()},80)},R=$=>{var _;V.value.length===0?v.value=!1:v.value=$,(_=l.value)==null||_.restoreValidation()},O=$=>{m.value.phone=$;const _=y.value.filter(f=>f.label.indexOf($)>-1);w.value=_,_.length===0?C.value=!1:C.value=!0},b=$=>{m.value.phone=$,C.value=!1,p.value.focus(),setTimeout(()=>{var _;(_=c.value)==null||_.restoreValidation()},80)},G=$=>{var _;w.value.length===0?C.value=!1:C.value=$,(_=c.value)==null||_.restoreValidation()},K=$=>{var _,f;r.value=$,m.value={phone:"",name:"",password:""},(_=l.value)==null||_.restoreValidation(),(f=c.value)==null||f.restoreValidation()},H=$=>e.h("div",{style:{position:"relative"}},{default:()=>[e.h("div",{},{default:()=>$.label}),e.h(ne,{class:"login-drop-menu",onclick:_=>{_.stopPropagation(),_.stopImmediatePropagation();const f=A("loginOption",{});delete f[$.label],j("loginOption",f,0),D();const I=m.value.name,z=g.value.filter(Q=>Q.label.indexOf(I)>-1);V.value=z}},{default:()=>""})]}),J=$=>e.h("div",{style:{position:"relative"}},{default:()=>[e.h("div",{},{default:()=>$.label}),e.h(ne,{class:"login-drop-menu",onclick:_=>{_.stopPropagation(),_.stopImmediatePropagation();const f=A("phoneOption",{});delete f[$.label],j("phoneOption",f,0),P();const I=m.value.name,z=y.value.filter(Q=>Q.label.indexOf(I)>-1);w.value=z}},{default:()=>""})]});return ue(),re("token"),D(),P(),oe(t.value),{tabs:r,pwdRef:i,pwdPhoneRef:p,formRef:l,formPhoneRef:c,formValue:m,formRules:h,showPhoneDropdown:C,showNameDropdown:v,optionsName:V,optionsPhone:w,loading:N,submit:M,tabChange:K,nameChange:n,phoneChange:O,dropNameSelect:k,dropPhoneSelect:b,showDropdownNameChange:R,showDropdownPhoneChange:G,renderDropdownNameLabel:H,renderDropdownPhoneLabel:J}}}),br={class:"login"},kr=e.createElementVNode("div",{class:"login-left"},[e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/login.png",alt:"logo",class:"login-img"})],-1),_r={class:"login-right"},Vr=e.createElementVNode("div",{class:"login-title"},null,-1),$r={class:"login-platform"},Sr={class:"login-form"},Tr=e.createElementVNode("br",null,null,-1),Br=e.createElementVNode("br",null,null,-1),Ir={class:"login-submit"},Dr=["href"],Pr=e.createElementVNode("div",{class:"google-play"},null,-1),Er=e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/android_qr.png",alt:"AndroidQr",width:"300",height:"300"},null,-1),Mr=e.createElementVNode("div",{class:"app-store"},null,-1),xr=e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/ios_qr.png",alt:"iOSQr",width:"300",height:"300"},null,-1),Or={class:"login-footer"},zr=e.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),Ar=e.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"footer-record"}," 沪ICP备 18025935号-3 ",-1);function Rr(o,t,a,s,r,c){const l=e.resolveComponent("NInput"),i=e.resolveComponent("NDropdown"),p=e.resolveComponent("NFormItem"),N=e.resolveComponent("NForm"),C=e.resolveComponent("NTabPane"),v=e.resolveComponent("NTabs"),m=e.resolveComponent("NButton"),h=e.resolveComponent("NPopover"),V=e.resolveComponent("NGi"),g=e.resolveComponent("NGrid");return e.openBlock(),e.createElementBlock("div",br,[kr,e.createElementVNode("div",_r,[Vr,e.createElementVNode("div",$r,e.toDisplayString(o.platform),1),e.createElementVNode("div",Sr,[e.createVNode(v,{value:o.tabs,"on-update:value":o.tabChange,type:"segment","justify-content":"end",animated:""},{default:e.withCtx(()=>[e.createVNode(C,{name:"1",tab:o.$t("Common.login.mobile")},{default:e.withCtx(()=>[Tr,e.createVNode(N,{ref:"formPhoneRef",model:o.formValue,rules:o.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:e.withKeys(o.submit,["enter"])},{default:e.withCtx(()=>[e.createVNode(p,{label:o.$t("Common.login.mobile"),path:"phone"},{default:e.withCtx(()=>[e.createVNode(i,{show:o.showPhoneDropdown,options:o.optionsPhone,"render-label":o.renderDropdownPhoneLabel,width:"trigger",onClickoutside:t[3]||(t[3]=()=>{o.showPhoneDropdown=!1}),onSelect:o.dropPhoneSelect},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.phone,"onUpdate:value":t[0]||(t[0]=w=>o.formValue.phone=w),placeholder:o.$t("Common.login.mobilePlaceholder"),"on-update:value":o.phoneChange,onClick:t[1]||(t[1]=w=>o.showDropdownPhoneChange(!0)),onFocus:t[2]||(t[2]=w=>o.showDropdownPhoneChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),e.createVNode(p,{label:o.$t("Common.login.password"),path:"password"},{default:e.withCtx(()=>[e.createVNode(l,{ref:"pwdPhoneRef",value:o.formValue.password,"onUpdate:value":t[4]||(t[4]=w=>o.formValue.password=w),type:"password","show-password-on":"click",placeholder:o.$t("Common.login.passwordPlaceholder"),onFocus:t[5]||(t[5]=w=>o.showDropdownPhoneChange(!1))},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"]),e.createVNode(C,{name:"0",tab:o.$t("Common.login.userName")},{default:e.withCtx(()=>[Br,e.createVNode(N,{ref:"formRef",model:o.formValue,rules:o.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:e.withKeys(o.submit,["enter"])},{default:e.withCtx(()=>[e.createVNode(p,{label:o.$t("Common.login.userName"),path:"name"},{default:e.withCtx(()=>[e.createVNode(i,{show:o.showNameDropdown,options:o.optionsName,"render-label":o.renderDropdownNameLabel,width:"trigger",onClickoutside:t[9]||(t[9]=()=>{o.showNameDropdown=!1}),onSelect:o.dropNameSelect},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.name,"onUpdate:value":t[6]||(t[6]=w=>o.formValue.name=w),placeholder:o.$t("Common.login.userNamePlaceholder"),"on-update:value":o.nameChange,onClick:t[7]||(t[7]=w=>o.showDropdownNameChange(!0)),onFocus:t[8]||(t[8]=w=>o.showDropdownNameChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),e.createVNode(p,{label:o.$t("Common.login.password"),path:"password"},{default:e.withCtx(()=>[e.createVNode(l,{ref:"pwdRef",value:o.formValue.password,"onUpdate:value":t[10]||(t[10]=w=>o.formValue.password=w),type:"password","show-password-on":"click",placeholder:o.$t("Common.login.passwordPlaceholder")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"])]),_:1},8,["value","on-update:value"]),e.createElementVNode("div",Ir,[e.createVNode(m,{loading:o.loading,class:"button-primary",onClick:o.submit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.login.in")),1)]),_:1},8,["loading","onClick"])]),o.info.href?(e.openBlock(),e.createElementBlock("a",{key:0,href:o.info.href,class:"login-other"},e.toDisplayString(o.info.text),9,Dr)):e.createCommentVNode("",!0),e.createVNode(g,{"x-gap":"15",cols:2},{default:e.withCtx(()=>[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(h,{trigger:"hover",placement:"top"},{trigger:e.withCtx(()=>[Pr]),default:e.withCtx(()=>[Er]),_:1})]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(h,{trigger:"hover",placement:"top"},{trigger:e.withCtx(()=>[Mr]),default:e.withCtx(()=>[xr]),_:1})]),_:1})]),_:1})]),e.createElementVNode("footer",Or,[e.createTextVNode(" Copyright "),zr,e.createTextVNode(" 2020-2024 "+e.toDisplayString(o.$t("Common.title"))+" ",1),o.version?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("v"+e.toDisplayString(o.version)+" ",1)],64)):e.createCommentVNode("",!0),Ar])])])}const qo=S(yr,[["render",Rr]]),Lr=e.defineComponent({name:"OcNumberRoll",props:{value:{required:!0,type:[Number,String],default:0},duration:{type:Number,default:1e3},precision:{type:Number,default:0},format:{type:Function,default:void 0}},setup(o){const t=e.ref(!1),a=e.ref(0),s=i=>1-Math.pow(1-i,5),r=i=>o.format?o.format(i):i;function c(i,p,N=o.duration){const C=()=>{const m=performance.now(),h=Math.min(m-v,N),V=i+(p-i)*s(h/N);if(h===N){a.value=r(Number(o.value)),t.value=!1;return}const g=Number(V.toFixed(o.precision));a.value=r(g),requestAnimationFrame(C)},v=performance.now();C()}const l=(i=0,p=o.value)=>{t.value=!0,a.value=r(i),String(i)!==String(p)&&c(i,Number(p))};return e.watch(()=>o.value,(i,p)=>{l(Number(p)||0,Number(i))}),e.onMounted(()=>{l()}),{displayedValueRef:a}}});function Ur(o,t,a,s,r,c){return e.toDisplayString(o.displayedValueRef)}const De=S(Lr,[["render",Ur]]),qr=e.defineComponent({name:"OcLogo",components:{NGrid:d.NGrid,NGi:d.NGi,NDivider:d.NDivider,NumberRoll:De},props:{text:{type:String,default:"智能效率监测平台"}},setup(){const o=e.ref(Date.now()),t=e.ref(void 0),a=s=>F(s,"yyyy-MM-dd hh:mm:ss");return e.onMounted(()=>{t.value=setInterval(()=>{o.value=Date.now()},1e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value),t.value=void 0}),{time:o,numFormat:a}}}),jr=o=>(e.pushScopeId("data-v-e71866dd"),o=o(),e.popScopeId(),o),Fr=jr(()=>e.createElementVNode("div",{class:"logo"},null,-1));function Gr(o,t,a,s,r,c){const l=e.resolveComponent("NGi"),i=e.resolveComponent("NDivider"),p=e.resolveComponent("NumberRoll"),N=e.resolveComponent("NGrid");return e.openBlock(),e.createBlock(N,{cols:5,class:"dashboard-logo"},{default:e.withCtx(()=>[e.createVNode(l,{span:"1",class:"flex-center-left"},{default:e.withCtx(()=>[Fr]),_:1}),e.createVNode(l,{span:"3",class:"flex-center"},{default:e.withCtx(()=>[e.createVNode(i,{class:"dashboard-title-show"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.text),1)]),_:1})]),_:1}),e.createVNode(l,{span:"1",class:"flex-center-right time"},{default:e.withCtx(()=>[e.createVNode(p,{value:o.time,format:o.numFormat},null,8,["value","format"])]),_:1})]),_:1})}const jo=S(qr,[["render",Gr],["__scopeId","data-v-e71866dd"]]),Hr=o=>{const t=JSON.parse(JSON.stringify(o));return t.oldPassword=ie(t.oldPassword),t.newPassword=ie(t.newPassword),t.comfirmPassword=ie(t.comfirmPassword),x("api/auth/user/modifyPassword",t)},Jr=o=>x("api/auth/user/update",o),Wr=e.defineComponent({name:"OcMy",components:{NGrid:d.NGrid,NGi:d.NGi,NForm:d.NForm,NFormItem:d.NFormItem,NInput:d.NInput,NButton:d.NButton},setup(){const{t:o}=W.useI18n(),t=d.useNotification(),a=e.ref(),s=e.ref(),r=e.ref(!1),c=e.ref({oldPassword:"",newPassword:"",comfirmPassword:""}),l=e.ref({oldPassword:{required:!0,message:()=>o("Common.my.oldPasswordMessage"),trigger:"blur"},newPassword:{required:!0,message:()=>o("Common.my.newPasswordMessage"),trigger:"blur"},comfirmPassword:{required:!0,message:()=>o("Common.my.checkPasswordMessage"),trigger:"blur"}}),i=e.ref(u),p=e.ref({email:{required:!1,trigger:"blur",validator:(v,m)=>m?/^[0-9a-zA-Z_.-]+[@][0-9a-zA-Z_.-]+([.][a-zA-Z]+){1,2}$/.test(m):!0,message:()=>o("Common.my.emailMessage")},phone:{required:!1,trigger:"blur",validator:(v,m)=>m?/^[1][3,4,5,7,8,9][0-9]{9}$/.test(m):!0,message:()=>o("Common.my.phoneMessage")}});return{formRef:s,pwdRef:a,pwdValue:c,formValue:i,pwdRules:l,formRules:p,loading:r,pwdSubmit:()=>{var v;r.value||(r.value=!0,(v=a.value)==null||v.validate(m=>{m?r.value=!1:Hr(c.value).then(()=>{var h;c.value={oldPassword:"",newPassword:"",comfirmPassword:""},(h=a.value)==null||h.restoreValidation(),t.success({content:()=>o("Notice.success"),duration:3e3}),setTimeout(()=>{window.location.href="/login"},1e3)}).catch(()=>{r.value=!1})}))},formSubmit:()=>{var v;r.value||(r.value=!0,(v=s.value)==null||v.validate(m=>{m?r.value=!1:Jr(i.value).then(()=>{t.success({content:()=>o("Notice.success"),duration:3e3}),r.value=!1,de().catch(()=>null)}).catch(()=>{r.value=!1})}))}}}}),Kr={class:"com-card"},Qr={class:"com-title"},Xr=e.createElementVNode("br",null,null,-1),Zr={class:"text-right"},Yr={class:"com-card"},el={class:"com-title"},ol=e.createElementVNode("br",null,null,-1),tl={class:"text-right"};function nl(o,t,a,s,r,c){const l=e.resolveComponent("NInput"),i=e.resolveComponent("NFormItem"),p=e.resolveComponent("NForm"),N=e.resolveComponent("NButton"),C=e.resolveComponent("NGi"),v=e.resolveComponent("NGrid");return e.openBlock(),e.createBlock(v,{"x-gap":"15","y-gap":"15",cols:2},{default:e.withCtx(()=>[e.createVNode(C,{span:"1"},{default:e.withCtx(()=>[e.createElementVNode("div",Kr,[e.createElementVNode("div",Qr,e.toDisplayString(o.$t("Common.my.title")),1),Xr,e.createVNode(p,{ref:"formRef",model:o.formValue,rules:o.formRules,"label-placement":"top"},{default:e.withCtx(()=>[e.createVNode(i,{label:o.$t("Common.my.tenantCode"),path:"tenantLoginCode"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.tenantLoginCode,"onUpdate:value":t[0]||(t[0]=m=>o.formValue.tenantLoginCode=m),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.tenantName"),path:"tenantName"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.tenantName,"onUpdate:value":t[1]||(t[1]=m=>o.formValue.tenantName=m),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.name"),path:"name"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.name,"onUpdate:value":t[2]||(t[2]=m=>o.formValue.name=m),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.email"),path:"email"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.email,"onUpdate:value":t[3]||(t[3]=m=>o.formValue.email=m),placeholder:"邮箱"},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.realName"),path:"realName"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.realName,"onUpdate:value":t[4]||(t[4]=m=>o.formValue.realName=m),placeholder:"真实姓名"},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.phone"),path:"phone"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.phone,"onUpdate:value":t[5]||(t[5]=m=>o.formValue.phone=m),placeholder:"手机"},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),e.createElementVNode("div",Zr,[e.createVNode(N,{loading:o.loading,class:"button-primary",onClick:o.formSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1}),e.createVNode(C,{span:"1"},{default:e.withCtx(()=>[e.createElementVNode("div",Yr,[e.createElementVNode("div",el,e.toDisplayString(o.$t("Common.my.password")),1),ol,e.createVNode(p,{ref:"pwdRef",model:o.pwdValue,rules:o.pwdRules,"label-placement":"top"},{default:e.withCtx(()=>[e.createVNode(i,{label:o.$t("Common.my.oldPassword"),path:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.pwdValue.oldPassword,"onUpdate:value":t[6]||(t[6]=m=>o.pwdValue.oldPassword=m),type:"password",placeholder:o.$t("Common.my.oldPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.newPassword"),path:"newPassword"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.pwdValue.newPassword,"onUpdate:value":t[7]||(t[7]=m=>o.pwdValue.newPassword=m),type:"password",placeholder:o.$t("Common.my.newPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.checkPassword"),path:"comfirmPassword"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.pwdValue.comfirmPassword,"onUpdate:value":t[8]||(t[8]=m=>o.pwdValue.comfirmPassword=m),type:"password",placeholder:o.$t("Common.my.checkPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),e.createElementVNode("div",tl,[e.createVNode(N,{loading:o.loading,class:"button-primary",onClick:o.pwdSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1})]),_:1})}const Fo=S(Wr,[["render",nl]]);function al(o){return new Promise((t,a)=>{x("api/manager/factory-params/detail",{keyName:o}).then(s=>{const r=JSON.parse(s.valueJson??"[]");t(r)}).catch(()=>{a()})})}const rl=e.defineComponent({name:"OcReport",components:{NSpace:d.NSpace,NDataTable:d.NDataTable,NDatePicker:d.NDatePicker,NInputGroup:d.NInputGroup,NInputGroupLabel:d.NInputGroupLabel},setup(){const{t:o}=W.useI18n(),t=e.ref(!0),a=d.useNotification(),s=e.ref([{title:"#",width:60,align:"center",key:"index",render(p,N){return e.h("span",{},{default:()=>N+1})}},{title:"名称",key:"name"},{title:"备注",key:"content"},{title:"操作",key:"action",align:"center",fixed:"right",width:120,render(p){return le([{type:"custom",onClick:()=>{l(p.key)},icon:pe,color:"success",text:"下载"}])}}]),r=e.ref([]),c=e.ref([Date.now(),Date.now()]),l=p=>{t.value=!0,Lo({jobType:"EXPORT",jobTypeName:p,jobParams:JSON.stringify({startDate:c.value[0],endDate:c.value[1]})}).then(()=>{t.value=!1,a.success({content:()=>o("Notice.success"),duration:3e3}),ke(!0)}).catch(()=>{t.value=!1,a.error({content:()=>o("Notice.error"),duration:3e3})})},i=p=>p>Date.now();return al("individuation_report_download").then(p=>{r.value=p.map(N=>({key:N.key,name:N.name,content:"默认导出最近30天的数据。每个企业租户下的所有账号,每天累计最多下载10次,采用异步下载"})),t.value=!1}).catch(()=>{t.value=!1}),{columns:s,columnData:r,loading:t,range:c,isRangeDateDisabled:i}}}),ll={class:"com-card"},sl=e.createElementVNode("br",null,null,-1);function cl(o,t,a,s,r,c){const l=e.resolveComponent("NInputGroupLabel"),i=e.resolveComponent("NDatePicker"),p=e.resolveComponent("NInputGroup"),N=e.resolveComponent("NSpace"),C=e.resolveComponent("n-data-table");return e.openBlock(),e.createElementBlock("div",ll,[e.createVNode(N,{justify:"end"},{default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(l,{class:"oc-group-label"},{default:e.withCtx(()=>[e.createTextVNode("日期")]),_:1}),e.createVNode(i,{value:o.range,"onUpdate:value":t[0]||(t[0]=v=>o.range=v),type:"daterange","is-date-disabled":o.isRangeDateDisabled,style:{width:"300px"}},null,8,["value","is-date-disabled"])]),_:1})]),_:1}),sl,e.createVNode(C,{columns:o.columns,data:o.columnData,loading:o.loading,"min-height":"calc(100vh - 180px)","max-height":"calc(100vh - 180px)"},null,8,["columns","data","loading"])])}const Go=S(rl,[["render",cl]]),il=e.defineComponent({name:"OcSkeleton",components:{NGrid:d.NGrid,NGi:d.NGi,NSkeleton:d.NSkeleton},props:{cols:{type:Number,default:6},num:{type:Array,default:()=>[[12,1]]}},setup(){return{}}}),dl={class:"com-skeleton"};function ul(o,t,a,s,r,c){const l=e.resolveComponent("NSkeleton"),i=e.resolveComponent("NGi"),p=e.resolveComponent("NGrid");return e.openBlock(),e.createElementBlock("div",dl,[e.createVNode(p,{"x-gap":"15","y-gap":"15",cols:o.cols,"item-responsive":"",responsive:"screen"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.num,(N,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`skeleton_${C}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.num[C][0],(v,m)=>(e.openBlock(),e.createBlock(i,{key:`skeleton_${C}_${m}`,span:`${o.cols/2} m:2 l:${o.num[C][1]}`},{default:e.withCtx(()=>[e.createVNode(l)]),_:2},1032,["span"]))),128))],64))),128))]),_:1},8,["cols"])])}const Ho=S(il,[["render",ul]]),pl=e.defineComponent({name:"Oc404",components:{NButton:d.NButton},setup(){const o=()=>{U.push(T.platformUrl)},t=e.ref();return e.onMounted(()=>{t.value=setInterval(()=>{U.push(T.platformUrl)},3e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value)}),{goBack:o}}}),Pe=o=>(e.pushScopeId("data-v-4387c328"),o=o(),e.popScopeId(),o),ml={class:"com-card flex-center error404",style:{flex:"1"}},fl=Pe(()=>e.createElementVNode("div",{class:"miss-img"},null,-1)),hl=Pe(()=>e.createElementVNode("p",{class:"miss-title"},"404 页面走丢了",-1)),gl=Pe(()=>e.createElementVNode("p",{class:"miss-title2"},"Something's missing.",-1));function wl(o,t,a,s,r,c){const l=e.resolveComponent("n-button");return e.openBlock(),e.createElementBlock("div",ml,[fl,hl,gl,e.createVNode(l,{tertiary:"",onClick:o.goBack},{default:e.withCtx(()=>[e.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const Jo=S(pl,[["render",wl],["__scopeId","data-v-4387c328"]]),Nl=e.defineComponent({name:"Oc500",components:{NButton:d.NButton},setup(){const o=()=>{U.push(T.platformUrl)},t=e.ref();return e.onMounted(()=>{t.value=setInterval(()=>{U.push(T.platformUrl)},3e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value)}),{goBack:o}}}),he=o=>(e.pushScopeId("data-v-d1bdd42b"),o=o(),e.popScopeId(),o),vl={class:"com-card flex-center error500",style:{flex:"1"}},Cl=he(()=>e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com//500.png",alt:"500"},null,-1)),yl=he(()=>e.createElementVNode("div",{class:"miss-txt"},"500",-1)),bl=he(()=>e.createElementVNode("p",{class:"miss-title"},"服务暂时中断,请稍后重试.",-1)),kl=he(()=>e.createElementVNode("p",{class:"miss-title2"},"Oops! No Internet connection found.",-1));function _l(o,t,a,s,r,c){const l=e.resolveComponent("NButton");return e.openBlock(),e.createElementBlock("div",vl,[Cl,yl,bl,kl,e.createVNode(l,{tertiary:"",onClick:o.goBack},{default:e.withCtx(()=>[e.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const Wo=S(Nl,[["render",_l],["__scopeId","data-v-d1bdd42b"]]),Vl=e.defineComponent({name:"OcAuth",setup(){const o=q.useRoute(),t=q.useRouter(),{auth:a}=o.query;a?j("token",a,0):re("token"),t.replace(T.platformUrl)}}),$l={class:"com-card flex-center",style:{flex:"1"}},Sl=e.createElementVNode("p",{class:"miss-title"},"登录中...",-1),Tl=[Sl];function Bl(o,t,a,s,r,c){return e.openBlock(),e.createElementBlock("div",$l,Tl)}const Ko=S(Vl,[["render",Bl]]);var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Il(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Dl(o){var t=typeof o;return o!=null&&(t=="object"||t=="function")}var Qo=Dl,Pl=typeof ce=="object"&&ce&&ce.Object===Object&&ce,El=Pl,Ml=El,xl=typeof self=="object"&&self&&self.Object===Object&&self,Ol=Ml||xl||Function("return this")(),Xo=Ol,zl=Xo,Al=function(){return zl.Date.now()},Rl=Al,Ll=/\s/;function Ul(o){for(var t=o.length;t--&&Ll.test(o.charAt(t)););return t}var ql=Ul,jl=ql,Fl=/^\s+/;function Gl(o){return o&&o.slice(0,jl(o)+1).replace(Fl,"")}var Hl=Gl,Jl=Xo,Wl=Jl.Symbol,Zo=Wl,so=Zo,Yo=Object.prototype,Kl=Yo.hasOwnProperty,Ql=Yo.toString,X=so?so.toStringTag:void 0;function Xl(o){var t=Kl.call(o,X),a=o[X];try{o[X]=void 0;var s=!0}catch{}var r=Ql.call(o);return s&&(t?o[X]=a:delete o[X]),r}var Zl=Xl,Yl=Object.prototype,es=Yl.toString;function os(o){return es.call(o)}var ts=os,co=Zo,ns=Zl,as=ts,rs="[object Null]",ls="[object Undefined]",io=co?co.toStringTag:void 0;function ss(o){return o==null?o===void 0?ls:rs:io&&io in Object(o)?ns(o):as(o)}var cs=ss;function is(o){return o!=null&&typeof o=="object"}var ds=is,us=cs,ps=ds,ms="[object Symbol]";function fs(o){return typeof o=="symbol"||ps(o)&&us(o)==ms}var hs=fs,gs=Hl,uo=Qo,ws=hs,po=NaN,Ns=/^[-+]0x[0-9a-f]+$/i,vs=/^0b[01]+$/i,Cs=/^0o[0-7]+$/i,ys=parseInt;function bs(o){if(typeof o=="number")return o;if(ws(o))return po;if(uo(o)){var t=typeof o.valueOf=="function"?o.valueOf():o;o=uo(t)?t+"":t}if(typeof o!="string")return o===0?o:+o;o=gs(o);var a=vs.test(o);return a||Cs.test(o)?ys(o.slice(2),a?2:8):Ns.test(o)?po:+o}var ks=bs,_s=Qo,ve=Rl,mo=ks,Vs="Expected a function",$s=Math.max,Ss=Math.min;function Ts(o,t,a){var s,r,c,l,i,p,N=0,C=!1,v=!1,m=!0;if(typeof o!="function")throw new TypeError(Vs);t=mo(t)||0,_s(a)&&(C=!!a.leading,v="maxWait"in a,c=v?$s(mo(a.maxWait)||0,t):c,m="trailing"in a?!!a.trailing:m);function h(n){var k=s,R=r;return s=r=void 0,N=n,l=o.apply(R,k),l}function V(n){return N=n,i=setTimeout(y,t),C?h(n):l}function g(n){var k=n-p,R=n-N,O=t-k;return v?Ss(O,c-R):O}function w(n){var k=n-p,R=n-N;return p===void 0||k>=t||k<0||v&&R>=c}function y(){var n=ve();if(w(n))return D(n);i=setTimeout(y,g(n))}function D(n){return i=void 0,m&&s?h(n):(s=r=void 0,l)}function P(){i!==void 0&&clearTimeout(i),N=0,s=p=r=i=void 0}function E(){return i===void 0?l:D(ve())}function M(){var n=ve(),k=w(n);if(s=arguments,r=this,p=n,k){if(i===void 0)return V(p);if(v)return clearTimeout(i),i=setTimeout(y,t),h(p)}return i===void 0&&(i=setTimeout(y,t)),l}return M.cancel=P,M.flush=E,M}var Bs=Ts;const Is=Il(Bs);let Ee=3840,Me=2160;const xe=e.reactive({scale:1});function et(o,t){Ee=o,Me=t}function Oe(){let o=1;const t=window.innerWidth,a=window.innerHeight,s=Ee,r=Me,c=parseFloat((s/r).toFixed(5));if(parseFloat((t/a).toFixed(5))>c){const i=parseFloat((a*c/s).toFixed(5));o=i>1?1:i}else{const i=parseFloat((t/c/r).toFixed(5));o=i>1?1:i}xe.scale=o}function ot(){const o=Is(Oe,200);return o(),window.addEventListener("resize",o),()=>{Ee=3840,Me=2160,window.removeEventListener("resize",o)}}const Ds={Platform:{iot:"智能效率监测平台",tdm:"智能刀具管理平台",qms:"智能质量检测平台",twin:"智能数字大屏平台",maintain:"智能设备维保平台"},Notice:{success:"操作成功",error:"操作失败,请稍后重试"},Common:{validDays:"报表文件具有七天有效期",search:"查询",refresh:"刷新",filter:"筛选",reset:"重置",more:"更多",success:"成功",failed:"失败",processing:"处理中",action:"操作",back:"返回",title:"零捷互联智能云平台",message:{title:"消息列表",title2:"消息",unRead:"未读",all:"全部",read:"已读",readAll:"一键已读"},login:{mobile:"手机号",mobilePlaceholder:"请输入手机号码",mobileMessage:"请输入正确的手机号码",password:"密码",passwordPlaceholder:"请输入密码",passwordMessage:"请输入密码",userName:"用户名",userNamePlaceholder:"请输入用户名",userNameMessage:"请输入正确的用户名",in:"登录"},my:{title:"我的信息",tenantCode:"租户代码",tenantName:"租户名称",name:"名称",email:"邮箱",emailMessage:"邮箱格式不正确",realName:"真实姓名",phone:"手机",phoneMessage:"手机号码格式不正确",submit:"更新",password:"修改密码",oldPassword:"旧密码",newPassword:"新密码",checkPassword:"确认新密码",oldPasswordMessage:"请填写旧密码",newPasswordMessage:"请填写新密码",checkPasswordMessage:"请填写确认新密码"},dropdownMenu:{software:"零捷软件",android:"安卓APP",ios:"iOS APP",chrome:"Chrome浏览器",edge:"Edge浏览器",dashboard_IoT:"大屏机加工版本",dashboard_Prt:"大屏印刷版本",report:"个性化报表",info:"我的信息",logout:"退出"},importer:{title:"导入",file:"导入文件",download:"下载模版",btnDownload:"下载",fileName:"文件名称",status:"状态",createTime:"创建时间",retry:"重试"}}},Ps={Platform:{iot:"SMART LEAN IOT PLATFORM",tdm:"SMART TOOL MANAGEMENT PLATFORM",qms:"SMART QUALITY MANAGEMENT PLATFORM",twin:"SMART DASHBOARD PLATFORM",maintain:"SMART MAINTAIN PLATFORM"},Notice:{success:"Success",error:"An error occurred, please try again later"},Common:{validDays:"Files are valid for seven days",search:"Search",refresh:"Refresh",filter:"Filter",reset:"Reset",more:"More",success:"Success",failed:"Failed",processing:"Processing",action:"Action",back:"Back",title:"Partex",message:{title:"Messages",title2:"Message",unRead:"Unread",all:"All",read:"Read",readAll:"Read All"},login:{mobile:"Mobile",mobilePlaceholder:"Please Input Mobile",mobileMessage:"Mobile is not correct",password:"Password",passwordPlaceholder:"Please Input Password",passwordMessage:"Please Input Password",userName:"UserName",userNamePlaceholder:"Please Input UserName",userNameMessage:"UserName is not correct",in:"Sign in"},my:{title:"Info",tenantCode:"TenantCode",tenantName:"TenantName",name:"Name",email:"Email",emailMessage:"Email is not correct",realName:"RealName",phone:"Mobile",phoneMessage:"Mobile is not correct",submit:"Apply",password:"Change Password",oldPassword:"Current",newPassword:"New",checkPassword:"Check",oldPasswordMessage:"Please Input Current Password",newPasswordMessage:"Please Input New Password",checkPasswordMessage:"Please Check New Password"},dropdownMenu:{software:"Software",android:"Android APP",ios:"iOS APP",chrome:"Chrome",edge:"Edge",dashboard:"Dashboard",dashboard_IoT:"Dashboard_IoT",dashboard_Prt:"Dashboard_Print",report:"Reports",info:"UserInfo",logout:"Logout"},importer:{title:"Import",file:"Import File",download:"Download Template",btnDownload:"Download",fileName:"FileName",status:"Status",createTime:"CreateTime",retry:"Retry"}}},tt=Ds,nt=Ps,fo=Object.freeze(Object.defineProperty({__proto__:null,Oc404:Jo,Oc500:Wo,OcAuth:Ko,OcBack:Ro,OcFooter:Ao,OcHeader:zo,OcImporter:Uo,OcLogin:qo,OcLogo:jo,OcMy:Fo,OcNumberRoll:De,OcReport:Go,OcSearchBar:Oo,OcSkeleton:Ho,fnClearUser:ue,fnComputedScale:Oe,fnDownload:No,fnGetUser:de,fnListenerScale:ot,fnSetLang:oe,fnSetNormalWidthAndHeight:et,fnSetPlatform:go,fnSetTheme:_e,fnSetUser:Ve,fnUserLogout:$e,headerStore:T,langCN:tt,langUS:nt,scaleStore:xe,userStore:u},Symbol.toStringTag,{value:"Module"})),Es="1.1.27";let at;async function rt(){const o=await fetch(`${window.location.protocol}//${window.location.host}`,{method:"HEAD",cache:"no-cache"});return o.headers.get("etag")||o.headers.get("last-modified")}async function Ms(){const o=await rt();at!==o&&ft(!0)}async function xs(){at=await rt(),window.versionMonitor&&clearInterval(window.versionMonitor),window.versionMonitor=setInterval(()=>{Ms()},60*1e3)}function lt({components:o=[]}={}){const t=[];function a(r,c,l){r.component(c)||r.component(c,l)}function s(r,c){if(!t.includes(r)&&(t.push(r),o.forEach(l=>{const{name:i,alias:p}=l;a(r,i,l),p&&p.forEach(N=>{a(r,N,l)})}),c)){const{versionMonitor:l=!0,enableRedirect:i=!0,local:p="zh-CN"}=c;_t(i),pt(p),l&&xs()}}return{version:Es,install:s}}const st=lt({components:Object.keys(fo).map(o=>fo[o])}),Os=st.install;exports.FILE=Ie;exports.GET=xo;exports.IconAlert=Co;exports.IconArrowClockwise=te;exports.IconArrowSquareDown=ko;exports.IconCalendarArrowDown=pe;exports.IconChevronLeft=bo;exports.IconClear=yo;exports.IconCloudArrowDown=Po;exports.IconDelete=To;exports.IconDismiss=ne;exports.IconDrafts=Io;exports.IconEye=Bo;exports.IconFullScreenMaximize=Sn;exports.IconGridDots=$o;exports.IconMailInboxAdd=Do;exports.IconSearch=So;exports.IconWeatherMoon=_o;exports.IconWeatherSunny=Vo;exports.Oc404=Jo;exports.Oc500=Wo;exports.OcAuth=Ko;exports.OcBack=Ro;exports.OcFooter=Ao;exports.OcHeader=zo;exports.OcImporter=Uo;exports.OcLogin=qo;exports.OcLogo=jo;exports.OcMy=Fo;exports.OcNumberRoll=De;exports.OcReport=Go;exports.OcSearchBar=Oo;exports.OcSkeleton=Ho;exports.POST=x;exports.create=lt;exports.darkTheme=ca;exports.default=st;exports.fnCancelFetch=ut;exports.fnCheckDashRole=ga;exports.fnCheckIoTRole=ma;exports.fnCheckMaintainRole=wa;exports.fnCheckQMSRole=ha;exports.fnCheckTDMRole=fa;exports.fnClearUser=ue;exports.fnComputedScale=Oe;exports.fnDecodeCursor=ye;exports.fnDelStorage=re;exports.fnDeleteLoad=Mo;exports.fnDownload=No;exports.fnEncodeCursor=ee;exports.fnFormatTime=F;exports.fnFormatUnits=pa;exports.fnFullScreen=ua;exports.fnGetStorage=A;exports.fnGetUser=de;exports.fnListenerScale=ot;exports.fnPageModel2Naive=me;exports.fnPageNaive2Model=fe;exports.fnRenderAction=le;exports.fnScrollTop=Eo;exports.fnSetLang=oe;exports.fnSetNormalWidthAndHeight=et;exports.fnSetPlatform=go;exports.fnSetStorage=j;exports.fnSetTheme=_e;exports.fnSetUser=Ve;exports.fnThrottle=da;exports.fnUserLogout=$e;exports.headerStore=T;exports.install=Os;exports.langCN=tt;exports.langUS=nt;exports.lightTheme=sa;exports.scaleStore=xe;exports.userStore=u;
1
+ "use strict";var ct=Object.defineProperty;var it=(o,t,a)=>t in o?ct(o,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[t]=a;var se=(o,t,a)=>(it(o,typeof t!="symbol"?t+"":t,a),a);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),q=require("vue-router"),d=require("naive-ui"),be=require("axios"),ie=require("md5"),W=require("vue-i18n"),U=q.createRouter({history:q.createWebHistory(),routes:[],scrollBehavior:()=>({left:0,top:0})}),ge=document.querySelector("html");U.beforeEach(()=>{ge==null||ge.removeAttribute("style")});const dt=Object.prototype.hasOwnProperty;function ho(o,t){const a=[];for(const s in o){if(!dt.call(o,s))continue;const r=o[s],c=encodeURIComponent(s);let l;typeof r=="object"?l=ho(r,t?t+"["+c+"]":c):l=(t?t+"["+c+"]":c)+"="+encodeURIComponent(r),a.push(l)}return a.join("&")}const{notification:we}=d.createDiscreteApi(["notification"],{configProviderProps:{themeOverrides:{common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}}},notificationProviderProps:{placement:"top"}}),ae=be.create({timeout:3e5,responseType:"json",headers:{platformType:"T1"}});let Ce=be.CancelToken.source();ae.interceptors.request.use(o=>{var a;o.cancelToken=Ce.token;const t=A("token",!1);if(o.headers&&t&&(o.headers["X-Auth-Token"]=t),((a=o.method)==null?void 0:a.toLocaleUpperCase())==="GET"){const s=ho(o.data);s&&(o.url=`${o.url}?${s}`)}return o},o=>Promise.reject(o));ae.interceptors.response.use(o=>{const t=o.data;if(o.config.responseType==="blob"||o.config.responseType==="text")return Promise.resolve(o.data);if(t.ok)return Promise.resolve(t.data);{let a=t.message;return(a.indexOf("Connection refused")>-1||a.indexOf("finishConnect")>-1)&&(a="网络错误,请稍后重试"),we.error({content:a,duration:3e3}),Promise.reject(a)}},o=>{if(o&&o.code==="ECONNABORTED"&&o.config&&o.config.url&&o.config.url.indexOf("auth/user/getCurrentUserInfo")>-1&&(Mo(),U.replace("/custom/500")),o&&o.response)switch(o.response.status){case 401:case 403:re("token"),window.location.href="/login";break;default:return we.destroyAll(),we.error({content:"系统正在维护中,请稍后再试!",duration:3e3}),Promise.reject()}else return Promise.reject()});const ut=()=>{Ce.cancel(),Ce=be.CancelToken.source()},T=e.reactive({needUpdate:!1,download:!1,theme:!1,isMobile:!1,lang:"zh-CN",platformName:"智能效率监测平台",platformType:"T1",platformUrl:"/iot/home/all",platformMainUrl:""});function ke(o){T.download=o}function pt(o){T.lang=o}function oe(o){j("lang",o,0),T.lang=o;const t=document.body;t.dataset.lang=o}function _e(o){T.theme=o;const t=document.body,a=document.querySelector("meta[name=theme-color]");a&&(o?(a.setAttribute("content","#2b2b2d"),t.dataset.theme="dark"):(a.setAttribute("content","#ffffff"),t.dataset.theme=""))}function go(o){T.platformName=o.platformName,T.platformType=o.platformType,T.platformUrl=o.platformUrl,T.platformMainUrl=(o==null?void 0:o.platformMainUrl)||""}function mt(o){T.platformName=o}function ft(o){T.needUpdate=o}const wo=()=>{T.isMobile=window.screen.availWidth<769};window.addEventListener("resize",wo);wo();const ht=()=>x("api/auth/user/logout"),gt=()=>x("api/manager/message/markReadAll"),wt=()=>x("api/auth/user/updateTenantRenewalStatus"),Nt=o=>x("api/manager/job/remove",o),vt=o=>x("api/manager/job/retry",{jobId:o}),Ct=o=>new Promise((t,a)=>{const s=fe(o);x("api/manager/job/page",s).then(r=>{const c=me(r);t(c)}).catch(()=>{a()})}),No=o=>new Promise((t,a)=>{const s=new FormData;s.append("jobType","EXPORT"),Object.keys(o).forEach(r=>{o.query&&r==="query"?s.append("query",JSON.stringify(o.query)):s.append(r,o[r])}),Ie("api/manager/job/submit",s).then(()=>{ke(!0),t()}).catch(r=>{a(r)})}),yt=o=>new Promise((t,a)=>{const s=fe(o);s.status===-1&&(s.status=""),x("api/manager/message/messagePage",s).then(r=>{const c=me(r);t({data:c,unRead:r.unRead})}).catch(()=>{a()})}),bt=o=>x("api/manager/message/markRead",{messageId:o}),ao=o=>{const t=JSON.parse(JSON.stringify(o));return t.password=ie(t.password),x("api/user/v2/login",t)},kt=()=>new Promise((o,t)=>{x("api/auth/user/getCurrentUserInfo",{},"json",1e4).then(a=>{const s=["046459"];a.commissioner=!1,s.includes(String(a.tenantLoginCode))&&(a.commissioner=!0);const r=a.ownedProducts?JSON.parse(a.ownedProducts):[];switch(r.includes(2)?a.platform_tdm=!0:a.platform_tdm=!1,r.includes(3)?a.platform_qms=!0:a.platform_qms=!1,r.includes(4)?a.platform_twin=!0:a.platform_twin=!1,r.includes(5)?a.platform_maintain=!0:a.platform_maintain=!1,r.includes(6)?a.platform_simple_tdm=!0:a.platform_simple_tdm=!1,a.systemType){case"Premium":a.systemType=1;break;case"Flagship":a.systemType=2;break;default:a.systemType=0;break}a.info=JSON.parse(a.info),o(a)}).catch(()=>{t()})});let vo=!0;const u=e.reactive({commissioner:!1,factoryId:"",tenantLoginCode:"",thirdUserId:"",userId:"",email:"",name:"",realName:"",phone:"",description:"",tenantName:"",oeeStatus:0,ncFlg:0,info:{type:0,id:"",viewType:1,interval:5,theme:"light"},kind:0,systemType:0,password:"",enable:!0,platform_tdm:!1,platform_qms:!1,platform_twin:!1,platform_maintain:!1,platform_simple_tdm:!1,authorizationGroupArray:[],authorizationMachineArray:[],iot_menu_authorization:[],tdm_menu_authorization:[],qms_menu_authorization:[],maintain_menu_authorization:[],endTime:0,tenantStatus:1,renewalStatus:0,roleId:1,industryCategory:"0"});function _t(o){vo=o}function Ve(o){const t=window.location.host;if(t.includes("partexiot")){const a=A("token",!1);u.industryCategory=o.industryCategory||"0",!t.includes("vpn")&&vo&&(o.industryCategory==="0"&&t.includes("printing")&&(window.location.href=`https://www.partexiot.cn/auth?auth=${a}`),o.industryCategory==="1"&&!t.includes("printing")&&(window.location.href=`https://printing.partexiot.cn/auth?auth=${a}`))}if(u.commissioner=o.commissioner,u.factoryId=o.factoryId,u.tenantLoginCode=o.tenantLoginCode,u.userId=o.userId,u.email=o.email,u.name=o.name,u.realName=o.realName,u.tenantName=o.tenantName,u.phone=o.phone,u.info=o.info,u.kind=o.kind,u.oeeStatus=o.oeeStatus||0,u.ncFlg=o.ncFlg||0,u.systemType=o.systemType,u.platform_tdm=o.platform_tdm,u.platform_qms=o.platform_qms,u.platform_twin=o.platform_twin,u.platform_maintain=o.platform_maintain,u.platform_simple_tdm=o.platform_simple_tdm,u.authorizationGroupArray=o.authorizationGroupArray||[],u.authorizationMachineArray=o.authorizationMachineArray||[],u.iot_menu_authorization=o.iot_menu_authorization||[],u.tdm_menu_authorization=o.tdm_menu_authorization||[],u.qms_menu_authorization=o.qms_menu_authorization||[],u.maintain_menu_authorization=o.maintain_menu_authorization||[],u.endTime=o.endTime??0,u.tenantStatus=o.tenantStatus??1,u.renewalStatus=o.renewalStatus??0,u.roleId=o.roleId||0,u.kind===1){const a=o.info,s=String(o.info.type);s==="0"&&U.replace(`/dashboard/list?machGroupId=${a.id}&theme=${a.theme||"light"}`),s==="1"&&U.replace(`/dashboard/single?machId=${a.id}&type=${a.viewType??1}&theme=${a.theme||"light"}`),s==="2"&&U.push(`/dashboard/carousel?theme=${a.theme||"light"}`),s==="3"&&U.push(`/dashboard/carouselist?theme=${a.theme||"light"}`),s==="4"&&U.push(`/dashboard/performance?schemeId=${a.id}&theme=${a.theme||"light"}`)}}function de(){return new Promise((o,t)=>{kt().then(a=>{Ve(a),o(a)}).catch(()=>{t()})})}function ue(){u.factoryId="",u.commissioner=!1,u.tenantLoginCode="",u.userId="",u.email="",u.name="",u.realName="",u.tenantName="",u.phone="",u.description="",u.info={type:0,id:"",viewType:1,interval:5,theme:"light"},u.kind=0,u.systemType=0,u.oeeStatus=0,u.ncFlg=0,u.password="",u.enable=!0,u.platform_tdm=!1,u.platform_qms=!1,u.platform_twin=!1,u.platform_maintain=!1,u.platform_simple_tdm=!1,u.authorizationGroupArray=[],u.authorizationMachineArray=[],u.iot_menu_authorization=[],u.tdm_menu_authorization=[],u.qms_menu_authorization=[],u.maintain_menu_authorization=[],u.endTime=0,u.tenantStatus=1,u.renewalStatus=0,u.roleId=1}async function $e(){await ht().catch(()=>null),re("token"),ue(),window.location.href="/login"}const S=(o,t)=>{const a=o.__vccOpts||o;for(const[s,r]of t)a[s]=r;return a},Vt={},$t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},St=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1),Tt=[St];function Bt(o,t){return e.openBlock(),e.createElementBlock("svg",$t,Tt)}const Co=S(Vt,[["render",Bt]]),It={},Dt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pt=e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M8 6h12"}),e.createElementVNode("path",{d:"M6 12h12"}),e.createElementVNode("path",{d:"M4 18h12"})],-1),Et=[Pt];function Mt(o,t){return e.openBlock(),e.createElementBlock("svg",Dt,Et)}const yo=S(It,[["render",Mt]]),xt={},Ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},zt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0z",fill:"currentColor"})],-1),At=[zt];function Rt(o,t){return e.openBlock(),e.createElementBlock("svg",Ot,At)}const bo=S(xt,[["render",Rt]]),Lt={},Ut={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},qt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.53 11.72l-.084-.072a.75.75 0 0 0-.976.072l-2.72 2.72V7.75l-.007-.102A.75.75 0 0 0 12 7l-.102.007a.75.75 0 0 0-.648.743v6.692L8.53 11.72l-.085-.073a.75.75 0 0 0-.976 1.133l4 4.002l.084.072a.75.75 0 0 0 .976-.072l4.001-4l.073-.085a.75.75 0 0 0-.073-.977zM6.25 3A3.25 3.25 0 0 0 3 6.25v11.5A3.25 3.25 0 0 0 6.25 21h11.5A3.25 3.25 0 0 0 21 17.75V6.25A3.25 3.25 0 0 0 17.75 3H6.25zM4.5 6.25c0-.966.784-1.75 1.75-1.75h11.5c.966 0 1.75.784 1.75 1.75v11.5a1.75 1.75 0 0 1-1.75 1.75H6.25a1.75 1.75 0 0 1-1.75-1.75V6.25z",fill:"currentColor"})],-1),jt=[qt];function Ft(o,t){return e.openBlock(),e.createElementBlock("svg",Ut,jt)}const ko=S(Lt,[["render",Ft]]),Gt={},Ht={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Jt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M20.026 17.001c-2.762 4.784-8.879 6.423-13.663 3.661A9.965 9.965 0 0 1 3.13 17.68a.75.75 0 0 1 .365-1.132c3.767-1.348 5.785-2.91 6.956-5.146c1.232-2.353 1.551-4.93.689-8.463a.75.75 0 0 1 .769-.927a9.961 9.961 0 0 1 4.457 1.327c4.784 2.762 6.423 8.879 3.66 13.662z",fill:"currentColor"})],-1),Wt=[Jt];function Kt(o,t){return e.openBlock(),e.createElementBlock("svg",Ht,Wt)}const _o=S(Gt,[["render",Kt]]),Qt={},Xt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Zt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 2a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 2zm5 10a5 5 0 1 1-10 0a5 5 0 0 1 10 0zm4.25.75a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zM12 19a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 19zm-7.75-6.25a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zm-.03-8.53a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 0 1-1.06 1.06l-1.5-1.5a.75.75 0 0 1 0-1.06zm1.06 15.56a.75.75 0 1 1-1.06-1.06l1.5-1.5a.75.75 0 1 1 1.06 1.06l-1.5 1.5zm14.5-15.56a.75.75 0 0 0-1.06 0l-1.5 1.5a.75.75 0 0 0 1.06 1.06l1.5-1.5a.75.75 0 0 0 0-1.06zm-1.06 15.56a.75.75 0 1 0 1.06-1.06l-1.5-1.5a.75.75 0 1 0-1.06 1.06l1.5 1.5z",fill:"currentColor"})],-1),Yt=[Zt];function en(o,t){return e.openBlock(),e.createElementBlock("svg",Xt,Yt)}const Vo=S(Qt,[["render",en]]),on={},tn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},nn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 10a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 3a2 2 0 1 1 0 4a2 2 0 0 1 0-4z",fill:"currentColor"})],-1),an=[nn];function rn(o,t){return e.openBlock(),e.createElementBlock("svg",tn,an)}const $o=S(on,[["render",rn]]),ln={},sn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},cn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})],-1),dn=[cn];function un(o,t){return e.openBlock(),e.createElementBlock("svg",sn,dn)}const So=S(ln,[["render",un]]),pn={},mn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},fn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 4.5a7.5 7.5 0 1 0 7.419 6.392c-.067-.454.265-.892.724-.892c.37 0 .696.256.752.623A9 9 0 1 1 18 5.292V4.25a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-.75.75h-3a.75.75 0 0 1 0-1.5h1.35a7.474 7.474 0 0 0-5.1-2z",fill:"currentColor"})],-1),hn=[fn];function gn(o,t){return e.openBlock(),e.createElementBlock("svg",mn,hn)}const te=S(pn,[["render",gn]]),wn={},Nn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},vn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M17.75 3A3.25 3.25 0 0 1 21 6.25v5.772a6.471 6.471 0 0 0-1.5-.709V8.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.063c.173.534.412 1.037.709 1.5H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h11.5zm0 1.5H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75zm5.25 13a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0zm-5-3a.5.5 0 0 0-1 0v4.793l-1.646-1.647a.5.5 0 0 0-.708.708l2.5 2.5a.5.5 0 0 0 .708 0l2.5-2.5a.5.5 0 0 0-.708-.708L18 19.293V14.5z",fill:"currentColor"})],-1),Cn=[vn];function yn(o,t){return e.openBlock(),e.createElementBlock("svg",Nn,Cn)}const pe=S(wn,[["render",yn]]),bn={},kn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_n=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.5 5.75c0-.69.56-1.25 1.25-1.25h2a.75.75 0 0 0 0-1.5h-2A2.75 2.75 0 0 0 3 5.75v2a.75.75 0 0 0 1.5 0v-2zm0 12.5c0 .69.56 1.25 1.25 1.25h2a.75.75 0 0 1 0 1.5h-2A2.75 2.75 0 0 1 3 18.25v-2a.75.75 0 0 1 1.5 0v2zM18.25 4.5c.69 0 1.25.56 1.25 1.25v2a.75.75 0 0 0 1.5 0v-2A2.75 2.75 0 0 0 18.25 3h-2a.75.75 0 0 0 0 1.5h2zm1.25 13.75c0 .69-.56 1.25-1.25 1.25h-2a.75.75 0 0 0 0 1.5h2A2.75 2.75 0 0 0 21 18.25v-2a.75.75 0 0 0-1.5 0v2z",fill:"currentColor"})],-1),Vn=[_n];function $n(o,t){return e.openBlock(),e.createElementBlock("svg",kn,Vn)}const Sn=S(bn,[["render",$n]]),Tn={},Bn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},In=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})],-1),Dn=[In];function Pn(o,t){return e.openBlock(),e.createElementBlock("svg",Bn,Dn)}const To=S(Tn,[["render",Pn]]),En={},Mn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},xn=e.createElementVNode("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3c7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112s112 50.1 112 112s-50.1 112-112 112z",fill:"currentColor"},null,-1),On=[xn];function zn(o,t){return e.openBlock(),e.createElementBlock("svg",Mn,On)}const Bo=S(En,[["render",zn]]),An={},Rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ln=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M20 4.746a2.75 2.75 0 0 0-2.75-2.75H4.75A2.75 2.75 0 0 0 2 4.746v12.5a2.75 2.75 0 0 0 2.75 2.75h6.666l.105-.42c.096-.384.253-.748.463-1.08H4.75c-.69 0-1.25-.56-1.25-1.25v-12.5c0-.69.56-1.25 1.25-1.25h12.5c.69 0 1.25.56 1.25 1.25v7.113c.437-.4.956-.66 1.5-.781V4.746zm-4 9.608V6.73l-.007-.1A.744.744 0 0 0 15.25 6a.74.74 0 0 0-.75.73v8.541l.007.099c.017.125.067.24.142.337L16 14.355zm-8.507-5.71A.75.75 0 0 0 6.75 8a.748.748 0 0 0-.75.747v6.507l.007.101c.05.365.363.645.743.645c.414 0 .75-.334.75-.746V8.746l-.007-.101zm4.214 2.973a.73.73 0 0 0-.732-.62a.73.73 0 0 0-.725.733l.035 3.547l.008.099a.731.731 0 0 0 .732.62a.73.73 0 0 0 .725-.733l-.035-3.548l-.008-.098zm7.393 1.052l-5.903 5.902a2.686 2.686 0 0 0-.706 1.248l-.458 1.83a1.087 1.087 0 0 0 1.319 1.319l1.83-.458a2.685 2.685 0 0 0 1.248-.706l5.902-5.903A2.286 2.286 0 0 0 19.1 12.67z",fill:"currentColor"})],-1),Un=[Ln];function qn(o,t){return e.openBlock(),e.createElementBlock("svg",Rn,Un)}const Io=S(An,[["render",qn]]),jn={},Fn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Gn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.397 4.554l.073-.084a.75.75 0 0 1 .976-.073l.084.073L12 10.939l6.47-6.47a.75.75 0 1 1 1.06 1.061L13.061 12l6.47 6.47a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073L12 13.061l-6.47 6.47a.75.75 0 0 1-1.06-1.061L10.939 12l-6.47-6.47a.75.75 0 0 1-.072-.976l.073-.084l-.073.084z",fill:"currentColor"})],-1),Hn=[Gn];function Jn(o,t){return e.openBlock(),e.createElementBlock("svg",Fn,Hn)}const ne=S(jn,[["render",Jn]]),Wn={},Kn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Qn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M22 6.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zM17 7l.001 2.504a.5.5 0 1 1-1 0V7h-2.505a.5.5 0 0 1 0-1H16V3.5a.5.5 0 0 1 1 0V6h2.503a.5.5 0 1 1 0 1h-2.502zm2.5 7v-1.732A6.518 6.518 0 0 0 21 11.19v7.56a3.25 3.25 0 0 1-3.066 3.245L17.75 22H6.25a3.25 3.25 0 0 1-3.245-3.066L3 18.75V7.25a3.25 3.25 0 0 1 3.066-3.245L6.25 4h4.248a6.451 6.451 0 0 0-.422 1.5H6.25a1.75 1.75 0 0 0-1.744 1.606L4.5 7.25V14H9a.75.75 0 0 1 .743.648l.007.102a2.25 2.25 0 0 0 4.495.154l.005-.154a.75.75 0 0 1 .648-.743L15 14h4.5zm-15 1.5v3.25a1.75 1.75 0 0 0 1.606 1.744l.144.006h11.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V15.5h-3.825a3.752 3.752 0 0 1-3.475 2.995l-.2.005a3.752 3.752 0 0 1-3.632-2.812l-.043-.188H4.5z",fill:"currentColor"})],-1),Xn=[Qn];function Zn(o,t){return e.openBlock(),e.createElementBlock("svg",Kn,Xn)}const Do=S(Wn,[["render",Zn]]),Yn={},ea={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},oa=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552a6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713a4.25 4.25 0 0 0-8.489 0a.75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087zM22 16.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zm-6-3a.5.5 0 0 1 1 0v4.793l1.646-1.647a.5.5 0 0 1 .708.708l-2.5 2.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 .708-.708L16 18.293V13.5z",fill:"currentColor"})],-1),ta=[oa];function na(o,t){return e.openBlock(),e.createElementBlock("svg",ea,ta)}const Po=S(Yn,[["render",na]]),Se=window.localStorage;function Ne(o,t){Se.setItem(o,JSON.stringify(t))}function ro(o){const t=Se.getItem(o);return t?JSON.parse(t):null}function aa(o){Se.removeItem(o)}function lo(){return Date.parse(String(new Date))}const ra="local-";class la{constructor(t=""){se(this,"namespace");se(this,"mapKey");se(this,"map");this.namespace=t,this.mapKey=ra+this.namespace,this.map=ro(this.mapKey)||{}}set(t,a,s=0){const r=this.getReallyKey(t),c={expires:s,time:lo()};Ne(r,a),this.map[t]=c,Ne(this.mapKey,this.map)}getReallyKey(t){return this.namespace+"-"+t}get(t,a){const s=this.getReallyKey(t),r=this.map[t];if(r){const c=ro(s);if(r.expires>0){if(lo()-r.time<=r.expires)return c===!1||c?c:a;this.delete(t)}else return c===!1||c?c:a}return a}delete(t){const a=this.getReallyKey(t);delete this.map[t],Ne(this.mapKey,this.map),aa(a)}deleteAll(){for(const t in this.map)this.delete(t)}}const Te=new la("partex"),Be="/apiserver/";d.darkTheme.common.cardColor="#32323b";d.darkTheme.common.primaryColor="#b274ef";d.darkTheme.common.primaryColorHover="#b274ef";d.darkTheme.common.borderRadius="16px";d.darkTheme.common.borderRadiusSmall="8px";d.darkTheme.DataTable.tdColor="#2d2d31";const sa={common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}},ca=d.darkTheme;function j(o,t,a=3e4){if(typeof a=="string"){let s=0;const r=a.split(" ");switch(r[1]){case"Minutes":s=6e4;break;case"Hours":s=36e5;break;case"Day":s=864e5;break;case"Week":s=6048e5;break}a=Number(r[0])*s}Te.set(o,t,a)}function A(o,t){return Te.get(o,t)}const re=o=>{Te.delete(o)},Eo=(o=0)=>{const t=document.documentElement;t&&(t.scrollTop=o,setTimeout(()=>{t.scrollTop=o},100))},Mo=()=>{const o=document.querySelectorAll(".partex-loading");o&&o.length>0&&o.forEach(t=>{const a=t.parentNode;a==null||a.removeChild(t)})};function me(o,t=!1){let a=o.records;t&&(a=a.map((r,c)=>({key:c,...r})));const s=parseInt(o.size);return{query:{page:Number(o.current),pageCount:parseInt(o.pages),pageSize:s>29?s:30,itemCount:parseInt(o.total),pageSizes:[30,40,50],showQuickJumper:!0,showSizePicker:!0,pageSlot:8,prefix:()=>e.h("div",{},{default:()=>`共${o.total}条`})},records:a}}function fe(o){if(!o.query)return o;const t={};return o.query.page&&(t.current=o.query.page),o.query.pageSize&&(t.size=o.query.pageSize),o.query.isGetAll&&(t.isGetAll=o.query.isGetAll),o.query.keyword&&(t.keyword=o.query.keyword),o.query.columnKey&&(t.columnKey=o.query.columnKey),o.query.order&&(t.order=o.query.order),{...o,query:t}}const F=(o,t="yyyy-MM-dd")=>{if(!o)return"";typeof o=="string"&&(o=o.replace(/年/g,"-").replace(/月/g,"-").replace(/日/g,""));let a=new Date(o);if(typeof o=="string"&&isNaN(a.getTime())&&(a=new Date(parseInt(o))),isNaN(a.getTime()))return"---";const s={"M+":a.getMonth()+1,"d+":a.getDate(),"h+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(a.getFullYear()+"").substr(4-RegExp.$1.length)));for(const r in s)if(new RegExp("("+r+")").test(t)){let c=s[r];RegExp.$1.length!==1&&(c=("00"+s[r]).substr((""+s[r]).length)),t=t.replace(RegExp.$1,c)}return t},Z=(o,t="default",a,s=!1,r=!1,c)=>o?e.h(d.NButton,{size:"small",type:t,text:!0,disabled:s,loading:r,onClick:a},{default:()=>c||null,icon:()=>e.h(d.NIcon,{},{default:()=>e.h(o,{},{default:()=>null})})}):e.h(d.NButton,{size:"small",type:t,text:!0,disabled:s,loading:r,onClick:a},{default:()=>c||null}),Y=(o,t)=>e.h(d.NTooltip,{},{trigger:()=>o,default:()=>t}),ia=(o,t=!1,a=!1)=>e.h(d.NPopconfirm,{placement:"left","on-positive-click":()=>o()},{default:()=>e.h("span",{},{default:()=>T.lang==="zh-CN"?"删除后无法恢复,是否确认删除?":"Are you sure you want to delete ?"}),trigger:()=>Y(Z(To,"error",void 0,t,a),T.lang==="zh-CN"?"删除":"Delete")}),le=o=>{const t=[];return o.forEach(a=>{a.type==="detail"&&t.push(Y(Z(Bo,"primary",a.onClick,a.disabled,a.loading),T.lang==="zh-CN"?"详情":"Detail")),a.type==="edit"&&t.push(Y(Z(Io,"success",a.onClick,a.disabled,a.loading),T.lang==="zh-CN"?"编辑":"Edit")),a.type==="delete"&&t.push(ia(a.onClick,a.disabled,a.loading)),a.type==="custom"&&t.push(Y(Z(a.icon,a.color,a.onClick,a.disabled,a.loading,a.buttonText),a.text)),a.type==="tips"&&t.push(e.h(d.NPopconfirm,{placement:"left","on-positive-click":()=>a.onClick()},{default:()=>e.h("span",{},{default:()=>a.tips}),trigger:()=>Y(Z(a.icon,a.color,void 0,a.disabled,a.loading,a.buttonText),a.text)}))}),e.h("div",{class:"action-flex"},{default:()=>t})},ee=o=>{try{return window.btoa(encodeURI(JSON.stringify(o)))}catch{return""}},ye=o=>{try{return JSON.parse(decodeURI(window.atob(o)))}catch{return""}},da=(o,t=500)=>{const a=o;let s;const r=function(...l){s||(s=setTimeout(function(){s&&clearTimeout(s),s=void 0,a.apply(r,l)},t))};return r};function ua(o,t){o.requestFullscreen?(t&&(o.onfullscreenchange=t),o.requestFullscreen()):o.mozRequestFullScreen?(t&&(o.onmozfullscreenchange=t),o.mozRequestFullScreen()):o.webkitRequestFullscreen?(t&&(o.onwebkitfullscreenchange=t),o.webkitRequestFullscreen()):o.msRequestFullscreen&&(t&&(o.onmsfullscreenchange=t),o.msRequestFullscreen())}function pa(o,t=0){const a=["","k","m","b","t"],s=Math.floor(Math.log10(Math.abs(o))/3),r=Math.max(0,Math.min(s,a.length-1)),c=a[r];return c?(o/Math.pow(10,r*3)).toFixed(t)+c:(o/Math.pow(10,r*3)).toFixed(0)}const xo=(o,t,a="json")=>ae({url:`${Be}${o}`,method:"GET",data:t,responseType:a}),x=(o,t={},a="json",s=3e5)=>ae({url:`${Be}${o}`,method:"POST",data:t,responseType:a,timeout:s}),Ie=(o,t)=>ae({headers:{"Content-Type":"multipart/form-data"},url:`${Be}${o}`,method:"POST",data:t}),ma=o=>!!(u.kind===-1||u.kind===99||u.iot_menu_authorization.includes(o)),fa=o=>u.platform_tdm?u.kind===-1||u.kind===99||o==="home"?!0:u.tdm_menu_authorization.includes(o):!1,ha=o=>u.platform_qms?u.kind===-1||u.kind===99||o==="home"?!0:u.qms_menu_authorization.includes(o):!1,ga=o=>u.platform_twin?(u.kind===-1||u.kind===99||o==="home",!0):!1,wa=o=>!!(u.kind===-1||u.kind===99||u.maintain_menu_authorization.includes(o)),Na=e.defineComponent({name:"OcTimePickRange",components:{NInputGroup:d.NInputGroup,NTimePicker:d.NTimePicker},props:{value:{required:!0,type:Array,default:()=>[]},format:{required:!1,type:String,default:"HH:mm"},disabled:{required:!1,type:Boolean,default:!1},clearable:{required:!1,type:Boolean,default:!1}},emits:["on-update:value"],setup(o,{emit:t}){const a=e.ref(null),s=e.ref(null),r=l=>{a.value=l,t("on-update:value",[a.value,s.value])},c=l=>{s.value=l,t("on-update:value",[a.value,s.value])};return e.onMounted(()=>{o.value&&(a.value=o.value[0],s.value=o.value[1])}),e.watch(()=>o.value,l=>{l&&(a.value=l[0],s.value=l[1])}),{startTime:a,endTime:s,updateStartValue:r,updateEndValue:c}}}),va=o=>(e.pushScopeId("data-v-8ef98aeb"),o=o(),e.popScopeId(),o),Ca=va(()=>e.createElementVNode("span",{class:"oc-time-picker-separator"},"-",-1));function ya(o,t,a,s,r,c){const l=e.resolveComponent("NTimePicker"),i=e.resolveComponent("NInputGroup");return e.openBlock(),e.createBlock(i,{class:"oc-time-picker"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.startTime,clearable:o.clearable,"on-update:value":o.updateStartValue,format:o.format,disabled:o.disabled},null,8,["value","clearable","on-update:value","format","disabled"]),Ca,e.createVNode(l,{value:o.endTime,clearable:o.clearable,format:o.format,disabled:o.disabled,"on-update:value":o.updateEndValue},null,8,["value","clearable","format","disabled","on-update:value"])]),_:1})}const ba=S(Na,[["render",ya],["__scopeId","data-v-8ef98aeb"]]),ka=e.defineComponent({name:"OcSearchBarItem",components:{NIcon:d.NIcon,NButton:d.NButton,NGrid:d.NGrid,NGridItem:d.NGridItem,NInput:d.NInput,NInputNumber:d.NInputNumber,NSelect:d.NSelect,NTooltip:d.NTooltip,NPopover:d.NPopover,NDataTable:d.NDataTable,NCascader:d.NCascader,NTreeSelect:d.NTreeSelect,NDatePicker:d.NDatePicker,NInputGroup:d.NInputGroup,NInputGroupLabel:d.NInputGroupLabel,OcTimePickRange:ba},props:{cols:{type:Number,default:4},small:{type:Boolean,default:!1}},setup(o,{expose:t}){const a=e.ref({}),s=e.ref(!0),r=e.ref(!0),c=e.ref(0),l=e.ref({}),i=e.ref({}),p=e.ref([{key:"label"}]),N=(g,w,y)=>{const D=y.options.filter(P=>String(P.label).toLocaleLowerCase().indexOf(String(w).toLocaleLowerCase())>-1)||[];l.value[g].options=D,D.length===0?l.value[g].display=!1:l.value[g].display=!0},C=g=>{var P;Object.keys(g).forEach(E=>{const M=g[E];M.show=M.show??!0,M.type==="dropdown"&&(l.value[E]={display:!1,options:M.options}),M.type==="group"&&(M.inputTemp=M.input.options[i.value[E]?i.value[E]:M.options[0].value])});let w=0;const y=o.small?1:o.cols,D=Object.keys(g);if(Object.keys(g).length>0)for(let E=0;E<=y;E++)(P=g[D[E]])!=null&&P.show&&(w=w+1);c.value=y-w>=0?y-w-1:-1,w>y?r.value=!0:r.value=!1,o.small&&(s.value=!1,r.value=!1),a.value=g},v=g=>{l.value[g].options.length===0?l.value[g].display=!1:l.value[g].display=!0},m=()=>{s.value=!s.value};return t({getValues:()=>{const g=JSON.stringify(i.value,(w,y)=>y===void 0?null:y);return JSON.parse(g)},setValues:g=>{i.value=g},dataFactory:C}),{more:r,offset:c,dataList:a,collapsed:s,searchData:i,dropDisplay:l,columnsPopover:p,showMore:m,dropValueChange:N,dropDisplayToggle:v}}}),_a={class:"oc-search-bar-line"},Va={key:0,class:"oc-search-action-more"},$a=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",fill:"currentColor"})])],-1),Sa=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})])],-1);function Ta(o,t,a,s,r,c){const l=e.resolveComponent("NGridItem"),i=e.resolveComponent("NInputGroupLabel"),p=e.resolveComponent("NInput"),N=e.resolveComponent("NInputNumber"),C=e.resolveComponent("NSelect"),v=e.resolveComponent("NDataTable"),m=e.resolveComponent("NPopover"),h=e.resolveComponent("NCascader"),V=e.resolveComponent("NTreeSelect"),g=e.resolveComponent("OcTimePickRange"),w=e.resolveComponent("NDatePicker"),y=e.resolveComponent("NInputGroup"),D=e.resolveComponent("NGrid"),P=e.resolveComponent("NIcon"),E=e.resolveComponent("NButton"),M=e.resolveComponent("NTooltip");return e.openBlock(),e.createElementBlock("div",_a,[e.createVNode(D,{"x-gap":"15","y-gap":"15",cols:o.small?1:o.cols,"collapsed-rows":1,collapsed:o.collapsed},{default:e.withCtx(()=>[o.offset>-1?(e.openBlock(),e.createBlock(l,{key:0,offset:o.offset},null,8,["offset"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dataList,(n,k,R)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${k}_${R}`},[n.show?(e.openBlock(),e.createBlock(l,{key:0},{default:e.withCtx(()=>[n.type!=="group"?(e.openBlock(),e.createBlock(y,{key:0},{default:e.withCtx(()=>{var O;return[e.createVNode(i,{class:"oc-group-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof n.title=="string"?n.title:n.title()),1)]),_:2},1024),n.type==="input"?(e.openBlock(),e.createBlock(p,{key:0,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="number"?(e.openBlock(),e.createBlock(N,{key:1,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),min:n==null?void 0:n.min,max:n==null?void 0:n.max,step:(n==null?void 0:n.step)||1,"show-button":(n==null?void 0:n.showButton)||!0,"update-value-on-input":!1,validator:n==null?void 0:n.validator,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0},e.createSlots({_:2},[n!=null&&n.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n==null?void 0:n.suffix),1)]),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="select"?(e.openBlock(),e.createBlock(C,{key:2,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,"show-checkmark":!1,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),options:n.options,multiple:n.multiple,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="dropdown"?(e.openBlock(),e.createBlock(m,{key:3,width:"trigger",trigger:"manual",style:{padding:"5px"},"show-arrow":!1,show:(O=o.dropDisplay[k])==null?void 0:O.display,"on-clickoutside":()=>{o.dropDisplay[k].display=!1}},{trigger:e.withCtx(()=>[e.createVNode(p,{value:o.searchData[k],disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),clearable:n.clearable??!0,"on-update:value":b=>{o.searchData[k]=b,o.dropValueChange(k,b,n)},onClick:b=>o.dropDisplayToggle(k),onFocus:b=>o.dropDisplayToggle(k)},null,8,["value","disabled","placeholder","clearable","on-update:value","onClick","onFocus"])]),default:e.withCtx(()=>{var b;return[e.createVNode(v,{columns:o.columnsPopover,data:((b=o.dropDisplay[k])==null?void 0:b.options)||[],"max-height":300,bordered:!1,"bottom-bordered":!1,"row-props":G=>({style:"cursor: pointer;",onClick:()=>{o.searchData[k]=G.value,o.dropDisplay[k].display=!1}}),size:"small","virtual-scroll":"",class:"oc-popover-table"},null,8,["columns","data","row-props"])]}),_:2},1032,["show","on-clickoutside"])):e.createCommentVNode("",!0),n.type==="cascader"?(e.openBlock(),e.createBlock(h,{key:4,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),options:n.options,"check-strategy":n.checkStrategy||"all",multiple:n.multiple,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="treeSelect"?(e.openBlock(),e.createBlock(V,{key:5,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),options:n.options,"check-strategy":n.checkStrategy||"all",multiple:n.multiple,"on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","disabled","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),n.type==="timePicker"?(e.openBlock(),e.createBlock(g,{key:6,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,"onOnUpdate:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=[...b]},format:n==null?void 0:n.format,clearable:n.clearable??!0},null,8,["value","onUpdate:value","disabled","onOnUpdate:value","format","clearable"])):e.createCommentVNode("",!0),n.type==="datePicker"?(e.openBlock(),e.createBlock(w,{key:7,value:o.searchData[k],"onUpdate:value":b=>o.searchData[k]=b,disabled:n==null?void 0:n.disabled,placeholder:typeof(n==null?void 0:n.placeholder)=="string"?n==null?void 0:n.placeholder:(n==null?void 0:n.placeholder)&&(n==null?void 0:n.placeholder()),type:n.dateType,format:n==null?void 0:n.format,"is-date-disabled":n==null?void 0:n.isDateDisabled,shortcuts:n==null?void 0:n.shortcuts,"update-value-on-close":n.dateType!=="year","on-update:value":b=>{n.updateValue?n.updateValue(b,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=b},clearable:n.clearable??!0,"close-on-select":""},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):e.createCommentVNode("",!0)]}),_:2},1024)):e.createCommentVNode("",!0),n.type==="group"?(e.openBlock(),e.createBlock(y,{key:1},{default:e.withCtx(()=>{var O,b,G,K,H,J,$,_,f,I,z,Q,ze,Ae,Re,Le,Ue,qe,je,Fe,Ge,He,Je,We,Ke,Qe,Xe,Ze,Ye,eo,oo,to,no;return[e.createVNode(C,{value:o.searchData[k],"onUpdate:value":B=>o.searchData[k]=B,options:n.options,"show-checkmark":!1,style:e.normalizeStyle(n.width?typeof n.width=="number"?{width:`${n.width}px`}:{width:n.width}:{}),"on-update:value":B=>{n.inputTemp=n.input.options[B],n.inputTemp.type==="datePicker"&&n.inputTemp.dateType.indexOf("range")>-1?o.searchData[n.input.key]=null:n.inputTemp.type==="datePicker"?o.searchData[n.input.key]=Date.now():o.searchData[n.input.key]="",n.updateValue?n.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=B},class:"oc-group-select",placeholder:" "},null,8,["value","onUpdate:value","options","style","on-update:value"]),((O=n.inputTemp)==null?void 0:O.type)==="input"?(e.openBlock(),e.createBlock(p,{key:0,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,disabled:(b=n.inputTemp)==null?void 0:b.disabled,placeholder:typeof((G=n.inputTemp)==null?void 0:G.placeholder)=="string"?(K=n.inputTemp)==null?void 0:K.placeholder:((H=n.inputTemp)==null?void 0:H.placeholder)&&((J=n.inputTemp)==null?void 0:J.placeholder()),"on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","on-update:value","clearable"])):e.createCommentVNode("",!0),(($=n.inputTemp)==null?void 0:$.type)==="number"?(e.openBlock(),e.createBlock(N,{key:1,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,disabled:(_=n.inputTemp)==null?void 0:_.disabled,placeholder:typeof((f=n.inputTemp)==null?void 0:f.placeholder)=="string"?(I=n.inputTemp)==null?void 0:I.placeholder:((z=n.inputTemp)==null?void 0:z.placeholder)&&((Q=n.inputTemp)==null?void 0:Q.placeholder()),min:(ze=n.inputTemp)==null?void 0:ze.min,max:(Ae=n.inputTemp)==null?void 0:Ae.max,step:((Re=n.inputTemp)==null?void 0:Re.step)||1,"show-button":((Le=n.inputTemp)==null?void 0:Le.showButton)||!0,"update-value-on-input":!1,validator:(Ue=n.inputTemp)==null?void 0:Ue.validator,"on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,style:{flex:"1"}},e.createSlots({_:2},[(qe=n.inputTemp)!=null&&qe.suffix?{name:"suffix",fn:e.withCtx(()=>{var B;return[e.createTextVNode(e.toDisplayString((B=n.inputTemp)==null?void 0:B.suffix),1)]}),key:"0"}:void 0]),1032,["value","onUpdate:value","disabled","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):e.createCommentVNode("",!0),((je=n.inputTemp)==null?void 0:je.type)==="datePicker"?(e.openBlock(),e.createBlock(w,{key:2,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,disabled:(Fe=n.inputTemp)==null?void 0:Fe.disabled,placeholder:typeof((Ge=n.inputTemp)==null?void 0:Ge.placeholder)=="string"?(He=n.inputTemp)==null?void 0:He.placeholder:((Je=n.inputTemp)==null?void 0:Je.placeholder)&&((We=n.inputTemp)==null?void 0:We.placeholder()),type:n.inputTemp.dateType,format:(Ke=n.inputTemp)==null?void 0:Ke.format,"is-date-disabled":(Qe=n.inputTemp)==null?void 0:Qe.isDateDisabled,shortcuts:(Xe=n.inputTemp)==null?void 0:Xe.shortcuts,"update-value-on-close":n.inputTemp.dateType!=="year","on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,"close-on-select":"",style:{flex:"1"}},null,8,["value","onUpdate:value","disabled","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):e.createCommentVNode("",!0),((Ze=n.inputTemp)==null?void 0:Ze.type)==="select"?(e.openBlock(),e.createBlock(C,{key:3,value:o.searchData[n.input.key],"onUpdate:value":B=>o.searchData[n.input.key]=B,"show-checkmark":!1,disabled:(Ye=n.inputTemp)==null?void 0:Ye.disabled,placeholder:typeof((eo=n.inputTemp)==null?void 0:eo.placeholder)=="string"?(oo=n.inputTemp)==null?void 0:oo.placeholder:((to=n.inputTemp)==null?void 0:to.placeholder)&&((no=n.inputTemp)==null?void 0:no.placeholder()),options:n.inputTemp.options,multiple:n.inputTemp.multiple,"on-update:value":B=>{var L;(L=n.inputTemp)!=null&&L.updateValue?n.inputTemp.updateValue(B,JSON.parse(JSON.stringify(o.searchData))):o.searchData[n.input.key]=B},clearable:n.inputTemp.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","disabled","placeholder","options","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0)]}),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["cols","collapsed"]),o.more?(e.openBlock(),e.createElementBlock("div",Va,[e.createVNode(M,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(E,{onClick:o.showMore},{icon:e.withCtx(()=>[o.collapsed?(e.openBlock(),e.createBlock(P,{key:0},{default:e.withCtx(()=>[$a]),_:1})):(e.openBlock(),e.createBlock(P,{key:1},{default:e.withCtx(()=>[Sa]),_:1}))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.more")),1)]),_:1})])):e.createCommentVNode("",!0)])}const Ba=S(ka,[["render",Ta]]),Ia=e.defineComponent({name:"OcSearchBarPop",props:{value:{required:!0,type:Boolean,default:!1}},emits:["on-update:value"],setup(o,{emit:t}){return{close:()=>{t("on-update:value",!1)}}}}),Da={class:"oc-search-bar-pop"},Pa={class:"oc-search-bar-pop-plan"},Ea={class:"oc-search-bar-pop-action"},Ma={class:"oc-search-bar-pop-content"};function xa(o,t,a,s,r,c){return e.withDirectives((e.openBlock(),e.createElementBlock("div",Da,[e.createElementVNode("div",{class:"oc-search-bar-pop-mask",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))}),e.createElementVNode("div",Pa,[e.createElementVNode("div",Ea,[e.renderSlot(o.$slots,"action")]),e.createElementVNode("div",Ma,[e.renderSlot(o.$slots,"default")])])],512)),[[e.vShow,o.value]])}const Oa=S(Ia,[["render",xa]]),za=e.defineComponent({name:"OcSearchBar",components:{NSpace:d.NSpace,NIcon:d.NIcon,NTooltip:d.NTooltip,NButton:d.NButton,NPopover:d.NPopover,OcSearchBarItem:Ba,OcSearchBarPop:Oa},props:{value:{required:!0,type:Object,default:()=>({})},defaultValue:{required:!0,type:Object,default:()=>({})},data:{required:!0,type:Object,default:()=>({})},loading:{type:Boolean,default:!1},cols:{type:Number,default:4},small:{type:Boolean,default:!1},autoSubmit:{type:Boolean,default:!0},cache:{type:Boolean,default:!0},resetButton:{type:Boolean,default:!0}},emits:["update:loading","on-update:value"],setup(o,{emit:t,slots:a,expose:s}){const r=q.useRoute(),c=q.useRouter(),l=e.ref(),i=e.ref({}),p=e.ref(!1),N=e.ref(!!a.header),C=e.ref(!!a.action),v=(g=!1)=>{if(!o.loading&&l.value){const w=l.value.getValues();if(!g&&w.query&&(w.query.page=1),t("update:loading",!0),t("on-update:value",w,g),o.cache){const y=r.path,D=ee(w),P=ee(y);c.replace(`${y}?cursor=${D}&routerId=${P}`)}}},m=()=>{o.loading||(h(JSON.parse(JSON.stringify(o.defaultValue))),v())},h=(g,w=!1)=>{if(l.value&&l.value.setValues(JSON.parse(JSON.stringify(g))),V(o.data),w)c.replace(r.path);else if(o.cache){const y=r.path,D=ee(g),P=ee(y);c.replace(`${y}?cursor=${D}&routerId=${P}`)}},V=g=>{l.value&&l.value.dataFactory(g)};return s({setValues:h,setData:V}),e.onMounted(()=>{setTimeout(()=>{let g=o.value;if(o.cache){const{cursor:w,routerId:y}=r.query;if(w&&y){const D=r.path,P=ye(y),E=ye(w);P===D&&(g=E)}}l.value&&l.value.setValues(JSON.parse(JSON.stringify(g))),l.value&&l.value.dataFactory(o.data),o.autoSubmit&&v(!0)},100)}),e.onBeforeUnmount(()=>{}),{itemRef:l,drawer:p,isSlotHeader:N,isSlotAction:C,headerStore:T,itemData:i,doSearch:v,clearAll:m}}}),Aa={key:0,class:"oc-search-bar-title"},Ra={key:1,class:"oc-search-bar-popover"},La=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",fill:"currentColor"})])],-1),Ua=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})])],-1),qa=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})])],-1),ja={key:0},Fa=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M26 6H4v3.17l7.41 7.42l.59.58V26h4v-2h2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-8l-7.41-7.41A2 2 0 0 1 2 9.17V6a2 2 0 0 1 2-2h22z",fill:"currentColor"}),e.createElementVNode("path",{d:"M29.71 11.29l-3-3a1 1 0 0 0-1.42 0L16 17.59V22h4.41l9.3-9.29a1 1 0 0 0 0-1.42zM19.59 20H18v-1.59l5-5L24.59 15zM26 13.59L24.41 12L26 10.41L27.59 12z",fill:"currentColor"})],-1),Ga={class:"oc-search-bar-center"},Ha=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})])],-1),Ja=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})])],-1);function Wa(o,t,a,s,r,c){const l=e.resolveComponent("OcSearchBarItem"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NSpace"),C=e.resolveComponent("OcSearchBarPop"),v=e.resolveComponent("NTooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["oc-search-bar",{small:!o.isSlotHeader&&(o.small||o.headerStore.isMobile)}]),onKeyup:t[6]||(t[6]=e.withKeys(m=>o.doSearch(!1),["enter"]))},[o.isSlotHeader?(e.openBlock(),e.createElementBlock("span",Aa,[e.renderSlot(o.$slots,"header")])):e.createCommentVNode("",!0),o.small||o.headerStore.isMobile?(e.openBlock(),e.createElementBlock("div",Ra,[e.createVNode(C,{value:o.drawer,"onUpdate:value":t[2]||(t[2]=m=>o.drawer=m),"onOnUpdate:value":t[3]||(t[3]=m=>o.drawer=m)},{action:e.withCtx(()=>[e.createVNode(N,{size:15,justify:"space-between",wrap:!1},{default:e.withCtx(()=>[e.createVNode(p,{onClick:t[0]||(t[0]=m=>o.drawer=!1)},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[La]),_:1})]),_:1}),o.resetButton?(e.openBlock(),e.createBlock(p,{key:0,loading:o.loading,onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Ua]),_:1})]),_:1},8,["loading","onClick"])):e.createCommentVNode("",!0),e.createVNode(p,{loading:o.loading,class:"button-primary",onClick:t[1]||(t[1]=()=>{o.drawer=!1,o.doSearch(!1)})},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[qa]),_:1})]),_:1},8,["loading"])]),_:1}),o.isSlotAction?(e.openBlock(),e.createElementBlock("br",ja)):e.createCommentVNode("",!0),o.isSlotAction?(e.openBlock(),e.createBlock(N,{key:1,size:15,justify:"space-between",class:"oc-search-action"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"action")]),_:3})):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(l,{ref:"itemRef",loading:o.loading,small:""},null,8,["loading"])]),_:3},8,["value"]),e.createVNode(p,{onClick:t[4]||(t[4]=m=>o.drawer=!0)},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Fa]),_:1})]),_:1})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",Ga,[e.createVNode(l,{ref:"itemRef",loading:o.loading,cols:o.cols},null,8,["loading","cols"]),e.createVNode(N,{size:15,wrap:!1,style:{"padding-left":"15px"}},{default:e.withCtx(()=>[e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,class:"button-primary",onClick:t[5]||(t[5]=m=>o.doSearch(!1))},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Ha]),_:1})]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.search")),1)]),_:1}),o.resetButton?(e.openBlock(),e.createBlock(v,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[Ja]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.reset")),1)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(N,{size:15,wrap:!1,class:"oc-search-action"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"action")]),_:3})],64))],34)}const Oo=S(za,[["render",Wa]]),Ka=e.defineComponent({name:"HeaderPop",components:{NSpace:d.NSpace,NInput:d.NInput,NPopover:d.NPopover,NTooltip:d.NTooltip,NButton:d.NButton,NIcon:d.NIcon,NDataTable:d.NDataTable,IconSearch:So,IconArrowClockwise:te,IconArrowSquareDown:ko},setup(){const{t:o}=W.useI18n(),t=e.ref(!1),a=d.useNotification(),s=e.ref([]),r=e.ref(""),c=e.ref(!1),l=e.ref({page:1,pageCount:1,pageSize:30}),i=e.ref([{title:()=>o("Common.importer.fileName"),key:"jobName",width:300,render(h){return e.h("div",{},{default:()=>[e.h("p",{},{default:()=>h.jobName||"--"}),e.h("p",{style:{color:"rgba(var(--font), 0.6)"}},{default:()=>F(h.commitTime,"yyyy-MM-dd hh:mm:ss")})]})}},{title:()=>o("Common.importer.status"),key:"jobStatus",align:"center",width:90,render(h){let V=o("Common.processing");return h.jobStatus===1&&(V=o("Common.success")),h.jobStatus===2&&(V=o("Common.failed")),e.h("span",{},{default:()=>V})}},{title:()=>o("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(h){const V=[{type:"delete",onClick:()=>{Nt([h.jobId]).then(()=>{a.success({content:()=>o("Notice.success"),duration:3e3}),v()}).catch(()=>{a.error({content:()=>o("Notice.error"),duration:3e3})})}}];return h.jobStatus===2?V.unshift({type:"custom",onClick:()=>{vt(h.jobId).then(()=>{a.success({content:()=>o("Notice.success"),duration:3e3}),v()}).catch(()=>{a.error({content:()=>o("Notice.error"),duration:3e3})})},icon:te,color:"info",text:o("Common.importer.retry")}):V.unshift({type:"custom",disabled:h.jobStatus!==1,onClick:()=>{window.open(h.downloadUrl)},icon:pe,color:"success",text:o("Common.importer.btnDownload")}),le(V)}}]),p=h=>{l.value.page=h,v()},N=h=>{l.value.pageSize=h,l.value.page=1,v()},C=()=>{l.value.page=1,v()},v=()=>{c.value||(c.value=!0,Ct({jobType:"EXPORT",jobName:r.value,query:l.value}).then(h=>{l.value=h.query,s.value=h.records,c.value=!1}).catch(()=>{c.value=!1}))},m=h=>{ke(h),t.value=h};return v(),e.watch(()=>T.download,h=>{t.value=h,h&&v()}),{jobName:r,loading:c,columns:i,coldata:s,query:l,popDownload:t,init:v,pageChange:p,pageSizeChange:N,doSearch:C,popDownloadUpdate:m}}}),Qa={class:"header-download"};function Xa(o,t,a,s,r,c){const l=e.resolveComponent("IconArrowSquareDown"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NInput"),C=e.resolveComponent("IconSearch"),v=e.resolveComponent("NTooltip"),m=e.resolveComponent("IconArrowClockwise"),h=e.resolveComponent("NSpace"),V=e.resolveComponent("NDataTable"),g=e.resolveComponent("NPopover");return e.openBlock(),e.createBlock(g,{trigger:"click",placement:"bottom-end",show:o.popDownload,"show-arrow":!1,"on-update:show":o.popDownloadUpdate,style:{width:"650px"}},{trigger:e.withCtx(()=>[e.createVNode(p,{text:"",style:{"margin-left":"15px"}},{icon:e.withCtx(()=>[e.createVNode(i,{class:"com-header-icon"},{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(h,{justify:"end"},{default:e.withCtx(()=>[e.createElementVNode("span",Qa,e.toDisplayString(o.$t("Common.validDays")),1),e.createVNode(N,{value:o.jobName,"onUpdate:value":t[0]||(t[0]=w=>o.jobName=w),type:"text",clearable:"",placeholder:o.$t("Common.importer.fileName")},null,8,["value","placeholder"]),e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,class:"button-primary",onClick:o.doSearch},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(C)]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.search")),1)]),_:1}),e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(m)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1})]),_:1}),e.createVNode(V,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1},8,["show","on-update:show"])}const Za=S(Ka,[["render",Xa]]),Ya=e.defineComponent({name:"HeaderPop",components:{NBadge:d.NBadge,NPopover:d.NPopover,NSpace:d.NSpace,NTooltip:d.NTooltip,NButton:d.NButton,NIcon:d.NIcon,NDataTable:d.NDataTable,NRadioGroup:d.NRadioGroup,NRadioButton:d.NRadioButton,IconAlert:Co,IconClear:yo,IconArrowClockwise:te},setup(){const{t:o}=W.useI18n(),t=e.ref(0),a=e.ref(0),s=e.ref([]),r=e.ref(""),c=e.ref(!1),l=e.ref({page:1,pageCount:1,pageSize:30}),i=e.ref([{title:()=>o("Common.message.title2"),key:"messageContent",width:300,render(h){return[e.h("div",{class:h.status===1?"card-grey-txt":""},{default:()=>h.messageContent}),e.h("div",{class:"card-grey-txt"},{default:()=>F(h.createTime,"yyyy-MM-dd hh:mm:ss")})]}},{title:()=>o("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(h){return h.status===0?le([{type:"custom",color:"primary",text:o("Common.message.read"),buttonText:o("Common.message.read"),onClick:()=>{bt(h.messageId).then(()=>{m()}).catch(()=>{m()})}}]):e.h("div",{},{default:()=>`${h.updateByName} ${o("Common.message.read")}`})}}]),p=h=>{l.value.page=1,t.value=h,m()},N=()=>{gt().then(()=>{m()}).catch(()=>{m()})},C=h=>{l.value.page=h,m()},v=h=>{l.value.pageSize=h,l.value.page=1,m()},m=()=>{c.value||(c.value=!0,yt({status:t.value,query:l.value}).then(h=>{a.value=h.unRead,l.value=h.data.query,s.value=h.data.records,c.value=!1}).catch(()=>{c.value=!1}))};return m(),{badge:a,radios:t,jobName:r,loading:c,columns:i,coldata:s,query:l,clearAll:N,pageChange:C,pageSizeChange:v,init:m,radiosChecked:p}}}),er={class:"com-title"};function or(o,t,a,s,r,c){const l=e.resolveComponent("IconAlert"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NBadge"),C=e.resolveComponent("NRadioButton"),v=e.resolveComponent("NRadioGroup"),m=e.resolveComponent("IconClear"),h=e.resolveComponent("NTooltip"),V=e.resolveComponent("IconArrowClockwise"),g=e.resolveComponent("NSpace"),w=e.resolveComponent("NDataTable"),y=e.resolveComponent("NPopover");return e.openBlock(),e.createBlock(y,{trigger:"click",placement:"bottom-end","show-arrow":!1,style:{width:"650px"}},{trigger:e.withCtx(()=>[e.createVNode(N,{value:o.badge,max:99},{default:e.withCtx(()=>[e.createVNode(p,{text:"",style:{"margin-left":"30px"}},{icon:e.withCtx(()=>[e.createVNode(i,{class:"com-header-icon"},{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),_:1})]),_:1},8,["value"])]),default:e.withCtx(()=>[e.createVNode(g,{justify:"space-between"},{default:e.withCtx(()=>[e.createElementVNode("div",er,e.toDisplayString(o.$t("Common.message.title")),1),e.createVNode(v,{value:o.radios,"onUpdate:value":t[0]||(t[0]=D=>o.radios=D),name:"radios","on-update:value":o.radiosChecked},{default:e.withCtx(()=>[e.createVNode(C,{key:"0",value:0,label:o.$t("Common.message.unRead")},null,8,["label"]),e.createVNode(C,{key:"-1",value:-1,label:o.$t("Common.message.all")},null,8,["label"]),e.createVNode(C,{key:"1",value:1,label:o.$t("Common.message.read")},null,8,["label"])]),_:1},8,["value","on-update:value"]),e.createElementVNode("div",null,[e.createVNode(h,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(m)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.message.readAll")),1)]),_:1}),e.createVNode(h,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(V)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1})])]),_:1}),e.createVNode(w,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1})}const tr=S(Ya,[["render",or]]),nr=e.defineComponent({name:"OcHeader",components:{Pop:Za,Message:tr,NDropdown:d.NDropdown,NMenu:d.NMenu,NIcon:d.NIcon,NButton:d.NButton,NDrawer:d.NDrawer,NDrawerContent:d.NDrawerContent,NCard:d.NCard,IconWeatherSunny:Vo,IconWeatherMoon:_o,IconGridDots:$o,IconDismiss:ne},props:{qiankun:{type:Boolean,default:!1},mainUrl:{type:String,default:"https://www.partexiot.cn"},language:{type:Boolean,default:!1},report:{type:Boolean,default:!1},menuOptions:{required:!0,type:Array,default:()=>[]}},setup(o){const{t}=W.useI18n(),a=q.useRoute(),s=q.useRouter(),r=d.useNotification(),c=e.ref(""),l=e.ref("/iot/home"),i=e.ref(!1),p=e.ref(!1),N=e.ref(void 0),C=e.ref(10),v=e.ref([]),m=e.ref(""),h=e.ref(A("lang","zh-CN")),V=f=>{i.value=f,_e(f),j("theme",f,0)},g=f=>{const I=f.split("/");l.value=`/${I[1]}/${I[2]}`,Eo()},w=f=>{f.disabled||(g(f.key),s.push(f.key))},y=f=>{if(!f.disabled){if(f.children)return;g(f.key),s.push(f.key),p.value=!1}},D=f=>e.h("div",{onClick:()=>w(f)},{default:()=>f.label}),P=f=>e.h("div",{onClick:()=>y(f)},{default:()=>f.label}),E=f=>f.icon?e.h(d.NIcon,{size:24,onClick:()=>w(f)},{default:()=>f.icon&&f.icon()}):!1,M=f=>{o.qiankun?window.location.href=`${o.mainUrl||"https://www.partexiot.cn"}${f}`:s.replace(f)},n=()=>{p.value=!1},k=()=>{let f=T.platformMainUrl||T.platformUrl;T.platformMainUrl==="auto"&&(u.industryCategory==="0"?f="https://www.partexiot.cn":u.industryCategory==="1"&&(f="https://printing.partexiot.cn"));const I=[{label:t("Platform.iot"),key:f}];return u.platform_tdm&&I.push({label:t("Platform.tdm"),key:"/tdm/home"}),u.platform_qms&&I.push({label:t("Platform.qms"),key:"/qms/home"}),u.platform_twin&&I.push({label:t("Platform.twin"),key:"/twin/home"}),u.platform_maintain&&I.push({label:t("Platform.maintain"),key:"/maintain/home"}),I},R=()=>{const f=[{label:u.tenantName,key:"tenantName"}];return f.push({label:`主题 ${i?"亮":"暗"}`,key:"theme"},{label:`语言 ${h.value==="zh-CN"?"EN":"中文"}`,key:"language"}),f.push({label:t("Common.dropdownMenu.software"),key:"app",children:[{label:t("Common.dropdownMenu.android"),key:"android"},{label:t("Common.dropdownMenu.ios"),key:"ios"},{label:t("Common.dropdownMenu.chrome"),key:"chrome"},{label:t("Common.dropdownMenu.edge"),key:"edge"},{label:t("Common.dropdownMenu.dashboard_IoT"),key:"dashboard_IoT"},{label:t("Common.dropdownMenu.dashboard_Prt"),key:"dashboard_Prt"}]}),o.report&&f.push({label:t("Common.dropdownMenu.report"),key:"report"}),f.push({label:t("Common.dropdownMenu.info"),key:"info"},{label:t("Common.dropdownMenu.logout"),key:"logout"}),f},O=async f=>{f==="logout"&&$e(),f==="theme"&&V(!i.value),f==="language"&&H(),f==="info"&&s.push("/custom/my"),f==="report"&&s.push("/custom/report"),f==="android"&&window.open("http://miiot.partexiot.cn/dk7u"),f==="ios"&&window.open("https://apps.apple.com/cn/app/id1587313547"),f==="chrome"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/chrome_installer.exe"),f==="edge"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/MicrosoftEdgeSetup.exe"),f==="dashboard_IoT"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94IoT_v1.2.0.zip"),f==="dashboard_Prt"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94%E5%8D%B0%E5%88%B7%E7%89%88_v1.2.0.zip")},b=()=>{wt().then(()=>{r.success({content:"续订请求已发送,七个工作日内将会有专人联系",duration:3e3})}).catch(()=>{r.error({content:()=>t("Notice.error"),duration:3e3})})},G=()=>{if(u.tenantStatus===0&&u.renewalStatus===0){const f=document.getElementById("app");f&&f.classList.add("outrange"),r.info({action:()=>e.h(d.NSpace,{size:[15,15]},{default:()=>e.h(d.NButton,{class:"button-primary","on-click":()=>{b()}},{default:()=>"立即续订"})}),closable:!1,content:`您的订阅已于${F(u.endTime)}到期,如需继续使用请联系我们`,title:"到期提示"})}if(u.tenantStatus===2&&u.renewalStatus===0){let f=`您的订阅即将于${F(u.endTime)}到期,请联系管理员进行续订`,I=[e.h(d.NButton,{secondary:!0,"on-click":()=>{r.destroyAll()}},{default:()=>"了解"})];u.kind===99&&(f=`您的订阅即将于${F(u.endTime)}到期,为保证持续有效的提供服务请立即续订`,I=[e.h(d.NButton,{secondary:!0,"on-click":()=>{r.destroyAll()}},{default:()=>"稍后提示我"}),e.h(d.NButton,{class:"button-primary","on-click":()=>{b()}},{default:()=>"立即续订"})]),r.info({action:()=>e.h(d.NSpace,{size:[15,15]},{default:()=>I}),closable:!1,content:f,title:"温馨提示"})}},K=()=>{s.push(T.platformUrl)},H=()=>{h.value=h.value==="zh-CN"?"en-US":"zh-CN",oe(h.value)},J=()=>{c.value=t("Platform.iot"),a.path.indexOf("tdm")>-1&&(c.value=t("Platform.tdm")),a.path.indexOf("qms")>-1&&(c.value=t("Platform.qms")),a.path.indexOf("twin")>-1&&(c.value=t("Platform.twin")),a.path.indexOf("maintain")>-1&&(c.value=t("Platform.maintain")),mt(c.value)},$=A("theme",!1);V($),"backdropFilter"in document.documentElement.style||"WebkitBackdropFilter"in document.documentElement.style||document.body.classList.add("not-support-backdrop");const _=()=>{if(u.tenantStatus===0){const f=document.body;f&&f.classList.add("outrange")}};return e.onMounted(()=>{oe(h.value),G(),g(a.path),J(),_(),v.value=k()}),e.watch(()=>T.isMobile,()=>{window.screen.availWidth<=1300&&window.screen.availWidth>=1030?m.value="tiny-menu":window.screen.availWidth<769?m.value="hide-menu":m.value=""}),e.watch(()=>T.lang,()=>{J()}),e.watch(()=>a.path,f=>{g(f),_()}),e.watch(()=>T.needUpdate,f=>{if(f){N.value=setInterval(()=>{C.value=C.value-1,C.value<=0&&(clearInterval(window.versionMonitor),clearInterval(N.value),N.value=void 0,I.destroy())},1e3);const I=r.create({title:"检测到系统有新版本需要更新",content:()=>`是否立即更新?更新需要重新加载页面,请确保所有项目都已经保存完毕。${C.value}秒后自动关闭`,meta:F(new Date,"yyyy-MM-dd hh:mm:ss"),onClose:()=>{clearInterval(window.versionMonitor)},action:()=>e.h(d.NSpace,{justify:"space-between"},{default:()=>[e.h(d.NButton,{quaternary:!0,onClick:()=>{clearInterval(window.versionMonitor),I.destroy()}},{default:()=>"稍后"}),e.h(d.NButton,{type:"primary",onClick:()=>{window.location.reload()}},{default:()=>"更新"})]})})}}),{userStore:u,headerStore:T,theme:i,activeMenu:l,lang:h,platformName:c,platformOption:v,showMenu:p,menuType:m,changeLang:H,setDropdownMenu:R,renderMenuLabel:D,renderMenuLabel2:P,renderMenuIcon:E,indexClick:K,platformClick:M,dropdownClick:O,changeTheme:V,closeModel:n}}}),ar={class:"oc-header"},rr={class:"menu"},lr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 160h352"}),e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 256h352"}),e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 352h352"})],-1),sr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M17.754 14a2.249 2.249 0 0 1 2.249 2.25v.918a2.75 2.75 0 0 1-.513 1.598c-1.545 2.164-4.07 3.235-7.49 3.235c-3.421 0-5.944-1.072-7.486-3.236a2.75 2.75 0 0 1-.51-1.596v-.92A2.249 2.249 0 0 1 6.251 14h11.502zM12 2.005a5 5 0 1 1 0 10a5 5 0 0 1 0-10z",fill:"currentColor"})])],-1);function cr(o,t,a,s,r,c){const l=e.resolveComponent("IconGridDots"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NDropdown"),C=e.resolveComponent("NMenu"),v=e.resolveComponent("Pop"),m=e.resolveComponent("Message"),h=e.resolveComponent("IconWeatherMoon"),V=e.resolveComponent("IconWeatherSunny"),g=e.resolveComponent("NDrawerContent"),w=e.resolveComponent("NDrawer");return e.openBlock(),e.createElementBlock("header",ar,[o.platformOption.length>1?(e.openBlock(),e.createBlock(N,{key:0,trigger:"hover",placement:"bottom-start",size:"huge",options:o.platformOption,onSelect:o.platformClick},{default:e.withCtx(()=>[e.createVNode(p,{style:{padding:"0 14px 0 0"}},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),_:1})]),_:1},8,["options","onSelect"])):e.createCommentVNode("",!0),e.createElementVNode("a",{href:"javascript:;",class:"logo",onClick:t[0]||(t[0]=(...y)=>o.indexClick&&o.indexClick(...y))}),e.createElementVNode("a",{href:"javascript:;",class:"platform-txt",onClick:t[1]||(t[1]=(...y)=>o.indexClick&&o.indexClick(...y))}," | "+e.toDisplayString(o.platformName),1),e.createElementVNode("div",rr,[e.createVNode(C,{value:o.activeMenu,"onUpdate:value":t[2]||(t[2]=y=>o.activeMenu=y),mode:"horizontal",options:o.menuOptions,"render-icon":o.renderMenuIcon,"render-label":o.renderMenuLabel,class:e.normalizeClass(["header-menu",o.menuType])},null,8,["value","options","render-icon","render-label","class"]),o.headerStore.isMobile?(e.openBlock(),e.createBlock(p,{key:0,onClick:t[3]||(t[3]=y=>o.showMenu=!0)},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[lr]),_:1})]),_:1})):e.createCommentVNode("",!0),o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:1})),o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:2})),o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(p,{key:3,style:{"margin-left":"15px"},onClick:t[4]||(t[4]=y=>o.changeTheme(!o.theme))},{icon:e.withCtx(()=>[e.withDirectives(e.createVNode(i,{color:"#8e54c8"},{default:e.withCtx(()=>[e.createVNode(h)]),_:1},512),[[e.vShow,o.theme]]),e.withDirectives(e.createVNode(i,{color:"#f2a651"},{default:e.withCtx(()=>[e.createVNode(V)]),_:1},512),[[e.vShow,!o.theme]])]),_:1})),o.language&&!o.headerStore.isMobile?(e.openBlock(),e.createBlock(p,{key:4,class:"com-header-icon",onClick:o.changeLang},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.lang==="zh-CN"?"EN":"中文"),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(N,{trigger:"click",placement:"bottom-end",options:o.setDropdownMenu(),onSelect:o.dropdownClick},{default:e.withCtx(()=>[e.createVNode(p,{text:"",class:"user",title:o.userStore.name},e.createSlots({default:e.withCtx(()=>[o.headerStore.isMobile?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(o.userStore.name),1)],64))]),_:2},[o.headerStore.isMobile?{name:"icon",fn:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[sr]),_:1})]),key:"0"}:void 0]),1032,["title"])]),_:1},8,["options","onSelect"])]),e.createVNode(w,{show:o.showMenu,"onUpdate:show":t[6]||(t[6]=y=>o.showMenu=y)},{default:e.withCtx(()=>[e.createVNode(g,{title:o.platformName,"native-scrollbar":!1,closable:""},{default:e.withCtx(()=>[e.createVNode(C,{value:o.activeMenu,"onUpdate:value":t[5]||(t[5]=y=>o.activeMenu=y),"default-expand-all":!0,options:o.menuOptions,"render-label":o.renderMenuLabel2},null,8,["value","options","render-label"])]),_:1},8,["title"])]),_:1},8,["show"])])}const zo=S(nr,[["render",cr]]),ir=e.defineComponent({name:"OcFooter",props:{version:{type:String,default:""}}}),dr={class:"footer"},ur=e.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),pr=e.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"footer-record"}," 沪ICP备 18025935号-3 ",-1);function mr(o,t,a,s,r,c){return e.openBlock(),e.createElementBlock("footer",dr,[e.createTextVNode(" Copyright "),ur,e.createTextVNode(" 2020-2024 "+e.toDisplayString(o.$t("Common.title"))+" ",1),o.version?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("v"+e.toDisplayString(o.version)+" ",1)],64)):e.createCommentVNode("",!0),pr])}const Ao=S(ir,[["render",mr]]),fr=e.defineComponent({name:"OcBack",components:{IconChevronLeft:bo,NButton:d.NButton,NIcon:d.NIcon},props:{to:{type:String,default:""}},setup(o){const t=q.useRouter();return{back:()=>{o.to?t.push(o.to):t.back()}}}});function hr(o,t,a,s,r,c){const l=e.resolveComponent("IconChevronLeft"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton");return e.openBlock(),e.createBlock(p,{text:"",onClick:o.back},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(o.$t("Common.back")),1)]),_:1},8,["onClick"])}const Ro=S(fr,[["render",hr]]),Lo=o=>{const t=new FormData;return Object.keys(o).forEach(a=>{o.query&&a==="query"?t.append("query",JSON.stringify(o.query)):t.append(a,o[a])}),Ie("api/manager/job/submit",t)},gr=o=>new Promise((t,a)=>{const s=fe(o);x("api/manager/job/page",s).then(r=>{const c=me(r);t(c)}).catch(()=>{a()})}),wr=(o,t={})=>xo(o,t,"blob"),Nr=e.defineComponent({name:"OcImporter",components:{IconDismiss:ne,IconArrowClockwise:te,IconMailInboxAdd:Do,IconCloudArrowDown:Po,NModal:d.NModal,NCard:d.NCard,NSpace:d.NSpace,NUpload:d.NUpload,NButton:d.NButton,NTooltip:d.NTooltip,NIcon:d.NIcon,NDataTable:d.NDataTable},props:{show:{required:!0,type:Boolean,default:!1},type:{required:!0,type:String,default:""},params:{required:!1,type:String,default:""},file:{required:!0,type:String,default:""},steam:{type:Boolean,default:!1}},emits:["update:show"],setup(o,{emit:t}){const{t:a}=W.useI18n(),s=d.useNotification(),r=e.ref(!1),c=e.ref(!1),l=e.ref({page:1,pageCount:1,pageSize:30}),i=e.ref([{title:"#",width:60,align:"center",key:"index",render(g,w){return e.h("span",{},{default:()=>w+1})}},{title:a("Common.importer.fileName"),key:"jobName",fixed:"left"},{title:a("Common.importer.status"),key:"jobStatus",width:120,render(g){let w=a("Common.processing");return g.jobStatus===1&&(w=a("Common.success")),g.jobStatus===2&&(w=a("Common.failed")),e.h("span",{},{default:()=>w})}},{title:a("Common.importer.createTime"),key:"commitTime",width:200,render(g){return e.h("div",{},{default:()=>F(g.commitTime,"yyyy-MM-dd hh:mm:ss")})}},{title:a("Common.action"),key:"action",align:"center",fixed:"right",width:120,render(g){return le([{type:"custom",disabled:g.jobStatus===0,onClick:()=>{window.open(g.downloadUrl)},icon:pe,color:"success",text:a("Common.importer.btnDownload")}])}}]),p=e.ref([]),N=()=>{t("update:show",!1)},C=g=>{l.value.page=g,h()},v=g=>{l.value.pageSize=g,l.value.page=1,h()},m=g=>new Promise((w,y)=>{g.file.file&&Lo({jobType:"IMPORT",jobTypeName:o.type,jobParams:o.params,file:g.file.file}).then(()=>{h(),w()}).catch(()=>{h(),y()}),y()}),h=()=>{c.value=!0,gr({jobType:"IMPORT",jobTypeName:o.type,query:l.value}).then(g=>{c.value=!1,p.value=g.records,l.value=g.query}).catch(()=>{c.value=!1})},V=()=>{o.steam?wr(o.file).then(g=>{const w=document.createElement("a");w.style.display="none",w.download="刀组品号导入模板.xls",w.href=URL.createObjectURL(g),document.body.appendChild(w),w.click(),URL.revokeObjectURL(w.href),document.body.removeChild(w)}).catch(()=>{s.error({content:()=>a("Notice.error"),duration:3e3})}):window.open(`${o.file}?v=${Date.now()}`)};return e.watch(()=>o.show,g=>{r.value=g,g&&(l.value={page:1,pageCount:1,pageSize:30},h())}),{modal:r,columns:i,coldata:p,query:l,loading:c,init:h,closeModel:N,pageChange:C,pageSizeChange:v,beforeUpload:m,downloadFile:V}}}),vr={class:"header-download"};function Cr(o,t,a,s,r,c){const l=e.resolveComponent("IconMailInboxAdd"),i=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),N=e.resolveComponent("NUpload"),C=e.resolveComponent("IconCloudArrowDown"),v=e.resolveComponent("IconArrowClockwise"),m=e.resolveComponent("NTooltip"),h=e.resolveComponent("IconDismiss"),V=e.resolveComponent("NSpace"),g=e.resolveComponent("NDataTable"),w=e.resolveComponent("NCard"),y=e.resolveComponent("NModal");return e.openBlock(),e.createBlock(y,{show:o.modal,"onUpdate:show":t[0]||(t[0]=D=>o.modal=D),"on-mask-click":o.closeModel},{default:e.withCtx(()=>[e.createVNode(w,{style:{width:"900px"}},{header:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.importer.title"))+" ",1),e.createElementVNode("span",vr,e.toDisplayString(o.$t("Common.validDays")),1)]),"header-extra":e.withCtx(()=>[e.createVNode(V,{justify:"end"},{default:e.withCtx(()=>[e.createVNode(N,{"on-before-upload":o.beforeUpload,accept:".xlsx,.xls","show-file-list":!1},{default:e.withCtx(()=>[e.createVNode(p,null,{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(l)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.importer.file")),1)]),_:1})]),_:1},8,["on-before-upload"]),e.renderSlot(o.$slots,"default"),e.createVNode(p,{onClick:o.downloadFile},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(C)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.importer.download")),1)]),_:1},8,["onClick"]),e.createVNode(m,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(v)]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1}),e.createVNode(p,{quaternary:"",onClick:o.closeModel},{icon:e.withCtx(()=>[e.createVNode(i,null,{default:e.withCtx(()=>[e.createVNode(h)]),_:1})]),_:1},8,["onClick"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(g,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":"500","max-height":"500","scroll-x":"600",remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:3})]),_:3},8,["show","on-mask-click"])}const Uo=S(Nr,[["render",Cr]]),yr=e.defineComponent({name:"OcLogin",components:{NTabs:d.NTabs,NTabPane:d.NTabPane,NForm:d.NForm,NFormItem:d.NFormItem,NDropdown:d.NDropdown,NInput:d.NInput,NButton:d.NButton,NGrid:d.NGrid,NGi:d.NGi,NPopover:d.NPopover},props:{platform:{required:!1,type:String,default:"智能效率监测平台"},version:{type:String,default:""},info:{required:!1,type:Object,default:()=>({href:"",text:""})}},setup(){const{t:o}=W.useI18n(),t=e.ref(A("lang","zh-CN")),a=d.useNotification(),s=q.useRouter(),r=e.ref("1"),c=e.ref(),l=e.ref(),i=e.ref(),p=e.ref(),N=e.ref(!1),C=e.ref(!1),v=e.ref(!1),m=e.ref({phone:"",name:"",password:""}),h=e.ref({name:{required:!0,message:()=>o("Common.login.userNameMessage"),trigger:"blur"},phone:{required:!0,validator:($,_)=>_?/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(_):!1,message:()=>o("Common.login.mobileMessage"),trigger:"blur"},password:{required:!0,message:()=>o("Common.login.passwordMessage"),trigger:"input"}}),V=e.ref([]),g=e.ref([]),w=e.ref([]),y=e.ref([]),D=()=>{const $=A("loginOption",{}),_=[];Object.keys($).forEach(f=>{_.push({label:f,key:f})}),V.value=_,g.value=_},P=()=>{const $=A("phoneOption",{}),_=[];Object.keys($).forEach(f=>{_.push({label:f,key:f})}),w.value=_,y.value=_},E=$=>{j("token",$,0),de().then(_=>{a.success({content:()=>o("Notice.success"),duration:3e3}),_.kind!==1&&s.replace(T.platformUrl)}).catch(()=>{a.error({content:()=>o("Notice.error"),duration:3e3}),m.value.password="",N.value=!1})},M=()=>{var $,_;N.value||(N.value=!0,r.value==="0"?($=l.value)==null||$.validate(f=>{f?N.value=!1:ao({type:r.value,...m.value}).then(I=>{const z=A("loginOption",{});z[m.value.name]=!0,j("loginOption",z,0),E(I)}).catch(()=>{m.value.password="",N.value=!1})}):(_=c.value)==null||_.validate(f=>{f?N.value=!1:ao({type:r.value,...m.value}).then(I=>{const z=A("phoneOption",{});z[m.value.name]=!0,j("phoneOption",z,0),E(I)}).catch(()=>{m.value.password="",N.value=!1})}))},n=$=>{m.value.name=$;const _=g.value.filter(f=>f.label.indexOf($)>-1);V.value=_,_.length===0?v.value=!1:v.value=!0},k=$=>{m.value.name=$,v.value=!1,i.value.focus(),setTimeout(()=>{var _;(_=l.value)==null||_.restoreValidation()},80)},R=$=>{var _;V.value.length===0?v.value=!1:v.value=$,(_=l.value)==null||_.restoreValidation()},O=$=>{m.value.phone=$;const _=y.value.filter(f=>f.label.indexOf($)>-1);w.value=_,_.length===0?C.value=!1:C.value=!0},b=$=>{m.value.phone=$,C.value=!1,p.value.focus(),setTimeout(()=>{var _;(_=c.value)==null||_.restoreValidation()},80)},G=$=>{var _;w.value.length===0?C.value=!1:C.value=$,(_=c.value)==null||_.restoreValidation()},K=$=>{var _,f;r.value=$,m.value={phone:"",name:"",password:""},(_=l.value)==null||_.restoreValidation(),(f=c.value)==null||f.restoreValidation()},H=$=>e.h("div",{style:{position:"relative"}},{default:()=>[e.h("div",{},{default:()=>$.label}),e.h(ne,{class:"login-drop-menu",onclick:_=>{_.stopPropagation(),_.stopImmediatePropagation();const f=A("loginOption",{});delete f[$.label],j("loginOption",f,0),D();const I=m.value.name,z=g.value.filter(Q=>Q.label.indexOf(I)>-1);V.value=z}},{default:()=>""})]}),J=$=>e.h("div",{style:{position:"relative"}},{default:()=>[e.h("div",{},{default:()=>$.label}),e.h(ne,{class:"login-drop-menu",onclick:_=>{_.stopPropagation(),_.stopImmediatePropagation();const f=A("phoneOption",{});delete f[$.label],j("phoneOption",f,0),P();const I=m.value.name,z=y.value.filter(Q=>Q.label.indexOf(I)>-1);w.value=z}},{default:()=>""})]});return ue(),re("token"),D(),P(),oe(t.value),{tabs:r,pwdRef:i,pwdPhoneRef:p,formRef:l,formPhoneRef:c,formValue:m,formRules:h,showPhoneDropdown:C,showNameDropdown:v,optionsName:V,optionsPhone:w,loading:N,submit:M,tabChange:K,nameChange:n,phoneChange:O,dropNameSelect:k,dropPhoneSelect:b,showDropdownNameChange:R,showDropdownPhoneChange:G,renderDropdownNameLabel:H,renderDropdownPhoneLabel:J}}}),br={class:"login"},kr=e.createElementVNode("div",{class:"login-left"},[e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/login.png",alt:"logo",class:"login-img"})],-1),_r={class:"login-right"},Vr=e.createElementVNode("div",{class:"login-title"},null,-1),$r={class:"login-platform"},Sr={class:"login-form"},Tr=e.createElementVNode("br",null,null,-1),Br=e.createElementVNode("br",null,null,-1),Ir={class:"login-submit"},Dr=["href"],Pr=e.createElementVNode("div",{class:"google-play"},null,-1),Er=e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/android_qr.png",alt:"AndroidQr",width:"300",height:"300"},null,-1),Mr=e.createElementVNode("div",{class:"app-store"},null,-1),xr=e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/ios_qr.png",alt:"iOSQr",width:"300",height:"300"},null,-1),Or={class:"login-footer"},zr=e.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),Ar=e.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"footer-record"}," 沪ICP备 18025935号-3 ",-1);function Rr(o,t,a,s,r,c){const l=e.resolveComponent("NInput"),i=e.resolveComponent("NDropdown"),p=e.resolveComponent("NFormItem"),N=e.resolveComponent("NForm"),C=e.resolveComponent("NTabPane"),v=e.resolveComponent("NTabs"),m=e.resolveComponent("NButton"),h=e.resolveComponent("NPopover"),V=e.resolveComponent("NGi"),g=e.resolveComponent("NGrid");return e.openBlock(),e.createElementBlock("div",br,[kr,e.createElementVNode("div",_r,[Vr,e.createElementVNode("div",$r,e.toDisplayString(o.platform),1),e.createElementVNode("div",Sr,[e.createVNode(v,{value:o.tabs,"on-update:value":o.tabChange,type:"segment","justify-content":"end",animated:""},{default:e.withCtx(()=>[e.createVNode(C,{name:"1",tab:o.$t("Common.login.mobile")},{default:e.withCtx(()=>[Tr,e.createVNode(N,{ref:"formPhoneRef",model:o.formValue,rules:o.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:e.withKeys(o.submit,["enter"])},{default:e.withCtx(()=>[e.createVNode(p,{label:o.$t("Common.login.mobile"),path:"phone"},{default:e.withCtx(()=>[e.createVNode(i,{show:o.showPhoneDropdown,options:o.optionsPhone,"render-label":o.renderDropdownPhoneLabel,width:"trigger",onClickoutside:t[3]||(t[3]=()=>{o.showPhoneDropdown=!1}),onSelect:o.dropPhoneSelect},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.phone,"onUpdate:value":t[0]||(t[0]=w=>o.formValue.phone=w),placeholder:o.$t("Common.login.mobilePlaceholder"),"on-update:value":o.phoneChange,onClick:t[1]||(t[1]=w=>o.showDropdownPhoneChange(!0)),onFocus:t[2]||(t[2]=w=>o.showDropdownPhoneChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),e.createVNode(p,{label:o.$t("Common.login.password"),path:"password"},{default:e.withCtx(()=>[e.createVNode(l,{ref:"pwdPhoneRef",value:o.formValue.password,"onUpdate:value":t[4]||(t[4]=w=>o.formValue.password=w),type:"password","show-password-on":"click",placeholder:o.$t("Common.login.passwordPlaceholder"),onFocus:t[5]||(t[5]=w=>o.showDropdownPhoneChange(!1))},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"]),e.createVNode(C,{name:"0",tab:o.$t("Common.login.userName")},{default:e.withCtx(()=>[Br,e.createVNode(N,{ref:"formRef",model:o.formValue,rules:o.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:e.withKeys(o.submit,["enter"])},{default:e.withCtx(()=>[e.createVNode(p,{label:o.$t("Common.login.userName"),path:"name"},{default:e.withCtx(()=>[e.createVNode(i,{show:o.showNameDropdown,options:o.optionsName,"render-label":o.renderDropdownNameLabel,width:"trigger",onClickoutside:t[9]||(t[9]=()=>{o.showNameDropdown=!1}),onSelect:o.dropNameSelect},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.name,"onUpdate:value":t[6]||(t[6]=w=>o.formValue.name=w),placeholder:o.$t("Common.login.userNamePlaceholder"),"on-update:value":o.nameChange,onClick:t[7]||(t[7]=w=>o.showDropdownNameChange(!0)),onFocus:t[8]||(t[8]=w=>o.showDropdownNameChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),e.createVNode(p,{label:o.$t("Common.login.password"),path:"password"},{default:e.withCtx(()=>[e.createVNode(l,{ref:"pwdRef",value:o.formValue.password,"onUpdate:value":t[10]||(t[10]=w=>o.formValue.password=w),type:"password","show-password-on":"click",placeholder:o.$t("Common.login.passwordPlaceholder")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"])]),_:1},8,["value","on-update:value"]),e.createElementVNode("div",Ir,[e.createVNode(m,{loading:o.loading,class:"button-primary",onClick:o.submit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.login.in")),1)]),_:1},8,["loading","onClick"])]),o.info.href?(e.openBlock(),e.createElementBlock("a",{key:0,href:o.info.href,class:"login-other"},e.toDisplayString(o.info.text),9,Dr)):e.createCommentVNode("",!0),e.createVNode(g,{"x-gap":"15",cols:2},{default:e.withCtx(()=>[e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(h,{trigger:"hover",placement:"top"},{trigger:e.withCtx(()=>[Pr]),default:e.withCtx(()=>[Er]),_:1})]),_:1}),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(h,{trigger:"hover",placement:"top"},{trigger:e.withCtx(()=>[Mr]),default:e.withCtx(()=>[xr]),_:1})]),_:1})]),_:1})]),e.createElementVNode("footer",Or,[e.createTextVNode(" Copyright "),zr,e.createTextVNode(" 2020-2024 "+e.toDisplayString(o.$t("Common.title"))+" ",1),o.version?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("v"+e.toDisplayString(o.version)+" ",1)],64)):e.createCommentVNode("",!0),Ar])])])}const qo=S(yr,[["render",Rr]]),Lr=e.defineComponent({name:"OcNumberRoll",props:{value:{required:!0,type:[Number,String],default:0},duration:{type:Number,default:1e3},precision:{type:Number,default:0},format:{type:Function,default:void 0}},setup(o){const t=e.ref(!1),a=e.ref(0),s=i=>1-Math.pow(1-i,5),r=i=>o.format?o.format(i):i;function c(i,p,N=o.duration){const C=()=>{const m=performance.now(),h=Math.min(m-v,N),V=i+(p-i)*s(h/N);if(h===N){a.value=r(Number(o.value)),t.value=!1;return}const g=Number(V.toFixed(o.precision));a.value=r(g),requestAnimationFrame(C)},v=performance.now();C()}const l=(i=0,p=o.value)=>{t.value=!0,a.value=r(i),String(i)!==String(p)&&c(i,Number(p))};return e.watch(()=>o.value,(i,p)=>{l(Number(p)||0,Number(i))}),e.onMounted(()=>{l()}),{displayedValueRef:a}}});function Ur(o,t,a,s,r,c){return e.toDisplayString(o.displayedValueRef)}const De=S(Lr,[["render",Ur]]),qr=e.defineComponent({name:"OcLogo",components:{NGrid:d.NGrid,NGi:d.NGi,NDivider:d.NDivider,NumberRoll:De},props:{text:{type:String,default:"智能效率监测平台"}},setup(){const o=e.ref(Date.now()),t=e.ref(void 0),a=s=>F(s,"yyyy-MM-dd hh:mm:ss");return e.onMounted(()=>{t.value=setInterval(()=>{o.value=Date.now()},1e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value),t.value=void 0}),{time:o,numFormat:a}}}),jr=o=>(e.pushScopeId("data-v-e71866dd"),o=o(),e.popScopeId(),o),Fr=jr(()=>e.createElementVNode("div",{class:"logo"},null,-1));function Gr(o,t,a,s,r,c){const l=e.resolveComponent("NGi"),i=e.resolveComponent("NDivider"),p=e.resolveComponent("NumberRoll"),N=e.resolveComponent("NGrid");return e.openBlock(),e.createBlock(N,{cols:5,class:"dashboard-logo"},{default:e.withCtx(()=>[e.createVNode(l,{span:"1",class:"flex-center-left"},{default:e.withCtx(()=>[Fr]),_:1}),e.createVNode(l,{span:"3",class:"flex-center"},{default:e.withCtx(()=>[e.createVNode(i,{class:"dashboard-title-show"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.text),1)]),_:1})]),_:1}),e.createVNode(l,{span:"1",class:"flex-center-right time"},{default:e.withCtx(()=>[e.createVNode(p,{value:o.time,format:o.numFormat},null,8,["value","format"])]),_:1})]),_:1})}const jo=S(qr,[["render",Gr],["__scopeId","data-v-e71866dd"]]),Hr=o=>{const t=JSON.parse(JSON.stringify(o));return t.oldPassword=ie(t.oldPassword),t.newPassword=ie(t.newPassword),t.comfirmPassword=ie(t.comfirmPassword),x("api/auth/user/modifyPassword",t)},Jr=o=>x("api/auth/user/update",o),Wr=e.defineComponent({name:"OcMy",components:{NGrid:d.NGrid,NGi:d.NGi,NForm:d.NForm,NFormItem:d.NFormItem,NInput:d.NInput,NButton:d.NButton},setup(){const{t:o}=W.useI18n(),t=d.useNotification(),a=e.ref(),s=e.ref(),r=e.ref(!1),c=e.ref({oldPassword:"",newPassword:"",comfirmPassword:""}),l=e.ref({oldPassword:{required:!0,message:()=>o("Common.my.oldPasswordMessage"),trigger:"blur"},newPassword:{required:!0,message:()=>o("Common.my.newPasswordMessage"),trigger:"blur"},comfirmPassword:{required:!0,message:()=>o("Common.my.checkPasswordMessage"),trigger:"blur"}}),i=e.ref(u),p=e.ref({email:{required:!1,trigger:"blur",validator:(v,m)=>m?/^[0-9a-zA-Z_.-]+[@][0-9a-zA-Z_.-]+([.][a-zA-Z]+){1,2}$/.test(m):!0,message:()=>o("Common.my.emailMessage")},phone:{required:!1,trigger:"blur",validator:(v,m)=>m?/^[1][3,4,5,7,8,9][0-9]{9}$/.test(m):!0,message:()=>o("Common.my.phoneMessage")}});return{formRef:s,pwdRef:a,pwdValue:c,formValue:i,pwdRules:l,formRules:p,loading:r,pwdSubmit:()=>{var v;r.value||(r.value=!0,(v=a.value)==null||v.validate(m=>{m?r.value=!1:Hr(c.value).then(()=>{var h;c.value={oldPassword:"",newPassword:"",comfirmPassword:""},(h=a.value)==null||h.restoreValidation(),t.success({content:()=>o("Notice.success"),duration:3e3}),setTimeout(()=>{window.location.href="/login"},1e3)}).catch(()=>{r.value=!1})}))},formSubmit:()=>{var v;r.value||(r.value=!0,(v=s.value)==null||v.validate(m=>{m?r.value=!1:Jr(i.value).then(()=>{t.success({content:()=>o("Notice.success"),duration:3e3}),r.value=!1,de().catch(()=>null)}).catch(()=>{r.value=!1})}))}}}}),Kr={class:"com-card"},Qr={class:"com-title"},Xr=e.createElementVNode("br",null,null,-1),Zr={class:"text-right"},Yr={class:"com-card"},el={class:"com-title"},ol=e.createElementVNode("br",null,null,-1),tl={class:"text-right"};function nl(o,t,a,s,r,c){const l=e.resolveComponent("NInput"),i=e.resolveComponent("NFormItem"),p=e.resolveComponent("NForm"),N=e.resolveComponent("NButton"),C=e.resolveComponent("NGi"),v=e.resolveComponent("NGrid");return e.openBlock(),e.createBlock(v,{"x-gap":"15","y-gap":"15",cols:2},{default:e.withCtx(()=>[e.createVNode(C,{span:"1"},{default:e.withCtx(()=>[e.createElementVNode("div",Kr,[e.createElementVNode("div",Qr,e.toDisplayString(o.$t("Common.my.title")),1),Xr,e.createVNode(p,{ref:"formRef",model:o.formValue,rules:o.formRules,"label-placement":"top"},{default:e.withCtx(()=>[e.createVNode(i,{label:o.$t("Common.my.tenantCode"),path:"tenantLoginCode"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.tenantLoginCode,"onUpdate:value":t[0]||(t[0]=m=>o.formValue.tenantLoginCode=m),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.tenantName"),path:"tenantName"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.tenantName,"onUpdate:value":t[1]||(t[1]=m=>o.formValue.tenantName=m),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.name"),path:"name"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.name,"onUpdate:value":t[2]||(t[2]=m=>o.formValue.name=m),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.email"),path:"email"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.email,"onUpdate:value":t[3]||(t[3]=m=>o.formValue.email=m),placeholder:"邮箱"},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.realName"),path:"realName"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.realName,"onUpdate:value":t[4]||(t[4]=m=>o.formValue.realName=m),placeholder:"真实姓名"},null,8,["value"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.phone"),path:"phone"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.formValue.phone,"onUpdate:value":t[5]||(t[5]=m=>o.formValue.phone=m),placeholder:"手机"},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),e.createElementVNode("div",Zr,[e.createVNode(N,{loading:o.loading,class:"button-primary",onClick:o.formSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1}),e.createVNode(C,{span:"1"},{default:e.withCtx(()=>[e.createElementVNode("div",Yr,[e.createElementVNode("div",el,e.toDisplayString(o.$t("Common.my.password")),1),ol,e.createVNode(p,{ref:"pwdRef",model:o.pwdValue,rules:o.pwdRules,"label-placement":"top"},{default:e.withCtx(()=>[e.createVNode(i,{label:o.$t("Common.my.oldPassword"),path:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.pwdValue.oldPassword,"onUpdate:value":t[6]||(t[6]=m=>o.pwdValue.oldPassword=m),type:"password",placeholder:o.$t("Common.my.oldPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.newPassword"),path:"newPassword"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.pwdValue.newPassword,"onUpdate:value":t[7]||(t[7]=m=>o.pwdValue.newPassword=m),type:"password",placeholder:o.$t("Common.my.newPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),e.createVNode(i,{label:o.$t("Common.my.checkPassword"),path:"comfirmPassword"},{default:e.withCtx(()=>[e.createVNode(l,{value:o.pwdValue.comfirmPassword,"onUpdate:value":t[8]||(t[8]=m=>o.pwdValue.comfirmPassword=m),type:"password",placeholder:o.$t("Common.my.checkPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),e.createElementVNode("div",tl,[e.createVNode(N,{loading:o.loading,class:"button-primary",onClick:o.pwdSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1})]),_:1})}const Fo=S(Wr,[["render",nl]]);function al(o){return new Promise((t,a)=>{x("api/manager/factory-params/detail",{keyName:o}).then(s=>{const r=JSON.parse(s.valueJson??"[]");t(r)}).catch(()=>{a()})})}const rl=e.defineComponent({name:"OcReport",components:{NSpace:d.NSpace,NDataTable:d.NDataTable,NDatePicker:d.NDatePicker,NInputGroup:d.NInputGroup,NInputGroupLabel:d.NInputGroupLabel},setup(){const{t:o}=W.useI18n(),t=e.ref(!0),a=d.useNotification(),s=e.ref([{title:"#",width:60,align:"center",key:"index",render(p,N){return e.h("span",{},{default:()=>N+1})}},{title:"名称",key:"name"},{title:"备注",key:"content"},{title:"操作",key:"action",align:"center",fixed:"right",width:120,render(p){return le([{type:"custom",onClick:()=>{l(p.key)},icon:pe,color:"success",text:"下载"}])}}]),r=e.ref([]),c=e.ref([Date.now(),Date.now()]),l=p=>{t.value=!0,Lo({jobType:"EXPORT",jobTypeName:p,jobParams:JSON.stringify({startDate:c.value[0],endDate:c.value[1]})}).then(()=>{t.value=!1,a.success({content:()=>o("Notice.success"),duration:3e3}),ke(!0)}).catch(()=>{t.value=!1,a.error({content:()=>o("Notice.error"),duration:3e3})})},i=p=>p>Date.now();return al("individuation_report_download").then(p=>{r.value=p.map(N=>({key:N.key,name:N.name,content:"默认导出最近30天的数据。每个企业租户下的所有账号,每天累计最多下载10次,采用异步下载"})),t.value=!1}).catch(()=>{t.value=!1}),{columns:s,columnData:r,loading:t,range:c,isRangeDateDisabled:i}}}),ll={class:"com-card"},sl=e.createElementVNode("br",null,null,-1);function cl(o,t,a,s,r,c){const l=e.resolveComponent("NInputGroupLabel"),i=e.resolveComponent("NDatePicker"),p=e.resolveComponent("NInputGroup"),N=e.resolveComponent("NSpace"),C=e.resolveComponent("n-data-table");return e.openBlock(),e.createElementBlock("div",ll,[e.createVNode(N,{justify:"end"},{default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(l,{class:"oc-group-label"},{default:e.withCtx(()=>[e.createTextVNode("日期")]),_:1}),e.createVNode(i,{value:o.range,"onUpdate:value":t[0]||(t[0]=v=>o.range=v),type:"daterange","is-date-disabled":o.isRangeDateDisabled,style:{width:"300px"}},null,8,["value","is-date-disabled"])]),_:1})]),_:1}),sl,e.createVNode(C,{columns:o.columns,data:o.columnData,loading:o.loading,"min-height":"calc(100vh - 180px)","max-height":"calc(100vh - 180px)"},null,8,["columns","data","loading"])])}const Go=S(rl,[["render",cl]]),il=e.defineComponent({name:"OcSkeleton",components:{NGrid:d.NGrid,NGi:d.NGi,NSkeleton:d.NSkeleton},props:{cols:{type:Number,default:6},num:{type:Array,default:()=>[[12,1]]}},setup(){return{}}}),dl={class:"com-skeleton"};function ul(o,t,a,s,r,c){const l=e.resolveComponent("NSkeleton"),i=e.resolveComponent("NGi"),p=e.resolveComponent("NGrid");return e.openBlock(),e.createElementBlock("div",dl,[e.createVNode(p,{"x-gap":"15","y-gap":"15",cols:o.cols,"item-responsive":"",responsive:"screen"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.num,(N,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`skeleton_${C}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.num[C][0],(v,m)=>(e.openBlock(),e.createBlock(i,{key:`skeleton_${C}_${m}`,span:`${o.cols/2} m:2 l:${o.num[C][1]}`},{default:e.withCtx(()=>[e.createVNode(l)]),_:2},1032,["span"]))),128))],64))),128))]),_:1},8,["cols"])])}const Ho=S(il,[["render",ul]]),pl=e.defineComponent({name:"Oc404",components:{NButton:d.NButton},setup(){const o=()=>{U.push(T.platformUrl)},t=e.ref();return e.onMounted(()=>{t.value=setInterval(()=>{U.push(T.platformUrl)},3e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value)}),{goBack:o}}}),Pe=o=>(e.pushScopeId("data-v-4387c328"),o=o(),e.popScopeId(),o),ml={class:"com-card flex-center error404",style:{flex:"1"}},fl=Pe(()=>e.createElementVNode("div",{class:"miss-img"},null,-1)),hl=Pe(()=>e.createElementVNode("p",{class:"miss-title"},"404 页面走丢了",-1)),gl=Pe(()=>e.createElementVNode("p",{class:"miss-title2"},"Something's missing.",-1));function wl(o,t,a,s,r,c){const l=e.resolveComponent("n-button");return e.openBlock(),e.createElementBlock("div",ml,[fl,hl,gl,e.createVNode(l,{tertiary:"",onClick:o.goBack},{default:e.withCtx(()=>[e.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const Jo=S(pl,[["render",wl],["__scopeId","data-v-4387c328"]]),Nl=e.defineComponent({name:"Oc500",components:{NButton:d.NButton},setup(){const o=()=>{U.push(T.platformUrl)},t=e.ref();return e.onMounted(()=>{t.value=setInterval(()=>{U.push(T.platformUrl)},3e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value)}),{goBack:o}}}),he=o=>(e.pushScopeId("data-v-d1bdd42b"),o=o(),e.popScopeId(),o),vl={class:"com-card flex-center error500",style:{flex:"1"}},Cl=he(()=>e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com//500.png",alt:"500"},null,-1)),yl=he(()=>e.createElementVNode("div",{class:"miss-txt"},"500",-1)),bl=he(()=>e.createElementVNode("p",{class:"miss-title"},"服务暂时中断,请稍后重试.",-1)),kl=he(()=>e.createElementVNode("p",{class:"miss-title2"},"Oops! No Internet connection found.",-1));function _l(o,t,a,s,r,c){const l=e.resolveComponent("NButton");return e.openBlock(),e.createElementBlock("div",vl,[Cl,yl,bl,kl,e.createVNode(l,{tertiary:"",onClick:o.goBack},{default:e.withCtx(()=>[e.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const Wo=S(Nl,[["render",_l],["__scopeId","data-v-d1bdd42b"]]),Vl=e.defineComponent({name:"OcAuth",setup(){const o=q.useRoute(),t=q.useRouter(),{auth:a}=o.query;a?j("token",a,0):re("token"),t.replace(T.platformUrl)}}),$l={class:"com-card flex-center",style:{flex:"1"}},Sl=e.createElementVNode("p",{class:"miss-title"},"登录中...",-1),Tl=[Sl];function Bl(o,t,a,s,r,c){return e.openBlock(),e.createElementBlock("div",$l,Tl)}const Ko=S(Vl,[["render",Bl]]);var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Il(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function Dl(o){var t=typeof o;return o!=null&&(t=="object"||t=="function")}var Qo=Dl,Pl=typeof ce=="object"&&ce&&ce.Object===Object&&ce,El=Pl,Ml=El,xl=typeof self=="object"&&self&&self.Object===Object&&self,Ol=Ml||xl||Function("return this")(),Xo=Ol,zl=Xo,Al=function(){return zl.Date.now()},Rl=Al,Ll=/\s/;function Ul(o){for(var t=o.length;t--&&Ll.test(o.charAt(t)););return t}var ql=Ul,jl=ql,Fl=/^\s+/;function Gl(o){return o&&o.slice(0,jl(o)+1).replace(Fl,"")}var Hl=Gl,Jl=Xo,Wl=Jl.Symbol,Zo=Wl,so=Zo,Yo=Object.prototype,Kl=Yo.hasOwnProperty,Ql=Yo.toString,X=so?so.toStringTag:void 0;function Xl(o){var t=Kl.call(o,X),a=o[X];try{o[X]=void 0;var s=!0}catch{}var r=Ql.call(o);return s&&(t?o[X]=a:delete o[X]),r}var Zl=Xl,Yl=Object.prototype,es=Yl.toString;function os(o){return es.call(o)}var ts=os,co=Zo,ns=Zl,as=ts,rs="[object Null]",ls="[object Undefined]",io=co?co.toStringTag:void 0;function ss(o){return o==null?o===void 0?ls:rs:io&&io in Object(o)?ns(o):as(o)}var cs=ss;function is(o){return o!=null&&typeof o=="object"}var ds=is,us=cs,ps=ds,ms="[object Symbol]";function fs(o){return typeof o=="symbol"||ps(o)&&us(o)==ms}var hs=fs,gs=Hl,uo=Qo,ws=hs,po=NaN,Ns=/^[-+]0x[0-9a-f]+$/i,vs=/^0b[01]+$/i,Cs=/^0o[0-7]+$/i,ys=parseInt;function bs(o){if(typeof o=="number")return o;if(ws(o))return po;if(uo(o)){var t=typeof o.valueOf=="function"?o.valueOf():o;o=uo(t)?t+"":t}if(typeof o!="string")return o===0?o:+o;o=gs(o);var a=vs.test(o);return a||Cs.test(o)?ys(o.slice(2),a?2:8):Ns.test(o)?po:+o}var ks=bs,_s=Qo,ve=Rl,mo=ks,Vs="Expected a function",$s=Math.max,Ss=Math.min;function Ts(o,t,a){var s,r,c,l,i,p,N=0,C=!1,v=!1,m=!0;if(typeof o!="function")throw new TypeError(Vs);t=mo(t)||0,_s(a)&&(C=!!a.leading,v="maxWait"in a,c=v?$s(mo(a.maxWait)||0,t):c,m="trailing"in a?!!a.trailing:m);function h(n){var k=s,R=r;return s=r=void 0,N=n,l=o.apply(R,k),l}function V(n){return N=n,i=setTimeout(y,t),C?h(n):l}function g(n){var k=n-p,R=n-N,O=t-k;return v?Ss(O,c-R):O}function w(n){var k=n-p,R=n-N;return p===void 0||k>=t||k<0||v&&R>=c}function y(){var n=ve();if(w(n))return D(n);i=setTimeout(y,g(n))}function D(n){return i=void 0,m&&s?h(n):(s=r=void 0,l)}function P(){i!==void 0&&clearTimeout(i),N=0,s=p=r=i=void 0}function E(){return i===void 0?l:D(ve())}function M(){var n=ve(),k=w(n);if(s=arguments,r=this,p=n,k){if(i===void 0)return V(p);if(v)return clearTimeout(i),i=setTimeout(y,t),h(p)}return i===void 0&&(i=setTimeout(y,t)),l}return M.cancel=P,M.flush=E,M}var Bs=Ts;const Is=Il(Bs);let Ee=3840,Me=2160;const xe=e.reactive({scale:1});function et(o,t){Ee=o,Me=t}function Oe(){let o=1;const t=window.innerWidth,a=window.innerHeight,s=Ee,r=Me,c=parseFloat((s/r).toFixed(5));if(parseFloat((t/a).toFixed(5))>c){const i=parseFloat((a*c/s).toFixed(5));o=i>1?1:i}else{const i=parseFloat((t/c/r).toFixed(5));o=i>1?1:i}xe.scale=o}function ot(){const o=Is(Oe,200);return o(),window.addEventListener("resize",o),()=>{Ee=3840,Me=2160,window.removeEventListener("resize",o)}}const Ds={Platform:{iot:"智能效率监测平台",tdm:"智能刀具管理平台",qms:"智能质量检测平台",twin:"智能数字大屏平台",maintain:"智能设备维保平台"},Notice:{success:"操作成功",error:"操作失败,请稍后重试"},Common:{validDays:"报表文件具有七天有效期",search:"查询",refresh:"刷新",filter:"筛选",reset:"重置",more:"更多",success:"成功",failed:"失败",processing:"处理中",action:"操作",back:"返回",title:"零捷互联智能云平台",message:{title:"消息列表",title2:"消息",unRead:"未读",all:"全部",read:"已读",readAll:"一键已读"},login:{mobile:"手机号",mobilePlaceholder:"请输入手机号码",mobileMessage:"请输入正确的手机号码",password:"密码",passwordPlaceholder:"请输入密码",passwordMessage:"请输入密码",userName:"用户名",userNamePlaceholder:"请输入用户名",userNameMessage:"请输入正确的用户名",in:"登录"},my:{title:"我的信息",tenantCode:"租户代码",tenantName:"租户名称",name:"名称",email:"邮箱",emailMessage:"邮箱格式不正确",realName:"真实姓名",phone:"手机",phoneMessage:"手机号码格式不正确",submit:"更新",password:"修改密码",oldPassword:"旧密码",newPassword:"新密码",checkPassword:"确认新密码",oldPasswordMessage:"请填写旧密码",newPasswordMessage:"请填写新密码",checkPasswordMessage:"请填写确认新密码"},dropdownMenu:{software:"零捷软件",android:"安卓APP",ios:"iOS APP",chrome:"Chrome浏览器",edge:"Edge浏览器",dashboard_IoT:"大屏机加工版本",dashboard_Prt:"大屏印刷版本",report:"个性化报表",info:"我的信息",logout:"退出"},importer:{title:"导入",file:"导入文件",download:"下载模版",btnDownload:"下载",fileName:"文件名称",status:"状态",createTime:"创建时间",retry:"重试"}}},Ps={Platform:{iot:"SMART LEAN IOT PLATFORM",tdm:"SMART TOOL MANAGEMENT PLATFORM",qms:"SMART QUALITY MANAGEMENT PLATFORM",twin:"SMART DASHBOARD PLATFORM",maintain:"SMART MAINTAIN PLATFORM"},Notice:{success:"Success",error:"An error occurred, please try again later"},Common:{validDays:"Files are valid for seven days",search:"Search",refresh:"Refresh",filter:"Filter",reset:"Reset",more:"More",success:"Success",failed:"Failed",processing:"Processing",action:"Action",back:"Back",title:"Partex",message:{title:"Messages",title2:"Message",unRead:"Unread",all:"All",read:"Read",readAll:"Read All"},login:{mobile:"Mobile",mobilePlaceholder:"Please Input Mobile",mobileMessage:"Mobile is not correct",password:"Password",passwordPlaceholder:"Please Input Password",passwordMessage:"Please Input Password",userName:"UserName",userNamePlaceholder:"Please Input UserName",userNameMessage:"UserName is not correct",in:"Sign in"},my:{title:"Info",tenantCode:"TenantCode",tenantName:"TenantName",name:"Name",email:"Email",emailMessage:"Email is not correct",realName:"RealName",phone:"Mobile",phoneMessage:"Mobile is not correct",submit:"Apply",password:"Change Password",oldPassword:"Current",newPassword:"New",checkPassword:"Check",oldPasswordMessage:"Please Input Current Password",newPasswordMessage:"Please Input New Password",checkPasswordMessage:"Please Check New Password"},dropdownMenu:{software:"Software",android:"Android APP",ios:"iOS APP",chrome:"Chrome",edge:"Edge",dashboard:"Dashboard",dashboard_IoT:"Dashboard_IoT",dashboard_Prt:"Dashboard_Print",report:"Reports",info:"UserInfo",logout:"Logout"},importer:{title:"Import",file:"Import File",download:"Download Template",btnDownload:"Download",fileName:"FileName",status:"Status",createTime:"CreateTime",retry:"Retry"}}},tt=Ds,nt=Ps,fo=Object.freeze(Object.defineProperty({__proto__:null,Oc404:Jo,Oc500:Wo,OcAuth:Ko,OcBack:Ro,OcFooter:Ao,OcHeader:zo,OcImporter:Uo,OcLogin:qo,OcLogo:jo,OcMy:Fo,OcNumberRoll:De,OcReport:Go,OcSearchBar:Oo,OcSkeleton:Ho,fnClearUser:ue,fnComputedScale:Oe,fnDownload:No,fnGetUser:de,fnListenerScale:ot,fnSetLang:oe,fnSetNormalWidthAndHeight:et,fnSetPlatform:go,fnSetTheme:_e,fnSetUser:Ve,fnUserLogout:$e,headerStore:T,langCN:tt,langUS:nt,scaleStore:xe,userStore:u},Symbol.toStringTag,{value:"Module"})),Es="1.1.28";let at;async function rt(){const o=await fetch(`${window.location.protocol}//${window.location.host}`,{method:"HEAD",cache:"no-cache"});return o.headers.get("etag")||o.headers.get("last-modified")}async function Ms(){const o=await rt();at!==o&&ft(!0)}async function xs(){at=await rt(),window.versionMonitor&&clearInterval(window.versionMonitor),window.versionMonitor=setInterval(()=>{Ms()},60*1e3)}function lt({components:o=[]}={}){const t=[];function a(r,c,l){r.component(c)||r.component(c,l)}function s(r,c){if(!t.includes(r)&&(t.push(r),o.forEach(l=>{const{name:i,alias:p}=l;a(r,i,l),p&&p.forEach(N=>{a(r,N,l)})}),c)){const{versionMonitor:l=!0,enableRedirect:i=!0,local:p="zh-CN"}=c;_t(i),pt(p),l&&xs()}}return{version:Es,install:s}}const st=lt({components:Object.keys(fo).map(o=>fo[o])}),Os=st.install;exports.FILE=Ie;exports.GET=xo;exports.IconAlert=Co;exports.IconArrowClockwise=te;exports.IconArrowSquareDown=ko;exports.IconCalendarArrowDown=pe;exports.IconChevronLeft=bo;exports.IconClear=yo;exports.IconCloudArrowDown=Po;exports.IconDelete=To;exports.IconDismiss=ne;exports.IconDrafts=Io;exports.IconEye=Bo;exports.IconFullScreenMaximize=Sn;exports.IconGridDots=$o;exports.IconMailInboxAdd=Do;exports.IconSearch=So;exports.IconWeatherMoon=_o;exports.IconWeatherSunny=Vo;exports.Oc404=Jo;exports.Oc500=Wo;exports.OcAuth=Ko;exports.OcBack=Ro;exports.OcFooter=Ao;exports.OcHeader=zo;exports.OcImporter=Uo;exports.OcLogin=qo;exports.OcLogo=jo;exports.OcMy=Fo;exports.OcNumberRoll=De;exports.OcReport=Go;exports.OcSearchBar=Oo;exports.OcSkeleton=Ho;exports.POST=x;exports.create=lt;exports.darkTheme=ca;exports.default=st;exports.fnCancelFetch=ut;exports.fnCheckDashRole=ga;exports.fnCheckIoTRole=ma;exports.fnCheckMaintainRole=wa;exports.fnCheckQMSRole=ha;exports.fnCheckTDMRole=fa;exports.fnClearUser=ue;exports.fnComputedScale=Oe;exports.fnDecodeCursor=ye;exports.fnDelStorage=re;exports.fnDeleteLoad=Mo;exports.fnDownload=No;exports.fnEncodeCursor=ee;exports.fnFormatTime=F;exports.fnFormatUnits=pa;exports.fnFullScreen=ua;exports.fnGetStorage=A;exports.fnGetUser=de;exports.fnListenerScale=ot;exports.fnPageModel2Naive=me;exports.fnPageNaive2Model=fe;exports.fnRenderAction=le;exports.fnScrollTop=Eo;exports.fnSetLang=oe;exports.fnSetNormalWidthAndHeight=et;exports.fnSetPlatform=go;exports.fnSetStorage=j;exports.fnSetTheme=_e;exports.fnSetUser=Ve;exports.fnThrottle=da;exports.fnUserLogout=$e;exports.headerStore=T;exports.install=Os;exports.langCN=tt;exports.langUS=nt;exports.lightTheme=sa;exports.scaleStore=xe;exports.userStore=u;