pull/2/head
xingyu 2022-11-22 22:03:02 +08:00
parent 557f2937f5
commit 6f1f24b43e
9 changed files with 33 additions and 32 deletions

View File

@ -1,19 +1,20 @@
<template>
<ConfigGlobal :size="currentSize">
<RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
</ConfigGlobal>
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { useAppStore } from '@/store/modules/app'
import { ConfigGlobal } from '@/components/ConfigGlobal'
import { isDark } from '@/utils/is'
import { useDesign } from '@/hooks/web/useDesign'
import Cookies from 'js-cookie'
import { isDark } from '@/utils/is'
import { useAppStore } from '@/store/modules/app'
import { useDesign } from '@/hooks/web/useDesign'
import { ConfigGlobal } from '@/components/ConfigGlobal'
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('app')
const appStore = useAppStore()
const currentSize = computed(() => appStore.getCurrentSize)
const greyMode = computed(() => appStore.getGreyMode)
//
@ -32,12 +33,6 @@ const setDefaultTheme = () => {
setDefaultTheme()
</script>
<template>
<ConfigGlobal :size="currentSize">
<RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
</ConfigGlobal>
</template>
<style lang="less">
@prefix-cls: ~'@{namespace}-app';

View File

@ -1,7 +1,6 @@
<template>
<Error @error-click="errorClick" />
</template>
<script setup lang="ts">
import { Error } from '@/components/Error'
import { useRouter } from 'vue-router'

View File

@ -1,7 +1,6 @@
<template>
<Error type="500" @error-click="errorClick" />
</template>
<script setup lang="ts">
import { Error } from '@/components/Error'
import { useRouter } from 'vue-router'

View File

@ -15,13 +15,14 @@ import { reactive, onMounted, unref, ref } from 'vue'
import type { FormRules } from 'element-plus'
import { ElMessage, ElRadioGroup, ElRadio } from 'element-plus'
import { useI18n } from '@/hooks/web/useI18n'
import { FormSchema } from '@/types/form'
import { FormExpose } from '@/components/Form'
import {
getUserProfileApi,
updateUserProfileApi,
UserProfileUpdateReqVO
} from '@/api/system/user/profile'
import { FormSchema } from '@/types/form'
import { FormExpose } from '@/components/Form'
const { t } = useI18n()
//
const rules = reactive<FormRules>({

View File

@ -40,11 +40,12 @@
</div>
</template>
<script setup lang="ts">
import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile'
import { onMounted, ref } from 'vue'
import dayjs from 'dayjs'
import UserAvatar from './UserAvatar.vue'
import { useI18n } from '@/hooks/web/useI18n'
import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile'
const { t } = useI18n()
const userInfo = ref<ProfileVO>()
const getUserInfo = async () => {

View File

@ -16,12 +16,13 @@
</el-form>
</template>
<script setup lang="ts">
import { InputPassword } from '@/components/InputPassword'
import { ref, reactive } from 'vue'
import { ElForm, ElFormItem, ElMessage } from 'element-plus'
import type { FormRules, FormInstance } from 'element-plus'
import { updateUserPwdApi } from '@/api/system/user/profile'
import { ref, reactive } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { InputPassword } from '@/components/InputPassword'
import { updateUserPwdApi } from '@/api/system/user/profile'
const { t } = useI18n()
const formRef = ref<FormInstance>()
const password = reactive({

View File

@ -94,6 +94,7 @@ import { VueCropper } from 'vue-cropper'
import { ElRow, ElCol, ElUpload, ElMessage, ElDialog } from 'element-plus'
import { propTypes } from '@/utils/propTypes'
import { uploadAvatarApi } from '@/api/system/user/profile'
const cropper = ref()
const dialogVisible = ref(false)
const cropperVisible = ref(false)

View File

@ -24,13 +24,15 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { ElTable, ElTableColumn } from 'element-plus'
import { useMessage } from '@/hooks/web/useMessage'
import { SystemUserSocialTypeEnum } from '@/utils/constants'
import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile'
import { socialAuthRedirect, socialUnbind } from '@/api/system/user/socialUser'
import { ElMessage } from 'element-plus'
const message = useMessage()
const socialUsers = ref<any[]>([])
const userInfo = ref<ProfileVO>()
const initSocial = async () => {
const res = await getUserProfileApi()
userInfo.value = res
@ -59,7 +61,7 @@ const unbind = async (row) => {
if (res) {
row.openid = undefined
}
ElMessage.success('解绑成功')
message.success('解绑成功')
}
onMounted(async () => {

View File

@ -1,13 +1,15 @@
<script setup lang="ts">
import { IFrame } from '@/components/IFrame'
import { getAccessToken } from '@/utils/auth'
import { ref } from 'vue'
const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken())
</script>
<template>
<ContentWrap>
<IFrame :src="src" />
</ContentWrap>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { IFrame } from '@/components/IFrame'
import { getAccessToken } from '@/utils/auth'
const BASE_URL = import.meta.env.VITE_BASE_URL
const src = ref(BASE_URL + '/jmreport/list?token=' + getAccessToken())
</script>