+
-
-
-
-
+
+
+ {{ item.label }}
+
@@ -64,7 +83,7 @@ const layout = computed(() => appStore.getLayout)
$prefix-cls: #{$namespace}-layout-radio-picker;
.#{$prefix-cls} {
- &__classic {
+ &__sidebar-nav {
border: 2px solid #e5e7eb;
border-radius: 4px;
@@ -92,7 +111,8 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
}
}
- &__top-left {
+ &__header-sidebar-nav,
+ &__mixed-nav {
border: 2px solid #e5e7eb;
border-radius: 4px;
@@ -120,7 +140,7 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
}
}
- &__top {
+ &__header-nav {
border: 2px solid #e5e7eb;
border-radius: 4px;
@@ -137,7 +157,8 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
}
}
- &__cut-menu {
+ &__header-mixed-nav,
+ &__sidebar-mixed-nav {
border: 2px solid #e5e7eb;
border-radius: 4px;
@@ -165,6 +186,25 @@ $prefix-cls: #{$namespace}-layout-radio-picker;
}
}
+ &__mixed-nav::after {
+ position: absolute;
+ top: 33%;
+ left: 0;
+ width: 33%;
+ height: 67%;
+ background-color: #fff;
+ border-radius: 0 0 0 4px;
+ content: '';
+ }
+
+ &__header-mixed-nav::after {
+ background-color: #273352;
+ }
+
+ &__sidebar-mixed-nav::before {
+ display: none;
+ }
+
.is-acitve {
border-color: var(--el-color-primary);
}
diff --git a/src/layout/components/Setting/src/useSetting.ts b/src/layout/components/Setting/src/useSetting.ts
new file mode 100644
index 000000000..204773661
--- /dev/null
+++ b/src/layout/components/Setting/src/useSetting.ts
@@ -0,0 +1,14 @@
+import { ref } from 'vue'
+
+const drawerVisible = ref(false)
+
+export const useSetting = () => {
+ const openSetting = () => {
+ drawerVisible.value = true
+ }
+
+ return {
+ drawerVisible,
+ openSetting
+ }
+}
diff --git a/src/layout/components/TabMenu/src/TabMenu.vue b/src/layout/components/TabMenu/src/TabMenu.vue
index efad6a676..83dcc2d9d 100644
--- a/src/layout/components/TabMenu/src/TabMenu.vue
+++ b/src/layout/components/TabMenu/src/TabMenu.vue
@@ -10,6 +10,12 @@ import { cloneDeep } from 'lodash-es'
import { filterMenusPath, initTabMap, tabPathMap } from './helper'
import { useDesign } from '@/hooks/web/useDesign'
import { isUrl } from '@/utils/is'
+import { createRouteLocation } from '@/utils/routeParams'
+import { getRootPath, isHeaderMixedNavLayout, isTwoColumnLayout } from '@/utils/layout'
+import {
+ getRootMenuRoute,
+ normalizeMenuTargetPath
+} from '@/layout/components/Menu/src/menuRoute'
const { getPrefixCls, variables } = useDesign()
@@ -18,7 +24,7 @@ const prefixCls = getPrefixCls('tab-menu')
export default defineComponent({
name: 'TabMenu',
setup() {
- const { push, currentRoute } = useRouter()
+ const { push, currentRoute, resolve } = useRouter()
const { t } = useI18n()
@@ -28,37 +34,47 @@ export default defineComponent({
const fixedMenu = computed(() => appStore.getFixedMenu)
+ const layout = computed(() => appStore.getLayout)
+
+ const headerMixed = computed(() => isHeaderMixedNavLayout(unref(layout)))
+
+ const twoColumn = computed(() => isTwoColumnLayout(unref(layout)))
+
const permissionStore = usePermissionStore()
const routers = computed(() => permissionStore.getRouters)
- const tabRouters = computed(() => unref(routers).filter((v) => !v?.meta?.hidden))
+ const currentMenuPath = computed(() =>
+ normalizeMenuTargetPath(
+ (unref(currentRoute).meta.activeMenu as string) || unref(currentRoute).path
+ )
+ )
+
+ const activeRootInfo = computed(() => {
+ const targetPath =
+ unref(headerMixed) && permissionStore.getMenuRootPath
+ ? permissionStore.getMenuRootPath
+ : unref(currentMenuPath)
+ return getRootMenuRoute(unref(routers), targetPath)
+ })
+
+ const rootPath = computed(() => unref(activeRootInfo)?.fullPath || getRootPath(unref(currentMenuPath)))
+
+ const activeRootRoute = computed(() => unref(activeRootInfo)?.route)
+
+ const tabRouters = computed(() => {
+ const sourceRoutes = unref(headerMixed)
+ ? unref(activeRootRoute)?.children || []
+ : unref(routers)
+ return sourceRoutes.filter((v) => !v?.meta?.hidden)
+ })
+
+ const getTabParentPath = () => (unref(headerMixed) ? unref(rootPath) : '')
const setCollapse = () => {
appStore.setCollapse(!unref(collapse))
}
- onMounted(() => {
- if (unref(fixedMenu)) {
- const path = `/${unref(currentRoute).path.split('/')[1]}`
- const children = unref(tabRouters).find(
- (v) =>
- (v.meta?.alwaysShow || (v?.children?.length && v?.children?.length > 1)) &&
- v.path === path
- )?.children
-
- tabActive.value = path
- if (children) {
- permissionStore.setMenuTabRouters(
- cloneDeep(children).map((v) => {
- v.path = pathResolve(unref(tabActive), v.path)
- return v
- })
- )
- }
- }
- })
-
watch(
() => routers.value,
(routers: AppRouteRecordRaw[]) => {
@@ -66,8 +82,7 @@ export default defineComponent({
filterMenusPath(routers, routers)
},
{
- immediate: true,
- deep: true
+ immediate: true
}
)
@@ -87,35 +102,134 @@ export default defineComponent({
)
// 是否显示菜单
- const showMenu = ref(unref(fixedMenu) ? true : false)
+ const showMenu = ref(unref(fixedMenu) || unref(headerMixed) || unref(twoColumn))
// tab高亮
const tabActive = ref('')
+ const hasExtraMenu = computed(() => permissionStore.getMenuTabRouters.length > 0)
+
+ const getFullTabPath = (route: AppRouteRecordRaw) => pathResolve(getTabParentPath(), route.path)
+
+ const getVisibleChildren = (route: AppRouteRecordRaw): AppRouteRecordRaw[] =>
+ (route.children || []).filter((child) => !child.meta?.hidden)
+
+ const shouldShowExtraMenu = (route: AppRouteRecordRaw): boolean => {
+ const children = getVisibleChildren(route)
+ if (!children.length) {
+ return false
+ }
+ return unref(headerMixed) || !!route.meta?.alwaysShow || children.length > 1
+ }
+
+ const isSameMenuRouters = (left: AppRouteRecordRaw[], right: AppRouteRecordRaw[]): boolean => {
+ return (
+ left.length === right.length &&
+ left.every((route, index) => route.path === right[index]?.path && route.name === right[index]?.name)
+ )
+ }
+
+ const setExtraMenuRouters = (routers: AppRouteRecordRaw[]) => {
+ if (isSameMenuRouters(permissionStore.getMenuTabRouters, routers)) {
+ return
+ }
+ permissionStore.setMenuTabRouters(routers)
+ }
+
+ const buildExtraMenuRouters = (children: AppRouteRecordRaw[], parentPath: string) =>
+ cloneDeep(children).map((v) => {
+ v.path = pathResolve(parentPath, v.path)
+ return v
+ })
+
+ const getTabItem = (route: AppRouteRecordRaw): AppRouteRecordRaw => {
+ const fullTabPath = getFullTabPath(route)
+ const children = getVisibleChildren(route)
+ if (shouldShowExtraMenu(route) || !children.length) {
+ return { ...route, path: fullTabPath }
+ }
+ return {
+ ...children[0],
+ path: pathResolve(fullTabPath, children[0].path)
+ } as AppRouteRecordRaw
+ }
+
+ const isCurrentRouteInTab = (tabPath: string) => {
+ const currentPath = unref(currentMenuPath)
+ if (unref(headerMixed)) {
+ return currentPath === tabPath || currentPath.startsWith(`${tabPath}/`)
+ }
+ return !!tabPathMap[tabPath]?.includes(currentPath)
+ }
+
+ const syncTabMenusByRoute = () => {
+ if (!unref(fixedMenu) && !unref(headerMixed) && !unref(twoColumn)) {
+ return
+ }
+
+ const currentPath = unref(currentMenuPath)
+ const activeTab = unref(tabRouters).find((route) => {
+ const tabPath = getFullTabPath(route)
+ return currentPath === tabPath || currentPath.startsWith(`${tabPath}/`)
+ })
+
+ if (!activeTab || !shouldShowExtraMenu(activeTab)) {
+ tabActive.value = activeTab ? getFullTabPath(activeTab) : ''
+ showMenu.value = unref(fixedMenu) || unref(headerMixed) || unref(twoColumn)
+ setExtraMenuRouters([])
+ return
+ }
+
+ const activeTabPath = getFullTabPath(activeTab)
+ tabActive.value = activeTabPath
+ showMenu.value = true
+ setExtraMenuRouters(buildExtraMenuRouters(getVisibleChildren(activeTab), activeTabPath))
+ }
+
+ watch(
+ () =>
+ [
+ unref(currentRoute).path,
+ permissionStore.getMenuRootPath,
+ unref(tabRouters),
+ unref(fixedMenu),
+ unref(headerMixed),
+ unref(twoColumn)
+ ] as const,
+ syncTabMenusByRoute,
+ {
+ immediate: true
+ }
+ )
+
// tab点击事件
const tabClick = (item: AppRouteRecordRaw) => {
+ const link = item.meta?.link
+ if (typeof link === 'string') {
+ window.open(link)
+ return
+ }
if (isUrl(item.path)) {
window.open(item.path)
return
}
- const newPath = item.children ? item.path : item.path.split('/')[0]
+ const newPath = normalizeMenuTargetPath(item.path)
const oldPath = unref(tabActive)
- tabActive.value = item.children ? item.path : item.path.split('/')[0]
- if (item.children) {
+ tabActive.value = newPath
+ const children = getVisibleChildren(item)
+ if (children.length) {
if (newPath === oldPath || !unref(showMenu)) {
- showMenu.value = unref(fixedMenu) ? true : !unref(showMenu)
+ showMenu.value = unref(fixedMenu) || unref(headerMixed) || unref(twoColumn) ? true : !unref(showMenu)
}
if (unref(showMenu)) {
- permissionStore.setMenuTabRouters(
- cloneDeep(item.children).map((v) => {
- v.path = pathResolve(unref(tabActive), v.path)
- return v
- })
- )
+ setExtraMenuRouters(buildExtraMenuRouters(children, unref(tabActive)))
}
} else {
- push(item.path)
- permissionStore.setMenuTabRouters([])
+ const targetLocation = createRouteLocation(item.path, item.meta, item.name)
+ if (resolve(targetLocation).fullPath !== unref(currentRoute).fullPath) {
+ push(targetLocation)
+ }
+ setExtraMenuRouters([])
showMenu.value = false
}
}
@@ -123,14 +237,14 @@ export default defineComponent({
// 设置高亮
const isActive = (currentPath: string) => {
const { path } = unref(currentRoute)
- if (tabPathMap[currentPath].includes(path)) {
+ if (isCurrentRouteInTab(currentPath) || tabPathMap[currentPath]?.includes(path)) {
return true
}
return false
}
const mouseleave = () => {
- if (!unref(showMenu) || unref(fixedMenu)) return
+ if (!unref(showMenu) || unref(fixedMenu) || unref(headerMixed) || unref(twoColumn)) return
showMenu.value = false
}
@@ -151,21 +265,15 @@ export default defineComponent({
{() => {
return unref(tabRouters).map((v) => {
- const item = (
- v.meta?.alwaysShow || (v?.children?.length && v?.children?.length > 1)
- ? v
- : {
- ...(v?.children && v?.children[0]),
- path: pathResolve(v.path, (v?.children && v?.children[0])?.path as string)
- }
- ) as AppRouteRecordRaw
+ const fullTabPath = getFullTabPath(v)
+ const item = getTabItem(v)
return (
{
@@ -193,18 +301,23 @@ export default defineComponent({
>
-
+ {unref(hasExtraMenu) ? (
+
+ ) : undefined}
)
}
diff --git a/src/layout/components/TagsView/src/TagsView.vue b/src/layout/components/TagsView/src/TagsView.vue
index 69f94bfb7..855984746 100644
--- a/src/layout/components/TagsView/src/TagsView.vue
+++ b/src/layout/components/TagsView/src/TagsView.vue
@@ -1,5 +1,5 @@
diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue
index 30af14f6e..122bdd170 100644
--- a/src/views/Login/Login.vue
+++ b/src/views/Login/Login.vue
@@ -33,11 +33,11 @@

-
{{ underlineToHump(appStore.getTitle) }}
+
{{ underlineToHump(appStore.getTitle) }}
@@ -75,7 +75,14 @@ import { useAppStore } from '@/store/modules/app'
import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
-import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue, ForgetPasswordForm } from './components'
+import {
+ LoginForm,
+ MobileForm,
+ QrCodeForm,
+ RegisterForm,
+ SSOLoginVue,
+ ForgetPasswordForm
+} from './components'
defineOptions({ name: 'Login' })
diff --git a/src/views/Login/SocialLogin.vue b/src/views/Login/SocialLogin.vue
index 961f4ddb1..3d96c2467 100644
--- a/src/views/Login/SocialLogin.vue
+++ b/src/views/Login/SocialLogin.vue
@@ -114,8 +114,8 @@
- {{ t('login.forgetPassword') }}
+
+ {{ t('login.forgetPassword') }}
diff --git a/src/views/ai/chat/index/components/conversation/ConversationList.vue b/src/views/ai/chat/index/components/conversation/ConversationList.vue
index f73fb2731..b6630c30e 100644
--- a/src/views/ai/chat/index/components/conversation/ConversationList.vue
+++ b/src/views/ai/chat/index/components/conversation/ConversationList.vue
@@ -60,12 +60,12 @@
class="py-0.5 px-2.5"
style="
max-width: 220px;
+ overflow: hidden;
font-size: 14px;
font-weight: 400;
color: var(--el-text-color-regular);
- overflow: hidden;
- white-space: nowrap;
text-overflow: ellipsis;
+ white-space: nowrap;
"
>
{{ conversation.title }}
@@ -103,9 +103,9 @@
{{ file.name }}
-
({{ formatFileSize(file.size) }})
+ {{ file.name }}
+
+
+ ({{ formatFileSize(file.size) }})
+
{
--el-button-border-color: transparent;
--el-button-hover-bg-color: var(--el-fill-color-light);
--el-button-hover-border-color: transparent;
+
color: var(--el-text-color-regular);
}
.upload-btn.has-files {
- color: var(--el-color-primary);
--el-button-hover-bg-color: var(--el-color-primary-light-9);
+
+ color: var(--el-color-primary);
}
.file-tooltip {
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
- transform: translateX(-50%);
+ z-index: 1000;
+ max-width: 320px;
+ min-width: 240px;
+ padding: 8px;
background: white;
border: 1px solid var(--el-border-color-light);
border-radius: 8px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
- z-index: 1000;
- min-width: 240px;
- max-width: 320px;
- padding: 8px;
+ transform: translateX(-50%);
+ box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
animation: fadeInDown 0.2s ease;
}
@@ -314,25 +317,25 @@ onUnmounted(() => {
position: absolute;
bottom: -5px;
left: 50%;
- transform: translateX(-50%);
width: 0;
height: 0;
- border-left: 5px solid transparent;
- border-right: 5px solid transparent;
border-top: 5px solid var(--el-border-color-light);
+ border-right: 5px solid transparent;
+ border-left: 5px solid transparent;
+ transform: translateX(-50%);
}
/* Tooltip 箭头伪元素 */
.tooltip-arrow::after {
- content: '';
position: absolute;
bottom: 1px;
left: -4px;
width: 0;
height: 0;
- border-left: 4px solid transparent;
- border-right: 4px solid transparent;
border-top: 4px solid white;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+ content: '';
}
@keyframes fadeInDown {
@@ -340,6 +343,7 @@ onUnmounted(() => {
opacity: 0;
transform: translateX(-50%) translateY(4px);
}
+
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
@@ -351,6 +355,7 @@ onUnmounted(() => {
opacity: 0;
transform: translateX(-50%) translateY(4px);
}
+
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
@@ -374,6 +379,7 @@ onUnmounted(() => {
.file-list::-webkit-scrollbar-thumb:hover {
background: var(--el-border-color);
}
+
/* 滚动条样式 */
.file-list::-webkit-scrollbar {
width: 4px;
diff --git a/src/views/ai/chat/index/components/message/MessageReasoning.vue b/src/views/ai/chat/index/components/message/MessageReasoning.vue
index 7cf615c2d..b4781fd99 100644
--- a/src/views/ai/chat/index/components/message/MessageReasoning.vue
+++ b/src/views/ai/chat/index/components/message/MessageReasoning.vue
@@ -79,11 +79,11 @@ const toggleExpanded = () => {
}
.max-h-300px::-webkit-scrollbar-thumb {
- background: rgba(156, 163, 175, 0.4);
+ background: rgb(156 163 175 / 40%);
border-radius: 2px;
}
.max-h-300px::-webkit-scrollbar-thumb:hover {
- background: rgba(156, 163, 175, 0.6);
+ background: rgb(156 163 175 / 60%);
}
diff --git a/src/views/ai/chat/index/components/role/RoleRepository.vue b/src/views/ai/chat/index/components/role/RoleRepository.vue
index 04113731f..807be587b 100644
--- a/src/views/ai/chat/index/components/role/RoleRepository.vue
+++ b/src/views/ai/chat/index/components/role/RoleRepository.vue
@@ -228,8 +228,8 @@ onMounted(async () => {
}
.el-tabs__header {
- margin: 0 !important;
padding: 0 !important;
+ margin: 0 !important;
}
.el-tabs__nav-wrap {
@@ -241,6 +241,6 @@ onMounted(async () => {
}
.el-tab-pane {
- padding: 8px 0 0 0 !important;
+ padding: 8px 0 0 !important;
}
diff --git a/src/views/ai/knowledge/segment/index.vue b/src/views/ai/knowledge/segment/index.vue
index e2f8a67f3..6a88b4746 100644
--- a/src/views/ai/knowledge/segment/index.vue
+++ b/src/views/ai/knowledge/segment/index.vue
@@ -57,16 +57,16 @@
class="content-expand"
style="
padding: 10px 20px;
- white-space: pre-wrap;
line-height: 1.5;
+ white-space: pre-wrap;
background-color: #f9f9f9;
- border-radius: 4px;
border-left: 3px solid #409eff;
+ border-radius: 4px;
"
>
完整内容:
diff --git a/src/views/ai/mindmap/index/components/Right.vue b/src/views/ai/mindmap/index/components/Right.vue
index b1d04de49..0ab72d741 100644
--- a/src/views/ai/mindmap/index/components/Right.vue
+++ b/src/views/ai/mindmap/index/components/Right.vue
@@ -143,11 +143,12 @@ defineExpose({
flex-direction: column;
:deep(.el-card__body) {
+ @extend .hide-scroll-bar;
+
+ padding: 0;
+ overflow-y: auto;
box-sizing: border-box;
flex-grow: 1;
- overflow-y: auto;
- padding: 0;
- @extend .hide-scroll-bar;
}
}
diff --git a/src/views/ai/mindmap/index/index.vue b/src/views/ai/mindmap/index/index.vue
index 72f05538a..6ce4267db 100644
--- a/src/views/ai/mindmap/index/index.vue
+++ b/src/views/ai/mindmap/index/index.vue
@@ -81,7 +81,7 @@ const submit = (data: AiMindMapGenerateReqVO) => {
console.error('生成思维导图失败', err)
stopStream()
// 需要抛出异常,禁止重试
- throw error
+ throw err
},
ctrl: ctrl.value
})
diff --git a/src/views/ai/music/index/index.vue b/src/views/ai/music/index/index.vue
index 413792a7f..da9dc0c1b 100644
--- a/src/views/ai/music/index/index.vue
+++ b/src/views/ai/music/index/index.vue
@@ -1,9 +1,9 @@
-
+
-
+
-
+
@@ -13,14 +13,14 @@ import List from './list/index.vue'
defineOptions({ name: 'Index' })
-const listRef = ref
void}>>(null)
+const listRef = ref void }>>(null)
/*
*@Description: 拿到左侧配置信息调用右侧音乐生成的方法
*@MethodAuthor: xiaohong
*@Date: 2024-07-19 11:13:38
-*/
-function generateMusic (args: {formData: Recordable}) {
- unref(listRef)?.generateMusic(args.formData)
+ */
+function generateMusic(args: { formData: Recordable }) {
+ unref(listRef)?.generateMusic(args.formData)
}
diff --git a/src/views/ai/music/index/list/audioBar/index.vue b/src/views/ai/music/index/list/audioBar/index.vue
index db7f76734..ca1ab1bf1 100644
--- a/src/views/ai/music/index/list/audioBar/index.vue
+++ b/src/views/ai/music/index/list/audioBar/index.vue
@@ -1,34 +1,55 @@
-
+
-
+
-
{{currentSong.name}}
-
{{currentSong.singer}}
+
{{ currentSong.name }}
+
{{ currentSong.singer }}
-
+
-
-
-
+
+
+
- {{audioProps.currentTime}}
-
+ {{ audioProps.currentTime }}
+
{{ audioProps.duration }}
-
-
-
+
+
@@ -42,17 +63,17 @@ defineOptions({ name: 'Index' })
const currentSong = inject('currentSong', {})
const audioRef = ref
>(null)
- // 音频相关属性https://www.runoob.com/tags/ref-av-dom.html
+// 音频相关属性https://www.runoob.com/tags/ref-av-dom.html
const audioProps = reactive({
autoplay: true,
paused: false,
currentTime: '00:00',
duration: '00:00',
- muted: false,
- volume: 50,
+ muted: false,
+ volume: 50
})
-function toggleStatus (type: string) {
+function toggleStatus(type: string) {
audioProps[type] = !audioProps[type]
if (type === 'paused' && audioRef.value) {
if (audioProps[type]) {
@@ -64,7 +85,7 @@ function toggleStatus (type: string) {
}
// 更新播放位置
-function audioTimeUpdate (args) {
+function audioTimeUpdate(args) {
audioProps.currentTime = formatPast(new Date(args.timeStamp), 'mm:ss')
}
diff --git a/src/views/ai/music/index/list/index.vue b/src/views/ai/music/index/list/index.vue
index 6c33f565a..d21834b58 100644
--- a/src/views/ai/music/index/list/index.vue
+++ b/src/views/ai/music/index/list/index.vue
@@ -6,26 +6,26 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -36,7 +36,6 @@ import audioBar from './audioBar/index.vue'
defineOptions({ name: 'Index' })
-
const currentType = ref('mine')
// loading 状态
const loading = ref(false)
@@ -52,9 +51,9 @@ provide('currentSong', currentSong)
*@Description: 调接口生成音乐列表
*@MethodAuthor: xiaohong
*@Date: 2024-06-27 17:06:44
-*/
-function generateMusic (formData: Recordable) {
- console.log(formData);
+ */
+function generateMusic(formData: Recordable) {
+ console.log(formData)
loading.value = true
setTimeout(() => {
mySongList.value = Array.from({ length: 20 }, (_, index) => {
@@ -63,7 +62,8 @@ function generateMusic (formData: Recordable) {
audioUrl: '',
videoUrl: '',
title: '我走后' + index,
- imageUrl: 'https://www.carsmp3.com/data/attachment/forum/201909/19/091020q5kgre20fidreqyt.jpg',
+ imageUrl:
+ 'https://www.carsmp3.com/data/attachment/forum/201909/19/091020q5kgre20fidreqyt.jpg',
desc: 'Metal, symphony, film soundtrack, grand, majesticMetal, dtrack, grand, majestic',
date: '2024年04月30日 14:02:57',
lyric: `大江东去,浪淘尽,千古风流人物。
@@ -85,8 +85,8 @@ function generateMusic (formData: Recordable) {
*@Description: 设置当前播放的音乐
*@MethodAuthor: xiaohong
*@Date: 2024-07-19 11:22:33
-*/
-function setCurrentSong (music: Recordable) {
+ */
+function setCurrentSong(music: Recordable) {
currentSong.value = music
}
@@ -95,11 +95,11 @@ defineExpose({
})
-
diff --git a/src/views/ai/write/index/components/Right.vue b/src/views/ai/write/index/components/Right.vue
index 1eb66a077..223ebbf20 100644
--- a/src/views/ai/write/index/components/Right.vue
+++ b/src/views/ai/write/index/components/Right.vue
@@ -110,11 +110,12 @@ watch(copied, (val) => {
flex-direction: column;
:deep(.el-card__body) {
+ @extend .hide-scroll-bar;
+
+ padding: 0;
+ overflow-y: auto;
box-sizing: border-box;
flex-grow: 1;
- overflow-y: auto;
- padding: 0;
- @extend .hide-scroll-bar;
}
}
diff --git a/src/views/ai/write/index/components/Tag.vue b/src/views/ai/write/index/components/Tag.vue
index 8c0ad795a..5b8c8f92a 100644
--- a/src/views/ai/write/index/components/Tag.vue
+++ b/src/views/ai/write/index/components/Tag.vue
@@ -16,7 +16,7 @@
diff --git a/src/views/iot/rule/data/sink/config/HttpConfigForm.vue b/src/views/iot/rule/data/sink/config/HttpConfigForm.vue
index 5fa759bcd..71fa308eb 100644
--- a/src/views/iot/rule/data/sink/config/HttpConfigForm.vue
+++ b/src/views/iot/rule/data/sink/config/HttpConfigForm.vue
@@ -56,21 +56,28 @@ watch([urlPrefix, urlPath], () => {
config.value.url = fullUrl.value
})
+const syncUrlFields = (url?: string) => {
+ if (url?.startsWith('https://')) {
+ urlPrefix.value = 'https://'
+ urlPath.value = url.substring(8)
+ } else if (url?.startsWith('http://')) {
+ urlPrefix.value = 'http://'
+ urlPath.value = url.substring(7)
+ } else {
+ urlPath.value = url ?? ''
+ }
+}
+
+watch(
+ () => config.value?.url,
+ (url) => syncUrlFields(url),
+ { immediate: true }
+)
+
/** 组件初始化 */
onMounted(() => {
if (!isEmpty(config.value)) {
- // 初始化 URL
- if (config.value.url) {
- if (config.value.url.startsWith('https://')) {
- urlPrefix.value = 'https://'
- urlPath.value = config.value.url.substring(8)
- } else if (config.value.url.startsWith('http://')) {
- urlPrefix.value = 'http://'
- urlPath.value = config.value.url.substring(7)
- } else {
- urlPath.value = config.value.url
- }
- }
+ syncUrlFields(config.value.url)
return
}
diff --git a/src/views/iot/rule/data/sink/config/index.ts b/src/views/iot/rule/data/sink/config/index.ts
index f04808f58..67b0d2fa6 100644
--- a/src/views/iot/rule/data/sink/config/index.ts
+++ b/src/views/iot/rule/data/sink/config/index.ts
@@ -2,6 +2,7 @@ import HttpConfigForm from './HttpConfigForm.vue'
import TcpConfigForm from './TcpConfigForm.vue'
import WebSocketConfigForm from './WebSocketConfigForm.vue'
import MqttConfigForm from './MqttConfigForm.vue'
+import DatabaseConfigForm from './DatabaseConfigForm.vue'
import RocketMQConfigForm from './RocketMQConfigForm.vue'
import KafkaMQConfigForm from './KafkaMQConfigForm.vue'
import RabbitMQConfigForm from './RabbitMQConfigForm.vue'
@@ -12,6 +13,7 @@ export {
TcpConfigForm,
WebSocketConfigForm,
MqttConfigForm,
+ DatabaseConfigForm,
RocketMQConfigForm,
KafkaMQConfigForm,
RabbitMQConfigForm,
diff --git a/src/views/iot/rule/scene/form/RuleSceneForm.vue b/src/views/iot/rule/scene/form/RuleSceneForm.vue
index 22ba268e2..3afa78edd 100644
--- a/src/views/iot/rule/scene/form/RuleSceneForm.vue
+++ b/src/views/iot/rule/scene/form/RuleSceneForm.vue
@@ -4,7 +4,7 @@
:title="drawerTitle"
size="80%"
direction="rtl"
- :close-on-click-modal="false"
+ :close-on-click-modal="true"
:close-on-press-escape="false"
@close="handleClose"
>
@@ -12,9 +12,9 @@
-
+
-
+
diff --git a/src/views/mes/cal/holiday/index.vue b/src/views/mes/cal/holiday/index.vue
index 84dbbf736..121e936b2 100644
--- a/src/views/mes/cal/holiday/index.vue
+++ b/src/views/mes/cal/holiday/index.vue
@@ -34,14 +34,12 @@ import { CalHolidayApi, CalHolidayVO } from '@/api/mes/cal/holiday'
import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
-import PluginLunar from 'dayjs-plugin-lunar'
import { SolarDay } from 'tyme4ts'
import HolidayForm from './HolidayForm.vue'
import { checkPermi } from '@/utils/permission'
import { HolidayType } from '@/views/mes/utils/constants'
dayjs.locale('zh-cn')
-dayjs.extend(PluginLunar)
defineOptions({ name: 'MesCalHoliday' })
diff --git a/src/views/mes/cal/plan/CalPlanTeamList.vue b/src/views/mes/cal/plan/CalPlanTeamList.vue
index abcaa5b1b..4fbb8e706 100644
--- a/src/views/mes/cal/plan/CalPlanTeamList.vue
+++ b/src/views/mes/cal/plan/CalPlanTeamList.vue
@@ -203,9 +203,9 @@ watch(
.member-card-header {
display: flex;
- align-items: center;
- font-weight: 600;
font-size: 14px;
+ font-weight: 600;
+ align-items: center;
}
.member-empty-tip {
diff --git a/src/views/mes/cal/team/components/CalTeamSelectDialog.vue b/src/views/mes/cal/team/components/CalTeamSelectDialog.vue
index b9d10304e..33af78d05 100644
--- a/src/views/mes/cal/team/components/CalTeamSelectDialog.vue
+++ b/src/views/mes/cal/team/components/CalTeamSelectDialog.vue
@@ -32,12 +32,8 @@
/>
- 搜索
- 重置
+ 搜索
+ 重置
diff --git a/src/views/mes/dv/checkplan/CheckPlanForm.vue b/src/views/mes/dv/checkplan/CheckPlanForm.vue
index a50277d32..250055772 100644
--- a/src/views/mes/dv/checkplan/CheckPlanForm.vue
+++ b/src/views/mes/dv/checkplan/CheckPlanForm.vue
@@ -107,9 +107,9 @@
- 确 定
+
+ 确 定
+
{{ isDetail ? '关 闭' : '取 消' }}
diff --git a/src/views/mes/home/HomeKpiCards.vue b/src/views/mes/home/HomeKpiCards.vue
index cedd2ee56..e07547d81 100644
--- a/src/views/mes/home/HomeKpiCards.vue
+++ b/src/views/mes/home/HomeKpiCards.vue
@@ -127,9 +127,9 @@
:duration="1500"
class="text-28px font-700 leading-[1.2] color-[#7c3aed]"
/>
- / {{ summary.machineryTotal }} 运行中
+
+ / {{ summary.machineryTotal }} 运行中
+
停机 {{ summary.machineryStop }}
@@ -177,12 +177,12 @@ const handleNavigate = (name: string) => {