提交 67cf57ea authored 作者: lidongxu's avatar lidongxu

feat(mobile/plan): 已删除添加灰色背景色_不能长按和左滑

同上
上级 8711424e
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
* @returns boolean true 可编辑/删除,false 不可编辑/删除 * @returns boolean true 可编辑/删除,false 不可编辑/删除
*/ */
export const checkPlanExpire = (row) => { export const checkPlanExpire = (row) => {
// 1. 计划日期已经 1 小时后,不可编辑/删除
const date = new Date() const date = new Date()
const rowDate = new Date(row.clockInTime) const rowDate = new Date(row.clockInTime)
rowDate.setHours(rowDate.getHours() + 1) rowDate.setHours(rowDate.getHours() + 1)
// 2. 计划状态已经开始了,不可编辑/删除
return !(rowDate < date || row.planStatus === 1) return !(rowDate < date || row.planStatus === 1)
} }
\ No newline at end of file
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
v-model="item.checked" v-model="item.checked"
shape="square" /> shape="square" />
<van-cell :title="item.storeName" <van-cell :title="item.storeName"
:class="{'plan-deleted': query.isDeleted}"
@click="clickDetail(item)"> @click="clickDetail(item)">
<template #label> <template #label>
<p class="employee">{{ item.employeeName }}</p> <p class="employee">{{ item.employeeName }}</p>
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
</template> </template>
</van-cell> </van-cell>
<template #right <template #right
v-if="!showSelect"> v-if="!showSelect && !query.isDeleted">
<van-button square <van-button square
type="success" type="success"
text="编辑" text="编辑"
...@@ -226,6 +227,7 @@ onMounted(async () => { ...@@ -226,6 +227,7 @@ onMounted(async () => {
// 长按出现全选功能 // 长按出现全选功能
const showSelect = ref(false) const showSelect = ref(false)
const onLongPress = () => { const onLongPress = () => {
if (query.isDeleted) return // 已删除
showSelect.value = true showSelect.value = true
} }
...@@ -349,6 +351,9 @@ onUnmounted(() => { ...@@ -349,6 +351,9 @@ onUnmounted(() => {
} }
.van-cell { .van-cell {
&.plan-deleted{
background-color: rgb(235,235,235);
}
.van-cell__label { .van-cell__label {
font-size: 14px !important; font-size: 14px !important;
......
...@@ -220,6 +220,11 @@ defineExpose({ ...@@ -220,6 +220,11 @@ defineExpose({
width: 60%; width: 60%;
} }
/* 计划状态 */
.van-radio:nth-child(n+2){
margin-top: 20px;
}
.reset-btn { .reset-btn {
margin-top: 20px; margin-top: 20px;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论