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 l,w as d,z as u,o as _,i as p,a as m}from"./index-B3cqKsI_.js";import{_ as c}from"./uni-easyinput.CqN2D7tl.js";import{k as h,l as y}from"./crud.DtwQ0zQA.js";import{d as f}from"./index.CL60Q41z.js";import{i as b}from"./item.Cdvdg5Jm.js";import{_ as g}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.EqO7jntL.js";/* empty css                                                                  *//* empty css                                                                      */import"./uni-nav-bar.xE5Um1Eb.js";/* empty css                                                                    *//* empty css                                                              */import"./uni-row.DyJ89Jxj.js";import"./uni-dateformat.DQ4pg8Wo.js";import"./index.GhHyI8tz.js";/* empty css                                                              */import"./index.BLcfY1pb.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 _(),l(t,{class:"content"},{default:d((()=>[p(t,{class:"cr-position-header"},{default:d((()=>[p(f,{defaultTitle:"一对一引用",backgroundColor:m(j).backgroundColor,color:"#fff"},null,8,["backgroundColor"])])),_:1}),p(t,{class:"examine-content"},{default:d((()=>[p(t,{class:"search"},{default:d((()=>[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};
