1 |
- import{b,d as h,T as g}from"./baTable-MdxYOkAk.js";import _ from"./popupForm-l9GCFids.js";import{T as k}from"./index-K8IR974I.js";import{a1 as C}from"./index-EwE51S_X.js";import{d as y,a2 as v,a as d,aC as I,av as T,o as w,K as N,e as p,f as R,u as s,y as x,C as A,j as n}from"./vue-A59npLRR.js";import"./index-r6iTpmP6.js";import"./validate-_EUdkMt3.js";import"./index-XALue448.js";import"./echarts-cxb9vJr1.js";const E={class:"default-main ba-table-box"},H=y({name:"user/group",__name:"index",setup(G){const{t}=v(),i=d(),c=d(),e=new b(new C("/admin/user.Group/"),{column:[{type:"selection",align:"center",operator:!1},{label:t("Id"),prop:"id",align:"center",operator:"=",operatorPlaceholder:t("Id"),width:70},{label:t("user.group.Group name"),prop:"name",align:"center",operator:"LIKE",operatorPlaceholder:t("Fuzzy query")},{label:t("State"),prop:"status",align:"center",render:"tag",custom:{0:"danger",1:"success"},replaceValue:{0:t("Disable"),1:t("Enable")}},{label:t("Update time"),prop:"update_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:t("Create time"),prop:"create_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:t("Operate"),align:"center",width:"130",render:"buttons",buttons:h(["edit","delete"]),operator:!1}],dblClickNotEditColumn:[void 0]},{defaultItems:{status:"1"}},{onSubmit:({formEl:l,operate:r,items:a})=>{var a=I(a);a.rules=c.value.getCheckeds();for(const o in a)a[o]===null&&delete a[o];r=r.replace(r[0],r[0].toLowerCase());let m=()=>{e.form.submitLoading=!0,e.api.postData(r,a).then(o=>{var u;e.onTableHeaderAction("refresh",{}),e.form.submitLoading=!1,(u=e.form.operateIds)==null||u.shift(),e.form.operateIds.length>0?e.toggleForm("Edit",e.form.operateIds):e.toggleForm(),e.runAfter("onSubmit",{res:o})}).catch(()=>{e.form.submitLoading=!1})};return l?(e.form.ref=l,l.validate(o=>{o&&m()})):m(),!1}});return T("baTable",e),w(()=>{e.table.ref=i.value,e.mount(),e.getIndex()}),(l,r)=>{const f=N("el-alert");return p(),R("div",E,[s(e).table.remark?(p(),x(f,{key:0,class:"ba-table-alert",title:s(e).table.remark,type:"info","show-icon":""},null,8,["title"])):A("",!0),n(k,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":s(t)("Quick search placeholder",{fields:s(t)("user.group.GroupName")})},null,8,["quick-search-placeholder"]),n(g,{ref_key:"tableRef",ref:i},null,512),n(_,{ref_key:"formRef",ref:c},null,512)])}}});export{H as default};
|