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-WeUkftbp.js";import{_ as c}from"./uni-easyinput.D5FSIQIk.js";import{k as h,l as y}from"./crud.C7RXrZ5j.js";import{d as f}from"./index.BcUDVLb2.js";import{i as b}from"./item.CcBClFFp.js";import{_ as g}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./uni-icons.B3nCnuXe.js";/* empty css                                                                  *//* empty css                                                                      */import"./uni-nav-bar.cBITQXNK.js";/* empty css                                                                    *//* empty css                                                              */import"./uni-row.DLutFlIQ.js";import"./uni-dateformat.CAFQ6hZt.js";import"./index.D8Jasx-l.js";/* empty css                                                              */import"./index.C5LIx7aw.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};
