Browse Source

盘点计划卡顿的问题

master_hella_20240701
yufei0306 8 months ago
parent
commit
910b136f03
  1. 24
      src/components/TableFormCountPlan/src/TableFormCountPlan.vue

24
src/components/TableFormCountPlan/src/TableFormCountPlan.vue

@ -54,6 +54,9 @@
tableFields[1].placeholder ||
'请输入' + tableFields[1].label
"
filterable
:filter-method="(value) =>filterMethod(value,row)"
@focus="focusValue(row)"
v-if="
row.type == 'OWNER' ||
row.type == 'SUPPLIER' ||
@ -69,7 +72,7 @@
"
>
<el-option
v-for="item in currentList(row.initOptions)"
v-for="item in currentList(initOptions_result)"
:key="'值option'+item.value"
:label="item.label"
:value="item.value"
@ -77,7 +80,7 @@
<div style="display: flex;align-items: center">
<span style="padding: 10px;">{{ pageCount }} </span>
<el-button text bg size="small" :disabled="pageCount<=1" @click="prexPage">上一页</el-button>
<el-button text bg size="small" :disabled="row.initOptions&&pageCount*15>=row.initOptions.length" @click="nextPage">下一页</el-button>
<el-button text bg size="small" :disabled="initOptions_result&&pageCount*15>=initOptions_result.length" @click="nextPage">下一页</el-button>
</div>
</el-select>
<el-input :key="'值input'+$index"
@ -189,6 +192,23 @@ const nextPage = ()=>{
const prexPage = ()=>{
pageCount.value--
}
const initOptions_result = ref([])
const filterMethod = (query,row)=>{
console.log('filterMethod')
if (query) {
initOptions_result.value = row.initOptions.filter((item) => {
return item.label.includes(query)
})
} else {
initOptions_result.value = [...row.initOptions]
}
}
const focusValue = (row)=>{
console.log('focusValue',row)
if(!row.value){
initOptions_result.value = [...row.initOptions]
}
}
// setup
defineExpose({
TableBaseComponents_Ref,

Loading…
Cancel
Save