index.a6a70df7.js 4.1 KB

1
  1. import{B as _}from"./TableImg.dc9e3263.js";import{T as D}from"./index.772bb79c.js";import{u as b}from"./useTable.46780a65.js";import{n as f}from"./index.f6601185.js";import{bR as i,av as g,a as h,s as E,a_ as u,o as A,h as B,n as e,y as m,z as T,cM as w,cN as k,e1 as C}from"./index.386d9fb7.js";import{A as R}from"./index.d3334f45.js";import{u as v}from"./index.b36a1201.js";import y from"./WebsiteDrawer.6493625e.js";import"./index.d1a867f8.js";import"./Checkbox.ac2c3bae.js";import"./index.099bcd75.js";import"./index.02f194d7.js";import"./eagerComputed.49b57638.js";import"./FileOutlined.4755ce7d.js";import"./BasicForm.a06b71db.js";/* empty css *//* empty css */import"./index.aed3fcbc.js";import"./index.02a610c8.js";import"./index.bb9930d5.js";import"./index.2741d802.js";import"./get.b8c3006a.js";import"./DeleteOutlined.852ea9a3.js";import"./transButton.819dbf15.js";import"./index.28a5cbb8.js";import"./index.2adf5889.js";import"./Col.7f949b31.js";import"./useFlexGapSupport.587c05ca.js";import"./index.74294103.js";import"./Form.91d201f3.js";import"./_baseIteratee.3f358b05.js";import"./useSize.1400bc25.js";import"./uniqBy.3999e323.js";import"./index.02535309.js";import"./useWindowSizeFn.b46c26df.js";import"./FullscreenOutlined.9b13e7c7.js";import"./useForm.67940d69.js";import"./index.d521ae0a.js";import"./index.507c21d5.js";import"./useContentViewHeight.c723fc13.js";import"./ArrowLeftOutlined.f1e0008b.js";import"./index.2e8270ab.js";import"./FormOutlined.ef8f8f88.js";import"./index.d77b16ba.js";import"./index.aa276cac.js";import"./useRefs.4d8307d4.js";import"./sortable.esm.a0907b1f.js";import"./RedoOutlined.0f4a624f.js";import"./index.2e642baa.js";import"./fromPairs.84aabb58.js";import"./scrollTo.1ba74922.js";import"./index.e1927454.js";import"./Group.e744a08a.js";import"./index.dc654e6b.js";import"./index.d184e3ed.js";import"./download.65105715.js";import"./base64Conver.08b9f4ec.js";import"./index.0fd57566.js";const x=[{title:"\u4EA7\u54C1",dataIndex:"product_id",width:150,customRender:({record:t})=>t.relate_0?i("span",[i(R,{src:t.relate_0.logo,style:{marginRight:"5px"}}),i("span",t.relate_0.title)]):i("div","-")},{title:"\u6807\u9898",dataIndex:"name"}],S={title:"\u5E7F\u544A\u5206\u7C7B\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:()=>f("position_group",{}),columns:x,bordered:!0,showTableSetting:!0,loading:!0,pagination:{defaultPageSize:20},actionColumn:{width:160,title:"\u64CD\u4F5C",dataIndex:"action",slots:{customRender:"action"}}},$=h({components:{BasicTable:_,TableAction:D,WebsiteDrawer:y},setup(){const[t,{openDrawer:n}]=v(),l=E(!1),[c,{reload:a}]=b(S);function d(o){n(!0,{record:o,isUpdate:!0})}function s(){a()}function p(){n(!0,{isUpdate:!1})}return{loading:l,registerTable:c,registerDrawer:t,handleCreate:p,handleEdit:d,handleSuccess:s,handleDelete:o=>{w.confirm({title:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u5417?",icon:e(k),content:e("div",{style:"color:red;"},"\u6CE8\uFF1A\u5220\u9664\u540E\u6570\u636E\u5C06\u65E0\u6CD5\u6062\u590D\uFF01"),okText:"\u5220\u9664",okType:"danger",onOk(){f("position_group_del",{id:o.id}).then(r=>{r.error?C.error("\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\uFF01"):(a(),C.success("\u64CD\u4F5C\u6210\u529F\uFF01"))})}})}}}}),I={class:"p-4"};function M(t,n,l,c,a,d){const s=u("a-button"),p=u("TableAction"),F=u("BasicTable"),o=u("WebsiteDrawer");return A(),B("div",I,[e(F,{onRegister:t.registerTable},{toolbar:m(()=>[e(s,{type:"primary",onClick:t.handleCreate},{default:m(()=>[T(" \u65B0\u589E\u5E7F\u544A\u5206\u7C7B ")]),_:1},8,["onClick"])]),action:m(({record:r})=>[e(p,{actions:[{label:"\u7F16\u8F91",icon:"clarity:note-edit-line",color:"success",onClick:t.handleEdit.bind(null,r)},{label:"\u5220\u9664",icon:"ic:outline-delete-outline",color:"error",onClick:t.handleDelete.bind(null,r)}]},null,8,["actions"])]),_:1},8,["onRegister"]),e(o,{onRegister:t.registerDrawer,onSuccess:t.handleSuccess},null,8,["onRegister","onSuccess"])])}var Pt=g($,[["render",M]]);export{Pt as default};