mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	refactor
This commit is contained in:
		| @@ -1,19 +1,20 @@ | |||||||
|  | <template> | ||||||
|  |   <ConfigGlobal :size="currentSize"> | ||||||
|  |     <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" /> | ||||||
|  |   </ConfigGlobal> | ||||||
|  | </template> | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { computed } from 'vue' | 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 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 { getPrefixCls } = useDesign() | ||||||
|  |  | ||||||
| const prefixCls = getPrefixCls('app') | const prefixCls = getPrefixCls('app') | ||||||
|  |  | ||||||
| const appStore = useAppStore() | const appStore = useAppStore() | ||||||
|  |  | ||||||
| const currentSize = computed(() => appStore.getCurrentSize) | const currentSize = computed(() => appStore.getCurrentSize) | ||||||
|  |  | ||||||
| const greyMode = computed(() => appStore.getGreyMode) | const greyMode = computed(() => appStore.getGreyMode) | ||||||
|  |  | ||||||
| // 根据浏览器当前主题设置系统主题色 | // 根据浏览器当前主题设置系统主题色 | ||||||
| @@ -32,12 +33,6 @@ const setDefaultTheme = () => { | |||||||
| setDefaultTheme() | setDefaultTheme() | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <template> |  | ||||||
|   <ConfigGlobal :size="currentSize"> |  | ||||||
|     <RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" /> |  | ||||||
|   </ConfigGlobal> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <style lang="less"> | <style lang="less"> | ||||||
| @prefix-cls: ~'@{namespace}-app'; | @prefix-cls: ~'@{namespace}-app'; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <Error @error-click="errorClick" /> |   <Error @error-click="errorClick" /> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { Error } from '@/components/Error' | import { Error } from '@/components/Error' | ||||||
| import { useRouter } from 'vue-router' | import { useRouter } from 'vue-router' | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <Error type="500" @error-click="errorClick" /> |   <Error type="500" @error-click="errorClick" /> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { Error } from '@/components/Error' | import { Error } from '@/components/Error' | ||||||
| import { useRouter } from 'vue-router' | import { useRouter } from 'vue-router' | ||||||
|   | |||||||
| @@ -15,13 +15,14 @@ import { reactive, onMounted, unref, ref } from 'vue' | |||||||
| import type { FormRules } from 'element-plus' | import type { FormRules } from 'element-plus' | ||||||
| import { ElMessage, ElRadioGroup, ElRadio } from 'element-plus' | import { ElMessage, ElRadioGroup, ElRadio } from 'element-plus' | ||||||
| import { useI18n } from '@/hooks/web/useI18n' | import { useI18n } from '@/hooks/web/useI18n' | ||||||
|  | import { FormSchema } from '@/types/form' | ||||||
|  | import { FormExpose } from '@/components/Form' | ||||||
| import { | import { | ||||||
|   getUserProfileApi, |   getUserProfileApi, | ||||||
|   updateUserProfileApi, |   updateUserProfileApi, | ||||||
|   UserProfileUpdateReqVO |   UserProfileUpdateReqVO | ||||||
| } from '@/api/system/user/profile' | } from '@/api/system/user/profile' | ||||||
| import { FormSchema } from '@/types/form' |  | ||||||
| import { FormExpose } from '@/components/Form' |  | ||||||
| const { t } = useI18n() | const { t } = useI18n() | ||||||
| // 表单校验 | // 表单校验 | ||||||
| const rules = reactive<FormRules>({ | const rules = reactive<FormRules>({ | ||||||
|   | |||||||
| @@ -40,11 +40,12 @@ | |||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' |  | ||||||
| import { onMounted, ref } from 'vue' | import { onMounted, ref } from 'vue' | ||||||
| import dayjs from 'dayjs' | import dayjs from 'dayjs' | ||||||
| import UserAvatar from './UserAvatar.vue' | import UserAvatar from './UserAvatar.vue' | ||||||
| import { useI18n } from '@/hooks/web/useI18n' | import { useI18n } from '@/hooks/web/useI18n' | ||||||
|  | import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' | ||||||
|  |  | ||||||
| const { t } = useI18n() | const { t } = useI18n() | ||||||
| const userInfo = ref<ProfileVO>() | const userInfo = ref<ProfileVO>() | ||||||
| const getUserInfo = async () => { | const getUserInfo = async () => { | ||||||
|   | |||||||
| @@ -16,12 +16,13 @@ | |||||||
|   </el-form> |   </el-form> | ||||||
| </template> | </template> | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { InputPassword } from '@/components/InputPassword' | import { ref, reactive } from 'vue' | ||||||
| import { ElForm, ElFormItem, ElMessage } from 'element-plus' | import { ElForm, ElFormItem, ElMessage } from 'element-plus' | ||||||
| import type { FormRules, FormInstance } 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 { useI18n } from '@/hooks/web/useI18n' | ||||||
|  | import { InputPassword } from '@/components/InputPassword' | ||||||
|  | import { updateUserPwdApi } from '@/api/system/user/profile' | ||||||
|  |  | ||||||
| const { t } = useI18n() | const { t } = useI18n() | ||||||
| const formRef = ref<FormInstance>() | const formRef = ref<FormInstance>() | ||||||
| const password = reactive({ | const password = reactive({ | ||||||
|   | |||||||
| @@ -94,6 +94,7 @@ import { VueCropper } from 'vue-cropper' | |||||||
| import { ElRow, ElCol, ElUpload, ElMessage, ElDialog } from 'element-plus' | import { ElRow, ElCol, ElUpload, ElMessage, ElDialog } from 'element-plus' | ||||||
| import { propTypes } from '@/utils/propTypes' | import { propTypes } from '@/utils/propTypes' | ||||||
| import { uploadAvatarApi } from '@/api/system/user/profile' | import { uploadAvatarApi } from '@/api/system/user/profile' | ||||||
|  |  | ||||||
| const cropper = ref() | const cropper = ref() | ||||||
| const dialogVisible = ref(false) | const dialogVisible = ref(false) | ||||||
| const cropperVisible = ref(false) | const cropperVisible = ref(false) | ||||||
|   | |||||||
| @@ -24,13 +24,15 @@ | |||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { onMounted, ref } from 'vue' | import { onMounted, ref } from 'vue' | ||||||
| import { ElTable, ElTableColumn } from 'element-plus' | import { ElTable, ElTableColumn } from 'element-plus' | ||||||
|  | import { useMessage } from '@/hooks/web/useMessage' | ||||||
| import { SystemUserSocialTypeEnum } from '@/utils/constants' | import { SystemUserSocialTypeEnum } from '@/utils/constants' | ||||||
| import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' | import { getUserProfileApi, ProfileVO } from '@/api/system/user/profile' | ||||||
| import { socialAuthRedirect, socialUnbind } from '@/api/system/user/socialUser' | import { socialAuthRedirect, socialUnbind } from '@/api/system/user/socialUser' | ||||||
| import { ElMessage } from 'element-plus' |  | ||||||
|  |  | ||||||
|  | const message = useMessage() | ||||||
| const socialUsers = ref<any[]>([]) | const socialUsers = ref<any[]>([]) | ||||||
| const userInfo = ref<ProfileVO>() | const userInfo = ref<ProfileVO>() | ||||||
|  |  | ||||||
| const initSocial = async () => { | const initSocial = async () => { | ||||||
|   const res = await getUserProfileApi() |   const res = await getUserProfileApi() | ||||||
|   userInfo.value = res |   userInfo.value = res | ||||||
| @@ -59,7 +61,7 @@ const unbind = async (row) => { | |||||||
|   if (res) { |   if (res) { | ||||||
|     row.openid = undefined |     row.openid = undefined | ||||||
|   } |   } | ||||||
|   ElMessage.success('解绑成功') |   message.success('解绑成功') | ||||||
| } | } | ||||||
|  |  | ||||||
| onMounted(async () => { | onMounted(async () => { | ||||||
|   | |||||||
| @@ -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> | <template> | ||||||
|   <ContentWrap> |   <ContentWrap> | ||||||
|     <IFrame :src="src" /> |     <IFrame :src="src" /> | ||||||
|   </ContentWrap> |   </ContentWrap> | ||||||
| </template> | </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> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 xingyu
					xingyu