Commit d2964920 by pangchong

fix: 我的待办修复

parent d36f7fbc
......@@ -14,6 +14,25 @@ const useMyToDoStore = defineStore('myToDo', {
}
},
getters: {
getTypeNum(state) {
let num = 0
if (state.assignWorkNum > 0) {
num++
}
if (state.appraisalRecordNum > 0) {
num++
}
if (state.moveDecisionNum > 0) {
num++
}
if (state.technologyEvaluationNum > 0) {
num++
}
if (state.windDamageManagementNum > 0) {
num++
}
return num
},
getTotal(state) {
const total =
state.assignWorkNum + state.appraisalRecordNum + state.moveDecisionNum + state.technologyEvaluationNum + state.windDamageManagementNum
......
......@@ -32,12 +32,12 @@ import useMyToDoStore from 'mocp/store/my-toDo'
import { storeToRefs } from 'pinia'
const { windowHeight, safeAreaInsets } = uni.getSystemInfoSync()
const myToDoStore = useMyToDoStore()
const { getTotal, getTypeNum } = storeToRefs(myToDoStore)
//内容高度-nav高度-底部安全区-底部安全区
const getHeight = computed(() => {
return windowHeight - 44 - safeAreaInsets?.top - safeAreaInsets?.bottom - 75 * 5 + 'px'
return windowHeight - 44 - safeAreaInsets?.top - safeAreaInsets?.bottom - 75 * getTypeNum.value + 'px'
})
const myToDoStore = useMyToDoStore()
const { getTotal } = storeToRefs(myToDoStore)
//全部清除
const show = ref(false)
const handleRightClick = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment