服务标签内容调整

This commit is contained in:
1378012178@qq.com 2025-11-07 09:49:55 +08:00
parent 123f868235
commit 424606b95c
4 changed files with 70 additions and 68 deletions

View File

@ -21,32 +21,32 @@ export const columns: BasicColumn[] = [
align: 'center', align: 'center',
dataIndex: 'directiveName', dataIndex: 'directiveName',
}, },
{ // {
title: '体型标签', // title: '体型标签',
align: 'center', // align: 'center',
dataIndex: 'bodyTagList', // dataIndex: 'bodyTagList',
ellipsis: false, // ellipsis: false,
format(text, record, index) { // format(text, record, index) {
if (!!text) { // if (!!text) {
return text.map((item) => item.tagName).join('、'); // return text.map((item) => item.tagName).join('、');
} else { // } else {
return '-'; // return '-';
} // }
}, // },
}, // },
{ // {
title: '情绪标签', // title: '情绪标签',
align: 'center', // align: 'center',
dataIndex: 'emotionTagList', // dataIndex: 'emotionTagList',
ellipsis: false, // ellipsis: false,
format(text, record, index) { // format(text, record, index) {
if (!!text) { // if (!!text) {
return text.map((item) => item.tagName).join('、'); // return text.map((item) => item.tagName).join('、');
} else { // } else {
return '-'; // return '-';
} // }
}, // },
}, // },
{ {
title: '周期类型', title: '周期类型',
align: 'center', align: 'center',
@ -58,7 +58,7 @@ export const selectedColumns: BasicColumn[] = [
{ {
title: '分类标签', title: '分类标签',
align: 'center', align: 'center',
dataIndex: 'instructionTagId', dataIndex: 'instructionName',
}, },
{ {
title: '服务类别', title: '服务类别',
@ -75,32 +75,32 @@ export const selectedColumns: BasicColumn[] = [
align: 'center', align: 'center',
dataIndex: 'directiveName', dataIndex: 'directiveName',
}, },
{ // {
title: '体型标签', // title: '体型标签',
align: 'center', // align: 'center',
dataIndex: 'bodyTagList', // dataIndex: 'bodyTagList',
ellipsis: false, // ellipsis: false,
format(text, record, index) { // format(text, record, index) {
if (!!text) { // if (!!text) {
return text.map((item) => item.tagName).join('、'); // return text.map((item) => item.tagName).join('、');
} else { // } else {
return '-'; // return '-';
} // }
}, // },
}, // },
{ // {
title: '情绪标签', // title: '情绪标签',
align: 'center', // align: 'center',
dataIndex: 'emotionTagList', // dataIndex: 'emotionTagList',
ellipsis: false, // ellipsis: false,
format(text, record, index) { // format(text, record, index) {
if (!!text) { // if (!!text) {
return text.map((item) => item.tagName).join('、'); // return text.map((item) => item.tagName).join('、');
} else { // } else {
return '-'; // return '-';
} // }
}, // },
}, // },
{ {
title: '周期类型', title: '周期类型',
align: 'center', align: 'center',

View File

@ -10,15 +10,15 @@
<template #label><span title="服务类别">服务类别</span></template> <template #label><span title="服务类别">服务类别</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId" <j-dict-select-tag type="list" v-model:value="queryParam.categoryId"
:dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`" :dictCode="`nu_config_service_category,category_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
:ignoreDisabled="true" placeholder="请选择服务类别" allow-clear /> :ignoreDisabled="true" placeholder="请选择服务类别" allow-clear @change="queryParam.typeId = ''"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="typeId"> <a-form-item name="typeId">
<template #label><span title="服务类型">服务类型</span></template> <template #label><span title="服务类型">服务类型</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.typeId" <j-dict-select-tag type="list" v-model:value="queryParam.typeId"
:dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = ${queryParam.categoryId || -1} order by sort asc`" placeholder="请选择服务类型" :dictCode="`nu_config_service_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${queryParam.categoryId || -1}' order by sort asc`"
:ignoreDisabled="true" allowClear /> placeholder="请选择服务类型" :ignoreDisabled="true" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
@ -55,8 +55,8 @@
<a-table :columns="selectedColumns" :data-source="directiveList" :scroll="{ x: '100%', y: '32vh' }" <a-table :columns="selectedColumns" :data-source="directiveList" :scroll="{ x: '100%', y: '32vh' }"
:pagination="false" size="small"> :pagination="false" size="small">
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
<span v-if="column.dataIndex === 'instructionTagId'"> <span v-if="column.dataIndex === 'instructionName'">
{{ filterDictTextByCache('instruction_tag', text) }} {{ text || record.instructionTagId_dictText }}
</span> </span>
<span v-if="column.dataIndex === 'categoryName'"> <span v-if="column.dataIndex === 'categoryName'">
{{ text || record.categoryId_dictText }} {{ text || record.categoryId_dictText }}

View File

@ -60,12 +60,12 @@
<div> <div>
{{ directive.directiveName }} {{ directive.directiveName }}
</div> </div>
<div> <!-- <div>
体型标签{{ handleBodyTags('', directive, '') }} 体型标签{{ handleBodyTags('', directive, '') }}
</div> </div>
<div> <div>
情绪标签{{ handleEmotionTags('', directive, '') }} 情绪标签{{ handleEmotionTags('', directive, '') }}
</div> </div> -->
</div> </div>
</a-card> </a-card>
</a-badge-ribbon> </a-badge-ribbon>
@ -77,7 +77,7 @@
<a-col :span="6" style="margin-left: 1vw;"> <a-col :span="6" style="margin-left: 1vw;">
<div> <div>
<a-card title="服务指令详情" style="width: 100%"> <a-card title="服务指令详情" style="width: 100%">
<div class="">分类标签{{ filterDictTextByCache('instruction_tag', derectiveInfo.instructionTagId) }}</div> <div class="">分类标签{{ derectiveInfo.instructionName || derectiveInfo.instructionTagId_dictText }}</div>
<div class="directiveInfoClass">服务类别{{ derectiveInfo.categoryName }}</div> <div class="directiveInfoClass">服务类别{{ derectiveInfo.categoryName }}</div>
<div class="directiveInfoClass">服务类型{{ derectiveInfo.typeName }}</div> <div class="directiveInfoClass">服务类型{{ derectiveInfo.typeName }}</div>
<div class="directiveInfoClass">服务指令名称{{ derectiveInfo.directiveName }}</div> <div class="directiveInfoClass">服务指令名称{{ derectiveInfo.directiveName }}</div>
@ -85,18 +85,18 @@
</div> </div>
<div class="directiveInfoClass">服务时长(分钟){{ derectiveInfo.serviceDuration }}</div> <div class="directiveInfoClass">服务时长(分钟){{ derectiveInfo.serviceDuration }}</div>
<div class="directiveInfoClass">服务说明{{ derectiveInfo.serviceContent }}</div> <div class="directiveInfoClass">服务说明{{ derectiveInfo.serviceContent }}</div>
<div class="directiveInfoClass">体型标签{{ handleBodyTags('', derectiveInfo, '') }}</div> <!-- <div class="directiveInfoClass">体型标签{{ handleBodyTags('', derectiveInfo, '') }}</div>
<div class="directiveInfoClass">情绪标签{{ handleEmotionTags('', derectiveInfo, '') }}</div> <div class="directiveInfoClass">情绪标签{{ handleEmotionTags('', derectiveInfo, '') }}</div> -->
<div class="directiveInfoClass">语音文件 <div class="directiveInfoClass">语音文件
<span v-if="!derectiveInfo.mp3File">暂无文件</span> <span v-if="!derectiveInfo.mp3File">暂无文件</span>
<audio controls disabled="false" v-else> <audio controls disabled="false" v-else>
<source :src="getFileAccessHttpUrl(derectiveInfo.mp3File)"> <source :src="opeMediaAddress + derectiveInfo.mp3File">
</audio> </audio>
</div> </div>
<div class="directiveInfoClass">视频文件 <div class="directiveInfoClass">视频文件
<span v-if="!derectiveInfo.mp4File">暂无文件</span> <span v-if="!derectiveInfo.mp4File">暂无文件</span>
<video controls v-else> <video controls v-else>
<source :src="getFileAccessHttpUrl(derectiveInfo.mp4File)"> <source :src="opeMediaAddress + derectiveInfo.mp4File">
</video> </video>
</div> </div>
</a-card> </a-card>
@ -112,6 +112,7 @@ import { list, queryById, deleteOne } from '../ServiceTag.api'
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'; import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil'; import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil';
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const selectedDirective = ref({ id: '' }) const selectedDirective = ref({ id: '' })
const registerModal = ref(); const registerModal = ref();
const searchForm = ref({}) const searchForm = ref({})

View File

@ -48,7 +48,7 @@
</a-card> </a-card>
<div> <div>
<a-card title="服务指令详情" style="width: 25vw"> <a-card title="服务指令详情" style="width: 25vw">
<div class="">分类标签{{ filterDictTextByCache('instruction_tag', derectiveInfo.instructionTagId) }}</div> <div class="">分类标签{{ derectiveInfo.instructionName || derectiveInfo.instructionTagId_dictText }}</div>
<div class="directiveInfoClass">服务类别{{ derectiveInfo.categoryName || derectiveInfo.categoryId_dictText }} <div class="directiveInfoClass">服务类别{{ derectiveInfo.categoryName || derectiveInfo.categoryId_dictText }}
</div> </div>
<div class="directiveInfoClass">服务类型{{ derectiveInfo.typeName || derectiveInfo.typeId_dictText }}</div> <div class="directiveInfoClass">服务类型{{ derectiveInfo.typeName || derectiveInfo.typeId_dictText }}</div>
@ -61,13 +61,13 @@
<div class="directiveInfoClass">语音文件 <div class="directiveInfoClass">语音文件
<span v-if="!derectiveInfo.mp3FileMedia">暂无文件</span> <span v-if="!derectiveInfo.mp3FileMedia">暂无文件</span>
<audio controls disabled="false" v-else> <audio controls disabled="false" v-else>
<source :src="getFileAccessHttpUrl(derectiveInfo.mp3FileMedia)"> <source :src="opeMediaAddress + derectiveInfo.mp3FileMedia">
</audio> </audio>
</div> </div>
<div class="directiveInfoClass">视频文件 <div class="directiveInfoClass">视频文件
<span v-if="!derectiveInfo.mp4FileMedia">暂无文件</span> <span v-if="!derectiveInfo.mp4FileMedia">暂无文件</span>
<video controls v-else> <video controls v-else>
<source :src="getFileAccessHttpUrl(derectiveInfo.mp4FileMedia)"> <source :src="opeMediaAddress + derectiveInfo.mp4FileMedia">
</video> </video>
</div> </div>
</a-card> </a-card>
@ -112,6 +112,7 @@ import ServiceTagList from './ServiceTagList.vue'
import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil'; import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
const title = ref<string>(''); const title = ref<string>('');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);