import{C as e,Ct as t,O as n,S as r,St as i,T as a,Y as o,at as s,cn as c,ct as l,dt as u,ft as d,j as f,k as p,kt as m,m as h,x as g}from"./vue.runtime.esm-bundler-DpGzKKN4.js";import"./GxPagination-DOexUzbO.js";import{n as _,t as v}from"./table-C_Bpc8FZ.js";import{n as y,t as b}from"./form-Bb1_iOEA.js";import{t as x}from"./button-CHjzS7b0.js";import{t as S}from"./dialog-BLJqz3g4.js";import{t as C}from"./directive-9SA1IQHd.js";import{t as w}from"./_plugin-vue_export-helper-CnS4QQza.js";import"./css-DxP8XCTD.js";import{bt as T,mi as E,yt as D}from"./stores-BWYw2E2w.js";import"./css-CW_FwBqc2.js";import"./css-j23UczC-.js";import{a as O}from"./validate-CTyV86Nm.js";import"./css-DunA3L7q.js";import"./css-ropEN6qH.js";import"./css-BrGVMe3H.js";var k={class:`config-import-from-other-select-dialog`},A={class:`flex flex-row flex-nowrap w-full place-content-between`},j={style:{"text-align":`center`,"margin-top":`20px`}},M=w(f({__name:`choice-data-entity-field`,props:{visible:{type:Boolean},visibleModifiers:{}},emits:[`update:visible`],setup(f){let w=D(),M=T(),N=g(()=>M.dataEntitlyFieldConfigChildren.choosedFieldId),P=g(()=>M.dataEntitlyFieldConfigChildren.bizEntityObId),F=g(()=>{let e=P.value,t=w.curRequestDataEntityList;return e&&t.find(t=>t.bizEntityObId===e)||null}),I=s(f,`visible`),L=i([]);i(0),l(I,e=>{e&&B()});let R=()=>{I.value=!1},z=t({loading:!1}),B=async()=>{z.loading=!0;let e={zxlPrdId:w.zxlPrdId,bizEntityObId:P.value};try{if(!e.bizEntityObId)throw Error(`数据实体ID不能为空！`);L.value=await E(e)}catch(e){O({type:`error`,message:e?.message||`获取数据失败！`})}z.loading=!1},V=async e=>{let t=M.dataEntitlyFieldConfigChildren.callbackFn;typeof t==`function`&&t(e),R()};return(t,i)=>{let s=y,l=b,f=_,g=x,w=v,T=S,E=C;return o(),a(`div`,k,[p(T,{title:`选择数据实体字段`,modelValue:I.value,"onUpdate:modelValue":i[2]||=e=>I.value=e,width:`700px`,onClose:R,"append-to-body":``},{default:u(()=>[d((o(),a(`div`,null,[p(l,{model:m(z),"label-width":`auto`,onSubmit:i[0]||=h(()=>{},[`prevent`])},{default:u(()=>[p(s,{label:`接口名称`,prop:`openDialogTarget`},{default:u(()=>[r(`div`,A,[r(`div`,null,`当前数据实体为：【`+c(F.value?.bizEntityNameCn)+`】`,1)])]),_:1})]),_:1},8,[`model`]),p(w,{data:L.value,stripe:``,"max-height":500,border:``},{default:u(()=>[p(f,{label:`字段编号`,prop:`fieldNo`,width:`90`}),p(f,{label:`字段名称`,prop:`fieldNameCn`,width:`90`,"show-overflow-tooltip":!0}),p(f,{label:`英文名`,prop:`fieldName`,"show-overflow-tooltip":!0}),p(f,{label:`数据类型`,prop:`fieldTypeStr`,width:`90`,"show-overflow-tooltip":!0}),p(f,{label:`字段长度`,prop:`fieldLength`,width:`90`,"show-overflow-tooltip":!0}),p(f,{label:`操作`,prop:``,width:`200`,align:`center`},{default:u(({row:t})=>[N.value===t.fieldObId?(o(),e(g,{key:0,title:`已选中`,class:`!p-0 w-9`,text:``,onClick:h(e=>null,[`stop`]),disabled:``},{default:u(()=>[...i[3]||=[n(`已选中`,-1)]]),_:1})):(o(),e(g,{key:1,title:`选择`,class:`!p-0 w-9`,text:``,onClick:h(e=>V(t),[`stop`])},{default:u(()=>[...i[4]||=[n(`选择`,-1)]]),_:1},8,[`onClick`]))]),_:1})]),_:1},8,[`data`])])),[[E,m(z).loading]]),r(`div`,j,[p(g,{class:`pv20 mr20 ml20 mt20`,type:`info`,onClick:i[1]||=e=>I.value=!1},{default:u(()=>[...i[5]||=[n(` 关闭 `,-1)]]),_:1})])]),_:1},8,[`modelValue`])])}}}),[[`__scopeId`,`data-v-56da62a6`]]);export{M as t};