import{b as N,c as E}from"./dataStandard.4ca18653.js";import{d as D,L as A,h as b,Y as L,r as s,o as d,f as r,w as t,b as o,a as p,t as i,H as m,c as x,e as T,F as U,l as I}from"./index.e3896b23.js";const S=I("\u53D6\u6D88"),M=D({__name:"standard-info",emits:["refreshDataList"],setup(P,{expose:C,emit:R}){A(()=>{N().then(n=>{y.value=n.data})});const c=b(!1),_=b(),e=L({engName:"",cnName:"",type:"",dataType:"",dataLength:0,dataPrecision:0,nullable:"",note:"",standardCodeId:""}),y=b([]),V=n=>{c.value=!0,e.id="",_.value&&_.value.resetFields(),n&&B(n)},B=n=>{E(n).then(l=>{Object.assign(e,l.data)})},F=b({});return C({init:V}),(n,l)=>{const u=s("el-form-item"),f=s("fast-select"),v=s("el-option"),g=s("el-select"),h=s("el-form"),k=s("el-button"),w=s("el-dialog");return d(),r(w,{modelValue:c.value,"onUpdate:modelValue":l[5]||(l[5]=a=>c.value=a),title:"\u8BE6\u60C5","close-on-click-modal":!1},{footer:t(()=>[o(k,{onClick:l[4]||(l[4]=a=>c.value=!1)},{default:t(()=>[S]),_:1})]),default:t(()=>[o(h,{ref_key:"dataFormRef",ref:_,model:e,rules:F.value,"label-width":"100px"},{default:t(()=>[o(u,{label:"\u82F1\u6587\u540D\u79F0",prop:"engName","label-width":"auto"},{default:t(()=>[p("span",null,i(e.engName),1)]),_:1}),o(u,{label:"\u4E2D\u6587\u540D\u79F0",prop:"cnName","label-width":"auto"},{default:t(()=>[p("span",null,i(e.cnName),1)]),_:1}),o(u,{label:"\u6807\u51C6\u7C7B\u578B",prop:"type","label-width":"auto"},{default:t(()=>[o(f,{modelValue:e.type,"onUpdate:modelValue":l[0]||(l[0]=a=>e.type=a),disabled:"","dict-type":"standard_type",placeholder:"\u6807\u51C6\u7C7B\u578B",clearable:""},null,8,["modelValue"])]),_:1}),e.type==1?(d(),r(u,{key:0,label:"\u6570\u636E\u7C7B\u578B",prop:"dataType","label-width":"auto"},{default:t(()=>[o(f,{modelValue:e.dataType,"onUpdate:modelValue":l[1]||(l[1]=a=>e.dataType=a),disabled:"","dict-type":"standard_data_type",placeholder:"\u6570\u636E\u7C7B\u578B",clearable:""},null,8,["modelValue"])]),_:1})):m("",!0),e.type==1?(d(),r(u,{key:1,label:"\u957F\u5EA6",prop:"dataLength","label-width":"auto"},{default:t(()=>[p("span",null,i(e.dataLength),1)]),_:1})):m("",!0),e.type==1?(d(),r(u,{key:2,label:"\u7CBE\u5EA6(\u5C0F\u6570\u4F4D\u6570)",prop:"dataPrecision","label-width":"auto"},{default:t(()=>[p("span",null,i(e.dataPrecision),1)]),_:1})):m("",!0),e.type==1?(d(),r(u,{key:3,label:"\u5141\u8BB8\u4E3A\u7A7A",prop:"nullable","label-width":"auto"},{default:t(()=>[o(f,{disabled:"",modelValue:e.nullable,"onUpdate:modelValue":l[2]||(l[2]=a=>e.nullable=a),"dict-type":"yes_or_no",placeholder:"\u8BF7\u9009\u62E9",clearable:""},null,8,["modelValue"])]),_:1})):m("",!0),o(u,{label:"\u63CF\u8FF0",prop:"note","label-width":"auto"},{default:t(()=>[p("span",null,i(e.note),1)]),_:1}),e.type==1?(d(),r(u,{key:4,label:"\u5173\u8054\u7801\u8868",prop:"standardCodeId","label-width":"auto"},{default:t(()=>[o(g,{modelValue:e.standardCodeId,"onUpdate:modelValue":l[3]||(l[3]=a=>e.standardCodeId=a),disabled:"",clearable:"",filterable:"",placeholder:"\u8BF7\u9009\u62E9"},{default:t(()=>[(d(!0),x(U,null,T(y.value,(a,$)=>(d(),r(v,{key:a.id,label:`[${a.engName}]${a.cnName}`,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):m("",!0)]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}});export{M as _};
