diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..22ed85e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true +# 匹配所有文件 +[*] +# 在文件结尾插入新行 +insert_final_newline = false +# 删除一行中的前后空格 +trim_trailing_whitespace = true + +# 匹配.vue文件 +[*.vue] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore index 14c74cc..7bedd8a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,9 @@ dist-ssr .env.development .env.production +package-lock.json +pnpm-lock.yaml + # Editor directories and files .vscode/* !.vscode/extensions.json diff --git a/src/assets/images/notice/bg.jpg b/src/assets/images/notice/bg.jpg new file mode 100644 index 0000000..45dde02 Binary files /dev/null and b/src/assets/images/notice/bg.jpg differ diff --git a/src/assets/images/notice/logo.png b/src/assets/images/notice/logo.png new file mode 100644 index 0000000..24d3791 Binary files /dev/null and b/src/assets/images/notice/logo.png differ diff --git a/src/components/common/roomHeader.vue b/src/components/common/roomHeader.vue index 9e0f8e8..cccc019 100644 --- a/src/components/common/roomHeader.vue +++ b/src/components/common/roomHeader.vue @@ -1,20 +1,62 @@ - @@ -48,7 +90,7 @@ const showEdit = ref(false)
- + @@ -57,17 +99,34 @@ const showEdit = ref(false) - 开发中........ + + + + + + + + +
diff --git a/src/components/useComponents/ConfigList.vue b/src/components/useComponents/ConfigList.vue index bebc89f..76b2396 100644 --- a/src/components/useComponents/ConfigList.vue +++ b/src/components/useComponents/ConfigList.vue @@ -8,6 +8,11 @@ import { watch } from 'vue' interface CellConfigVO { + // 编辑 + value?: string + + // 是否使用默认值 + isUseDefaultValue?: boolean /** * 配置项编码 */ @@ -83,8 +88,8 @@ watch( const newList: RoomConfigVO[] = [] for (const item of toRaw(value)) { newList.push({ - value: item.isUserValueVisible && item.isHaveDefaultValue ? item.defaultValue : '', - isUseDefaultValue: (item.isHaveDefaultValue && item.isUserModifiable) ?? false, + value: item?.value ?? (item.isUserValueVisible && item.isHaveDefaultValue ? item.defaultValue : ''), + isUseDefaultValue: item?.isUseDefaultValue ?? (item.isHaveDefaultValue && item.isUserModifiable) ?? false, cellConfigCode: item.cellConfigCode ?? '', }) } diff --git a/src/layout/sidebar/components/Notice.vue b/src/layout/sidebar/components/Notice.vue new file mode 100644 index 0000000..0f02eee --- /dev/null +++ b/src/layout/sidebar/components/Notice.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/layout/sidebar/index.vue b/src/layout/sidebar/index.vue index 2d4c024..df53e8b 100644 --- a/src/layout/sidebar/index.vue +++ b/src/layout/sidebar/index.vue @@ -1,18 +1,16 @@ - diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts index 113cd5c..e90f7b6 100644 --- a/src/store/modules/user/index.ts +++ b/src/store/modules/user/index.ts @@ -24,6 +24,7 @@ interface UserInfo { description?: string avatarUrl?: string role?: Array + isShowNotice?: boolean } export const useUserStore = defineStore('user', { @@ -54,15 +55,19 @@ export const useUserStore = defineStore('user', { role(): Array { return this.userInfo.role || [] }, + isShowNotice(): boolean { + return this.userInfo.isShowNotice ?? false + }, }, actions: { - // TODO mock人员数据 async getUserInfo() { try { const res: any = await api.getUser() if (res.code === 200) { const { baseUserId, nickname, status, email, description, avatarUrl } = res.data - this.userInfo = { baseUserId, nickname, status, email, description, avatarUrl } + const role = ['admin'] + const isShowNotice = true + this.userInfo = { baseUserId, nickname, status, email, description, avatarUrl, role, isShowNotice } return Promise.resolve(res.data) } else { @@ -73,6 +78,9 @@ export const useUserStore = defineStore('user', { return Promise.reject(error) } }, + changShow(flag: boolean) { + this.userInfo.isShowNotice = flag + }, async logout() { const { resetTabs } = useTabStore() const { resetPermission } = usePermissionStore() diff --git a/src/views/cellRoom/midjourney/index.vue b/src/views/cellRoom/midjourney/index.vue index 86ab88f..81feb08 100644 --- a/src/views/cellRoom/midjourney/index.vue +++ b/src/views/cellRoom/midjourney/index.vue @@ -562,7 +562,7 @@ function getTimeDate(newDate: string, oldDate: string) {