2 lines
8.7 KiB
JavaScript
2 lines
8.7 KiB
JavaScript
|
import{u as L,E as T,a as K,b as Y}from"./element-plus-53a783a7.js";import"./vue-20eed888.js";import{u as H,b as Q}from"./index-03a63030.js";import{u as X}from"./vue-i18n-d6e8419a.js";import{y as Z}from"./request-6d47a533.js";import{i as ee}from"./interface-6c1bedf7.js";import{d as te,G as ae,r as n,k as l,ah as v,ai as E,o as ie,c as le,e as h,P as C,u as f,L as x,a as I,U as D,i as re,F as se}from"./@vue-e95c845e.js";import{_ as oe}from"./y9plugin-components-412bad23.js";import"./lodash-es-2e98bc53.js";import"./@vueuse-409d7ed5.js";import"./@element-plus-57b52633.js";import"./@popperjs-c75af06c.js";import"./@ctrl-f8748455.js";import"./dayjs-e13f206c.js";import"./axios-db0ed51e.js";import"./async-validator-20f92749.js";import"./memoize-one-297ddbcb.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-606f2ab9.js";import"./lodash-11751b8b.js";import"./pinia-22d008e7.js";import"./nprogress-e9cc33fd.js";import"./vue-router-e03c3082.js";/* empty css *//* empty css *//* empty css */import"./y9plugin-sso-6f4b3ca3.js";import"./y9plugin-watermark-e18d3181.js";import"./@intlify-d4a3a758.js";import"./v-viewer-decd5d79.js";import"./viewerjs-c43574b2.js";import"./vxe-table-3ccf2bcd.js";import"./xe-utils-90392958.js";import"./dom-zindex-d72a3c32.js";const w=Z(),ne=async p=>await w({url:"/api/rest/blacklisting/getPage",method:"GET",cType:!1,params:p}),pe=async p=>await w({url:"/api/rest/blacklisting/saveInfo",method:"POST",dataType:"json",cType:!1,data:p}),R=async p=>await w({url:"/api/rest/blacklisting/getInfoById",method:"GET",cType:!1,params:p}),ue=async p=>await w({url:"/api/rest/blacklisting/delInfoById",method:"GET",cType:!1,params:p}),fe=async p=>await w({url:"/api/rest/blacklisting/updateEnable",method:"POST",dataType:"json",cType:!1,data:p}),de=te({__name:"blacklisting",setup(p){const y=ae("sizeObjInfo"),F=H(),{t:a}=X();n();const k=n({}),B=n(),z=n([]);n(!1),n();let r=n({headerBackground:!0,pageConfig:{background:!1,currentPage:1,pageSize:5,total:0,pageSizeOpts:[5,10,15,20,30,40,1e3]},columns:[{type:"index",title:l(()=>a("序号")),width:80,fixed:"left"},{title:l(()=>a("名称")),key:"name"},{width:"320",title:l(()=>a("ip")),key:"ip"},{title:l(()=>a("备注")),key:"notes"},{title:l(()=>a("排序")),key:"sort"},{title:l(()=>a("创建时间")),key:"createTime"},{title:l(()=>a("是否启用")),key:"",render:t=>t.sameId=="25cee41e73dd4281a93a9cb799dd9d12"?v(L,{modelValue:JSON.parse(t.isEnable)}):v(L,{modelValue:JSON.parse(t.isEnable),"onUpdate:modelValue":i=>{let e=new FormData;e.append("id",t.id),e.append("isEnable",i),fe(e).then(s=>{s.status=="success"?t.isEnable=i:T({message:"启用失败,节点信息未补充",type:"success"})})}})},{title:l(()=>a("操作")),width:300,fixed:"right",render:t=>{if(t.sameId!="25cee41e73dd4281a93a9cb799dd9d12")return v("div",[v("span",{onClick:()=>{J(t.id)}},a("详情")),v("span",{class:"leftMargin",onClick:()=>{A(t.id)}},a("编辑")),v("span",{class:"leftMargin",onClick:()=>{U(t.id)}},a("删除"))])}}],tableData:[]});const O=n({filtersValueCallBack:t=>{k.value=t},itemList:[{type:"input",value:"",key:"name",label:l(()=>a("名称")),labelWidth:"82px",span:F.device==="mobile"?24:6},{type:"slot",slotName:"slotSearch",span:6},{type:"slot",slotName:"slotBtns",span:F.device==="mobile"?24:12,justify:"flex-end"}],showBorder:!0,borderRadio:"4px"});async function g(){r.value.loading=!0,k.value.page=r.value.pageConfig.currentPage,k.value.limit=r.value.pageConfig.pageSize;let t=await ne(k.value);r.value.tableData=t.data||[],r.value.pageConfig.total=t.count||0,r.value.loading=!1}function N(t){r.value.tableData=[],r.value.pageConfig.pageSize=t,g()}function q(t){r.value.tableData=[],r.value.pageConfig.currentPage=t,g()}function V(){r.value.pageConfig.currentPage=1,r.value.pageConfig.pageSize=15,r.value.tableData=[],g()}function j(){B.value.elTableFilterRef.onReset(),r.value.pageConfig.currentPage=1,r.value.pageConfig.pageSize=15,r.value.tableData=[],k.value={},g()}function M(){r.value.pageConfig.currentPage=1,r.value.pageConfig.pageSize=1
|