This commit is contained in:
1378012178@qq.com 2025-07-16 08:34:16 +08:00
commit a6ac18c17f
7 changed files with 191 additions and 89 deletions

View File

@ -42,12 +42,18 @@
</a-col> </a-col>
</a-row> </a-row>
</a-col> </a-col>
<a-col :span="24">
<span class="titleOne ellipsis-two-lines">
{{ getHHMM(directive.startTimeStr) }}
~
{{ getHHMM(directive.endTimeStr) }}
</span>
</a-col>
<a-col :span="24" > <a-col :span="24" >
<a-popover :title="directive.packageName"> <a-popover :title="directive.packageName">
<template #content> <template #content>
<div style="min-width: 240px;"> <div style="min-width: 240px;">
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;" v-for="(item,index) in directive.directives">{{ item.directiveName }}</div> <div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;" v-for="(item,index) in directive.directives">{{ item.directiveName }}</div>
<div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;color:red;" v-if="directive.directives.length==0">未配置</div> <div style="max-width: 400px;line-height:30px;padding:5px;border-radius:5px;margin:5px;background:#f5f5f5;color:red;" v-if="directive.directives.length==0">未配置</div>
</div> </div>
</template> </template>
@ -83,6 +89,7 @@ import DirectivePackageModal from './components/DirectivePackageModal.vue'
import { list, queryById, deleteOne } from './DirectivePackage.api' import { list, queryById, deleteOne } from './DirectivePackage.api'
import { Pagination } from 'ant-design-vue'; import { Pagination } from 'ant-design-vue';
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import dayjs from "dayjs";
const registerModal = ref(); const registerModal = ref();
const searchForm = ref({}) const searchForm = ref({})
@ -107,6 +114,15 @@ function handleChangeIzEnabled(record){
searchQuery() searchQuery()
}); });
} }
function getHHMM(value){
if(value){
return dayjs(value).format('HH:mm')
}else{
return '未配置'
}
}
/** /**
* 搜索 * 搜索
*/ */
@ -231,7 +247,7 @@ onMounted(() => {
.cardDivClass:hover{ .cardDivClass:hover{
padding: 5px;background-color: #f4fcff;border-radius: 8px;height: 180px; padding: 5px;background-color: #f4fcff;border-radius: 8px;height: 180px;
box-shadow: box-shadow:
0 0 0 2px #d3d3d3, /* 描边 */ 0 0 0 1px #59bffe, /* 描边 */
0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */ 0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
transform: translate(-2px , -2px); /* 轻微上浮效果 */ transform: translate(-2px , -2px); /* 轻微上浮效果 */
} }

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/services/serviceDirective/configServiceDirective/list', list = '/services/serviceDirective/list',
save='/services/serviceDirective/configServiceDirective/add', save='/services/serviceDirective/add',
edit='/services/serviceDirective/configServiceDirective/edit', edit='/services/serviceDirective/edit',
deleteOne = '/services/serviceDirective/configServiceDirective/delete', deleteOne = '/services/serviceDirective/delete',
deleteBatch = '/services/serviceDirective/configServiceDirective/deleteBatch', deleteBatch = '/services/serviceDirective/deleteBatch',
importExcel = '/services/serviceDirective/configServiceDirective/importExcel', importExcel = '/services/serviceDirective/importExcel',
exportXls = '/services/serviceDirective/configServiceDirective/exportXls', exportXls = '/services/serviceDirective/exportXls',
} }
/** /**

View File

@ -65,7 +65,7 @@ export const selectedColumns: BasicColumn[] = [
{ {
title: '分类标签', title: '分类标签',
align: 'center', align: 'center',
dataIndex: 'instructionTagId', dataIndex: 'instructionTagName',
}, },
{ {
title: '服务类别', title: '服务类别',

View File

@ -5,7 +5,15 @@
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol"> :wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="4">
<a-form-item name="categoryId">
<template #label><span title="服务类别">分类标签</span></template>
<j-dict-select-tag type="list" v-model:value="queryParam.instructionTagId"
:dictCode="`nu_config_service_instruction_tag,instruction_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
:ignoreDisabled="true" placeholder="请选择服务类别" allow-clear :disabled="queryParam.instructionTagId" />
</a-form-item>
</a-col>
<a-col :lg="4">
<a-form-item name="categoryId"> <a-form-item name="categoryId">
<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"
@ -13,7 +21,7 @@
:ignoreDisabled="true" placeholder="请选择服务类别" allow-clear /> :ignoreDisabled="true" placeholder="请选择服务类别" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="4">
<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"
@ -21,13 +29,13 @@
:ignoreDisabled="true" allowClear /> :ignoreDisabled="true" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="4">
<a-form-item name="directiveName"> <a-form-item name="directiveName">
<template #label><span title="服务指令">服务指令</span></template> <template #label><span title="服务指令">服务指令</span></template>
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear /> <JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="4" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6"> <a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
@ -51,15 +59,14 @@
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
</template> </template>
</BasicTable> </BasicTable>
<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 === 'index'"> <span v-if="column.dataIndex === 'index'">
{{ parseInt(index) + 1 }} {{ parseInt(index) + 1 }}
</span> </span>
<span v-if="column.dataIndex === 'instructionTagId'"> <span v-if="column.dataIndex === 'instructionTagName'">
{{ 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 }}
@ -106,6 +113,7 @@ const emit = defineEmits(['deleteDirective', 'addDirective']);
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
const registerModal = ref(); const registerModal = ref();
const directiveInfo = ref<any>({});
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
@ -128,15 +136,6 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
return Object.assign(params, rangerQuery); return Object.assign(params, rangerQuery);
}, },
}, },
exportConfig: {
name: "服务指令",
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
}); });
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const props = defineProps({ const props = defineProps({
@ -145,16 +144,15 @@ const props = defineProps({
const labelCol = reactive({ const labelCol = reactive({
xs: 24, xs: 24,
sm: 4, sm: 8,
xl: 8, xl: 8,
xxl: 6 xxl: 8
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: 24, xs: 24,
sm: 20, sm: 16,
}); });
/** /**
* 成功回调 * 成功回调
*/ */
@ -162,11 +160,19 @@ function handleSuccess() {
(selectedRowKeys.value = []) && reload(); (selectedRowKeys.value = []) && reload();
} }
function getInstructionName(record){
console.log("🚀 ~ getInstructionName ~ record:", record)
return "";
}
/** /**
* 选择 * 选择
* @param directive_ * @param directive_
*/ */
function handleSelect(directive_) { function handleSelect(directive_) {
console.log("🚀 ~ handleSelect ~ directive_:", directive_)
queryParam.instructionTagId =directive_.instructionTagId
reload();
emit('addDirective', directive_) emit('addDirective', directive_)
} }
@ -251,8 +257,15 @@ function handleTags(prefix, tagList, suffix) {
return ' - ' return ' - '
} }
} }
function edit(record) {
console.log("🚀 ~ edit ~ record:", record)
directiveInfo.value = record
console.log("🚀 ~ edit ~ directiveInfo:", directiveInfo)
queryParam.instructionTagId = record.instructionTagId
}
defineExpose({ defineExpose({
edit
}); });
</script> </script>

