2025-03-24 14:59:31 +08:00
|
|
|
|
<template>
|
2025-03-26 15:36:35 +08:00
|
|
|
|
<!-- <j-modal :title="title" :width="width" :maskClosable="false" :fullscreen="true" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
2025-03-24 14:59:31 +08:00
|
|
|
|
<DirectivePackageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DirectivePackageForm>
|
2025-03-26 15:36:35 +08:00
|
|
|
|
</j-modal> -->
|
2025-04-03 09:44:14 +08:00
|
|
|
|
<a-drawer v-model:open="visible" v-if="visible" :title="title" width="80vw" :closable="false"
|
2025-03-26 15:36:35 +08:00
|
|
|
|
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<a-row>
|
2025-07-15 13:42:49 +08:00
|
|
|
|
<a-col :span="18">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<DirectivePackageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
2025-03-26 15:36:35 +08:00
|
|
|
|
</DirectivePackageForm>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</a-col>
|
2025-07-15 13:42:49 +08:00
|
|
|
|
<a-col :span="6" style="padding-top: 19px;">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<span style="color: #fff; padding: 8px 10px; background: #dfdfdf; border-radius: 5px;" @click="handleQuoteDirectives">
|
2025-07-15 13:42:49 +08:00
|
|
|
|
<Icon icon="ant-design:reconciliation-outlined" /><a href="javascript:void(0);" style="color:#fff;">引用服务指令包</a>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
<span style="color: #43cbd9; padding: 8px 10px; background: #fff; border-radius: 5px;margin-left:10px;border: 1px solid;" @click="handleAddDirectives">
|
2025-07-15 13:42:49 +08:00
|
|
|
|
<Icon icon="ant-design:file-add-outlined" /><a href="javascript:void(0);" style="color:#43cbd9;" >选择服务指令</a>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
|
|
|
|
<a-row>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<a-col :span="6" v-for="directive of seletedRecord.directives" :key="directive.id" style="padding: 5px;" @click="directiveInfo(directive)" >
|
|
|
|
|
|
<div class="directiveClass" :class="{ 'selected': selectedDirective === directive.id }">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<div class="fenleiClass">
|
|
|
|
|
|
<a-row>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<a-col :span="12" class="ellipsis-two-lines">
|
|
|
|
|
|
{{directive.instructionTagName||directive.instructionTagId_dictText}}
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</a-col>
|
|
|
|
|
|
<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;">
|
|
|
|
|
|
<a-popconfirm title="是否确认移除?" ok-text="确认" cancel-text="取消"
|
|
|
|
|
|
@confirm="deleteDirective(directive.id)">
|
|
|
|
|
|
<Icon icon="ant-design:delete-outlined" size="18"/>
|
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- <div class="fwsjClass">10:00 - 10:10</div> -->
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<div class="imgClass" style="margin-top: 10px;">
|
|
|
|
|
|
<img :src="getImgPath(directive.previewFile)" style="width: 100px;height:100px"/>
|
|
|
|
|
|
</div>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<a-row style="margin-top: 10px;">
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<a-col :span="14">
|
|
|
|
|
|
<span class="ellipsis-two-lines" style="margin-left:10px;font-size:20px;">{{ directive.directiveName }}</span>
|
2025-05-12 08:35:32 +08:00
|
|
|
|
</a-col>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<a-col :span="10" style="text-align: right;">
|
|
|
|
|
|
<span class="yuanClass">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<a-popover title="服务说明">
|
|
|
|
|
|
<template #content>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<p v-if="directive.serviceContent">{{directive.serviceContent}}</p>
|
|
|
|
|
|
<p v-else>暂无</p>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/edit.png"></img>
|
|
|
|
|
|
</a-popover>
|
2025-05-12 08:35:32 +08:00
|
|
|
|
</span>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<span class="yuanClass">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<a-popover title="音频介绍">
|
|
|
|
|
|
<template #content>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<audio controls disabled="false" v-if="directive.mp3File">
|
|
|
|
|
|
<source :src="getFileAccessHttpUrl(directive.mp3File)">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</audio>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<span v-else>暂无</span>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp3.png"></img>
|
|
|
|
|
|
</a-popover>
|
|
|
|
|
|
</span>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<span class="yuanClass">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<a-popover title="视频介绍">
|
|
|
|
|
|
<template #content>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<video controls v-if="directive.mp4File">
|
|
|
|
|
|
<source :src="getFileAccessHttpUrl(directive.mp4File)">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</video>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<span v-else>暂无</span>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp4.png"></img>
|
|
|
|
|
|
</a-popover>
|
2025-05-12 08:35:32 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<div style="margin-top: 10px;">
|
|
|
|
|
|
<div style="display: flex; width:100% ;height: 50rpx;">
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<view style="background-color: rgb(240,240,240);width: 100px;height: 25px;border-radius: 5px;position: relative;margin-left: 10px;">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<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>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<div style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
医保
|
2025-05-12 08:35:32 +08:00
|
|
|
|
</div>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;">
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<div style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;margin-left: -2px;">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
{{directive.izReimbursement=='1'?'报销':'不报销'}}
|
2025-04-28 16:08:53 +08:00
|
|
|
|
</div>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<view style="background-color: rgb(240,240,240);width: 100px;height: 25px;border-radius: 5px;position: relative;margin-left: 10px;">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<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>
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<div style="color: #fff;z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
优惠
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view style="position: absolute;top: 0;left: 40%;width: 70%;height: 100%;">
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<div style="z-index: 999;position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);font-size: 12px;margin-left: -2px;">
|
2025-07-15 08:41:14 +08:00
|
|
|
|
{{directive.izPreferential=='1'?'参与':'不参与'}}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-05-12 08:35:32 +08:00
|
|
|
|
</div>
|
2025-03-26 15:36:35 +08:00
|
|
|
|
</div>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
<a-divider />
|
|
|
|
|
|
<a-row>
|
|
|
|
|
|
<a-col :span="16">
|
|
|
|
|
|
<span class="typeClass" v-if="directive.typeName">{{ directive.typeName }}</span>
|
|
|
|
|
|
<span class="typeClass" v-if="handleBodyTags('', directive, '')">{{ handleBodyTags('', directive, '') }}</span>
|
|
|
|
|
|
<span class="typeClass" v-if="handleEmotionTags('', directive, '')">{{ handleEmotionTags('', directive, '') }}</span>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="8" style="text-align: right;">
|
|
|
|
|
|
<span class="rchlClass" v-if="directive.cycleType=='1'">日常护理</span>
|
|
|
|
|
|
<span class="zqhlClass" v-if="directive.cycleType=='2'">周期护理</span>
|
|
|
|
|
|
<span class="jshlClass" v-if="directive.cycleType=='3'">即时护理</span>
|
|
|
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
2025-05-12 08:35:32 +08:00
|
|
|
|
</div>
|
2025-07-15 08:41:14 +08:00
|
|
|
|
</a-col>
|
|
|
|
|
|
</a-row>
|
2025-03-26 15:36:35 +08:00
|
|
|
|
|
2025-03-28 16:44:40 +08:00
|
|
|
|
<!-- 服务指令列表编辑页 -->
|
|
|
|
|
|
<a-drawer v-model:open="directiveEditDrawer" title="选择服务指令" width="70vw" :closable="false"
|
|
|
|
|
|
:footer-style="{ textAlign: 'right' }" :body-style="{ padding: 0 }">
|
2025-07-15 16:30:33 +08:00
|
|
|
|
<ConfigServiceDirectiveList ref="configServiceDirectiveListRef"
|
|
|
|
|
|
:directiveList="seletedRecord.directives"
|
2025-03-28 16:44:40 +08:00
|
|
|
|
@deleteDirective="deleteDirective" @addDirective="addDirective">
|
|
|
|
|
|
</ConfigServiceDirectiveList>
|
2025-03-26 15:36:35 +08:00
|
|
|
|
<template #footer>
|
|
|
|
|
|
<a-button style="margin-right: 8px" @click="handleDirectiveCancel">关闭</a-button>
|
|
|
|
|
|
<a-button type="primary" @click="handleDirectiveOk">确定</a-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-drawer>
|
|
|
|
|
|
|
2025-03-28 16:44:40 +08:00
|
|
|
|
<!-- 引用 -->
|
|
|
|
|
|
<a-drawer v-model:open="directiveQuoteDrawer" title="引用服务指令包" width="80vw" :closable="false"
|
2025-07-15 08:41:14 +08:00
|
|
|
|
:footer-style="{ textAlign: 'right'}" :body-style="{ background: '#dfdfdf' }" >
|
|
|
|
|
|
<PackageList ref="directivePackageListRef" ></PackageList>
|
2025-03-28 16:44:40 +08:00
|
|
|
|
<template #footer>
|
|
|
|
|
|
<a-button style="margin-right: 8px" @click="handleQuoteDrawCancel">关闭</a-button>
|
|
|
|
|
|
<a-button type="primary" @click="handleQuoteDrawOk">确定</a-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-drawer>
|
|
|
|
|
|
|
2025-03-26 15:36:35 +08:00
|
|
|
|
<template #footer>
|
|
|
|
|
|
<a-button style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
|
|
|
|
|
<a-button type="primary" @click="handleOk">确定</a-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</a-drawer>
|
2025-03-24 14:59:31 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-03-26 15:36:35 +08:00
|
|
|
|
import { ref, nextTick, defineExpose, computed } from 'vue';
|
|
|
|
|
|
import DirectivePackageForm from './DirectivePackageForm.vue'
|
|
|
|
|
|
import ConfigServiceDirectiveList from './ConfigServiceDirectiveList.vue'
|
|
|
|
|
|
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
2025-03-28 16:44:40 +08:00
|
|
|
|
import PackageList from './PackageList.vue'
|
|
|
|
|
|
import { filterDictTextByCache } from '/@/utils/dict/JDictSelectUtil';
|
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
2025-03-24 14:59:31 +08:00
|
|
|
|
|
2025-03-26 15:36:35 +08:00
|
|
|
|
const title = ref<string>('');
|
|
|
|
|
|
const visible = ref<boolean>(false);
|
|
|
|
|
|
const disableSubmit = ref<boolean>(false);
|
|
|
|
|
|
const registerForm = ref();
|
|
|
|
|
|
const emit = defineEmits(['directiveOk', 'register', 'success']);
|
2025-03-28 16:44:40 +08:00
|
|
|
|
const directiveEditDrawer = ref<boolean>(false);
|
2025-03-26 15:36:35 +08:00
|
|
|
|
const configServiceDirectiveListRef = ref()
|
|
|
|
|
|
const derectiveInfo = ref({})
|
2025-03-28 16:44:40 +08:00
|
|
|
|
const selectedDirective = ref()
|
|
|
|
|
|
const directiveQuoteDrawer = ref(false)
|
|
|
|
|
|
const directivePackageListRef = ref()
|
|
|
|
|
|
const seletedRecord = ref({ directives: [] })//里面记录了已选择的服务指令,其他页面都需要操作这个对象
|
|
|
|
|
|
const { createMessage } = useMessage();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2025-04-28 16:08:53 +08:00
|
|
|
|
* 处理体型标签翻译
|
|
|
|
|
|
* @param directive_
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleBodyTags(prefix, directive_, suffix) {
|
|
|
|
|
|
if (!!directive_.bodyTagList && directive_.bodyTagList.length > 0) {
|
|
|
|
|
|
let str = directive_.bodyTagList.map(item => item.tagName).join('、 ');
|
|
|
|
|
|
return prefix + str + suffix
|
|
|
|
|
|
} else {
|
|
|
|
|
|
return ''
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 处理情绪标签翻译
|
2025-03-28 16:44:40 +08:00
|
|
|
|
* @param directive_
|
|
|
|
|
|
*/
|
2025-04-28 16:08:53 +08:00
|
|
|
|
function handleEmotionTags(prefix, directive_, suffix) {
|
|
|
|
|
|
if (!!directive_.emotionTagList && directive_.emotionTagList.length > 0) {
|
|
|
|
|
|
let str = directive_.emotionTagList.map(item => item.tagName).join('、 ');
|
2025-03-28 16:44:40 +08:00
|
|
|
|
return prefix + str + suffix
|
2025-03-26 15:36:35 +08:00
|
|
|
|
} else {
|
2025-04-01 09:35:36 +08:00
|
|
|
|
return ''
|
2025-03-24 14:59:31 +08:00
|
|
|
|
}
|
2025-03-28 16:44:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-15 16:30:33 +08:00
|
|
|
|
function getImgPath(pathUrl){
|
|
|
|
|
|
if(pathUrl && pathUrl.length>0){
|
|
|
|
|
|
return getFileAccessHttpUrl(pathUrl);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
return '/src/assets/images/logo.png';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-26 15:36:35 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 新增
|
|
|
|
|
|
*/
|
|
|
|
|
|
function add() {
|
|
|
|
|
|
title.value = '新增服务指令包';
|
|
|
|
|
|
visible.value = true;
|
2025-04-28 16:08:53 +08:00
|
|
|
|
selectedDirective.value = ''
|
2025-03-28 16:44:40 +08:00
|
|
|
|
seletedRecord.value = { directives: [] }
|
2025-04-28 16:08:53 +08:00
|
|
|
|
derectiveInfo.value = {}
|
2025-03-26 15:36:35 +08:00
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
registerForm.value.add();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
2025-03-24 14:59:31 +08:00
|
|
|
|
|
2025-03-26 15:36:35 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 编辑
|
|
|
|
|
|
* @param record
|
|
|
|
|
|
*/
|
|
|
|
|
|
function edit(record) {
|
2025-07-15 16:30:33 +08:00
|
|
|
|
console.log("🚀 ~ edit ~ record:", record)
|
2025-04-28 16:08:53 +08:00
|
|
|
|
selectedDirective.value = ''
|
|
|
|
|
|
derectiveInfo.value = {}
|
2025-03-28 16:44:40 +08:00
|
|
|
|
seletedRecord.value = record
|
2025-03-26 15:36:35 +08:00
|
|
|
|
title.value = disableSubmit.value ? '详情' : '编辑';
|
|
|
|
|
|
visible.value = true;
|
|
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
registerForm.value.edit(record);
|
2025-03-24 14:59:31 +08:00
|
|
|
|
});
|
2025-03-26 15:36:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 确定按钮点击事件
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleOk() {
|
2025-03-28 16:44:40 +08:00
|
|
|
|
registerForm.value.submitForm(seletedRecord.value.directives);
|
2025-03-26 15:36:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* form保存回调事件
|
|
|
|
|
|
*/
|
|
|
|
|
|
function submitCallback() {
|
|
|
|
|
|
handleCancel();
|
|
|
|
|
|
emit('success');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 取消按钮回调事件
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleCancel() {
|
|
|
|
|
|
visible.value = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-28 16:44:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 新增/编辑服务指令
|
|
|
|
|
|
*/
|
|
|
|
|
|
const handleAddDirectives = () => {
|
|
|
|
|
|
directiveEditDrawer.value = true;
|
2025-07-15 16:30:33 +08:00
|
|
|
|
nextTick(() => {
|
|
|
|
|
|
configServiceDirectiveListRef.value.edit(seletedRecord.value);
|
|
|
|
|
|
});
|
2025-03-26 15:36:35 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-28 16:44:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 管理服务指令编辑页
|
|
|
|
|
|
*/
|
2025-03-26 15:36:35 +08:00
|
|
|
|
function handleDirectiveCancel() {
|
2025-03-28 16:44:40 +08:00
|
|
|
|
directiveEditDrawer.value = false;
|
2025-03-26 15:36:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-28 16:44:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 保存服务指令编辑结果
|
|
|
|
|
|
*/
|
2025-03-26 15:36:35 +08:00
|
|
|
|
function handleDirectiveOk() {
|
2025-03-28 16:44:40 +08:00
|
|
|
|
directiveEditDrawer.value = false;
|
2025-03-26 15:36:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-28 16:44:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 点击服务指令卡片时触发:右侧展示指令详细信息
|
|
|
|
|
|
* @param directive
|
|
|
|
|
|
*/
|
2025-03-26 15:36:35 +08:00
|
|
|
|
function directiveInfo(directive) {
|
|
|
|
|
|
selectedDirective.value = directive.id
|
|
|
|
|
|
derectiveInfo.value = directive
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-28 16:44:40 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 移除单个服务指令
|
|
|
|
|
|
* @param directiveId
|
|
|
|
|
|
*/
|
2025-03-26 15:36:35 +08:00
|
|
|
|
function deleteDirective(directiveId) {
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
derectiveInfo.value = {}
|
|
|
|
|
|
}, 200)
|
2025-03-28 16:44:40 +08:00
|
|
|
|
seletedRecord.value.directives = seletedRecord.value.directives.filter(item => item.id !== directiveId)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 新增单个服务指令
|
|
|
|
|
|
* @param directive_
|
|
|
|
|
|
*/
|
|
|
|
|
|
function addDirective(directive_) {
|
2025-07-15 16:30:33 +08:00
|
|
|
|
console.log("🚀 ~ addDirective ~ directive_:", directive_)
|
2025-03-28 16:44:40 +08:00
|
|
|
|
let res_ = seletedRecord.value.directives.filter(item => item.id == directive_.id)
|
|
|
|
|
|
if (res_.length > 0) {
|
|
|
|
|
|
createMessage.warning('服务指令已选择');
|
|
|
|
|
|
} else {
|
2025-05-14 10:41:21 +08:00
|
|
|
|
createMessage.success('选择成功');
|
2025-03-28 16:44:40 +08:00
|
|
|
|
seletedRecord.value.directives.push(directive_)
|
|
|
|
|
|
}
|
2025-07-15 16:30:33 +08:00
|
|
|
|
console.log('seletedRecord.value--->',seletedRecord.value);
|
2025-03-28 16:44:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 引用
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleQuoteDirectives() {
|
|
|
|
|
|
directiveQuoteDrawer.value = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 处理引用确认操作
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleQuoteDrawOk() {
|
|
|
|
|
|
directiveQuoteDrawer.value = false
|
|
|
|
|
|
//将数据合并(有去重操作)
|
|
|
|
|
|
seletedRecord.value.directives = [
|
|
|
|
|
|
...seletedRecord.value.directives,
|
|
|
|
|
|
...directivePackageListRef.value.selectedDirective.directives.reduce((acc, current) => {
|
|
|
|
|
|
if (!seletedRecord.value.directives.some((item) => item.id === current.id)) {
|
|
|
|
|
|
acc.push(current);
|
|
|
|
|
|
}
|
|
|
|
|
|
return acc;
|
|
|
|
|
|
}, []),
|
|
|
|
|
|
];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 处理引用取消操作
|
|
|
|
|
|
*/
|
|
|
|
|
|
function handleQuoteDrawCancel() {
|
|
|
|
|
|
directiveQuoteDrawer.value = false
|
2025-03-26 15:36:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
|
|
add,
|
|
|
|
|
|
edit,
|
|
|
|
|
|
disableSubmit,
|
|
|
|
|
|
});
|
2025-03-24 14:59:31 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
2025-03-26 15:36:35 +08:00
|
|
|
|
/**隐藏样式-modal确定按钮 */
|
|
|
|
|
|
.jee-hidden {
|
|
|
|
|
|
display: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
.selected {
|
2025-07-15 16:30:33 +08:00
|
|
|
|
border: 1px solid #59bffe;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
// padding: 0px
|
2025-03-26 15:36:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.directiveInfoClass {
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
}
|
2025-04-01 09:35:36 +08:00
|
|
|
|
|
|
|
|
|
|
.scrollable-content {
|
|
|
|
|
|
height: 70vh;
|
|
|
|
|
|
/* 设置固定高度为视口的50% */
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
/* 垂直方向超出时显示滚动条 */
|
|
|
|
|
|
padding-right: 8px;
|
|
|
|
|
|
/* 防止滚动条遮挡内容 */
|
|
|
|
|
|
}
|
2025-07-15 08:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.directiveClass{
|
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
height: 320px;
|
|
|
|
|
|
background: linear-gradient(to bottom, #e1f3ff, #ffffff);
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.directiveClass:hover{
|
|
|
|
|
|
background: linear-gradient(to bottom, #e1f3ff, #ffffff);
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
height: 320px;
|
|
|
|
|
|
box-shadow:
|
2025-07-15 16:30:33 +08:00
|
|
|
|
0 0 0 1px #59bffe, /* 描边 */
|
2025-07-15 08:41:14 +08:00
|
|
|
|
0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
|
|
|
|
|
|
transform: translate(-2px , -2px); /* 轻微上浮效果 */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.fenleiClass{
|
|
|
|
|
|
background-image: url('/src/assets/wlb/wlb-title.png');
|
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
padding: 7px 0 0 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.fwsjClass{
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
margin: 7px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.imgClass{
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.ybClass{
|
|
|
|
|
|
// background: #f0f0f0;padding:5px;margin:5px;
|
|
|
|
|
|
// border-radius: 5px;
|
|
|
|
|
|
// color: #ffffff;
|
|
|
|
|
|
background-image: url("/src/assets/wlb/wlb-type1.png");
|
|
|
|
|
|
background-size: 50px 23px;
|
|
|
|
|
|
width: 50px;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.jgyhClass{
|
|
|
|
|
|
background: #f0f0f0;padding:5px;margin:5px;
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
// color: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.typeClass{
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
padding: 5px;
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
background: #f0f0f0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.rchlClass{
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
padding: 5px;
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
background: #f5fafe;
|
|
|
|
|
|
border: 1px solid #59bffe;
|
|
|
|
|
|
color: #59bffe;
|
|
|
|
|
|
margin-right:5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.zqhlClass{
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
padding: 5px;
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
background: #fff2df;
|
|
|
|
|
|
border: 1px solid #fb9f65;
|
|
|
|
|
|
color: #fb9f65;
|
|
|
|
|
|
margin-right:5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.jshlClass{
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
padding: 5px;
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
|
background: #e9e5fe;
|
|
|
|
|
|
border: 1px solid #9986fc;
|
|
|
|
|
|
color: #9986fc;
|
|
|
|
|
|
margin-right:5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.yuanClass{
|
|
|
|
|
|
margin-right:10px;background-color: #e3e6e8; border-radius: 50%; padding: 0px 5px 5px 5px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2025-07-15 16:30:33 +08:00
|
|
|
|
|
|
|
|
|
|
.ellipsis-two-lines {
|
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
|
-webkit-line-clamp: 1; /* 限制文本为2行 */
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
}
|
2025-03-24 14:59:31 +08:00
|
|
|
|
</style>
|