import{_ as S}from"./BasicUpload.vue_vue_type_style_index_0_scoped_a4d0e930_lang-DxRbtP01.js";import{v as H,d as M,cq as T,r as k,u as W,a as x,h as A,o as D,i as U,j as e,w as l,p as u,W as E,U as G,M as I,t as J,l as a,_ as Q,k as Z,cb as z,aA as K,c8 as O,H as X,c9 as Y,B as ee}from"./index-9PRMimni.js";import"./ImageUpload.vue_vue_type_style_index_0_scoped_cb086928_lang-D-28kXvw.js";import"./vuedraggable.umd-Co2xEC3p.js";import"./componentSetting-DVhNDBTO.js";const te=H(S,[["__scopeId","data-v-a4d0e930"]]),le={class:"n-layout-page-header"},ae={style:{"margin-left":"80px"}},ne={name:"BasicForm"},_e=M({...ne,setup(oe){const y=T(),C=[{label:"种牙",value:1},{label:"补牙",value:2},{label:"根管",value:3}],B=[{label:"李医生",value:1},{label:"黄医生",value:2},{label:"张医生",value:3}],V={name:{required:!0,message:"请输入预约姓名",trigger:"blur"},remark:{required:!0,message:"请输入预约备注",trigger:"blur"},mobile:{required:!0,message:"请输入预约电话号码",trigger:["input"]},datetime:{required:!0,type:"number",message:"请选择预约时间",trigger:["blur","change"]},doctor:{required:!0,type:"number",message:"请选择预约医生",trigger:"change"}},p=k(null),_=W(),{uploadUrl:q}=y,d=()=>({name:"",mobile:"",remark:"",sex:1,matter:null,doctor:null,datetime:[]});let n=x(d());const i=k(["https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"]),h=x({platform:"miniPrograms",timestamp:new Date().getTime(),token:"Q6fFCuhc1vkKn5JNFWaCLf6gRAc5n0LQHd08dSnG4qo="});function j(){p.value.validate(r=>{r?_.error("验证失败，请填写完整信息"):_.success("验证成功")})}function w(){p.value.restoreValidation(),n=Object.assign(a(n),d())}function L(r){console.log(r)}return(r,t)=>{const f=E,m=Z,s=Q,N=z,c=K,g=Y,v=X,R=O,b=ee,$=J,F=I,P=G;return D(),A("div",null,[U("div",le,[e(f,{bordered:!1,title:"基础表单"},{default:l(()=>t[8]||(t[8]=[u(" 表单页用于向用户收集或验证信息，基础表单常见于数据项较少的表单场景。表单域标签也可支持响应式。 ")])),_:1})]),e(f,{bordered:!1,class:"mt-3 proCard"},{default:l(()=>[e(P,{cols:"1 s:1 m:3 l:3 xl:3 2xl:3",responsive:"screen"},{default:l(()=>[e(F,{offset:"0 s:0 m:1 l:1 xl:1 2xl:1"},{default:l(()=>[e($,{ref_key:"formRef",ref:p,"label-width":80,model:a(n),rules:V,class:"py-8","label-placement":"left"},{default:l(()=>[e(s,{label:"预约姓名",path:"name"},{default:l(()=>[e(m,{value:a(n).name,"onUpdate:value":t[0]||(t[0]=o=>a(n).name=o),placeholder:"输入姓名"},null,8,["value"])]),_:1}),e(s,{label:"预约号码",path:"mobile"},{default:l(()=>[e(m,{value:a(n).mobile,"onUpdate:value":t[1]||(t[1]=o=>a(n).mobile=o),placeholder:"电话号码"},null,8,["value"])]),_:1}),e(s,{label:"预约时间",path:"datetime"},{default:l(()=>[e(N,{value:a(n).datetime,"onUpdate:value":t[2]||(t[2]=o=>a(n).datetime=o),type:"datetime"},null,8,["value"])]),_:1}),e(s,{label:"预约医生",path:"doctor"},{default:l(()=>[e(c,{value:a(n).doctor,"onUpdate:value":t[3]||(t[3]=o=>a(n).doctor=o),options:B,placeholder:"请选择预约医生"},null,8,["value"])]),_:1}),e(s,{label:"预约事项",path:"matter"},{default:l(()=>[e(c,{value:a(n).matter,"onUpdate:value":t[4]||(t[4]=o=>a(n).matter=o),options:C,multiple:"",placeholder:"请选择预约事项"},null,8,["value"])]),_:1}),e(s,{label:"性别",path:"sex"},{default:l(()=>[e(R,{value:a(n).sex,"onUpdate:value":t[5]||(t[5]=o=>a(n).sex=o),name:"sex"},{default:l(()=>[e(v,null,{default:l(()=>[e(g,{value:1},{default:l(()=>t[9]||(t[9]=[u("男")])),_:1}),e(g,{value:2},{default:l(()=>t[10]||(t[10]=[u("女")])),_:1})]),_:1})]),_:1},8,["value"])]),_:1}),e(s,{label:"预约备注",path:"remark"},{default:l(()=>[e(m,{value:a(n).remark,"onUpdate:value":t[6]||(t[6]=o=>a(n).remark=o),placeholder:"请输入预约备注",type:"textarea"},null,8,["value"])]),_:1}),e(s,{label:"图片",path:"img"},{default:l(()=>[e(a(te),{value:i.value,"onUpdate:value":t[7]||(t[7]=o=>i.value=o),action:`${a(q)}/v1.0/files`,data:{type:"0"},headers:h,height:100,width:100,helpText:"单个文件不超过20MB，最多只能上传10个文件",name:"files",onUploadChange:L},null,8,["value","action","headers"])]),_:1}),U("div",ae,[e(v,null,{default:l(()=>[e(b,{type:"primary",onClick:j},{default:l(()=>t[11]||(t[11]=[u("提交预约")])),_:1}),e(b,{onClick:w},{default:l(()=>t[12]||(t[12]=[u("重置")])),_:1})]),_:1})])]),_:1},8,["model"])]),_:1})]),_:1})]),_:1})])}}});export{_e as default};
