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

@@ -298,7 +298,7 @@ let handleCopyInfo=(item)=>{
}
</script>
<style scoped>
<style lang="scss" scoped>
.all-body {
/* #ifdef APP-PLUS */
top: 150rpx;
@@ -343,7 +343,10 @@ let handleCopyInfo=(item)=>{
}
}
.btn-edit{
white-space: nowrap;
.white-bg:hover{
//background-color: #f1f1f1;
background-color: #f1f1f1; /* Chrome, Safari, Opera */
box-shadow: 0px 0px 5rpx white;
//filter: rgba(237, 242, 250, 0.5);
}
</style>

View File

@@ -179,7 +179,7 @@
<!-- 索引hobbyIndex 范围hobbyList 响应handleHobbyChange-->
<uni-easyinput v-model="formData.hobby" placeholder="请输入爱好"/>
<multipleSelect :multiple="true" :value="hobbyIndex" downInner :options="hobbyList"
@change="handleHobbyChange" :key="Math.round()" :slabel="'name'"
@change="handleHobbyChange" :slabel="'name'"
></multipleSelect><!--placeholder="请选择爱好标签"-->
</uni-forms-item>
@@ -435,6 +435,7 @@ let handleFunctionChange = (e) => {
console.log(e.detail.value, '职能索引');
const {name} = functionalRequirementList[e.detail.value];
formData.value.functionalRequirements = name;
formData.value.function = name;
getRecommendLevel();
}

View File

@@ -16,13 +16,13 @@
<!-- 正文内容 -->
<view class="all-body">
<!-- 搜索-->
<!-- <view class="search">-->
<view class="search">
<!-- <uni-search-bar class="custom-search" radius="28" placeholder="请输入客户人员名称" clearButton="auto"-->
<!-- cancelButton="none" bgColor="#6FA2F8" textColor="#ffffff"-->
<!-- v-model="searchValue"-->
<!-- />-->
<!-- &lt;!&ndash; <button type="default" @click="clearSearchValue" size="mini" class="btn-search">清空</button>&ndash;&gt;-->
<!-- </view>-->
<view class="custom-search"></view>
</view>
<!-- 分页部分 -->
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
@@ -90,16 +90,9 @@ let timerId = null;
let handleSearch = () => {
// 防抖搜索 console.log(searchValue.value)
if (timerId) clearTimeout(timerId);
uni.showLoading()
timerId = setTimeout(async () => {
cssFlag.value = true;
// let res = await getList(1, upOption.value.page.size)
await downCallback(mescrollRef.value.mescroll);
cssFlag.value = false;
uni.hideLoading();
clearTimeout(timerId);
timerId = null;
}, 500)
@@ -138,6 +131,8 @@ const mescrollInit = (mescroll) => {
// 下拉刷新
const downCallback = async (mescroll) => {
try {
uni.showLoading();
cssFlag.value = true;
setTimeout(async () => {
// 重置页码为第一页
const res = await getList(1, mescroll.size || upOption.page.size);
@@ -145,6 +140,8 @@ const downCallback = async (mescroll) => {
list.value = res.list;
// 正确传递 total 参数
mescroll.endSuccess(res.list.length, res.total > (mescroll.size || upOption.page.size));
uni.hideLoading();
cssFlag.value = false;
}, 500);
} catch (error) {
console.log(error)
@@ -162,6 +159,7 @@ const upCallback = async (mescroll) => {
} else {
list.value.push(...res.list);
}
mescroll.endBySize(res.list.length, res.total);
// 正确判断是否还有更多数据
mescroll.endSuccess(res.list.length, res.total > mescroll.num * mescroll.size);
}, 500);
@@ -218,7 +216,6 @@ let handleDetail = (item) => {
/* #endif */
}
.scroll-h {
/* #ifdef APP-PLUS */
height: calc(100vh - 120px);

View File

@@ -32,8 +32,8 @@
<view class="white-bg margin-bottom20" v-for="(item, index) in list" :key="index"
@click.stop="handleDetail(item)">
<view class="report-list">
<view class="w-b-title title" @touchstart.prevent="handleTouchStart(item)"
@touchend.prevent="handleTouchEnd">
<view class="w-b-title title" @touchstart="handleTouchStart(item)"
@touchend="handleTouchEnd">
{{ item.cusName }}
<view v-if="item.nodeCode" class="r-right btn-edit" :class="statusColorMap[item.nodeCode]">
{{ item.nodeCode }}

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()
}

View File

@@ -366,6 +366,13 @@ let handleDetail = (rowIndex, colIndex) => {
width: 690rpx;
margin: 20rpx 0 0 0;
border-radius: 8px 8px 0 0;
/* #ifdef APP-PLUS */
min-height: calc(100vh - 160rpx/*.topbar height*/ - 68rpx/*.search height*/ - 40rpx/*.white-bg padding-top*/ - 40rpx/*.white-bg padding-bottom*/);
/* #endif */
/* #ifndef APP-PLUS */
min-height: calc(100vh - 116rpx/*.topbar height*/ - 68rpx/*.search height*/ - 40rpx/*.white-bg padding-top*/ - 40rpx/*.white-bg padding-bottom*/);
/* #endif */
//overflow-y: auto;
}
.white-bg.white-bg-2 {