4.16
|
@ -0,0 +1,88 @@
|
||||||
|
<template>
|
||||||
|
|
||||||
|
<view class="move-circle">
|
||||||
|
<!-- 上 -->
|
||||||
|
<view class="up-container" @click="handleClick('up', 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>
|
||||||
|
<!-- 下 -->
|
||||||
|
<view class="down-container" @click="handleClick('down', 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>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive } from 'vue'
|
||||||
|
const emit = defineEmits(['movecard'])
|
||||||
|
|
||||||
|
const icons = reactive({
|
||||||
|
up: '/static/index/movemode/upicon.png',
|
||||||
|
right: '/static/index/movemode/righticon.png',
|
||||||
|
down: '/static/index/movemode/downicon.png',
|
||||||
|
left: '/static/index/movemode/lefticon.png'
|
||||||
|
})
|
||||||
|
|
||||||
|
function handleClick(key, dir) {
|
||||||
|
icons[key] = `/static/index/movemode/blue${key}icon.png`
|
||||||
|
emit('movecard', dir)
|
||||||
|
|
||||||
|
// 延迟一点时间再恢复图标(视觉反馈)
|
||||||
|
setTimeout(() => {
|
||||||
|
icons[key] = `/static/index/movemode/${key}icon.png`
|
||||||
|
}, 150)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.move-circle {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 300rpx;
|
||||||
|
left: -200rpx;
|
||||||
|
width: 350rpx;
|
||||||
|
height: 350rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: rgba(127, 127, 127, 0.3);
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
.container-img {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
.up-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 115rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
.down-container {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 115rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
.right-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 115rpx;
|
||||||
|
right: 5rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
.left-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 115rpx;
|
||||||
|
left: 0rpx;
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,74 @@
|
||||||
|
<template>
|
||||||
|
<view class="all-circle">
|
||||||
|
<view class="move-circle" >
|
||||||
|
移动
|
||||||
|
</view>
|
||||||
|
<view class="delete-circle" >
|
||||||
|
删除
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {
|
||||||
|
ref
|
||||||
|
} from 'vue'
|
||||||
|
const emit = defineEmits(['click']);
|
||||||
|
const isAdd = ref(false);
|
||||||
|
const openAdd = () =>{
|
||||||
|
isAdd.value = !isAdd.value
|
||||||
|
}
|
||||||
|
const addClass = (type: number) => {
|
||||||
|
switch (type) {
|
||||||
|
case 0:
|
||||||
|
return 'add-circle';
|
||||||
|
case 1:
|
||||||
|
return 'add-circle-active';
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.all-circle{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 300rpx;
|
||||||
|
right: 50rpx;
|
||||||
|
width: 500rpx;
|
||||||
|
height: 500rpx;
|
||||||
|
}
|
||||||
|
.move-circle{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 200rpx;
|
||||||
|
right: 60rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: linear-gradient(to top, #0DA0B1, #04D3AF);
|
||||||
|
opacity:0.5;
|
||||||
|
z-index: 9999;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 35rpx;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.delete-circle{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 50rpx;
|
||||||
|
right: 200rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: linear-gradient(to top, #0DA0B1, #04D3AF);
|
||||||
|
opacity:0.5;
|
||||||
|
z-index: 9999;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 35rpx;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,90 @@
|
||||||
|
<template>
|
||||||
|
<view class="all-circle">
|
||||||
|
<view class="move-circle" @click="confirm">
|
||||||
|
确认
|
||||||
|
</view>
|
||||||
|
<view v-show="clickstauts" class="delete-circle" @click="back">
|
||||||
|
返回
|
||||||
|
</view>
|
||||||
|
<view v-show="!clickstauts" class="delete-circle-bad" @click="back">
|
||||||
|
关闭
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {
|
||||||
|
ref
|
||||||
|
} from 'vue'
|
||||||
|
const emit = defineEmits(['clickcircle']);
|
||||||
|
const props = defineProps({
|
||||||
|
clickstauts: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
const confirm = () =>{
|
||||||
|
emit('clickcircle',0)
|
||||||
|
}
|
||||||
|
const back = () =>{
|
||||||
|
emit('clickcircle',1)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.all-circle{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 300rpx;
|
||||||
|
right: 50rpx;
|
||||||
|
width: 500rpx;
|
||||||
|
height: 500rpx;
|
||||||
|
}
|
||||||
|
.move-circle{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 200rpx;
|
||||||
|
right: 40rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
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{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 50rpx;
|
||||||
|
right: 150rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
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-bad{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 50rpx;
|
||||||
|
right: 150rpx;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #c2c9d3;
|
||||||
|
z-index: 9999;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 35rpx;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,93 @@
|
||||||
|
<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>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.all-circle {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 300rpx;
|
||||||
|
right: 50rpx;
|
||||||
|
width: 400rpx;
|
||||||
|
height: 500rpx;
|
||||||
|
background-color: rgba(127, 127, 127, 0.1);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
z-index: 999;
|
||||||
|
display: flex;
|
||||||
|
// justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
.doctorsay-container-up {
|
||||||
|
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);
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.doctorsay-container-card-font-dark {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin-top: -10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -549,7 +549,7 @@
|
||||||
border: 2rpx solid;
|
border: 2rpx solid;
|
||||||
|
|
||||||
.right-container-title-class-anhei {
|
.right-container-title-class-anhei {
|
||||||
font-size: 20rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,15 +21,9 @@
|
||||||
<image class="right-icons-img-icon"
|
<image class="right-icons-img-icon"
|
||||||
:src="darkFans?`/static/index/undericons/out.png`:`/static/index/undericons/outlight.png`" />
|
:src="darkFans?`/static/index/undericons/out.png`:`/static/index/undericons/outlight.png`" />
|
||||||
</view>
|
</view>
|
||||||
<view class="right-container-title-class-anhei-button" @click="darkFanschange()" v-show="!darkFans">
|
<view class="right-container-title-class-anhei-button" @click="newchange()">
|
||||||
<text class="right-container-title-class-anhei">
|
<text class="right-container-title-class-anhei">
|
||||||
切换到暗黑模式
|
手柄模式
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="right-container-title-class-anhei-button" :style="darkFans ? { backgroundColor:'#fff' } : {}"
|
|
||||||
@click="darkFanschange()" v-show="darkFans">
|
|
||||||
<text class="right-container-title-class-anhei" :style="darkFans ? { color: 'black' } : {}">
|
|
||||||
取消暗黑模式
|
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -423,7 +417,6 @@
|
||||||
import { getServiceTree, getNclist, addBatch } from "./api.js";
|
import { getServiceTree, getNclist, addBatch } from "./api.js";
|
||||||
import index from '../../request';
|
import index from '../../request';
|
||||||
import { myArray } from './yaoshandiao.js';
|
import { myArray } from './yaoshandiao.js';
|
||||||
import { saveArray } from './yaoshande';
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isshow: {
|
isshow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -611,11 +604,12 @@
|
||||||
}
|
}
|
||||||
// 初始化下面侧单列表
|
// 初始化下面侧单列表
|
||||||
const doctorsayList = ref<roomBtttonType[]>([
|
const doctorsayList = ref<roomBtttonType[]>([
|
||||||
|
{ 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/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/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/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: '排泻' },
|
{ url: '/static/index/doctorsay/light/shi.png', targetUrl: '/static/index/doctorsay/dark/shi.png', name: '排泻' },
|
||||||
{ url: '/static/index/doctorsay/light/use.png', targetUrl: '/static/index/doctorsay/dark/use.png', name: '日常' },
|
|
||||||
|
|
||||||
]);
|
]);
|
||||||
// 当前选中的菜单索引
|
// 当前选中的菜单索引
|
||||||
|
@ -628,11 +622,14 @@
|
||||||
const underFans = ref<boolean>(false);
|
const underFans = ref<boolean>(false);
|
||||||
// 当前选中的菜单索引
|
// 当前选中的菜单索引
|
||||||
const roomTar = ref<number[]>([]);
|
const roomTar = ref<number[]>([]);
|
||||||
const emit = defineEmits(['darkchange', 'savename', 'saveruler', 'closename', 'changefangkuang']);
|
const emit = defineEmits(['darkchange', 'savename', 'saveruler', 'closename', 'changefangkuang', 'changeold']);
|
||||||
// 暗黑模式改变
|
// 暗黑模式改变
|
||||||
const darkFanschange = () => {
|
const darkFanschange = () => {
|
||||||
emit('darkchange', !props.darkFans);
|
emit('darkchange', !props.darkFans);
|
||||||
}
|
}
|
||||||
|
const newchange = () => {
|
||||||
|
emit('changeold', false)
|
||||||
|
}
|
||||||
//变更左侧菜单
|
//变更左侧菜单
|
||||||
const changLeft = (index : number) => {
|
const changLeft = (index : number) => {
|
||||||
upmenuIndex.value = index
|
upmenuIndex.value = index
|
||||||
|
@ -1087,7 +1084,7 @@
|
||||||
//表格拖动结束
|
//表格拖动结束
|
||||||
const rulerEnd = async (res : any) => {
|
const rulerEnd = async (res : any) => {
|
||||||
isBack.value = false;
|
isBack.value = false;
|
||||||
|
console.log("!!!!", props.liang.index0 !== 999 && res)
|
||||||
if (props.liang.index0 !== 999 && res) {
|
if (props.liang.index0 !== 999 && res) {
|
||||||
//检测拖动是否超出范围和是否不合法
|
//检测拖动是否超出范围和是否不合法
|
||||||
if (redNameindex0.value.includes(props.liang.index0 + (currentNumber.value * 6)) || redNameindex1.value !== props.liang.index1) {
|
if (redNameindex0.value.includes(props.liang.index0 + (currentNumber.value * 6)) || redNameindex1.value !== props.liang.index1) {
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
|
@ -52,8 +52,9 @@ onMounted(() => {
|
||||||
// 触摸开始:记录初始位置,同时启动长按定时器
|
// 触摸开始:记录初始位置,同时启动长按定时器
|
||||||
function handleTouchStart(e) {
|
function handleTouchStart(e) {
|
||||||
const touch = e.touches[0];
|
const touch = e.touches[0];
|
||||||
startTouchX = touch.clientX;
|
// console.log("????0",touch.clientX )
|
||||||
startTouchY = touch.clientY;
|
startTouchX = touch.clientX.toFixed(2);
|
||||||
|
startTouchY = touch.clientY.toFixed(2);
|
||||||
initialLeft = ballLeft.value;
|
initialLeft = ballLeft.value;
|
||||||
initialTop = ballTop.value;
|
initialTop = ballTop.value;
|
||||||
|
|
||||||
|
@ -65,11 +66,13 @@ function handleTouchStart(e) {
|
||||||
|
|
||||||
// 触摸移动:如果进入拖动状态,则计算新位置,同时限制悬浮球不超出屏幕边界
|
// 触摸移动:如果进入拖动状态,则计算新位置,同时限制悬浮球不超出屏幕边界
|
||||||
function handleTouchMove(e) {
|
function handleTouchMove(e) {
|
||||||
|
|
||||||
// 如果尚未进入拖动状态,且手指移动距离较大,则可以提前进入拖动模式
|
// 如果尚未进入拖动状态,且手指移动距离较大,则可以提前进入拖动模式
|
||||||
if (!isDragging.value) {
|
if (!isDragging.value) {
|
||||||
const touch = e.touches[0];
|
const touch = e.touches[0];
|
||||||
const deltaX = Math.abs(touch.clientX - startTouchX);
|
// console.log("????0",touch.clientX )
|
||||||
const deltaY = Math.abs(touch.clientY - startTouchY);
|
const deltaX = Math.abs(touch.clientX.toFixed(2) - startTouchX);
|
||||||
|
const deltaY = Math.abs(touch.clientY.toFixed(2) - startTouchY);
|
||||||
if(deltaX > 5 || deltaY > 5){
|
if(deltaX > 5 || deltaY > 5){
|
||||||
clearTimeout(longPressTimer);
|
clearTimeout(longPressTimer);
|
||||||
isDragging.value = true;
|
isDragging.value = true;
|
||||||
|
@ -78,9 +81,11 @@ function handleTouchMove(e) {
|
||||||
|
|
||||||
// 正在拖动,更新悬浮球位置
|
// 正在拖动,更新悬浮球位置
|
||||||
if(isDragging.value){
|
if(isDragging.value){
|
||||||
|
|
||||||
const touch = e.touches[0];
|
const touch = e.touches[0];
|
||||||
let newLeft = initialLeft + (touch.clientX - startTouchX);
|
// console.log("????0",touch.clientX )
|
||||||
let newTop = initialTop + (touch.clientY - startTouchY);
|
let newLeft = initialLeft + (touch.clientX.toFixed(2) - startTouchX);
|
||||||
|
let newTop = initialTop + (touch.clientY.toFixed(2) - startTouchY);
|
||||||
// 限制左右边界:不让超出屏幕(计算时需要考虑悬浮球自身尺寸)
|
// 限制左右边界:不让超出屏幕(计算时需要考虑悬浮球自身尺寸)
|
||||||
newLeft = Math.max(0, Math.min(newLeft, windowWidth - ballWidth));
|
newLeft = Math.max(0, Math.min(newLeft, windowWidth - ballWidth));
|
||||||
// 限制上下边界
|
// 限制上下边界
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
},
|
},
|
||||||
updatebusiness: function(that){ //具体升级的业务逻辑
|
updatebusiness: function(that){ //具体升级的业务逻辑
|
||||||
uni.request({
|
uni.request({
|
||||||
url: `http://smartnu.blxinchuang.com/nursing-unit/api/pad/versionUpdate?platform=1&version=${that.currentversion}`,
|
url: `http://121.36.88.64/nursing-unit/api/pad/versionUpdate?platform=1&version=${that.currentversion}`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
@ -201,8 +201,8 @@
|
||||||
let that = this
|
let that = this
|
||||||
//console.log("升级参数:"+that.wgt_flag+" "+that.wgt_url+" "+that.version_url)
|
//console.log("升级参数:"+that.wgt_flag+" "+that.wgt_url+" "+that.version_url)
|
||||||
let downloadurl = that.wgt_flag==1?that.wgt_url:that.version_url;
|
let downloadurl = that.wgt_flag==1?that.wgt_url:that.version_url;
|
||||||
let targetUrl = "http://smartnu.blxinchuang.com/nursing-unit/sys/common/static/" + downloadurl
|
let targetUrl = "http://121.36.88.64/nursing-unit/sys/common/static/" + downloadurl
|
||||||
console.log("下载地址:"+targetUrl)
|
// console.log("下载地址:"+targetUrl)
|
||||||
this.update_confirm = true
|
this.update_confirm = true
|
||||||
this.downloadTask = uni.downloadFile({
|
this.downloadTask = uni.downloadFile({
|
||||||
url: targetUrl,
|
url: targetUrl,
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "养老App",
|
"name" : "养老App",
|
||||||
"appid" : "__UNI__FB2D473",
|
"appid" : "__UNI__FB2D473",
|
||||||
"description" : "养老App",
|
"description" : "养老App",
|
||||||
"versionName" : "1.0.8",
|
"versionName" : "1.0.9",
|
||||||
"versionCode" : 108,
|
"versionCode" : 109,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
@ -49,10 +49,14 @@
|
||||||
<!-- 主页 -->
|
<!-- 主页 -->
|
||||||
<rightItemsfirst :isshow="menuIndexshow" :darkFans="darkFans" v-show="!menuIndex" @darkchange="darkchange" />
|
<rightItemsfirst :isshow="menuIndexshow" :darkFans="darkFans" v-show="!menuIndex" @darkchange="darkchange" />
|
||||||
<!-- 超凶表格 -->
|
<!-- 超凶表格 -->
|
||||||
|
<!-- 旧表格 -->
|
||||||
<rightItemssecond ref="ruler" :liang="indexNumber" :isshow="menuIndexshowsecond" :canmove="canmove"
|
<rightItemssecond ref="ruler" :liang="indexNumber" :isshow="menuIndexshowsecond" :canmove="canmove"
|
||||||
:darkFans="darkFans" v-show="menuIndex==1" @darkchange="darkchange" @savename="openname"
|
:darkFans="darkFans" v-show="menuIndex==1&&isOld" @darkchange="darkchange" @savename="openname"
|
||||||
@saveruler="openruler" @changefangkuang="changefangkuang" @cleanname="closename" />
|
@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"
|
||||||
|
@saveruler="openruler" @changefangkuang="changefangkuang" @cleanname="closename" @changeold="isOldchange" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -60,7 +64,10 @@
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import type { Link } from "./index";
|
import type { Link } from "./index";
|
||||||
import rightItemsfirst from "../../component/rightItemsindex/index.vue"
|
import rightItemsfirst from "../../component/rightItemsindex/index.vue"
|
||||||
|
|
||||||
import rightItemssecond from "../../component/rightItemssecond/index.vue"
|
import rightItemssecond from "../../component/rightItemssecond/index.vue"
|
||||||
|
|
||||||
|
import rightItemssecondnew from "../../component/rightItemssecondnew/index.vue"
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,11 +82,13 @@
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 当前选中的菜单索引
|
// 当前选中的菜单索引
|
||||||
const menuIndex = ref<number>(0);
|
const menuIndex = ref<number>(1);
|
||||||
const menuIndexshow = ref<boolean>(false);
|
const menuIndexshow = ref<boolean>(false);
|
||||||
const menuIndexshowsecond = ref<boolean>(false);
|
const menuIndexshowsecond = ref<boolean>(false);
|
||||||
// 暗黑模式
|
// 暗黑模式
|
||||||
const darkFans = ref<boolean>(false);
|
const darkFans = ref<boolean>(false);
|
||||||
|
//旧表格还是新表格
|
||||||
|
const isOld = ref(false);
|
||||||
// 当前选中的菜单索引
|
// 当前选中的菜单索引
|
||||||
const roomTar = ref<number[]>([]);
|
const roomTar = ref<number[]>([]);
|
||||||
//滑块按钮
|
//滑块按钮
|
||||||
|
@ -92,6 +101,10 @@
|
||||||
const darkchange = (res : boolean) => {
|
const darkchange = (res : boolean) => {
|
||||||
darkFans.value = res
|
darkFans.value = res
|
||||||
}
|
}
|
||||||
|
//切换表格新旧
|
||||||
|
const isOldchange = (res:boolean) =>{
|
||||||
|
isOld.value = res;
|
||||||
|
}
|
||||||
// 变更菜单
|
// 变更菜单
|
||||||
const changeMenu = (index : number) => {
|
const changeMenu = (index : number) => {
|
||||||
if (index === 3) {
|
if (index === 3) {
|
||||||
|
@ -151,13 +164,23 @@
|
||||||
const { index0, index1 } = clickedItem.dataset;
|
const { index0, index1 } = clickedItem.dataset;
|
||||||
indexNumber.value.index0 = index0
|
indexNumber.value.index0 = index0
|
||||||
indexNumber.value.index1 = index1
|
indexNumber.value.index1 = index1
|
||||||
if (clientX.value > 2050 && canTrigger.value) {
|
|
||||||
|
if (clientX.value > 2050 && canTrigger.value && isOld.value) {
|
||||||
ruler.value?.nextItems();
|
ruler.value?.nextItems();
|
||||||
canTrigger.value = false;
|
canTrigger.value = false;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
canTrigger.value = true;
|
canTrigger.value = true;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
// console.log("AAA",clientX.value)
|
||||||
|
if (clientX.value < 350 && canTrigger.value && !isOld.value) {
|
||||||
|
|
||||||
|
rulernew.value?.nextItems();
|
||||||
|
canTrigger.value = false;
|
||||||
|
setTimeout(() => {
|
||||||
|
canTrigger.value = true;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
indexNumber.value.index0 = 999
|
indexNumber.value.index0 = 999
|
||||||
indexNumber.value.index1 = 999
|
indexNumber.value.index1 = 999
|
||||||
|
@ -200,6 +223,7 @@
|
||||||
// fangkuaiValue.value = []
|
// fangkuaiValue.value = []
|
||||||
}
|
}
|
||||||
const ruler = ref(null)
|
const ruler = ref(null)
|
||||||
|
const rulernew = ref(null)
|
||||||
//结束、禁止滑动
|
//结束、禁止滑动
|
||||||
const cleanall = () => {
|
const cleanall = () => {
|
||||||
clientX.value = 9999;
|
clientX.value = 9999;
|
||||||
|
@ -211,9 +235,18 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
if (savename.value) {
|
if (savename.value) {
|
||||||
|
if(isOld.value){
|
||||||
ruler.value?.rulerEnd(savename.value);
|
ruler.value?.rulerEnd(savename.value);
|
||||||
|
}else{
|
||||||
|
rulernew.value?.rulerEnd(savename.value);
|
||||||
|
}
|
||||||
} else if (saveruler.value.typeName) {
|
} else if (saveruler.value.typeName) {
|
||||||
|
if(isOld.value){
|
||||||
ruler.value?.rulerMoveEnd(saveruler.value);
|
ruler.value?.rulerMoveEnd(saveruler.value);
|
||||||
|
}else{
|
||||||
|
rulernew.value?.rulerMoveEnd(saveruler.value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
savename.value = "";
|
savename.value = "";
|
||||||
saveruler.value = {
|
saveruler.value = {
|
||||||
|
@ -276,7 +309,6 @@
|
||||||
changeMenu(menuIndex.value)
|
changeMenu(menuIndex.value)
|
||||||
}, 50)
|
}, 50)
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
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.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
|
@ -1 +1 @@
|
||||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FB2D473","name":"养老App","version":{"name":"1.0.8","code":108},"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.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"}
|
|
@ -7,8 +7,8 @@
|
||||||
"id": "__UNI__FB2D473",
|
"id": "__UNI__FB2D473",
|
||||||
"name": "养老App",
|
"name": "养老App",
|
||||||
"version": {
|
"version": {
|
||||||
"name": "1.0.8",
|
"name": "1.0.9",
|
||||||
"code": 108
|
"code": 109
|
||||||
},
|
},
|
||||||
"description": "养老App",
|
"description": "养老App",
|
||||||
"developer": {
|
"developer": {
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
"id": "__UNI__FB2D473",
|
"id": "__UNI__FB2D473",
|
||||||
"name": "养老App",
|
"name": "养老App",
|
||||||
"version": {
|
"version": {
|
||||||
"name": "1.0.8",
|
"name": "1.0.9",
|
||||||
"code": 108
|
"code": 109
|
||||||
},
|
},
|
||||||
"description": "养老App",
|
"description": "养老App",
|
||||||
"developer": {
|
"developer": {
|
||||||
|
|
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.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |