mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-29 01:40:16 +00:00
2 lines
6.4 KiB
JavaScript
2 lines
6.4 KiB
JavaScript
/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-7eafba5f.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import{a as S,E as j}from"./el-form-item-1b16c9fc.js";/* empty css */import{t as e}from"./index-0ca94763.js";import{f as R,j as U,k as M}from"./article-64512a59.js";import{c as O}from"./common-c3be41fd.js";import{u as H,a as q}from"./vue-router-48fdc1e3.js";import{E as G}from"./index-ee5275c6.js";import{E as J}from"./index-c5914bde.js";import{E as K}from"./index-e27c3bb0.js";import{a as Q,E as W}from"./index-4601cf3b.js";import{E as X}from"./index-9ecd3f93.js";import{a as Y,E as Z}from"./index-fe3867fe.js";import{E as tt}from"./index-888853cf.js";import{E as et}from"./index-21f38393.js";import{v as at}from"./directive-64fb15dc.js";import{d as ot,O as lt,r as k,e as p,f as g,y as a,x as r,g as c,B as n,u as o,A as u,F as rt,z as it,v as h,M as nt,H as b}from"./plugin-vue_export-helper-85a4d40b.js";import"./index-bcd7a424.js";import"./index-cf9a2dd7.js";import"./index-e513479b.js";import"./el-main-86eb724f.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-b9e5f5cb.js";import"./el-overlay-08181e74.js";import"./event-f85d77b0.js";import"./index-313cd2ce.js";import"./focus-trap-64c402c5.js";import"./index-1ad115d7.js";import"./index-de1d3b53.js";import"./index-d469ae66.js";import"./index-4d8f36c6.js";import"./index-ebc73046.js";import"./_baseClone-3dbf39d6.js";import"./aria-adfa05c5.js";import"./validator-bcf701e4.js";import"./index-99b65a15.js";import"./strings-53351eda.js";import"./isEqual-0b9509fd.js";import"./debounce-6c3123a6.js";import"./index-bd04154b.js";import"./index-95b00894.js";import"./flatten-749195f8.js";import"./_isIterateeCall-47526406.js";import"./index-344f0086.js";import"./position-37364850.js";const st={class:"main-container"},mt={class:"flex justify-between items-center"},pt={class:"text-[20px]"},ct={class:"mt-[10px]"},dt=["href"],ut={key:0},_t={key:1},gt={class:"mt-[16px] flex justify-end"},ke=ot({__name:"list",setup(ft){const C=H().meta.title,l=lt({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{title:"",category_id:""}}),y=k([]),v=k();(async()=>{y.value=await(await R({})).data})();const d=(s=1)=>{l.loading=!0,l.page=s,U({page:l.page,limit:l.limit,...l.searchParam}).then(i=>{l.loading=!1,l.data=i.data.data,l.total=i.data.total}).catch(()=>{l.loading=!1})};d();const w=q(),P=()=>{w.push("/cms/article/edit")},V=s=>{w.push(`/cms/article/edit?id=${s.id}`)},B=s=>{G.confirm(e("articleDeleteTips"),e("warning"),{confirmButtonText:e("confirm"),cancelButtonText:e("cancel"),type:"warning"}).then(()=>{M(s).then(()=>{d()}).catch(()=>{})})},F=s=>{s&&(s.resetFields(),d())};return(s,i)=>{const _=J,T=K,f=S,E=Q,z=W,A=j,x=X,m=Y,L=tt,N=Z,D=et,I=at;return p(),g("div",st,[a(x,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[c("div",mt,[c("span",pt,n(o(C)),1),a(_,{type:"primary",onClick:P},{default:r(()=>[u(n(o(e)("addArticle")),1)]),_:1})]),a(x,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:r(()=>[a(A,{inline:!0,model:l.searchParam,ref_key:"searchFormRef",ref:v},{default:r(()=>[a(f,{label:o(e)("title"),prop:"title"},{default:r(()=>[a(T,{modelValue:l.searchParam.title,"onUpdate:modelValue":i[0]||(i[0]=t=>l.searchParam.title=t),placeholder:o(e)("titlePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(f,{label:o(e)("categoryName"),prop:"category_id"},{default:r(()=>[a(z,{modelValue:l.searchParam.category_id,"onUpdate:modelValue":i[1]||(i[1]=t=>l.searchParam.category_id=t),clearable:"",placeholder:o(e)("categoryIdPlaceholder"),class:"input-width"},{default:r(()=>[a(E,{label:o(e)("selectPlaceholder"),value:""},null,8,["label"]),(p(!0),g(rt,null,it(y.value,t=>(p(),h(E,{label:t.name,value:t.category_id},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),a(f,null,{default:r(()=>[a(_,{type:"primary",onClick:i[2]||(i[2]=t=>d())},{default:r(()=>[u(n(o(e)("search")),1)]),_:1}),a(_,{onClick:i[3]||(i[3]=t=>F(v.value))},{default:r(()=>[u(n(o(e)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),c("div",ct,[nt((p(),h(N,{data:l.data,size:"large"},{empty:r(()=>[c("span",null,n(l.loading?"":o(e)("emptyData")),1)]),default:r(()=>[a(m,{prop:"id","show-overflow-tooltip":!0,label:o(e)("ID"),width:"100"},null,8,["label"]),a(m,{prop:"category_name",label:o(e)("categoryName"),width:"120"},null,8,["label"]),a(m,{prop:"title","show-overflow-tooltip":!0,label:o(e)("title"),width:"180"},{default:r(({row:t})=>[c("a",{href:t.article_url.web_url,target:"_blank"},n(t.title),9,dt)]),_:1},8,["label"]),a(m,{label:o(e)("image"),"min-width":"120",align:"center"},{default:r(({row:t})=>[t.image_thumb_small?(p(),h(L,{key:0,class:"w-12 h-12",src:o(O)(t.image_thumb_small),fit:"contain"},null,8,["src"])):b("",!0)]),_:1},8,["label"]),a(m,{prop:"visit",label:o(e)("visit"),width:"120",align:"center"},{default:r(({row:t})=>[c("span",null,n(parseInt(t.visit+t.visit_virtual)),1)]),_:1},8,["label"]),a(m,{label:o(e)("isShow"),"min-width":"120",align:"center"},{default:r(({row:t})=>[t.is_show==1?(p(),g("span",ut,n(o(e)("show")),1)):b("",!0),t.is_show==0?(p(),g("span",_t,n(o(e)("hidden")),1)):b("",!0)]),_:1},8,["label"]),a(m,{prop:"sort",label:o(e)("sort"),width:"100",align:"center"},null,8,["label"]),a(m,{label:o(e)("createTime"),"min-width":"180",align:"center"},{default:r(({row:t})=>[u(n(t.create_time||""),1)]),_:1},8,["label"]),a(m,{label:o(e)("operation"),fixed:"right",align:"right",width:"130"},{default:r(({row:t})=>[a(_,{type:"primary",link:"",onClick:$=>V(t)},{default:r(()=>[u(n(o(e)("edit")),1)]),_:2},1032,["onClick"]),a(_,{type:"primary",link:"",onClick:$=>B(t.id)},{default:r(()=>[u(n(o(e)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[I,l.loading]]),c("div",gt,[a(D,{"current-page":l.page,"onUpdate:currentPage":i[4]||(i[4]=t=>l.page=t),"page-size":l.limit,"onUpdate:pageSize":i[5]||(i[5]=t=>l.limit=t),layout:"total, sizes, prev, pager, next, jumper",total:l.total,onSizeChange:i[6]||(i[6]=t=>d()),onCurrentChange:d},null,8,["current-page","page-size","total"])])])]),_:1})])}}});export{ke as default};
|