日程表预览

This commit is contained in:
Teng 2026-01-06 08:51:58 +08:00
parent 5ce6b38f90
commit fec62e4525
2 changed files with 29 additions and 29 deletions

View File

@ -1605,15 +1605,9 @@
})
}
const routerPush = () => {
uni.setStorage({
key: 'myArray',
data: timearr.value,
success: function () {
uni.navigateTo({
url: `/pages/timeMatrix/indexnew`
})
},
});
uni.navigateTo({
url: `/pages/timeMatrix/indexnew`
})
}
//
const saveRulerTime = ref({

View File

@ -110,7 +110,7 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, computed, nextTick, reactive, watch } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { getNclist } from "@/component/rightItemssecond/api.js";
import { getNclist } from "@/pages/NursingNew/component/nurse/api.js";
import specialDrawerVue from './drawer/specialDrawer.vue';
import rightroll from './drawer/index.vue';
// import addball from "./addball.vue"
@ -120,7 +120,7 @@
// import joystick from '@/component/public/newgame/joysticknew.vue';
//
const darkFans = ref(false);
const timearr = ref([]);
type darkFanstype = {
darkFans : boolean
}
@ -246,27 +246,33 @@
const heightType = ref(180);
const cardFont = ref(0);
const bili = ref(0)
//
onLoad((options) => {
let arr = uni.getStorageSync('myArray');
timearr.value = arr
if (timearr.value[0].children.length < 8) {
timearr.value.forEach((element : any) => {
// 7
while (element.children.length < 8) {
element.children.push({ directiveName: "" });
}
});
// 5 12
const minuteArr = ['00', '05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55']
const timearr = ref(
Array.from({ length: 24 }, (_, hour) => ({
positioning: hour.toString(),
children: minuteArr.map(time => ({
tagName: time, // '00', '05'
directiveName: '' // directiveName
}))
}))
)
const geteverything = () => {
if (uni.getStorageSync('nuId') && uni.getStorageSync('elderId')) {
getNclist(uni.getStorageSync('nuId'), uni.getStorageSync('elderId')).then((res : any) => {
res.result.serviceList.forEach((res : any) => {
timearr.value[res.positioning].children[res.positioningLong] = res;
})
})
}
changetimearr.value = JSON.parse(JSON.stringify(timearr.value));
// scrollLeft.value = 740
changetimearr.value = timearr.value;
}
//
onLoad(() => {
//
geteverything()
scalcType.value = 7
centerCell()
// widthType.value = 247;
// scrollLeft.value = 740;
// heightType.value = 140
});
const changeType = (number : number) => {