suyuan/public/admin/assets/detail.e2b4667d.js

2 lines
6.8 KiB
JavaScript

import{P as q,I as J,_ as L,$ as S,a0 as j,x as H,y as K,L as O,M as Q,O as G,J as W}from"./element-plus.7a22678c.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{u as Y}from"./vue-router.ed788fee.js";import{a as Z}from"./useDictOptions.f8827d58.js";import{a as ee,b as D}from"./device.23676c90.js";import{t as E}from"./index.2eb94ba0.js";import{d as A,r as w,_ as y,o as u,c as m,a as e,T as a,K as s,U as B,S as _,Q as v,u as f,a6 as te,J as C,R as k}from"./@vue.108c970a.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./axios.eb055ccc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.ec5da75f.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";const oe=e("div",null,[e("span",{class:"card-title"},"\u8BBE\u5907\u8D44\u6599")],-1),ae={class:"flex flex-wrap"},ie={key:0,class:"w-1/2 md:w-1/3 mb-4"},se=e("div",{class:"leading-10"},"\u6240\u5C5E\u571F\u5730\uFF1A",-1),le={class:"text-3xl text-tx-gray"},ne={key:1,class:"w-1/2 md:w-1/3 mb-4"},de=e("div",{class:"leading-10"},"\u6240\u5C5E\u4EA7\u54C1\uFF1A",-1),ce={class:"text-3xl text-tx-gray"},_e={class:"flex flex-wrap"},ue={class:"w-1/2 md:w-1/6 mb-4"},re=e("div",{class:"leading-10"},"\u8BBE\u5907\u540D\u79F0\uFF1A",-1),me={class:"text-3xl text-tx-gray"},pe={class:"w-1/2 md:w-1/6 mb-4"},ve=e("div",{class:"leading-10"},"\u8BBE\u5907\u7F16\u7801\uFF1A",-1),ge={class:"text-3xl text-tx-gray"},he={class:"w-1/2 md:w-1/6 mb-4"},xe=e("div",{class:"leading-10"},"\u8BBE\u5907\u7C7B\u578B\uFF1A",-1),ye={class:"text-3xl text-tx-gray"},fe={class:"w-1/2 md:w-1/6 mb-4"},Fe=e("div",{class:"leading-10"},"\u8BBE\u5907\u72B6\u6001\uFF1A",-1),be={class:"text-3xl text-tx-gray"},De={class:"w-1/2 md:w-1/6 mb-4"},Ee=e("div",{class:"leading-10"},"\u662F\u5426\u5728\u7EBF\uFF1A",-1),we={class:"text-3xl text-tx-gray"},Be={class:"flex justify-between mb-2"},Ce={class:"mt-2 text-sm text-tx-secondary"},Ae=["onClick"],ke={class:"my-6 text-3xl"},Ve={class:"mt-2 text-sm text-tx-secondary"},ze=k("\u53EA\u8BFB"),Te=["src"],Me=A({name:"deviceDetail"}),ft=A({...Me,setup($e){const F=w("monitor_item"),t=y({device:{},monitor_item:[]}),l=y({device_id:"",monitor_type:"",page_no:1,page_size:15,total:""}),{dictData:g}=Z("device_type,device_status,device_online_status,device_bind_status,monitor_item"),V=Y();(async()=>{ee({id:V.query.device_id}).then(o=>{t.device.name=o.name,t.device.code=o.code,t.device.type=o.type,t.device.status=o.status,t.device.is_online=o.is_online,t.device.is_bind=o.is_bind,t.device.land_id=o.land_id==null?"":o.land_id,t.device.land_title=o.land_title==null?"":o.land_title,t.device.product_id=o.product_id==null?"":o.product_id,t.device.product_name=o.product_name==null?"":o.product_name,t.monitor_item=o.monitor_item,t.device.video_url=o.video_url}).catch(o=>{console.log("err",o)})})();const p=w(!1),r=y({gridData:[{}]}),z=(o,i)=>{r.gridData=[{}],l.device_id=o,l.monitor_type=i,D({id:o,monitor_type:i,page_no:l.page_no,page_size:l.page_size}).then(n=>{p.value=!0,l.total=n.count,n.lists.map(c=>{l.total=n.count,r.gridData.push({id:c.id,date:c.create_time?E(c.create_time,"yyyy-mm-dd hh:MM:ss"):"",value:c.monitor_value})})}).catch(n=>{console.log("err",n)})},T=o=>{console.log(`current page: ${o}`),r.gridData=[{}],D({id:l.device_id,monitor_type:l.monitor_type,page_no:o,page_size:l.page_size}).then(i=>{p.value=!0,l.total=i.count,i.lists.map(n=>{r.gridData.push({id:n.id,date:n.create_time?E(n.create_time,"yyyy-mm-dd hh:MM:ss"):"",value:n.monitor_value})})}).catch(i=>{console.log("err",i)})};return(o,i)=>{const n=q,c=J,h=X,M=L,$=S,N=j,b=H,I=K,x=O,P=Q,R=G,U=W;return u(),m(B,null,[e("div",null,[a(c,{class:"!border-none",shadow:"never"},{default:s(()=>[a(n,{content:"\u8BBE\u5907\u8BE6\u60C5",onBack:i[0]||(i[0]=d=>o.$router.back())})]),_:1}),a(c,{class:"!border-none mt-4 flex-1",shadow:"never"},{header:s(()=>[oe]),default:s(()=>[e("div",ae,[t.device.land_id!=""?(u(),m("div",ie,[se,e("div",le,"ID\uFF1A"+_(t.device.land_id)+" / \u540D\u79F0\uFF1A"+_(t.device.land_title),1)])):v("",!0),t.device.product_id!=""?(u(),m("div",ne,[de,e("div",ce,"ID\uFF1A"+_(t.device.product_id)+" / \u540D\u79F0\uFF1A"+_(t.device.land_title),1)])):v("",!0)]),e("div",_e,[e("div",ue,[re,e("div",me,_(t.device.name),1)]),e("div",pe,[ve,e("div",ge,_(t.device.code),1)]),e("div",he,[xe,e("div",ye,[a(h,{options:f(g).device_type,value:t.device.type},null,8,["options","value"])])]),e("div",fe,[Fe,e("div",be,[a(h,{options:f(g).device_status,value:t.device.status},null,8,["options","value"])])]),e("div",De,[Ee,e("div",we,[a(h,{options:f(g).device_online_status,value:t.device.is_online},null,8,["options","value"])])])])]),_:1}),a(c,{class:"!border-none mt-4 flex-1",shadow:"never"},{default:s(()=>[a(I,{modelValue:F.value,"onUpdate:modelValue":i[1]||(i[1]=d=>F.value=d),class:""},{default:s(()=>[a(b,{label:"\u76D1\u63A7\u6570\u636E",name:"monitor_item"},{default:s(()=>[a(N,{gutter:12},{default:s(()=>[(u(!0),m(B,null,te(t.monitor_item,d=>(u(),C($,{span:6,key:d},{default:s(()=>[a(c,{shadow:"always",class:"mb-4"},{default:s(()=>[e("div",Be,[e("div",Ce,_(d.name),1),e("div",{class:"mt-2 text-sm text-tx-secondary",style:{cursor:"pointer"},onClick:Ie=>z(d.device_id,d.value)}," \u5386\u53F2\u6570\u636E ",8,Ae)]),e("div",ke,_(d.monitor_value),1),e("div",Ve,[a(M,{class:"mr-2",type:"info"},{default:s(()=>[ze]),_:1}),k(_(d.last_time),1)])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1}),t.device.type==3?(u(),C(b,{key:0,label:"\u76D1\u63A7\u89C6\u9891",name:"monitor_video"},{default:s(()=>[t.device.video_url!=""?(u(),m("video",{key:0,src:t.device.video_url,controls:""},null,8,Te)):v("",!0)]),_:1})):v("",!0)]),_:1},8,["modelValue"])]),_:1})]),a(U,{modelValue:p.value,"onUpdate:modelValue":i[2]||(i[2]=d=>p.value=d),title:"\u5386\u53F2\u6570\u636E"},{default:s(()=>[a(P,{data:r.gridData},{default:s(()=>[a(x,{property:"id",label:"ID",width:"80"}),a(x,{property:"date",label:"\u65F6\u95F4",width:"250"}),a(x,{property:"value",label:"\u6570\u636E"})]),_:1},8,["data"]),a(R,{small:"",background:"",layout:"prev, pager, next","page-size":l.page_size,total:l.total,class:"mt-4",onCurrentChange:T},null,8,["page-size","total"])]),_:1},8,["modelValue"])],64)}}});export{ft as default};