| 1 |
- !function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function n(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",l=r.toStringTag||"@@toStringTag";function i(n,r,o,l){var i=r&&r.prototype instanceof c?r:c,d=Object.create(i.prototype);return a(d,"_invoke",function(n,a,r){var o,l,i,c=0,d=r||[],s=!1,f={p:0,n:0,v:e,a:v,f:v.bind(e,4),d:function(t,n){return o=t,l=0,i=e,f.n=n,u}};function v(n,a){for(l=n,i=a,t=0;!s&&c&&!r&&t<d.length;t++){var r,o=d[t],v=f.p,p=o[2];n>3?(r=p===a)&&(i=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=v&&((r=n<2&&v<o[1])?(l=0,f.v=a,f.n=o[1]):v<p&&(r=n<3||o[0]>a||a>p)&&(o[4]=n,o[5]=a,f.n=p,l=0))}if(r||n>1)return u;throw s=!0,a}return function(r,d,p){if(c>1)throw TypeError("Generator is already running");for(s&&1===d&&v(d,p),l=d,i=p;(t=l<2?e:i)||!s;){o||(l?l<3?(l>1&&(f.n=-1),v(l,i)):f.n=i:f.v=i);try{if(c=2,o){if(l||(r="next"),t=o[r]){if(!(t=t.call(o,i)))throw TypeError("iterator result is not an object");if(!t.done)return t;i=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(i=TypeError("The iterator does not provide a '"+r+"' method"),l=1);o=e}else if((t=(s=f.n<0)?i:n.call(a,f))!==u)break}catch(t){o=e,l=1,i=t}finally{c=1}}return{value:t,done:s}}}(n,o,l),!0),d}var u={};function c(){}function d(){}function s(){}t=Object.getPrototypeOf;var f=[][o]?t(t([][o]())):(a(t={},o,function(){return this}),t),v=s.prototype=c.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,a(e,l,"GeneratorFunction")),e.prototype=Object.create(v),e}return d.prototype=s,a(v,"constructor",s),a(s,"constructor",d),d.displayName="GeneratorFunction",a(s,l,"GeneratorFunction"),a(v),a(v,l,"Generator"),a(v,o,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),(n=function(){return{w:i,m:p}})()}function a(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}a=function(e,t,n,r){function l(t,n){a(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(l("next",0),l("throw",1),l("return",2))},a(e,t,n,r)}function r(e,t,n,a,r,o,l){try{var i=e[o](l),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(a,r)}System.register(["./CusNavigation.vue_vue_type_style_index_0_scoped_5a71d35e_lang-legacy-2e6df359.js","./CusNavigation-legacy-ce721f1c.js","./index-legacy-c2eb0980.js","./index-legacy-7f6656e1.js","./ReloadOutlined-legacy-23a37b93.js"],function(t,a){"use strict";var o,l,i,u,c,d,s,f,v,p,y,g,m,h,b,x,w,_,k,S,j,C,O,P,I,A,F;return{setters:[null,function(e){o=e.C},function(e){l=e.a},function(e){i=e.d,u=e.i,c=e.a,d=e.g,s=e.E,f=e.v,v=e.k,p=e.o,y=e.p,g=e.c,m=e.f,h=e.e,b=e.w,x=e.y,w=e.r,_=e.s,k=e.t,S=e.S,j=e.F,C=e.L,O=e.x,P=e.b,I=e.M,A=e._},function(e){F=e.R}],execute:function(){var a=document.createElement("style");a.textContent="[data-v-c04d5ed4] .ant-tabs-content{height:100%}[data-v-c04d5ed4] .ant-tabs-card>.ant-tabs-nav .ant-tabs-tab{border-color:#ccc;border-radius:0;border-left-width:0px}[data-v-c04d5ed4] .ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab-active{border-bottom-color:#fff}[data-v-c04d5ed4] .ant-tabs-card>.ant-tabs-nav .ant-tabs-tab:first-child{border-left-width:1px}[data-v-c04d5ed4] .ant-tabs-top>.ant-tabs-nav:before{border-color:#ccc}[data-v-c04d5ed4] .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#0058ff}\n",document.head.appendChild(a);var z={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},E={style:{"flex-grow":"1",overflow:"hidden"}},N={style:{height:"100%",display:"flex","flex-direction":"column"}},G={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},T={style:{display:"flex"}},J={style:{display:"flex","align-items":"center"}},R={style:{display:"flex","align-items":"center","margin-right":"20px"}},U={class:"cus-scroll",style:{"flex-grow":"1","margin-top":"9px"}},K={style:{border:"1px solid #eee",padding:"20px 20px 20px 20px"}},M={style:{display:"flex","justify-content":"space-between","align-items":"flex-start"}},B={style:{"font-family":"PingFangSC, PingFang SC","font-weight":"400","font-size":"14px",color:"#191A1A","line-height":"20px","text-align":"justify","font-style":"normal"}},D={key:0,style:{color:"green"}},L={key:1,style:{color:"red"}},W={key:0},q={key:0},H={key:1},$={key:2},Q={key:3},V={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"}},X={style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},Y={key:0},Z={style:{"margin-top":"15px","font-family":"PingFangSC, PingFang SC","font-weight":"400","font-size":"12px",color:"#9C9C9C","line-height":"17px","font-style":"normal"}},ee=i({__name:"Index",setup:function(t){var a=u("1"),i=c(),A=u("");d(function(){return i.currentRoute.value.params},function(e,t){console.log("路由参数发生了变化",e,t),e.deviceId?(A.value=e.deviceId,se(),ne()):clearInterval(ee)});var ee=void 0,te=u(!1),ne=function(){console.log("onCHnage...",te.value),te.value?ee=setInterval(function(){se()},2e3):clearInterval(ee)},ae=s(function(){return"设备详情"}),re=u(),oe=u(),le=u([]),ie=function(e){for(var t,n=null===(t=oe.value)||void 0===t?void 0:t.model,a=0;a<n.length;a++){var r=n[a];if(e==r.title)return r}},ue=u(""),ce=function(){var e,t;console.log(null===(e=oe.value)||void 0===e?void 0:e.model),le.value=[];var n=null===(t=re.value)||void 0===t?void 0:t.data;for(var a in n){var r=ie(a);if(Object.prototype.hasOwnProperty.call(n,a)&&r){var o=n[a],l={name:r.name,value:o.value,date:O(o.time),model:r};ue.value?JSON.stringify(l).includes(ue.value)&&le.value.push(l):le.value.push(l)}}},de=f({size:200,page:1,sort:"createtime",order:"desc",keyWord:""}),se=function(){var e,t=(e=n().m(function e(){return n().w(function(e){for(;;)switch(e.n){case 0:return de.keyWord=A.value,e.n=1,l({url:"/device/search",data:de}).then(function(e){return e.data[0].data?(re.value=e.data[0],re.value.data=JSON.parse(e.data[0].data),console.log(re.value),Promise.resolve(re.value)):(re.value={data:[]},Promise.reject("ok"))}).then(function(e){return console.log(e.productId),oe.value?(console.log("else..........."),Promise.reject("ok")):(oe.value={id:"",name:e.productName,model:[]},l({url:"/model/search",data:{size:200,page:1,sort:"code",order:"asc",productId:e.productId}}))}).then(function(e){return console.log(e),e.data.forEach(function(e){e.define=JSON.parse(e.define),oe.value.model.push(e)}),l({url:"/model/searchCommon",data:{size:200,page:1,sort:"code",order:"asc"}})}).then(function(e){console.log(e),e.data.forEach(function(e){e.define=JSON.parse(e.define),oe.value.model.push(e)})}).catch(function(e){"ok"!=e&&(console.log(e),x.error(e))});case 1:ce();case 2:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(a,o){var l=e.apply(t,n);function i(e){r(l,a,o,i,u,"next",e)}function u(e){r(l,a,o,i,u,"throw",e)}i(void 0)})});return function(){return t.apply(this,arguments)}}();return v(function(){console.log("deviceDetail onMounted"),A.value=i.currentRoute.value.params.deviceId,se()}),function(t,n){var r=w("a-descriptions-item"),l=w("a-descriptions"),i=w("a-tooltip"),u=w("a-input"),c=w("a-form-item"),d=w("a-form"),s=w("a-switch"),f=w("a-col"),v=w("a-row"),x=w("a-tab-pane"),O=w("a-tabs");return p(),y("div",z,[g(m(o),{gobackabled:"",title:ae.value},null,8,["title"]),h("div",null,[g(l,null,{default:b(function(){return[g(r,{label:"产品类型"},{default:b(function(){var e;return[_(k(null===(e=re.value)||void 0===e?void 0:e.productName),1)]}),_:1}),g(r,{label:"设备编号"},{default:b(function(){return[_(k(A.value),1)]}),_:1})]}),_:1})]),h("div",E,[g(O,{style:{height:"100%"},activeKey:a.value,"onUpdate:activeKey":n[2]||(n[2]=function(e){return a.value=e}),type:"card",tabBarGutter:0,tabBarStyle:{},size:"small"},{default:b(function(){return[g(x,{style:{height:"100%"},key:"1",tab:"设备属性"},{default:b(function(){return[h("div",N,[h("div",G,[h("div",T,[g(d,{layout:"inline"},{default:b(function(){return[g(c,null,{default:b(function(){return[g(u,{allowClear:"",value:ue.value,"onUpdate:value":n[0]||(n[0]=function(e){return ue.value=e}),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:b(function(){return[g(i,{title:"点击搜索",onClick:ce},{default:b(function(){return[g(m(S),{style:{color:"rgba(0, 0, 0, 0.45)"}})]}),_:1})]}),_:1},8,["value"])]}),_:1})]}),_:1})]),h("div",J,[h("div",R,[n[3]||(n[3]=h("div",{style:{"margin-right":"6px","font-size":"14px"}},"实时刷新",-1)),g(s,{checked:te.value,"onUpdate:checked":n[1]||(n[1]=function(e){return te.value=e}),onChange:ne},null,8,["checked"])]),g(i,{onClick:se},{default:b(function(){return[g(m(F),{style:{"font-size":"16px"}})]}),_:1})])]),h("div",U,[g(v,{gutter:[16,16]},{default:b(function(){return[(p(!0),y(j,null,C(le.value,function(t){return p(),P(f,{span:6},{default:b(function(){return[h("div",K,[h("div",M,[h("div",B,[g(i,{mouseEnterDelay:.5},{title:b(function(){var a,r,o;return[h("div",null,[n[4]||(n[4]=h("span",null,"是否为数组:",-1)),null!==(a=t.model.define)&&void 0!==a&&a.isArray?(p(),y("span",D,"是")):(p(),y("span",L,"否"))]),h("div",null,[n[5]||(n[5]=h("span",null,"标识符:",-1)),h("span",null,k(t.model.title),1)]),h("div",null,[n[6]||(n[6]=h("span",null,"数据类型:",-1)),h("span",null,k(t.model.type),1)]),null!==(r=t.model.define)&&void 0!==r&&r.range?(p(),y("div",W,[(p(!0),y(j,null,C(null===(o=t.model.define)||void 0===o?void 0:o.range,function(t,a){return p(),y("div",{key:a},["min"==a?(p(),y("span",q,e(n[7]||(n[7]=[h("span",null,"最小值:",-1)])))):"max"==a?(p(),y("span",H,e(n[8]||(n[8]=[h("span",null,"最大值:",-1)])))):"len"==a?(p(),y("span",$,e(n[9]||(n[9]=[h("span",null,"最大长度:",-1)])))):(p(),y("span",Q,[h("span",null,k(a)+":",1)])),h("span",null,k(t),1)])}),128))])):I("",!0)]}),default:b(function(){return[h("span",null,k(t.name),1)]}),_:2},1024)]),n[10]||(n[10]=h("div",null,[h("a",{style:{color:"#0058FF","font-size":"14px"}},"查看数据")],-1))]),h("div",V,[h("div",X,[g(i,{placement:"topLeft"},{title:b(function(){return[_(k(t.value),1)]}),default:b(function(){return[_(" "+k(t.value),1)]}),_:2},1024)]),h("div",null,[t.info?(p(),y("span",Y,[n[11]||(n[11]=h("span",null,"(",-1)),h("span",null,k(t.info),1),n[12]||(n[12]=h("span",null,")",-1))])):I("",!0)])]),h("div",Z,[h("span",null,k(t.date),1)])])]}),_:2},1024)}),256))]}),_:1})])])]}),_:1})]}),_:1},8,["activeKey"])])])}}});t("default",A(ee,[["__scopeId","data-v-c04d5ed4"]]))}}})}();
|