import{C as N}from"./client-578c7487.js";import{E as S,a as f}from"./element-plus-91d6d961.js";import{H as g,_ as B,a0 as T,ah as r,o as U,c as k,V as l,P as o,a as p,T as _}from"./@vue-6dabbe94.js";const z=["src"],E={class:"dialog-footer"},P=g({name:"attachDetail"}),R=g({...P,emits:["reloadTable"],setup(v,{expose:F,emit:V}){const d=N(),e=B({isShowDialog:!1,ruleForm:{id:null},rules:{fileName:{required:!0,message:"请输入文件名称",trigger:"blur"}}}),h=n=>{e.isShowDialog=!0,e.ruleForm.id=n},i=()=>{e.isShowDialog=!1},b=()=>{i(),C()},w=()=>{S.confirm("此操作将永久删除附件, 是否继续?","提示",{confirmButtonText:"删除",cancelButtonText:"取消",type:"warning"}).then(()=>{d.delAttach(e.ruleForm.id).then(()=>{i(),f.success("删除成功"),V("reloadTable")}).catch(n=>{f.error(n.message)})}).catch(()=>{})},x=()=>{e.ruleForm.id&&e.ruleForm.id!=null&&d.getAttach(e.ruleForm.id).then(n=>{e.ruleForm=n.data})};T(()=>{x()});const C=()=>{e.ruleForm={}};return F({openDialog:h}),(n,t)=>{const s=r("el-col"),m=r("el-input"),u=r("el-form-item"),D=r("el-row"),y=r("el-form"),c=r("el-button"),A=r("el-dialog");return U(),k("div",null,[l(A,{title:"图片详情",modelValue:e.isShowDialog,"onUpdate:modelValue":t[4]||(t[4]=a=>e.isShowDialog=a),width:"769px"},{footer:o(()=>[p("span",E,[l(c,{type:"danger",onClick:w},{default:o(()=>[_("删 除")]),_:1}),l(c,{onClick:b},{default:o(()=>[_("取 消")]),_:1})])]),default:o(()=>[l(y,{model:e.ruleForm,"label-width":"80px",rules:e.rules,ref:"myRefForm"},{default:o(()=>[l(D,{gutter:35},{default:o(()=>[l(s,{class:"mb20"},{default:o(()=>[p("img",{alt:"fastcms",src:e.ruleForm.path},null,8,z)]),_:1}),l(s,{class:"mb20"},{default:o(()=>[l(u,{label:"文件名称",prop:"fileName"},{default:o(()=>[l(m,{modelValue:e.ruleForm.fileName,"onUpdate:modelValue":t[0]||(t[0]=a=>e.ruleForm.fileName=a),readonly:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{class:"mb20"},{default:o(()=>[l(u,{label:"文件路径",prop:"filePath"},{default:o(()=>[l(m,{modelValue:e.ruleForm.filePath,"onUpdate:modelValue":t[1]||(t[1]=a=>e.ruleForm.filePath=a),readonly:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{class:"mb20"},{default:o(()=>[l(u,{label:"文件大小",prop:"size"},{default:o(()=>[l(m,{modelValue:e.ruleForm.fileSize,"onUpdate:modelValue":t[2]||(t[2]=a=>e.ruleForm.fileSize=a),readonly:""},null,8,["modelValue"])]),_:1})]),_:1}),l(s,{class:"mb20"},{default:o(()=>[l(u,{label:"上传时间",prop:"size"},{default:o(()=>[l(m,{modelValue:e.ruleForm.created,"onUpdate:modelValue":t[3]||(t[3]=a=>e.ruleForm.created=a),readonly:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])])}}});export{R as _};
