Commit c3b210d2 by YunaiV

Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev

parents 5bf1de54 24349110
...@@ -30,6 +30,6 @@ export const KeFuConversationApi = { ...@@ -30,6 +30,6 @@ export const KeFuConversationApi = {
}, },
// 删除客服会话 // 删除客服会话
deleteConversation: async (id: number) => { deleteConversation: async (id: number) => {
return await request.get({ url: '/promotion/kefu-conversation/delete?id' + id }) return await request.delete({ url: `/promotion/kefu-conversation/delete?id=${id}`})
} }
} }
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1724304256588" class="icon" viewBox="0 0 1300 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1272" xmlns:xlink="http://www.w3.org/1999/xlink" width="253.90625" height="200"><path d="M784.058182 99.258182l10.938182 18.385454-21.294546-2.56-14.196363 16.058182-4.072728-21.061818-19.781818-8.494545 18.734546-10.472728 2.094545-21.294545 15.709091 14.545454 20.945454-4.654545-9.076363 19.549091zM1067.287273 642.443636l-18.501818 10.821819 2.56-21.294546-16.058182-14.196364 21.061818-4.072727 8.494545-19.665454 10.472728 18.734545 21.294545 1.978182-14.661818 15.709091 4.770909 20.945454-19.432727-8.96z" fill="#2196F3" p-id="1273"></path><path d="M1067.287273 642.443636l-18.501818 10.821819 2.56-21.294546-16.058182-14.196364 21.061818-4.072727 8.494545-19.665454 10.472728 18.734545 21.294545 1.978182-14.661818 15.709091 4.770909 20.945454-19.432727-8.96zM571.927273 100.072727l-17.454546-12.567272 20.596364-6.167273 6.516364-20.48 12.218181 17.570909 21.410909-0.116364-12.916363 17.105455 6.749091 20.363636-20.247273-6.981818-17.338182 12.683636 0.465455-21.410909zM991.418182 784.407273l-21.178182 3.490909 10.123636-18.967273-9.774545-18.967273 21.061818 3.723637 15.127273-15.243637 2.909091 21.294546 19.2 9.658182-19.316364 9.309091-3.258182 21.178181-14.894545-15.476363zM427.985455 156.741818L407.272727 151.505455l16.872728-13.265455-1.396364-21.410909 17.803636 11.985454 20.014546-7.912727-5.934546 20.596364 13.730909 16.523636-21.410909 0.814546-11.52 18.152727-7.447272-20.247273zM854.225455 896.465455l-20.712728-5.352728 16.872728-13.265454-1.396364-21.294546 17.803636 11.869091 20.014546-7.912727-5.934546 20.712727 13.730909 16.523637-21.527272 0.814545-11.403637 18.036364-7.447272-20.130909zM562.501818 923.694545l10.821818 18.385455-21.294545-2.56-14.196364 16.058182-4.072727-21.061818-19.665455-8.494546 18.734546-10.356363 1.978182-21.41091 15.709091 14.661819 20.945454-4.770909-8.96 19.54909zM242.734545 420.770909l-18.385454 10.938182 2.56-21.294546-16.058182-14.196363 21.061818-4.189091 8.494546-19.665455 10.356363 18.734546 21.410909 2.094545-14.545454 15.709091 4.654545 20.945455-19.549091-9.076364z" fill="#2196F3" p-id="1274"></path><path d="M242.734545 420.770909l-18.385454 10.938182 2.56-21.294546-16.058182-14.196363 21.061818-4.189091 8.494546-19.665455 10.356363 18.734546 21.410909 2.094545-14.545454 15.709091 4.654545 20.945455-19.549091-9.076364zM700.858182 943.941818l-17.454546-12.450909 20.48-6.283636 6.516364-20.48 12.334545 17.687272 21.41091-0.116363-12.916364 17.105454 6.632727 20.363637-20.247273-7.098182-17.221818 12.683636 0.465455-21.410909zM303.592727 278.807273l-21.178182 3.490909 10.123637-18.967273-9.890909-18.967273 21.178182 3.723637 15.010909-15.243637 2.909091 21.294546 19.2 9.541818-19.316364 9.425455-3.258182 21.178181-14.778182-15.476363z" fill="#2196F3" p-id="1275"></path><path d="M407.272727 90.647273a486.632727 486.632727 0 0 1 504.552728 11.636363l25.018181-14.429091A512 512 0 0 0 139.636364 546.909091l25.018181-14.429091A486.981818 486.981818 0 0 1 407.272727 90.647273zM893.323636 933.352727a486.749091 486.749091 0 0 1-504.669091-11.636363l-24.901818 14.429091A512 512 0 0 0 1161.192727 477.090909l-24.901818 13.963636a486.981818 486.981818 0 0 1-242.967273 442.298182z" fill="#2196F3" p-id="1276"></path><path d="M814.545455 795.927273a327.447273 327.447273 0 0 1-258.21091 29.556363l-29.78909 17.105455A353.163636 353.163636 0 0 0 998.865455 570.181818l-29.789091 17.105455A326.865455 326.865455 0 0 1 814.545455 795.927273zM486.865455 228.072727A327.447273 327.447273 0 0 1 744.727273 198.516364l29.789091-17.105455A353.163636 353.163636 0 0 0 302.545455 453.818182l29.78909-17.105455A326.865455 326.865455 0 0 1 486.865455 228.072727zM1288.378182 374.690909a53.294545 53.294545 0 0 1-14.429091 11.636364L229.469091 989.090909a53.876364 53.876364 0 0 1-73.425455-19.665454L7.214545 710.632727a53.527273 53.527273 0 0 1 19.781819-73.309091L1071.476364 34.909091a53.876364 53.876364 0 0 1 73.425454 19.665454l148.829091 258.327273a53.061818 53.061818 0 0 1 5.352727 40.727273 55.272727 55.272727 0 0 1-10.705454 21.061818zM32.232727 665.716364A28.043636 28.043636 0 0 0 29.323636 698.181818l148.829091 257.978182a28.392727 28.392727 0 0 0 38.516364 10.356364l1044.48-601.949091a28.16 28.16 0 0 0 10.356364-38.516364L1122.676364 67.84a28.276364 28.276364 0 0 0-38.4-10.356364L39.68 659.432727a27.810909 27.810909 0 0 0-7.447273 6.283637z" fill="#2196F3" p-id="1277"></path><path d="M477.090909 500.945455l22.109091 38.283636-15.36 8.843636-13.963636-24.436363-151.272728 87.621818 14.545455 25.134545-15.243636 8.843637-23.272728-39.330909L377.949091 558.545455c-6.050909-4.887273-11.636364-8.843636-15.825455-11.636364l14.894546-12.450909c3.956364 3.141818 9.658182 8.145455 17.105454 14.894545zM459.869091 698.181818l-48.407273 28.043637 7.447273 12.334545-15.36 8.843636-61.207273-106.007272L406.225455 605.090909l-12.683637-21.876364 15.709091-9.076363 12.683636 21.876363L486.4 558.545455l60.509091 104.727272-15.36 8.843637-7.098182-12.218182-49.105454 28.392727L501.294545 733.090909l-15.70909 9.076364z m-45.381818-78.661818l-48.523637 27.461818 14.545455 25.134546 48.523636-28.043637zM388.538182 686.545455l14.545454 25.134545 48.523637-28.043636-14.545455-25.134546z m105.425454-79.476364L479.418182 581.818182 430.545455 609.861818l14.545454 25.134546z m-26.647272 67.490909l49.221818-28.392727-14.545455-25.134546-49.105454 28.392728zM624.058182 541.090909c-4.654545 6.167273-10.123636 13.149091-16.290909 20.829091l34.909091 61.207273a18.734545 18.734545 0 0 1-6.632728 29.207272l-18.734545 10.938182-11.636364-13.614545a174.545455 174.545455 0 0 0 17.454546-8.610909 8.378182 8.378182 0 0 0 2.327272-12.683637l-30.021818-52.363636-9.774545 10.24-9.890909 10.123636-12.450909-12.916363c9.076364-8.145455 16.872727-15.709091 23.272727-22.574546l-30.836364-53.527272-24.785454 14.196363-8.727273-15.010909L546.909091 492.218182l-23.272727-40.378182 15.36-8.843636 23.272727 40.378181 21.643636-12.450909 8.727273 15.127273-21.643636 12.450909L599.156364 546.909091c5.352727-6.4 10.821818-13.381818 16.290909-20.712727z m8.843636-45.032727L689.221818 593.454545a193.745455 193.745455 0 0 0 22.574546-27.112727l11.636363 13.032727a363.985455 363.985455 0 0 1-41.192727 44.8l-12.334545-12.450909a10.821818 10.821818 0 0 0 1.62909-13.730909l-98.90909-171.403636 15.476363-8.96 36.305455 62.952727 30.836363-17.803636 8.029091 15.476363z m128 81.454545a20.130909 20.130909 0 0 1-30.836363-9.541818L628.363636 392.378182l15.36-8.378182 38.050909 66.094545A206.08 206.08 0 0 0 709.818182 409.018182l16.64 7.563636a297.890909 297.890909 0 0 1-34.909091 48.64l52.712727 91.112727a8.843636 8.843636 0 0 0 13.614546 4.072728l10.821818-6.167273a14.429091 14.429091 0 0 0 7.912727-11.636364 102.981818 102.981818 0 0 0-15.010909-38.516363l17.105455-3.723637c12.334545 24.669091 17.687273 41.076364 16.058181 48.989091a28.16 28.16 0 0 1-15.127272 18.152728zM805.236364 288.116364l16.174545-9.309091 23.272727 39.330909 78.429091-45.265455 59.345455 102.749091-16.64 9.076364-7.912727-13.847273L896 407.272727l42.938182 74.472728-16.174546 9.30909-42.938181-74.472727-62.603637 36.072727 8.029091 13.73091-15.825454 9.192727L749.730909 372.363636l78.196364-45.265454z m2.676363 149.061818l62.603637-36.072727-33.745455-58.181819-62.487273 36.072728z m78.778182-45.381818l62.72-36.189091-33.745454-58.181818-62.72 36.072727z" fill="#2196F3" p-id="1278"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1724297262365" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1396" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M707.91 103c16.28 0 29.522 13.007 29.897 29.195l0.009 0.706v111.878a29.96 29.96 0 0 1-0.898 7.3l171.177-0.001c16.28 0 29.522 13.007 29.897 29.195l0.008 0.706v637.12c0 16.278-13.01 29.518-29.2 29.893l-0.705 0.008H270.884c-16.28 0-29.522-13.007-29.897-29.195l-0.008-0.706V787.274c0-16.514 13.389-29.9 29.905-29.9 16.28 0 29.522 13.007 29.897 29.194l0.008 0.706v101.924h577.4V311.88h-577.4v88.787c0 16.278-13.009 29.518-29.2 29.893l-0.705 0.008c-16.28 0-29.522-13.008-29.897-29.195l-0.008-0.706V281.979c0-16.278 13.009-29.518 29.2-29.893l0.705-0.008h408.019a29.916 29.916 0 0 1-0.89-6.593l-0.008-0.706v-81.978H132.808v407.113h385.787L408.223 456.982c-11.36-11.624-11.329-30.143-0.066-41.729l0.554-0.555c11.625-11.358 30.147-11.327 41.734-0.066l0.555 0.554 161.028 164.762c11.244 11.504 11.344 29.793 0.362 41.42l-0.55 0.565-161.027 161.849c-11.648 11.707-30.583 11.757-42.292 0.11-11.524-11.461-11.754-29.979-0.657-41.723l0.546-0.563 111.319-111.89H102.905c-16.28 0-29.522-13.007-29.897-29.195l-0.008-0.705V132.9c0-16.278 13.01-29.518 29.2-29.893l0.705-0.008H707.91z" p-id="1397"></path></svg>
\ No newline at end of file
...@@ -165,6 +165,7 @@ $toolbar-position: -55px; ...@@ -165,6 +165,7 @@ $toolbar-position: -55px;
width: 80px; width: 80px;
height: 25px; height: 25px;
font-size: 12px; font-size: 12px;
color: #6a6a6a;
line-height: 25px; line-height: 25px;
text-align: center; text-align: center;
background: #fff; background: #fff;
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
class="mb-4px flex flex-col gap-4px border border-gray-2 border-rounded rounded border-solid p-8px" class="mb-4px flex flex-col gap-4px border border-gray-2 border-rounded rounded border-solid p-8px"
> >
<!-- 操作按钮区 --> <!-- 操作按钮区 -->
<div class="m--8px m-b-4px flex flex-row items-center justify-between bg-gray-1 p-8px"> <div class="m--8px m-b-4px flex flex-row items-center justify-between p-8px" style="background-color: var(--app-content-bg-color);">
<el-tooltip content="拖动排序"> <el-tooltip content="拖动排序">
<Icon icon="ic:round-drag-indicator" class="drag-icon cursor-move" /> <Icon icon="ic:round-drag-indicator" class="drag-icon cursor-move" style="color: #8a909c;" />
</el-tooltip> </el-tooltip>
<el-tooltip content="删除"> <el-tooltip content="删除">
<Icon <Icon
......
...@@ -7,26 +7,41 @@ const props = defineProps({ ...@@ -7,26 +7,41 @@ const props = defineProps({
src: propTypes.string.def('') src: propTypes.string.def('')
}) })
const loading = ref(true) const loading = ref(true)
const height = ref('')
const frameRef = ref<HTMLElement | null>(null) const frameRef = ref<HTMLElement | null>(null)
const init = () => { const init = () => {
height.value = document.documentElement.clientHeight - 94.5 + 'px' nextTick(() => {
loading.value = true
if (!frameRef.value) return
frameRef.value.onload = () => {
loading.value = false loading.value = false
}
})
} }
onMounted(() => { onMounted(() => {
setTimeout(() => {
init() init()
}, 300)
}) })
watch(
() => props.src,
() => {
init()
}
)
</script> </script>
<template> <template>
<div v-loading="loading" :style="'height:' + height"> <div
v-loading="loading"
class="w-full h-[calc(100vh-var(--top-tool-height)-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-2px)]"
>
<iframe <iframe
ref="frameRef" ref="frameRef"
:src="props.src" :src="props.src"
frameborder="no" frameborder="0"
scrolling="auto" scrolling="auto"
style="width: 100%; height: 100%" height="100%"
width="100%"
allowfullscreen="true"
webkitallowfullscreen="true"
mozallowfullscreen="true"
></iframe> ></iframe>
</div> </div>
</template> </template>
...@@ -17,7 +17,7 @@ const title = computed(() => appStore.getTitle) ...@@ -17,7 +17,7 @@ const title = computed(() => appStore.getTitle)
<template> <template>
<div <div
:class="prefixCls" :class="prefixCls"
class="h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)]" class="h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)] overflow-hidden"
> >
<span class="text-14px">Copyright ©2022-{{ title }}</span> <span class="text-14px">Copyright ©2022-{{ title }}</span>
</div> </div>
......
...@@ -195,6 +195,16 @@ $prefix-cls: #{$namespace}-menu; ...@@ -195,6 +195,16 @@ $prefix-cls: #{$namespace}-menu;
} }
} }
// 垂直菜单
&__vertical {
:deep(.#{$elNamespace}-menu--vertical) {
&:not(.#{$elNamespace}-menu--collapse) .#{$elNamespace}-sub-menu__title,
.#{$elNamespace}-menu-item {
padding-right: 0;
}
}
}
// 水平菜单 // 水平菜单
&__horizontal { &__horizontal {
height: calc(var(--top-tool-height)) !important; height: calc(var(--top-tool-height)) !important;
......
...@@ -139,7 +139,7 @@ export default defineComponent({ ...@@ -139,7 +139,7 @@ export default defineComponent({
id={`${variables.namespace}-menu`} id={`${variables.namespace}-menu`}
class={[ class={[
prefixCls, prefixCls,
'relative bg-[var(--left-menu-bg-color)] top-1px layout-border__right', 'relative bg-[var(--left-menu-bg-color)] layout-border__right',
{ {
'w-[var(--tab-menu-max-width)]': !unref(collapse), 'w-[var(--tab-menu-max-width)]': !unref(collapse),
'w-[var(--tab-menu-min-width)]': unref(collapse) 'w-[var(--tab-menu-min-width)]': unref(collapse)
...@@ -147,7 +147,7 @@ export default defineComponent({ ...@@ -147,7 +147,7 @@ export default defineComponent({
]} ]}
onMouseleave={mouseleave} onMouseleave={mouseleave}
> >
<ElScrollbar class="!h-[calc(100%-var(--tab-menu-collapse-height)-1px)]"> <ElScrollbar class="!h-[calc(100%-var(--tab-menu-collapse-height))]">
<div> <div>
{() => { {() => {
return unref(tabRouters).map((v) => { return unref(tabRouters).map((v) => {
...@@ -199,7 +199,7 @@ export default defineComponent({ ...@@ -199,7 +199,7 @@ export default defineComponent({
{ {
'!left-[var(--tab-menu-min-width)]': unref(collapse), '!left-[var(--tab-menu-min-width)]': unref(collapse),
'!left-[var(--tab-menu-max-width)]': !unref(collapse), '!left-[var(--tab-menu-max-width)]': !unref(collapse),
'!w-[calc(var(--left-menu-max-width)+1px)]': unref(showMenu) || unref(fixedMenu), '!w-[var(--left-menu-max-width)]': unref(showMenu) || unref(fixedMenu),
'!w-0': !unref(showMenu) && !unref(fixedMenu) '!w-0': !unref(showMenu) && !unref(fixedMenu)
} }
]} ]}
......
...@@ -280,7 +280,7 @@ watch( ...@@ -280,7 +280,7 @@ watch(
</span> </span>
<div class="flex-1 overflow-hidden"> <div class="flex-1 overflow-hidden">
<ElScrollbar ref="scrollbarRef" class="h-full" @scroll="scroll"> <ElScrollbar ref="scrollbarRef" class="h-full" @scroll="scroll">
<div class="h-full flex"> <div class="h-[var(--tags-view-height)] flex">
<ContextMenu <ContextMenu
v-for="item in visitedViews" v-for="item in visitedViews"
:key="item.fullPath" :key="item.fullPath"
...@@ -491,10 +491,10 @@ $prefix-cls: #{$namespace}-tags-view; ...@@ -491,10 +491,10 @@ $prefix-cls: #{$namespace}-tags-view;
&::before { &::before {
position: absolute; position: absolute;
top: 1px; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: calc(100% - 1px); height: 100%;
border-left: 1px solid var(--el-border-color); border-left: 1px solid var(--el-border-color);
content: ''; content: '';
} }
...@@ -502,10 +502,10 @@ $prefix-cls: #{$namespace}-tags-view; ...@@ -502,10 +502,10 @@ $prefix-cls: #{$namespace}-tags-view;
&--first { &--first {
&::before { &::before {
position: absolute; position: absolute;
top: 1px; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: calc(100% - 1px); height: 100%;
border-right: 1px solid var(--el-border-color); border-right: 1px solid var(--el-border-color);
border-left: none; border-left: none;
content: ''; content: '';
...@@ -515,7 +515,7 @@ $prefix-cls: #{$namespace}-tags-view; ...@@ -515,7 +515,7 @@ $prefix-cls: #{$namespace}-tags-view;
&__item { &__item {
position: relative; position: relative;
top: 2px; top: 3px;
height: calc(100% - 6px); height: calc(100% - 6px);
padding-right: 15px; padding-right: 15px;
margin-left: 4px; margin-left: 4px;
...@@ -523,6 +523,7 @@ $prefix-cls: #{$namespace}-tags-view; ...@@ -523,6 +523,7 @@ $prefix-cls: #{$namespace}-tags-view;
cursor: pointer; cursor: pointer;
border: 1px solid #d9d9d9; border: 1px solid #d9d9d9;
border-radius: 2px; border-radius: 2px;
box-sizing: border-box;
&--close { &--close {
position: absolute; position: absolute;
...@@ -562,10 +563,11 @@ $prefix-cls: #{$namespace}-tags-view; ...@@ -562,10 +563,11 @@ $prefix-cls: #{$namespace}-tags-view;
} }
&__item--immerse { &__item--immerse {
top: 3px; top: 2px;
height: calc(100% - 3px);
padding-right: 35px; padding-right: 35px;
margin: 0 -10px; margin: 0 -10px;
border: 1px solid transparent; border: none !important;
-webkit-mask-box-image: url("data:image/svg+xml,%3Csvg width='68' height='34' viewBox='0 0 68 34' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m27,0c-7.99582,0 -11.95105,0.00205 -12,12l0,6c0,8.284 -0.48549,16.49691 -8.76949,16.49691l54.37857,-0.11145c-8.284,0 -8.60908,-8.10146 -8.60908,-16.38546l0,-6c0.11145,-12.08445 -4.38441,-12 -12,-12l-13,0z' fill='%23409eff'/%3E%3C/svg%3E") -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg width='68' height='34' viewBox='0 0 68 34' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m27,0c-7.99582,0 -11.95105,0.00205 -12,12l0,6c0,8.284 -0.48549,16.49691 -8.76949,16.49691l54.37857,-0.11145c-8.284,0 -8.60908,-8.10146 -8.60908,-16.38546l0,-6c0.11145,-12.08445 -4.38441,-12 -12,-12l-13,0z' fill='%23409eff'/%3E%3C/svg%3E")
12 27 15; 12 27 15;
......
...@@ -126,7 +126,7 @@ export const useRenderLayout = () => { ...@@ -126,7 +126,7 @@ export const useRenderLayout = () => {
<ToolHeader class="flex-1"></ToolHeader> <ToolHeader class="flex-1"></ToolHeader>
</div> </div>
<div class="absolute left-0 top-[var(--logo-height)+1px] h-[calc(100%-1px-var(--logo-height))] w-full flex"> <div class="absolute left-0 top-[var(--logo-height)] h-[calc(100%-var(--logo-height))] w-full flex">
<Menu class="relative layout-border__right !h-full"></Menu> <Menu class="relative layout-border__right !h-full"></Menu>
<div <div
class={[ class={[
...@@ -157,9 +157,9 @@ export const useRenderLayout = () => { ...@@ -157,9 +157,9 @@ export const useRenderLayout = () => {
'layout-border__bottom absolute', 'layout-border__bottom absolute',
{ {
'!fixed top-0 left-0 z-10': fixedHeader.value, '!fixed top-0 left-0 z-10': fixedHeader.value,
'w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)] mt-[calc(var(--logo-height)+1px)]': 'w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)] mt-[var(--logo-height)]':
collapse.value && fixedHeader.value, collapse.value && fixedHeader.value,
'w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)] mt-[calc(var(--logo-height)+1px)]': 'w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)] mt-[var(--logo-height)]':
!collapse.value && fixedHeader.value !collapse.value && fixedHeader.value
} }
]} ]}
...@@ -190,24 +190,14 @@ export const useRenderLayout = () => { ...@@ -190,24 +190,14 @@ export const useRenderLayout = () => {
<Menu class="h-[var(--top-tool-height)] flex-1 px-10px"></Menu> <Menu class="h-[var(--top-tool-height)] flex-1 px-10px"></Menu>
<ToolHeader></ToolHeader> <ToolHeader></ToolHeader>
</div> </div>
<div <div class={[`${prefixCls}-content`, 'w-full h-[calc(100%-var(--top-tool-height))]']}>
class={[
`${prefixCls}-content`,
'w-full',
{
'h-[calc(100%-var(--app-footer-height))]': !fixedHeader.value,
'h-[calc(100%-var(--tags-view-height)-var(--app-footer-height))]': fixedHeader.value
}
]}
>
<ElScrollbar <ElScrollbar
v-loading={pageLoading.value} v-loading={pageLoading.value}
class={[ class={[
`${prefixCls}-content-scrollbar`, `${prefixCls}-content-scrollbar`,
{ {
'mt-[var(--tags-view-height)] !pb-[calc(var(--tags-view-height)+var(--app-footer-height))]': '!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]':
fixedHeader.value, fixedHeader.value
'pb-[var(--app-footer-height)]': !fixedHeader.value
} }
]} ]}
> >
...@@ -216,7 +206,7 @@ export const useRenderLayout = () => { ...@@ -216,7 +206,7 @@ export const useRenderLayout = () => {
class={[ class={[
'layout-border__bottom layout-border__top relative', 'layout-border__bottom layout-border__top relative',
{ {
'!fixed w-full top-[calc(var(--top-tool-height)+1px)] left-0': fixedHeader.value '!fixed w-full top-[var(--top-tool-height)] left-0': fixedHeader.value
} }
]} ]}
style="transition: width var(--transition-time-02), left var(--transition-time-02);" style="transition: width var(--transition-time-02), left var(--transition-time-02);"
...@@ -238,7 +228,7 @@ export const useRenderLayout = () => { ...@@ -238,7 +228,7 @@ export const useRenderLayout = () => {
<ToolHeader class="flex-1"></ToolHeader> <ToolHeader class="flex-1"></ToolHeader>
</div> </div>
<div class="absolute left-0 top-[var(--logo-height)] h-[calc(100%-var(--logo-height))] w-[calc(100%-2px)] flex"> <div class="absolute left-0 top-[var(--logo-height)] h-[calc(100%-var(--logo-height))] w-full flex">
<TabMenu></TabMenu> <TabMenu></TabMenu>
<div <div
class={[ class={[
...@@ -270,18 +260,16 @@ export const useRenderLayout = () => { ...@@ -270,18 +260,16 @@ export const useRenderLayout = () => {
{tagsView.value ? ( {tagsView.value ? (
<TagsView <TagsView
class={[ class={[
'relative layout-border__bottom layout-border__top', 'relative layout-border__bottom',
{ {
'!fixed top-0 left-0 z-10': fixedHeader.value, '!fixed top-0 left-0 z-10': fixedHeader.value,
'w-[calc(100%-var(--tab-menu-min-width))] !left-[var(--tab-menu-min-width)] mt-[var(--logo-height)]': 'w-[calc(100%-var(--tab-menu-min-width))] !left-[var(--tab-menu-min-width)] mt-[var(--logo-height)]':
collapse.value && fixedHeader.value, collapse.value && fixedHeader.value && !fixedMenu.value,
'w-[calc(100%-var(--tab-menu-max-width))] !left-[var(--tab-menu-max-width)] mt-[var(--logo-height)]': 'w-[calc(100%-var(--tab-menu-max-width))] !left-[var(--tab-menu-max-width)] mt-[var(--logo-height)]':
!collapse.value && fixedHeader.value, !collapse.value && fixedHeader.value && !fixedMenu.value,
'!fixed top-0 !left-[var(--tab-menu-min-width)+var(--left-menu-max-width)] z-10': 'w-[calc(100%-var(--tab-menu-min-width)-var(--left-menu-max-width))] !left-[calc(var(--tab-menu-min-width)+var(--left-menu-max-width))] mt-[var(--logo-height)]':
fixedHeader.value && fixedMenu.value,
'w-[calc(100%-var(--tab-menu-min-width)-var(--left-menu-max-width))] !left-[var(--tab-menu-min-width)+var(--left-menu-max-width)] mt-[var(--logo-height)]':
collapse.value && fixedHeader.value && fixedMenu.value, collapse.value && fixedHeader.value && fixedMenu.value,
'w-[calc(100%-var(--tab-menu-max-width)-var(--left-menu-max-width))] !left-[var(--tab-menu-max-width)+var(--left-menu-max-width)] mt-[var(--logo-height)]': 'w-[calc(100%-var(--tab-menu-max-width)-var(--left-menu-max-width))] !left-[calc(var(--tab-menu-max-width)+var(--left-menu-max-width))] mt-[var(--logo-height)]':
!collapse.value && fixedHeader.value && fixedMenu.value !collapse.value && fixedHeader.value && fixedMenu.value
} }
]} ]}
......
...@@ -56,20 +56,20 @@ export const defaultShortcuts = [ ...@@ -56,20 +56,20 @@ export const defaultShortcuts = [
* 时间日期转换 * 时间日期转换
* @param date 当前时间,new Date() 格式 * @param date 当前时间,new Date() 格式
* @param format 需要转换的时间格式字符串 * @param format 需要转换的时间格式字符串
* @description format 字符串随意,如 `YYYY-mm、YYYY-mm-dd` * @description format 字符串随意,如 `YYYY-MM、YYYY-MM-DD`
* @description format 季度:"YYYY-mm-dd HH:MM:SS QQQQ" * @description format 季度:"YYYY-MM-DD HH:mm:ss QQQQ"
* @description format 星期:"YYYY-mm-dd HH:MM:SS WWW" * @description format 星期:"YYYY-MM-DD HH:mm:ss WWW"
* @description format 几周:"YYYY-mm-dd HH:MM:SS ZZZ" * @description format 几周:"YYYY-MM-DD HH:mm:ss ZZZ"
* @description format 季度 + 星期 + 几周:"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ" * @description format 季度 + 星期 + 几周:"YYYY-MM-DD HH:mm:ss WWW QQQQ ZZZ"
* @returns 返回拼接后的时间字符串 * @returns 返回拼接后的时间字符串
*/ */
export function formatDate(date: Date, format?: string): string { export function formatDate(date: Date, format?: string): string {
// 日期不存在,则返回空 // 日期不存在,则返回空
if (!date) { if (!date) {
return ''; return ''
} }
// 日期存在,则进行格式化 // 日期存在,则进行格式化
return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : ''; return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : ''
} }
/** /**
...@@ -110,7 +110,7 @@ export function getWeek(dateTime: Date): number { ...@@ -110,7 +110,7 @@ export function getWeek(dateTime: Date): number {
* @description param 3天: 60 * 60* 24 * 1000 * 3 * @description param 3天: 60 * 60* 24 * 1000 * 3
* @returns 返回拼接后的时间字符串 * @returns 返回拼接后的时间字符串
*/ */
export function formatPast(param: string | Date, format = 'YYYY-mm-dd HH:MM:SS'): string { export function formatPast(param: string | Date, format = 'YYYY-MM-DD HH:mm:ss'): string {
// 传入格式处理、存储转换值 // 传入格式处理、存储转换值
let t: any, s: number let t: any, s: number
// 获取js 时间戳 // 获取js 时间戳
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<doc-alert title="数据库 MyBatis" url="https://doc.iocoder.cn/mybatis/" /> <doc-alert title="数据库 MyBatis" url="https://doc.iocoder.cn/mybatis/" />
<doc-alert title="多数据源(读写分离)" url="https://doc.iocoder.cn/dynamic-datasource/" /> <doc-alert title="多数据源(读写分离)" url="https://doc.iocoder.cn/dynamic-datasource/" />
<ContentWrap> <ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
<IFrame v-if="!loading" :src="url" /> <IFrame v-if="!loading" v-loading="loading" :src="url" />
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
......
<template> <template>
<doc-alert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" /> <doc-alert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" />
<ContentWrap> <ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
<IFrame v-if="!loading" v-loading="loading" :src="src" /> <IFrame v-if="!loading" v-loading="loading" :src="src" />
</ContentWrap> </ContentWrap>
</template> </template>
......
<template> <template>
<doc-alert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" /> <doc-alert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" />
<ContentWrap> <ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
<IFrame v-if="!loading" v-loading="loading" :src="src" /> <IFrame v-if="!loading" v-loading="loading" :src="src" />
</ContentWrap> </ContentWrap>
</template> </template>
......
<template> <template>
<doc-alert title="接口文档" url="https://doc.iocoder.cn/api-doc/" /> <doc-alert title="接口文档" url="https://doc.iocoder.cn/api-doc/" />
<ContentWrap> <ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
<IFrame :src="src" /> <IFrame v-if="!loading" v-loading="loading" :src="src" />
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
......
...@@ -29,6 +29,17 @@ ...@@ -29,6 +29,17 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="销量" min-width="90" prop="salesCount" /> <el-table-column align="center" label="销量" min-width="90" prop="salesCount" />
<el-table-column align="center" label="库存" min-width="90" prop="stock" /> <el-table-column align="center" label="库存" min-width="90" prop="stock" />
<el-table-column v-if="spuData.length > 1 && isDelete" align="center" label="操作" min-width="90" >
<template #default="scope">
<el-button
type="primary"
link
@click="deleteSpu(scope.row.id)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</template> </template>
<script generic="T extends Spu" lang="ts" setup> <script generic="T extends Spu" lang="ts" setup>
...@@ -40,10 +51,13 @@ import { SpuProperty } from '@/views/mall/promotion/components/index' ...@@ -40,10 +51,13 @@ import { SpuProperty } from '@/views/mall/promotion/components/index'
defineOptions({ name: 'PromotionSpuAndSkuList' }) defineOptions({ name: 'PromotionSpuAndSkuList' })
const message = useMessage() // 消息弹窗
const props = defineProps<{ const props = defineProps<{
spuList: T[] spuList: T[]
ruleConfig: RuleConfig[] ruleConfig: RuleConfig[]
spuPropertyListP: SpuProperty<T>[] spuPropertyListP: SpuProperty<T>[]
isDelete?: boolean //spu是否可以多选
}>() }>()
const spuData = ref<Spu[]>([]) // spu 详情数据列表 const spuData = ref<Spu[]>([]) // spu 详情数据列表
...@@ -77,6 +91,19 @@ const imagePreview = (imgUrl: string) => { ...@@ -77,6 +91,19 @@ const imagePreview = (imgUrl: string) => {
}) })
} }
// 删除时的触发事件
const emits = defineEmits<{
(e: 'delete', spuId: number): void
}>()
/** 多选时可以删除spu **/
const deleteSpu = async (spuId: number) => {
await message.confirm('是否删除商品编号为' + spuId + '的数据?')
let index = spuData.value.findIndex((item) => item.id == spuId)
spuData.value.splice(index,1);
emits('delete',spuId)
}
/** /**
* 将传进来的值赋值给 skuList * 将传进来的值赋值给 skuList
*/ */
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
:rule-config="ruleConfig" :rule-config="ruleConfig"
:spu-list="spuList" :spu-list="spuList"
:spu-property-list-p="spuPropertyList" :spu-property-list-p="spuPropertyList"
:isDelete="true"
@delete="deleteSpu"
> >
<el-table-column align="center" label="优惠金额" min-width="168"> <el-table-column align="center" label="优惠金额" min-width="168">
<template #default="{ row: sku }"> <template #default="{ row: sku }">
...@@ -47,6 +49,7 @@ import { cloneDeep } from 'lodash-es' ...@@ -47,6 +49,7 @@ import { cloneDeep } from 'lodash-es'
import * as DiscountActivityApi from '@/api/mall/promotion/discount/discountActivity' import * as DiscountActivityApi from '@/api/mall/promotion/discount/discountActivity'
import * as ProductSpuApi from '@/api/mall/product/spu' import * as ProductSpuApi from '@/api/mall/product/spu'
import { getPropertyList, RuleConfig } from '@/views/mall/product/spu/components' import { getPropertyList, RuleConfig } from '@/views/mall/product/spu/components'
import {formatToFraction} from "@/utils";
defineOptions({ name: 'PromotionDiscountActivityForm' }) defineOptions({ name: 'PromotionDiscountActivityForm' })
...@@ -65,8 +68,8 @@ const spuAndSkuListRef = ref() // sku 限时折扣 配置组件Ref ...@@ -65,8 +68,8 @@ const spuAndSkuListRef = ref() // sku 限时折扣 配置组件Ref
const ruleConfig: RuleConfig[] = [] const ruleConfig: RuleConfig[] = []
const spuList = ref<DiscountActivityApi.SpuExtension[]>([]) // 选择的 spu const spuList = ref<DiscountActivityApi.SpuExtension[]>([]) // 选择的 spu
const spuPropertyList = ref<SpuProperty<DiscountActivityApi.SpuExtension>[]>([]) const spuPropertyList = ref<SpuProperty<DiscountActivityApi.SpuExtension>[]>([])
const spuIds = ref<number[]>([]);
const selectSpu = (spuId: number, skuIds: number[]) => { const selectSpu = (spuId: number, skuIds: number[]) => {
formRef.value.setValues({ spuId })
getSpuDetails(spuId, skuIds) getSpuDetails(spuId, skuIds)
} }
/** /**
...@@ -75,14 +78,22 @@ const selectSpu = (spuId: number, skuIds: number[]) => { ...@@ -75,14 +78,22 @@ const selectSpu = (spuId: number, skuIds: number[]) => {
const getSpuDetails = async ( const getSpuDetails = async (
spuId: number, spuId: number,
skuIds: number[] | undefined, skuIds: number[] | undefined,
products?: DiscountActivityApi.DiscountProductVO[] products?: DiscountActivityApi.DiscountProductVO[],
type?: string
) => { ) => {
const spuProperties: SpuProperty<DiscountActivityApi.SpuExtension>[] = [] //如果已经包含spu则跳过
if(spuIds.value.includes(spuId)){
if(type !== "load"){
message.error("数据重复选择!")
}
return;
}
spuIds.value.push(spuId)
const res = (await ProductSpuApi.getSpuDetailList([spuId])) as DiscountActivityApi.SpuExtension[] const res = (await ProductSpuApi.getSpuDetailList([spuId])) as DiscountActivityApi.SpuExtension[]
if (res.length == 0) { if (res.length == 0) {
return return
} }
spuList.value = [] //spuList.value = []
// 因为只能选择一个 // 因为只能选择一个
const spu = res[0] const spu = res[0]
const selectSkus = const selectSkus =
...@@ -100,15 +111,19 @@ const getSpuDetails = async ( ...@@ -100,15 +111,19 @@ const getSpuDetails = async (
config = product || config config = product || config
} }
sku.productConfig = config sku.productConfig = config
sku.price = formatToFraction(sku.price)
sku.marketPrice = formatToFraction(sku.marketPrice)
sku.costPrice = formatToFraction(sku.costPrice)
sku.firstBrokeragePrice = formatToFraction(sku.firstBrokeragePrice)
sku.secondBrokeragePrice = formatToFraction(sku.secondBrokeragePrice)
}) })
spu.skus = selectSkus as DiscountActivityApi.SkuExtension[] spu.skus = selectSkus as DiscountActivityApi.SkuExtension[]
spuProperties.push({ spuPropertyList.value.push({
spuId: spu.id!, spuId: spu.id!,
spuDetail: spu, spuDetail: spu,
propertyList: getPropertyList(spu) propertyList: getPropertyList(spu)
}) })
spuList.value.push(spu) spuList.value.push(spu)
spuPropertyList.value = spuProperties
} }
// ================= end ================= // ================= end =================
...@@ -126,8 +141,10 @@ const open = async (type: string, id?: number) => { ...@@ -126,8 +141,10 @@ const open = async (type: string, id?: number) => {
const data = (await DiscountActivityApi.getDiscountActivity( const data = (await DiscountActivityApi.getDiscountActivity(
id id
)) as DiscountActivityApi.DiscountActivityVO )) as DiscountActivityApi.DiscountActivityVO
const supId = data.products[0].spuId for (let productsKey in data.products) {
await getSpuDetails(supId!, data.products?.map((sku) => sku.skuId), data.products) const supId = data.products[productsKey].spuId
await getSpuDetails(supId!, data.products?.map((sku) => sku.skuId), data.products,"load")
}
formRef.value.setValues(data) formRef.value.setValues(data)
} finally { } finally {
formLoading.value = false formLoading.value = false
...@@ -149,9 +166,20 @@ const submitForm = async () => { ...@@ -149,9 +166,20 @@ const submitForm = async () => {
const data = formRef.value.formModel as DiscountActivityApi.DiscountActivityVO const data = formRef.value.formModel as DiscountActivityApi.DiscountActivityVO
// 获取 折扣商品配置 // 获取 折扣商品配置
const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig')) const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
let timp = false;
products.forEach((item: DiscountActivityApi.DiscountProductVO) => { products.forEach((item: DiscountActivityApi.DiscountProductVO) => {
item.discountType = data['discountType'] if(item.discountPrice != null && item.discountPrice > 0){
item.discountType = 1
}else if(item.discountPercent != null && item.discountPercent > 0){
item.discountType = 2
}else{
timp = true
}
}) })
if(timp){
message.error("优惠金额和折扣百分比需要填写一个");
return;
}
data.products = products data.products = products
// 真正提交 // 真正提交
if (formType.value === 'create') { if (formType.value === 'create') {
...@@ -173,7 +201,16 @@ const submitForm = async () => { ...@@ -173,7 +201,16 @@ const submitForm = async () => {
const resetForm = async () => { const resetForm = async () => {
spuList.value = [] spuList.value = []
spuPropertyList.value = [] spuPropertyList.value = []
spuIds.value = []
await nextTick() await nextTick()
formRef.value.getElFormRef().resetFields() formRef.value.getElFormRef().resetFields()
} }
/**
* 删除spu
*/
const deleteSpu = (spuId: number) => {
spuIds.value.splice(spuIds.value.findIndex((item) => item == spuId), 1)
spuPropertyList.value.splice(spuPropertyList.value.findIndex((item) => item.spuId == spuId), 1)
}
</script> </script>
...@@ -73,17 +73,6 @@ const crudSchemas = reactive<CrudSchema[]>([ ...@@ -73,17 +73,6 @@ const crudSchemas = reactive<CrudSchema[]>([
} }
}, },
{ {
label: '优惠类型',
field: 'discountType',
dictType: DICT_TYPE.PROMOTION_DISCOUNT_TYPE,
dictClass: 'number',
isSearch: true,
form: {
component: 'Radio',
value: 1
}
},
{
label: '活动商品', label: '活动商品',
field: 'spuId', field: 'spuId',
isTable: true, isTable: true,
......
...@@ -70,17 +70,17 @@ ...@@ -70,17 +70,17 @@
~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }} ~ {{ formatDate(scope.row.endTime, 'YYYY-MM-DD') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="商品图片" prop="spuName" min-width="80"> <!-- <el-table-column label="商品图片" prop="spuName" min-width="80">-->
<template #default="scope"> <!-- <template #default="scope">-->
<el-image <!-- <el-image-->
:src="scope.row.picUrl" <!-- :src="scope.row.picUrl"-->
class="h-40px w-40px" <!-- class="h-40px w-40px"-->
:preview-src-list="[scope.row.picUrl]" <!-- :preview-src-list="[scope.row.picUrl]"-->
preview-teleported <!-- preview-teleported-->
/> <!-- />-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="商品标题" prop="spuName" min-width="300" /> <!-- <el-table-column label="商品标题" prop="spuName" min-width="300" />-->
<el-table-column label="活动状态" align="center" prop="status" min-width="100"> <el-table-column label="活动状态" align="center" prop="status" min-width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
<MessageItem :message="item"> <MessageItem :message="item">
<ProductItem <ProductItem
v-if="KeFuMessageContentTypeEnum.PRODUCT === item.contentType" v-if="KeFuMessageContentTypeEnum.PRODUCT === item.contentType"
:spuId="getMessageContent(item).spuId"
:picUrl="getMessageContent(item).picUrl" :picUrl="getMessageContent(item).picUrl"
:price="getMessageContent(item).price" :price="getMessageContent(item).price"
:skuText="getMessageContent(item).introduction" :skuText="getMessageContent(item).introduction"
...@@ -393,7 +394,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { ...@@ -393,7 +394,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
border-left: 5px solid transparent; border-left: 5px solid transparent;
border-bottom: 5px solid transparent; border-bottom: 5px solid transparent;
border-top: 5px solid transparent; border-top: 5px solid transparent;
border-right: 5px solid #ffffff; border-right: 5px solid var(--app-content-bg-color);
} }
} }
} }
...@@ -412,7 +413,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { ...@@ -412,7 +413,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
right: -19px; right: -19px;
top: calc(50% - 10px); top: calc(50% - 10px);
position: absolute; position: absolute;
border-left: 5px solid #ffffff; border-left: 5px solid var(--app-content-bg-color);
border-bottom: 5px solid transparent; border-bottom: 5px solid transparent;
border-top: 5px solid transparent; border-top: 5px solid transparent;
border-right: 5px solid transparent; border-right: 5px solid transparent;
...@@ -422,9 +423,9 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { ...@@ -422,9 +423,9 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
// 消息气泡 // 消息气泡
.kefu-message { .kefu-message {
color: #333; color: #A9A9A9;
border-radius: 5px; border-radius: 5px;
box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.2); box-shadow: 3px 3px 5px rgba(220,220,220, 0.1);
padding: 5px 10px; padding: 5px 10px;
width: auto; width: auto;
max-width: 50%; max-width: 50%;
...@@ -432,7 +433,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { ...@@ -432,7 +433,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
display: inline-block !important; display: inline-block !important;
position: relative; position: relative;
word-break: break-all; word-break: break-all;
background-color: #ffffff; background-color: var(--app-content-bg-color);
transition: all 0.2s; transition: all 0.2s;
&:hover { &:hover {
...@@ -454,7 +455,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { ...@@ -454,7 +455,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => {
.chat-tools { .chat-tools {
width: 100%; width: 100%;
border: #e4e0e0 solid 1px; border: var(--el-border-color) solid 1px;
border-radius: 10px; border-radius: 10px;
height: 44px; height: 44px;
} }
......
<template> <template>
<ProductItem <ProductItem
v-for="item in list" v-for="item in list"
:spu-id="item.spuId"
:key="item.id" :key="item.id"
:picUrl="item.picUrl" :picUrl="item.picUrl"
:price="item.price" :price="item.price"
......
<template> <template>
<div v-if="isObject(getMessageContent)"> <div v-if="isObject(getMessageContent)" @click="openDetail(getMessageContent.id)" style="cursor: pointer;">
<div :key="getMessageContent.id" class="order-list-card-box mt-14px"> <div :key="getMessageContent.id" class="order-list-card-box mt-14px">
<div class="order-card-header flex items-center justify-between p-x-5px"> <div class="order-card-header flex items-center justify-between p-x-5px">
<div class="order-no">订单号:{{ getMessageContent.no }}</div> <div class="order-no">订单号:{{ getMessageContent.no }}</div>
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</div> </div>
<div v-for="item in getMessageContent.items" :key="item.id" class="border-bottom"> <div v-for="item in getMessageContent.items" :key="item.id" class="border-bottom">
<ProductItem <ProductItem
:spu-id="item.spuId"
:num="item.count" :num="item.count"
:picUrl="item.picUrl" :picUrl="item.picUrl"
:price="item.price" :price="item.price"
...@@ -36,6 +37,8 @@ import { KeFuMessageRespVO } from '@/api/mall/promotion/kefu/message' ...@@ -36,6 +37,8 @@ import { KeFuMessageRespVO } from '@/api/mall/promotion/kefu/message'
import { isObject } from '@/utils/is' import { isObject } from '@/utils/is'
import ProductItem from '@/views/mall/promotion/kefu/components/message/ProductItem.vue' import ProductItem from '@/views/mall/promotion/kefu/components/message/ProductItem.vue'
const { push } = useRouter()
defineOptions({ name: 'OrderItem' }) defineOptions({ name: 'OrderItem' })
const props = defineProps<{ const props = defineProps<{
message?: KeFuMessageRespVO message?: KeFuMessageRespVO
...@@ -46,6 +49,12 @@ const getMessageContent = computed(() => ...@@ -46,6 +49,12 @@ const getMessageContent = computed(() =>
typeof props.message !== 'undefined' ? jsonParse(props!.message!.content) : props.order typeof props.message !== 'undefined' ? jsonParse(props!.message!.content) : props.order
) )
/** 查看订单详情 */
const openDetail = (id: number) => {
console.log(getMessageContent)
push({ name: 'TradeOrderDetail', params: { id } })
}
/** /**
* 格式化订单状态的颜色 * 格式化订单状态的颜色
* *
...@@ -97,7 +106,7 @@ function formatOrderStatus(order: any) { ...@@ -97,7 +106,7 @@ function formatOrderStatus(order: any) {
.order-list-card-box { .order-list-card-box {
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
border: 1px #6a6a6a solid; border: 1px var(--el-border-color) solid;
background-color: var(--app-content-bg-color); background-color: var(--app-content-bg-color);
.order-card-header { .order-card-header {
......
<template> <template>
<div> <div @click.stop="openDetail(props.spuId)" style="cursor: pointer;">
<div> <div>
<slot name="top"></slot> <slot name="top"></slot>
</div> </div>
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
class="order-img" class="order-img"
fit="contain" fit="contain"
preview-teleported preview-teleported
@click.stop
/> />
</div> </div>
<div <div
...@@ -53,8 +54,14 @@ ...@@ -53,8 +54,14 @@
<script lang="ts" setup> <script lang="ts" setup>
import { fenToYuan } from '@/utils' import { fenToYuan } from '@/utils'
const { push } = useRouter()
defineOptions({ name: 'ProductItem' }) defineOptions({ name: 'ProductItem' })
const props = defineProps({ const props = defineProps({
spuId: {
type: Number,
default: 0
},
picUrl: { picUrl: {
type: String, type: String,
default: 'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto' default: 'https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto'
...@@ -107,13 +114,19 @@ const skuString = computed(() => { ...@@ -107,13 +114,19 @@ const skuString = computed(() => {
} }
return props.skuText return props.skuText
}) })
/** 查看商品详情 */
const openDetail = (spuId: number) => {
console.log(props.spuId)
push({ name: 'ProductSpuDetail', params: { id: spuId } })
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ss-order-card-warp { .ss-order-card-warp {
padding: 20px; padding: 20px;
border-radius: 10px; border-radius: 10px;
border: 1px #6a6a6a solid; border: 1px var(--el-border-color) solid;
background-color: var(--app-content-bg-color); background-color: var(--app-content-bg-color);
.img-box { .img-box {
...@@ -134,7 +147,7 @@ const skuString = computed(() => { ...@@ -134,7 +147,7 @@ const skuString = computed(() => {
.tool-box { .tool-box {
position: absolute; position: absolute;
right: 0px; right: 0;
bottom: -10px; bottom: -10px;
} }
} }
......
...@@ -325,13 +325,13 @@ onMounted(async () => { ...@@ -325,13 +325,13 @@ onMounted(async () => {
align-items: center; align-items: center;
min-height: 30px; min-height: 30px;
padding: 10px; padding: 10px;
background-color: #f7f8fa; background-color: var(--app-content-bg-color);
&::before { &::before {
position: absolute; position: absolute;
top: 10px; top: 10px;
left: 13px; left: 13px;
border-color: transparent #f7f8fa transparent transparent; /* 尖角颜色,左侧朝向 */ border-color: transparent var(--app-content-bg-color) transparent transparent; /* 尖角颜色,左侧朝向 */
border-style: solid; border-style: solid;
border-width: 8px; /* 调整尖角大小 */ border-width: 8px; /* 调整尖角大小 */
content: ''; content: '';
......
...@@ -106,14 +106,8 @@ ...@@ -106,14 +106,8 @@
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
</template> </template>
<el-dialog <el-dialog v-model="mapDialogVisible" title="获取经纬度" append-to-body>
v-model="mapDialogVisible" <IFrame class="h-609px" :src="tencentLbsUrl" />
title="获取经纬度"
append-to-body
width="500px"
class="mapBox"
>
<iframe id="mapPage" width="100%" height="100%" frameborder="0" :src="tencentLbsUrl"></iframe>
</el-dialog> </el-dialog>
</Dialog> </Dialog>
</template> </template>
...@@ -266,8 +260,3 @@ onMounted(async () => { ...@@ -266,8 +260,3 @@ onMounted(async () => {
await initTencentLbsMap() await initTencentLbsMap()
}) })
</script> </script>
<style lang="scss">
.mapBox .el-dialog__body {
height: 640px !important;
}
</style>
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
<ContentWrap> <ContentWrap>
<doc-alert title="大屏设计器" url="https://doc.iocoder.cn/report/screen/" /> <doc-alert title="大屏设计器" url="https://doc.iocoder.cn/report/screen/" />
<ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
<IFrame :src="src" /> <IFrame :src="src" />
</ContentWrap> </ContentWrap>
</ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
defineOptions({ name: 'GoView' }) defineOptions({ name: 'GoView' })
......
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
<ContentWrap> <ContentWrap>
<doc-alert title="报表设计器" url="https://doc.iocoder.cn/report/" /> <doc-alert title="报表设计器" url="https://doc.iocoder.cn/report/" />
<ContentWrap :bodyStyle="{ padding: '0px' }" class="!mb-0">
<IFrame :src="src" /> <IFrame :src="src" />
</ContentWrap> </ContentWrap>
</ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
defineOptions({ name: 'JimuReport' }) defineOptions({ name: 'JimuReport' })
const BASE_URL = import.meta.env.VITE_BASE_URL const src = ref(import.meta.env.VITE_BASE_URL + '/jmreport/list?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken())
</script> </script>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<el-tag>{{ formData.code }}</el-tag> <el-tag>{{ formData.code }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="菜单权限"> <el-form-item label="菜单权限">
<el-card class="cardHeight"> <el-card class="w-full h-400px !overflow-y-scroll" shadow="never">
<template #header> <template #header>
全选/全不选: 全选/全不选:
<el-switch <el-switch
...@@ -151,10 +151,3 @@ const handleCheckedTreeExpand = () => { ...@@ -151,10 +151,3 @@ const handleCheckedTreeExpand = () => {
} }
} }
</script> </script>
<style lang="scss" scoped>
.cardHeight {
width: 100%;
max-height: 400px;
overflow-y: scroll;
}
</style>
<template> <template>
<Dialog v-model="dialogVisible" title="菜单权限" width="800"> <Dialog v-model="dialogVisible" title="数据权限" width="800">
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px"> <el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
<el-form-item label="角色名称"> <el-form-item label="角色名称">
<el-tag>{{ formData.name }}</el-tag> <el-tag>{{ formData.name }}</el-tag>
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
<el-form-item <el-form-item
v-if="formData.dataScope === SystemDataScopeEnum.DEPT_CUSTOM" v-if="formData.dataScope === SystemDataScopeEnum.DEPT_CUSTOM"
label="权限范围" label="权限范围"
style="display: flex" label-width="80px"
> >
<el-card class="card" shadow="never"> <el-card class="w-full h-400px !overflow-y-scroll" shadow="never">
<template #header> <template #header>
全选/全不选: 全选/全不选:
<el-switch <el-switch
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-input v-model="formData.name" placeholder="请输入套餐名" /> <el-input v-model="formData.name" placeholder="请输入套餐名" />
</el-form-item> </el-form-item>
<el-form-item label="菜单权限"> <el-form-item label="菜单权限">
<el-card class="cardHeight"> <el-card class="w-full h-400px !overflow-y-scroll" shadow="never">
<template #header> <template #header>
全选/全不选: 全选/全不选:
<el-switch <el-switch
...@@ -185,10 +185,3 @@ const handleCheckedTreeExpand = () => { ...@@ -185,10 +185,3 @@ const handleCheckedTreeExpand = () => {
} }
} }
</script> </script>
<style lang="scss" scoped>
.cardHeight {
width: 100%;
max-height: 400px;
overflow-y: scroll;
}
</style>
...@@ -12,7 +12,7 @@ export default defineConfig({ ...@@ -12,7 +12,7 @@ export default defineConfig({
${selector} { ${selector} {
display: flex; display: flex;
height: 100%; height: 100%;
padding: 1px 10px 0; padding: 0 10px;
cursor: pointer; cursor: pointer;
align-items: center; align-items: center;
transition: background var(--transition-time-02); transition: background var(--transition-time-02);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment