diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..61743fe
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..dc3d2aa
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "keyToString": {
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "WebServerToolWindowFactoryState": "true",
+ "WebServerToolWindowPanel.toolwindow.highlight.mappings": "true",
+ "WebServerToolWindowPanel.toolwindow.highlight.symlinks": "true",
+ "WebServerToolWindowPanel.toolwindow.show.date": "false",
+ "WebServerToolWindowPanel.toolwindow.show.permissions": "false",
+ "WebServerToolWindowPanel.toolwindow.show.size": "false",
+ "last_opened_file_path": "/Users/lizhong/Desktop/workspace/ReptileFront/reptileFront_nuxt/assets/images",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "yarn",
+ "settings.editor.selected.configurable": "reference.settings.ide.settings.file-colors",
+ "ts.external.directory.path": "/Applications/WebStorm.app/Contents/plugins/javascript-impl/jsLanguageServicesImpl/external",
+ "vue.rearranger.settings.migration": "true"
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1678279948733
+
+
+ 1678279948733
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/assets/style/public.scss b/assets/style/public.scss
index b113ff0..345bbd3 100644
--- a/assets/style/public.scss
+++ b/assets/style/public.scss
@@ -5,6 +5,9 @@
margin: 0 auto;
max-width: 1940px;
}
+body{
+ overflow-y: hidden;
+}
// =================================
// ==============scrollbar==========
diff --git a/components/Header/Index.vue b/components/Header/Index.vue
index b59abc0..34e1693 100644
--- a/components/Header/Index.vue
+++ b/components/Header/Index.vue
@@ -4,30 +4,46 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
登录
- {{ userInfo.mobile }}
-
-
+ {{ userInfo.mobile }}
+
+
+
+
- OCR识别
- 优化翻译
- 翻译文本
- 翻译文件
- 退出登录
+ OCR识别
+ 优化翻译
+ 翻译文本
+ 翻译文件
+ 退出登录
@@ -50,9 +66,9 @@ const store = useAppStore()
const {setLoginVisible, setInfo, setToken} = useUserInfo()
const token = computed(() => useUserInfo().$state.token);
const userInfo = ref()
-
-function handleCommand(command:string) {
- if (command === '4') {
+const keyword = ref('')
+function handleCommand(command: string) {
+ if (command === '5') {
ElMessageBox.confirm(
'确定要退出登录吗?',
'提示',
@@ -73,11 +89,18 @@ function handleCommand(command:string) {
message: '已取消退出登录',
})
})
+ }else {
+ router.push({
+ path: '/translate',
+ query:{
+ type: command
+ }
+ })
}
}
-watchEffect(()=>{
+watchEffect(() => {
console.log('useUserInfo().$state.info>>>>>>> header', useUserInfo().$state.info)
userInfo.value = useUserInfo().$state.info;
})
@@ -90,9 +113,9 @@ function handleChange(val: any) {
store.setHomeBanner(false)
} else {
store.setMenuTheme('light')
- if(val.meta.hasOwnProperty('homeBanner') && val.meta.homeBanner){
+ if (val.meta.hasOwnProperty('homeBanner') && val.meta.homeBanner) {
store.setHomeBanner(true)
- }else{
+ } else {
store.setHomeBanner(false)
}
}
@@ -105,9 +128,9 @@ watch(() => route, (val) => {
store.setHomeBanner(false)
} else {
store.setMenuTheme('light')
- if(val.meta.hasOwnProperty('homeBanner') && val.meta.homeBanner){
+ if (val.meta.hasOwnProperty('homeBanner') && val.meta.homeBanner) {
store.setHomeBanner(true)
- }else{
+ } else {
store.setHomeBanner(false)
}
}
@@ -129,6 +152,7 @@ $prefix-cls: '#{$name-prefix}-header-wrap';
.el-menu-item {
border-bottom: unset;
+ padding: 0 17px;
//font-size: 20px;
transition: font-size .5s;
background-color: unset;
@@ -189,9 +213,7 @@ $prefix-cls: '#{$name-prefix}-header-wrap';
font-weight: 400;
//@apply ;
}
-.login-action-wrap {
- padding-right: 30px;
-}
+
.is-host {
* {
color: $white;
@@ -199,12 +221,15 @@ $prefix-cls: '#{$name-prefix}-header-wrap';
}
diff --git a/composables/useUserInfo.ts b/composables/useUserInfo.ts
index 6c726d5..aa0ea3e 100644
--- a/composables/useUserInfo.ts
+++ b/composables/useUserInfo.ts
@@ -5,12 +5,14 @@ export interface UserState {
token: string;
info: any;
loginVisible: boolean;
+ redirect: any
}
const useUserInfo = defineStore('user', {
state: (): UserState => ({
token: '',
info: {},
loginVisible: false,
+ redirect: {}
}),
actions: {
@@ -20,21 +22,26 @@ const useUserInfo = defineStore('user', {
setInfo(info: any):void {
this.info = info;
},
- setLoginVisible(val: boolean):void {
+ setLoginVisible(val: boolean, redirect?: {} | boolean):void {
this.loginVisible = val;
+ if (redirect) {
+ this.redirect = redirect;
+ }else {
+ this.redirect = false;
+ }
},
- async login(data: any, redirect?: string){
+ async login(data: any){
const { commonApi } = useApi()
const res = await commonApi.login(data);
- // this.setInfo(res.data)
- // this.setToken(res.data.token)
- // this.setLoginVisible(false)
this.token = res.data.userinfo.token;
this.loginVisible = false
this.info = res.data.userinfo
- if(redirect) {
- useRouter().push(redirect)
+ if(this.redirect) {
+ useRouter().push(this.redirect)
+ this.redirect = false;
+ }else {
+ location.reload()
}
return res;
}
@@ -42,6 +49,7 @@ const useUserInfo = defineStore('user', {
},
getters:{
getLoginVisible:(state)=> state.loginVisible,
+ getToken:(state)=> state.token,
},
persist: process.client && {
storage: localStorage,
diff --git a/layouts/tabLayout.vue b/layouts/tabLayout.vue
index 252ef47..ce0ad98 100644
--- a/layouts/tabLayout.vue
+++ b/layouts/tabLayout.vue
@@ -1,8 +1,10 @@
-
-
-
+
+
+
+
+
@@ -13,7 +15,7 @@
\ No newline at end of file
+
diff --git a/pages/warning.vue b/pages/warning.vue
index cb5856d..ad77ebd 100644
--- a/pages/warning.vue
+++ b/pages/warning.vue
@@ -35,6 +35,7 @@
:pages="pagesRef"
@change="onChangePage"
/>
+
@@ -43,7 +44,7 @@
import dayjs from "dayjs";
import {randomUUID} from '~~/utils';
-
+import {onClickOutside} from "@vueuse/core";
definePageMeta({
name: '预警信息',
headerHost: true,
@@ -53,6 +54,9 @@ useHead({
title:'预警信息'
})
+onClickOutside(ref, ()=>{
+
+})
const { warningApi } = useApi()
const {prefixCls} = useDesign('mai-wrap');
const {setTotal, current, total, setCurrentPage, limit, pagesRef} = usePagination(1, 4, 0)
diff --git a/utils/http.ts b/utils/http.ts
index 862ba2d..5a8dce6 100644
--- a/utils/http.ts
+++ b/utils/http.ts
@@ -27,6 +27,7 @@ function transform(error: any) {
}
}
+console.log($fetch)
/**
* api请求封装
* @param { String } url 请求地址