pref: 优化客户查询单选组的警告

fix: 调整周计划查看页面高度
This commit is contained in:
wangzhuo
2025-08-21 13:02:20 +08:00
parent 64da5061ac
commit 050ee0fd8c
6 changed files with 32 additions and 27 deletions

View File

@@ -33,10 +33,9 @@
<radio-group class="block" @change="radioChange">
<view class="white-bg" v-for="(item, index) in list" :key="index" @click="handleDetail(item)">
<radio class='radio'
:class="index==selectIndex?'checked':''"
:checked="index==selectIndex?true:false"
:value="item"
:data-index="index">
:class="index === selectIndex ? 'checked' : ''"
:checked="index === selectIndex"
:value="index+''">
</radio>
<view class="report-list">
@@ -118,7 +117,6 @@ let timerId = null;
watch(searchValue, (newValue, oldValue) => {
// console.log(`新值: ${newValue}, 旧值: ${oldValue}`);
if(timerId) clearTimeout(timerId);
cssFlag.value = true;
timerId = setTimeout(async ()=>{
handleSearch();
clearTimeout(timerId);
@@ -130,7 +128,6 @@ watch(searchValue, (newValue, oldValue) => {
const downCallback = async (mescroll) => {
try {
const res = await getList(1, upOption.value.page.size);
cssFlag.value = false;
list.value = res.list;
// 正确结束下拉刷新状态
mescroll.endSuccess(res.list.length, res.total >= upOption.value.page.size);
@@ -163,9 +160,11 @@ const upCallback = async (mescroll) => {
let handleSearch = async () => {
// 触发下拉刷新以重新加载数据
if (mescrollRef.value) {
cssFlag.value = true;
uni.showLoading()
await downCallback(mescrollRef.value.mescroll);
uni.hideLoading()
cssFlag.value = false;
}
}
// 获取数据列表
@@ -181,12 +180,10 @@ const getList = async (pageIndex, pageSize) => {
// 选中项的索引号
const selectIndex = ref(null);
const radioChange = (e) => {
let {value} = e.detail;
let {index} = e.target.dataset;
let {value} = e.detail; // index
// console.log(value);
// console.log(e.target.dataset);
const eventChannel = instance.getOpenerEventChannel();
eventChannel.emit('cuSelected', value);
eventChannel.emit('cuSelected', list.value[value]);
uni.navigateBack()
}