import{aT as z,a0 as H,ax as U,W,M as R}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import"./index.1703796278973300.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import"./index.1703796278973305.js";import"./index.1703796278973306.js";import"./index.170379627897336.js";import{_ as Q}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import"./index.170379627897318.js";import"./index.170379627897319.js";import"./index.170379627897320.js";import"./index.170379627897321.js";import"./index.170379627897322.js";import"./index.170379627897323.js";import"./index.170379627897324.js";import"./index.170379627897325.js";import"./index.170379627897326.js";import"./index.170379627897327.js";import"./index.170379627897328.js";import"./Item.1703796278973.js";import{a as X}from"./comm.1703796278973.js";import{q as Y,d as Z}from"./mjg.17037962789732.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_name_modifyDrawer_lang.1703796278973.js";import{d as L,k as e,v as te,V as P,a3 as oe,r as x,o as v,c as A,a,b as s,u as t,M as ae,t as se,x as ne,F as re,h as le,z as p,G as ie,H as ce}from"./vue.1703796278973.js";import{_ as pe}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./permission.1703796278973.js";import"./system.1703796278973.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";import"./index.1703796278973318.js";import"./index.170379627897329.js";import"./index.170379627897330.js";import"./store.1703796278973.js";import"./moment.1703796278973.js";const S=i=>(ie("data-v-6570541e"),i=i(),ce(),i),de={class:"delete_content"},me=["src"],ue=S(()=>p("p",{class:"delete_content title"},"确认删除这条信息吗?",-1)),_e=S(()=>p("p",{class:"delete_content desc"},"删除后无法恢复,确定要删除吗?",-1)),fe=L({name:"Category"}),ye=L({...fe,setup(i){const c=e([]),d=e({}),m=e();e([]);const u=e({}),_=e(""),f=e(0),C=e(0),B=e(!1);let I=e(),J=e(0);e([]);const y=e(!1),h=e(!1),M=e("object"),j=e([{title:"",dataIndex:"name",search:{type:"string",componentProps:{placeholder:"请输入关键字"},defaultValue:"123123"}}]),q=o=>{console.log(o),h.value=!0,setTimeout(()=>{h.value=!1,y.value=!1},1e3)},F=o=>{console.log(o),y.value=!1},O=o=>{let l=[];for(let r in o)l.push(r+"="+o[r]);I.value={where:l.join(" and ")},c.value=[]},V=(o,l)=>{if(!o)return[];const r=[{key:"update",text:"编辑",tooltip:{title:"编辑"},icon:"EditOutlined",onClick:async()=>{_.value="编辑单位信息",f.value=2,u.value=o,P(()=>{m.value.show(o)})}},{key:"delete",text:"删除",tooltip:{title:"删除"},icon:"DeleteOutlined",popConfirm:{title:"确认删除?",okText:" 确定",cancelText:"取消",onConfirm:async()=>{(await Z(o.id)).status===200?(R.success("操作成功!"),d.value.reload()):R.error("操作失败!")}}}];return J.value=r.length,r},b=te({columns:[{title:"编码",dataIndex:"code",key:"code"},{title:"名称",dataIndex:"name",key:"name"},{title:"所属库房",dataIndex:"warehouseId",key:"warehouseId"},{title:"存储类别",dataIndex:"storageType",key:"storageType"},{title:"连接地址",dataIndex:"linkAddress",key:"linkAddress"},{title:"列",dataIndex:"cols",key:"cols"},{title:"组",dataIndex:"groups",key:"groups"},{title:"层",dataIndex:"layers",key:"layers"},{title:"备注",dataIndex:"memo",key:"memo"},{title:"操作",key:"action",fixed:"right",ellipsis:!0,scopedSlots:!0}],add:async()=>{_.value="新增密集柜",f.value=0,C.value=3,P(()=>{m.value.show(u.value)})},refresh:()=>{d.value.reload()}}),{add:K,columns:he,refresh:D}=oe(b);return(o,l)=>{const r=z,k=x("AIcon"),T=Q,w=H,E=U,G=x("FullPage"),N=W,$=x("page-container");return v(),A($,null,{default:a(()=>[s(r,{columns:t(j),onSearch:O,type:t(M)},null,8,["columns","type"]),s(G,null,{default:a(()=>[s(E,{ref_key:"tableRef",ref:d,columns:t(b).columns,request:t(Y),model:"TABLE",expandedRowKeys:t(c),"onUpdate:expandedRowKeys":l[0]||(l[0]=g=>ae(c)?c.value=g:null),scroll:{y:550},defaultParams:{paging:!1,sorts:[{name:"sortIndex",order:"asc"},{name:"createTime",order:"desc"}]},params:t(I),loading:t(B)},{headerTitle:a(()=>[s(w,null,{default:a(()=>[s(T,{type:"primary",onClick:t(K),hasPermission:"device/Category:add"},{icon:a(()=>[s(k,{type:"PlusOutlined"})]),default:a(()=>[se(" 新增密集柜 ")]),_:1},8,["onClick"])]),_:1})]),action:a(g=>[s(w,null,{default:a(()=>[(v(!0),ne(re,null,le(V(g,"table"),(n,ke)=>(v(),A(T,{key:n.key,disabled:n.disabled,popConfirm:n.popConfirm,hasPermission:"device/Category:"+n.key,tooltip:{...n.tooltip},onClick:n.onClick,type:"link",style:{padding:"0px"},danger:n.key==="delete"},{icon:a(()=>[s(k,{type:n.icon},null,8,["type"])]),_:2},1032,["disabled","popConfirm","hasPermission","tooltip","onClick","danger"]))),128))]),_:2},1024)]),_:1},8,["columns","request","expandedRowKeys","params","loading"])]),_:1}),s(ee,{ref_key:"modifyRef",ref:m,formData:t(u),title:t(_),isAdd:t(f),isChild:t(C),onRefresh:t(D)},null,8,["formData","title","isAdd","isChild","onRefresh"]),s(N,{visible:t(y),title:"确认删除",onOk:q,onCancel:F,confirmLoading:t(h)},{default:a(()=>[p("p",de,[p("img",{src:t(X)("/question-mark.png"),alt:""},null,8,me)]),ue,_e]),_:1},8,["visible","confirmLoading"])]),_:1})}}});const ht=pe(ye,[["__scopeId","data-v-6570541e"]]);export{ht as default};