suyuan/public/admin/assets/index.2e2f8a60.js

2 lines
6.7 KiB
JavaScript

import{B as q,C as H,R as J,S as M,w as O,D as z,H as G,I as Q,J as W,K as X}from"./element-plus.c4a2af8a.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.2a46e71f.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import{u as ee}from"./usePaging.160b82b8.js";import{u as le}from"./useDictOptions.f965e37e.js";import{_ as te,a as ae,b as ue}from"./edit.vue_vue_type_script_setup_true_name_deviceEdit_lang.da19b772.js";import"./lodash.ec5da75f.js";import{f as oe}from"./index.a7ae38ad.js";import{d as S,s as ne,r as x,$ as se,af as ie,o as n,c as f,U as l,L as t,M as D,u,K as p,R as de,V,a7 as y,a as U,k as re,S as C,n as pe}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 me=C("\u67E5\u8BE2"),ce=C("\u91CD\u7F6E"),_e={class:"mt-4"},ve=C(" \u7F16\u8F91 "),fe=C(" \u5220\u9664 "),Be={class:"flex mt-4 justify-end"},be=S({name:"deviceLists"}),nl=S({...be,setup(Ee){const w=ne(),k=x(!1),o=se({code:"",name:"",type:"",status:"",is_online:"",is_bind:""}),$=x([]),L=c=>{$.value=c.map(({id:a})=>a)},{dictData:s}=le("device_type,device_status,device_online_status,device_bind_status"),{pager:_,getLists:B,resetParams:R,resetPage:A}=ee({fetchFun:ae,params:o}),I=async c=>{var a,v;k.value=!0,await pe(),(a=w.value)==null||a.open("edit"),(v=w.value)==null||v.setFormData(c)},N=async c=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ue({id:c}),B()};return B(),(c,a)=>{const v=q,m=H,r=J,b=M,E=O,P=z,h=G,i=Q,F=Z,T=W,K=Y,g=ie("perms"),j=X;return n(),f("div",null,[l(h,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[l(P,{class:"mb-[-16px]",model:o,inline:""},{default:t(()=>[l(m,{label:"\u8BBE\u5907\u7F16\u7801",prop:"code"},{default:t(()=>[l(v,{class:"w-[280px]",modelValue:o.code,"onUpdate:modelValue":a[0]||(a[0]=e=>o.code=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u7F16\u7801"},null,8,["modelValue"])]),_:1}),l(m,{label:"\u8BBE\u5907\u540D\u79F0",prop:"name"},{default:t(()=>[l(v,{class:"w-[280px]",modelValue:o.name,"onUpdate:modelValue":a[1]||(a[1]=e=>o.name=e),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0"},null,8,["modelValue"])]),_:1}),l(m,{label:"\u8BBE\u5907\u7C7B\u578B",prop:"type"},{default:t(()=>[l(b,{class:"w-[280px]",modelValue:o.type,"onUpdate:modelValue":a[2]||(a[2]=e=>o.type=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907\u7C7B\u578B"},{default:t(()=>[l(r,{label:"\u5168\u90E8",value:""}),(n(!0),f(V,null,y(u(s).device_type,(e,d)=>(n(),p(r,{key:d,label:e.name,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(m,{label:"\u8BBE\u5907\u72B6\u6001",prop:"status"},{default:t(()=>[l(b,{class:"w-[280px]",modelValue:o.status,"onUpdate:modelValue":a[3]||(a[3]=e=>o.status=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907\u72B6\u6001"},{default:t(()=>[l(r,{label:"\u5168\u90E8",value:""}),(n(!0),f(V,null,y(u(s).device_status,(e,d)=>(n(),p(r,{key:d,label:e.name,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(m,{label:"\u662F\u5426\u5728\u7EBF",prop:"is_online"},{default:t(()=>[l(b,{class:"w-[280px]",modelValue:o.is_online,"onUpdate:modelValue":a[4]||(a[4]=e=>o.is_online=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u5728\u7EBF"},{default:t(()=>[l(r,{label:"\u5168\u90E8",value:""}),(n(!0),f(V,null,y(u(s).device_online_status,(e,d)=>(n(),p(r,{key:d,label:e.name,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(m,{label:"\u662F\u5426\u7ED1\u5B9A\u571F\u5730",prop:"is_bind"},{default:t(()=>[l(b,{class:"w-[280px]",modelValue:o.is_bind,"onUpdate:modelValue":a[5]||(a[5]=e=>o.is_bind=e),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7ED1\u5B9A\u571F\u5730"},{default:t(()=>[l(r,{label:"\u5168\u90E8",value:""}),(n(!0),f(V,null,y(u(s).device_bind_status,(e,d)=>(n(),p(r,{key:d,label:e.name,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(m,null,{default:t(()=>[l(E,{type:"primary",onClick:u(A)},{default:t(()=>[me]),_:1},8,["onClick"]),l(E,{onClick:u(R)},{default:t(()=>[ce]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),D((n(),p(h,{class:"!border-none",shadow:"never"},{default:t(()=>[U("div",_e,[l(T,{data:u(_).lists,onSelectionChange:L},{default:t(()=>[l(i,{type:"selection",width:"55"}),l(i,{label:"ID",prop:"id","show-overflow-tooltip":""}),l(i,{label:"\u8BBE\u5907\u7F16\u7801",prop:"code","show-overflow-tooltip":""}),l(i,{label:"\u8BBE\u5907\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),l(i,{label:"\u8BBE\u5907\u7C7B\u578B",prop:"type"},{default:t(({row:e})=>[l(F,{options:u(s).device_type,value:e.type},null,8,["options","value"])]),_:1}),l(i,{label:"\u8BBE\u5907\u72B6\u6001",prop:"status"},{default:t(({row:e})=>[l(F,{options:u(s).device_status,value:e.status},null,8,["options","value"])]),_:1}),l(i,{label:"\u662F\u5426\u5728\u7EBF",prop:"is_online"},{default:t(({row:e})=>[l(F,{options:u(s).device_online_status,value:e.is_online},null,8,["options","value"])]),_:1}),l(i,{label:"\u662F\u5426\u7ED1\u5B9A\u571F\u5730",prop:"is_bind"},{default:t(({row:e})=>[l(F,{options:u(s).device_bind_status,value:e.is_bind},null,8,["options","value"])]),_:1}),l(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:e})=>[D((n(),p(E,{type:"primary",link:"",onClick:d=>I(e)},{default:t(()=>[ve]),_:2},1032,["onClick"])),[[g,["device.device/edit"]]]),D((n(),p(E,{type:"danger",link:"",onClick:d=>N(e.id)},{default:t(()=>[fe]),_:2},1032,["onClick"])),[[g,["device.device/delete"]]])]),_:1})]),_:1},8,["data"])]),U("div",Be,[l(K,{modelValue:u(_),"onUpdate:modelValue":a[6]||(a[6]=e=>re(_)?_.value=e:null),onChange:u(B)},null,8,["modelValue","onChange"])])]),_:1})),[[j,u(_).loading]]),k.value?(n(),p(te,{key:0,ref_key:"editRef",ref:w,"dict-data":u(s),onSuccess:u(B),onClose:a[7]||(a[7]=e=>k.value=!1)},null,8,["dict-data","onSuccess"])):de("",!0)])}}});export{nl as default};