Commit e01037b1 by liimin

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

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