修改服务指令包页面样式
This commit is contained in:
parent
122ef7b5a1
commit
fce25d0158
|
@ -247,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); /* 轻微上浮效果 */
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ export const selectedColumns: BasicColumn[] = [
|
||||||
{
|
{
|
||||||
title: '分类标签',
|
title: '分类标签',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'instructionTagId',
|
dataIndex: 'instructionTagName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '服务类别',
|
title: '服务类别',
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ const formData = reactive<Record<string, any>>({
|
||||||
izEnabled: '0',
|
izEnabled: '0',
|
||||||
startTimeStr: '',
|
startTimeStr: '',
|
||||||
endTimeStr: '',
|
endTimeStr: '',
|
||||||
|
instructionTagId: '',
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 6 } });
|
||||||
|
@ -177,18 +178,28 @@ async function submitForm(directives) {
|
||||||
confirmLoading.value = false;
|
confirmLoading.value = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await saveOrUpdate(model, isUpdate.value)
|
var directivesList = model.directives;
|
||||||
.then((res) => {
|
if(directivesList.length == 0){
|
||||||
if (res.success) {
|
createMessage.warning('请选择服务指令');
|
||||||
createMessage.success(res.message);
|
|
||||||
emit('ok');
|
|
||||||
} else {
|
|
||||||
createMessage.warning(res.message);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
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;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
</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.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>
|
||||||
|
|
Loading…
Reference in New Issue