PageSourceSearch

http://mixlinker.com/chunks/list-7eaefeb4.js

js mixlinker.com collected 2026-10-08 20:27:21 UTC 6,696 bytes, 1 lines download raw bytes

1import{u as E}from"./menu-8bf73cfe.js";import{b as Z}from"./vue-router-bcd3b3d8.js";import{a as G,b as H}from"./analy_script-c48fb00e.js";import{s as q,D as F,A as _,j as Q,r as d,o as w,f as A,bJ as p,c as o,g as X,aZ as Y,l as ee,u as $,a as O,d as V,q as te,t as ae,n as le}from"./@vue-d4698f71.js";import"./pinia-e8266022.js";import"./vue-demi-71ba0ef2.js";import"../index-519afb36.js";import"./ant-design-vue-aed2d464.js";import"./@babel-9744bea5.js";import"./@ant-design-ff1c9763.js";import"./vue-d080cb1e.js";import"./@ctrl-7541abaa.js";import"./resize-observer-polyfill-83c533c4.js";import"./vue-types-13ea99f7.js";import"./dom-align-ecb06dd6.js";import"./lodash-es-6d1fdea6.js";import"./dayjs-bcdf9cd5.js";import"./async-validator-dee29e8b.js";import"./scroll-into-view-if-needed-6b992d05.js";import"./compute-scroll-into-view-183f845a.js";import"./lodash-5da30efc.js";import"./vue-i18n-19a7264a.js";import"./@intlify-b6d93b1b.js";import"./axios-55a4e3d8.js";import"./mitt-970afded.js";import"./@vueuse-f75fad33.js";import"./qrcode-79d680f4.js";import"./dijkstrajs-f906a09e.js";import"./ag-grid-community-a59f2518.js";import"./ag-grid-vue3-d175f308.js";import"./@wangeditor-20052aa1.js";import"./pro-82590c10.js";import"./utils-511c6d2e.js";const oe={__name:"modal",setup(I,{expose:S}){const{proxy:u}=q(),e=F({title:"",show:!1,id:"",loading:!1}),v=_(null),l=_({uid:"",alias:"",name:"",template:"",description:""}),x={name:[{required:!0,message:"请输入名称",trigger:"blur"}],template:[{required:!0,message:"请输入名模板内容",trigger:"blur"}]};Q(()=>e.show,async i=>{i?e.id&&r():(l.value={},e.id="")});const r=()=>{u.api.post("get_template_item",{uid:e.id}).then(async i=>{l.value=i.result})},h=async()=>{await v.value.validateFields();let i=e.id?"update_template":"create_template";u.api.post(i,l.value).then(n=>{u.$message.success(u.$t("success")),u.$parent.getList(e.id),e.show=!1})};return S({modal:e}),(i,n)=>{const b=d("a-input"),m=d("a-form-item"),k=d("a-textarea"),R=d("a-form"),C=d("a-card"),y=d("mix-edit-page");return w(),A(y,Y(e,{modelValue:e.show,"onUpdate:modelValue":n[5]||(n[5]=s=>e.show=s),onOk:h}),{content:p(()=>[o(C,{title:i.$t("base_info")},{default:p(()=>[o(R,{ref_key:"formRef",ref:v,model:l.value,rules:x,"label-col":{style:{width:"130px"}},autocomplete:"off"},{default:p(()=>[e.id?(w(),A(m,{key:0,label:i.$t("agent.template.uid"),name:"uid","has-feedback":""},{default:p(()=>[o(b,{value:l.value.uid,"onUpdate:value":n[0]||(n[0]=s=>l.value.uid=s),type:"text"},null,8,["value"])]),_:1},8,["label"])):X("",!0),o(m,{label:i.$t("agent.template.name"),name:"name","has-feedback":""},{default:p(()=>[o(b,{value:l.value.name,"onUpdate:value":n[1]||(n[1]=s=>l.value.name=s),type:"text"},null,8,["value"])]),_:1},8,["label"]),o(m,{label:i.$t("agent.template.alias"),name:"alias","has-feedback":""},{default:p(()=>[o(b,{value:l.value.alias,"onUpdate:value":n[2]||(n[2]=s=>l.value.alias=s),type:"text"},null,8,["value"])]),_:1},8,["label"]),o(m,{label:i.$t("agent.template.template"),name:"template"},{default:p(()=>[o(k,{value:l.value.template,"onUpdate:value":n[3]||(n[3]=s=>l.value.template=s),rows:2},null,8,["value"])]),_:1},8,["label"]),o(m,{label:i.$t("description"),name:"description"},{default:p(()=>[o(k,{value:l.value.description,"onUpdate:value":n[4]||(n[4]=s=>l.value.description=s),rows:2},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["title"])]),_:1},16,["modelValue"])}}},ne={key:0,class:"mix-content"},ie={class:"flex relative"},se={key:1,class:"no-permissions"},Ke={__name:"list",props:{permission:{type:Object,default:null},tab_key:{type:String,default:""}},setup(I,{expose:S}){const u=I,{proxy:e}=q(),v=_(null),l=_(null),x=_(null),r=F({...e.config.pagination}),h=ee(()=>E().activeKey),i=Z();e.$t("timer.rule.NaturalTime"),e.$t("timer.rule.RunTime"),e.$t("timer.rule.Times"),e.$t("timer.rule.StatisticsTimes");const n=[{label:e.$t("agent.template.uid"),value:"uid",type:"input"},{label:e.$t("agent.template.name"),value:"name",type:"input"},{label:e.$t("agent.template.alias"),value:"alias",type:"input"}],b=[{field:"uid",headerName:e.$t("agent.template.uid")},{field:"name",headerName:e.$t("agent.template.name")},{field:"alias",headerName:e.$t("agent.template.alias")},{field:"description",headerName:e.$t("description")},{field:"created",headerName:e.$t("created"),width:180},{field:"last_modified",headerName:e.$t("last_modified"),width:180}],m=_([]),{commandButtons:k,title_field:R,condition:C,columns:y,localButtons:s,search_field:P,authStatus:j}=G(u.permission,b,n),N={order_by:"id",order_type:"desc"},f=a=>{let t=H(r,v,C,N);e.api.post("get_template_list",t).then(g=>{r.total=g.result.total_records,m.value=g.result.data,le(()=>{if(a){let M=m.value.findIndex(T=>T.uid===a);l.value.gridApi.getDisplayedRowAtIndex(M).setSelected(!0,!0)}})})},z=(a,t)=>{r.current=a,r.pageSize=t,f()},J=()=>{f()},U=()=>{r.current=1,f()},K=a=>{x.value.showRightMenu(a.event,a.data)},L=a=>{const t=a.columnApi.getColumnState().find(g=>g.sort!=null);t!=null&&t.colId&&(N.order_by=t==null?void 0:t.colId),t!=null&&t.sort&&(N.order_type=t.sort),f()},W=a=>{let t="";u.permission&&(t=h.value+"_"+u.tab_key+"_"+a.uid,sessionStorage.setItem(t,JSON.stringify(u.permission))),i.push({path:"/agent/template/detail/"+a.uid,query:{active_key:h.value,active_name:a[R.value]+`(${a.uid})`,session_tabkey:t}})},c=_(null);return S({localButtons:s,getList:f,reload:U,detail:W,createModal:()=>{c.value.modal.title=e.$t("agent.template.add_title"),c.value.modal.id="",c.value.modal.show=!0},updateModal:a=>{c.value.modal.title=e.$t("agent.template.edit_title"),c.value.modal.id=a.uid,c.value.modal.show=!0},handleDelete:a=>{e.api.post("delete_timer",{uid:a.uid}).then(t=>{r.total%r.pageSize==1&&r.current>1&&r.current--,e.$message.success(e.$t("delete_success")),f()})}}),(a,t)=>
1{const g=d("mixTopOperation"),M=d("mix-auth-button"),D=d("MixAgrid"),T=d("mixRightMenu");return $(j)?(w(),O("div",ne,[V("div",ie,[o(g,{ref_key:"mix_top_operation",ref:v,onSearch:J,onReload:U,searchField:$(P)},null,8,["searchField"]),o(M,{"command-buttons":$(k)},null,8,["command-buttons"])]),o(D,{columnDefs:$(y),"onUpdate:columnDefs":t[0]||(t[0]=B=>te(y)?y.value=B:null),rowData:m.value,"onUpdate:rowData":t[1]||(t[1]=B=>m.value=B),ref_key:"ag_grid",ref:l,columWithStorageName:`agent_template_list_${h.value}`,pager:r,field_filter:!0,onPageChange:z,onCellContextMenu:K,onSortChanged:L},null,8,["columnDefs","rowData","columWithStorageName","pager"]),o(T,{ref_key:"rightMenu",ref:x,localButtons:$(s),block:"template"},null,8,["localButtons"]),o(oe,{ref_key:"modalRef",ref:c},null,512)])):(w(),O("div",se,[V("span",null,ae(a.$t("no_permissions")),1)]))}}};export{Ke as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.