index.4aa23de1.js 4.5 KB

1
  1. import{B as b}from"./TableImg.36d2dab8.js";import{T as h}from"./index.bc2ce3a3.js";import{u as w}from"./useTable.2af3fa71.js";import{n as C}from"./index.819b754a.js";import{bR as e,a as x,aN as T,a_ as y,o as R,h as k,n as i,y as u,z as v,i as r,cM as I,cN as N,e1 as d}from"./index.f9240906.js";import{A as S}from"./index.e6f3c6c4.js";import{u as M}from"./index.51ec6257.js";import U from"./WebsiteDrawer.2a0c9332.js";import"./index.7133fb8f.js";import"./Checkbox.d036b137.js";import"./index.c77d3359.js";import"./index.58e9abd1.js";import"./eagerComputed.938959e2.js";import"./FileOutlined.3b0f12f3.js";import"./BasicForm.77d882bb.js";/* empty css *//* empty css */import"./index.db62f8f7.js";import"./index.fe79a0f6.js";import"./index.14dde92d.js";import"./index.6ebf08b3.js";import"./get.10de1502.js";import"./DeleteOutlined.a5ce7fb8.js";import"./transButton.bc515676.js";import"./index.12dee4f1.js";import"./index.48100a2d.js";import"./Col.46372180.js";import"./useFlexGapSupport.3936e9ba.js";import"./index.4c8ee6bd.js";import"./Form.01cea6c8.js";import"./_baseIteratee.dc5455db.js";import"./useSize.3965ca89.js";import"./uniqBy.8dd4637c.js";import"./index.5dfb37d9.js";import"./useWindowSizeFn.e05ba499.js";import"./FullscreenOutlined.16e551d7.js";import"./useForm.241a9971.js";import"./index.ab16c1d0.js";import"./index.963f7d97.js";import"./useContentViewHeight.51fb01ea.js";import"./ArrowLeftOutlined.8ef55b3d.js";import"./index.ae5f4215.js";import"./FormOutlined.317a5749.js";import"./index.837faab1.js";import"./index.beaefc64.js";import"./useRefs.704645bf.js";import"./sortable.esm.a0907b1f.js";import"./RedoOutlined.74a164b2.js";import"./index.e73b9811.js";import"./fromPairs.84aabb58.js";import"./scrollTo.dad4e7d2.js";import"./index.41b7c2b6.js";import"./Group.1f288892.js";import"./index.4910aef7.js";import"./index.e280a527.js";import"./download.f0b284ec.js";import"./base64Conver.08b9f4ec.js";import"./index.5459a547.js";import"./Editor.459e8b9d.js";import"./index.50931e68.js";import"./index.bc1d0b0a.js";import"./PlusOutlined.d3b73e32.js";import"./gallery.1b6f5ce3.js";import"./index.b2bbcc56.js";import"./index.55d1c7b9.js";import"./TabPane.9a67e6d2.js";import"./UploadOutlined.a31c5f2f.js";import"./EditOutlined.0ee71455.js";import"./Meta.c6e59908.js";import"./index.92aa4daf.js";import"./audio.30303ba6.js";import"./video.48f21051.js";import"./file.e4693c76.js";const z=[{title:"\u5206\u7C7B",dataIndex:"category_id",customRender:({record:t})=>t.relate_1?e("span",t.relate_1.name):e("div","-")},{title:"TAG",dataIndex:"tag"},{title:"\u6807\u9898",dataIndex:"title",width:150},{title:"\u4EA7\u54C1",dataIndex:"category_id",customRender:({record:t})=>t.relate_0?e("span",[e(S,{src:t.relate_0.logo,style:{marginRight:"5px"}}),e("span",t.relate_0.title)]):e("div","-")}],F={title:"\u4EA7\u54C1\u8D44\u8BAF\u5217\u8868",titleHelpMessage:"\u6BD4\u5982:\u540E\u53F0\u7BA1\u7406\u6A21\u5757,\u524D\u53F0\u7BA1\u7406\u6A21\u5757\uFF0C\u547D\u540D\u7A7A\u95F4\u5FC5\u987B\u4E0E\u4EE3\u7801\u6A21\u5757\u4FDD\u6301\u4E00\u81F4\uFF01",api:t=>C("news_list",t),columns:z,bordered:!0,showTableSetting:!0,loading:!0,pagination:{defaultPageSize:20},actionColumn:{width:160,title:"\u64CD\u4F5C",dataIndex:"action",slots:{customRender:"action"}}},O={class:"p-4"},uo=x({__name:"index",setup(t){var p,s;window.UE=null,window.loadEnv=null;const n=(s=(p=T().query)==null?void 0:p.pmid)!=null?s:"";n&&(F.beforeFetch=o=>{o.pmid=n});const[_,{openDrawer:a}]=M(),[f,{reload:m}]=w(F);function D(o){a(!0,{record:o,isUpdate:!0})}function g(){m()}function B(){a(!0,{isUpdate:!1})}const E=o=>{I.confirm({title:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u7AD9\u70B9\u5417?",icon:i(N),content:i("div",{style:"color:red;"},"\u6CE8\uFF1A\u8BE5\u7AD9\u70B9\u5173\u8054\u6570\u636E\u5C06\u65E0\u6CD5\u6062\u590D\uFF01"),okText:"\u5220\u9664",okType:"danger",onOk(){C("news_del",{mid:o.mid}).then(l=>{l.error?d.error("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01"):(m(),d.success("\u64CD\u4F5C\u6210\u529F\uFF01"))})}})};return(o,l)=>{const A=y("a-button");return R(),k("div",O,[i(r(b),{onRegister:r(f)},{toolbar:u(()=>[i(A,{type:"primary",onClick:B},{default:u(()=>[v(" \u65B0\u589E\u8D44\u8BAF ")]),_:1})]),action:u(({record:c})=>[i(r(h),{actions:[{label:"\u7F16\u8F91",icon:"clarity:note-edit-line",color:"success",onClick:D.bind(null,c)},{label:"\u5220\u9664",icon:"ic:outline-delete-outline",color:"error",onClick:E.bind(null,c)}]},null,8,["actions"])]),_:1},8,["onRegister"]),i(U,{onRegister:r(_),onSuccess:g},null,8,["onRegister"])])}}});export{uo as default};