2025.4.28
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 71 KiB |
|
@ -0,0 +1,129 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<scroll-view id="scrollContainer" ref="scrollViewRef" class="scroll-view" scroll-y :scroll-top="scrollTop"
|
||||
@scroll="onScroll">
|
||||
<view v-for="(item, index) in items" :key="index" class="item" :class="{ active: index === activeIndex }"
|
||||
:style="{ marginLeft: marginList[index] + 'rpx' }">
|
||||
{{ item }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
nextTick,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance();
|
||||
const scrollViewRef = ref(null);
|
||||
// 原始列表数据及状态
|
||||
const originalItems = Array.from({
|
||||
length: 20
|
||||
}, (_, i) => `列表项 ${i+1}`);
|
||||
const items = ref([]);
|
||||
const marginList = ref([]);
|
||||
const activeIndex = ref(0);
|
||||
const scrollTop = ref(0);
|
||||
let offsetCount = 0;
|
||||
|
||||
// 计算各项 margin 并更新高亮
|
||||
function updateMargins(scrollY) {
|
||||
const query = uni.createSelectorQuery().in(proxy);
|
||||
query.select('#scrollContainer').boundingClientRect();
|
||||
query.selectAll('.item').boundingClientRect();
|
||||
query.exec(res => {
|
||||
const [scrollRect, itemRects] = res;
|
||||
if (!scrollRect || !itemRects) return;
|
||||
|
||||
const centerY = scrollRect.height / 2;
|
||||
const maxMargin = 300; // ← 从 60 调到 120,偏移加倍
|
||||
const maxDist = centerY;
|
||||
|
||||
itemRects.forEach((r, i) => {
|
||||
const itemCenter = r.top - scrollRect.top + r.height / 2;
|
||||
const dist = Math.abs(itemCenter - centerY);
|
||||
const t = Math.min(dist / maxDist, 1);
|
||||
const eased = 1 - Math.cos(t * Math.PI / 2);
|
||||
const m = eased * maxMargin;
|
||||
|
||||
marginList.value[i] = Math.round(m);
|
||||
});
|
||||
|
||||
// 剩下高亮逻辑不变
|
||||
const slice = marginList.value.slice(offsetCount, offsetCount + originalItems.length);
|
||||
const minM = Math.min(...slice);
|
||||
activeIndex.value = slice.indexOf(minM) + offsetCount;
|
||||
});
|
||||
}
|
||||
// 滚动时触发
|
||||
const scrollTimeout = ref(null);
|
||||
|
||||
const onScroll = (e) => {
|
||||
nextTick(() => updateMargins(e.detail.scrollTop));
|
||||
|
||||
// 检测停止滚动
|
||||
if (scrollTimeout.value) clearTimeout(scrollTimeout.value);
|
||||
scrollTimeout.value = setTimeout(() => {
|
||||
// 滚动停止后的处理逻辑
|
||||
console.log('滚动已停止');
|
||||
console.log("??????????????", activeIndex.value - 8)
|
||||
// 你可以在这里触发居中对齐、播放动画等
|
||||
}, 100); // 100ms 内未触发 scroll,判定为停止
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
// 初始先用原始列表测量高度
|
||||
items.value = originalItems;
|
||||
marginList.value = Array(items.value.length).fill(0);
|
||||
await nextTick();
|
||||
const query = uni.createSelectorQuery().in(proxy);
|
||||
query.select('#scrollContainer').boundingClientRect();
|
||||
query.selectAll('.item').boundingClientRect();
|
||||
query.exec(res => {
|
||||
const [scrollRect, itemRects] = res;
|
||||
if (!scrollRect || !itemRects || !itemRects.length) return;
|
||||
const itemH = itemRects[0].height;
|
||||
offsetCount = Math.ceil((scrollRect.height / 2) / itemH) + 3;
|
||||
// 重构带占位的列表
|
||||
items.value = [
|
||||
...Array(offsetCount).fill(''),
|
||||
...originalItems,
|
||||
...Array(offsetCount).fill(''),
|
||||
];
|
||||
marginList.value = Array(items.value.length).fill(0);
|
||||
// 设置初始滚动位置
|
||||
scrollTop.value = offsetCount * itemH;
|
||||
nextTick(() => updateMargins(scrollTop.value));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
height: 800rpx;
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 100rpx;
|
||||
overflow: hidden;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.scroll-view {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 10px;
|
||||
/* transition: color 0.2s; */
|
||||
}
|
||||
|
||||
.active {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,131 @@
|
|||
<template>
|
||||
<view id="arc-wrapper" @touchstart="onStart" @touchmove.prevent="onMove" @touchend="onEnd">
|
||||
<!-- 父容器旋转 -->
|
||||
<view id="arc" :style="{ transform: `rotate(${rotation}deg)` }">
|
||||
<view v-for="(item, idx) in items" :key="idx" class="arc-item" :style="getItemStyle(idx)">
|
||||
<!-- 文字反向旋转,保持水平 -->
|
||||
<view class="item-content" :style="{
|
||||
transform: `rotate(${-rotation}deg)`,
|
||||
transformOrigin: 'center center'
|
||||
}">
|
||||
<text>{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
|
||||
const items = ['A', 'B', 'C', 'D', 'E'];
|
||||
const radius = 100;
|
||||
const rotation = ref(0);
|
||||
const startAngle = ref(0);
|
||||
const centerLocal = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
const centerScreen = {
|
||||
x: 0,
|
||||
y: 0
|
||||
};
|
||||
|
||||
const instance = getCurrentInstance();
|
||||
|
||||
// 获取半圆容器在屏幕中的中心坐标
|
||||
onMounted(() => {
|
||||
uni.createSelectorQuery()
|
||||
.in(instance)
|
||||
.select('#arc')
|
||||
.boundingClientRect(rect => {
|
||||
centerLocal.x = rect.width / 2;
|
||||
centerLocal.y = rect.height;
|
||||
centerScreen.x = rect.left + centerLocal.x;
|
||||
centerScreen.y = rect.top + centerLocal.y;
|
||||
})
|
||||
.exec();
|
||||
});
|
||||
|
||||
// 计算触摸点相对于屏幕圆心的角度
|
||||
function calcAngle(x, y) {
|
||||
const dx = x - centerScreen.x;
|
||||
const dy = y - centerScreen.y;
|
||||
return Math.atan2(dy, dx) * 180 / Math.PI; // rotate() 基于度数 :contentReference[oaicite:6]{index=6}
|
||||
}
|
||||
|
||||
function onStart(e) {
|
||||
const {
|
||||
clientX,
|
||||
clientY
|
||||
} = e.touches[0];
|
||||
startAngle.value = calcAngle(clientX, clientY);
|
||||
}
|
||||
|
||||
function onMove(e) {
|
||||
const {
|
||||
clientX,
|
||||
clientY
|
||||
} = e.touches[0];
|
||||
const current = calcAngle(clientX, clientY);
|
||||
rotation.value += current - startAngle.value;
|
||||
startAngle.value = current;
|
||||
}
|
||||
|
||||
function onEnd() {
|
||||
// 可加惯性或回正逻辑
|
||||
}
|
||||
|
||||
// 计算每个子项在半圆上的定位
|
||||
function getItemStyle(idx) {
|
||||
const per = 180 / (items.length + 1);
|
||||
const baseAngle = -90 + per * (idx + 1);
|
||||
const rad = baseAngle * Math.PI / 180;
|
||||
const x = centerLocal.x + radius * Math.cos(rad);
|
||||
const y = centerLocal.y + radius * Math.sin(rad);
|
||||
return {
|
||||
position: 'absolute',
|
||||
left: `${x}px`,
|
||||
top: `${y}px`,
|
||||
transform: 'translate(-50%,-50%)'
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
#arc-wrapper {
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 100rpx;
|
||||
overflow: hidden;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#arc {
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transform-origin: center bottom;
|
||||
/* 半圆底部中心为旋转中心 :contentReference[oaicite:7]{index=7} */
|
||||
}
|
||||
|
||||
.arc-item {
|
||||
/* 可自定义尺寸 */
|
||||
}
|
||||
|
||||
.item-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
/* 确保 transform-origin 在自身中心 */
|
||||
transform-box: fill-box;
|
||||
/* 在某些渲染环境需指定 reference box :contentReference[oaicite:8]{index=8} */
|
||||
transform-origin: center center;
|
||||
}
|
||||
</style>
|
|
@ -1,92 +1,149 @@
|
|||
<template>
|
||||
|
||||
<view class="move-circle">
|
||||
<image v-show="key === 0" src="/static/index/keyimg/where10.png" class="container-img-up" />
|
||||
<image v-show="key === 2" src="/static/index/keyimg/where10.png" class="container-img-down" />
|
||||
<image v-show="key === 3" src="/static/index/keyimg/where10.png" class="container-img-left" />
|
||||
<image v-show="key === 1" src="/static/index/keyimg/where10.png" class="container-img-right" />
|
||||
<!-- 上 -->
|
||||
<view class="up-container" @click="handleClick('up', 0)">
|
||||
<view class="up-container" @click="handleClick(0)">
|
||||
<image :src="icons.up" class="container-img" />
|
||||
</view>
|
||||
<!-- 右 -->
|
||||
<view class="right-container" @click="handleClick('right', 1)">
|
||||
<image :src="icons.right" class="container-img" />
|
||||
<view class="right-container" @click="handleClick(1)">
|
||||
<image :src="icons.right" class="container-img-shu" />
|
||||
</view>
|
||||
<!-- 下 -->
|
||||
<view class="down-container" @click="handleClick('down', 2)">
|
||||
<view class="down-container" @click="handleClick(2)">
|
||||
<image :src="icons.down" class="container-img" />
|
||||
</view>
|
||||
<!-- 左 -->
|
||||
<view class="left-container" @click="handleClick('left', 3)">
|
||||
<image :src="icons.left" class="container-img" />
|
||||
<view class="left-container" @click="handleClick(3)">
|
||||
<image :src="icons.left" class="container-img-shu" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue'
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue'
|
||||
const emit = defineEmits(['movecard'])
|
||||
|
||||
const icons = reactive({
|
||||
up: '/static/index/movemode/bupicon.png',
|
||||
right: '/static/index/movemode/brighticon.png',
|
||||
down: '/static/index/movemode/bdownicon.png',
|
||||
left: '/static/index/movemode/blefticon.png'
|
||||
up: '/static/index/keyimg/up1.png',
|
||||
right: '/static/index/keyimg/where2.png',
|
||||
down: '/static/index/keyimg/down1.png',
|
||||
left: '/static/index/keyimg/where1.png'
|
||||
})
|
||||
const key = ref(-1)
|
||||
|
||||
function handleClick(key, dir) {
|
||||
// icons[key] = `/static/index/movemode/blue${key}icon.png`
|
||||
// 保存当前定时器 ID
|
||||
let resetTimer = null
|
||||
|
||||
function handleClick(dir: number) {
|
||||
// 清除上一次定时器
|
||||
if (resetTimer !== null) {
|
||||
clearTimeout(resetTimer)
|
||||
}
|
||||
|
||||
// 显示当前方向
|
||||
key.value = dir
|
||||
emit('movecard', dir)
|
||||
|
||||
// 延迟一点时间再恢复图标(视觉反馈)
|
||||
// setTimeout(() => {
|
||||
// icons[key] = `/static/index/movemode/${key}icon.png`
|
||||
// }, 150)
|
||||
// 重新开启 800ms 定时器
|
||||
resetTimer = setTimeout(() => {
|
||||
key.value = -1
|
||||
resetTimer = null
|
||||
}, 500)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style lang="less" scoped>
|
||||
.move-circle {
|
||||
.move-circle {
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
left: 0;
|
||||
width: 350rpx;
|
||||
height: 350rpx;
|
||||
// border-radius: 50%;
|
||||
background-image: url('/static/index/movemode/bj.png');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
// background-color: rgba(127, 127, 127, 0.3);
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(circle at center,
|
||||
/* 圆形渐变,中心点在元素正中 */
|
||||
rgba(110, 149, 217, 0.2) 0%,
|
||||
/* 中心处纯色 */
|
||||
rgba(149, 177, 227, 0.2) 100%
|
||||
/* 边缘颜色 */
|
||||
);
|
||||
border: 5rpx rgba(148, 181, 229, 0.5) solid;
|
||||
// opacity: 0.1;
|
||||
z-index: 9999;
|
||||
}
|
||||
.container-img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.up-container {
|
||||
}
|
||||
|
||||
.container-img-up {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 115rpx;
|
||||
width: 120rpx;
|
||||
top: -48rpx;
|
||||
left: 50rpx;
|
||||
width: 220rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.down-container {
|
||||
}
|
||||
|
||||
.container-img-down {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 115rpx;
|
||||
width: 120rpx;
|
||||
bottom: -48rpx;
|
||||
left: 50rpx;
|
||||
transform: rotate(180deg);
|
||||
width: 220rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.right-container {
|
||||
}
|
||||
|
||||
.container-img-left {
|
||||
position: absolute;
|
||||
top: 115rpx;
|
||||
right: 5rpx;
|
||||
width: 120rpx;
|
||||
left: -97rpx;
|
||||
top: 95rpx;
|
||||
transform: rotate(270deg);
|
||||
width: 220rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.left-container {
|
||||
}
|
||||
|
||||
.container-img-right {
|
||||
position: absolute;
|
||||
top: 115rpx;
|
||||
left: 0rpx;
|
||||
width: 120rpx;
|
||||
right: -97rpx;
|
||||
transform: rotate(90deg);
|
||||
top: 95rpx;
|
||||
width: 220rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.container-img {
|
||||
width: 170rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.container-img-shu {
|
||||
width: 70rpx;
|
||||
height: 170rpx;
|
||||
}
|
||||
|
||||
.up-container {
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: 75rpx;
|
||||
}
|
||||
|
||||
.down-container {
|
||||
position: absolute;
|
||||
bottom: 30rpx;
|
||||
left: 75rpx;
|
||||
}
|
||||
|
||||
.right-container {
|
||||
position: absolute;
|
||||
top: 75rpx;
|
||||
right: 30rpx;
|
||||
}
|
||||
|
||||
.left-container {
|
||||
position: absolute;
|
||||
top: 75rpx;
|
||||
left: 30rpx;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,90 @@
|
|||
<template>
|
||||
<view class="move-circle">
|
||||
<image src="/static/index/keyimg/lunpan.png" class="move-circle-all" />
|
||||
<view class="click-box-top" @click="handleClick(0)">
|
||||
</view>
|
||||
<view class="click-box-left" @click="handleClick(3)">
|
||||
</view>
|
||||
<view class="click-box-bottom" @click="handleClick(2)">
|
||||
</view>
|
||||
<view class="click-box-right" @click="handleClick(1)">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue'
|
||||
const emit = defineEmits(['movecard'])
|
||||
|
||||
const key = ref(-1)
|
||||
|
||||
// 保存当前定时器 ID
|
||||
let resetTimer = null
|
||||
|
||||
function handleClick(dir: number) {
|
||||
// 清除上一次定时器
|
||||
if (resetTimer !== null) {
|
||||
clearTimeout(resetTimer)
|
||||
}
|
||||
|
||||
// 显示当前方向
|
||||
key.value = dir
|
||||
emit('movecard', dir)
|
||||
|
||||
// 重新开启 800ms 定时器
|
||||
resetTimer = setTimeout(() => {
|
||||
key.value = -1
|
||||
resetTimer = null
|
||||
}, 500)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style lang="less" scoped>
|
||||
.move-circle {
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
left: 100rpx;
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
.click-box-top{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 100rpx;
|
||||
width: 130rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.click-box-bottom{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 100rpx;
|
||||
width: 130rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.click-box-left{
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
left: 0;
|
||||
width: 98rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
.click-box-right{
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
right: 0;
|
||||
width: 98rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
}
|
||||
.move-circle-all{
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -1,16 +1,22 @@
|
|||
<template>
|
||||
<view class="all-circle">
|
||||
<view class="move-circle" v-show="!gray" @click="confirm">
|
||||
<view class="circle-rightup">
|
||||
<view @click="clickCircle(`rightup`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/white.png`: `/static/index/keyimg/white.png`" />
|
||||
<view class="circle-font">
|
||||
确认
|
||||
</view>
|
||||
<view class="move-circle-bad" v-show="gray">
|
||||
确认
|
||||
</view>
|
||||
<view v-show="clickstauts" class="delete-circle" @click="back">
|
||||
</view>
|
||||
<view class="circle-leftbottom">
|
||||
<view @click="clickCircle(`leftbottom`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/back.png`" />
|
||||
<view class="circle-font">
|
||||
返回
|
||||
</view>
|
||||
<view v-show="!clickstauts" class="delete-circle-bad" @click="back">
|
||||
关闭
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -20,93 +26,106 @@
|
|||
ref
|
||||
} from 'vue'
|
||||
const emit = defineEmits(['clickcircle']);
|
||||
const props = defineProps({
|
||||
clickstauts: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
gray:{
|
||||
type: Boolean,
|
||||
required: true,
|
||||
}
|
||||
});
|
||||
const confirm = () =>{
|
||||
const upmenuIndex = ref(-1)
|
||||
|
||||
const isClick = ref(true);
|
||||
const clickCircle = (type : string) => {
|
||||
if (isClick.value) {
|
||||
switch (type) {
|
||||
case "rightup":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('clickcircle',0)
|
||||
}
|
||||
const back = () =>{
|
||||
}, 0)
|
||||
break;
|
||||
case "leftbottom":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('clickcircle',1)
|
||||
}, 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.all-circle{
|
||||
.all-circle {
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 50rpx;
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
}
|
||||
.move-circle{
|
||||
position: absolute;
|
||||
bottom: 200rpx;
|
||||
right: 40rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
right: 80rpx;
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(to right, #00c9ff, #0076ff);
|
||||
// opacity:0.5;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
.move-circle-bad{
|
||||
|
||||
.circle-rightup {
|
||||
position: absolute;
|
||||
bottom: 200rpx;
|
||||
right: 40rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
right: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #c2c9d3;
|
||||
// opacity:0.5;
|
||||
z-index: 9999;
|
||||
border: 4rpx solid rgb(197, 220, 255);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.delete-circle{
|
||||
|
||||
.circle-leftbottom {
|
||||
position: absolute;
|
||||
bottom: 50rpx;
|
||||
right: 150rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
left: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(to right, #00c9ff, #0076ff);
|
||||
// opacity:0.5;
|
||||
z-index: 9999;
|
||||
border: 4rpx solid rgb(197, 220, 255);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.delete-circle-bad{
|
||||
|
||||
.circle-up-target {
|
||||
position: absolute;
|
||||
bottom: 50rpx;
|
||||
right: 150rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
top: -60rpx;
|
||||
left: 89rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #c2c9d3;
|
||||
z-index: 9999;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.circle-img {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
}
|
||||
|
||||
.circle-img-target {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
|
||||
.circle-font {
|
||||
position: absolute;
|
||||
bottom: 25rpx;
|
||||
left: 45rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.solveclick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -1,17 +1,49 @@
|
|||
<template>
|
||||
<view class="all-circle">
|
||||
<view class="doctorsay-container-up">
|
||||
<view v-for="(item,index) in doctorsayList" :key="index" @click="changLeft(index)">
|
||||
<view class="doctorsay-container-card"
|
||||
:style="index === upmenuIndex ? {background: 'linear-gradient(to right bottom, #00c9ff, #0076ff)'} : {}">
|
||||
<image class="doctorsay-container-card-img"
|
||||
:src="index === upmenuIndex ? item.targetUrl : item.url" />
|
||||
<view
|
||||
:class="(index === upmenuIndex) ? `doctorsay-container-card-font-dark`:`doctorsay-container-card-font`">
|
||||
{{ item.name }}
|
||||
<view class="circle-up">
|
||||
<view @click="clickCircle(`up`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/key1-1.png`" />
|
||||
<view class="circle-font">
|
||||
睡眠
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="circle-leftup">
|
||||
<view @click="clickCircle(`leftup`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/key5-1.png`" />
|
||||
<view class="circle-font">
|
||||
饮食
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="circle-rightup">
|
||||
<view @click="clickCircle(`rightup`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/key4-1.png`" />
|
||||
<view class="circle-font">
|
||||
清洁
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="circle-leftbottom">
|
||||
<view @click="clickCircle(`leftbottom`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/key3-1.png`" />
|
||||
<view class="circle-font">
|
||||
排泄
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="circle-rightbottom">
|
||||
<view @click="clickCircle(`rightbottom`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/key2-2.png`" />
|
||||
<view class="circle-font">
|
||||
日常
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -21,23 +53,53 @@
|
|||
ref
|
||||
} from 'vue'
|
||||
const emit = defineEmits(['getDownListIndex']);
|
||||
// 初始化下面侧单列表
|
||||
const doctorsayList = ref([
|
||||
{ url: '/static/index/doctorsay/light/use.png', targetUrl: '/static/index/doctorsay/dark/use.png', name: '日常' },
|
||||
{ url: '/static/index/doctorsay/light/clean.png', targetUrl: '/static/index/doctorsay/dark/clean.png', name: '清洁' },
|
||||
{ url: '/static/index/doctorsay/light/drink.png', targetUrl: '/static/index/doctorsay/dark/drink.png', name: '饮食' },
|
||||
{ url: '/static/index/doctorsay/light/bed.png', targetUrl: '/static/index/doctorsay/dark/bed.png', name: '睡眠' },
|
||||
{ url: '/static/index/doctorsay/light/shi.png', targetUrl: '/static/index/doctorsay/dark/shi.png', name: '排泻' },
|
||||
]);
|
||||
const upmenuIndex = ref(-1)
|
||||
//变更左侧菜单
|
||||
const changLeft = (index : number) => {
|
||||
upmenuIndex.value = index
|
||||
emit('getDownListIndex',index)
|
||||
setTimeout(()=>{
|
||||
upmenuIndex.value = -1
|
||||
},400)
|
||||
// downList.value = bigArray.value[index].children
|
||||
const isClick = ref(true);
|
||||
const clickCircle = (type : string) => {
|
||||
if (isClick.value) {
|
||||
switch (type) {
|
||||
case 'up':
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('getDownListIndex', 3)
|
||||
}, 0)
|
||||
break;
|
||||
case 'leftup':
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('getDownListIndex', 2)
|
||||
}, 0)
|
||||
break;
|
||||
case "rightup":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('getDownListIndex', 1)
|
||||
}, 0)
|
||||
break;
|
||||
case "leftbottom":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('getDownListIndex', 4)
|
||||
}, 0)
|
||||
break;
|
||||
case "rightbottom":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('getDownListIndex', 0)
|
||||
}, 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -45,49 +107,116 @@
|
|||
.all-circle {
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 50rpx;
|
||||
width: 400rpx;
|
||||
height: 500rpx;
|
||||
background-color: rgba(127, 127, 127, 0.1);
|
||||
border-radius: 20rpx;
|
||||
right: 80rpx;
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
background-color: rgba(110, 149, 217, 0.1);
|
||||
border-radius: 50%;
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
// justify-content: center;
|
||||
align-items: center;
|
||||
.doctorsay-container-up {
|
||||
border: 1rpx solid #d5d5d5;
|
||||
|
||||
.circle-up {
|
||||
position: absolute;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
top: -60rpx;
|
||||
left: 89rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: 60rpx;
|
||||
.doctorsay-container-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: rgb(221, 234, 250);
|
||||
}
|
||||
|
||||
.circle-leftup {
|
||||
position: absolute;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
left: -60rpx;
|
||||
top: 40rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.circle-rightup {
|
||||
position: absolute;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
right: -60rpx;
|
||||
top: 40rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.circle-leftbottom {
|
||||
position: absolute;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
left: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.circle-rightbottom {
|
||||
position: absolute;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
right: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.circle-up-target {
|
||||
position: absolute;
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
top: -60rpx;
|
||||
left: 89rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.circle-img {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
margin: 0 18rpx 15rpx 0rpx;
|
||||
border-radius: 30rpx;
|
||||
border: 2rpx solid rgb(221, 234, 250);
|
||||
box-shadow: 5px 5px 10px rgba(105, 129, 178,0.2);
|
||||
|
||||
/* 右下角阴影 */
|
||||
.doctorsay-container-card-img {
|
||||
width: 75rpx;
|
||||
height: 75rpx;
|
||||
}
|
||||
|
||||
.doctorsay-container-card-font {
|
||||
font-size: 30rpx;
|
||||
margin-top: -10rpx;
|
||||
.circle-img-target {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
|
||||
.doctorsay-container-card-font-dark {
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
margin-top: -10rpx;
|
||||
}
|
||||
}
|
||||
.circle-font {
|
||||
position: absolute;
|
||||
bottom: 25rpx;
|
||||
left: 45rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.solveclick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -1,19 +1,33 @@
|
|||
|
||||
<template>
|
||||
<view class="all-circle">
|
||||
<view class="move-circle" @click="confirm">
|
||||
<view class="circle-rightup">
|
||||
<view @click="clickCircle(`rightup`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="ismove?`/static/index/keyimg/white.png`: `/static/index/keyimg/move.png`" />
|
||||
<view class="circle-font">
|
||||
{{ismove? `确定`:`移动`}}
|
||||
</view>
|
||||
<view class="delete-circle-bad" @click="back">
|
||||
</view>
|
||||
</view>
|
||||
<view class="circle-leftbottom">
|
||||
<view @click="clickCircle(`leftbottom`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="ismove?`/static/index/keyimg/back.png`: `/static/index/keyimg/delete.png`" />
|
||||
<view class="circle-font">
|
||||
{{ismove? `取消`:`删除`}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
|
||||
const emit = defineEmits(['clickcard']);
|
||||
const upmenuIndex = ref(-1)
|
||||
const props = defineProps({
|
||||
ismove: {
|
||||
type: Boolean,
|
||||
|
@ -21,68 +35,104 @@
|
|||
},
|
||||
|
||||
});
|
||||
const emit = defineEmits(['clickcard']);
|
||||
const confirm = () =>{
|
||||
const isClick = ref(true);
|
||||
const clickCircle = (type : string) => {
|
||||
if (isClick.value) {
|
||||
switch (type) {
|
||||
case "rightup":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('clickcard',0)
|
||||
}
|
||||
const back = () =>{
|
||||
}, 0)
|
||||
break;
|
||||
case "leftbottom":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('clickcard',1)
|
||||
}, 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.all-circle{
|
||||
.all-circle {
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 50rpx;
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
}
|
||||
.move-circle{
|
||||
position: absolute;
|
||||
bottom: 200rpx;
|
||||
right: 40rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
right: 80rpx;
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(to right, #00c9ff, #0076ff);
|
||||
// opacity:0.5;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
.delete-circle{
|
||||
|
||||
.circle-rightup {
|
||||
position: absolute;
|
||||
bottom: 50rpx;
|
||||
right: 150rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
right: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(to right, #00c9ff, #0076ff);
|
||||
// opacity:0.5;
|
||||
z-index: 9999;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.delete-circle-bad{
|
||||
|
||||
.circle-leftbottom {
|
||||
position: absolute;
|
||||
bottom: 50rpx;
|
||||
right: 150rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
left: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #c2c9d3;
|
||||
z-index: 9999;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.circle-up-target {
|
||||
position: absolute;
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
top: -60rpx;
|
||||
left: 89rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.circle-img {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
}
|
||||
|
||||
.circle-img-target {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
|
||||
.circle-font {
|
||||
position: absolute;
|
||||
bottom: 25rpx;
|
||||
left: 45rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.solveclick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -1,81 +1,133 @@
|
|||
<template>
|
||||
<view class="all-circle">
|
||||
<view class="move-circle" @click="confirm">
|
||||
确定
|
||||
<view class="circle-rightup">
|
||||
<view @click="clickCircle(`rightup`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/white.png`" />
|
||||
<view class="circle-font">
|
||||
确认
|
||||
</view>
|
||||
<view class="delete-circle-bad" @click="back">
|
||||
</view>
|
||||
</view>
|
||||
<view class="circle-leftbottom">
|
||||
<view @click="clickCircle(`leftbottom`)" class="solveclick">
|
||||
<image :class="upmenuIndex==0?`circle-img-target` :`circle-img`"
|
||||
:src="upmenuIndex==0?`/static/index/keyimg/key1.png`: `/static/index/keyimg/back.png`" />
|
||||
<view class="circle-font">
|
||||
取消
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
|
||||
const emit = defineEmits(['clickdelete']);
|
||||
const confirm = () =>{
|
||||
const upmenuIndex = ref(-1)
|
||||
|
||||
const isClick = ref(true);
|
||||
const clickCircle = (type : string) => {
|
||||
if (isClick.value) {
|
||||
switch (type) {
|
||||
case "rightup":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('clickdelete',0)
|
||||
}
|
||||
const back = () =>{
|
||||
}, 0)
|
||||
break;
|
||||
case "leftbottom":
|
||||
isClick.value = false;
|
||||
setTimeout(() => {
|
||||
upmenuIndex.value = -1;
|
||||
isClick.value = true;
|
||||
emit('clickdelete',1)
|
||||
}, 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.all-circle{
|
||||
.all-circle {
|
||||
position: absolute;
|
||||
bottom: 300rpx;
|
||||
right: 50rpx;
|
||||
width: 500rpx;
|
||||
height: 500rpx;
|
||||
}
|
||||
.move-circle{
|
||||
position: absolute;
|
||||
bottom: 200rpx;
|
||||
right: 40rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
right: 80rpx;
|
||||
width: 330rpx;
|
||||
height: 330rpx;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(to right, #00c9ff, #0076ff);
|
||||
// opacity:0.5;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
}
|
||||
.delete-circle{
|
||||
|
||||
.circle-rightup {
|
||||
position: absolute;
|
||||
bottom: 50rpx;
|
||||
right: 150rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
right: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(to right, #00c9ff, #0076ff);
|
||||
// opacity:0.5;
|
||||
z-index: 9999;
|
||||
border: 4rpx solid rgb(197, 220, 255);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.delete-circle-bad{
|
||||
|
||||
.circle-leftbottom {
|
||||
position: absolute;
|
||||
bottom: 50rpx;
|
||||
right: 150rpx;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
width: 155rpx;
|
||||
height: 155rpx;
|
||||
left: 0rpx;
|
||||
bottom: -30rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #c2c9d3;
|
||||
z-index: 9999;
|
||||
border: 4rpx solid rgb(197, 220, 255);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 35rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.circle-up-target {
|
||||
position: absolute;
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
top: -60rpx;
|
||||
left: 89rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid rgba(110, 149, 217, 0.2);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.circle-img {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
}
|
||||
|
||||
.circle-img-target {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
}
|
||||
|
||||
.circle-font {
|
||||
position: absolute;
|
||||
bottom: 25rpx;
|
||||
left: 45rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.solveclick {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,94 @@
|
|||
<template>
|
||||
<view class="move-circle">
|
||||
<image src="/static/index/keyimg/yaogan.png" class="move-circle-all" />
|
||||
<view class="click-box-top" @click="handleClick(0)">
|
||||
</view>
|
||||
<view class="click-box-left" @click="handleClick(3)">
|
||||
</view>
|
||||
<view class="click-box-bottom" @click="handleClick(2)">
|
||||
</view>
|
||||
<view class="click-box-right" @click="handleClick(1)">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue'
|
||||
const emit = defineEmits(['movecard'])
|
||||
|
||||
const key = ref(-1)
|
||||
|
||||
// 保存当前定时器 ID
|
||||
let resetTimer = null
|
||||
|
||||
function handleClick(dir: number) {
|
||||
// 清除上一次定时器
|
||||
if (resetTimer !== null) {
|
||||
clearTimeout(resetTimer)
|
||||
}
|
||||
|
||||
// 显示当前方向
|
||||
key.value = dir
|
||||
emit('movecard', dir)
|
||||
|
||||
// 重新开启 800ms 定时器
|
||||
resetTimer = setTimeout(() => {
|
||||
key.value = -1
|
||||
resetTimer = null
|
||||
}, 500)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style lang="less" scoped>
|
||||
.move-circle {
|
||||
position: absolute;
|
||||
bottom: 93rpx;
|
||||
left: 130rpx;
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
// border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
.click-box-top{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 70rpx;
|
||||
width: 110rpx;
|
||||
height: 70rpx;
|
||||
// background-color: red;
|
||||
}
|
||||
.click-box-bottom{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 70rpx;
|
||||
width: 110rpx;
|
||||
height: 70rpx;
|
||||
// background-color: blue;
|
||||
}
|
||||
.click-box-left{
|
||||
position: absolute;
|
||||
bottom: 75rpx;
|
||||
left: 0;
|
||||
width: 70rpx;
|
||||
height: 100rpx;
|
||||
// background-color: yellow;
|
||||
}
|
||||
.click-box-right{
|
||||
position: absolute;
|
||||
bottom: 75rpx;
|
||||
right: 0;
|
||||
width: 70rpx;
|
||||
height: 100rpx;
|
||||
// background-color: green;
|
||||
}
|
||||
}
|
||||
.move-circle-all{
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -1152,7 +1152,7 @@
|
|||
.right-container-fir-left-nav {
|
||||
width: 63%;
|
||||
height: 548rpx;
|
||||
border-radius: 50rpx;
|
||||
/* border-radius: 50rpx; */
|
||||
/* 圆角 */
|
||||
position: relative;
|
||||
/* 增加背景色确保视觉效果 */
|
||||
|
@ -2093,12 +2093,13 @@
|
|||
}
|
||||
|
||||
.right-container-big {
|
||||
transform: scale(1.57);
|
||||
transform: scale(1.562);
|
||||
/* 初始状态 */
|
||||
transition: transform 0.5s ease;
|
||||
/* 平滑过渡 */
|
||||
transform-origin: left top;
|
||||
background-color: rgba(220, 230, 254, 1);
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
|
||||
.right-container-small {
|
||||
|
@ -2108,11 +2109,12 @@
|
|||
/* 平滑过渡 */
|
||||
transform-origin: left top;
|
||||
background-color: rgba(220, 230, 254, 1);
|
||||
border-radius: 50rpx;
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
.right-container-right-big {
|
||||
transform: scale(1.93);
|
||||
transform: scale(1.923);
|
||||
margin-left: 2%;
|
||||
width: 41%;
|
||||
/* 初始状态 */
|
||||
|
@ -2120,7 +2122,7 @@
|
|||
/* 平滑过渡 */
|
||||
transform-origin: right bottom;
|
||||
background-color: rgba(220, 230, 254, 1);
|
||||
border-radius: 50rpx;
|
||||
border-radius: 29rpx;
|
||||
}
|
||||
|
||||
.right-container-right-small {
|
||||
|
@ -2136,14 +2138,14 @@
|
|||
}
|
||||
|
||||
.right-container-left-big {
|
||||
transform: scale(1.78);
|
||||
transform: scale(1.781);
|
||||
width: 55%;
|
||||
/* 初始状态 */
|
||||
transition: transform 0.5s ease;
|
||||
/* 平滑过渡 */
|
||||
transform-origin: left bottom;
|
||||
background-color: rgba(183, 200, 243, 1);
|
||||
border-radius: 50rpx;
|
||||
border-radius: 29rpx;
|
||||
}
|
||||
|
||||
.right-container-left-small {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<view :class="isPopupVisible ?`right-container-big`:`right-container-small`"
|
||||
:style="isPopupVisiblefiropen || isPopupVisible?{zIndex:999}:{zIndex:998}"
|
||||
class="right-container-fir-left-nav">
|
||||
<view :class="darkFans?`right-container-fir-left-card-dark`:`right-container-fir-left-card`">
|
||||
<view :style="isPopupVisible?{borderRadius:`30rpx`}:{borderRadius:`50rpx`}" :class="darkFans?`right-container-fir-left-card-dark`:`right-container-fir-left-card`">
|
||||
<image class="right-container-fir-left-card-hulilei" :src="`/static/index/hulilei.png`" />
|
||||
<div class="right-container-fir-left-card-hulilei-font" @click="showPopup">护理类</div>
|
||||
<image v-if="darkFans" class="card-upfaguang" :src="`/static/index/cardbgc/uplight.png`" />
|
||||
|
@ -209,7 +209,7 @@
|
|||
<view class="right-container-sec">
|
||||
<view :class="isPopupVisiblesec ?`right-container-left-big`:`right-container-left-small`"
|
||||
:style="isPopupVisiblefiropensec || isPopupVisiblesec?{zIndex:999}:{zIndex:0}">
|
||||
<view :class="darkFans?`right-container-left-dark`:`right-container-left`">
|
||||
<view :style="isPopupVisiblesec?{borderRadius:`29rpx`}:{borderRadius:`50rpx`}" :class="darkFans?`right-container-left-dark`:`right-container-left`">
|
||||
<image class="right-container-left-type" :src="`/static/index/yiliao/yiliaolei.png`" />
|
||||
<div class="right-container-left-font" @click="showPopupsec">医疗类</div>
|
||||
<view class="right-container-fir-left-carousel">
|
||||
|
@ -330,9 +330,7 @@
|
|||
</view>
|
||||
<view :style="isPopupVisiblefiropenthi || isPopupVisiblethi?{zIndex:999}:{zIndex:0}"
|
||||
:class="[ isPopupVisiblethi ? 'right-container-right-big' : 'right-container-right-small',]">
|
||||
|
||||
|
||||
<view :class="[ darkFans ? 'right-container-right-father-dark' : 'right-container-right-father']">
|
||||
<view :style="isPopupVisiblethi?{borderRadius:`29rpx`}:{borderRadius:`50rpx`}" :class="[ darkFans ? 'right-container-right-father-dark' : 'right-container-right-father']">
|
||||
<view class="right-container-right-down-father">
|
||||
<div class="right-container-fir-left-card-flex-sec">
|
||||
<image class="right-container-fir-left-card-flex-sec-img"
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
.doctorsay-container-items {
|
||||
width: 310rpx;
|
||||
height: 1220rpx;
|
||||
|
||||
margin-left: 30rpx;
|
||||
.doctorsay-container-up {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
@ -535,18 +535,34 @@
|
|||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
.right-container-title-class-anhei-button-wrong {
|
||||
float: right;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 30rpx;
|
||||
margin-right: 15rpx;
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
background-color: #fff;
|
||||
|
||||
|
||||
.right-container-title-class-anhei {
|
||||
font-size: 30rpx;
|
||||
font-weight: 800;
|
||||
/* color: white; */
|
||||
}
|
||||
}
|
||||
.right-container-title-class-anhei-button {
|
||||
float: right;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
background-color: black;
|
||||
border: 2rpx solid;
|
||||
background: linear-gradient(to right bottom, #00c9ff, #0076ff);
|
||||
|
||||
.right-container-title-class-anhei {
|
||||
font-size: 30rpx;
|
||||
|
@ -574,7 +590,16 @@
|
|||
z-index: 999;
|
||||
font-size: 50rpx;
|
||||
}
|
||||
|
||||
.title-time-blue {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 0rpx;
|
||||
z-index: 10;
|
||||
.title-time-blue-img{
|
||||
height: 209rpx;
|
||||
width: 275rpx;
|
||||
}
|
||||
}
|
||||
.title-time {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
@ -803,7 +828,7 @@
|
|||
|
||||
.popup-song-contain {
|
||||
position: absolute;
|
||||
right: 270rpx;
|
||||
right: 570rpx;
|
||||
width: 1296rpx;
|
||||
background: url("/static/index/clearmountain.png") center/cover, rgba(255, 255, 255, 0.7);
|
||||
/* 使用 screen 混合模式,让图像与白色混合变淡 */
|
||||
|
|
|
@ -21,65 +21,30 @@
|
|||
<image class="right-icons-img-icon"
|
||||
:src="darkFans?`/static/index/undericons/out.png`:`/static/index/undericons/outlight.png`" />
|
||||
</view>
|
||||
<view class="right-container-title-class-anhei-button" @click="newchange()">
|
||||
<view class="right-container-title-class-anhei-button">
|
||||
<text class="right-container-title-class-anhei">
|
||||
手柄模式
|
||||
拖动模式
|
||||
</text>
|
||||
</view>
|
||||
<view class="right-container-title-class-anhei-button-wrong" @click="newchange(1)">
|
||||
<text class="right-container-title-class-anhei">
|
||||
手柄模式1
|
||||
</text>
|
||||
</view>
|
||||
<view class="right-container-title-class-anhei-button-wrong" @click="newchange(2)">
|
||||
<text class="right-container-title-class-anhei">
|
||||
手柄模式2
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-view">
|
||||
<view class="doctorsay-container-items">
|
||||
<view class="doctorsay-container-up">
|
||||
<view v-for="(item,index) in doctorsayList" :key="index" @click="changLeft(index)">
|
||||
<view class="doctorsay-container-card"
|
||||
:style="index === upmenuIndex ? {background: 'linear-gradient(to right bottom, #00c9ff, #0076ff)'} : {}">
|
||||
<image class="doctorsay-container-card-img"
|
||||
:src="index === upmenuIndex ? item.targetUrl : item.url" />
|
||||
<view
|
||||
:class="(index === upmenuIndex) ? `doctorsay-container-card-font-dark`:`doctorsay-container-card-font`">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="doctorsay-container-card"
|
||||
style="background: linear-gradient(135deg, #01e7be 0%, #0080dd 100%);">
|
||||
<image class="doctorsay-container-card-img" src="/static/index/shexiang.png" />
|
||||
<view class="doctorsay-container-card-font-dark">
|
||||
监控
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-down">
|
||||
<view class="doctorsay-top">
|
||||
<view class="doctorsay-top-gun"></view>
|
||||
<view class="doctorsay-top-font">服务类型</view>
|
||||
</view>
|
||||
<scroll-view :scroll-y="canmove" class="doctorsay-container-scroll" @scroll="handleScroll">
|
||||
<view v-for="(item,index) in downList" :key="index">
|
||||
<view class="doctorsay-container-button" @touchstart="handleTouchStart(item,index,$event)"
|
||||
@touchmove="handleTouchMove" @touchend="handleTouchEnd">
|
||||
<text
|
||||
:class="downmenuIndex===index?`doctorsay-container-text-target`:`doctorsay-container-text`"
|
||||
:style="{
|
||||
backgroundColor: item.color ? item.color : '',
|
||||
...(isBack ? {} : { width: '250rpx', height: '75rpx', fontSize: '30rpx', borderRadius: '25rpx' })
|
||||
}">{{item.title}}</text>
|
||||
<image v-show="downmenuIndex===index" class="doctorsay-container-button-uplight"
|
||||
:style="isBack?{}:{top:'30rpx'}" :src="`/static/index/cardicons/uplight.png`" />
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-container">
|
||||
<view class="doctorsay-container-title">
|
||||
<view class="doctorsay-container-left">
|
||||
<view class="doctorsay-container-left-gun"></view>
|
||||
<view class="doctorsay-container-left-font">时间矩阵</view>
|
||||
<view class="doctorsay-container-share" @click="shareToWeixin">
|
||||
分享到微信
|
||||
分享
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-right">
|
||||
|
@ -154,7 +119,11 @@
|
|||
@click.stop="deleteItems(item1,index0,index1)">
|
||||
-
|
||||
</view>
|
||||
|
||||
<view class="title-time-blue"
|
||||
v-show="getBlue(index0,index1)">
|
||||
<image class="title-time-blue-img"
|
||||
:src="getRed(index0,index1)?`/static/index/movemode/targetcheng.png`: `/static/index/movemode/target.png`" />
|
||||
</view>
|
||||
<view :class="getClass(item1,index0,index1)"
|
||||
style="font-size: 30rpx;overflow: hidden;"
|
||||
:style="{ animationDelay:`-${computeDelay(index0, index1).toFixed(2)}s` }">
|
||||
|
@ -230,6 +199,52 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-items">
|
||||
<view class="doctorsay-container-up">
|
||||
<view v-for="(item,index) in doctorsayList" :key="index" @click="changLeft(index)">
|
||||
<view class="doctorsay-container-card"
|
||||
:style="index === upmenuIndex ? {background: 'linear-gradient(to right bottom, #00c9ff, #0076ff)'} : {}">
|
||||
<image class="doctorsay-container-card-img"
|
||||
:src="index === upmenuIndex ? item.targetUrl : item.url" />
|
||||
<view
|
||||
:class="(index === upmenuIndex) ? `doctorsay-container-card-font-dark`:`doctorsay-container-card-font`">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="doctorsay-container-card"
|
||||
style="background: linear-gradient(135deg, #01e7be 0%, #0080dd 100%);">
|
||||
<image class="doctorsay-container-card-img" src="/static/index/shexiang.png" />
|
||||
<view class="doctorsay-container-card-font-dark">
|
||||
监控
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-down">
|
||||
<view class="doctorsay-top">
|
||||
<view class="doctorsay-top-gun"></view>
|
||||
<view class="doctorsay-top-font">服务类型</view>
|
||||
</view>
|
||||
<scroll-view :scroll-y="canmove" class="doctorsay-container-scroll" @scroll="handleScroll">
|
||||
<view v-for="(item,index) in downList" :key="index">
|
||||
<view class="doctorsay-container-button" @click="downmenuIndex=index"
|
||||
@touchstart="handleTouchStart(item,index,$event)" @touchmove="handleTouchMove"
|
||||
@touchend="handleTouchEnd">
|
||||
<text
|
||||
:class="downmenuIndex===index?`doctorsay-container-text-target`:`doctorsay-container-text`"
|
||||
:style="{
|
||||
backgroundColor: item.color ? item.color : '',
|
||||
...(isBack ? {} : { width: '250rpx', height: '75rpx', fontSize: '30rpx', borderRadius: '25rpx' })
|
||||
}">{{item.title}}</text>
|
||||
<image v-show="downmenuIndex===index" class="doctorsay-container-button-uplight"
|
||||
:style="isBack?{}:{top:'30rpx'}" :src="`/static/index/cardicons/uplight.png`" />
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 长按的弹出层 -->
|
||||
<view v-show="isopen" class="popup-overlay" @click="isopen=false;flyNumber.index0=999;touchindex1=-1">
|
||||
|
@ -570,18 +585,33 @@
|
|||
}
|
||||
const changeBug = ref(true);
|
||||
const nextItems = () => {
|
||||
currentNumber.value > 2 ? currentNumber.value = 0 : currentNumber.value++
|
||||
currentNumber.value == 0 ? currentNumber.value = 3 : currentNumber.value--
|
||||
}
|
||||
const getRed = (index0, index1) => {
|
||||
if (!props.canmove && props.liang.index0 === index0 && props.liang.index1 === index1 && (redNameindex0.value.includes(index0 + (currentNumber.value * 6)) || (redNameindex1.value != index1))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const getBlue = (index0, index1) => {
|
||||
if (!props.canmove && props.liang.index0 === index0 && props.liang.index1 === index1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 方法:根据条件返回不同的类名
|
||||
const getClass = (item, index0, index1) => {
|
||||
|
||||
if (!props.canmove && props.liang.index0 === index0 && props.liang.index1 === index1 && (redNameindex0.value.includes(index0 + (currentNumber.value * 6)) || (redNameindex1.value != index1))) {
|
||||
return 'title-time-border-red';
|
||||
}
|
||||
else if (!props.canmove && props.liang.index0 === index0 && props.liang.index1 === index1) {
|
||||
return 'title-time-border-blue';
|
||||
}
|
||||
else if (item.cycleType === '日常') {
|
||||
// if (!props.canmove && props.liang.index0 === index0 && props.liang.index1 === index1 && (redNameindex0.value.includes(index0 + (currentNumber.value * 6)) || (redNameindex1.value != index1))) {
|
||||
// return 'title-time-border-red';
|
||||
// }
|
||||
// else if (!props.canmove && props.liang.index0 === index0 && props.liang.index1 === index1) {
|
||||
// return 'title-time-border-blue';
|
||||
// }
|
||||
// else
|
||||
if (item.cycleType === '日常') {
|
||||
if (flyNumber.value.index0 === (index0 + (currentNumber.value * 6)) && flyNumber.value.index1 === index1 && shakyTable.value) {
|
||||
return 'title-time-border-yellow-active-transparent';
|
||||
} else if (shakyTable.value) {
|
||||
|
@ -627,8 +657,8 @@
|
|||
const darkFanschange = () => {
|
||||
emit('darkchange', !props.darkFans);
|
||||
}
|
||||
const newchange = () => {
|
||||
emit('changeold', false)
|
||||
const newchange = (type:number) => {
|
||||
emit('changeold', type)
|
||||
}
|
||||
//变更左侧菜单
|
||||
const changLeft = (index : number) => {
|
||||
|
@ -724,8 +754,8 @@
|
|||
.boundingClientRect((data : any) => {
|
||||
data.forEach(async (res : any) => {
|
||||
// 根据你的条件筛选元素
|
||||
if (res.left > 200 && res.left < 1067 && res.top < 570 && res.top > 140 && res.dataset.index0 == index0 && res.dataset.index1 == index1) {
|
||||
if (res.left > 200 && res.left < 500) {
|
||||
if (res.left > 100 && res.left < 900 && res.top < 570 && res.top > 140 && res.dataset.index0 == index0 && res.dataset.index1 == index1) {
|
||||
if (res.left > 100 && res.left < 400) {
|
||||
// 表格太靠左侧,修改到右面
|
||||
openX.value = Math.floor(res.left) + 520;
|
||||
} else {
|
||||
|
@ -789,14 +819,14 @@
|
|||
.boundingClientRect((data : any) => {
|
||||
data.forEach(async (res : any) => {
|
||||
// 根据你的条件筛选元素
|
||||
if (res.left > 200 && res.left < 1067 && res.top < 570 && res.top > 140) {
|
||||
shakyTable.value = true;
|
||||
if (res.left > 100 && res.left < 900 && res.top < 570 && res.top > 140) {
|
||||
reldata.value.push(res)
|
||||
}
|
||||
})
|
||||
})
|
||||
.exec()
|
||||
emit('saveruler', item, reldata.value);
|
||||
shakyTable.value = true;
|
||||
}
|
||||
}, 100); // 2秒后触发
|
||||
}
|
||||
|
@ -848,6 +878,7 @@
|
|||
emptyChildIndices.push(index);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
if (emptyChildNumber > 4 && emptyChildIndices.length > 1) {
|
||||
|
@ -895,20 +926,20 @@
|
|||
shakyTable.value = false
|
||||
saveX.value = Math.floor(e.touches[0].pageX);
|
||||
saveY.value = Math.floor(e.touches[0].pageY);
|
||||
longPressTimer.value = setTimeout(() => {
|
||||
let noHave = false;
|
||||
timearr.value[0].children.forEach((element : any, index0 : number) => {
|
||||
if (element.typeName === item.title) {
|
||||
scrollTop.value = 0
|
||||
scrollTop.value = index0 * 104
|
||||
noHave = true
|
||||
}
|
||||
})
|
||||
if (!noHave) {
|
||||
scrollTop.value = 0
|
||||
scrollTop.value = 999
|
||||
}
|
||||
}, 190)
|
||||
// longPressTimer.value = setTimeout(() => {
|
||||
// let noHave = false;
|
||||
// timearr.value[0].children.forEach((element : any, index0 : number) => {
|
||||
// if (element.typeName === item.title) {
|
||||
// scrollTop.value = 0
|
||||
// scrollTop.value = index0 * 104
|
||||
// noHave = true
|
||||
// }
|
||||
// })
|
||||
// if (!noHave) {
|
||||
// scrollTop.value = 0
|
||||
// scrollTop.value = 999
|
||||
// }
|
||||
// }, 190)
|
||||
//执行方法
|
||||
longPressTimer.value = setTimeout(() => {
|
||||
redNameindex0.value = [];
|
||||
|
@ -949,7 +980,7 @@
|
|||
.boundingClientRect((data : any) => {
|
||||
data.forEach((res : any) => {
|
||||
// 根据你的条件筛选元素
|
||||
if (res.left > 200 && res.left < 1067 && res.top < 570 && res.top > 140) {
|
||||
if (res.left > 100 && res.left < 900 && res.top < 570 && res.top > 140) {
|
||||
reldata.value.push(res)
|
||||
}
|
||||
})
|
||||
|
@ -1031,9 +1062,6 @@
|
|||
})
|
||||
const openOp = ref(0);
|
||||
const clickOp = (index : number, item : any) => {
|
||||
// cardsumit.value.startTime = ""
|
||||
// cardsumit.value.monthTime = ""
|
||||
// cardsumit.value.weekTime = ""
|
||||
saveId.value = item.id;
|
||||
saveTagName.value = item.tagName
|
||||
if (cardsumit.value.op.index[2] === index) {
|
||||
|
@ -1056,7 +1084,6 @@
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const clickTime = (index : string) => {
|
||||
|
@ -1085,10 +1112,7 @@
|
|||
const rulerEnd = async (res : any) => {
|
||||
isBack.value = false;
|
||||
if (props.liang.index0 !== 999 && res) {
|
||||
//检测拖动是否超出范围和是否不合法
|
||||
if (redNameindex0.value.includes(props.liang.index0 + (currentNumber.value * 6)) || redNameindex1.value !== props.liang.index1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cardsumit.value = {
|
||||
op: {
|
||||
name: "",
|
||||
|
@ -1196,7 +1220,6 @@
|
|||
// 先将 scrollTop 重置为 0
|
||||
scrollTop.value = 999
|
||||
// 等待 DOM 更新完成
|
||||
|
||||
// 设置一个足够大的值让 scroll-view 滚动到底部
|
||||
scrollTop.value = 9999
|
||||
}
|
||||
|
@ -1312,6 +1335,11 @@
|
|||
allArray.push(res)
|
||||
})
|
||||
})
|
||||
let data = {
|
||||
index0: indexsave.value[0],
|
||||
index1: savaIndex
|
||||
}
|
||||
whereEvent(data);
|
||||
const shouldAdd = timearr.value.some(obj => {
|
||||
const children = obj.children;
|
||||
return children[children.length - 1].directiveName.trim() !== '';
|
||||
|
|
|
@ -163,11 +163,9 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
top: -5rpx;
|
||||
right: -5rpx;
|
||||
z-index: 10;
|
||||
// background-color: #fff;
|
||||
// background: linear-gradient(to bottom right, #fff 0%, #e5d3fb 50%, #cfd9f6 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
@ -176,9 +174,7 @@
|
|||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
// margin-bottom: 5rpx;
|
||||
display: flex;
|
||||
// background-color: #fff;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
|
@ -421,18 +417,35 @@
|
|||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
.right-container-title-class-anhei-button-wrong {
|
||||
float: right;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 30rpx;
|
||||
margin-right: 15rpx;
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
background-color: #fff;
|
||||
/* border: 2rpx solid; */
|
||||
|
||||
.right-container-title-class-anhei {
|
||||
font-size: 30rpx;
|
||||
font-weight: 800;
|
||||
/* color: white; */
|
||||
}
|
||||
}
|
||||
.right-container-title-class-anhei-button {
|
||||
float: right;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
margin-right: 20rpx;
|
||||
width: 200rpx;
|
||||
height: 50rpx;
|
||||
background-color: black;
|
||||
border: 2rpx solid;
|
||||
background: linear-gradient(to right bottom, #00c9ff, #0076ff);
|
||||
/* border: 2rpx solid; */
|
||||
|
||||
.right-container-title-class-anhei {
|
||||
font-size: 30rpx;
|
||||
|
@ -699,7 +712,7 @@
|
|||
|
||||
.popup-song-contain {
|
||||
position: absolute;
|
||||
right: 500rpx;
|
||||
right: 450rpx;
|
||||
width: 1296rpx;
|
||||
background: url("/static/index/clearmountain.png") center/cover, rgba(255, 255, 255, 0.7);
|
||||
/* 使用 screen 混合模式,让图像与白色混合变淡 */
|
||||
|
|
|
@ -5,15 +5,16 @@
|
|||
@click="bottomisShaking=false;shakyTable = false">
|
||||
<!-- 轮盘 -->
|
||||
<joystick v-show="isEdit" @movecard="movecard" />
|
||||
<!-- 按钮 -->
|
||||
<skill v-show="isEdit && songisopen && !isMove && !deleteisopen" :clickstauts="clickstauts"
|
||||
:gray="cardsumit.weekTimeNumber===-1 && cardsumit.monthTimeNumber===-1&&clickstauts === 2"
|
||||
@clickcircle="clickcircle" />
|
||||
<!-- <joysticknew v-show="isLunpan" @movecard="movecard" /> -->
|
||||
<!-- 测试 -->
|
||||
<!-- <ceshi /> -->
|
||||
<!-- 新增后的按钮 -->
|
||||
<skill v-show="isEdit && songisopen && !isMove && !deleteisopen" @clickcircle="clickcircle" />
|
||||
<!-- 新增 -->
|
||||
<skilladd v-show="!haveName && isEdit && !songisopen && !isMove" @getDownListIndex="openAdd" />
|
||||
<skilladd v-show="!haveName && isEdit && !songisopen && !isMove&& !deleteisopen" @getDownListIndex="openAdd" />
|
||||
<!-- 移动 -->
|
||||
<skillmove v-show="(haveName && isEdit && !songisopen) ||(isEdit && !songisopen && isMove)" :ismove="isMove"
|
||||
@clickcard="changecard" />
|
||||
<skillmove v-show="((haveName && isEdit && !songisopen) ||(isEdit && !songisopen && isMove)) && !deleteisopen"
|
||||
:ismove="isMove" @clickcard="changecard" />
|
||||
<!-- 删除 -->
|
||||
<skilmovedelete v-show="deleteisopen" @clickdelete="clickdelete" />
|
||||
<view class="right-container-title-nav">
|
||||
|
@ -34,21 +35,30 @@
|
|||
<image class="right-icons-img-icon"
|
||||
:src="darkFans?`/static/index/undericons/out.png`:`/static/index/undericons/outlight.png`" />
|
||||
</view>
|
||||
<view class="right-container-title-class-anhei-button" @click="newchange()">
|
||||
<view class="right-container-title-class-anhei-button-wrong" @click="newchange(0)">
|
||||
<text class="right-container-title-class-anhei">
|
||||
拖动模式
|
||||
</text>
|
||||
</view>
|
||||
<view class="right-container-title-class-anhei-button">
|
||||
<text class="right-container-title-class-anhei">
|
||||
手柄模式1
|
||||
</text>
|
||||
</view>
|
||||
<view class="right-container-title-class-anhei-button-wrong" @click="newchange(2)">
|
||||
<text class="right-container-title-class-anhei">
|
||||
手柄模式2
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-view">
|
||||
|
||||
<view class="doctorsay-container-container">
|
||||
<view class="doctorsay-container-title">
|
||||
<view class="doctorsay-container-left">
|
||||
<view class="doctorsay-container-left-gun"></view>
|
||||
<view class="doctorsay-container-left-font">时间矩阵</view>
|
||||
<view class="doctorsay-container-share" @click="shareToWeixin">
|
||||
分享到微信
|
||||
分享
|
||||
</view>
|
||||
</view>
|
||||
<view class="doctorsay-container-right">
|
||||
|
@ -61,9 +71,10 @@
|
|||
</view>
|
||||
<view class="doctorsay-container-juzhen" @click="openEdit">
|
||||
{{isEdit?"取消编辑":"编辑"}}
|
||||
|
||||
</view>
|
||||
|
||||
<!-- <view v-show="isEdit" class="doctorsay-container-juzhen" @click="openLunpan">
|
||||
{{isLunpan?"取消轮盘":"开启轮盘"}}
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="super-card">
|
||||
|
@ -87,14 +98,15 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="super-card-container">
|
||||
<swiper :disable-touch="!canmove || shakyTable" :current="currentNumber" class="scroll-x"
|
||||
<!-- <swiper :disable-touch="!canmove || shakyTable" :current="currentNumber" class="scroll-x"
|
||||
circular :indicator-dots="false" @change="changecurrentNumber" :interval="4000"
|
||||
:duration="500">
|
||||
<swiper-item v-for="(item,index) in [1,2,3]" :key="index">
|
||||
<swiper-item v-for="(item,index) in [1,2,3]" :key="index"> -->
|
||||
<scroll-view style="height: 100%;width: 100%;" :scroll-left="cardLeft" scroll-x
|
||||
@scroll="handleTop" :show-scrollbar="false">
|
||||
<view
|
||||
style="display: flex;box-shadow: 10rpx 10rpx 20rpx rgba(0, 0, 0, 0.1);background: linear-gradient(to right, #c4dbf4,#c9c2ef, #c6dcf3);">
|
||||
<view v-for="(item0,index0) in timearr.slice(index * 8, (index + 1) * 8)"
|
||||
:key="index0">
|
||||
style="display: flex;box-shadow: 10rpx 10rpx 20rpx rgba(0, 0, 0, 0.1);width:5420rpx;background: linear-gradient(to right, #c4dbf4,#c9c2ef, #c6dcf3);">
|
||||
<view v-for="(item0,index0) in timearr" :key="index0">
|
||||
<view class="super-card-time" style="width:226rpx">
|
||||
{{(item0.positioning.length == 1 ? ('0' + item0.positioning) : item0.positioning) + ":00"}}
|
||||
</view>
|
||||
|
@ -106,13 +118,12 @@
|
|||
:scroll-y="canmove && !shakyTable" @scroll="handleScrolltime"
|
||||
:show-scrollbar="false">
|
||||
<view style="display: flex;height: 100%;">
|
||||
<view v-for="(item0,index0) in timearr.slice(index * 8, (index + 1) * 8)"
|
||||
:key="index0">
|
||||
<view v-for="(item0,index0) in timearr" :key="index0">
|
||||
<view class="super-card-time-und" style="width:226rpx">
|
||||
<view v-for="(item1,index1) in item0.children" style="width: 100%;"
|
||||
:key="index1">
|
||||
<view
|
||||
:class="targetRuler.current===currentNumber && targetRuler.index0 === index0 && targetRuler.index1 === index1 ? targetRuler.index1 ?`title-time-border-big`:`title-time-border-big-top` : `super-card-time-card` "
|
||||
:class=" targetRuler.index0 === index0 && targetRuler.index1 === index1 ? targetRuler.index1 ?`title-time-border-big`:`title-time-border-big-top` : `super-card-time-card` "
|
||||
:style="!targetRuler.bordershow && saveRulerTime.index0 === index0 && saveRulerTime.index1 === index1 ? {zIndex:999} : {borderTop: '1rpx solid transparent'}"
|
||||
:id="`a${index0}_${index1}`" style="position: relative;"
|
||||
@click="rulerTouchClick(item1,index0,index1,$event)"
|
||||
|
@ -126,8 +137,10 @@
|
|||
@click.stop="deleteItems(item1,index0,index1)">
|
||||
-
|
||||
</view>
|
||||
<view class="title-time-blue" v-show="saveEditIndex.index0 == index0 && saveEditIndex.index1 == index1">
|
||||
<image class="title-time-blue-img" :src="isMove?`/static/index/movemode/targetcheng.png`: `/static/index/movemode/target.png`" />
|
||||
<view class="title-time-blue"
|
||||
v-show="saveEditIndex.index0 == index0 && saveEditIndex.index1 == index1">
|
||||
<image class="title-time-blue-img"
|
||||
:src="isMove?`/static/index/movemode/targetcheng.png`: `/static/index/movemode/target.png`" />
|
||||
</view>
|
||||
<view :class="getClass(item1,index0,index1)"
|
||||
style="font-size: 30rpx;overflow: hidden;"
|
||||
|
@ -135,8 +148,7 @@
|
|||
<view class="title-time" v-if="item1.startTime"
|
||||
v-show=" liang.index0 !== index0 || liang.index1 !== index1 || canmove"
|
||||
style="margin-top: 5rpx;">
|
||||
<view class="title-time-time"
|
||||
style="font-size: 25rpx;">
|
||||
<view class="title-time-time" style="font-size: 25rpx;">
|
||||
{{item1.startTime + `-` + item1.endTime}}
|
||||
</view>
|
||||
<image class="title-time-button"
|
||||
|
@ -170,8 +182,9 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</scroll-view>
|
||||
<!-- </swiper-item>
|
||||
</swiper> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="super-card-end">
|
||||
|
@ -246,7 +259,8 @@
|
|||
<view class="arrayindex" v-show="!clickstauts">
|
||||
<view v-for="(item,index) in openValue.array" :key="index">
|
||||
<view style="position: relative;box-shadow: 10rpx 10rpx 20rpx rgba(105, 129, 178, 0.4)"
|
||||
:class="cardsumit.op.index[1]===index?`arrayindex-one-target`:`arrayindex-one`">
|
||||
:class="cardsumit.op.index[1]===index?`arrayindex-one-target`:`arrayindex-one`"
|
||||
@click="cardsumit.op.index[1]=index">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -275,21 +289,25 @@
|
|||
<view class="shu-container-left-font">周期类型</view>
|
||||
</view>
|
||||
<view class="radio-father" v-show="clickstauts===2">
|
||||
<view :class="isweek?`radio-circle-target`: `radio-circle`"></view>
|
||||
<view :class="isweek&&selectType? `radio-font-target` : `radio-font`">每周</view>
|
||||
<view :class="!isweek?`radio-circle-target`: `radio-circle`"></view>
|
||||
<view :class="!isweek&&selectType? `radio-font-target` : `radio-font`">每月</view>
|
||||
<view :class="isweek?`radio-circle-target`: `radio-circle`" @click="clickWeek"></view>
|
||||
<view :class="isweek&&selectType? `radio-font-target` : `radio-font`" @click="clickWeek">每周
|
||||
</view>
|
||||
<view :class="!isweek?`radio-circle-target`: `radio-circle`" @click="clickMonth"></view>
|
||||
<view :class="!isweek&&selectType? `radio-font-target` : `radio-font`" @click="clickMonth">每月
|
||||
</view>
|
||||
</view>
|
||||
<view class="week-father" v-show="isweek&&clickstauts===2">
|
||||
<view v-for="(item,index) in weekDays" :key="index">
|
||||
<view :class="cardsumit.weekTimeNumber===index?`week-one-target`:`week-one`">
|
||||
<view :class="cardsumit.weekTimeNumber===index?`week-one-target`:`week-one`"
|
||||
@click="cardsumit.weekTime=item;cardsumit.weekTimeNumber=index;selectType=false">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="month-father" v-show="!isweek&&clickstauts===2">
|
||||
<view v-for="(item,index) in days" :key="index">
|
||||
<view :class="cardsumit.monthTimeNumber===index?`month-one-target`:`month-one`">
|
||||
<view :class="cardsumit.monthTimeNumber===index?`month-one-target`:`month-one`"
|
||||
@click="cardsumit.monthTime=item;cardsumit.monthTimeNumber=index;selectType=false">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -306,20 +324,12 @@
|
|||
<view style="margin-top: 30rpx;" class="popup-delete-text">
|
||||
确定要删除 {{deletename}} 吗?
|
||||
</view>
|
||||
<!-- <view class="popup-delete-button">
|
||||
<view :class="!deleteButton? `popup-delete-button-right`:`popup-delete-button-left`" @click="deleteisopen=false">
|
||||
取消
|
||||
</view>
|
||||
<view :class="deleteButton? `popup-delete-button-right`:`popup-delete-button-left`" @click="deleteRuler(deleteindex[0],deleteindex[1]);isHave()">
|
||||
确定
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 替换表格的的弹出层 -->
|
||||
<view v-show="replacementisopen" class="popup-delete" @click="replacementisopen=false">
|
||||
<view class="popup-delete-content" style="padding-top: 30rpx;" :style="{ opacity: replacementisopacity ? 1 : 0 }"
|
||||
@click.stop>
|
||||
<view class="popup-delete-content" style="padding-top: 30rpx;"
|
||||
:style="{ opacity: replacementisopacity ? 1 : 0 }" @click.stop>
|
||||
<image class="popup-delete-img" src="/static/index/deleteicon.png" />
|
||||
<view style="margin-top: 30rpx;" class="popup-delete-text">
|
||||
该单元格已有服务指令,是否替换旧服务指令
|
||||
|
@ -347,7 +357,6 @@
|
|||
<!-- 分享的弹出层 -->
|
||||
<view v-show="shareShow" class="popup-share" @click="shareShow=false">
|
||||
<view class="popup-share-content" :style="{ opacity: deletedownisopacity ? 1 : 0 }" @click.stop>
|
||||
|
||||
<view class="popup-share-title">
|
||||
护理日程分享
|
||||
<image class="popup-share-img" src="/static/index/NU.png" />
|
||||
|
@ -365,7 +374,6 @@
|
|||
<view class="popup-share-downcontent-button" @click="clickshare">
|
||||
分享
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -380,10 +388,12 @@
|
|||
import index from '../../request';
|
||||
import { myArray } from './yaoshandiao.js';
|
||||
import joystick from '@/component/public/game/joystick.vue';
|
||||
import joysticknew from '@/component/public/game/joysticknew.vue';
|
||||
import skill from '@/component/public/game/skill.vue';
|
||||
import skilladd from '@/component/public/game/skilladd.vue'
|
||||
import skillmove from '@/component/public/game/skilmove.vue'
|
||||
import skilmovedelete from '@/component/public/game/skilmovedelete.vue'
|
||||
// import ceshi from '@/component/public/game/ceshi.vue'
|
||||
const props = defineProps({
|
||||
isshow: {
|
||||
type: Boolean,
|
||||
|
@ -399,6 +409,10 @@
|
|||
},
|
||||
liang: {
|
||||
type: Object,
|
||||
},
|
||||
isold:{
|
||||
type: Boolean,
|
||||
required: true,
|
||||
}
|
||||
});
|
||||
watch(
|
||||
|
@ -406,6 +420,18 @@
|
|||
() => {
|
||||
bottomisShaking.value = false;
|
||||
})
|
||||
watch(
|
||||
() => props.isold,
|
||||
() => {
|
||||
if(props.isold){
|
||||
cardLeft.value = 1;
|
||||
scrollTop.value = 1;
|
||||
nextTick(() => {
|
||||
scrollTop.value = 0;
|
||||
cardLeft.value = saveleft.value * 113;
|
||||
})
|
||||
}
|
||||
})
|
||||
watch(
|
||||
() => props.isshow,
|
||||
() => {
|
||||
|
@ -440,6 +466,7 @@
|
|||
//弹窗
|
||||
// const containerRef = ref(null);
|
||||
const scrollLeft = ref(0);
|
||||
const cardLeft = ref(678);
|
||||
//移动表格
|
||||
const scrollTop = ref(0)
|
||||
//左下的数组
|
||||
|
@ -463,19 +490,23 @@
|
|||
const replacementname = ref("")
|
||||
const replacementisopacity = ref(false)
|
||||
//第几套表格
|
||||
const currentNumber = ref(1);
|
||||
const currentNumber = ref(0);
|
||||
const scrollKey = ref(0);
|
||||
const updo = ref(0);
|
||||
const downdo = ref(0);
|
||||
|
||||
// const updo = ref(0);
|
||||
// const rightdo = ref(0);
|
||||
// const leftdo = ref(0);
|
||||
// const downdo = ref(0);
|
||||
const saveleft = ref(6);
|
||||
const saveright = ref(13);
|
||||
const savetop = ref(0);
|
||||
const savebottom = ref(3);
|
||||
const isMove = ref(false);
|
||||
// 替换新的
|
||||
const getNew = () =>{
|
||||
const getNew = () => {
|
||||
let object = JSON.parse(JSON.stringify(timearr.value[flyNumber.value.index0].children[flyNumber.value.index1]))
|
||||
indexsave.value = [saveEditIndex.value.index0 + (currentNumber.value * 8), saveEditIndex.value.index1]
|
||||
indexsave.value = [saveEditIndex.value.index0, saveEditIndex.value.index1]
|
||||
// 旧的typeName保存了
|
||||
let typeName = timearr.value[flyNumber.value.index0].children[flyNumber.value.index1].typeName
|
||||
// console.log("???",flyNumber.value.index0,flyNumber.value.index1)
|
||||
timearr.value[flyNumber.value.index0].children[flyNumber.value.index1] = { directiveName: '', typeName: typeName }
|
||||
//然后保存新的
|
||||
let newtypeName = timearr.value[indexsave.value[0]].children[indexsave.value[1]].typeName
|
||||
|
@ -500,46 +531,42 @@
|
|||
const changecard = (type : number) => {
|
||||
//1是删除,0是移动
|
||||
if (isMove.value) {
|
||||
if(replacementisopen.value){
|
||||
if(type){
|
||||
if (replacementisopen.value) {
|
||||
if (type) {
|
||||
flyNumber.value.index0 = -1;
|
||||
flyNumber.value.index1 = -1;
|
||||
isMove.value = false;
|
||||
}else{
|
||||
} else {
|
||||
getNew()
|
||||
|
||||
}
|
||||
replacementisopen.value = false;
|
||||
}else{
|
||||
} else {
|
||||
if (type) {
|
||||
flyNumber.value.index0 = -1;
|
||||
flyNumber.value.index1 = -1;
|
||||
isMove.value = false
|
||||
// deleteItems(timearr.value[saveEditIndex.value.index0 + (currentNumber.value * 8)].children[saveEditIndex.value.index1],saveEditIndex.value.index0,saveEditIndex.value.index1)
|
||||
} else {
|
||||
if(timearr.value[saveEditIndex.value.index0 + (currentNumber.value * 8)].children[saveEditIndex.value.index1].directiveName){
|
||||
if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) {
|
||||
replacementisopacity.value = false;
|
||||
replacementisopen.value = true;
|
||||
setTimeout(() => {
|
||||
replacementisopacity.value = true
|
||||
}, 100)
|
||||
}else{
|
||||
} else {
|
||||
getNew()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if (type) {
|
||||
deleteItems(timearr.value[saveEditIndex.value.index0 + (currentNumber.value * 8)].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
|
||||
deleteItems(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
|
||||
} else {
|
||||
flyNumber.value.index0 = saveEditIndex.value.index0 + (currentNumber.value * 8);
|
||||
flyNumber.value.index0 = saveEditIndex.value.index0;
|
||||
flyNumber.value.index1 = saveEditIndex.value.index1;
|
||||
isMove.value = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
const openAdd = (index : number) => {
|
||||
selectType.value = true;
|
||||
|
@ -554,9 +581,9 @@
|
|||
weekTime: "",
|
||||
weekTimeNumber: -1,
|
||||
}
|
||||
songisopacity.value = false;
|
||||
//虚化的动画
|
||||
songisopen.value = true;
|
||||
songisopacity.value = false;
|
||||
setTimeout(() => {
|
||||
songisopacity.value = true
|
||||
}, 100)
|
||||
|
@ -564,11 +591,11 @@
|
|||
cardsumit.value.op.index[0] = index
|
||||
cardsumit.value.op.index[1] = 0
|
||||
// 存储时间和二级数组
|
||||
openValue.value.time = timearr.value[saveEditIndex.value.index0 + (currentNumber.value * 8)].positioning;
|
||||
openValue.value.minute = timearr.value[saveEditIndex.value.index0 + (currentNumber.value * 8)].children[saveEditIndex.value.index1].typeName
|
||||
openValue.value.time = timearr.value[saveEditIndex.value.index0].positioning;
|
||||
openValue.value.minute = timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].typeName
|
||||
openValue.value.array = bigArray.value[index].children;
|
||||
//存储选中表格的坐标
|
||||
indexsave.value = [saveEditIndex.value.index0 + (currentNumber.value * 8), saveEditIndex.value.index1]
|
||||
indexsave.value = [saveEditIndex.value.index0, saveEditIndex.value.index1]
|
||||
}
|
||||
function dosomesave() {
|
||||
cardsumit.value.op.name = secondopenValue.value[cardsumit.value.op.index[2]].relName
|
||||
|
@ -768,28 +795,56 @@
|
|||
if (saveEditIndex.value.index1) {
|
||||
saveEditIndex.value.index1--
|
||||
}
|
||||
downdo.value = 2
|
||||
if (updo.value) {
|
||||
updo.value--
|
||||
} else {
|
||||
if (saveEditIndex.value.index1 < 12) {
|
||||
scrollTop.value = (saveEditIndex.value.index1) * 104.5
|
||||
if (saveEditIndex.value.index1 < savetop.value) {
|
||||
savetop.value = saveEditIndex.value.index1;
|
||||
savebottom.value = saveEditIndex.value.index1 + 3
|
||||
scrollTop.value = saveEditIndex.value.index1 * 104.5;
|
||||
}
|
||||
// downdo.value = 2
|
||||
// if (updo.value) {
|
||||
// updo.value--
|
||||
// } else {
|
||||
// if (saveEditIndex.value.index1 < 12) {
|
||||
// scrollTop.value = (saveEditIndex.value.index1) * 104.5
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
isHave()
|
||||
break
|
||||
case 1:
|
||||
if (saveEditIndex.value.index0 == 23) {
|
||||
return
|
||||
}
|
||||
saveEditIndex.value.index0++
|
||||
if (saveEditIndex.value.index0 > 7) {
|
||||
if (currentNumber.value == 2) {
|
||||
currentNumber.value = 0
|
||||
} else {
|
||||
currentNumber.value++
|
||||
if (saveEditIndex.value.index0 > saveright.value) {
|
||||
saveleft.value = saveEditIndex.value.index0 - 7;
|
||||
saveright.value = saveEditIndex.value.index0
|
||||
cardLeft.value = saveleft.value * 113;
|
||||
}
|
||||
// rightdo.value = 6
|
||||
// if (leftdo.value) {
|
||||
// leftdo.value--
|
||||
// if (saveEditIndex.value.index0 > saveright.value && saveright.value != -1) {
|
||||
// cardLeft.value = (saveEditIndex.value.index0 - 7) * 113;
|
||||
// console.log("222",saveEditIndex.value.index0,saveright.value)
|
||||
// }
|
||||
// } else {
|
||||
// if (saveEditIndex.value.index0 > 1) {
|
||||
// cardLeft.value = (saveEditIndex.value.index0 - 7) * 113
|
||||
// saveleft.value = saveEditIndex.value.index0 - 7;
|
||||
// saveright.value = saveEditIndex.value.index0
|
||||
// }
|
||||
// }
|
||||
// saveEditIndex.value.index0++
|
||||
// if (saveEditIndex.value.index0 > 7) {
|
||||
// if (currentNumber.value == 2) {
|
||||
// currentNumber.value = 0
|
||||
// } else {
|
||||
// currentNumber.value++
|
||||
saveEditIndex.value.index0 = 0;
|
||||
}
|
||||
// }
|
||||
// // currentNumber.value++
|
||||
// saveEditIndex.value.index0 = 0;
|
||||
// }
|
||||
isHave()
|
||||
break
|
||||
case 2:
|
||||
|
@ -797,39 +852,83 @@
|
|||
return
|
||||
}
|
||||
saveEditIndex.value.index1++
|
||||
updo.value = 2
|
||||
if (downdo.value) {
|
||||
downdo.value--
|
||||
} else {
|
||||
if (saveEditIndex.value.index1 > 1) {
|
||||
scrollTop.value = (saveEditIndex.value.index1 - 3) * 104.5
|
||||
}
|
||||
if (saveEditIndex.value.index1 > savebottom.value) {
|
||||
savetop.value = saveEditIndex.value.index1 - 3;
|
||||
savebottom.value = saveEditIndex.value.index1;
|
||||
scrollTop.value = savetop.value * 104.5;
|
||||
}
|
||||
// updo.value = 2
|
||||
// if (downdo.value) {
|
||||
// downdo.value--
|
||||
|
||||
// } else {
|
||||
// if (saveEditIndex.value.index1 > 1) {
|
||||
// scrollTop.value = (saveEditIndex.value.index1 - 3) * 104.5
|
||||
|
||||
// }
|
||||
// }
|
||||
isHave()
|
||||
break
|
||||
case 3:
|
||||
saveEditIndex.value.index0--
|
||||
if (saveEditIndex.value.index0 < 0) {
|
||||
// saveEditIndex.value.index0--
|
||||
// if (saveEditIndex.value.index0 < 0) {
|
||||
|
||||
if (currentNumber.value) {
|
||||
currentNumber.value--
|
||||
} else {
|
||||
currentNumber.value = 2
|
||||
// if (currentNumber.value) {
|
||||
// currentNumber.value--
|
||||
// } else {
|
||||
// currentNumber.value = 2
|
||||
// }
|
||||
// saveEditIndex.value.index0 = 7;
|
||||
// }
|
||||
// if (saveEditIndex.value.index1) {
|
||||
// saveEditIndex.value.index1--
|
||||
// }
|
||||
if (saveEditIndex.value.index0 == 0) {
|
||||
return
|
||||
}
|
||||
saveEditIndex.value.index0 = 7;
|
||||
saveEditIndex.value.index0--
|
||||
if (saveEditIndex.value.index0 < saveleft.value) {
|
||||
saveleft.value = saveEditIndex.value.index0;
|
||||
saveright.value = saveEditIndex.value.index0 + 7;
|
||||
cardLeft.value = saveleft.value * 113;
|
||||
}
|
||||
// leftdo.value = 6
|
||||
// if (rightdo.value) {
|
||||
// rightdo.value--
|
||||
// if (saveEditIndex.value.index0 < saveleft.value && saveleft.value != -1) {
|
||||
// cardLeft.value = (saveEditIndex.value.index0) * 113
|
||||
// console.log("111",saveEditIndex.value.index0,saveleft.value)
|
||||
// }
|
||||
// } else {
|
||||
// if (saveEditIndex.value.index0 < 23) {
|
||||
// // scrollTop.value = (saveEditIndex.value.index1) * 104.5
|
||||
// cardLeft.value = (saveEditIndex.value.index0) * 113;
|
||||
// saveleft.value = saveEditIndex.value.index0;
|
||||
// saveright.value = saveEditIndex.value.index0 + 7
|
||||
// }
|
||||
|
||||
// }
|
||||
isHave()
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
const clickWeek = () => {
|
||||
selectType.value = true;
|
||||
isweek.value = true;
|
||||
cardsumit.value.monthTime = '';
|
||||
cardsumit.value.monthTimeNumber = -1;
|
||||
}
|
||||
const clickMonth = () => {
|
||||
selectType.value = true;
|
||||
isweek.value = false;
|
||||
cardsumit.value.weekTime = '';
|
||||
cardsumit.value.weekTimeNumber = -1;
|
||||
}
|
||||
const haveName = ref(false);
|
||||
const isHave = () => {
|
||||
// console.log("??????",currentNumber.value * 8)
|
||||
if (timearr.value[saveEditIndex.value.index0 + (currentNumber.value * 8)].children[saveEditIndex.value.index1].directiveName) {
|
||||
if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) {
|
||||
haveName.value = true;
|
||||
} else {
|
||||
haveName.value = false;
|
||||
|
@ -857,13 +956,13 @@
|
|||
// 在作用域中声明一个定时器变量
|
||||
let throttleTimer = null;
|
||||
|
||||
const changecurrentNumber = (event : any) => {
|
||||
// 进行你想要的操作
|
||||
currentNumber.value = event.detail.current;
|
||||
nextTick(() => {
|
||||
scrollTop.value = moveDownNumber.value;
|
||||
});
|
||||
};
|
||||
// const changecurrentNumber = (event : any) => {
|
||||
// // 进行你想要的操作
|
||||
// currentNumber.value = event.detail.current;
|
||||
// nextTick(() => {
|
||||
// scrollTop.value = moveDownNumber.value;
|
||||
// });
|
||||
// };
|
||||
//监听拖拽
|
||||
const dragOffset = ref(0);
|
||||
const moveDownNumber = ref(0)
|
||||
|
@ -872,16 +971,28 @@
|
|||
let formattedNum = parseFloat(num.toFixed(2));
|
||||
moveDownNumber.value = formattedNum
|
||||
}
|
||||
function handleTop(e) {
|
||||
// console.log(e.detail.scrollLeft)
|
||||
// if(e.detail.scrollLeft>7000){
|
||||
// cardLeft.value = 0;
|
||||
|
||||
// }else if(e.detail.scrollLeft<1000){
|
||||
// // cardLeft.value = 7234;
|
||||
// cardLeft.value = 7000;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
const changeBug = ref(true);
|
||||
const nextItems = () => {
|
||||
if (!isEdit.value) {
|
||||
if (currentNumber.value) {
|
||||
currentNumber.value--
|
||||
} else {
|
||||
currentNumber.value = 2
|
||||
}
|
||||
}
|
||||
}
|
||||
// const nextItems = () => {
|
||||
// if (!isEdit.value) {
|
||||
// if (currentNumber.value) {
|
||||
// currentNumber.value--
|
||||
// } else {
|
||||
// currentNumber.value = 2
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// 方法:根据条件返回不同的类名
|
||||
const getClass = (item, index0, index1) => {
|
||||
// if (saveEditIndex.value.index0 == index0 && saveEditIndex.value.index1 == index1) {
|
||||
|
@ -894,7 +1005,7 @@
|
|||
// return 'title-time-border-blue';
|
||||
// }
|
||||
if (item.cycleType === '日常') {
|
||||
if (flyNumber.value.index0 === (index0 + (currentNumber.value * 8)) && flyNumber.value.index1 === index1) {
|
||||
if (flyNumber.value.index0 === (index0) && flyNumber.value.index1 === index1) {
|
||||
return 'title-time-border-yellow-active-transparent';
|
||||
} else if (shakyTable.value) {
|
||||
return 'title-time-border-yellow-active';
|
||||
|
@ -903,7 +1014,7 @@
|
|||
}
|
||||
} else if (item.cycleType) {
|
||||
//为啥这么写,是因为动画写行内无效!!!
|
||||
if (flyNumber.value.index0 === (index0 + (currentNumber.value * 8)) && flyNumber.value.index1 === index1) {
|
||||
if (flyNumber.value.index0 === (index0) && flyNumber.value.index1 === index1) {
|
||||
return 'title-time-border-pouple-active-transparent';
|
||||
}
|
||||
else if (shakyTable.value) {
|
||||
|
@ -932,7 +1043,7 @@
|
|||
const roomTar = ref<number[]>([]);
|
||||
const emit = defineEmits(['darkchange', 'savename', 'saveruler', 'closename', 'changefangkuang', 'changeold']);
|
||||
const isEdit = ref(false);
|
||||
|
||||
// const isLunpan = ref(false);
|
||||
const saveEditIndex = ref({
|
||||
index0: -1,
|
||||
index1: -1
|
||||
|
@ -940,6 +1051,9 @@
|
|||
const clickstauts = ref(0)
|
||||
const secondopenValue = ref([]);
|
||||
const clickcircle = (index : number) => {
|
||||
if (clickstauts.value === 2 && selectType.value) {
|
||||
return
|
||||
}
|
||||
if (!index) {
|
||||
clickstauts.value++
|
||||
} else {
|
||||
|
@ -950,6 +1064,7 @@
|
|||
}
|
||||
}
|
||||
if (clickstauts.value === 1) {
|
||||
|
||||
cardsumit.value.op.index[2] = 1
|
||||
secondopenValue.value = []
|
||||
secondopenValue.value = openValue.value.array[cardsumit.value.op.index[1]].children
|
||||
|
@ -959,6 +1074,7 @@
|
|||
clickOp(0, secondopenValue.value[0])
|
||||
}
|
||||
else if (clickstauts.value === 2) {
|
||||
|
||||
if (openOp.value == 1) {
|
||||
cardsumit.value.weekTime = "";
|
||||
cardsumit.value.monthTime = "";
|
||||
|
@ -970,6 +1086,7 @@
|
|||
}
|
||||
|
||||
} else if (clickstauts.value === 3) {
|
||||
|
||||
clickstauts.value = 0
|
||||
movetoruler()
|
||||
}
|
||||
|
@ -977,22 +1094,43 @@
|
|||
}
|
||||
const openEdit = () => {
|
||||
isEdit.value = !isEdit.value;
|
||||
// nnd必须这样写
|
||||
if (isEdit.value) {
|
||||
saveEditIndex.value.index0 = saveleft.value;
|
||||
saveEditIndex.value.index1 = 0;
|
||||
cardLeft.value = 1;
|
||||
scrollTop.value = 1;
|
||||
nextTick(() => {
|
||||
scrollTop.value = 0;
|
||||
cardLeft.value = saveleft.value * 113;
|
||||
})
|
||||
if (isEdit.value) {
|
||||
saveEditIndex.value.index0 = 0;
|
||||
saveEditIndex.value.index1 = 0;
|
||||
isHave()
|
||||
} else {
|
||||
saveEditIndex.value.index0 = -1;
|
||||
saveEditIndex.value.index1 = -1;
|
||||
}
|
||||
};
|
||||
const newchange = () => {
|
||||
emit('changeold', true)
|
||||
// const openLunpan = () => {
|
||||
// isLunpan.value = !isLunpan.value;
|
||||
// isEdit.value = false;
|
||||
// // nnd必须这样写
|
||||
// if (isLunpan.value) {
|
||||
// scrollTop.value = 1;
|
||||
// nextTick(() => {
|
||||
// scrollTop.value = 0;
|
||||
// })
|
||||
// }
|
||||
|
||||
// if (isLunpan.value) {
|
||||
// saveEditIndex.value.index0 = saveleft.value;
|
||||
// saveEditIndex.value.index1 = 0;
|
||||
// isHave()
|
||||
// } else {
|
||||
// saveEditIndex.value.index0 = -1;
|
||||
// saveEditIndex.value.index1 = -1;
|
||||
// }
|
||||
// };
|
||||
const newchange = (type:number) => {
|
||||
emit('changeold', type)
|
||||
}
|
||||
|
||||
const timer = ref(null);//计时器
|
||||
|
@ -1028,7 +1166,7 @@
|
|||
bottomisShaking.value = false;
|
||||
deleteisopacity.value = false;
|
||||
deleteisopen.value = true;
|
||||
deleteindex.value = [index0 + (currentNumber.value * 8), index1]
|
||||
deleteindex.value = [index0, index1]
|
||||
deletename.value = item.directiveName;
|
||||
deleteId.value = item.id
|
||||
setTimeout(() => {
|
||||
|
@ -1105,33 +1243,33 @@
|
|||
const reldata = ref([]);
|
||||
//表格长按开始
|
||||
const rulerTouchStart = (item : any, index0 : number, index1 : number, e : any) => {
|
||||
scrollTop.value = moveDownNumber.value;
|
||||
moveX.value = Math.floor(e.touches[0].pageX);
|
||||
moveY.value = Math.floor(e.touches[0].pageY);
|
||||
timer.value = setTimeout(() => {
|
||||
if (item.directiveName) {
|
||||
flyNumber.value.typeName = item.typeName
|
||||
flyNumber.value.index0 = index0 + (currentNumber.value * 8);
|
||||
flyNumber.value.index1 = index1;
|
||||
indexsave.value = [-1, -1]
|
||||
reldata.value = []
|
||||
isTuoing.value = true;
|
||||
const query = uni.createSelectorQuery()
|
||||
query
|
||||
.selectAll('.super-card-time-card')
|
||||
.boundingClientRect((data : any) => {
|
||||
data.forEach(async (res : any) => {
|
||||
// 根据你的条件筛选元素
|
||||
if (res.left > 200 && res.left < 1067 && res.top < 570 && res.top > 140) {
|
||||
shakyTable.value = true;
|
||||
reldata.value.push(res)
|
||||
}
|
||||
})
|
||||
})
|
||||
.exec()
|
||||
emit('saveruler', item, reldata.value);
|
||||
}
|
||||
}, 100); // 2秒后触发
|
||||
// scrollTop.value = moveDownNumber.value;
|
||||
// moveX.value = Math.floor(e.touches[0].pageX);
|
||||
// moveY.value = Math.floor(e.touches[0].pageY);
|
||||
// timer.value = setTimeout(() => {
|
||||
// if (item.directiveName) {
|
||||
// flyNumber.value.typeName = item.typeName
|
||||
// flyNumber.value.index0 = index0;
|
||||
// flyNumber.value.index1 = index1;
|
||||
// indexsave.value = [-1, -1]
|
||||
// reldata.value = []
|
||||
// isTuoing.value = true;
|
||||
// const query = uni.createSelectorQuery()
|
||||
// query
|
||||
// .selectAll('.super-card-time-card')
|
||||
// .boundingClientRect((data : any) => {
|
||||
// data.forEach(async (res : any) => {
|
||||
// // 根据你的条件筛选元素
|
||||
// if (res.left > 200 && res.left < 1067 && res.top < 570 && res.top > 140) {
|
||||
// shakyTable.value = true;
|
||||
// reldata.value.push(res)
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// .exec()
|
||||
// emit('saveruler', item, reldata.value);
|
||||
// }
|
||||
// }, 100); // 2秒后触发
|
||||
}
|
||||
const rulerTouchMove = (e : any) => {
|
||||
const moveXa = Math.floor(e.touches[0].pageX);
|
||||
|
@ -1241,11 +1379,6 @@
|
|||
const clickOp = (index : number, item : any) => {
|
||||
saveId.value = item.id;
|
||||
saveTagName.value = item.tagName
|
||||
if (cardsumit.value.op.index[2] === index) {
|
||||
cardsumit.value.op.index[2] = -1;
|
||||
cardsumit.value.op.name = ""
|
||||
openOp.value = -1
|
||||
} else {
|
||||
cardsumit.value.op.index[2] = index
|
||||
cardsumit.value.op.name = item.relName
|
||||
switch (item.cycleType) {
|
||||
|
@ -1261,23 +1394,40 @@
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// const clickTime = (index : string) => {
|
||||
// cardsumit.value.startTime = index
|
||||
// if (cardsumit.value.op.index[2] === index) {
|
||||
// cardsumit.value.op.index[2] = -1;
|
||||
// cardsumit.value.op.name = ""
|
||||
// openOp.value = -1
|
||||
// } else {
|
||||
// cardsumit.value.op.index[2] = index
|
||||
// cardsumit.value.op.name = item.relName
|
||||
// switch (item.cycleType) {
|
||||
// case `日常护理`:
|
||||
// openOp.value = 0
|
||||
// break;
|
||||
// case `周期护理`:
|
||||
// openOp.value = 1
|
||||
// break;
|
||||
// case `即时护理`:
|
||||
// openOp.value = 2
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
|
||||
// }
|
||||
const clickweek = (index : string) => {
|
||||
cardsumit.value.weekTime = index
|
||||
}
|
||||
const clickmonth = (index : string) => {
|
||||
cardsumit.value.monthTime = index
|
||||
}
|
||||
// const clickweek = (index : string) => {
|
||||
// cardsumit.value.weekTime = index
|
||||
// }
|
||||
// const clickmonth = (index : string) => {
|
||||
// cardsumit.value.monthTime = index
|
||||
// }
|
||||
const indexsave = ref([-1, -1]);
|
||||
// (长按表格后)表格拖动结束
|
||||
const rulerMoveEnd = (object : any) => {
|
||||
if (props.liang.index0 !== 999 && object.cycleType) {
|
||||
indexsave.value = [props.liang.index0 + (currentNumber.value * 8), props.liang.index1]
|
||||
indexsave.value = [props.liang.index0, props.liang.index1]
|
||||
// 旧的typeName保存了
|
||||
let typeName = timearr.value[flyNumber.value.index0].children[flyNumber.value.index1].typeName
|
||||
timearr.value[flyNumber.value.index0].children[flyNumber.value.index1] = { directiveName: '', typeName: typeName }
|
||||
|
@ -1329,6 +1479,7 @@
|
|||
}
|
||||
let cycleType = ""
|
||||
//看看是啥指令
|
||||
// openOp.value点击最后一项时修改
|
||||
if (!openOp.value) {
|
||||
cycleType = "日常";
|
||||
} else if (openOp.value === 1) {
|
||||
|
@ -1362,14 +1513,15 @@
|
|||
}
|
||||
//给表格赋值
|
||||
timearr.value[indexsave.value[0]].children[indexsave.value[1]] = param;
|
||||
movecard(1)
|
||||
isHave()
|
||||
// let allArray = [];
|
||||
// timearr.value.forEach((element : any) => {
|
||||
// element.children.forEach((res : any) => {
|
||||
// allArray.push(res)
|
||||
// })
|
||||
// })
|
||||
// saveAll()
|
||||
let allArray = [];
|
||||
timearr.value.forEach((element : any) => {
|
||||
element.children.forEach((res : any) => {
|
||||
allArray.push(res)
|
||||
})
|
||||
})
|
||||
saveAll()
|
||||
}
|
||||
const saveAll = () => {
|
||||
//给后端编译一下
|
||||
|
@ -1395,7 +1547,7 @@
|
|||
|
||||
})
|
||||
})
|
||||
|
||||
console.log("!!!!!!!!",postArray)
|
||||
}
|
||||
const routerPush = () => {
|
||||
uni.setStorage({
|
||||
|
@ -1403,7 +1555,7 @@
|
|||
data: timearr.value,
|
||||
success: function () {
|
||||
uni.navigateTo({
|
||||
url: `/pages/timeMatrix/index?currentNumber=${currentNumber.value}`
|
||||
url: `/pages/timeMatrix/indexnew`
|
||||
})
|
||||
},
|
||||
});
|
||||
|
@ -1420,15 +1572,16 @@
|
|||
bordershow: true
|
||||
})
|
||||
const whereEvent = (data : any) => {
|
||||
scrollTop.value = 0
|
||||
scrollTop.value = data.index1 * 104
|
||||
scrollTop.value = 0;
|
||||
scrollTop.value = data.index1 * 104;
|
||||
cardLeft.value = 0;
|
||||
cardLeft.value = data.index0 * 113;
|
||||
|
||||
if (currentNumber.value === Math.floor(data.index0 / 8)) {
|
||||
targetRuler.value.index0 = data.index0 - currentNumber.value * 8;
|
||||
targetRuler.value.index0 = data.index0;
|
||||
targetRuler.value.index1 = data.index1;
|
||||
saveRulerTime.value.index0 = targetRuler.value.index0;
|
||||
saveRulerTime.value.index1 = targetRuler.value.index1;
|
||||
targetRuler.value.current = currentNumber.value
|
||||
// targetRuler.value.current = currentNumber.value
|
||||
targetRuler.value.bordershow = false;
|
||||
setTimeout(() => {
|
||||
targetRuler.value.index0 = -1;
|
||||
|
@ -1440,29 +1593,46 @@
|
|||
saveRulerTime.value.index0 = -1;
|
||||
saveRulerTime.value.index1 = -1;
|
||||
}, 1000)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
currentNumber.value = Math.floor(data.index0 / 8);
|
||||
}, 100)
|
||||
setTimeout(() => {
|
||||
targetRuler.value.index0 = data.index0 - currentNumber.value * 8;
|
||||
targetRuler.value.index1 = data.index1;
|
||||
saveRulerTime.value.index0 = targetRuler.value.index0;
|
||||
saveRulerTime.value.index1 = targetRuler.value.index1;
|
||||
targetRuler.value.current = currentNumber.value
|
||||
targetRuler.value.bordershow = false;
|
||||
}, 800)
|
||||
setTimeout(() => {
|
||||
targetRuler.value.index0 = -1;
|
||||
targetRuler.value.index1 = -1;
|
||||
targetRuler.value.current = -1
|
||||
}, 1400)
|
||||
setTimeout(() => {
|
||||
targetRuler.value.bordershow = true;
|
||||
saveRulerTime.value.index0 = -1;
|
||||
saveRulerTime.value.index1 = -1;
|
||||
}, 2200)
|
||||
}
|
||||
// if (currentNumber.value === Math.floor(data.index0 / 8)) {
|
||||
// targetRuler.value.index0 = data.index0 - currentNumber.value * 8;
|
||||
// targetRuler.value.index1 = data.index1;
|
||||
// saveRulerTime.value.index0 = targetRuler.value.index0;
|
||||
// saveRulerTime.value.index1 = targetRuler.value.index1;
|
||||
// targetRuler.value.current = currentNumber.value
|
||||
// targetRuler.value.bordershow = false;
|
||||
// setTimeout(() => {
|
||||
// targetRuler.value.index0 = -1;
|
||||
// targetRuler.value.index1 = -1;
|
||||
// targetRuler.value.current = -1
|
||||
// }, 400)
|
||||
// setTimeout(() => {
|
||||
// targetRuler.value.bordershow = true;
|
||||
// saveRulerTime.value.index0 = -1;
|
||||
// saveRulerTime.value.index1 = -1;
|
||||
// }, 1000)
|
||||
// } else {
|
||||
// setTimeout(() => {
|
||||
// currentNumber.value = Math.floor(data.index0 / 8);
|
||||
// }, 100)
|
||||
// setTimeout(() => {
|
||||
// targetRuler.value.index0 = data.index0 - currentNumber.value * 8;
|
||||
// targetRuler.value.index1 = data.index1;
|
||||
// saveRulerTime.value.index0 = targetRuler.value.index0;
|
||||
// saveRulerTime.value.index1 = targetRuler.value.index1;
|
||||
// targetRuler.value.current = currentNumber.value
|
||||
// targetRuler.value.bordershow = false;
|
||||
// }, 800)
|
||||
// setTimeout(() => {
|
||||
// targetRuler.value.index0 = -1;
|
||||
// targetRuler.value.index1 = -1;
|
||||
// targetRuler.value.current = -1
|
||||
// }, 1400)
|
||||
// setTimeout(() => {
|
||||
// targetRuler.value.bordershow = true;
|
||||
// saveRulerTime.value.index0 = -1;
|
||||
// saveRulerTime.value.index1 = -1;
|
||||
// }, 2200)
|
||||
// }
|
||||
}
|
||||
// 定义每小时中的分钟数组,表示每 5 分钟一个时间段,总共 12 个
|
||||
const minuteArr = ['00', '05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55']
|
||||
|
@ -1479,6 +1649,7 @@
|
|||
// console.log("QQQQ", myArray)
|
||||
bigArray.value = myArray
|
||||
downList.value = bigArray.value[0].children
|
||||
cardLeft.value = 678
|
||||
// console.log("aaaaa", timearr.value)
|
||||
//暂时注释
|
||||
// getServiceTree().then((res : any) => {
|
||||
|
@ -1500,7 +1671,7 @@
|
|||
defineExpose({
|
||||
// rulerEnd,
|
||||
rulerMoveEnd,
|
||||
nextItems,
|
||||
// nextItems,
|
||||
})
|
||||
|
||||
const moveNumber = ref({
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
// 引入 request 文件
|
||||
import request from '@/request/index.js'
|
||||
|
||||
// 以下 api 为博主项目示例,实际与项目相匹配
|
||||
|
||||
// 查询服务类型
|
||||
export const getServiceTree = () => {
|
||||
return request({
|
||||
url: '/nuIpadApi/nuConfigServiceCategory/getServiceTree',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 查询表格
|
||||
export const getNclist = () => {
|
||||
return request({
|
||||
url: '/nuIpadApi/nuBizNuCustomerServer/getNclist?nuId=1&customerId=1',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 新增表格
|
||||
export const addNuCustomerServer = (params) => {
|
||||
return request({
|
||||
url: '/nuIpadApi/nuBizNuCustomerServer/addNuCustomerServer',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
// 移动表格
|
||||
export const editNuCustomerServer = (params) => {
|
||||
return request({
|
||||
url: '/nuIpadApi/nuBizNuCustomerServer/editNuCustomerServer',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const deleteNuCustomerServer = (params) => {
|
||||
return request({
|
||||
url: `/nuIpadApi/nuBizNuCustomerServer/deleteNuCustomerServer?id=${params.id}`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
// 移动表格
|
||||
export const addBatch = (params) => {
|
||||
return request({
|
||||
url: '/nuIpadApi/nuBizNuCustomerServer/addBatch',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
// 定义 Link 类型
|
||||
export type roomBtttonType = {
|
||||
url : string;
|
||||
targetUrl : string;
|
||||
name : string
|
||||
}
|
|
@ -104,7 +104,7 @@
|
|||
<view class="swiper-left-button-blue">
|
||||
保存
|
||||
</view>
|
||||
<view class="swiper-left-button-blue">
|
||||
<view class="swiper-left-button-blue" style="margin-right: 40rpx;">
|
||||
提交
|
||||
</view>
|
||||
</view>
|
||||
|
@ -355,7 +355,7 @@
|
|||
.down-button {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
height: 8%;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<view
|
||||
:class="item.cardType >3 ?`swiper-states-heng-two-green`: `swiper-states-heng-two`">
|
||||
</view>
|
||||
<view class="ball-bgc" :style="item.cardType!=1 ?{
|
||||
<view class="ball-bgc" :style="item.cardType !==0 && item.cardType !==1?{
|
||||
}:{boxShadow: `8rpx 8rpx 16rpx 0rpx rgba(0, 0, 0, 0.3)`,width:`110rpx`,height:`110rpx`}">
|
||||
<view :class="getBallFirst(item.cardType)">
|
||||
采购
|
||||
|
@ -729,14 +729,14 @@
|
|||
|
||||
.ball-red {
|
||||
background: #FF642F;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
font-size: 25rpx;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
|
||||
.ball-white {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "养老App",
|
||||
"appid" : "__UNI__FB2D473",
|
||||
"description" : "养老App",
|
||||
"versionName" : "1.0.9",
|
||||
"versionCode" : 109,
|
||||
"versionName" : "1.1.2",
|
||||
"versionCode" : 112,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
@ -40,6 +40,13 @@
|
|||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
"path": "pages/timeMatrix/indexnew",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
// {
|
||||
// "path": "pages/somethingmove/index",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<view :class="darkFans?`darkbackgroundContainer`:`backgroundContainer`" @touchmove="getxy" @touchend="cleanall">
|
||||
<view class="move-font" v-show="savename && clientX" :style="{ top: `${clientY}rpx`, left: `${clientX}rpx` }">
|
||||
<view class="move-font" v-show="savename && clientX" :animation="animationData">
|
||||
{{savename}}
|
||||
</view>
|
||||
<view v-if="saveruler.cycleType"
|
||||
<view v-show="saveruler.cycleType"
|
||||
:class="saveruler.cycleType=='日常' ? `title-time-border-yellow`:`title-time-border-pouple`"
|
||||
:style="{ top: `${clientY}rpx`, left: `${clientX}rpx` }" style="font-size: 30rpx;overflow: hidden;">
|
||||
:animation="animationData" style="font-size: 30rpx;overflow: hidden;">
|
||||
<view class="title-time" v-show="saveruler.startTime" style="margin-top: 5rpx;">
|
||||
<view class="title-time-time" style="font-size: 30rpx;">
|
||||
{{saveruler.startTime + `-` + saveruler.endTime}}
|
||||
|
@ -51,25 +51,34 @@
|
|||
<!-- 超凶表格 -->
|
||||
<!-- 旧表格 -->
|
||||
<rightItemssecond ref="ruler" :liang="indexNumber" :isshow="menuIndexshowsecond" :canmove="canmove"
|
||||
:darkFans="darkFans" v-show="menuIndex==1&&isOld" @darkchange="darkchange" @savename="openname"
|
||||
:darkFans="darkFans" v-show="menuIndex==1&&!isOld" @darkchange="darkchange" @savename="openname"
|
||||
@saveruler="openruler" @changefangkuang="changefangkuang" @cleanname="closename" @changeold="isOldchange" />
|
||||
<!-- 新表格 -->
|
||||
<rightItemssecondnew ref="rulernew" :liang="indexNumber" :isshow="menuIndexshowsecond" :canmove="canmove"
|
||||
:darkFans="darkFans" v-show="menuIndex==1&&!isOld" @darkchange="darkchange" @savename="openname"
|
||||
<rightItemssecondnew ref="rulernew" :isold="isOld===1" :liang="indexNumber" :isshow="menuIndexshowsecond" :canmove="canmove"
|
||||
:darkFans="darkFans" v-show="menuIndex==1&&isOld===1" @darkchange="darkchange" @savename="openname"
|
||||
@saveruler="openruler" @changefangkuang="changefangkuang" @cleanname="closename" @changeold="isOldchange" />
|
||||
<!-- 新表格 -->
|
||||
<rightItemssecondrelnew ref="rulernew" :isold="isOld===2" :liang="indexNumber" :isshow="menuIndexshowsecond" :canmove="canmove"
|
||||
:darkFans="darkFans" v-show="menuIndex==1&&isOld===2" @darkchange="darkchange" @savename="openname"
|
||||
@saveruler="openruler" @changefangkuang="changefangkuang" @cleanname="closename" @changeold="isOldchange" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import type { Link } from "./index";
|
||||
import rightItemsfirst from "../../component/rightItemsindex/index.vue"
|
||||
|
||||
import rightItemssecond from "../../component/rightItemssecond/index.vue"
|
||||
|
||||
import rightItemssecondnew from "../../component/rightItemssecondnew/index.vue"
|
||||
import rightItemssecondrelnew from "../../component/rightItemssecondrelnew/index.vue"
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
|
||||
onMounted(() => {
|
||||
isOld.value = 2;
|
||||
uni.getSystemInfoSync(); // 确保 global 注入生效
|
||||
uni.pageScrollTo; // 避免某些平台热更新惊群
|
||||
// 被动监听提升拖拽性能
|
||||
})
|
||||
|
||||
// 初始化左侧菜单列表
|
||||
const iconList = ref<Link[]>([
|
||||
|
@ -88,7 +97,7 @@
|
|||
// 暗黑模式
|
||||
const darkFans = ref<boolean>(false);
|
||||
//旧表格还是新表格
|
||||
const isOld = ref(false);
|
||||
const isOld = ref(-1);
|
||||
// 当前选中的菜单索引
|
||||
const roomTar = ref<number[]>([]);
|
||||
//滑块按钮
|
||||
|
@ -102,7 +111,7 @@
|
|||
darkFans.value = res
|
||||
}
|
||||
//切换表格新旧
|
||||
const isOldchange = (res:boolean) =>{
|
||||
const isOldchange = (res : number) => {
|
||||
isOld.value = res;
|
||||
}
|
||||
// 变更菜单
|
||||
|
@ -148,11 +157,24 @@
|
|||
//翻页计时器
|
||||
const canTrigger = ref(true);
|
||||
//全局获得x轴和y轴
|
||||
const animation = uni.createAnimation({
|
||||
duration: 0,
|
||||
timingFunction: 'linear',
|
||||
delay: 0
|
||||
});
|
||||
const animationData = ref({});
|
||||
let ticking = false;
|
||||
let handle = null;
|
||||
|
||||
const getxyrel = (event) => {
|
||||
const touch = event.touches[0];
|
||||
clientX.value = 2 * (Math.floor(touch.clientX) - 100);
|
||||
clientY.value = 2 * (Math.floor(touch.clientY) - 55);
|
||||
// 遍历数组,找到点击区域所在的对象
|
||||
animation.translate3d(clientX.value / 2, clientY.value / 2, 0).step({ duration: 0 });
|
||||
animationData.value = animation.export();
|
||||
|
||||
|
||||
// 遍历数组,找到点击区域所在的对
|
||||
const translateX = Math.floor(touch.clientX) - 50;
|
||||
const translateY = Math.floor(touch.clientY) - 25;
|
||||
|
||||
|
@ -164,30 +186,28 @@
|
|||
const { index0, index1 } = clickedItem.dataset;
|
||||
indexNumber.value.index0 = index0
|
||||
indexNumber.value.index1 = index1
|
||||
|
||||
if (clientX.value > 2050 && canTrigger.value && isOld.value) {
|
||||
if (clientX.value < 200 && canTrigger.value && !isOld.value) {
|
||||
ruler.value?.nextItems();
|
||||
canTrigger.value = false;
|
||||
setTimeout(() => {
|
||||
canTrigger.value = true;
|
||||
}, 1000);
|
||||
}
|
||||
// console.log("AAA",clientX.value)
|
||||
if (clientX.value < 350 && canTrigger.value && !isOld.value) {
|
||||
// if (clientX.value < 350 && canTrigger.value && isOld.value===1) {
|
||||
|
||||
rulernew.value?.nextItems();
|
||||
canTrigger.value = false;
|
||||
setTimeout(() => {
|
||||
canTrigger.value = true;
|
||||
}, 1000);
|
||||
}
|
||||
// rulernew.value?.nextItems();
|
||||
// canTrigger.value = false;
|
||||
// setTimeout(() => {
|
||||
// canTrigger.value = true;
|
||||
// }, 1000);
|
||||
// }
|
||||
} else {
|
||||
indexNumber.value.index0 = 999
|
||||
indexNumber.value.index1 = 999
|
||||
}
|
||||
}
|
||||
//节流
|
||||
const getxy = throttle(getxyrel, 10);
|
||||
const getxy = throttle(getxyrel, 40);
|
||||
|
||||
const fangkuaiValue = ref([])
|
||||
//所有适合的方块
|
||||
|
@ -198,7 +218,6 @@
|
|||
}
|
||||
const changefangkuang = (fangkuang : any) => {
|
||||
fangkuaiValue.value = fangkuang
|
||||
console.log("!!!!", fangkuaiValue.value)
|
||||
}
|
||||
//移动方块
|
||||
const saveruler = ref({
|
||||
|
@ -220,7 +239,6 @@
|
|||
const closename = () => {
|
||||
savename.value = "";
|
||||
canmove.value = true;
|
||||
// fangkuaiValue.value = []
|
||||
}
|
||||
const ruler = ref(null)
|
||||
const rulernew = ref(null)
|
||||
|
@ -228,25 +246,24 @@
|
|||
const cleanall = () => {
|
||||
clientX.value = 9999;
|
||||
clientY.value = 9999;
|
||||
animation.translate3d(clientX.value / 2, clientY.value / 2, 0).step({ duration: 0 });
|
||||
animationData.value = animation.export();
|
||||
canmove.value = true;
|
||||
indexNumber.value = {
|
||||
index0: 999,
|
||||
index1: 999,
|
||||
};
|
||||
|
||||
if (savename.value) {
|
||||
if(isOld.value){
|
||||
if (!isOld.value) {
|
||||
ruler.value?.rulerEnd(savename.value);
|
||||
}else{
|
||||
// rulernew.value?.rulerEnd(savename.value);
|
||||
} else {
|
||||
}
|
||||
} else if (saveruler.value.typeName) {
|
||||
if(isOld.value){
|
||||
if (isOld.value===1) {
|
||||
ruler.value?.rulerMoveEnd(saveruler.value);
|
||||
}else{
|
||||
} else {
|
||||
rulernew.value?.rulerMoveEnd(saveruler.value);
|
||||
}
|
||||
|
||||
}
|
||||
savename.value = "";
|
||||
saveruler.value = {
|
||||
|
@ -275,10 +292,8 @@
|
|||
// 使用正则表达式找到所有括号的内容
|
||||
let result = [];
|
||||
let remainingStr = str;
|
||||
|
||||
// 正则匹配最外层括号(支持全角和半角)
|
||||
let regex = /([^((]*)[((]([^))]+)[))]/;
|
||||
|
||||
while (regex.test(remainingStr)) {
|
||||
let match = remainingStr.match(regex);
|
||||
if (match) {
|
||||
|
@ -294,12 +309,10 @@
|
|||
remainingStr = remainingStr.replace(match[0], '').trim();
|
||||
}
|
||||
}
|
||||
|
||||
// 如果最后还有剩余部分,也加入结果
|
||||
if (remainingStr.trim()) {
|
||||
result.push(remainingStr.trim());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
// 生命周期钩子
|
||||
|
@ -339,11 +352,8 @@
|
|||
|
||||
.move-font {
|
||||
position: absolute;
|
||||
// font-size: 45rpx;
|
||||
// font-weight: 700;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
// color: #016AD1;
|
||||
background-color: rgb(201, 232, 255);
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid #fff;
|
||||
|
@ -355,6 +365,7 @@
|
|||
text-align: center;
|
||||
font-size: 40rpx;
|
||||
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1);
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.left-container {
|
||||
|
@ -407,7 +418,6 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
// margin-top: 30rpx;
|
||||
|
||||
.left-img {
|
||||
width: 93rpx;
|
||||
|
@ -424,8 +434,6 @@
|
|||
margin: 10rpx;
|
||||
border: 1rpx solid #dae8fa;
|
||||
background: linear-gradient(to bottom, #fff1db, #ffe2b2);
|
||||
// width: calc(100% - 20rpx);
|
||||
// height: calc(100% - 20rpx);
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -440,8 +448,6 @@
|
|||
margin: 10rpx;
|
||||
border: 1rpx solid #dae8fa;
|
||||
background: linear-gradient(to bottom, #f1eeff, #e3deff);
|
||||
// width: calc(100% - 20rpx);
|
||||
// height: calc(100% - 20rpx);
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
@ -55,9 +55,7 @@
|
|||
<view
|
||||
:class="(clickX === index0 && clickY ===index1) ? `title-time-border-blue` : ``"
|
||||
class="super-card-time-card" style="position: relative;"
|
||||
@click="rulerTouchClick(item1,index0,index1,$event)"
|
||||
@touchstart="rulerTouchStart()" @touchmove="rulerTouchMove()"
|
||||
@touchend="rulerTouchEnd()" :data-index0="index0" :data-index1="index1">
|
||||
@touchend="handleTap(item1,index0,index1,$event)" :data-index0="index0" :data-index1="index1">
|
||||
|
||||
<view :class="getClass(item1,index0,index1)"
|
||||
style="font-size: 30rpx;overflow: hidden;">
|
||||
|
@ -101,7 +99,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 长按的弹出层` -->
|
||||
<view v-show="isopen" class="popup-overlay" @click="closeIsOpen">
|
||||
<view v-show="isopen" class="popup-overlay" @click="isopen=false">
|
||||
<view class="popup-overlay-content"
|
||||
:style="{ top: (2*openY - 350) + 'rpx',left: (2*openX - 780) + 'rpx',opacity: isopacity ? 1 : 0,backgroundColor:timearr[clickY]?.children[clickX]?.type==='日常'? '#fffcf6':'rgb(246, 244, 254)' }"
|
||||
@click.stop>
|
||||
|
@ -229,7 +227,7 @@
|
|||
timearr.value.forEach((element : any) => {
|
||||
// 循环直到长度达到 7
|
||||
while (element.children.length < 8) {
|
||||
element.children.push({ value: "" });
|
||||
element.children.push({ directiveName: "" });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -293,40 +291,59 @@
|
|||
const routerBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
const closeIsOpen = (event : any) => {
|
||||
const touch = event.touches[0];
|
||||
let clientX = (Math.floor(touch.clientX))
|
||||
let clientY = (Math.floor(touch.clientY))
|
||||
const query = uni.createSelectorQuery()
|
||||
query
|
||||
.selectAll('.super-card-time-card')
|
||||
.boundingClientRect((data : any) => {
|
||||
data.forEach(async (res : any) => {
|
||||
// 根据你的条件筛选元素
|
||||
if (res.dataset.index0 == clickX.value && res.dataset.index1 == clickY.value) {
|
||||
if (clientX >= Math.floor(res.left) && clientX <= Math.floor(res.right) &&
|
||||
clientY >= Math.floor(res.top) && clientY <= Math.floor(res.bottom)) {
|
||||
//调用上一个页面中的方法
|
||||
const closeIsOpen = (index0 : number, index1 : number,) => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
success: () => {
|
||||
uni.$emit('where', {
|
||||
index0: clickX.value,
|
||||
index1: clickY.value,
|
||||
index0: index0,
|
||||
index1: index1,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
//处理空行,把空行全干掉
|
||||
const changeWhiteLine = () => {
|
||||
let emptyChildIndices = [];
|
||||
//找空行
|
||||
changetimearr.value.forEach((res : any, rowIndex : number) => {
|
||||
emptyChildIndices = [];
|
||||
// 遍历 res.children 数组中的每个子元素 child
|
||||
res.children.forEach((child, index) => {
|
||||
// 检查 child 的 value 属性是否为空
|
||||
if (child.directiveName === null || child.directiveName === '' || child.directiveName === undefined) {
|
||||
|
||||
// 如果是空值,检查其他 res.children 中相同索引的元素
|
||||
const isEmptyInAllRows = changetimearr.value.every((otherRes) => {
|
||||
const otherChild = otherRes.children[index];
|
||||
return otherChild.directiveName === '';
|
||||
});
|
||||
// 如果在所有行中该位置的 directiveName 都为空,记录该索引
|
||||
if (isEmptyInAllRows) {
|
||||
emptyChildIndices.push(index);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
.exec()
|
||||
setTimeout(() => {
|
||||
isopen.value = false;
|
||||
clickX.value = -1;
|
||||
clickY.value = -1
|
||||
}, 100)
|
||||
// emptyChildIndices.forEach((item : number) => {
|
||||
// changetimearr.value.forEach((element : any) => {
|
||||
// element.children.splice(item, 1)
|
||||
// })
|
||||
// })
|
||||
const sortedIndices = [...emptyChildIndices].sort((a, b) => b - a);
|
||||
changetimearr.value.forEach((element : any) => {
|
||||
sortedIndices.forEach(idx => {
|
||||
element.children.splice(idx, 1);
|
||||
});
|
||||
});
|
||||
if (changetimearr.value[0].children.length < 8) {
|
||||
changetimearr.value.forEach((element : any) => {
|
||||
// 循环直到长度达到 7
|
||||
while (element.children.length < 8) {
|
||||
element.children.push({ directiveName: "" });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
const changeTarget = (index : number) => {
|
||||
if (buttonTarget.value !== index) {
|
||||
|
@ -347,6 +364,7 @@
|
|||
}
|
||||
})
|
||||
})
|
||||
changeWhiteLine()
|
||||
break;
|
||||
case 2:
|
||||
changetimearr.value = JSON.parse(JSON.stringify(timearr.value));
|
||||
|
@ -359,10 +377,41 @@
|
|||
}
|
||||
})
|
||||
})
|
||||
|
||||
changeWhiteLine()
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 上一次触摸结束的时间戳
|
||||
const lastTap = ref(0)
|
||||
// 单击逻辑的定时器 ID
|
||||
const clickTimer = ref(null)
|
||||
// 页面显示信息
|
||||
// const message = ref('请单击或双击此区域')
|
||||
|
||||
function handleTap(item : any, index0 : number, index1 : number, e : any) {
|
||||
const now = Date.now()
|
||||
// 先清除之前的单击定时器,防止误触
|
||||
if (clickTimer.value != null) {
|
||||
clearTimeout(clickTimer.value)
|
||||
}
|
||||
// 如果两次触摸间隔小于 250ms,则判定双击
|
||||
if (now - lastTap.value < 250) {
|
||||
// message.value = '检测到双击事件'
|
||||
// console.log('双击逻辑执行')
|
||||
closeIsOpen(index0, index1)
|
||||
lastTap.value = 0 // 重置,避免连续三次触发
|
||||
} else {
|
||||
// 延迟 250ms 执行单击逻辑,以等待可能的第二次触摸
|
||||
clickTimer.value = setTimeout(() => {
|
||||
// message.value = '检测到单击事件'
|
||||
// console.log('单击逻辑执行')
|
||||
rulerTouchClick(item, index0, index1, e)
|
||||
}, 250)
|
||||
lastTap.value = now
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 218 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 705 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 693 B |
After Width: | Height: | Size: 563 B |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 739 KiB |
|
@ -1 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FB2D473","name":"养老App","version":{"name":"1.0.9","code":109},"description":"养老App","developer":{"name":"","email":"","url":""},"permissions":{"Share":{},"Camera":{},"VideoPlayer":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"abiFilters":["armeabi-v7a","arm64-v8a","x86"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNIFB2D473","aliasname":"__uni__fb2d473","password":"Z4Urhm9jqwqMGoeQNpGzJA==","storepwd":"Z4Urhm9jqwqMGoeQNpGzJA==","keypwd":"Z4Urhm9jqwqMGoeQNpGzJA==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}},"share":{"weixin":{"UniversalLinks":"","appid":"wxda748470da82886e"}}},"orientation":"portrait-primary"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"4.57","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}},"adid":"122926210510"},"app-harmony":{"useragent":{"value":"uni-app","concatenate":true},"uniStatistics":{"enable":false}},"screenOrientation":["landscape-primary","landscape-secondary"],"launch_path":"__uniappview.html"}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FB2D473","name":"养老App","version":{"name":"1.1.2","code":112},"description":"养老App","developer":{"name":"","email":"","url":""},"permissions":{"Share":{},"Camera":{},"VideoPlayer":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"google":{"abiFilters":["armeabi-v7a","arm64-v8a","x86"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNIFB2D473","aliasname":"__uni__fb2d473","password":"Z4Urhm9jqwqMGoeQNpGzJA==","storepwd":"Z4Urhm9jqwqMGoeQNpGzJA==","keypwd":"Z4Urhm9jqwqMGoeQNpGzJA==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"dSYMs":false,"devices":"universal"},"plugins":{"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}},"share":{"weixin":{"UniversalLinks":"","appid":"wxda748470da82886e"}}},"orientation":"portrait-primary"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"4.57","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}},"adid":"122926210510"},"app-harmony":{"useragent":{"value":"uni-app","concatenate":true},"uniStatistics":{"enable":false}},"screenOrientation":["landscape-primary","landscape-secondary"],"launch_path":"__uniappview.html"}
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.1 KiB |