index.6aeffb9d.js 4.5 KB

1
  1. import{B as b}from"./TableImg.9ce43c8c.js";import{T as h}from"./index.db9b952c.js";import{u as w}from"./useTable.79d7c35e.js";import{n as C}from"./index.a814284d.js";import{bR as e,a as x,aO as T,w as R,o as y,h as k,n as i,z as u,B as v,i as r,cM as I,cN as S,e1 as d}from"./index.7e08ba81.js";import{A as M}from"./index.3132743a.js";import{u as N}from"./index.5a7c436a.js";import O from"./WebsiteDrawer.4ab7cfa9.js";import"./index.a9463ec3.js";import"./Checkbox.2b7c666a.js";import"./index.0d1117cf.js";import"./index.0e13704b.js";import"./eagerComputed.41f917f7.js";import"./FileOutlined.1ba59fec.js";import"./BasicForm.09fa6853.js";/* empty css *//* empty css */import"./index.0fba574f.js";import"./index.673e5955.js";import"./index.e102b091.js";import"./index.7e5abc0c.js";import"./get.06058cdc.js";import"./DeleteOutlined.12ba33eb.js";import"./transButton.38e068f8.js";import"./index.20008ed6.js";import"./index.51fe0c69.js";import"./Col.dccd6464.js";import"./useFlexGapSupport.ba88ba25.js";import"./index.7bbcc8f3.js";import"./Form.0777dffc.js";import"./_baseIteratee.cd40e9ab.js";import"./useSize.1210be5f.js";import"./uniqBy.e8d75d01.js";import"./index.aef1b210.js";import"./useWindowSizeFn.9cd1b73f.js";import"./FullscreenOutlined.3ea9a56b.js";import"./useForm.e12ea52c.js";import"./index.334036fa.js";import"./index.ea1692d3.js";import"./useContentViewHeight.eee5bfce.js";import"./ArrowLeftOutlined.8453d1a8.js";import"./index.492f2ae6.js";import"./FormOutlined.8ec71e0a.js";import"./index.756c7042.js";import"./index.1016abaf.js";import"./useRefs.9e0a4abb.js";import"./sortable.esm.7d5432c3.js";import"./RedoOutlined.2794d90f.js";import"./index.01b7ee47.js";import"./fromPairs.84aabb58.js";import"./scrollTo.f658bbdc.js";import"./index.828a2959.js";import"./Group.ea437422.js";import"./index.7fe36cdd.js";import"./index.821e0528.js";import"./download.ef0c06e3.js";import"./base64Conver.08b9f4ec.js";import"./index.92bb6ba8.js";import"./Editor.442f558b.js";import"./index.af4e1ae6.js";import"./index.ff33b1ce.js";import"./PlusOutlined.29a85b0a.js";import"./gallery.6ed6bad5.js";import"./index.5601a923.js";import"./index.62601954.js";import"./TabPane.3218c919.js";import"./UploadOutlined.73b101b7.js";import"./EditOutlined.c9dad9df.js";import"./Meta.5e9e5d93.js";import"./index.d1ddbe38.js";import"./audio.ad33a83a.js";import"./video.9cd87b97.js";import"./file.1bfcba10.js";const U=[{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(M,{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:U,bordered:!0,showTableSetting:!0,loading:!0,pagination:{defaultPageSize:20},actionColumn:{width:160,title:"\u64CD\u4F5C",dataIndex:"action",slots:{customRender:"action"}}},z={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[f,{openDrawer:a}]=N(),[_,{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(S),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=R("a-button");return y(),k("div",z,[i(r(b),{onRegister:r(_)},{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(O,{onRegister:r(f),onSuccess:g},null,8,["onRegister"])])}}});export{uo as default};