🔥 管理端打卡照片去掉主图角标
主图角标按分组下标标在第一张上,既没有独立字段也不能切换,与司机端一致删除;v-for 不再需要下标。
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
:class="{ 'punch-record-photos__grid--edit': editable }"
|
:class="{ 'punch-record-photos__grid--edit': editable }"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(item, groupIndex) in group.items"
|
v-for="item in group.items"
|
||||||
:key="`${item.photo.url}-${item.index}`"
|
:key="`${item.photo.url}-${item.index}`"
|
||||||
class="punch-record-photos__item"
|
class="punch-record-photos__item"
|
||||||
@click="handlePreview(item.index)"
|
@click="handlePreview(item.index)"
|
||||||
@@ -23,8 +23,6 @@
|
|||||||
:lazy="lazy"
|
:lazy="lazy"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
/>
|
/>
|
||||||
<!-- 主图 = 该类型的第一张,按上传顺序取;没有独立字段,也不可切换 -->
|
|
||||||
<div v-if="groupIndex === 0" class="punch-record-photos__badge">主图</div>
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="editable"
|
v-if="editable"
|
||||||
class="punch-record-photos__remove"
|
class="punch-record-photos__remove"
|
||||||
@@ -59,7 +57,7 @@
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
// 打卡照片是每个打卡节点必有的一个照片类型,不由过程配置的凭证类型决定;
|
// 打卡照片是每个打卡节点必有的一个照片类型,不由过程配置的凭证类型决定;
|
||||||
// 它与各凭证类型各自最多 9 张,同一类型下第一张即界面上的「主图」。
|
// 它与各凭证类型各自最多 9 张。
|
||||||
const PUNCH_PHOTO_TYPE = '打卡照片';
|
const PUNCH_PHOTO_TYPE = '打卡照片';
|
||||||
// 照片没带类型时的兜底名称,与后端落库时的兜底口径一致
|
// 照片没带类型时的兜底名称,与后端落库时的兜底口径一致
|
||||||
const PHOTO_TYPE_FALLBACK = '凭证';
|
const PHOTO_TYPE_FALLBACK = '凭证';
|
||||||
@@ -252,18 +250,6 @@ const countText = group =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__badge {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 0 6px;
|
|
||||||
border-radius: 4px 0 4px 0;
|
|
||||||
background: rgba(64, 158, 255, 0.9);
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 18px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__remove {
|
&__remove {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
Reference in New Issue
Block a user