2 lines
5.9 KiB
JavaScript
2 lines
5.9 KiB
JavaScript
import{I as R,y as O,G,H,w as W,D as z,C as J,L as K,M as Q,N as X}from"./element-plus.258bf9e7.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.60e89e82.js";import{f as Z,a as ee}from"./index.ec401e3b.js";import{u as oe}from"./usePaging.f6660143.js";import{u as te}from"./useDictOptions.c644f395.js";import{_ as le,a as ae,b as ne}from"./edit.vue_vue_type_script_setup_true_name_supervisionMonitoringEquipmentEdit_lang.0661c06a.js";import"./lodash.1d82ee7c.js";import{d as x,s as ie,r as h,a0 as ue,ai as se,o as i,c as k,V as e,M as t,O as v,u,L as r,S as re,W as pe,a8 as me,a as V,k as de,T as d,n as D}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.vue_vue_type_script_setup_true_lang.8f6cc90c.js";import"./supervision_project.e6761916.js";import"./index.9492d03b.js";import"./supervision_monitoring_equipment_detail.daa409c0.js";const ce=d("\u67E5\u8BE2"),_e=d("\u91CD\u7F6E"),ve=d(" \u65B0\u589E "),fe=d(" \u5220\u9664 "),Be={class:"mt-4"},be=d(" \u7F16\u8F91 "),Ee=d(" \u5220\u9664 "),Fe={class:"flex justify-end mt-4"},Ce=x({name:"supervisionMonitoringEquipmentLists"}),po=x({...Ce,setup(we){const f=ie(),B=h(!1),a=ue({project_id:"",device_name:"",device_type:"",device_sn:"",number:""}),F=h([]),q=n=>{F.value=n.map(({id:o})=>o)},{dictData:w}=te("device_type"),{pager:c,getLists:b,resetParams:S,resetPage:L}=oe({fetchFun:ae,params:a}),$=async()=>{var n;B.value=!0,await D(),(n=f.value)==null||n.open("add")},j=async n=>{var o,p;B.value=!0,await D(),(o=f.value)==null||o.open("edit"),(p=f.value)==null||p.setFormData(n)},g=async n=>{await Z.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ne({id:n}),b()};return b(),(n,o)=>{const p=R,_=O,A=G,M=H,m=W,N=z,y=J,P=ee,s=K,T=Q,U=Y,E=se("perms"),I=X;return i(),k("div",null,[e(y,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(N,{class:"mb-[-16px]",model:a,inline:""},{default:t(()=>[e(_,{label:"\u76D1\u63A7\u8BBE\u5907\u540D\u79F0",prop:"device_name"},{default:t(()=>[e(p,{class:"w-[280px]",modelValue:a.device_name,"onUpdate:modelValue":o[0]||(o[0]=l=>a.device_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u76D1\u63A7\u8BBE\u5907\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u8BBE\u5907\u7C7B\u578B",prop:"device_type"},{default:t(()=>[e(M,{class:"w-[280px]",modelValue:a.device_type,"onUpdate:modelValue":o[1]||(o[1]=l=>a.device_type=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907\u7C7B\u578B"},{default:t(()=>[(i(!0),k(pe,null,me(u(w).device_type,(l,C)=>(i(),r(A,{key:C,label:l.name,value:parseInt(l.value)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(_,{label:"\u8BBE\u5907\u5E8F\u5217\u53F7",prop:"device_sn"},{default:t(()=>[e(p,{class:"w-[280px]",modelValue:a.device_sn,"onUpdate:modelValue":o[2]||(o[2]=l=>a.device_sn=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u5E8F\u5217\u53F7"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u7F16\u53F7",prop:"number"},{default:t(()=>[e(p,{class:"w-[280px]",modelValue:a.number,"onUpdate:modelValue":o[3]||(o[3]=l=>a.number=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(_,null,{default:t(()=>[e(m,{type:"primary",onClick:u(L)},{default:t(()=>[ce]),_:1},8,["onClick"]),e(m,{onClick:u(S)},{default:t(()=>[_e]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((i(),r(y,{class:"!border-none",shadow:"never"},{default:t(()=>[v((i(),r(m,{type:"primary",onClick:$},{icon:t(()=>[e(P,{name:"el-icon-Plus"})]),default:t(()=>[ve]),_:1})),[[E,["supervision_project.supervision_monitoring_equipment/add"]]]),v((i(),r(m,{disabled:!F.value.length,onClick:o[4]||(o[4]=l=>g(F.value))},{default:t(()=>[fe]),_:1},8,["disabled"])),[[E,["supervision_project.supervision_monitoring_equipment/delete"]]]),V("div",Be,[e(T,{data:u(c).lists,onSelectionChange:q},{default:t(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"\u76D1\u63A7\u8BBE\u5907\u540D\u79F0",prop:"device_name","show-overflow-tooltip":""}),e(s,{label:"\u8BBE\u5907\u7C7B\u578B",prop:"device_type_text","show-overflow-tooltip":""}),e(s,{label:"\u8BBE\u5907\u5E8F\u5217\u53F7",prop:"device_sn","show-overflow-tooltip":""}),e(s,{label:"\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),e(s,{label:"\u5907\u6CE8",prop:"remark","show-overflow-tooltip":""}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:l})=>[v((i(),r(m,{type:"primary",link:"",onClick:C=>j(l)},{default:t(()=>[be]),_:2},1032,["onClick"])),[[E,["supervision_project.supervision_monitoring_equipment/edit"]]]),v((i(),r(m,{type:"danger",link:"",onClick:C=>g(l.id)},{default:t(()=>[Ee]),_:2},1032,["onClick"])),[[E,["supervision_project.supervision_monitoring_equipment/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",Fe,[e(U,{modelValue:u(c),"onUpdate:modelValue":o[5]||(o[5]=l=>de(c)?c.value=l:null),onChange:u(b)},null,8,["modelValue","onChange"])])]),_:1})),[[I,u(c).loading]]),B.value?(i(),r(le,{key:0,ref_key:"editRef",ref:f,"dict-data":u(w),onSuccess:u(b),onClose:o[6]||(o[6]=l=>B.value=!1)},null,8,["dict-data","onSuccess"])):re("",!0)])}}});export{po as default};
|