View File

@ -11,24 +11,27 @@
<a-input v-model:value="formData.packageName" placeholder="请输入服务指令包名称" allow-clear></a-input> <a-input v-model:value="formData.packageName" placeholder="请输入服务指令包名称" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="6">
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="DirectivePackageForm-izEnabled" <a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="DirectivePackageForm-izEnabled"
name="izEnabled"> name="izEnabled">
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled" <j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
placeholder="是否启用" allow-clear /> placeholder="是否启用" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="10">
<a-form-item label="备注" v-bind="validateInfos.description" id="DirectivePackageForm-description" <a-form-item label="时间" v-bind="validateInfos.startTimeStr" id="DirectivePackageForm-startTimeStr"
name="description"> name="startTimeStr">
<a-textarea v-model:value="formData.description" :rows="1" placeholder="请输入备注" /> <a-time-picker v-model:value="formData.startTimeStr" format="HH:mm" />
-
<a-time-picker v-model:value="formData.endTimeStr" format="HH:mm" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :span="24"> <a-col :span="24">
<a-form-item label="排序" v-bind="validateInfos.sort" id="DirectivePackageForm-sort" name="sort"> <a-form-item label="说明" v-bind="validateInfos.description" id="DirectivePackageForm-description"
<a-input-number v-model:value="formData.sort" placeholder="请输入排序" style="width: 100%" /> name="description" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
<a-textarea v-model:value="formData.description" :rows="1" placeholder="请输入说明" />
</a-form-item> </a-form-item>
</a-col> --> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</template> </template>
@ -44,6 +47,7 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectT
import { getValueType } from '/@/utils'; import { getValueType } from '/@/utils';
import { saveOrUpdate } from '../DirectivePackage.api'; import { saveOrUpdate } from '../DirectivePackage.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import dayjs from "dayjs";
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },
@ -59,15 +63,20 @@ const formData = reactive<Record<string, any>>({
description: '', description: '',
sort: 99, sort: 99,
izEnabled: '0', izEnabled: '0',
startTimeStr: '',
endTimeStr: '',
instructionTagId: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } }); const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 2 } });
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 21 } });
const confirmLoading = ref<boolean>(false); const confirmLoading = ref<boolean>(false);
// //
const validatorRules = reactive({ const validatorRules = reactive({
packageName: [{ required: true, message: '请输入服务指令包名称!' },], // packageName: [{ required: true, message: '!' },],
sort: [{ required: true, message: '请输入排序!' }, { pattern: /^\d+$/, message: '请输入整数!' },], // sort: [{ required: true, message: '!' }, { pattern: /^\d+$/, message: '!' },],
}); });
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
@ -103,8 +112,17 @@ function edit(record) {
tmpData[key] = record[key] tmpData[key] = record[key]
} }
}) })
console.log("🚀 ~ nextTick ~ tmpData:", tmpData)
// //
Object.assign(formData, tmpData); Object.assign(formData, tmpData);
if(formData.startTimeStr){
formData.startTimeStr = dayjs(formData.startTimeStr,"YYYY-MM-DD hh:mm:ss")
}
if(formData.endTimeStr){
formData.endTimeStr = dayjs(formData.endTimeStr,"YYYY-MM-DD hh:mm:ss")
}
console.log("🚀 ~ nextTick ~ formData:", formData)
}); });
} }
@ -145,18 +163,43 @@ async function submitForm(directives) {
if (directives.length > 0) { if (directives.length > 0) {
model.directives = directives model.directives = directives
} }
await saveOrUpdate(model, isUpdate.value) if(!model.packageName){
.then((res) => { createMessage.warning('请填写服务指令包名称');
if (res.success) { confirmLoading.value = false;
createMessage.success(res.message); return;
emit('ok'); }
} else { if(!model.startTimeStr){
createMessage.warning(res.message); createMessage.warning('请选择开始时间');
} confirmLoading.value = false;
}) return;
.finally(() => { }
if(!model.endTimeStr){
createMessage.warning('请选择结束时间');
confirmLoading.value = false;
return;
}
var directivesList = model.directives;
if(directivesList.length == 0){
createMessage.warning('请选择服务指令');
confirmLoading.value = false; confirmLoading.value = false;
}); return;
}else{
model.instructionTagId = directivesList[0].instructionTagId;
}
console.log('model', model);
// confirmLoading.value = false;
await saveOrUpdate(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
} }

