1 |
- import{b as f,T as b,a as h}from"./index-434d719f.js";import{u as g}from"./controllerUrls-941681c3.js";import _ from"./popupForm-b0db574c.js";import{f as k,a4 as y,ai as v}from"./index-ba596ae9.js";import{h as d,y as p,ar as I,B as T,p as m,l as q,k as l,M as w,a4 as C,q as s,t as N,as as R}from"./vue-a39e6937.js";import"./index-7e56a0fa.js";import"./index-f0d8af94.js";import"./validate-4ecec794.js";const A={class:"default-main ba-table-box"},B=d({name:"user/group"}),H=d({...B,setup(E){const{t}=k(),n=p(),i=p(),e=new f(new y(g),{column:[{type:"selection",align:"center",operator:!1},{label:t("id"),prop:"id",align:"center",operator:"LIKE",operatorPlaceholder:t("Fuzzy query"),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("updatetime"),prop:"updatetime",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:t("createtime"),prop:"createtime",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:t("operate"),align:"center",width:"130",render:"buttons",buttons:v(["edit","delete"]),operator:!1}],dblClickNotEditColumn:[void 0]},{defaultItems:{status:"1"}},{onSubmit:({formEl:o,items:a})=>{var a=I(a);a.rules=i.value.getCheckeds();for(const r in a)a[r]===null&&delete a[r];let u=()=>{e.form.submitLoading=!0,e.api.postData(e.form.operate,a).then(r=>{var c;e.onTableHeaderAction("refresh",{}),e.form.submitLoading=!1,(c=e.form.operateIds)==null||c.shift(),e.form.operateIds.length>0?e.toggleForm("edit",e.form.operateIds):e.toggleForm(),e.runAfter("onSubmit",{res:r})}).catch(()=>{e.form.submitLoading=!1})};return o?(e.form.ref=o,o.validate(r=>{r&&u()})):u(),!1}});return R("baTable",e),T(()=>{e.table.ref=n.value,e.mount(),e.getIndex()}),(o,F)=>{const a=N("el-alert");return m(),q("div",A,[l(e).table.remark?(m(),w(a,{key:0,class:"ba-table-alert",title:l(e).table.remark,type:"info","show-icon":""},null,8,["title"])):C("",!0),s(b,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":l(t)("quick Search Placeholder",{fields:l(t)("user.group.GroupName")})},null,8,["quick-search-placeholder"]),s(h,{ref_key:"tableRef",ref:n},null,512),s(_,{ref_key:"formRef",ref:i},null,512)])}}});export{H as default};
|