Commit e01037b1 by liimin

refactor: 移除未使用的代码并优化组件功能

移除上传器中的endTime计算逻辑,与后端协商后由后端处理
简化接待中心列表的过滤条件和显示项
优化zoom-pan组件的触摸交互,使用原生惯性滚动
调整权益详情页的滑动动画参数和防误触阈值
添加HomeFrame组件的备份文件
1 parent bd151853
......@@ -2,13 +2,9 @@
<view>
<movable-area
class="container zoom-pan-container"
@touchstart="handleTouchStart"
@touchmove="handleTouchMove"
@touchEnd="handleTouchEnd"
>
<movable-view
class="content"
:style="{'transform-origin': transformOriginStyle}"
:scale="!disabled"
:direction="scale == 1?'none':'all'"
:scale-min="scaleMin"
......@@ -16,6 +12,9 @@
:disabled="disabled"
@scale="onScale"
:scale-value="defalutscale"
:inertia="true"
:damping="30"
:friction="2"
>
<slot name="content"></slot>
</movable-view>
......@@ -25,8 +24,6 @@
</template>
<script>
import utils from "@/utils/utils.js";
export default {
props: {
disabled: Boolean,
......@@ -42,9 +39,7 @@ export default {
data () {
return {
scale: 1,
defalutscale: 1,
isScaling: false,
transformOriginStyle: '50% 50%'
defalutscale: 1
};
},
watch: {
......@@ -53,7 +48,6 @@ export default {
handler (newval) {
if (this.scale != 1) this.defalutscale = 1.1
this.scale = 1
this.transformOriginStyle = `50% 50%'`
setTimeout(() => {
this.defalutscale = 1
}, 100)
......@@ -66,30 +60,10 @@ export default {
}
},
methods: {
handleTouchStart (e) {
if (this.disabled) return
if (e.touches.length === 2) this.isScaling = true;
},
handleTouchMove: utils.throttle(function (e) {
if (this.disabled) return
if (this.isScaling && e.touches.length === 2) {
const center = this.getTouchCenter(e.touches)
this.transformOriginStyle = `${center.x}px ${center.y}px`;
}
}, 16),
handleTouchEnd () {
this.isScaling = false
},
onScale (e) {
this.scale = e.detail.scale
this.$emit('scale', e.detail)
},
getTouchCenter (touches) {
const centerX = (touches[0].pageX + touches[1].pageX) / 2;
const centerY = (touches[0].pageY + touches[1].pageY) / 2;
return { x: centerX, y: centerY };
},
}
},
};
</script>
......
......@@ -13,10 +13,10 @@
<view class="filter-group">
<button-group :selectList="orderTypeList" @chooseType="searchReceptionList($event, 'orderFinishFlag')" />
</view>
<view class="divider"></view>
<!-- <view class="divider"></view>
<view class="filter-group">
<button-group :selectList="receptionTypeList" @chooseType="searchReceptionList($event, 'reviewFlag')" />
</view>
</view> -->
</template>
</view>
<template v-if="tabIndex == 1">
......@@ -40,9 +40,9 @@
<view v-for="item in i" class="item" :key="item.id" @click="jumpDetail(item)">
<view class="top-right-box flex">
<template v-if="tabIndex == 0">
<view :class="['status flex', `${item.reviewFlag == 0 ? 'deal' : 'disabled'}`]">
<!-- <view :class="['status flex', `${item.reviewFlag == 0 ? 'deal' : 'disabled'}`]">
{{ item.reviewFlag == 0 ? '已复盘' : '未复盘' }}
</view>
</view> -->
<view :class="['status flex', { deal: item.orderFinishFlag }]">
{{ item.orderFinishFlag ? '成交' : '战败' }}
</view>
......@@ -125,7 +125,7 @@ export default {
{ label: '待提交' },
]),
itemObject: Object.freeze([
{ label: '接待结果', key: 'result' },
// { label: '接待结果', key: 'result' },
{ label: '客户类型', key: 'customerType' },
{ label: '客户电话', key: 'customerPhone' },
{ label: '接待时长', key: 'duration' },
......
......@@ -456,9 +456,9 @@ export default {
// 2. 准备提交参数
const params = { ...record, urlList: serverPaths }
if (!params.endTime) {
params.endTime = await this._requestendTime(serverPaths, params.startTime)
}
// if (!params.endTime) { // 与后端商量 如果没有就不传 后端算完插入到记录中 2025-12-29
// params.endTime = await this._requestendTime(serverPaths, params.startTime)
// }
// 3. 提交到服务器
uni.$logger.local.info(`【上传管理Uploader】 == 开始向服务器保存接待记录!!参数: ${JSON.stringify(params)}`)
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: limin
* @LastEditTime: 2025-12-26 19:43:55
* @LastEditTime: 2025-12-29 08:46:10
-->
<template>
<view class="detail-box" :key="dateilKey">
......@@ -123,7 +123,17 @@ export default {
moduleList: [],
useCarConfig: false,
dateilKey: Date.now(),
currentMediaId: ''
currentMediaId: '',
isAnimating: false,
lastId: null,
animDirection: '',
pendingDirection: '',
// 滑动与动画配置
swipeConfig: {
sensitivity: 12, // 灵敏度系数 (屏幕宽度 / N),值越大越灵敏
verticalLimit: 150, // 垂直防误触阈值 (px)
animDuration: 800 // 动画时长 (ms)
}
}
},
computed: {
......@@ -409,10 +419,10 @@ export default {
let touch = e.changedTouches[0]
let diffX = touch.pageX - startX
let isDistanceSignificant = Math.abs(diffX) > screenWidth / 6
let isDistanceSignificant = Math.abs(diffX) > screenWidth / this.swipeConfig.sensitivity
let index = pageToolList.findIndex(item => item.id == id)
if (Math.abs(this.startY - touch.pageY) > 150) return
if (Math.abs(this.startY - touch.pageY) > this.swipeConfig.verticalLimit) return
if (!scaleValueObject[id]) scaleValueObject[id] = 1
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
......@@ -559,25 +569,25 @@ export default {
.slide-in-right {
visibility: visible;
z-index: 2;
animation: slideInRight 0.6s cubic-bezier(0.25, 1, 0.25, 1.1) forwards;
animation: slideInRight 0.8s cubic-bezier(0.1, 0.9, 0.2, 1.05) forwards;
}
.slide-in-left {
visibility: visible;
z-index: 2;
animation: slideInLeft 0.6s cubic-bezier(0.25, 1, 0.25, 1.1) forwards;
animation: slideInLeft 0.8s cubic-bezier(0.1, 0.9, 0.2, 1.05) forwards;
}
.slide-out-left {
visibility: visible;
z-index: 1;
animation: slideOutLeft 0.6s cubic-bezier(0.25, 1, 0.25, 1.1) forwards;
animation: slideOutLeft 0.8s cubic-bezier(0.1, 0.9, 0.2, 1.05) forwards;
}
.slide-out-right {
visibility: visible;
z-index: 1;
animation: slideOutRight 0.6s cubic-bezier(0.25, 1, 0.25, 1.1) forwards;
animation: slideOutRight 0.8s cubic-bezier(0.1, 0.9, 0.2, 1.05) forwards;
}
@keyframes slideInRight {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!