diff --git a/components/architectures/resettleSO.vue b/components/architectures/resettleSO.vue
index 74bae50..533e5f6 100644
--- a/components/architectures/resettleSO.vue
+++ b/components/architectures/resettleSO.vue
@@ -1,326 +1,433 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{
+ treeData.nodeCode === '0-root' ? '' : treeData.nodeCode
+ }}
+
+ {{ treeData.memberCode }}
+ {{ treeData.memberName }}
+
+ 空点位
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+.landscape .person {
+ position: relative;
+ transform: rotate(90deg);
+ padding-left: 4.5em;
+ height: 4em;
+ top: 4em;
+ left: -1em;
+}
+
+.landscape .person .avat {
+ position: absolute;
+ left: 0;
+}
+
+.landscape .person .name {
+ height: 4em;
+ line-height: 4em;
+}
+
+.landscape .hasMate {
+ position: relative;
+}
+
+.landscape .hasMate .person {
+ position: absolute;
+}
+
+.landscape .hasMate .person:first-child {
+ left: auto;
+ right: -4em;
+}
+
+.landscape .hasMate .person:last-child {
+ left: -4em;
+ margin-left: 0;
+}
+
diff --git a/config/architecture.js b/config/architecture.js
index 4229ae6..5f69689 100644
--- a/config/architecture.js
+++ b/config/architecture.js
@@ -1,17 +1,25 @@
const http = uni.$u.http
//架构上方会员等级图标
-export const getAvarerInfo = (params) => http.get('/member/api/member-structure/get-avatar-info', {params})
+export const getAvarerInfo = params =>
+ http.get('/member/api/member-structure/get-avatar-info', { params })
//结算期数下拉选
-export const getMemberSettlePeriod = (params) => http.get('/member/api/member-structure/get-member-settle-period', {params})
+export const getMemberSettlePeriod = params =>
+ http.get('/member/api/member-structure/get-member-settle-period', { params })
//安置架构
-export const getAzFramework = (params) => http.get('/member/api/member-structure/az-framework', {params})
+export const getAzFramework = params =>
+ http.get('/member/api/member-structure/three-framework', { params })
+
+// 查询会员子节点
+export const getChildList = params =>
+ http.get('/member/api/member-structure/childList', { params })
//推荐架构
-export const getTjFramework = (params) => http.get('/member/api/member-structure/tj-framework', {params})
+export const getTjFramework = params =>
+ http.get('/member/api/member-structure/tj-framework', { params })
//转换为base64格式用于图片下载
-export const getUrlBase = (data) => http.post('/member/manage/member-structure/get-url-base64', data)
-
+export const getUrlBase = data =>
+ http.post('/member/manage/member-structure/get-url-base64', data)
diff --git a/config/request.js b/config/request.js
index f06b89d..4059da8 100644
--- a/config/request.js
+++ b/config/request.js
@@ -20,7 +20,7 @@ module.exports = vm => {
//#ifdef DEV_SERVER
console.log('DEV_SERVER')
- config.baseURL = 'http://192.168.0.86:8080'
+ config.baseURL = 'https://t-zk.beida666.com/prod-api'
//#endif
//#ifdef QA_SERVER
diff --git a/pages.json b/pages.json
index 19a9074..4020f1f 100644
--- a/pages.json
+++ b/pages.json
@@ -739,7 +739,7 @@
{
"path": "pages/architecture/resettleArchite/resettle1",
"style": {
- "navigationBarTitleText": "安置方案一",
+ "navigationBarTitleText": "方案一",
"enablePullDownRefresh": false
}
},
diff --git a/pages/architecture/architecture.vue b/pages/architecture/architecture.vue
index 8bebf06..ad7aca9 100644
--- a/pages/architecture/architecture.vue
+++ b/pages/architecture/architecture.vue
@@ -1,117 +1,128 @@
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
\ No newline at end of file
+ .kuaiimg {
+ width: 52rpx;
+ height: 53rpx;
+ }
+ }
+}
+
diff --git a/pages/architecture/resettleArchite/resettle1.vue b/pages/architecture/resettleArchite/resettle1.vue
index c8722e8..f9d99a3 100644
--- a/pages/architecture/resettleArchite/resettle1.vue
+++ b/pages/architecture/resettleArchite/resettle1.vue
@@ -1,42 +1,27 @@
- 会员编号
+ 子点位
-
-
-
-
-
-
-
+
+
+ {{ selectedChildNodeName ? selectedChildNodeName : '请选择子点位' }}
+
+
+
筛选
-
-
-
- {{ item.name }}
-
-
-
{{ '返回' }}
- 结算期数
+ 阶段
-
+
- {{ settleName ? settleName : '请选择' }}
+ {{ stageName ? stageName : '请选择' }}
- 代数
+
+ 状态
+
-
+
+
+ {{ statusName ? statusName : '请选择' }}
+
+
+
@@ -98,7 +81,7 @@
class="bottom_btn thebtn2"
@click="
() => {
- getDataList(), (popShow = false)
+ handleSearch(), (popShow = false)
}
"
>{{ '确定' }}
@@ -106,128 +89,32 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 结算国家
-
-
-
-
- 会员编号
- {{ popMould.memberCode }}
-
-
- 会员姓名
- {{ popMould.name }}
-
-
- 支付时间
- {{ popMould.payDate }}
-
-
-
-
- 业绩
- 左区
- 右区
-
-
- 真实新增
- {{ popMould.leftRealNewPv }}
- {{ popMould.rightRealNewPv }}
-
-
- 首购新增
- {{ popMould.leftFirstPurchaseAdd }}
- {{ popMould.rightFirstPurchaseAdd }}
-
-
- 复购新增
- {{ popMould.leftRepeatPurchaseSurplus }}
- {{ popMould.rightRepeatPurchaseSurplus }}
-
-
- 真实累计
- {{ popMould.leftRealTotal }}
- {{ popMould.rightRealTotal }}
-
-
- 首购累计
- {{ popMould.leftFirstTotal }}
- {{ popMould.rightFirstTotal }}
-
-
- 复购累计
- {{ popMould.leftRepeatPurchaseTotal }}
- {{ popMould.rightRepeatPurchaseTotal }}
-
-
- 首购结余
- {{ popMould.leftFirstSurplus }}
- {{ popMould.rightFirstSurplus }}
-
-
- 复购结余
- {{ popMould.leftRepeatPurchaseSurplus }}
- {{ popMould.rightRepeatPurchaseSurplus }}
-
-
-
-
- 下载图片
- 复制文字
-
-
-
+
+
+
{
+ this.getDataList()
+ })
+ },
+
+ mounted() {
+ // 初始化容器变换
+ this.$nextTick(() => {
+ console.log('组件已挂载')
+ })
+ },
+
+ computed: {
+ containerStyle() {
+ return {
+ transform: `translate(${this.containerTransform.x}px, ${this.containerTransform.y}px) scale(${this.size})`,
+ transformOrigin: 'center center',
+ transition:
+ this.isDragging || this.isZooming
+ ? 'none'
+ : 'transform 0.1s ease-out',
+ }
+ },
},
methods: {
+ init() {
+ this.stageName = this.stageList[0][0].label
+ this.statusName = this.statusList[0][0].label
+ this.queryParams.stage = this.stageList[0][0].value
+ this.queryParams.status = this.statusList[0][0].value
+ },
//复制文字
copyText() {
let self = this
@@ -346,75 +288,210 @@ export default {
},
handleTouchStart(event) {
+ console.log('handleTouchStart triggered', event.touches.length)
const touch1 = event.touches[0]
const touch2 = event.touches[1]
+ const currentTime = Date.now()
+
if (touch2) {
+ // 双指触摸 - 缩放模式
+ this.isZooming = true
+ this.isDragging = false
+ this.initialSize = this.size
+
this.touchStartPosition1 = {
- x: touch1.pageX,
- y: touch1.pageY,
+ x: touch1.clientX,
+ y: touch1.clientY,
}
this.touchStartPosition2 = {
- x: touch2.pageX,
- y: touch2.pageY,
+ x: touch2.clientX,
+ y: touch2.clientY,
}
this.initialDistance = Math.hypot(
- touch2.pageX - touch1.pageX,
- touch2.pageY - touch1.pageY
+ touch2.clientX - touch1.clientX,
+ touch2.clientY - touch1.clientY
)
+ } else {
+ // 单指触摸 - 拖动模式
+ this.isZooming = false
+ this.isDragging = true
+ this.dragStartPosition = {
+ x: touch1.clientX,
+ y: touch1.clientY,
+ }
+ this.lastTouchTime = currentTime
}
},
handleTouchMove(event) {
const touch1 = event.touches[0]
const touch2 = event.touches[1]
- if (touch2) {
+
+ if (touch2 && this.isZooming && this.initialDistance > 0) {
+ // 双指缩放处理
const currentDistance = Math.hypot(
- touch2.pageX - touch1.pageX,
- touch2.pageY - touch1.pageY
+ touch2.clientX - touch1.clientX,
+ touch2.clientY - touch1.clientY
)
+
const scale = currentDistance / this.initialDistance
- this.size = this.size * scale
+ let newSize = this.initialSize * scale
+
+ // 应用边界限制
+ newSize = Math.max(this.minSize, Math.min(this.maxSize, newSize))
+
+ // 平滑缩放
+ const sizeDiff = newSize - this.size
+ this.size = this.size + sizeDiff * 0.3
+ } else if (!touch2 && this.isDragging) {
+ // 单指拖动处理
+ const deltaX = touch1.clientX - this.dragStartPosition.x
+ const deltaY = touch1.clientY - this.dragStartPosition.y
+
+ console.log('拖动中', {
+ deltaX,
+ deltaY,
+ touch: { x: touch1.clientX, y: touch1.clientY },
+ dragStart: this.dragStartPosition,
+ containerTransform: this.containerTransform,
+ })
+
+ // 计算拖动速度
+ this.velocity.x = deltaX * 0.1
+ this.velocity.y = deltaY * 0.1
+
+ // 更新容器变换位置(添加阻尼效果)
+ let newX = this.containerTransform.x + deltaX * 0.8
+ let newY = this.containerTransform.y + deltaY * 0.8
+
+ // 应用边界限制(根据缩放调整边界)
+ const scaledMaxX = this.maxTransform.x * this.size
+ const scaledMaxY = this.maxTransform.y * this.size
+
+ newX = Math.max(-scaledMaxX, Math.min(scaledMaxX, newX))
+ newY = Math.max(-scaledMaxY, Math.min(scaledMaxY, newY))
+
+ this.containerTransform.x = newX
+ this.containerTransform.y = newY
+
+ // 更新拖动起始位置
+ this.dragStartPosition.x = touch1.clientX
+ this.dragStartPosition.y = touch1.clientY
+
+ // 应用变换到DOM元素
+ this.updateContainerTransform()
}
},
- handleTouchEnd() {
- this.touchStartPosition1 = {
- x: 0,
- y: 0,
- }
- this.touchStartPosition2 = {
- x: 0,
- y: 0,
+ handleTouchEnd(event) {
+ const currentTime = Date.now()
+ const touchDuration = currentTime - this.lastTouchTime
+
+ // 如果是拖动结束,启动惯性滚动
+ if (
+ this.isDragging &&
+ (Math.abs(this.velocity.x) > 1 || Math.abs(this.velocity.y) > 1)
+ ) {
+ this.startInertiaScroll()
}
+
+ // 重置触摸状态
+ this.isZooming = false
+ this.isDragging = false
+ this.touchStartPosition1 = { x: 0, y: 0 }
+ this.touchStartPosition2 = { x: 0, y: 0 }
this.initialDistance = 0
+ this.initialSize = this.size
+ this.dragStartPosition = { x: 0, y: 0 }
},
- clickNode(e) {
- let self = this
- if (e) {
- arc
- .getUrlBase({
- countryUrl2: e.countryUrl2,
- settleCountryUrl2: e.settleCountryUrl2,
- avatarUrl: e.avatarUrl,
- })
- .then(res => {
- self.popMould = e
- self.popMould.countryUrl2Base64 = res.countryUrl2Base64
- self.popMould.settleCountryUrl2Base64 = res.settleCountryUrl2Base64
- self.popMould.avatarUrlBase64 = res.avatarUrlBase64
- self.isPop = true
- })
+
+ // 惯性滚动
+ startInertiaScroll() {
+ const friction = 0.95 // 摩擦系数
+ const minVelocity = 0.1 // 最小速度阈值
+
+ const animateInertia = () => {
+ // 应用速度到位置
+ let newX = this.containerTransform.x + this.velocity.x
+ let newY = this.containerTransform.y + this.velocity.y
+
+ // 应用边界限制
+ const scaledMaxX = this.maxTransform.x * this.size
+ const scaledMaxY = this.maxTransform.y * this.size
+
+ newX = Math.max(-scaledMaxX, Math.min(scaledMaxX, newX))
+ newY = Math.max(-scaledMaxY, Math.min(scaledMaxY, newY))
+
+ this.containerTransform.x = newX
+ this.containerTransform.y = newY
+
+ // 减少速度
+ this.velocity.x *= friction
+ this.velocity.y *= friction
+
+ // 更新DOM
+ this.updateContainerTransform()
+
+ // 继续动画或停止
+ if (
+ Math.abs(this.velocity.x) > minVelocity ||
+ Math.abs(this.velocity.y) > minVelocity
+ ) {
+ requestAnimationFrame(animateInertia)
+ }
}
+
+ requestAnimationFrame(animateInertia)
},
- confirm(e) {
- this.queryParams.memberSettlePeriodId = e.value[0].pkId
- this.settleName = e.value[0].settleDate
- this.listShow = false
+
+ // 更新容器变换 - 现在使用响应式样式,这个方法可以简化
+ updateContainerTransform() {
+ // 使用响应式计算属性,无需手动更新DOM
+ console.log('容器变换更新', this.containerTransform, this.size)
},
- getAvarerInfo() {
- arc.getAvarerInfo().then(res => {
- this.avaerInfoList = res.data
- })
- arc.getMemberSettlePeriod().then(res => {
- this.memberSettlePeriodList = [res.data]
+ // 重置缩放和位置到默认状态
+ resetZoom() {
+ this.size = 0.4
+ this.initialSize = 0.4
+ this.containerTransform = { x: 0, y: 0 }
+ this.updateContainerTransform()
+ },
+
+ // 双击重置缩放和位置
+ handleDoubleClick() {
+ this.resetZoom()
+ },
+
+ clickNode(e) {
+ return
+ },
+ stagePickerHandleConfirm(e) {
+ this.queryParams.memberSettlePeriodId = e.value[0].value
+ this.stageName = e.value[0].label
+ this.stageListVisible = false
+ },
+ statusPickerHandleConfirm(e) {
+ this.queryParams.status = e.value[0].value
+ this.statusName = e.value[0].label
+ this.statusListVisible = false
+ },
+ childNodePickerHandleConfirm(e) {
+ this.queryParams.memberCode = e.value[0].childNode
+ this.selectedChildNodeName = e.value[0].childNode
+ this.childNodeListVisible = false
+ // 选择子点位后自动获取数据
+ this.getDataList()
+ },
+ getChildList() {
+ return new Promise((resolve, reject) => {
+ arc.getChildList(this.queryParams).then(res => {
+ if (res.code === 200) {
+ this.childNodeList = res.data
+ // 格式化为picker需要的数据格式
+ this.childNodeColumns = [res.data]
+ this.queryParams.childNode = res.data[0].childNode
+ this.selectedChildNodeName = res.data[0].childNode
+ resolve()
+ }
+ })
})
},
getDataList() {
@@ -422,15 +499,20 @@ export default {
this.data = res.data[0]
})
},
+ handleSearch() {
+ this.getChildList().then(() => {
+ this.getDataList()
+ })
+ },
+
clearAll() {
this.popShow = false
- this.settleName = ''
+ this.init()
this.queryParams = {
- memberSettlePeriodId: '', //期数
- memberCode: '', //会员编号
- level: '', //代数
+ stage: this.stageList[0][0].value,
+ status: this.statusList[0][0].value,
}
- this.getDataList()
+ this.handleSearch()
},
},
}
@@ -701,6 +783,22 @@ export default {
flex: 1;
background: #f5f6f8;
margin: 0 20rpx;
+
+ .inputbox {
+ font-size: 26rpx;
+ width: 100%;
+ padding: 15rpx 20rpx;
+ border-radius: 34rpx;
+ background-color: #f5f6f8;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ color: #333333;
+
+ &:active {
+ background-color: #e8e9eb;
+ }
+ }
}
.neibox {
@@ -721,40 +819,11 @@ export default {
.mainbox {
padding: 26rpx 22rpx;
-
- .main_top {
- background: #ffffff;
- border-radius: 20rpx;
- padding: 20rpx 4rpx;
- display: flex;
- flex-wrap: wrap;
-
- .top_flex {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin: 15rpx 20rpx;
- // justify-content: center;
- width: 98rpx;
-
- .theimg {
- width: 92rpx;
- height: 92rpx;
- border-radius: 50%;
- }
-
- .flex2 {
- font-size: 26rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #666666;
- }
- }
- }
+ height: 100%;
.main_bottom {
width: 100%;
- height: calc(100vh - 600rpx);
+ height: 100%;
margin-top: 25rpx;
background-color: #ffffff;
padding: 38rpx 0;
@@ -764,11 +833,13 @@ export default {
.scoll_main {
width: 700rpx;
- height: calc(100vh - 600rpx);
- overflow: auto;
- // overflow: scroll;
- // overflow-x: auto;
+ transform-origin: center center; // 设置变换原点为中心
+ cursor: grab; // 显示可拖动光标
+
+ &:active {
+ cursor: grabbing; // 拖动时的光标
+ }
}
}
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index f3000ca..cc8f41c 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -88,49 +88,6 @@
-
-
-
- 收益区域
-
-
-
-
- {{ '省' }}
- {{
- regionInfo.provinceVal || '-'
- }}
-
-
- {{ '市' }}
- {{
- regionInfo.cityVal || '-'
- }}
-
-
- {{ '区' }}
- {{
- regionInfo.countyVal || '-'
- }}
-
-
-
-
-
-
-
-
-
-
@@ -144,47 +101,9 @@
{{ item.name }}
-
-
-
-
-
-
-
-
-
-
@@ -286,13 +199,6 @@ export default {
menuKey: 'selfHelp',
ifshow: true,
},
- // {
- // url: '/pages/mine/share/index',
- // name: '个人推广',
- // imgurl: '../../static/images/list.svg',
- // menuKey: 'share',
- // ifshow: false,
- // },
{
url: '/pages/userSecure/index',
name: '账号安全',
@@ -321,13 +227,13 @@ export default {
menuKey: 'bankInfo',
ifshow: true,
},
- // {
- // url: '/pages/mine/addNewPv/index',
- // name: '新增业绩',
- // imgurl: '../../static/images/mark9.png',
- // menuKey: 'iNewAchievement',
- // ifshow: false,
- // },
+ {
+ url: '/pages/architecture/architecture',
+ name: '架构管理',
+ imgurl: '../../static/images/my_icon14.png',
+ menuKey: 'recommend',
+ ifshow: false,
+ },
],
drShow: false,
actMenu: false,