1 |
- import{B as b}from"./TableImg.4c25b2e4.js";import{T as h}from"./index.2ceeb335.js";import{u as w}from"./useTable.6d62fd16.js";import{n as C}from"./index.83aaad54.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.97c70775.js";import{A as S}from"./index.e017a62f.js";import{u as M}from"./index.eda8e5c3.js";import U from"./WebsiteDrawer.2f996717.js";import"./index.27bfa3fd.js";import"./Checkbox.7642e90f.js";import"./index.221d6122.js";import"./index.eb99b34d.js";import"./eagerComputed.a9afdf3f.js";import"./FileOutlined.06e352b5.js";import"./BasicForm.98ee0a61.js";/* empty css *//* empty css */import"./index.376f7d77.js";import"./index.74899dcd.js";import"./index.ee15e24a.js";import"./index.cef0d45a.js";import"./get.42ae1097.js";import"./DeleteOutlined.59fb3f3a.js";import"./transButton.231a8ef9.js";import"./index.f22ca87e.js";import"./index.0e29685c.js";import"./Col.2079ddbc.js";import"./useFlexGapSupport.07d6e900.js";import"./index.cae94db2.js";import"./Form.9361f89f.js";import"./_baseIteratee.3a1e7c2b.js";import"./useSize.888c6d90.js";import"./uniqBy.244093b2.js";import"./index.25a01433.js";import"./useWindowSizeFn.bb740ef7.js";import"./FullscreenOutlined.8e7a919a.js";import"./useForm.48550b19.js";import"./index.5d68b2d4.js";import"./index.ec8df927.js";import"./useContentViewHeight.4e0b2e8d.js";import"./ArrowLeftOutlined.5b8718d6.js";import"./index.1292065e.js";import"./FormOutlined.bae14c68.js";import"./index.a7d63c49.js";import"./index.85f4f083.js";import"./useRefs.dcf26156.js";import"./sortable.esm.a0907b1f.js";import"./RedoOutlined.560bd00b.js";import"./index.16ef16a0.js";import"./fromPairs.84aabb58.js";import"./scrollTo.c927ac62.js";import"./index.cea071a6.js";import"./Group.19df0dc0.js";import"./index.cb32f675.js";import"./index.e2c53397.js";import"./download.b0e6596f.js";import"./base64Conver.08b9f4ec.js";import"./index.d735b0e3.js";import"./Editor.f91d5b61.js";import"./index.0f605f9b.js";import"./index.39c499d6.js";import"./PlusOutlined.e6869ca1.js";import"./gallery.ba644fc9.js";import"./index.54e2443d.js";import"./index.c947e1cd.js";import"./TabPane.c249e2af.js";import"./UploadOutlined.719bd531.js";import"./EditOutlined.3132ff31.js";import"./Meta.488163d8.js";import"./index.9f2e29d2.js";import"./audio.9bd11dfc.js";import"./video.eb68e678.js";import"./file.1eb5d3d9.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};
|