Index-legacy-f07c4d55.js 13 KB

1
  1. !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var n,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(n){f=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),l=new F(r||[]);return a(i,"_invoke",{value:O(t,n,l)}),i}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=d;var h="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function x(){}function w(){}function b(){}var k={};f(k,u,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(N([])));E&&E!==o&&i.call(E,u)&&(k=E);var _=b.prototype=x.prototype=Object.create(k);function j(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,n){function r(o,a,l,u){var c=p(e[o],e,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,l,u)}),(function(t){r("throw",t,l,u)})):n.resolve(f).then((function(t){s.value=t,l(s)}),(function(t){return r("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(i,i):i()}})}function O(t,e,r){var o=h;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:n,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var u=P(l,r);if(u){if(u===m)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var c=p(t,e,r);if("normal"===c.type){if(o=r.done?g:v,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function P(t,e){var r=e.method,o=t.iterator[r];if(o===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=n,P(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=b,a(_,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=f(b,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},r.awrap=function(t){return{__await:t}},j(S.prototype),f(S.prototype,c,(function(){return this})),r.AsyncIterator=S,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new S(d(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(_),f(_,s,"Generator"),f(_,u,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},r.values=N,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return l.type="throw",l.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}},r}function n(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(c){return void n(c)}l.done?e(u):Promise.resolve(u).then(r,o)}System.register(["./CusNavigation-legacy-6c20afcf.js","./index-legacy-755e9f4a.js","./index-legacy-4d01450a.js","./ReloadOutlined-legacy-525c1ef3.js"],(function(t,r){"use strict";var o,i,a,l,u,c,s,f,d,p,h,v,y,g,m,x,w,b,k,L,E,_,j,S,O,P;return{setters:[function(t){o=t.C},function(t){i=t.a},function(t){a=t.d,l=t.a,u=t.i,c=t.g,s=t.N,f=t.v,d=t.n,p=t.r,h=t.o,v=t.y,y=t.c,g=t.f,m=t.e,x=t.w,w=t.D,b=t.S,k=t.F,L=t.B,E=t.b,_=t.t,j=t.z,S=t.C,O=t.O},function(t){P=t.R}],execute:function(){var r={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},C={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},I={style:{display:"flex"}},F={style:{display:"flex","align-items":"center"}},N={style:{display:"flex","align-items":"center","margin-right":"20px"}},z=m("div",{style:{"margin-right":"6px","font-size":"14px"}},"实时刷新",-1),G={class:"cus-scroll",style:{"flex-grow":"1","margin-top":"9px"}},A={style:{border:"1px solid #eee",padding:"20px 20px 20px 20px"}},T={style:{display:"flex","justify-content":"space-between","align-items":"flex-start"}},R={style:{"font-family":"PingFangSC, PingFang SC","font-weight":"400","font-size":"14px",color:"#191A1A","line-height":"20px","text-align":"justify","font-style":"normal"}},D=m("span",null,"是否为数组:",-1),U={key:0,style:{color:"green"}},W={key:1,style:{color:"red"}},Y=m("span",null,"标识符:",-1),B=m("span",null,"数据类型:",-1),H={key:0},J={key:0},M=[m("span",null,"最小值:",-1)],q={key:1},K=[m("span",null,"最大值:",-1)],Q={key:2},V=[m("span",null,"最大长度:",-1)],X={key:3},Z=m("div",null,null,-1),$={style:{"margin-top":"15px","font-family":"PingFangSC, PingFang SC","font-weight":"600","font-size":"20px",color:"#191A1A","line-height":"20px","text-align":"left","font-style":"normal",display:"flex","align-items":"center"}},tt={style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},et={key:0},nt=m("span",null,"(",-1),rt=m("span",null,")",-1),ot={style:{"margin-top":"15px","font-family":"PingFangSC, PingFang SC","font-weight":"400","font-size":"12px",color:"#9C9C9C","line-height":"17px","font-style":"normal"}};t("default",a({__name:"Index",setup:function(t){var a=l(),it=u("");c((function(){return a.currentRoute.value.params}),(function(t,e){console.log("路由参数发生了变化",t,e),t.deviceId?(it.value=t.deviceId,gt(),ut()):clearInterval(at)}));var at=void 0,lt=u(!1),ut=function(){console.log("onCHnage...",lt.value),lt.value?at=setInterval((function(){gt()}),2e3):clearInterval(at)},ct=s((function(){return"设备详情("+it.value+")"})),st=u(),ft=u(),dt=u([]),pt=function(t){for(var e,n=null===(e=ft.value)||void 0===e?void 0:e.model,r=0;r<n.length;r++){var o=n[r];if(t==o.tag)return o}},ht=u(""),vt=function(){var t,e;console.log(null===(t=ft.value)||void 0===t?void 0:t.model),dt.value=[];var n=null===(e=st.value)||void 0===e?void 0:e.models;for(var r in n){var o=pt(r);if(Object.prototype.hasOwnProperty.call(n,r)&&o){var i=n[r],a={name:o.name,value:i.value,date:O(i.time),model:o};ht.value?JSON.stringify(a).includes(ht.value)&&dt.value.push(a):dt.value.push(a)}}},yt=f({size:200,page:1,sort:"createtime",order:"desc",keyWord:""}),gt=function(){var t,r=(t=e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return yt.keyWord=it.value,t.next=3,i({url:"/device/detail",data:{id:it.value}}).then((function(t){return t.data.models?(st.value=t.data,console.log(st.value),Promise.resolve(st.value)):(st.value={models:[]},Promise.reject("ok"))})).then((function(t){return console.log(t.productId),ft.value?(console.log("else..........."),Promise.reject("ok")):(ft.value={id:"",name:t.productName,model:[]},i({url:"/product-model/search",data:{size:200,page:1,sort:"code",order:"asc",productId:t.productId}}))})).then((function(t){return console.log(t),t.data.forEach((function(t){ft.value.model.push(t)})),i({url:"/product-model/search",data:{size:200,page:1,sort:"code",order:"asc",productId:"0"}})})).then((function(t){console.log(t),t.data.forEach((function(t){ft.value.model.push(t)}))})).catch((function(t){"ok"!=t&&(console.log(t),w.error(t))}));case 3:vt();case 4:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function l(t){n(a,o,i,l,u,"next",t)}function u(t){n(a,o,i,l,u,"throw",t)}l(void 0)}))});return function(){return r.apply(this,arguments)}}();return d((function(){console.log("deviceDetail onMounted"),it.value=a.currentRoute.value.params.deviceId,gt()})),function(t,e){var n=p("a-tooltip"),i=p("a-input"),a=p("a-form-item"),l=p("a-form"),u=p("a-switch"),c=p("a-col"),s=p("a-row");return h(),v("div",r,[y(g(o),{gobackabled:"",title:ct.value},null,8,["title"]),m("div",C,[m("div",I,[y(l,{layout:"inline"},{default:x((function(){return[y(a,null,{default:x((function(){return[y(i,{allowClear:"",value:ht.value,"onUpdate:value":e[0]||(e[0]=function(t){return ht.value=t}),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:x((function(){return[y(n,{title:"点击搜索",onClick:vt},{default:x((function(){return[y(g(b),{style:{color:"rgba(0, 0, 0, 0.45)"}})]})),_:1})]})),_:1},8,["value"])]})),_:1})]})),_:1})]),m("div",F,[m("div",N,[z,y(u,{checked:lt.value,"onUpdate:checked":e[1]||(e[1]=function(t){return lt.value=t}),onChange:ut},null,8,["checked"])]),y(n,{onClick:gt},{default:x((function(){return[y(g(P),{style:{"font-size":"16px"}})]})),_:1})])]),m("div",G,[y(s,{gutter:[16,16]},{default:x((function(){return[(h(!0),v(k,null,L(dt.value,(function(t){return h(),E(c,{span:6},{default:x((function(){return[m("div",A,[m("div",T,[m("div",R,[y(n,{mouseEnterDelay:.5},{title:x((function(){var e,n,r;return[m("div",null,[D,null!==(e=t.model.define)&&void 0!==e&&e.isArray?(h(),v("span",U,"是")):(h(),v("span",W,"否"))]),m("div",null,[Y,m("span",null,_(t.model.tag),1)]),m("div",null,[B,m("span",null,_(t.model.type),1)]),null!==(n=t.model.define)&&void 0!==n&&n.range?(h(),v("div",H,[(h(!0),v(k,null,L(null===(r=t.model.define)||void 0===r?void 0:r.range,(function(t,e){return h(),v("div",{key:e},["min"==e?(h(),v("span",J,M)):"max"==e?(h(),v("span",q,K)):"len"==e?(h(),v("span",Q,V)):(h(),v("span",X,[m("span",null,_(e)+":",1)])),m("span",null,_(t),1)])})),128))])):j("",!0)]})),default:x((function(){return[m("span",null,_(t.name),1)]})),_:2},1024)]),Z]),m("div",$,[m("div",tt,[y(n,{placement:"topLeft"},{title:x((function(){return[S(_(t.value),1)]})),default:x((function(){return[S(" "+_(t.value),1)]})),_:2},1024)]),m("div",null,[t.info?(h(),v("span",et,[nt,m("span",null,_(t.info),1),rt])):j("",!0)])]),m("div",ot,[m("span",null,_(t.date),1)])])]})),_:2},1024)})),256))]})),_:1})])])}}}))}}}))}();