1 |
- import{d as g,g as L,f as e,E as r,e as A,U as V,V as v,a0 as n,u as t,F as P}from"./vue-18ee037d.js";import{u as R}from"./formily-a077fcb9.js";import{ah as b,R as D,ai as F,aj as M,aa as B,al as G}from"./index-122302b9.js";import{u as N}from"./index-9374feb1.js";import"./dayjs-4778c158.js";import{_ as U}from"./scroll-tip.vue_vue_type_script_setup_true_lang-302683f3.js";import{u as k,q as H}from"./useDetail-83a3c860.js";import{u as W}from"./device-88d35103.js";import{C as x}from"./Card-58451e7c.js";import{S as K}from"./index-7af791cb.js";import"./index-41409ae5.js";import"./LeftOutlined-492d0e43.js";import"./index-bd60fcbe.js";import"./index-60ff9924.js";import"./index-92754d13.js";import"./index-c13eac51.js";import"./Group-ea2dcc3a.js";import"./createForOfIteratorHelper-502f0d2b.js";import"./useFlexGapSupport-791d0eca.js";import"./index-d1fbd179.js";import"./index-ac918f8f.js";import"./TextArea-1376d3ad.js";import"./scrollTo-854a9ced.js";import"./mockjs-890b569b.js";import"./useModal-3ca524ee.js";import"./gb28281-53c246af.js";import"./usePlay-843f5ae8.js";import"./index-7e9674b9.js";import"./index-868fc3c0.js";import"./index-cc7f4b20.js";import"./jb4-60518ffa.js";import"./index-8c1b53c2.js";import"./index-977bc6d2.js";const q=g({name:"Device"}),we=g({...q,setup(z){var E;const h=window.allEnv.media+"/hk/api",T=(E=L())==null?void 0:E.appContext;b.renderer.add("moreFields",{renderExpand(o,a){const{row:i}=a;return e("p",{class:"flex flex-col p-10px m-0"},[e("span",null,[e("b",null,[r("型号(Model): ")]),i.Model]),e("span",null,[e("b",null,[r("纬度(Latitude): ")]),i.Latitude]),e("span",null,[e("b",null,[r("经度(Longitude): ")]),i.Longitude]),e("span",null,[e("b",null,[r("GpsTime: ")]),i.GpsTime]),e("span",null,[e("b",null,[r("Owner: ")]),i.Owner])])}});const S=W(),c=A(()=>S.deviceList),{httpRefreshTime:I}=D({VITE_PORT:"3000",VITE_GLOB_APP_TITLE:"SagooMedia",VITE_GLOB_APP_SHORT_NAME:"SagooMedia",VITE_M7S_SERVER:"/media",VITE_USE_MOCK:"true",VITE_PUBLIC_PATH:"/plugin/media",VITE_DROP_CONSOLE:"true",VITE_BUILD_COMPRESS:"none",VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE:"false",VITE_GLOB_HTTP_REFRESH_TIME:"5000",VITE_USE_IMAGEMIN:"true",VITE_LEGACY:"false",BASE_URL:"/plugin/media",MODE:"production",DEV:!1,PROD:!0,SSR:!1}),{pause:s,resume:p}=F(_,I),C=o=>{const a=String(o.target.value).trim().toLowerCase();if(a){const i=["ID","Name"],l=c.value.filter(d=>i.some(u=>String(d[u]).toLowerCase().indexOf(a)>-1));m(l),s()}else m(c.value),p()},{FormilyForm:y}=R({schema:H(C)}),O={toggleRowExpand:({expanded:o})=>{o?s():p()}},f=N(),m=o=>{f.tableRef.reloadData(o)};async function _(){G.post(h+"/resource/v2/camrea/status",{status:"",pageNo:1,pageSize:1e3}).then(o=>{var i,l;const a=((l=(i=o.data)==null?void 0:i.data)==null?void 0:l.list)||[];a.sort((d,u)=>d.online-u.online),m(a)})}_();const w={maxHeight:"100%",rowConfig:{keyField:"ID",useKey:!0},columnConfig:{useKey:!0},columns:[{field:"indexCode",title:"资源编码",showOverflow:"tooltip",minWidth:"200px",fixed:"left",type:"html"},{field:"regionName",title:"区域名称",showOverflow:"tooltip",minWidth:"120px",align:"center",fixed:"left",type:"html"},{field:"cn",title:"设备名称",showOverflow:"tooltip",minWidth:"120px",align:"center",type:"html"},{field:"collectTime",title:"采集时间",showOverflow:"tooltip",minWidth:"180px",align:"center",type:"html"},{field:"treatyType",title:"传输协议",width:"120px",align:"center",formatter:({row:o})=>o.online?"TCP":"UDP"},{field:"online",title:"状态",width:"120px",align:"center",type:"html",formatter:({row:o})=>o.online?'<span style="color: #67c23a;">在线</span>':'<span style="color: #f56c6c;">离线</span>'}],data:[]};return(o,a)=>(V(),v(P,null,[e(t(x),{bordered:!1,bodyStyle:{padding:"26px 10px 0 10px",marginBottom:"8px"}},{default:n(()=>[e(t(y))]),_:1}),e(t(x),{bordered:!1,bodyStyle:{padding:"10px",height:"calc(100% - 50px)"},style:{height:"calc(100% - 100px)"}},{default:n(()=>[e(t(U),{windowWidth:1716}),e(t(M),{uid:t(f).uid,gridOptions:t(w),gridEvent:t(O)},{operate:n(({row:i})=>[e(t(K),null,{default:n(()=>[e(t(B),{size:"small",type:"link",onClick:()=>t(k)({row:i,appContext:t(T),pause:t(s),resume:t(p)})},{default:n(()=>[r(" 通道详情 ")]),_:2},1032,["onClick"])]),_:2},1024)]),_:1},8,["uid","gridOptions","gridEvent"])]),_:1},8,["bodyStyle"])],64))}});export{we as default};
|