Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_vue
This commit is contained in:
commit
a6ac18c17f
|
@ -42,12 +42,18 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
</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-popover :title="directive.packageName">
|
||||
<template #content>
|
||||
<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;color:red;" v-if="directive.directives.length==0">未配置</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -83,6 +89,7 @@ import DirectivePackageModal from './components/DirectivePackageModal.vue'
|
|||
import { list, queryById, deleteOne } from './DirectivePackage.api'
|
||||
import { Pagination } from 'ant-design-vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import dayjs from "dayjs";
|
||||
|
||||
const registerModal = ref();
|
||||
const searchForm = ref({})
|
||||
|
@ -107,6 +114,15 @@ function handleChangeIzEnabled(record){
|
|||
searchQuery()
|
||||
});
|
||||
}
|
||||
|
||||
function getHHMM(value){
|
||||
if(value){
|
||||
return dayjs(value).format('HH:mm')
|
||||
}else{
|
||||
return '未配置'
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
|
@ -231,7 +247,7 @@ onMounted(() => {
|
|||
.cardDivClass:hover{
|
||||
padding: 5px;background-color: #f4fcff;border-radius: 8px;height: 180px;
|
||||
box-shadow:
|
||||
0 0 0 2px #d3d3d3, /* 描边 */
|
||||
0 0 0 1px #59bffe, /* 描边 */
|
||||
0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
|
||||
transform: translate(-2px , -2px); /* 轻微上浮效果 */
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
|
|||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/services/serviceDirective/configServiceDirective/list',
|
||||
save='/services/serviceDirective/configServiceDirective/add',
|
||||
edit='/services/serviceDirective/configServiceDirective/edit',
|
||||
deleteOne = '/services/serviceDirective/configServiceDirective/delete',
|
||||
deleteBatch = '/services/serviceDirective/configServiceDirective/deleteBatch',
|
||||
importExcel = '/services/serviceDirective/configServiceDirective/importExcel',
|
||||
exportXls = '/services/serviceDirective/configServiceDirective/exportXls',
|
||||
list = '/services/serviceDirective/list',
|
||||
save='/services/serviceDirective/add',
|
||||
edit='/services/serviceDirective/edit',
|
||||
deleteOne = '/services/serviceDirective/delete',
|
||||
deleteBatch = '/services/serviceDirective/deleteBatch',
|
||||
importExcel = '/services/serviceDirective/importExcel',
|
||||
exportXls = '/services/serviceDirective/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,7 +65,7 @@ export const selectedColumns: BasicColumn[] = [
|
|||
{
|
||||
title: '分类标签',
|
||||
align: 'center',
|
||||
dataIndex: 'instructionTagId',
|
||||
dataIndex: 'instructionTagName',
|
||||
},
|
||||
{
|
||||
title: '服务类别',
|
||||
|
|
|
@ -5,7 +5,15 @@
|
|||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<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">
|
||||
<template #label><span title="服务类别">服务类别</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.categoryId"
|
||||
|
@ -13,7 +21,7 @@
|
|||
:ignoreDisabled="true" placeholder="请选择服务类别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-col :lg="4">
|
||||
<a-form-item name="typeId">
|
||||
<template #label><span title="服务类型">服务类型</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.typeId"
|
||||
|
@ -21,13 +29,13 @@
|
|||
:ignoreDisabled="true" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-col :lg="4">
|
||||
<a-form-item name="directiveName">
|
||||
<template #label><span title="服务指令">服务指令</span></template>
|
||||
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
|
||||
</a-form-item>
|
||||
</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">
|
||||
<a-col :lg="6">
|
||||
<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>
|
||||
</BasicTable>
|
||||
|
||||
<a-table :columns="selectedColumns" :data-source="directiveList" :scroll="{ x: '100%', y: '32vh' }"
|
||||
:pagination="false" size="small">
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<span v-if="column.dataIndex === 'index'">
|
||||
{{ parseInt(index) + 1 }}
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'instructionTagId'">
|
||||
{{ filterDictTextByCache('instruction_tag', text) }}
|
||||
<span v-if="column.dataIndex === 'instructionTagName'">
|
||||
{{ text || record.instructionTagId_dictText }}
|
||||
</span>
|
||||
<span v-if="column.dataIndex === 'categoryName'">
|
||||
{{ text || record.categoryId_dictText }}
|
||||
|
@ -106,6 +113,7 @@ const emit = defineEmits(['deleteDirective', 'addDirective']);
|
|||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const registerModal = ref();
|
||||
const directiveInfo = ref<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
|
@ -128,15 +136,6 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
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 props = defineProps({
|
||||
|
@ -145,16 +144,15 @@ const props = defineProps({
|
|||
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
sm: 8,
|
||||
xl: 8,
|
||||
xxl: 6
|
||||
xxl: 8
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
sm: 16,
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
|
@ -162,11 +160,19 @@ function handleSuccess() {
|
|||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
function getInstructionName(record){
|
||||
console.log("🚀 ~ getInstructionName ~ record:", record)
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择
|
||||
* @param directive_
|
||||
*/
|
||||
function handleSelect(directive_) {
|
||||
console.log("🚀 ~ handleSelect ~ directive_:", directive_)
|
||||
queryParam.instructionTagId =directive_.instructionTagId
|
||||
reload();
|
||||
emit('addDirective', directive_)
|
||||
}
|
||||
|
||||
|
@ -251,8 +257,15 @@ function handleTags(prefix, tagList, suffix) {
|
|||
return ' - '
|
||||
}
|
||||
}
|
||||
function edit(record) {
|
||||
console.log("🚀 ~ edit ~ record:", record)
|
||||
directiveInfo.value = record
|
||||
console.log("🚀 ~ edit ~ directiveInfo:", directiveInfo)
|
||||
queryParam.instructionTagId = record.instructionTagId
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
edit
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -11,24 +11,27 @@
|
|||
<a-input v-model:value="formData.packageName" placeholder="请输入服务指令包名称" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-col :span="6">
|
||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="DirectivePackageForm-izEnabled"
|
||||
name="izEnabled">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
||||
placeholder="是否启用" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="备注" v-bind="validateInfos.description" id="DirectivePackageForm-description"
|
||||
name="description">
|
||||
<a-textarea v-model:value="formData.description" :rows="1" placeholder="请输入备注" />
|
||||
<a-col :span="10">
|
||||
<a-form-item label="时间" v-bind="validateInfos.startTimeStr" id="DirectivePackageForm-startTimeStr"
|
||||
name="startTimeStr">
|
||||
<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-col>
|
||||
<!-- <a-col :span="24">
|
||||
<a-form-item label="排序" v-bind="validateInfos.sort" id="DirectivePackageForm-sort" name="sort">
|
||||
<a-input-number v-model:value="formData.sort" placeholder="请输入排序" style="width: 100%" />
|
||||
<a-col :span="24">
|
||||
<a-form-item label="说明" v-bind="validateInfos.description" id="DirectivePackageForm-description"
|
||||
name="description" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<a-textarea v-model:value="formData.description" :rows="1" placeholder="请输入说明" />
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
|
@ -44,6 +47,7 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectT
|
|||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../DirectivePackage.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import dayjs from "dayjs";
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
|
@ -59,15 +63,20 @@ const formData = reactive<Record<string, any>>({
|
|||
description: '',
|
||||
sort: 99,
|
||||
izEnabled: '0',
|
||||
startTimeStr: '',
|
||||
endTimeStr: '',
|
||||
instructionTagId: '',
|
||||
});
|
||||
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 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 validatorRules = reactive({
|
||||
packageName: [{ required: true, message: '请输入服务指令包名称!' },],
|
||||
sort: [{ required: true, message: '请输入排序!' }, { pattern: /^\d+$/, message: '请输入整数!' },],
|
||||
// packageName: [{ required: true, message: '请输入服务指令包名称!' },],
|
||||
// sort: [{ required: true, message: '请输入排序!' }, { pattern: /^\d+$/, message: '请输入整数!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
|
@ -103,8 +112,17 @@ function edit(record) {
|
|||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
console.log("🚀 ~ nextTick ~ tmpData:", 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) {
|
||||
model.directives = directives
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
if(!model.packageName){
|
||||
createMessage.warning('请填写服务指令包名称');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
if(!model.startTimeStr){
|
||||
createMessage.warning('请选择开始时间');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
if(!model.endTimeStr){
|
||||
createMessage.warning('请选择结束时间');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
var directivesList = model.directives;
|
||||
if(directivesList.length == 0){
|
||||
createMessage.warning('请选择服务指令');
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,27 +5,27 @@
|
|||
<a-drawer v-model:open="visible" v-if="visible" :title="title" width="80vw" :closable="false"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<a-row>
|
||||
<a-col :span="21">
|
||||
<a-col :span="18">
|
||||
<DirectivePackageForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
||||
</DirectivePackageForm>
|
||||
</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">
|
||||
<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 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>
|
||||
</a-col>
|
||||
</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 }">
|
||||
<div class="directiveClass">
|
||||
<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 }">
|
||||
<div class="fenleiClass">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
分类
|
||||
<a-col :span="12" class="ellipsis-two-lines">
|
||||
{{directive.instructionTagName||directive.instructionTagId_dictText}}
|
||||
</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;">
|
||||
|
@ -38,36 +38,41 @@
|
|||
</a-row>
|
||||
</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-col :span="12">
|
||||
<span style="margin-left:10px;font-size:20px;">{{ directive.directiveName }}</span>
|
||||
<a-col :span="14">
|
||||
<span class="ellipsis-two-lines" style="margin-left:10px;font-size:20px;">{{ directive.directiveName }}</span>
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: right;">
|
||||
<span class="yuanClass" v-if="directive.serviceContent">
|
||||
<a-col :span="10" style="text-align: right;">
|
||||
<span class="yuanClass">
|
||||
<a-popover title="服务说明">
|
||||
<template #content>
|
||||
<p>{{directive.serviceContent}}</p>
|
||||
<p v-if="directive.serviceContent">{{directive.serviceContent}}</p>
|
||||
<p v-else>暂无</p>
|
||||
</template>
|
||||
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/edit.png"></img>
|
||||
</a-popover>
|
||||
</span>
|
||||
<span class="yuanClass" v-if="directive.mp3File">
|
||||
<span class="yuanClass">
|
||||
<a-popover title="音频介绍">
|
||||
<template #content>
|
||||
<audio controls disabled="false">
|
||||
<source :src="getFileAccessHttpUrl(derectiveInfo.mp3FileMedia)">
|
||||
<audio controls disabled="false" v-if="directive.mp3File">
|
||||
<source :src="getFileAccessHttpUrl(directive.mp3File)">
|
||||
</audio>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp3.png"></img>
|
||||
</a-popover>
|
||||
</span>
|
||||
<span class="yuanClass" v-if="directive.mp4File">
|
||||
<span class="yuanClass">
|
||||
<a-popover title="视频介绍">
|
||||
<template #content>
|
||||
<video controls>
|
||||
<source :src="getFileAccessHttpUrl(derectiveInfo.mp4FileMedia)">
|
||||
<video controls v-if="directive.mp4File">
|
||||
<source :src="getFileAccessHttpUrl(directive.mp4File)">
|
||||
</video>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
<img style="width: 15px;height: 15px;" src="/src/assets/wlb/mp4.png"></img>
|
||||
</a-popover>
|
||||
|
@ -76,29 +81,29 @@
|
|||
</a-row>
|
||||
<div style="margin-top: 10px;">
|
||||
<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%;">
|
||||
<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>
|
||||
</view>
|
||||
<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'?'报销':'不报销'}}
|
||||
</div>
|
||||
</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%;">
|
||||
<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>
|
||||
</view>
|
||||
<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'?'参与':'不参与'}}
|
||||
</div>
|
||||
</view>
|
||||
|
@ -126,7 +131,8 @@
|
|||
<!-- 服务指令列表编辑页 -->
|
||||
<a-drawer v-model:open="directiveEditDrawer" title="选择服务指令" width="70vw" :closable="false"
|
||||
:footer-style="{ textAlign: 'right' }" :body-style="{ padding: 0 }">
|
||||
<ConfigServiceDirectiveList ref="configServiceDirectiveListRef" :directiveList="seletedRecord.directives"
|
||||
<ConfigServiceDirectiveList ref="configServiceDirectiveListRef"
|
||||
:directiveList="seletedRecord.directives"
|
||||
@deleteDirective="deleteDirective" @addDirective="addDirective">
|
||||
</ConfigServiceDirectiveList>
|
||||
<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
|
||||
*/
|
||||
function edit(record) {
|
||||
console.log("🚀 ~ edit ~ record:", record)
|
||||
selectedDirective.value = ''
|
||||
derectiveInfo.value = {}
|
||||
seletedRecord.value = record
|
||||
|
@ -257,6 +272,9 @@ function handleCancel() {
|
|||
*/
|
||||
const handleAddDirectives = () => {
|
||||
directiveEditDrawer.value = true;
|
||||
nextTick(() => {
|
||||
configServiceDirectiveListRef.value.edit(seletedRecord.value);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -298,6 +316,7 @@ function deleteDirective(directiveId) {
|
|||
* @param directive_
|
||||
*/
|
||||
function addDirective(directive_) {
|
||||
console.log("🚀 ~ addDirective ~ directive_:", directive_)
|
||||
let res_ = seletedRecord.value.directives.filter(item => item.id == directive_.id)
|
||||
if (res_.length > 0) {
|
||||
createMessage.warning('服务指令已选择');
|
||||
|
@ -305,6 +324,7 @@ function addDirective(directive_) {
|
|||
createMessage.success('选择成功');
|
||||
seletedRecord.value.directives.push(directive_)
|
||||
}
|
||||
console.log('seletedRecord.value--->',seletedRecord.value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -353,7 +373,9 @@ defineExpose({
|
|||
</style>
|
||||
<style lang="less" scoped>
|
||||
.selected {
|
||||
// border: 1px solid #1890ff;
|
||||
border: 1px solid #59bffe;
|
||||
border-radius: 8px;
|
||||
// padding: 0px
|
||||
}
|
||||
|
||||
.directiveInfoClass {
|
||||
|
@ -386,7 +408,7 @@ defineExpose({
|
|||
border-radius: 8px;
|
||||
height: 320px;
|
||||
box-shadow:
|
||||
0 0 0 2px #d3d3d3, /* 描边 */
|
||||
0 0 0 1px #59bffe, /* 描边 */
|
||||
0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影 */
|
||||
transform: translate(-2px , -2px); /* 轻微上浮效果 */
|
||||
}
|
||||
|
@ -461,4 +483,12 @@ defineExpose({
|
|||
margin-right:10px;background-color: #e3e6e8; border-radius: 50%; padding: 0px 5px 5px 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ellipsis-two-lines {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1; /* 限制文本为2行 */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -4,13 +4,13 @@ import { useMessage } from "/@/hooks/web/useMessage";
|
|||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/services/serviceDirective/configServiceDirective/list',
|
||||
save='/services/serviceDirective/configServiceDirective/add',
|
||||
edit='/services/serviceDirective/configServiceDirective/edit',
|
||||
deleteOne = '/services/serviceDirective/configServiceDirective/delete',
|
||||
deleteBatch = '/services/serviceDirective/configServiceDirective/deleteBatch',
|
||||
importExcel = '/services/serviceDirective/configServiceDirective/importExcel',
|
||||
exportXls = '/services/serviceDirective/configServiceDirective/exportXls',
|
||||
list = '/services/serviceDirective/list',
|
||||
save='/services/serviceDirective/add',
|
||||
edit='/services/serviceDirective/edit',
|
||||
deleteOne = '/services/serviceDirective/delete',
|
||||
deleteBatch = '/services/serviceDirective/deleteBatch',
|
||||
importExcel = '/services/serviceDirective/importExcel',
|
||||
exportXls = '/services/serviceDirective/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue