import{aT as G,a0 as H,ax as U,W,M as T}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{a as Y,d as Z}from"./store.1703796278973.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_name_modifyModal_lang.17037962789734.js";import{d as L,k as e,v as te,V as w,a3 as oe,r as k,o as x,c as S,a as n,b as a,u as t,M as ne,t as ae,x as se,F as ie,h as re,z as p,G as le,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"./institution.1703796278973.js";const A=l=>(le("data-v-e26145b3"),l=l(),ce(),l),me={class:"delete_content"},de=["src"],ue=A(()=>p("p",{class:"delete_content title"},"确认删除这条信息吗?",-1)),_e=A(()=>p("p",{class:"delete_content desc"},"删除后无法恢复,确定要删除吗?",-1)),fe=L({name:"Category"}),ye=L({...fe,setup(l){const c=e([]),m=e({}),d=e();e([]);const u=e({}),_=e(""),f=e(0),C=e(0),B=e(!1);let b=e(),j=e(0);e([]);const y=e(!1),h=e(!1),F=e("object"),O=e([{title:"",dataIndex:"name",search:{type:"string",componentProps:{placeholder:"请输入关键字"},defaultValue:"123123"}}]),V=o=>{console.log(o),h.value=!0,setTimeout(()=>{h.value=!1,y.value=!1},1e3)},q=o=>{console.log(o),y.value=!1},J=o=>{let r=[];for(let i in o)r.push(i+"="+o[i]);b.value={where:r.join(" and ")},c.value=[]},K=(o,r)=>{if(!o)return[];const i=[{key:"update",text:"编辑",tooltip:{title:"编辑"},icon:"EditOutlined",onClick:async()=>{_.value="编辑单位信息",f.value=2,u.value=o,w(()=>{d.value.show(o)})}},{key:"delete",text:"删除",tooltip:{title:"删除"},icon:"DeleteOutlined",popConfirm:{title:"确认删除?",okText:" 确定",cancelText:"取消",onConfirm:async()=>{(await Z(o.id)).status===200?(T.success("操作成功!"),m.value.reload()):T.error("操作失败!")}}}];return j.value=i.length,i},I=te({columns:[{title:"库房名称",dataIndex:"name",key:"name"},{title:"所属单位",dataIndex:"institution.name",key:"institution"},{title:"所属区域",dataIndex:"region.name",key:"region"},{title:"设备数量",dataIndex:"units",key:"units"},{title:"操作",key:"action",fixed:"right",ellipsis:!0,scopedSlots:!0}],add:async()=>{_.value="新增单位",f.value=0,C.value=3,w(()=>{d.value.show(u.value)})},refresh:()=>{m.value.reload()}}),{add:M,columns:he,refresh:D}=oe(I);return(o,r)=>{const i=G,g=k("AIcon"),R=Q,P=H,E=U,N=k("FullPage"),$=W,z=k("page-container");return x(),S(z,null,{default:n(()=>[a(i,{columns:t(O),onSearch:J,type:t(F)},null,8,["columns","type"]),a(N,null,{default:n(()=>[a(E,{ref_key:"tableRef",ref:m,columns:t(I).columns,request:t(Y),model:"TABLE",expandedRowKeys:t(c),"onUpdate:expandedRowKeys":r[0]||(r[0]=v=>ne(c)?c.value=v:null),scroll:{y:550},defaultParams:{paging:!1,sorts:[{name:"sortIndex",order:"asc"},{name:"createTime",order:"desc"}]},params:t(b),loading:t(B)},{headerTitle:n(()=>[a(P,null,{default:n(()=>[a(R,{type:"primary",onClick:t(M),hasPermission:"device/Category:add"},{icon:n(()=>[a(g,{type:"PlusOutlined"})]),default:n(()=>[ae(" 新增库房 ")]),_:1},8,["onClick"])]),_:1})]),action:n(v=>[a(P,null,{default:n(()=>[(x(!0),se(ie,null,re(K(v,"table"),(s,ge)=>(x(),S(R,{key:s.key,disabled:s.disabled,popConfirm:s.popConfirm,hasPermission:"device/Category:"+s.key,tooltip:{...s.tooltip},onClick:s.onClick,type:"link",style:{padding:"0px"},danger:s.key==="delete"},{icon:n(()=>[a(g,{type:s.icon},null,8,["type"])]),_:2},1032,["disabled","popConfirm","hasPermission","tooltip","onClick","danger"]))),128))]),_:2},1024)]),_:1},8,["columns","request","expandedRowKeys","params","loading"])]),_:1}),a(ee,{ref_key:"modifyRef",ref:d,formData:t(u),title:t(_),isAdd:t(f),isChild:t(C),onRefresh:t(D)},null,8,["formData","title","isAdd","isChild","onRefresh"]),a($,{visible:t(y),title:"确认删除",onOk:V,onCancel:q,confirmLoading:t(h)},{default:n(()=>[p("p",me,[p("img",{src:t(X)("/question-mark.png"),alt:""},null,8,de)]),ue,_e]),_:1},8,["visible","confirmLoading"])]),_:1})}}});const ut=pe(ye,[["__scopeId","data-v-e26145b3"]]);export{ut as default};