11
This commit is contained in:
1 parent
3d0fdff8bd
commit
ac997a5630
4 files changed
+18
-31
No files matched your search
@@ -65,7 +65,7 @@ onShow(() => {
|
||||
if (fromUrl) {
|
||||
uni.setStorageSync("launchParam", fromUrl)
|
||||
}
|
||||
jumpByParam()
|
||||
// jumpByParam()
|
||||
})
|
||||
|
||||
const jumpByParam = async () => {
|
||||
|
||||
@@ -1,22 +1,14 @@
|
||||
<template>
|
||||
<view class="tree-container">
|
||||
<view v-for="item in nodeData" :key="item.id">
|
||||
<view
|
||||
class="tree-item"
|
||||
:style="item.id == selectedNodeId ? { borderColor: '#1879ff' } : { color: '#000' }"
|
||||
@click.stop="toCurrentNode(item)"
|
||||
>
|
||||
<view class="tree-item" :style="item.id == selectedNodeId ? { borderColor: '#1879ff' } : { color: '#000' }"
|
||||
@click.stop="toCurrentNode(item)">
|
||||
<image class="tree-item-icon" :src="filePath(item.picUrl)" />
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
|
||||
<node-tree
|
||||
v-model="selectedNodeId"
|
||||
v-if="item.children && item.children.length"
|
||||
:node-data="item.children"
|
||||
:style="{ marginLeft: `${getLevel() * 60}rpx` }"
|
||||
@currentNode="(v) => emit('currentNode', v)"
|
||||
/>
|
||||
<node-tree v-model="selectedNodeId" v-if="item.children && item.children.length" :node-data="item.children"
|
||||
:style="{ marginLeft: `${getLevel() * 60}rpx` }" @currentNode="(v) => emit('currentNode', v)" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -53,6 +45,7 @@ const getLevel = () => {
|
||||
.tree-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tree-item {
|
||||
border: 4rpx solid #e4e7ed;
|
||||
margin-bottom: 16rpx;
|
||||
@@ -61,6 +54,7 @@ const getLevel = () => {
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.tree-item-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
<template>
|
||||
<view class="date-time-range">
|
||||
<view
|
||||
class="date-range-item"
|
||||
:class="[selectedDateIndex == index ? 'active' : '']"
|
||||
v-for="(item, index) in getLast7DaysWeek()"
|
||||
:key="index"
|
||||
@click="selectDate(item, index)"
|
||||
>
|
||||
<view class="date-range-item" :class="[selectedDateIndex == index ? 'active' : '']"
|
||||
v-for="(item, index) in getLast7DaysWeek()" :key="index" @click="selectDate(item, index)">
|
||||
<view>{{ item.week }}</view>
|
||||
<view>{{ item.date }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="day-time-point-list">
|
||||
<tm-button
|
||||
class="day-time-button"
|
||||
size="m"
|
||||
:color="selectedTimePointIndex == item.index ? '' : 'info'"
|
||||
:disabled="item.disabled"
|
||||
v-for="item in availableTimePoints"
|
||||
:key="item.index"
|
||||
@click="selectTimePoint(item.time, item.index)"
|
||||
>
|
||||
<tm-button class="day-time-button" size="m" :color="selectedTimePointIndex == item.index ? '' : 'info'"
|
||||
:disabled="item.disabled" v-for="item in availableTimePoints" :key="item.index"
|
||||
@click="selectTimePoint(item.time, item.index)">
|
||||
{{ item.time.slice(0, 5) }}
|
||||
</tm-button>
|
||||
</view>
|
||||
@@ -123,6 +112,7 @@ function onConfirm() {
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.date-time-range .date-range-item {
|
||||
padding: 10rpx 16rpx;
|
||||
background-color: #eee;
|
||||
@@ -131,17 +121,20 @@ function onConfirm() {
|
||||
white-space: nowrap;
|
||||
transition: all 0.1s linear;
|
||||
}
|
||||
|
||||
.date-time-range .active {
|
||||
background: #0779fd;
|
||||
border-color: #4988f2;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.day-time-point-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.day-time-button {
|
||||
flex: 1 0 calc(100vw / 4);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user