import{f as i,U as c,a2 as _,ad as k,af as p,a4 as a,az as x,aA as I,k as u,G as z,ag as A,u as n}from"./vue-vendor-CxLCUzY4.js";import{B as N}from"./index-CF_FJn6P.js";import{c9 as R,a8 as S,u as U,h as V}from"./index-CYriLmQo.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";const m=t=>(x("data-v-4ab211b3"),t=t(),I(),t),$={class:"aiWrap"},y=m(()=>a("div",{class:"titleArea"},[a("svg",{t:"1707100353985",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4235",width:"26",height:"26"},[a("path",{d:"M512 64C264.8 64 64 264.8 64 512s200.8 448 448 448 448-200.8 448-448S759.2 64 512 64z m32 704h-64v-64h64v64z m11.2-203.2l-5.6 4.8c-3.2 2.4-5.6 8-5.6 12.8v58.4h-64v-58.4c0-24.8 11.2-48 29.6-63.2l5.6-4.8c56-44.8 83.2-68 83.2-108C598.4 358.4 560 320 512 320c-49.6 0-86.4 36.8-86.4 86.4h-64C361.6 322.4 428 256 512 256c83.2 0 150.4 67.2 150.4 150.4 0 72.8-49.6 112.8-107.2 158.4z","p-id":"4236",fill:"currentColor"})]),a("h3",null,"创建工作表字段需要专业建议?试试AI智能推荐吧")],-1)),H=m(()=>a("p",{class:"tip"},"可尝试添加修饰词，如:智能家居行业的生产计划表",-1)),P={class:"content"},E={__name:"AiModal",emits:["register","success"],setup(t,{emit:d}){const v={aigc:"/online/cgform/api/aigc"},[g,{closeModal:h}]=S(),{createMessage:f}=U(),e=i(""),s=i(!1),w=i("ai创建表"),r=()=>{h()},C=()=>{e.value.trim()===""?f.warning("请输入修饰词~"):(s.value=!0,V.post({url:`${v.aigc}?prompt=${e.value}`,timeout:1e3*60}).then(o=>{s.value=!1,r(),d("success"),e.value=""}).catch(o=>{s.value=!1}))};return(o,l)=>{const M=c("a-input"),b=c("a-button");return _(),k(n(N),A({height:180,title:w.value,width:600,maskClosable:!1},o.$attrs,{onRegister:n(g),footer:null,onCancel:r}),{default:p(()=>[a("div",$,[y,H,a("div",P,[u(M,{value:e.value,"onUpdate:value":l[0]||(l[0]=B=>e.value=B),valueModifiers:{trim:!0},placeholder:"请输入修饰词"},null,8,["value"]),u(b,{loading:s.value,type:"primary",onClick:C},{default:p(()=>[z("生成表")]),_:1},8,["loading"])])])]),_:1},16,["title","onRegister"])}}},Z=R(E,[["__scopeId","data-v-4ab211b3"]]);export{Z as default};
