2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
import{B as U,C as M,w as N,D as P,H as K,I as j,J as q,K as H}from"./element-plus.c4a2af8a.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.2a46e71f.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.d8a052c5.js";import{u as G}from"./usePaging.160b82b8.js";import{u as O}from"./useDictOptions.f965e37e.js";import{_ as Q,a as W,b as X}from"./edit.vue_vue_type_script_setup_true_name_airMonitorEdit_lang.fa663f21.js";import"./lodash.ec5da75f.js";import{f as Y}from"./index.a7ae38ad.js";import{d as B,s as Z,r as b,$ as ee,af as oe,o as u,c as te,U as e,L as i,M as C,u as r,K as c,R as ie,a as F,k as ae,S as _,n as le}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.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"./index.a5d54722.js";import"./vue-router.12d45bc3.js";import"./pinia.dfca86b4.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.2cdc8407.js";const re=_("\u67E5\u8BE2"),ne=_("\u91CD\u7F6E"),se={class:"mt-4"},ue=_(" \u7F16\u8F91 "),pe=_(" \u5220\u9664 "),me={class:"flex mt-4 justify-end"},de=B({name:"airMonitorLists"}),eo=B({...de,setup(ce){const f=Z(),v=b(!1),l=ee({device_id:"",create_time:""}),k=b([]),D=n=>{k.value=n.map(({id:o})=>o)},{dictData:g}=O(""),{pager:s,getLists:p,resetParams:A,resetPage:y}=G({fetchFun:W,params:l}),T=async n=>{var o,m;v.value=!0,await le(),(o=f.value)==null||o.open("edit"),(m=f.value)==null||m.setFormData(n)},V=async n=>{await Y.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:n}),p()};return p(),(n,o)=>{const m=U,w=M,x=z,d=N,I=P,E=K,t=j,$=q,L=J,h=oe("perms"),R=H;return u(),te("div",null,[e(E,{class:"!border-none mb-4",shadow:"never"},{default:i(()=>[e(I,{class:"mb-[-16px]",model:l,inline:""},{default:i(()=>[e(w,{label:"\u8BBE\u5907ID",prop:"device_id"},{default:i(()=>[e(m,{class:"w-[280px]",modelValue:l.device_id,"onUpdate:modelValue":o[0]||(o[0]=a=>l.device_id=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907ID"},null,8,["modelValue"])]),_:1}),e(w,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"},{default:i(()=>[e(x,{startTime:l.start_time,"onUpdate:startTime":o[1]||(o[1]=a=>l.start_time=a),endTime:l.end_time,"onUpdate:endTime":o[2]||(o[2]=a=>l.end_time=a)},null,8,["startTime","endTime"])]),_:1}),e(w,null,{default:i(()=>[e(d,{type:"primary",onClick:r(y)},{default:i(()=>[re]),_:1},8,["onClick"]),e(d,{onClick:r(A)},{default:i(()=>[ne]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),C((u(),c(E,{class:"!border-none",shadow:"never"},{default:i(()=>[F("div",se,[e($,{data:r(s).lists,onSelectionChange:D},{default:i(()=>[e(t,{type:"selection",width:"55"}),e(t,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(t,{label:"\u8BBE\u5907ID",prop:"device_id","show-overflow-tooltip":""}),e(t,{label:"\u8BBE\u5907\u540D\u79F0",prop:"device.name","show-overflow-tooltip":""}),e(t,{label:"\u98CE\u5411",prop:"wind_direction","show-overflow-tooltip":""}),e(t,{label:"\u98CE\u901F",prop:"wind_speed","show-overflow-tooltip":""}),e(t,{label:"\u7A7A\u6C14\u6E29\u5EA6",prop:"temperature","show-overflow-tooltip":""}),e(t,{label:"\u7A7A\u6C14\u6E7F\u5EA6",prop:"moisture","show-overflow-tooltip":""}),e(t,{label:"\u4E8C\u6C27\u5316\u78B3\u542B\u91CF",prop:"co2_content","show-overflow-tooltip":""}),e(t,{label:"\u5927\u6C14\u538B\u5F3A",prop:"pressure","show-overflow-tooltip":""}),e(t,{label:"\u964D\u96E8\u91CF",prop:"rainfall","show-overflow-tooltip":""}),e(t,{label:"\u5149\u7167\u5F3A\u5EA6",prop:"light_intensity","show-overflow-tooltip":""}),e(t,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(t,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:i(({row:a})=>[C((u(),c(d,{type:"primary",link:"",onClick:S=>T(a)},{default:i(()=>[ue]),_:2},1032,["onClick"])),[[h,["device.air_monitor/edit"]]]),C((u(),c(d,{type:"danger",link:"",onClick:S=>V(a.id)},{default:i(()=>[pe]),_:2},1032,["onClick"])),[[h,["device.air_monitor/delete"]]])]),_:1})]),_:1},8,["data"])]),F("div",me,[e(L,{modelValue:r(s),"onUpdate:modelValue":o[3]||(o[3]=a=>ae(s)?s.value=a:null),onChange:r(p)},null,8,["modelValue","onChange"])])]),_:1})),[[R,r(s).loading]]),v.value?(u(),c(Q,{key:0,ref_key:"editRef",ref:f,"dict-data":r(g),onSuccess:r(p),onClose:o[4]||(o[4]=a=>v.value=!1)},null,8,["dict-data","onSuccess"])):ie("",!0)])}}});export{eo as default};
|