View File

@ -5,27 +5,27 @@
<a-drawer v-model:open="visible" v-if="visible" :title="title" width="80vw" :closable="false" <a-drawer v-model:open="visible" v-if="visible" :title="title" width="80vw" :closable="false"
:footer-style="{ textAlign: 'right' }" @close="handleCancel"> :footer-style="{ textAlign: 'right' }" @close="handleCancel">
<a-row> <a-row>
<a-col :span="21"> <a-col :span="18">
<DirectivePackageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"> <DirectivePackageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</DirectivePackageForm> </DirectivePackageForm>
</a-col> </a-col>
<a-col :span="3" style="padding-top: 19px;"> <a-col :span="6" style="padding-top: 19px;">
<span style="color: #fff; padding: 8px 10px; background: #dfdfdf; border-radius: 5px;" @click="handleQuoteDirectives"> <span style="color: #fff; padding: 8px 10px; background: #dfdfdf; border-radius: 5px;" @click="handleQuoteDirectives">
<Icon icon="ant-design:reconciliation-outlined" /><a href="javascript:void(0);" style="color:#fff;">引用 </a> <Icon icon="ant-design:reconciliation-outlined" /><a href="javascript:void(0);" style="color:#fff;">引用服务指令包</a>
</span> </span>
<span style="color: #43cbd9; padding: 8px 10px; background: #fff; border-radius: 5px;margin-left:10px;border: 1px solid;" @click="handleAddDirectives"> <span style="color: #43cbd9; padding: 8px 10px; background: #fff; border-radius: 5px;margin-left:10px;border: 1px solid;" @click="handleAddDirectives">
<Icon icon="ant-design:file-add-outlined" /><a href="javascript:void(0);" style="color:#43cbd9;" >新增</a> <Icon icon="ant-design:file-add-outlined" /><a href="javascript:void(0);" style="color:#43cbd9;" >选择服务指令</a>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="6" v-for="directive of seletedRecord.directives" :key="directive.id" style="padding: 5px;" @click="directiveInfo(directive)" :class="{ 'selected': selectedDirective === directive.id }"> <a-col :span="6" v-for="directive of seletedRecord.directives" :key="directive.id" style="padding: 5px;" @click="directiveInfo(directive)" >
<div class="directiveClass"> <div class="directiveClass" :class="{ 'selected': selectedDirective === directive.id }">
<div class="fenleiClass"> <div class="fenleiClass">
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12" class="ellipsis-two-lines">
分类 {{directive.instructionTagName||directive.instructionTagId_dictText}}
</a-col> </a-col>
<a-col :span="12" style="text-align: right;padding-right: 10px;" v-show="selectedDirective === directive.id"> <a-col :span="12" style="text-align: right;padding-right: 10px;" v-show="selectedDirective === directive.id">
<span style="background-color: #67b4eb;border-radius: 50%;padding: 3px;color: white;width:27px;cursor: pointer;"> <span style="background-color: #67b4eb;border-radius: 50%;padding: 3px;color: white;width:27px;cursor: pointer;">
@ -38,36 +38,41 @@
</a-row> </a-row>
</div> </div>
<!-- <div class="fwsjClass">10:00 - 10:10</div> --> <!-- <div class="fwsjClass">10:00 - 10:10</div> -->
<div class="imgClass" style="margin-top: 10px;"><img :src="directive.previewFile?directive.previewFile:'../../../../assets/images/logo.png'" style="width: 100px;height:100px"/></div> <div class="imgClass" style="margin-top: 10px;">
<img :src="getImgPath(directive.previewFile)" style="width: 100px;height:100px"/>
</div>
<a-row style="margin-top: 10px;"> <a-row style="margin-top: 10px;">
<a-col :span="12"> <a-col :span="14">
<span style="margin-left:10px;font-size:20px;">{{ directive.directiveName }}</span> <span class="ellipsis-two-lines" style="margin-left:10px;font-size:20px;">{{ directive.directiveName }}</span>
</a-col> </a-col>
<a-col :span="12" style="text-align: right;"> <a-col :span="10" style="text-align: right;">
<span class="yuanClass" v-if="directive.serviceContent"> <span class="yuanClass">
<a-popover title="服务说明"> <a-popover title="服务说明">
<template #content> <template #content>
<p>{{directive.serviceContent}}</p> <p v-if="directive.serviceContent">{{directive.serviceContent}}</p>
<p v-else>暂无</p>
</template> </template>
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/edit.png"></img> <img style="width: 15px;height: 15px;" src="/src/assets/wlb/edit.png"></img>
</a-popover> </a-popover>
</span> </span>
<span class="yuanClass" v-if="directive.mp3File"> <span class="yuanClass">
<a-popover title="音频介绍"> <a-popover title="音频介绍">
<template #content> <template #content>
<audio controls disabled="false"> <audio controls disabled="false" v-if="directive.mp3File">
<source :src="getFileAccessHttpUrl(derectiveInfo.mp3FileMedia)"> <source :src="getFileAccessHttpUrl(directive.mp3File)">
</audio> </audio>
<span v-else>暂无</span>
</template> </template>
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp3.png"></img> <img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp3.png"></img>
</a-popover> </a-popover>
</span> </span>
<span class="yuanClass" v-if="directive.mp4File"> <span class="yuanClass">
<a-popover title="视频介绍"> <a-popover title="视频介绍">
<template #content> <template #content>
<video controls> <video controls v-if="directive.mp4File">
<source :src="getFileAccessHttpUrl(derectiveInfo.mp4FileMedia)"> <source :src="getFileAccessHttpUrl(directive.mp4File)">
</video> </video>
<span v-else>暂无</span>
</template> </template>
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp4.png"></img> <img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp4.png"></img>
</a-popover> </a-popover>
@ -76,29 +81,29 @@
</a-row> </a-row>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<div style="display: flex; width:100% ;height: 50rpx;"> <div style="display: flex; width:100% ;height: 50rpx;">
<view style="background-color: rgb(240,240,240);width: 115px;height: 30px;border-radius: 5px;position: relative;margin-left: 10px;"> <view style="background-color: rgb(240,240,240);width: 100px;height: 25px;border-radius: 5px;position: relative;margin-left: 10px;">
<view style="position: absolute;top: 0;left: 0;width: 50%;height: 100%;"> <view style="position: absolute;top: 0;left: 0;width: 50%;height: 100%;">
<img style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;" src="/src/assets/wlb/wlb-type1.png"></img> <img style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;" src="/src/assets/wlb/wlb-type1.png"></img>
<div style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 14px;"> <div style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;">
医保 医保
</div> </div>
</view> </view>
<view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;"> <view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;">
<div style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 14px;margin-left: -2px;"> <div style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;margin-left: -2px;">
{{directive.izReimbursement=='1'?'报销':'不报销'}} {{directive.izReimbursement=='1'?'报销':'不报销'}}
</div> </div>
</view> </view>
</view> </view>
<view style="background-color: rgb(240,240,240);width: 115px;height: 30px;border-radius: 5px;position: relative;margin-left: 10px;"> <view style="background-color: rgb(240,240,240);width: 100px;height: 25px;border-radius: 5px;position: relative;margin-left: 10px;">
<view style="position: absolute;top: 0;left: 0;width: 50%;height: 100%;"> <view style="position: absolute;top: 0;left: 0;width: 50%;height: 100%;">
<img style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;" src="/src/assets/wlb/wlb-type2.png"></img> <img style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;" src="/src/assets/wlb/wlb-type2.png"></img>
<div style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 14px;"> <div style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;">
优惠 优惠
</div> </div>
</view> </view>
<view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;"> <view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;">
<div style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 14px;margin-left: -2px;"> <div style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;margin-left: -2px;">
{{directive.izPreferential=='1'?'参与':'不参与'}} {{directive.izPreferential=='1'?'参与':'不参与'}}
</div> </div>
</view> </view>
@ -126,7 +131,8 @@
<!-- 服务指令列表编辑页 --> <!-- 服务指令列表编辑页 -->
<a-drawer v-model:open="directiveEditDrawer" title="选择服务指令" width="70vw" :closable="false" <a-drawer v-model:open="directiveEditDrawer" title="选择服务指令" width="70vw" :closable="false"
:footer-style="{ textAlign: 'right' }" :body-style="{ padding: 0 }"> :footer-style="{ textAlign: 'right' }" :body-style="{ padding: 0 }">
<ConfigServiceDirectiveList ref="configServiceDirectiveListRef" :directiveList="seletedRecord.directives" <ConfigServiceDirectiveList ref="configServiceDirectiveListRef"
:directiveList="seletedRecord.directives"
@deleteDirective="deleteDirective" @addDirective="addDirective"> @deleteDirective="deleteDirective" @addDirective="addDirective">
</ConfigServiceDirectiveList> </ConfigServiceDirectiveList>
<template #footer> <template #footer>
@ -201,6 +207,14 @@ function handleEmotionTags(prefix, directive_, suffix) {
} }
} }
function getImgPath(pathUrl){
if(pathUrl && pathUrl.length>0){
return getFileAccessHttpUrl(pathUrl);
}else{
return '/src/assets/images/logo.png';
}
}
/** /**
* 新增 * 新增
*/ */
@ -220,6 +234,7 @@ function add() {
* @param record * @param record
*/ */
function edit(record) { function edit(record) {
console.log("🚀 ~ edit ~ record:", record)
selectedDirective.value = '' selectedDirective.value = ''
derectiveInfo.value = {} derectiveInfo.value = {}
seletedRecord.value = record seletedRecord.value = record
@ -257,6 +272,9 @@ function handleCancel() {
*/ */
const handleAddDirectives = () => { const handleAddDirectives = () => {
directiveEditDrawer.value = true; directiveEditDrawer.value = true;
nextTick(() => {
configServiceDirectiveListRef.value.edit(seletedRecord.value);
});
}; };
/** /**
@ -298,6 +316,7 @@ function deleteDirective(directiveId) {
* @param directive_ * @param directive_
*/ */
function addDirective(directive_) { function addDirective(directive_) {
console.log("🚀 ~ addDirective ~ directive_:", directive_)
let res_ = seletedRecord.value.directives.filter(item => item.id == directive_.id) let res_ = seletedRecord.value.directives.filter(item => item.id == directive_.id)
if (res_.length > 0) { if (res_.length > 0) {
createMessage.warning('服务指令已选择'); createMessage.warning('服务指令已选择');
@ -305,6 +324,7 @@ function addDirective(directive_) {
createMessage.success('选择成功'); createMessage.success('选择成功');
seletedRecord.value.directives.push(directive_) seletedRecord.value.directives.push(directive_)
} }
console.log('seletedRecord.value--->',seletedRecord.value);
} }
/** /**
@ -353,7 +373,9 @@ defineExpose({
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.selected { .selected {
// border: 1px solid #1890ff; border: 1px solid #59bffe;
border-radius: 8px;
// padding: 0px
} }
.directiveInfoClass { .directiveInfoClass {
@ -386,7 +408,7 @@ defineExpose({
border-radius: 8px; border-radius: 8px;
height: 320px; height: 320px;
box-shadow: box-shadow:
0 0 0 2px #d3d3d3, /* 描边 */ 0 0 0 1px #59bffe, /* 描边 */
0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */ 0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
transform: translate(-2px , -2px); /* 轻微上浮效果 */ transform: translate(-2px , -2px); /* 轻微上浮效果 */
} }
@ -461,4 +483,12 @@ defineExpose({
margin-right:10px;background-color: #e3e6e8; border-radius: 50%; padding: 0px 5px 5px 5px; margin-right:10px;background-color: #e3e6e8; border-radius: 50%; padding: 0px 5px 5px 5px;
cursor: pointer; cursor: pointer;
} }
.ellipsis-two-lines {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; /* 限制文本为2行 */
overflow: hidden;
text-overflow: ellipsis;
}
</style> </style>

View File

@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage(); const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/services/serviceDirective/configServiceDirective/list', list = '/services/serviceDirective/list',
save='/services/serviceDirective/configServiceDirective/add', save='/services/serviceDirective/add',
edit='/services/serviceDirective/configServiceDirective/edit', edit='/services/serviceDirective/edit',
deleteOne = '/services/serviceDirective/configServiceDirective/delete', deleteOne = '/services/serviceDirective/delete',
deleteBatch = '/services/serviceDirective/configServiceDirective/deleteBatch', deleteBatch = '/services/serviceDirective/deleteBatch',
importExcel = '/services/serviceDirective/configServiceDirective/importExcel', importExcel = '/services/serviceDirective/importExcel',
exportXls = '/services/serviceDirective/configServiceDirective/exportXls', exportXls = '/services/serviceDirective/exportXls',
} }
/** /**