import{d as e,r as a,o as l,j as t,b as n,c as o,w as s,k as d,e as i,f as u,F as r,m as c,q as m,i as p}from"./index-z4UiUMlV.js";import{g as f,a as _}from"./index.Wwo-uIrA.js";import{_ as g}from"./_plugin-vue_export-helper.BCo6x5W8.js";const y=g(e({__name:"physical",setup(e){const g=a([]);function y(){f("/extraOption").then((e=>{200===e.code&&(g.value=JSON.parse(e.data.payload))}))}l((()=>{y()}));const V=()=>{history.back()},v=()=>{g.value.push({options:[{}]})},h=()=>{let e={id:1,payload:JSON.stringify(g.value)};_("/extraOption",e).then((e=>{200===e.code&&(m("提交成功！"),y())}))};return(e,a)=>{const l=t("van-nav-bar"),m=t("van-icon"),f=t("van-field"),_=t("van-button"),y=p,k=t("van-radio"),x=t("van-radio-group"),b=t("van-cell-group"),U=t("van-checkbox");return n(),o(y,{class:"flex"},{default:s((()=>[d(l,{title:"理化报告维护","left-text":"返回","left-arrow":"","right-text":"新增",onClickLeft:V,onClickRight:v}),d(y,{class:"content"},{default:s((()=>[(n(!0),i(r,null,u(g.value,((e,a)=>(n(),o(y,{class:"card",key:a},{default:s((()=>[d(b,{inset:""},{default:s((()=>[d(y,{class:"a-b"},{default:s((()=>[d(m,{name:"clear",color:"red",size:"25",onClick:e=>g.value.splice(a,1)},null,8,["onClick"]),d(f,{modelValue:e.name,"onUpdate:modelValue":a=>e.name=a,name:"项目名称",label:"项目名称",colon:"",class:"a-c","label-width":"6em",rules:[{required:!0,message:"请填写"}]},null,8,["modelValue","onUpdate:modelValue"]),d(_,{type:"primary",onClick:a=>(e=>{e.options.push({})})(e)},{default:s((()=>[c("新增选项")])),_:2},1032,["onClick"])])),_:2},1024),d(y,{style:{display:"flex","align-items":"center",margin:"10px 0"}},{default:s((()=>[d(y,{style:{width:"80%"}},{default:s((()=>[d(f,{modelValue:e.name1,"onUpdate:modelValue":a=>e.name1=a,name:"标准值",label:"标准值",colon:"",class:"a-c","label-width":"3.5em",rules:[{required:!0,message:"请填写"}]},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),d(f,{name:"是否必填",label:"是否必填",colon:"","label-width":"4.5em"},{input:s((()=>[d(x,{modelValue:e.necessary,"onUpdate:modelValue":a=>e.necessary=a,direction:"horizontal"},{default:s((()=>[d(k,{name:!0},{default:s((()=>[c("是")])),_:1}),d(k,{name:!1},{default:s((()=>[c("否")])),_:1})])),_:2},1032,["modelValue","onUpdate:modelValue"])])),_:2},1024)])),_:2},1024)])),_:2},1024),d(y,{class:"grid-container"},{default:s((()=>[d(y,{class:"grid-item"}),d(y,{class:"grid-item"},{default:s((()=>[c("内容")])),_:1}),d(y,{class:"grid-item"},{default:s((()=>[c("是否符合")])),_:1}),d(y,{class:"grid-item"},{default:s((()=>[c("操作")])),_:1})])),_:1}),(n(!0),i(r,null,u(e.options,((a,l)=>(n(),o(y,{class:"grid-container",key:l},{default:s((()=>[d(y,{class:"grid-item"},{default:s((()=>[c("选项")])),_:1}),d(y,{class:"grid-item"},{default:s((()=>[d(f,{modelValue:a.name,"onUpdate:modelValue":e=>a.name=e},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),d(y,{class:"grid-item",style:{display:"flex","align-items":"center","justify-content":"center"}},{default:s((()=>[d(U,{modelValue:a.default,"onUpdate:modelValue":e=>a.default=e,name:!0},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),d(y,{class:"grid-item",style:{color:"red"},onClick:a=>e.options.splice(l,1)},{default:s((()=>[c("删除")])),_:2},1032,["onClick"])])),_:2},1024)))),128))])),_:2},1024)))),128))])),_:1}),d(_,{type:"primary",style:{margin:"10rpx"},onClick:h},{default:s((()=>[c("提交")])),_:1})])),_:1})}}}),[["__scopeId","data-v-587a8c3b"]]);export{y as default};
