日程表预览
This commit is contained in:
parent
5ce6b38f90
commit
fec62e4525
|
|
@ -1605,15 +1605,9 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const routerPush = () => {
|
const routerPush = () => {
|
||||||
uni.setStorage({
|
|
||||||
key: 'myArray',
|
|
||||||
data: timearr.value,
|
|
||||||
success: function () {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/timeMatrix/indexnew`
|
url: `/pages/timeMatrix/indexnew`
|
||||||
})
|
})
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
// 暂存器
|
// 暂存器
|
||||||
const saveRulerTime = ref({
|
const saveRulerTime = ref({
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, reactive, watch } from 'vue';
|
import { ref, onMounted, onBeforeUnmount, computed, nextTick, reactive, watch } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
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 specialDrawerVue from './drawer/specialDrawer.vue';
|
||||||
import rightroll from './drawer/index.vue';
|
import rightroll from './drawer/index.vue';
|
||||||
// import addball from "./addball.vue"
|
// import addball from "./addball.vue"
|
||||||
|
|
@ -120,7 +120,7 @@
|
||||||
// import joystick from '@/component/public/newgame/joysticknew.vue';
|
// import joystick from '@/component/public/newgame/joysticknew.vue';
|
||||||
// 暗黑模式
|
// 暗黑模式
|
||||||
const darkFans = ref(false);
|
const darkFans = ref(false);
|
||||||
const timearr = ref([]);
|
|
||||||
type darkFanstype = {
|
type darkFanstype = {
|
||||||
darkFans : boolean
|
darkFans : boolean
|
||||||
}
|
}
|
||||||
|
|
@ -246,27 +246,33 @@
|
||||||
const heightType = ref(180);
|
const heightType = ref(180);
|
||||||
const cardFont = ref(0);
|
const cardFont = ref(0);
|
||||||
const bili = ref(0)
|
const bili = ref(0)
|
||||||
|
// 定义每小时中的分钟数组,表示每 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 = timearr.value;
|
||||||
|
}
|
||||||
// 生命周期钩子
|
// 生命周期钩子
|
||||||
onLoad((options) => {
|
onLoad(() => {
|
||||||
let arr = uni.getStorageSync('myArray');
|
// 获得数据
|
||||||
timearr.value = arr
|
geteverything()
|
||||||
if (timearr.value[0].children.length < 8) {
|
|
||||||
timearr.value.forEach((element : any) => {
|
|
||||||
// 循环直到长度达到 7
|
|
||||||
while (element.children.length < 8) {
|
|
||||||
element.children.push({ directiveName: "" });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
changetimearr.value = JSON.parse(JSON.stringify(timearr.value));
|
|
||||||
// scrollLeft.value = 740
|
|
||||||
|
|
||||||
scalcType.value = 7
|
scalcType.value = 7
|
||||||
centerCell()
|
centerCell()
|
||||||
// widthType.value = 247;
|
|
||||||
// scrollLeft.value = 740;
|
|
||||||
// heightType.value = 140
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const changeType = (number : number) => {
|
const changeType = (number : number) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue