Files
qhmes/deploy-qhmes/frontend/js/EoaWordTemplate.api-BKHSuMV4.js
2026-05-15 11:34:12 +08:00

2 lines
3.1 KiB
Java

import{u as l,f as o,bR as i}from"./index-BI6CMai0.js";import{f as s}from"./antd-vue-vendor-BPnV8VqP.js";const w=[{title:"模版名称",align:"center",dataIndex:"name"},{title:"模版编码",align:"center",dataIndex:"code"}],p=[{label:"模版名称",field:"name",component:"Input"},{label:"模版编码",field:"code",component:"Input"}],d=[{label:"模版名称",field:"name",component:"Input",dynamicRules:({model:e,schema:t})=>[{required:!0,message:"请输入模版名称!"}]},{label:"模版编码",field:"code",component:"Input",dynamicRules:({model:e,schema:t})=>[{required:!0,message:"请输入模版编码!"},{pattern:/^[A-Za-z_]+$/,message:"只能输入英文和下划线!"}]},{label:"页眉",field:"header",component:"Input",show:!1},{label:"页脚",field:"footer",component:"Input",show:!1},{label:"主体内容",field:"main",component:"Input",show:!1},{label:"页边距",field:"margins",component:"Input",show:!1},{label:"宽度",field:"width",component:"InputNumber",show:!1},{label:"高度",field:"height",component:"InputNumber",show:!1},{label:"纸张方向",field:"paperDirection",component:"Input",show:!1},{label:"水印",field:"watermark",component:"Input",show:!1},{label:"",field:"id",component:"Input",show:!1}],g={name:{title:"模版名称",order:0,view:"text",type:"string"},code:{title:"模版编码",order:1,view:"text",type:"string"},header:{title:"页眉",order:2,view:"text",type:"string"},footer:{title:"页脚",order:3,view:"text",type:"string"},main:{title:"主体内容",order:4,view:"text",type:"string"},margins:{title:"页边距",order:5,view:"text",type:"string"},width:{title:"宽度",order:6,view:"number",type:"number"},height:{title:"高度",order:7,view:"number",type:"number"},paperDirection:{title:"纸张方向",order:8,view:"text",type:"string"},watermark:{title:"水印",order:9,view:"text",type:"string"}};function f(e){return d}const{createConfirm:c}=l();const h=e=>o.get({url:"/airag/word/list",params:e}),b=(e,t)=>o.delete({url:"/airag/word/delete",params:e},{joinParamsToUrl:!0}).then(()=>{t()}),y=(e,t)=>{c({iconType:"warning",title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>o.delete({url:"/airag/word/deleteBatch",data:e},{joinParamsToUrl:!0}).then(()=>{t()})})},v=(e,t)=>{const r=t?"/airag/word/edit":"/airag/word/add";return o.post({url:r,params:e})},I=e=>i("/airag/word/download",e.name+".docx",{id:e.id}),x=(e,t)=>o.post({url:"/airag/word/generate/word",params:t,responseType:"blob"},{isTransformResponse:!1}).then(r=>{if(!r||r.size===0){s.warning("文件下载失败");return}if(typeof window.navigator.msSaveBlob!="undefined")window.navigator.msSaveBlob(new Blob([r]),e);else{const n=window.URL.createObjectURL(new Blob([r])),a=document.createElement("a");a.style.display="none",a.href=n,a.setAttribute("download",e),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)}}),R=(e,t)=>o.post({url:"/airag/flow/run",params:e,timeout:12e4,timeoutErrorMessage:"同步数据库超时,已自动刷新"},{isTransformResponse:!1}).then(r=>{t(r)}),T="/airag/word/parse/file";export{R as a,y as b,v as c,I as d,p as e,w as f,x as g,b as h,d as i,f as j,h as l,T as p,g as s};