import{_ as D}from"./page-search.vue_vue_type_script_setup_true_lang.e284bf07.js";import{u as b}from"./use-page-search.da34a19a.js";import{aI as c,aJ as n,aK as A,b as E,o as R,c as q,j as i,f as t,F as S}from"./index.4d3e3847.js";import{c as $,r as w}from"./column-helper.adef10ea.js";import{u as P,_ as I}from"./use-page-modal.88aec721.js";import{P as x}from"./page-content.1fdb6363.js";import{u as O}from"./useAsync.24db85a6.js";import"./basic-form.114da3ff.js";import"./validate.93ab4ac7.js";import"./basic-form.vue_vue_type_style_index_0_scoped_d6f0d2ed_lang.3165143d.js";import"./image.7849d972.js";import"./hooks.428ba1c3.js";import"./useNav.afbe69e0.js";import"./index.a5d44002.js";import"./responseHandle.db1518c7.js";import"./xlsx.ed122d16.js";const L={formItems:[{field:"status",type:"select",placeholder:"\u89C6\u9891\u72B6\u6001",options:$(c)},{field:"video_name",type:"input",placeholder:"\u89C6\u9891\u540D\u79F0"},{field:"video_url",type:"input",placeholder:"\u89C6\u9891\u5730\u5740"}]},p=L,{VITE_PROXY_DOMAIN_REAL:o}=A();async function M(e){return n.request("post",`${o}admin/videoAdd`,{data:e})}async function T(e){return n.request("post",`${o}admin/videoDelete`,{data:e})}async function U(e){return n.request("post",`${o}admin/videoEdit`,{data:e})}async function N(e){return n.request("post",`${o}admin/videoChange`,{data:e})}async function H(e){return n.request("post",`${o}admin/videoRead`,{data:e})}async function V(e){return n.request("post",`${o}admin/videoList`,{data:e})}const j=[{type:"selection",width:55,hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{prop:"id",label:"ID",width:"100px"},{prop:"video_name",label:"\u89C6\u9891\u540D\u79F0"},{prop:"status",label:"\u72B6\u6001",...w(c)},{prop:"addtime",label:"\u521B\u5EFA\u65F6\u95F4"},{label:"\u64CD\u4F5C",fixed:"right",width:160,slot:"operation"}],J={title:"\u89C6\u9891\u7BA1\u7406",columns:j,apis:{httpAdd:M,httpDelete:T,httpStatus:N,httpList:V,httpUpdate:U},notPreview:!1},K=J,W={title:"\u89C6\u9891",colLayout:{span:24},itemStyle:{},contact:"invoice_mobile",labelWidth:"100px",formItems:[{field:"video_img",type:"img_upload",label:"\u89C6\u9891\u5C01\u9762",placeholder:"\u89C6\u9891\u5C01\u9762",span:8,rules:[{required:!0,trigger:"change",message:"\u8BF7\u4E0A\u4F20\u89C6\u9891\u5C01\u9762\uFF01"}]},{field:"video_name",type:"input",label:"\u89C6\u9891\u540D\u79F0",placeholder:"\u89C6\u9891\u540D\u79F0",span:16,rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u89C6\u9891\u540D\u79F0"}]},{field:"video_url",type:"input",label:"\u89C6\u9891\u94FE\u63A5",placeholder:"\u89C6\u9891\u94FE\u63A5",rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5"}]},{field:"remark",type:"textarea",label:"\u89C6\u9891\u63CF\u8FF0",placeholder:"\u89C6\u9891\u63CF\u8FF0",rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u89C6\u9891\u63CF\u8FF0"}]}]},X=W,pe=E({__name:"index",setup(e){const{pageContentRef:r,handleResetClick:f,handleSearchClick:m}=b(void 0,void 0,p),{pageModalRef:C,handleUpdateData:g,handleCreateData:h,handlePreviewData:F,handleConfrim:_,defaultInfo:v}=P({pageContentRef:r}),B=O();async function l(s,u){const{id:a}=s,{code:y,data:d,message:k}=await H({id:a});B({code:y,message:k,handler:()=>{u==="preview"&&F(d),u==="update"&&g(d)}})}return(s,u)=>(R(),q(S,null,[i(t(D),{"form-config":t(p),onSearchBtnClick:t(m),onResetBtnClick:t(f)},null,8,["form-config","onSearchBtnClick","onResetBtnClick"]),i(t(x),{ref_key:"pageContentRef",ref:r,"content-config":t(K),onCreateBtnClick:t(h),onPreviewBtnClick:u[0]||(u[0]=a=>l(a,"preview")),onUpdateBtnClick:u[1]||(u[1]=a=>l(a,"update"))},null,8,["content-config","onCreateBtnClick"]),i(t(I),{ref_key:"pageModalRef",ref:C,"modal-config":t(X),"default-info":t(v),onConfirmBtnClick:t(_)},null,8,["modal-config","default-info","onConfirmBtnClick"])],64))}});export{pe as default};
