Commit 6f1f24b43e191c5ccc36d2335146f62cb06b0094
1 parent
557f2937
refactor
Showing
9 changed files
with
30 additions
and
29 deletions
yudao-ui-admin-vue3/src/App.vue
| 1 | +<template> | |
| 2 | + <ConfigGlobal :size="currentSize"> | |
| 3 | + <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" /> | |
| 4 | + </ConfigGlobal> | |
| 5 | +</template> | |
| 1 | 6 | <script setup lang="ts"> |
| 2 | 7 | import { computed } from 'vue' |
| 3 | -import { useAppStore } from '@/store/modules/app' | |
| 4 | -import { ConfigGlobal } from '@/components/ConfigGlobal' | |
| 8 | +import Cookies from 'js-cookie' | |
| 5 | 9 | import { isDark } from '@/utils/is' |
| 10 | +import { useAppStore } from '@/store/modules/app' | |
| 6 | 11 | import { useDesign } from '@/hooks/web/useDesign' |
| 7 | -import Cookies from 'js-cookie' | |
| 12 | +import { ConfigGlobal } from '@/components/ConfigGlobal' | |
| 8 | 13 | |
| 9 | 14 | const { getPrefixCls } = useDesign() |
| 10 | - | |
| 11 | 15 | const prefixCls = getPrefixCls('app') |
| 12 | - | |
| 13 | 16 | const appStore = useAppStore() |
| 14 | - | |
| 15 | 17 | const currentSize = computed(() => appStore.getCurrentSize) |
| 16 | - | |
| 17 | 18 | const greyMode = computed(() => appStore.getGreyMode) |
| 18 | 19 | |
| 19 | 20 | // 根据浏览器当前主题设置系统主题色 |
| ... | ... | @@ -32,12 +33,6 @@ const setDefaultTheme = () => { |
| 32 | 33 | setDefaultTheme() |
| 33 | 34 | </script> |
| 34 | 35 | |
| 35 | -<template> | |
| 36 | - <ConfigGlobal :size="currentSize"> | |
| 37 | - <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" /> | |
| 38 | - </ConfigGlobal> | |
| 39 | -</template> | |
| 40 | - | |
| 41 | 36 | <style lang="less"> |
| 42 | 37 | @prefix-cls: ~'@{namespace}-app'; |
| 43 | 38 | ... | ... |
yudao-ui-admin-vue3/src/views/Error/404.vue
yudao-ui-admin-vue3/src/views/Error/500.vue
yudao-ui-admin-vue3/src/views/Profile/components/BasicInfo.vue
| ... | ... | @@ -15,13 +15,14 @@ import { reactive, onMounted, unref, ref } from 'vue' |
| 15 | 15 | import type { FormRules } from 'element-plus' |
| 16 | 16 | import { ElMessage, ElRadioGroup, ElRadio } from 'element-plus' |
| 17 | 17 | import { useI18n } from '@/hooks/web/useI18n' |
| 18 | +import { FormSchema } from '@/types/form' | |
| 19 | +import { FormExpose } from '@/components/Form' | |
| 18 | 20 | import { |
| 19 | 21 | getUserProfileApi, |
| 20 | 22 | updateUserProfileApi, |
| 21 | 23 | UserProfileUpdateReqVO |
| 22 | 24 | } from '@/api/system/user/profile' |
| 23 | -import { FormSchema } from '@/types/form' | |
| 24 | -import { FormExpose } from '@/components/Form' | |
| 25 | + | |
| 25 | 26 | const { t } = useI18n() |
| 26 | 27 | // 表单校验 |
| 27 | 28 | const rules = reactive<FormRules>({ | ... | ... |
yudao-ui-admin-vue3/src/views/Profile/components/ProfileUser.vue
| ... | ... | @@ -40,11 +40,12 @@ |
| 40 | 40 | </div> |
| 41 | 41 | </template> |
| 42 | 42 | <script setup lang="ts"> |
| 43 | -import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' | |
| 44 | 43 | import { onMounted, ref } from 'vue' |
| 45 | 44 | import dayjs from 'dayjs' |
| 46 | 45 | import UserAvatar from './UserAvatar.vue' |
| 47 | 46 | import { useI18n } from '@/hooks/web/useI18n' |
| 47 | +import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' | |
| 48 | + | |
| 48 | 49 | const { t } = useI18n() |
| 49 | 50 | const userInfo = ref<ProfileVO>() |
| 50 | 51 | const getUserInfo = async () => { | ... | ... |
yudao-ui-admin-vue3/src/views/Profile/components/ResetPwd.vue
| ... | ... | @@ -16,12 +16,13 @@ |
| 16 | 16 | </el-form> |
| 17 | 17 | </template> |
| 18 | 18 | <script setup lang="ts"> |
| 19 | -import { InputPassword } from '@/components/InputPassword' | |
| 19 | +import { ref, reactive } from 'vue' | |
| 20 | 20 | import { ElForm, ElFormItem, ElMessage } from 'element-plus' |
| 21 | 21 | import type { FormRules, FormInstance } from 'element-plus' |
| 22 | -import { updateUserPwdApi } from '@/api/system/user/profile' | |
| 23 | -import { ref, reactive } from 'vue' | |
| 24 | 22 | import { useI18n } from '@/hooks/web/useI18n' |
| 23 | +import { InputPassword } from '@/components/InputPassword' | |
| 24 | +import { updateUserPwdApi } from '@/api/system/user/profile' | |
| 25 | + | |
| 25 | 26 | const { t } = useI18n() |
| 26 | 27 | const formRef = ref<FormInstance>() |
| 27 | 28 | const password = reactive({ | ... | ... |
yudao-ui-admin-vue3/src/views/Profile/components/UserAvatar.vue
| ... | ... | @@ -94,6 +94,7 @@ import { VueCropper } from 'vue-cropper' |
| 94 | 94 | import { ElRow, ElCol, ElUpload, ElMessage, ElDialog } from 'element-plus' |
| 95 | 95 | import { propTypes } from '@/utils/propTypes' |
| 96 | 96 | import { uploadAvatarApi } from '@/api/system/user/profile' |
| 97 | + | |
| 97 | 98 | const cropper = ref() |
| 98 | 99 | const dialogVisible = ref(false) |
| 99 | 100 | const cropperVisible = ref(false) | ... | ... |
yudao-ui-admin-vue3/src/views/Profile/components/UserSocial.vue
| ... | ... | @@ -24,13 +24,15 @@ |
| 24 | 24 | <script setup lang="ts"> |
| 25 | 25 | import { onMounted, ref } from 'vue' |
| 26 | 26 | import { ElTable, ElTableColumn } from 'element-plus' |
| 27 | +import { useMessage } from '@/hooks/web/useMessage' | |
| 27 | 28 | import { SystemUserSocialTypeEnum } from '@/utils/constants' |
| 28 | 29 | import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' |
| 29 | 30 | import { socialAuthRedirect, socialUnbind } from '@/api/system/user/socialUser' |
| 30 | -import { ElMessage } from 'element-plus' | |
| 31 | 31 | |
| 32 | +const message = useMessage() | |
| 32 | 33 | const socialUsers = ref<any[]>([]) |
| 33 | 34 | const userInfo = ref<ProfileVO>() |
| 35 | + | |
| 34 | 36 | const initSocial = async () => { |
| 35 | 37 | const res = await getUserProfileApi() |
| 36 | 38 | userInfo.value = res |
| ... | ... | @@ -59,7 +61,7 @@ const unbind = async (row) => { |
| 59 | 61 | if (res) { |
| 60 | 62 | row.openid = undefined |
| 61 | 63 | } |
| 62 | - ElMessage.success('解绑成功') | |
| 64 | + message.success('解绑成功') | |
| 63 | 65 | } |
| 64 | 66 | |
| 65 | 67 | onMounted(async () => { | ... | ... |
yudao-ui-admin-vue3/src/views/visualization/jmreport/index.vue
| 1 | +<template> | |
| 2 | + <ContentWrap> | |
| 3 | + <IFrame :src="src" /> | |
| 4 | + </ContentWrap> | |
| 5 | +</template> | |
| 6 | + | |
| 1 | 7 | <script setup lang="ts"> |
| 8 | +import { ref } from 'vue' | |
| 2 | 9 | import { IFrame } from '@/components/IFrame' |
| 3 | 10 | import { getAccessToken } from '@/utils/auth' |
| 4 | -import { ref } from 'vue' | |
| 11 | + | |
| 5 | 12 | const BASE_URL = import.meta.env.VITE_BASE_URL |
| 6 | 13 | const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken()) |
| 7 | 14 | </script> |
| 8 | 15 | |
| 9 | -<template> | |
| 10 | - <ContentWrap> | |
| 11 | - <IFrame :src="src" /> | |
| 12 | - </ContentWrap> | |
| 13 | -</template> | ... | ... |