engineering/public/admin/assets/index.2ef18333.js
2024-03-04 15:04:21 +08:00

2 lines
4.9 KiB
JavaScript

import{I as R,y as A,w as I,D as U,C as O,L as z,M as G,N as H}from"./element-plus.258bf9e7.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{f as K,a as Q}from"./index.ec401e3b.js";import{u as W}from"./usePaging.f6660143.js";import{u as X}from"./useDictOptions.c644f395.js";import{a as Y,e as Z}from"./supervision_monitoring_equipment_detail.daa409c0.js";import"./lodash.1d82ee7c.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_supervisionMonitoringEquipmentDetailEdit_lang.f6a53ffc.js";import{d as D,s as oe,r as w,a0 as te,ai as ie,o as l,c as ae,V as e,M as t,O as _,u as n,L as r,S as ne,a as b,k as le,T as p,n as k}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.50cbfcc9.js";import"./tslib.60310f1a.js";import"./zrender.a255a587.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.9492d03b.js";const se=p("\u67E5\u8BE2"),ue=p("\u91CD\u7F6E"),re=p(" \u65B0\u589E "),pe=p(" \u5220\u9664 "),me={class:"mt-4"},de=p(" \u7F16\u8F91 "),ce=p(" \u5220\u9664 "),_e={class:"flex mt-4 justify-end"},fe=D({name:"supervisionMonitoringEquipmentDetailLists"}),to=D({...fe,setup(ve){const f=oe(),v=w(!1),s=te({device_id:"",name:""}),h=w([]),y=a=>{h.value=a.map(({id:o})=>o)},{dictData:V}=X(""),{pager:m,getLists:E,resetParams:x,resetPage:q}=W({fetchFun:Y,params:s}),S=async()=>{var a;v.value=!0,await k(),(a=f.value)==null||a.open("add")},$=async a=>{var o,d;v.value=!0,await k(),(o=f.value)==null||o.open("edit"),(d=f.value)==null||d.setFormData(a)},g=async a=>{await K.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Z({id:a}),E()};return E(),(a,o)=>{const d=R,C=A,u=I,L=U,B=O,j=Q,c=z,M=G,N=J,F=ie("perms"),P=H;return l(),ae("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(L,{class:"mb-[-16px]",model:s,inline:""},{default:t(()=>[e(C,{label:"\u8BBE\u5907\u4FE1\u606Fid",prop:"device_id"},{default:t(()=>[e(d,{class:"w-[280px]",modelValue:s.device_id,"onUpdate:modelValue":o[0]||(o[0]=i=>s.device_id=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u4FE1\u606Fid"},null,8,["modelValue"])]),_:1}),e(C,{label:"\u8BBE\u5907\u540D\u79F0",prop:"name"},{default:t(()=>[e(d,{class:"w-[280px]",modelValue:s.name,"onUpdate:modelValue":o[1]||(o[1]=i=>s.name=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(C,null,{default:t(()=>[e(u,{type:"primary",onClick:n(q)},{default:t(()=>[se]),_:1},8,["onClick"]),e(u,{onClick:n(x)},{default:t(()=>[ue]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((l(),r(B,{class:"!border-none",shadow:"never"},{default:t(()=>[_((l(),r(u,{type:"primary",onClick:S},{icon:t(()=>[e(j,{name:"el-icon-Plus"})]),default:t(()=>[re]),_:1})),[[F,["supervision_project.supervision_monitoring_equipment_detail/add"]]]),_((l(),r(u,{disabled:!h.value.length,onClick:o[2]||(o[2]=i=>g(h.value))},{default:t(()=>[pe]),_:1},8,["disabled"])),[[F,["supervision_project.supervision_monitoring_equipment_detail/delete"]]]),b("div",me,[e(M,{data:n(m).lists,onSelectionChange:y},{default:t(()=>[e(c,{type:"selection",width:"55"}),e(c,{label:"\u8BBE\u5907\u4FE1\u606Fid",prop:"device_id","show-overflow-tooltip":""}),e(c,{label:"\u8BBE\u5907\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(c,{label:"\u662F\u5426\u663E\u793A 0-\u662F 1-\u5426",prop:"is_show","show-overflow-tooltip":""}),e(c,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:i})=>[_((l(),r(u,{type:"primary",link:"",onClick:T=>$(i)},{default:t(()=>[de]),_:2},1032,["onClick"])),[[F,["supervision_project.supervision_monitoring_equipment_detail/edit"]]]),_((l(),r(u,{type:"danger",link:"",onClick:T=>g(i.id)},{default:t(()=>[ce]),_:2},1032,["onClick"])),[[F,["supervision_project.supervision_monitoring_equipment_detail/delete"]]])]),_:1})]),_:1},8,["data"])]),b("div",_e,[e(N,{modelValue:n(m),"onUpdate:modelValue":o[3]||(o[3]=i=>le(m)?m.value=i:null),onChange:n(E)},null,8,["modelValue","onChange"])])]),_:1})),[[P,n(m).loading]]),v.value?(l(),r(ee,{key:0,ref_key:"editRef",ref:f,"dict-data":n(V),onSuccess:n(E),onClose:o[4]||(o[4]=i=>v.value=!1)},null,8,["dict-data","onSuccess"])):ne("",!0)])}}});export{to as default};