index.8a79f2f7.js 4.5 KB

1
  1. import{B as b}from"./TableImg.8fe3d61a.js";import{T as h}from"./index.a7ed205f.js";import{u as w}from"./useTable.37d2a279.js";import{n as C}from"./index.75694236.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.723c022d.js";import{A as S}from"./index.55dec4bb.js";import{u as M}from"./index.58539c53.js";import U from"./WebsiteDrawer.86edc8e8.js";import"./index.672cb799.js";import"./Checkbox.c04f7b55.js";import"./index.fbbd1f1f.js";import"./index.11082491.js";import"./eagerComputed.c778769d.js";import"./FileOutlined.de22406c.js";import"./BasicForm.e6661e7b.js";/* empty css *//* empty css */import"./index.9a19a3f7.js";import"./index.8f225c1e.js";import"./index.8663089e.js";import"./index.3fb6ac38.js";import"./get.86e6b49d.js";import"./DeleteOutlined.6291cf54.js";import"./transButton.10f02921.js";import"./index.ed278b64.js";import"./index.c12b00dd.js";import"./Col.58b8a958.js";import"./useFlexGapSupport.4d92c09c.js";import"./index.e3c0dcb4.js";import"./Form.9dcaf6f8.js";import"./_baseIteratee.826d6655.js";import"./useSize.a1b385c4.js";import"./uniqBy.4b69f709.js";import"./index.1ca4cef4.js";import"./useWindowSizeFn.79f59aef.js";import"./FullscreenOutlined.3316925c.js";import"./useForm.07244cd7.js";import"./index.6bc64354.js";import"./index.d5e83f0f.js";import"./useContentViewHeight.eea93209.js";import"./ArrowLeftOutlined.09823751.js";import"./index.bab0934d.js";import"./FormOutlined.3bac65b1.js";import"./index.9141ffb0.js";import"./index.09b55302.js";import"./useRefs.c430f5ca.js";import"./sortable.esm.a0907b1f.js";import"./RedoOutlined.2d33fcab.js";import"./index.f60fc8fa.js";import"./fromPairs.84aabb58.js";import"./scrollTo.6ea53bed.js";import"./index.9e723d47.js";import"./Group.436b142a.js";import"./index.274a2934.js";import"./index.94ab951f.js";import"./download.6473a23c.js";import"./base64Conver.08b9f4ec.js";import"./index.3fb26d03.js";import"./Editor.c5c19db1.js";import"./index.d1817017.js";import"./index.a18a959d.js";import"./PlusOutlined.5cf0e253.js";import"./gallery.19891bea.js";import"./index.b0f4ea79.js";import"./index.e672b793.js";import"./TabPane.2a5382b2.js";import"./UploadOutlined.d9ef6b8b.js";import"./EditOutlined.4f8cbbfb.js";import"./Meta.c168a188.js";import"./index.93af4bdd.js";import"./audio.acc2d9ff.js";import"./video.855e2089.js";import"./file.d7887a90.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};