import{b as f,T as v,a as h}from"./index-434d719f.js";import{i as _,f as g,ai as k,a4 as w}from"./index-ba596ae9.js";import{_ as V}from"./popupForm.vue_vue_type_script_setup_true_lang-cd17d504.js";import{h as u,y as q,az as R,B as y,p as c,l as B,k as t,M as T,a4 as E,q as s,aA as p,t as m,as as A,ah as C}from"./vue-a39e6937.js";import"./controllerUrls-941681c3.js";import"./index-7e56a0fa.js";import"./index-f0d8af94.js";import"./validate-4ecec794.js";function N(o){return _({url:"/admin/sms.Variable/getVar",method:"get",params:{id:o}})}const S={class:"default-main ba-table-box"},x=u({name:"sms/variable"}),H=u({...x,setup(o){const{t:e}=g(),n=q(),d=k(["edit","delete"]),b={render(r){if(r.$attrs.renderValue)return p("span",r.$attrs.renderValue);const i=()=>{N(r.$attrs.renderRow.id).then(l=>{C.alert(l.data,"计算结果",{confirmButtonText:"确定"})})};return p(m("el-link"),{type:"primary",onClick:i},()=>"点击计算")}},a=new f(new w("/admin/sms.variable/"),{pk:"id",column:[{type:"selection",align:"center",operator:!1},{label:e("sms.variable.id"),prop:"id",align:"center",width:70,sortable:"custom",operator:"RANGE"},{label:e("sms.variable.title"),prop:"title",align:"center"},{label:e("sms.variable.name"),prop:"name",align:"center"},{label:e("sms.variable.value_source"),prop:"value_source",align:"center",render:"tag",replaceValue:{literal:e("sms.variable.value_source literal"),func:e("sms.variable.value_source func"),sql:e("sms.variable.value_source sql")}},{label:e("sms.variable.value"),prop:"value",align:"center",render:"customRender",customRender:R(b),"show-overflow-tooltip":!0},{label:e("sms.variable.sql"),prop:"sql",align:"center","show-overflow-tooltip":!0},{label:e("sms.variable.namespace"),prop:"namespace",align:"center","show-overflow-tooltip":!0},{label:e("sms.variable.class"),prop:"class",align:"center"},{label:e("sms.variable.func"),prop:"func",align:"center"},{label:e("sms.variable.param"),prop:"param",align:"center"},{label:e("state"),prop:"status",align:"center",render:"tag",custom:{0:"danger",1:"success"},replaceValue:{0:e("Disable"),1:e("Enable")}},{label:e("sms.variable.updatetime"),prop:"updatetime",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("sms.variable.createtime"),prop:"createtime",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("operate"),align:"center",width:100,render:"buttons",buttons:d,operator:!1}],dblClickNotEditColumn:[void 0],defaultOrder:{prop:"id",order:"desc"}},{defaultItems:{value_source:"literal",status:"1"}});return A("baTable",a),y(()=>{var r;a.table.ref=n.value,a.mount(),(r=a.getIndex())==null||r.then(()=>{a.initSort(),a.dragSort()})}),(r,i)=>{const l=m("el-alert");return c(),B("div",S,[t(a).table.remark?(c(),T(l,{key:0,class:"ba-table-alert",title:t(a).table.remark,type:"info","show-icon":""},null,8,["title"])):E("",!0),s(v,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":t(e)("quick Search Placeholder",{fields:t(e)("sms.variable.quick Search Fields")})},null,8,["quick-search-placeholder"]),s(h,{ref_key:"tableRef",ref:n},null,512),s(V)])}}});export{H as default};
