.
This commit is contained in:
parent
55bee29a4d
commit
84498e415b
|
|
@ -78,10 +78,13 @@
|
|||
<el-table-column label="服务项目" min-width="160" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div class="service-info">
|
||||
<span class="service-name">{{ row.service?.titleZh || '-' }}</span>
|
||||
<span class="service-name">{{ row.service?.titleZh || row.hotService?.name_zh || row.serviceType || '-' }}</span>
|
||||
<el-tag size="small" type="info" v-if="row.service?.category">
|
||||
{{ row.service.category.nameZh }}
|
||||
</el-tag>
|
||||
<el-tag size="small" type="warning" v-else-if="row.hotService">
|
||||
热门服务
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const { Appointment, Service, User, Category } = require('../models');
|
||||
const HotService = require('../models/HotService');
|
||||
const { Op } = require('sequelize');
|
||||
const logger = require('../config/logger');
|
||||
|
||||
|
|
@ -61,6 +62,7 @@ const getAppointmentList = async (options = {}) => {
|
|||
model: Service,
|
||||
as: 'service',
|
||||
attributes: ['id', 'titleZh', 'titleEn', 'titlePt', 'image', 'price', 'categoryId'],
|
||||
required: false,
|
||||
include: [
|
||||
{
|
||||
model: Category,
|
||||
|
|
@ -70,6 +72,12 @@ const getAppointmentList = async (options = {}) => {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
model: HotService,
|
||||
as: 'hotService',
|
||||
attributes: ['id', 'name_zh', 'name_en', 'name_pt', 'image_url', 'service_type'],
|
||||
required: false,
|
||||
},
|
||||
{
|
||||
model: User,
|
||||
as: 'user',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user