2 lines
5.4 KiB
JavaScript
2 lines
5.4 KiB
JavaScript
import{C as j,D as K,Q as O,R as $,w as q,F as M,I as z,L as Q,t as W,M as G,N as H}from"./element-plus.eb2e53ea.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.f75f9565.js";import{j as V,f as X,b as Y,_ as Z}from"./index.710daa76.js";import{d as D,a0 as ee,bd as te,af as ae,am as le,o as r,c as k,W as e,O as a,u as l,a8 as oe,V as ie,a7 as ne,M as u,T as p,a as y,P as _,S as re,j as se}from"./@vue.c3e77981.js";import{h as ue,k as me,l as ce,m as de}from"./article.ba9ba761.js";import{u as pe}from"./useDictOptions.c7fbf467.js";import{u as _e}from"./usePaging.d25ebf19.js";import"./@vueuse.a48d0173.js";import"./@element-plus.12c58ce2.js";import"./lodash-es.2b5acb28.js";import"./dayjs.16ed1fda.js";import"./axios.a8078129.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.a2abcd4b.js";import"./vue-router.43c06794.js";import"./pinia.b5130627.js";import"./css-color-function.975e80a5.js";import"./color.d986aa86.js";import"./clone.704d8332.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.ded7f805.js";import"./vue-clipboard3.987889a8.js";import"./clipboard.af74a91f.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b8b719e9.js";const fe={class:"article-lists"},he={class:"flex justify-end mt-4"},be=D({name:"articleLists"}),tt=D({...be,setup(we){const n=ee({title:"",cid:"",is_show:""}),{pager:m,getLists:s,resetPage:v,resetParams:x}=_e({fetchFun:de,params:n}),{optionsData:B}=pe({article_cate:{api:ue}}),A=async(f,o)=>{try{await me({id:o,is_show:f}),s()}catch{s()}},P=async f=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ce({id:f}),s()};return te(()=>{s()}),s(),(f,o)=>{const E=j,h=K,c=O,C=$,d=q,L=M,g=z,S=Y,F=ae("router-link"),i=Q,U=Z,N=W,I=G,R=J,b=le("perms"),T=H;return r(),k("div",fe,[e(g,{class:"!border-none",shadow:"never"},{default:a(()=>[e(L,{ref:"formRef",class:"mb-[-16px]",model:l(n),inline:!0},{default:a(()=>[e(h,{label:"\u6587\u7AE0\u6807\u9898"},{default:a(()=>[e(E,{class:"w-[280px]",modelValue:l(n).title,"onUpdate:modelValue":o[0]||(o[0]=t=>l(n).title=t),clearable:"",onKeyup:oe(l(v),["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),e(h,{label:"\u680F\u76EE\u540D\u79F0"},{default:a(()=>[e(C,{class:"w-[280px]",modelValue:l(n).cid,"onUpdate:modelValue":o[1]||(o[1]=t=>l(n).cid=t)},{default:a(()=>[e(c,{label:"\u5168\u90E8",value:""}),(r(!0),k(ie,null,ne(l(B).article_cate,t=>(r(),u(c,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(h,{label:"\u6587\u7AE0\u72B6\u6001"},{default:a(()=>[e(C,{class:"w-[280px]",modelValue:l(n).is_show,"onUpdate:modelValue":o[2]||(o[2]=t=>l(n).is_show=t)},{default:a(()=>[e(c,{label:"\u5168\u90E8",value:""}),e(c,{label:"\u663E\u793A",value:1}),e(c,{label:"\u9690\u85CF",value:0})]),_:1},8,["modelValue"])]),_:1}),e(h,null,{default:a(()=>[e(d,{type:"primary",onClick:l(v)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:l(x)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),e(g,{class:"!border-none mt-4",shadow:"never"},{default:a(()=>[y("div",null,[_((r(),u(F,{to:{path:l(V)("article.article/add:edit")}},{default:a(()=>[e(d,{type:"primary",class:"mb-4"},{icon:a(()=>[e(S,{name:"el-icon-Plus"})]),default:a(()=>[p(" \u53D1\u5E03\u6587\u7AE0 ")]),_:1})]),_:1},8,["to"])),[[b,["article.article/add","article.article/add:edit"]]])]),_((r(),u(I,{size:"large",data:l(m).lists},{default:a(()=>[e(i,{label:"ID",prop:"id","min-width":"80"}),e(i,{label:"\u5C01\u9762","min-width":"100"},{default:a(({row:t})=>[t.image?(r(),u(U,{key:0,src:t.image,width:60,height:45,"preview-src-list":[t.image],"preview-teleported":"",fit:"contain"},null,8,["src","preview-src-list"])):re("",!0)]),_:1}),e(i,{label:"\u6807\u9898",prop:"title","min-width":"160","show-tooltip-when-overflow":""}),e(i,{label:"\u680F\u76EE",prop:"cate_name","min-width":"100"}),e(i,{label:"\u4F5C\u8005",prop:"author","min-width":"120"}),e(i,{label:"\u6D4F\u89C8\u91CF",prop:"click","min-width":"100"}),e(i,{label:"\u72B6\u6001","min-width":"100"},{default:a(({row:t})=>[_(e(N,{modelValue:t.is_show,"onUpdate:modelValue":w=>t.is_show=w,"active-value":1,"inactive-value":0,onChange:w=>A(w,t.id)},null,8,["modelValue","onUpdate:modelValue","onChange"]),[[b,["article.article/updateStatus"]]])]),_:1}),e(i,{label:"\u6392\u5E8F",prop:"sort","min-width":"100"}),e(i,{label:"\u53D1\u5E03\u65F6\u95F4",prop:"create_time","min-width":"120"}),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:t})=>[_((r(),u(d,{type:"primary",link:""},{default:a(()=>[e(F,{to:{path:l(V)("article.article/add:edit"),query:{id:t.id}}},{default:a(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["to"])]),_:2},1024)),[[b,["article.article/edit","article.article/add:edit"]]]),_((r(),u(d,{type:"danger",link:"",onClick:w=>P(t.id)},{default:a(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[b,["article.article/delete"]]])]),_:1})]),_:1},8,["data"])),[[T,l(m).loading]]),y("div",he,[e(R,{modelValue:l(m),"onUpdate:modelValue":o[3]||(o[3]=t=>se(m)?m.value=t:null),onChange:l(s)},null,8,["modelValue","onChange"])])]),_:1})])}}});export{tt as default};
|