import{e,a9 as a,K as t,r as o,aa as r,J as s,f as n,g as i,h as d,w as l,z as u,o as _,i as p,a as m}from"./index-Cg3FU-dV.js";import{_ as c}from"./uni-easyinput.Cm5bRP31.js";import{k as h,l as y}from"./crud.Bz7QNQj_.js";import{d as f}from"./index.D_hliqYM.js";import{i as b}from"./item.BmdQYlVF.js";import{_ as g}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.D_sy4NxH.js";/* empty css                                                                  *//* empty css                                                                      */import"./uni-nav-bar.BXgu2eq7.js";/* empty css                                                                    *//* empty css                                                              */import"./uni-row.DfI4R5V8.js";import"./uni-dateformat.D7mTxFoD.js";import"./index.Dozy1JgX.js";/* empty css                                                              */import"./index.BFPpyCMx.js";const j=g({__name:"oneOnOne",setup(g){const j=e({backgroundColor:"rgba(0,0,0,0)",tableData:[],id:0,jumpUrl:"",where:{limit:10,page:1,keyword:""},keyName:"",header:[]});a((e=>{j.id=e.id,j.keyName=e.keyName,j.jumpUrl=`/pages/module/addForm?key=${j.keyName}`,w(),v()}));const w=()=>{h(j.id).then((e=>{j.header=e.data}))},k=()=>{j.where.keyword="",j.where.page=1,v()},v=e=>{e&&(j.where.page=e),y(j.id,j.where).then((e=>{1==j.where.page&&(j.tableData=[]),j.tableData.push(...e.data.list);const a=Math.ceil(e.data.count/j.where.limit);j.tableData.length<=0||j.where.page>=a?x.value=!1:x.value=!0,t()}))},x=o(!1);return r((()=>{x.value&&(j.where.page++,v())})),s((()=>{j.where.page=1,v()})),(e,a)=>{const t=u,o=n(i("uni-easyinput"),c);return _(),d(t,{class:"content"},{default:l((()=>[p(t,{class:"cr-position-header"},{default:l((()=>[p(f,{defaultTitle:"一对一引用",backgroundColor:m(j).backgroundColor,color:"#fff"},null,8,["backgroundColor"])])),_:1}),p(t,{class:"examine-content"},{default:l((()=>[p(t,{class:"search"},{default:l((()=>[p(o,{prefixIcon:"search",modelValue:m(j).where.keyword,"onUpdate:modelValue":a[0]||(a[0]=e=>m(j).where.keyword=e),placeholder:"关键字搜索",onConfirm:a[1]||(a[1]=e=>v(1)),onFocus:a[2]||(a[2]=e=>v(1)),onClear:k},null,8,["modelValue"])])),_:1}),p(b,{keyName:m(j).keyName,info:m(j).header,"table-data":m(j).tableData,type:"oneOnOne"},null,8,["keyName","info","table-data"])])),_:1})])),_:1})}}},[["__scopeId","data-v-db299c76"]]);export{j as default};
