This commit is contained in:
zyl
2025-11-10 09:55:56 +08:00
15 changed files with 1252 additions and 104 deletions

View File

@ -256,7 +256,7 @@
clearInterval(interval); clearInterval(interval);
} }
updateProgress(progress); updateProgress(progress);
}, 100); // 保持100毫秒的间隔 }, 125); // 保持100毫秒的间隔
}, 100); // 初始延迟500毫秒 }, 100); // 初始延迟500毫秒
</script> </script>
</body> </body>

View File

@ -277,6 +277,9 @@ function createWindow(): void {
mainWindow.webContents.send('fullscreen-status-changed', false) mainWindow.webContents.send('fullscreen-status-changed', false)
}); });
mainWindow.on("close", (e) => { mainWindow.on("close", (e) => {
if (isRestart) {
return
}
e.preventDefault(); e.preventDefault();
dialog dialog
.showMessageBox(mainWindow, { .showMessageBox(mainWindow, {
@ -539,6 +542,10 @@ function closeAllWindows() {
}); });
} }
function getmainWindow() {
return mainWindow;
}
const gotTheLock = app.requestSingleInstanceLock(); const gotTheLock = app.requestSingleInstanceLock();
if (!gotTheLock) { if (!gotTheLock) {
@ -604,5 +611,7 @@ if (!gotTheLock) {
}; };
} }
export { getmainWindow };
// In this file you can include the rest of your app's specific main process // In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here. // code. You can also put them in separate files and require them here.

View File

@ -255,7 +255,7 @@
clearInterval(interval); clearInterval(interval);
} }
updateProgress(progress); updateProgress(progress);
}, 100); // 保持100毫秒的间隔 }, 150); // 保持100毫秒的间隔
}, 100); // 初始延迟500毫秒 }, 100); // 初始延迟500毫秒
</script> </script>
</body> </body>

View File

@ -101,7 +101,7 @@
nodeEventType = "mouseoutCheck"; nodeEventType = "mouseoutCheck";
} }
} else if (tools.eqs(e.type, "click")) { } else if (tools.eqs(e.type, "click")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.CHECK) !== null) { if (setting.check.enable && (tools.eqs(target.tagName, "span") || tools.eqs(target.tagName, "svg")) && target.getAttribute("treeNode" + consts.id.CHECK) !== null) {
tId = tools.getNodeMainDom(target).id; tId = tools.getNodeMainDom(target).id;
nodeEventType = "checkNode"; nodeEventType = "checkNode";
} }
@ -156,12 +156,18 @@
_beforeA = function (setting, node, html) { _beforeA = function (setting, node, html) {
if (setting.check.enable) { if (setting.check.enable) {
data.makeChkFlag(setting, node); data.makeChkFlag(setting, node);
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), "></span>"); if(node.check_Child_State>0 || node.isShow) {
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"></path><path d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z" fill="#004242" ></path></svg></span>`);
}
else {
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), `><svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)" d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"></path><defs><linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125" y2="12.878036499023438" gradientUnits="userSpaceOnUse"><stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /><stop offset="1" stop-color="var(--color-border1)" /></linearGradient></defs></svg></span>`);
}
} }
}, },
//update zTreeObj, add method of check //update zTreeObj, add method of check
_zTreeTools = function (setting, zTreeTools) { _zTreeTools = function (setting, zTreeTools) {
zTreeTools.checkNode = function (node, checked, checkTypeFlag, callbackFlag) { zTreeTools.checkNode = function (node, checked, checkTypeFlag, callbackFlag) {
var nodeChecked = data.nodeChecked(setting, node); var nodeChecked = data.nodeChecked(setting, node);
if (node.chkDisabled === true) return; if (node.chkDisabled === true) return;
if (checked !== true && checked !== false) { if (checked !== true && checked !== false) {
@ -512,6 +518,12 @@
obj.show(); obj.show();
} }
obj.attr('class', view.makeChkClass(setting, node)); obj.attr('class', view.makeChkClass(setting, node));
if(node.check_Child_State>0 || node.isShow) {
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill="rgba(var(--color-base1), 1)" d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"></path><path d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z" fill="#004242" ></path></svg>`)
}
else {
obj.html(`<svg style="pointer-events: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14" viewBox="0 0 14 14" fill="none"><path fill-rule="evenodd" fill="url(#linear_border_2442_533_0)" d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"></path><defs><linearGradient id="linear_border_2442_533_0" x1="0" y1="-0.5574798583984375" x2="12.1173095703125" y2="12.878036499023438" gradientUnits="userSpaceOnUse"><stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" /><stop offset="1" stop-color="var(--color-border1)" /></linearGradient></defs></svg></span>`)
}
}, },
setParentNodeCheckBox: function (setting, node, value, srcNode) { setParentNodeCheckBox: function (setting, node, value, srcNode) {
var checkObj = $$(node, consts.id.CHECK, setting); var checkObj = $$(node, consts.id.CHECK, setting);

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

View File

@ -364,6 +364,7 @@ img {
.login-select-popper { .login-select-popper {
border: 1px solid var(--el-border-color-light) !important; border: 1px solid var(--el-border-color-light) !important;
box-shadow: var(--el-box-shadow-light) !important; box-shadow: var(--el-box-shadow-light) !important;
z-index: 9999 !important;
.el-select-dropdown { .el-select-dropdown {
background: #fff !important; background: #fff !important;
@ -384,25 +385,47 @@ img {
background: url(../images/tree/folder-empty.png) 0 0 no-repeat; background: url(../images/tree/folder-empty.png) 0 0 no-repeat;
background-size: 100% 100% !important; background-size: 100% 100% !important;
background-position: center !important; background-position: center !important;
margin: 0 6px 0 4px !important;
} }
.ztree li span.button.ico_close { .ztree li span.button.ico_close {
background: url(../images/tree/folder-close.png) 0 0 no-repeat; background: url(../images/tree/folder-close.png) 0 0 no-repeat;
background-size: 100% 100% !important; background-size: 100% 100% !important;
background-position: center !important; background-position: center !important;
margin: 0 6px 0 4px !important;
} }
.ztree li span.button.ico_open { .ztree li span.button.ico_open {
background: url(../images/tree/folder-open.png) 0 0 no-repeat; background: url(../images/tree/folder-open.png) 0 0 no-repeat;
background-size: 100% 100% !important; background-size: 100% 100% !important;
background-position: center !important; background-position: center !important;
margin: 0 6px 0 4px !important;
} }
.ztree li span.button.ico_docu:not([style=""]) { .ztree li span.button.ico_docu:not([style=""]) {
background-size: 90% 90% !important; background-size: 90% 90% !important;
background-position: center !important; background-position: center !important;
margin: 0 6px 0 4px !important;
/* margin-top: 1px; */ /* margin-top: 1px; */
} }
.ztree li ul.line {
background: none !important;
}
.ztree li span.button.switch,
.ztree li span.button.chk {
background: none;
}
.ztree li span.button.roots_open, .ztree li span.button.bottom_open {
background: url(../images/tree/roots-open.png) 0 0 no-repeat;
background-position: center !important;
}
.ztree li span.button.roots_close, .ztree li span.button.bottom_close {
background: url(../images/tree/roots-close.png) 0 0 no-repeat;
background-position: center !important;
}
.ztree li span.button.switch {
margin-right: 5px;
}
#app { #app {
.ztree * { .ztree * {

View File

@ -2,21 +2,21 @@ import { createRouter, createWebHashHistory } from 'vue-router'
import homeIndex from '@/views/home/index.vue' import homeIndex from '@/views/home/index.vue'
const routes = [ const routes = [
// {
// path: '/',
// component: () => import('@/views/login/index.vue'),
// hidden: true
// },
{ {
path: '/', path: '/',
component: () => import('@/views/author/index.vue'),
hidden: true
},
{
path: '/login',
component: () => import('@/views/login/index.vue'), component: () => import('@/views/login/index.vue'),
hidden: true hidden: true
}, },
// {
// path: '/',
// component: () => import('@/views/author/index.vue'),
// hidden: true
// },
// {
// path: '/login',
// component: () => import('@/views/login/index.vue'),
// hidden: true
// },
{ path: '/ts', component: () => import('@/views/TS/list.vue'), hidden: true }, { path: '/ts', component: () => import('@/views/TS/list.vue'), hidden: true },
{ path: '/tsEdit', name: 'tsEdit', component: () => import('@/views/TS/edit.vue'), hidden: true }, { path: '/tsEdit', name: 'tsEdit', component: () => import('@/views/TS/edit.vue'), hidden: true },
{ path: '/404', component: () => import('@/views/404.vue'), hidden: true }, { path: '/404', component: () => import('@/views/404.vue'), hidden: true },
@ -37,7 +37,7 @@ const router = createRouter({
}) })
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
// 去登录,放行 // 去登录,放行
if (to.path === '/') { if (to.path === '/' || to.path === '/login') {
next() next()
} else { } else {
if (localStorage.getItem('Authorization')) { if (localStorage.getItem('Authorization')) {

View File

@ -39,7 +39,7 @@ import {TsApi} from "../../../api/ts";
const times = ref(0) const times = ref(0)
const numbers = ref(0) const numbers = ref(0)
const detail = ref({}) const detail:any = ref({})
const eventBus: any = inject('bus') const eventBus: any = inject('bus')
let eventObj: any = ref(null) let eventObj: any = ref(null)

View File

@ -1,12 +1,9 @@
<template> <template>
<video <div class="rightBox" v-if="isDesktop">
key="second-video" <el-button size="small" :icon="Setting" @click="serviceDialog = true"> </el-button>
autoplay </div>
loop <video key="second-video" autoplay loop muted src="../../assets/video/author_video.mp4"
muted style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover;z-index: -1;"></video>
src="../../assets/video/author_video.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
></video>
<Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack"> <Dialog ref="baseDialog" class="graffiti" title="系统授权" :closeCallback="closeCallBack">
<template #content> <template #content>
<div class="auth_info custom_scroll_bar content_h"> <div class="auth_info custom_scroll_bar content_h">
@ -15,12 +12,7 @@
<span class="fankuai"></span> <span class="fankuai"></span>
{{ t('auths.authCode') }} {{ t('auths.authCode') }}
</div> </div>
<div <div class="auth_info_text" @click="copy(authInfo.license_code)" style="cursor: pointer" title="点击可复制">
class="auth_info_text"
@click="copy(authInfo.license_code)"
style="cursor: pointer"
title="点击可复制"
>
{{ authInfo.license_code || '' }} {{ authInfo.license_code || '' }}
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon> <svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
</div> </div>
@ -43,12 +35,8 @@
<span class="fankuai"></span> <span class="fankuai"></span>
{{ t('auths.authType') }} {{ t('auths.authType') }}
</div> </div>
<div <div v-if="authInfo.status != null" class="auth_info_text" style="font-size: 16px"
v-if="authInfo.status != null" :style="{ color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)' }">
class="auth_info_text"
style="font-size: 16px"
:style="{ color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)' }"
>
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }} {{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
</div> </div>
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> --> <!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> -->
@ -64,14 +52,71 @@
<button @click="close">退出系统</button> <button @click="close">退出系统</button>
</template> </template>
</Dialog> </Dialog>
<div class="service" v-if="serviceDialog">
<div class="contentBox">
<div class="titleBox">
<span class="title"></span>
<span class="closeBox">
<span @click="cancel"></span>
</span>
</div>
<h1 class="hello">Hello!</h1>
<h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2>
<div class="serviceContent">
<el-tabs v-model="selectedService" class="demo-tabs">
<el-tab-pane label="接口服务" name="接口服务"></el-tab-pane>
</el-tabs>
<div class="tabPanel">
<div class="item">
<span class="itemLabel">服务选择</span>
<el-select class="select" popper-class="login-select-popper" v-model="servVal">
<el-option size="mini" v-for="item in servOptions" :key="item.value" :label="item.name"
:value="item.name">
</el-option>
</el-select>
</div>
<div class="item prototype" v-if="servVal == '网络'">
<span class="itemLabel">协议</span><el-input v-model="prototype"></el-input>
</div>
<div class="item ip">
<template v-if="servVal == '单机'">
<span class="itemLabel">IP</span>
<el-input v-model="localip" disabled></el-input>
</template>
<template v-if="servVal == '网络'">
<span class="itemLabel">IP</span>
<el-input v-model="ip"></el-input>
</template>
</div>
<div class="item port">
<template v-if="servVal == '单机'">
<span class="itemLabel">端口</span>
<el-input v-model="localport"></el-input>
</template>
<template v-if="servVal == '网络'">
<span class="itemLabel">端口</span>
<el-input v-model="port"></el-input>
</template>
</div>
</div>
</div>
<div class="btn">
<el-button style="margin: 5px 0" size="mini" @click="submit">确定</el-button>
<el-button size="mini" @click="cancel">关闭</el-button>
</div>
</div>
</div>
</template> </template>
<script setup> <script setup>
import { User, Unlock, Setting, SwitchButton } from '@element-plus/icons-vue'
import Dialog from '@/components/dialog/baseDialog.vue' import Dialog from '@/components/dialog/baseDialog.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { ref, reactive, toRefs, onBeforeMount, onMounted, watchEffect, computed } from 'vue' import { ref, reactive, toRefs, onBeforeMount, onMounted, watchEffect, computed } from 'vue'
import { AuthApi } from '@/api/setting/auth' import { AuthApi } from '@/api/setting/auth'
import { useLogin } from '../login/useLogin'
import { useSetUp } from '../login/useSetUp'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import uploadFiles from '@/components/upload/uploadFiles.vue' import uploadFiles from '@/components/upload/uploadFiles.vue'
import useClipboard from 'vue-clipboard3' import useClipboard from 'vue-clipboard3'
@ -82,12 +127,47 @@ import {
$changeComponentShow $changeComponentShow
} from '@/utils/communication' } from '@/utils/communication'
const {
loginFormRef,
loginForm,
loginRules,
loading,
checkboxVModel,
showContent,
isFirstVideoPlayed,
onFirstVideoEnded,
rememberpwd,
handleLogin,
firstVideoRef,
goExit,
loginInit,
isDesktop
} = useLogin()
const {
serviceDialog,
servVal,
prototype,
ip,
port,
localip,
localport,
gpsVal,
gpsOptions,
servOptions,
serviceOptions,
submit,
cancel,
initialize
} = useSetUp()
const { ipcRenderer } = require('electron') const { ipcRenderer } = require('electron')
const router = useRouter() const router = useRouter()
const getAuthInfo = async () => { const getAuthInfo = async () => {
try { try {
const res = await AuthApi.showAuth() const res = await AuthApi.showAuth()
if (typeof res.data === 'object') { if (typeof res.data === 'object') {
authInfo.value.generateTime = res.data.generateTime
authInfo.value.expireTime = res.data.expireTime
getStatus2()
getStatus(res.data.expireTime) getStatus(res.data.expireTime)
} }
} catch (error) { } catch (error) {
@ -111,6 +191,7 @@ const getAuthInfo = async () => {
}) })
} }
} }
const selectedService = ref('接口服务')
let showPop = ref(false) let showPop = ref(false)
const baseDialog = ref(null) const baseDialog = ref(null)
const getStatus = (date) => { const getStatus = (date) => {
@ -139,7 +220,9 @@ const getStatus = (date) => {
}) })
} }
} }
setTimeout(() => {
getAuthInfo() getAuthInfo()
}, 5000);
//授权页面 //授权页面
@ -213,8 +296,9 @@ const getAuthCode = async () => {
const res = await AuthApi.authInfo() const res = await AuthApi.authInfo()
authInfo.value.license_code = res.data authInfo.value.license_code = res.data
} }
getAuthInfo2() setTimeout(() => {
getAuthCode() getAuthCode()
}, 5000);
//复制 //复制
const copy = async (text) => { const copy = async (text) => {
@ -227,8 +311,17 @@ const copy = async (text) => {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
:root { .rightBox {
--color-sdk-text-shadow: rgba(20, 118, 255, 1); position: absolute;
right: 10px;
top: 0px;
z-index: 99999;
.el-button {
background: linear-gradient(to bottom, transparent, rgb(25, 129, 132));
border: none !important;
color: #fff;
}
} }
.auth_info { .auth_info {
@ -262,6 +355,7 @@ const copy = async (text) => {
border-radius: 4px; border-radius: 4px;
} }
} }
.fankuai { .fankuai {
width: 10px; width: 10px;
height: 10px; height: 10px;
@ -272,6 +366,7 @@ const copy = async (text) => {
margin-right: 5px; margin-right: 5px;
margin-left: 5px; margin-left: 5px;
} }
.YJ-custom-base-dialog { .YJ-custom-base-dialog {
position: absolute; position: absolute;
color: #ffffff; color: #ffffff;
@ -279,8 +374,7 @@ const copy = async (text) => {
z-index: 99; z-index: 99;
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6); background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
border: 1.5px solid; border: 1.5px solid;
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%) 1;
1;
text-align: left; text-align: left;
font-family: 'sy-boldface'; font-family: 'sy-boldface';
} }
@ -325,6 +419,7 @@ const copy = async (text) => {
padding: 5px 16px 5px 16px !important; padding: 5px 16px 5px 16px !important;
position: relative; position: relative;
} }
::v-deep .title-box>.close-box { ::v-deep .title-box>.close-box {
display: none; display: none;
} }
@ -363,6 +458,7 @@ const copy = async (text) => {
padding: 5px 20px; padding: 5px 20px;
cursor: pointer; cursor: pointer;
} }
::v-deep .foot>button:hover { ::v-deep .foot>button:hover {
border: 1px solid rgba(var(--color-base1), 1); border: 1px solid rgba(var(--color-base1), 1);
color: rgba(var(--color-base1), 1); color: rgba(var(--color-base1), 1);
@ -371,6 +467,7 @@ const copy = async (text) => {
::v-deep .foot>.show>.label { ::v-deep .foot>.show>.label {
margin: 0px 10px; margin: 0px 10px;
} }
::v-deep .el-message-box { ::v-deep .el-message-box {
--el-messagebox-title-color: #fff !important; --el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important; --el-messagebox-content-color: #fff !important;
@ -378,6 +475,206 @@ const copy = async (text) => {
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%), linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
rgba(0, 0, 0, 0.6) !important; rgba(0, 0, 0, 0.6) !important;
} }
#app {
.service {
z-index: 9999;
width: 100vw;
height: 100vh;
position: absolute;
.contentBox {
padding: 0 40px 40px 40px;
background-color: #ffffff;
backdrop-filter: blur(2px);
width: 450px;
position: absolute;
color: rgba(51, 51, 51, 1);
left: 50%;
top: 29%;
transform: translate(-50%, 0%);
display: flex;
flex-direction: column;
justify-content: space-between;
.hello {
color: rgba(0, 66, 66, 1);
font-family: 'ddin';
font-size: 30px;
font-weight: 700;
line-height: 30px;
margin-bottom: 16px;
}
.greet {
color: rgba(0, 66, 66, 1);
font-family: 'SourceHanSans';
font-size: 18px;
line-height: 18px;
font-weight: 500;
span {
color: rgba(153, 153, 153, 1);
font-weight: 500;
margin-right: 5px;
}
}
.titleBox {
height: 40px;
.title {
line-height: 50px;
padding-left: 15px;
font-size: 1rem;
text-shadow: 0px 0px 9px rgba(20, 118, 255, 1);
}
.closeBox {
right: 0;
position: absolute;
display: inline-block;
width: 30px;
height: 30px;
border-radius: 0 0 0 90%;
background: rgba(var(--color-base1), 1);
&>span {
font-size: 1rem;
position: absolute;
right: 0px;
cursor: pointer;
color: rgba(0, 66, 66, 1);
font-weight: 700;
width: 25px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.serviceContent {
margin-top: 30px;
flex: auto;
::v-deep .el-tabs {
.el-tabs__header {
margin-bottom: 5px;
.el-tabs__nav-wrap {
.el-tabs__nav-scroll {
.el-tabs__nav {
.el-tabs__active-bar {
background: rgba(0, 66, 66, 1);
height: 3px;
}
.el-tabs__item {
color: rgba(153, 153, 153, 1);
font-size: 16px;
font-weight: 500;
}
.el-tabs__item:focus-visible {
box-shadow: none;
}
.el-tabs__item.is-active {
font-size: 18px;
color: rgba(0, 66, 66, 1);
}
}
}
}
.el-tabs__nav-wrap::after {
height: 1px;
}
}
}
.tab {
border-radius: 5px;
//width: 50%;
width: 300px;
margin: 0 auto;
overflow: hidden;
background: rgba(var(--color-base1), 0.2);
display: flex;
.tab-item {
display: inline-block;
flex: 1;
height: 32px;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.activeService {
border: 1px solid rgba(var(--color-base1), 1);
border-radius: 5px;
}
}
.itemLabel {
width: 64px;
flex: 0 0 64px;
white-space: nowrap;
text-align: right;
display: inline-block;
margin-right: 10px;
}
.tabPanel {
margin: 0;
.item {
display: flex;
align-items: center;
margin: 15px 0;
.select {}
}
}
}
}
.btn {
text-align: center;
button {
width: 166px;
height: 40px;
border-radius: 0;
::v-deep span {
font-weight: 500;
}
&:hover {
border: 1px solid rgba(var(--color-base1), 1) !important;
}
}
button:nth-child(1) {
background: rgba(0, 255, 255, 1) !important;
border-color: #ff000000 !important;
color: rgba(0, 66, 66, 1) !important;
}
button:nth-child(2) {
background: rgba(255, 255, 255, 1) !important;
border-color: rgba(204, 204, 204, 0.4) !important;
color: rgba(102, 102, 102, 1) !important;
}
}
}
}
::v-deep .el-popper {
z-index: 9999 !important;
}
</style> </style>
<style lang="scss"> <style lang="scss">
.el-message-box { .el-message-box {
@ -386,6 +683,7 @@ const copy = async (text) => {
background: background:
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%), linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
rgba(0, 0, 0, 0.6) !important; rgba(0, 0, 0, 0.6) !important;
.el-message-box__btns { .el-message-box__btns {
.el-button { .el-button {
--el-button-text-color: #fff; --el-button-text-color: #fff;
@ -395,10 +693,12 @@ const copy = async (text) => {
--el-button-hover-border-color: rgba(var(--color-base1), 1) !important; --el-button-hover-border-color: rgba(var(--color-base1), 1) !important;
--el-button-hover-text-color: rgba(var(--color-base1), 1) !important; --el-button-hover-text-color: rgba(var(--color-base1), 1) !important;
} }
.el-button--primary { .el-button--primary {
--el-button-bg-color: rgba(var(--color-base1), 0.2) !important; --el-button-bg-color: rgba(var(--color-base1), 0.2) !important;
--el-button-hover-bg-color: rgba(var(--color-base1), 0.2) !important; --el-button-hover-bg-color: rgba(var(--color-base1), 0.2) !important;
} }
.el-button:focus-visible { .el-button:focus-visible {
outline: none !important; outline: none !important;
} }

View File

@ -13,8 +13,18 @@
</div> </div>
</div> </div>
</div> --> </div> -->
<el-tooltip v-for="(item, i) of setList" :key="item.id" :content="t('iconTitle.' + item.name)" effect="customized" :hide-after="0"> <el-tooltip
<div class="set_item" :class="{ 'last-item': i === setList.length - 1 }" @click="item.callback"> v-for="(item, i) of setList"
:key="item.id"
:content="t('iconTitle.' + item.name)"
effect="customized"
:hide-after="0"
>
<div
class="set_item"
:class="{ 'last-item': i === setList.length - 1 }"
@click="item.callback"
>
<svg-icon :name="item.icon" :size="20"></svg-icon> <svg-icon :name="item.icon" :size="20"></svg-icon>
</div> </div>
</el-tooltip> </el-tooltip>
@ -48,7 +58,12 @@ const logout = async (e) => {
window.earth = null window.earth = null
} }
if (res.code === 200) { if (res.code === 200) {
router.push({ path: '/' }) router.push({
path: '/',
query: {
type: 'logout'
}
})
// localStorage.clear() // localStorage.clear()
} }
} }
@ -152,10 +167,12 @@ ipcRenderer.on('fullscreen-status-changed', (event, isFullscreen) => {
top: 0; top: 0;
bottom: 0; bottom: 0;
width: 1px; width: 1px;
background: linear-gradient(180deg, background: linear-gradient(
180deg,
rgba(var(--color-base1), 0), rgba(var(--color-base1), 0),
rgba(var(--color-base1), 1), rgba(var(--color-base1), 1),
rgba(204, 204, 204, 0)); rgba(204, 204, 204, 0)
);
} }
.set_item.last-item::after { .set_item.last-item::after {

View File

@ -49,12 +49,16 @@
</div> </div>
</div> </div>
<div class="iconCon"> <div class="iconCon">
<div class="item_icon" v-for="(item, index) in timelist" :key="index"> <div
class="item_icon"
v-for="(item, index) in timelist"
:key="index"
@click="clickTimeIcon(item)"
>
<svg-icon <svg-icon
:name="item.svg" :name="item.svg"
:size="20" :size="20"
:color="!item.status ? 'rgba(255, 255, 255, 1)' : 'rgba(var(--color-base1), 1)'" :color="!item.status ? 'rgba(255, 255, 255, 1)' : 'rgba(var(--color-base1), 1)'"
@click="clickIcon(item)"
></svg-icon> ></svg-icon>
<div> <div>
<span :class="['icon_text', !item.status ? '' : 'active']">{{ item.name }}</span> <span :class="['icon_text', !item.status ? '' : 'active']">{{ item.name }}</span>
@ -146,12 +150,11 @@
<span class="text_two">可叠加以下天气类型</span> <span class="text_two">可叠加以下天气类型</span>
</div> </div>
<div class="weather_content_body"> <div class="weather_content_body">
<div class="item_icon" v-for="(item, index) in list" :key="index"> <div class="item_icon" v-for="(item, index) in list" :key="index" @click="clickIcon(item)">
<svg-icon <svg-icon
:name="item.svg" :name="item.svg"
:size="20" :size="20"
:color="!item.status ? 'rgba(255, 255, 255, 1)' : 'rgba(var(--color-base1), 1)'" :color="!item.status ? 'rgba(255, 255, 255, 1)' : 'rgba(var(--color-base1), 1)'"
@click="clickIcon(item)"
></svg-icon> ></svg-icon>
<div> <div>
<span :class="['icon_text', !item.status ? '' : 'active']">{{ item.name }}</span> <span :class="['icon_text', !item.status ? '' : 'active']">{{ item.name }}</span>
@ -386,6 +389,28 @@ var clickIcon = (item: any) => {
}) })
} }
} }
var clickTimeIcon = (item: any) => {
if (document.getElementById('timePause').textContent == '播放') {
timelist.forEach((data) => {
if (data.name != item.name) data.status = false
})
item.status = true
} else {
timelist.forEach((data) => {
data.status = false
})
}
let arr = {
清晨: '6:40',
正午: '12:00',
黄昏: '19:15',
夜晚: '24:00'
}
timeline.setTime(arr[item.name])
timeline.setSpeed(weatherData.speed)
sunshine && (sunshine.timeBar = arr[item.name] + ':00')
}
var changDarkness = () => { var changDarkness = () => {
sunshine && (sunshine.darkness = weatherData.darkness) sunshine && (sunshine.darkness = weatherData.darkness)
@ -579,6 +604,7 @@ var shadowChange = () => {
top: -200%; top: -200%;
transform: translateY(-100%); transform: translateY(-100%);
color: rgba(255, 223, 83, 1); color: rgba(255, 223, 83, 1);
cursor: auto;
} }
#timePause { #timePause {

View File

@ -219,6 +219,28 @@ export default class TimeLine {
// this.update(); // this.update();
} }
setTime(time) {
// 解析传入的时间字符串 "6:40"
const [hours, minutes] = time.split(':').map(Number);
// 设置秒数为0
const seconds = 0;
// 计算传入时间总秒数
const totalSeconds = (hours * 3600) + (minutes * 60) + seconds;
// 24小时总秒数
const totalSecondsInDay = 24 * 3600;
// 计算百分比
const pos = totalSeconds / totalSecondsInDay;
this.manualPosition = pos;
this.progress.style.width = `${pos * 100}%`;
const displaySeconds = pos * 86400;
this.currentTime.textContent = this.formatTime(displaySeconds);
}
closeChangeDate() { closeChangeDate() {
this.changeDate && (this.changeDate = false) this.changeDate && (this.changeDate = false)
} }

View File

@ -12,7 +12,12 @@
<span>{{ t(`week.4`) }}</span> <span>{{ t(`week.4`) }}</span>
</div> </div>
<div class="weather"> <div class="weather">
<svg-icon name="weather" :size="40" @click="clickFun"></svg-icon> <svg-icon
name="weather"
:class="weatherClick ? 'weatherClick' : ''"
:size="40"
@click="clickFun"
></svg-icon>
</div> </div>
</div> </div>
<setTool ref="setToolRef"></setTool> <setTool ref="setToolRef"></setTool>
@ -53,8 +58,7 @@ const headImg = computed(() => {
} }
}) })
const skinInfo = ref(JSON.parse(localStorage.getItem('systemSetting') || '{}').skinInfo || 'color1')
const skinInfo = ref(JSON.parse(localStorage.getItem("systemSetting") || '{}').skinInfo || 'color1')
const { t } = useI18n() const { t } = useI18n()
const date = ref({ const date = ref({
@ -62,26 +66,25 @@ const date = ref({
hms: '', hms: '',
week: 0 week: 0
}) })
window.addEventListener("setItemEvent", (e: any) => { window.addEventListener('setItemEvent', (e: any) => {
console.log('e', e) console.log('e', e)
if (e.key == "systemSetting") { if (e.key == 'systemSetting') {
let obj = JSON.parse(e.newValue); let obj = JSON.parse(e.newValue)
skinInfo.value = obj.skinInfo; skinInfo.value = obj.skinInfo
let setting = JSON.parse(e.newValue) let setting = JSON.parse(e.newValue)
let dialogElm: any = document.getElementsByClassName('YJ-custom-base-dialog') let dialogElm: any = document.getElementsByClassName('YJ-custom-base-dialog')
if (setting.language === 'zh-EN') { if (setting.language === 'zh-EN') {
for (let i = 0; i < dialogElm.length; i++) { for (let i = 0; i < dialogElm.length; i++) {
dialogElm[i].classList.add('dialog-en'); dialogElm[i].classList.add('dialog-en')
} }
} } else {
else {
for (let i = 0; i < dialogElm.length; i++) { for (let i = 0; i < dialogElm.length; i++) {
dialogElm[i].classList.remove('dialog-en'); dialogElm[i].classList.remove('dialog-en')
} }
} }
} }
}); })
var weatherClick = ref(false) var weatherClick = ref(false)
const setTime = () => { const setTime = () => {
let date1 = new Date() let date1 = new Date()
@ -202,9 +205,12 @@ var clickFun = () => {
margin-left: 15px; margin-left: 15px;
svg { svg {
fill: rgba(var(--color-base1), 1) !important; // fill: rgba(var(--color-base1), 1) !important;
cursor: pointer; cursor: pointer;
} }
.weatherClick {
fill: rgba(var(--color-base1), 1) !important;
}
} }
} }

View File

@ -1,20 +1,35 @@
<template> <template>
<div class="login-container" style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0"> <div
<transition name="video-fade" mode="out-in" class="login-container"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"> style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0"
>
<transition
name="video-fade"
mode="out-in"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
>
<!-- 第一个视频播放一次 --> <!-- 第一个视频播放一次 -->
<video v-if="!isFirstVideoPlayed" ref="firstVideoRef" key="first-video" muted @ended="onFirstVideoEnded" <!-- <video v-if="!isFirstVideoPlayed" ref="firstVideoRef" key="first-video" muted @ended="onFirstVideoEnded"
src="../../assets/video/login_front.mp4" src="../../assets/video/login_front.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> -->
<!-- 第二个视频循环播放 --> <!-- 第二个视频循环播放 -->
<video v-else key="second-video" autoplay loop muted src="../../assets/video/login_feature.mp4" <!-- <video v-else key="second-video" autoplay loop muted src="../../assets/video/login_feature.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"></video> -->
<video
key="second-video"
autoplay
loop
muted
src="../../assets/video/author_video.mp4"
style="position: fixed; width: 100vw; height: 100vh; left: 0; top: 0; object-fit: cover"
></video>
</transition> </transition>
<div class="rightBox" v-if="isDesktop"> <!-- 登录页面 -->
<div class="rightBox" v-if="isDesktop && !isAuth">
<el-button size="small" :icon="Setting" @click="serviceDialog = true"> </el-button> <el-button size="small" :icon="Setting" @click="serviceDialog = true"> </el-button>
<el-button size="small" :icon="SwitchButton" @click="goExit"> </el-button> <el-button size="small" :icon="SwitchButton" @click="goExit"> </el-button>
</div> </div>
<transition name="fade"> <transition name="fade" v-if="!isAuth">
<div v-show="true" class="content"> <div v-show="true" class="content">
<div class="titleBox"> <div class="titleBox">
<div class="titleItem"> <div class="titleItem">
@ -24,21 +39,95 @@
</div> </div>
</div> </div>
</div> </div>
<el-form class="login-form" autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginFormRef" <el-form
label-position="left"> class="login-form"
autoComplete="on"
:model="loginForm"
:rules="loginRules"
ref="loginFormRef"
label-position="left"
>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="请输入用户名" <el-input
:prefix-icon="User" /> name="username"
type="text"
v-model="loginForm.username"
autoComplete="on"
placeholder="请输入用户名"
:prefix-icon="User"
/>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" @keyup.enter.native="handleLogin(loginFormRef)" v-model="loginForm.password" <el-input
autoComplete="on" placeholder="请输入密码" :prefix-icon="Unlock" show-password></el-input> type="password"
@keyup.enter.native="handleLogin(loginFormRef)"
v-model="loginForm.password"
autoComplete="on"
placeholder="请输入密码"
:prefix-icon="Unlock"
show-password
></el-input>
</el-form-item> </el-form-item>
<el-form-item class="rememberForget"> <el-form-item class="rememberForget">
<!-- justify-content: space-around;align-items: center; --> <!-- justify-content: space-around;align-items: center; -->
<div style="display: flex"> <div style="display: flex">
<el-checkbox :disabled="loading" v-model="checkboxVModel" @change="rememberpwd" <svg
label="string">记住密码</el-checkbox> class="checkbox-svg"
v-show="checkboxVModel"
style="pointer-events: none"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
>
<path
fill="rgba(var(--color-base1), 1)"
d="M7.34788e-16 2L-2.20436e-15 12C-2.40727e-15 13.1046 0.895431 14 2 14L12 14C13.1046 14 14 13.1046 14 12L14 2C14 0.895431 13.1046 -1.46958e-15 12 -1.46958e-15L2 -1.46958e-15C0.895431 -1.60485e-15 8.02424e-16 0.895431 7.34788e-16 2Z"
></path>
<path
d="M5.47283 8.3039L3.10764 6.12807C3.06194 6.08647 2.99525 6.08647 2.94955 6.12946L2.04424 6.98093C1.98989 7.03224 1.98495 7.12376 2.03312 7.18201L6.03602 11.9566C6.09778 12.0301 6.20647 12.0065 6.24105 11.9136C7.03644 9.69343 9.25835 5.63439 11.9619 2.69585C11.999 2.65564 12.0101 2.59601 11.9904 2.54331L11.8211 2.08568C11.7915 2.00525 11.7038 1.97474 11.6396 2.02328C8.63587 4.21019 6.45966 6.92546 5.47283 8.3039Z"
fill="#004242"
></path>
</svg>
<svg
class="checkbox-svg"
v-show="!checkboxVModel"
style="pointer-events: none"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
>
<path
fill-rule="evenodd"
fill="url(#linear_border_2442_533_0)"
d="M0 12L0 2C0 0.895431 0.895431 0 2 0L12 0C13.1046 0 14 0.895431 14 2L14 12C14 13.1046 13.1046 14 12 14L2 14C0.895431 14 0 13.1046 0 12ZM2 12.5C1.72386 12.5 1.5 12.2761 1.5 12L1.5 2C1.5 1.72386 1.72386 1.5 2 1.5L12 1.5C12.2761 1.5 12.5 1.72386 12.5 2L12.5 12C12.5 12.2761 12.2761 12.5 12 12.5L2 12.5Z"
></path>
<defs>
<linearGradient
id="linear_border_2442_533_0"
x1="0"
y1="-0.5574798583984375"
x2="12.1173095703125"
y2="12.878036499023438"
gradientUnits="userSpaceOnUse"
>
<stop offset="0.0625" stop-color="rgba(var(--color-base1), 1)" />
<stop offset="1" stop-color="var(--color-border1)" />
</linearGradient>
</defs>
</svg>
<el-checkbox
:disabled="loading"
v-model="checkboxVModel"
@change="rememberpwd"
label="string"
>记住密码</el-checkbox
>
<!-- <div style="cursor: pointer;">忘记密码</div> --> <!-- <div style="cursor: pointer;">忘记密码</div> -->
</div> </div>
</el-form-item> </el-form-item>
@ -61,15 +150,24 @@
<h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2> <h2 class="greet"><span>欢迎您使用</span>实景三维电子沙盘系统</h2>
<div class="serviceContent"> <div class="serviceContent">
<el-tabs v-model="selectedService" class="demo-tabs" @tab-click="handleSelect"> <el-tabs v-model="selectedService" class="demo-tabs" @tab-click="handleSelect">
<el-tab-pane v-for="item in serviceOptions" :label="item.name" :name="item.name"></el-tab-pane> <el-tab-pane
v-for="item in serviceOptions"
:label="item.name"
:name="item.name"
></el-tab-pane>
</el-tabs> </el-tabs>
<div class="tabPanel"> <div class="tabPanel">
<template v-if="selectedService == '接口服务'"> <template v-if="selectedService == '接口服务'">
<div class="item"> <div class="item">
<span class="itemLabel">服务选择</span> <span class="itemLabel">服务选择</span>
<el-select class="select" popper-class="login-select-popper" v-model="servVal"> <el-select class="select" popper-class="login-select-popper" v-model="servVal">
<el-option size="mini" v-for="item in servOptions" :key="item.value" :label="item.name" <el-option
:value="item.name"> size="mini"
v-for="item in servOptions"
:key="item.value"
:label="item.name"
:value="item.name"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -101,8 +199,13 @@
<div class="item"> <div class="item">
<span class="itemLabel">串口选择</span> <span class="itemLabel">串口选择</span>
<el-select class="select" popper-class="login-select-popper" v-model="gpsVal"> <el-select class="select" popper-class="login-select-popper" v-model="gpsVal">
<el-option size="mini" v-for="item in gpsOptions" :key="item.value" :label="item.Product" <el-option
:value="item.Name"> size="mini"
v-for="item in gpsOptions"
:key="item.value"
:label="item.Product"
:value="item.Name"
>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -116,6 +219,77 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 授权页面 -->
<Dialog
ref="baseDialog"
class="graffiti"
title="系统授权"
:closeCallback="closeCallBack"
left="calc(50vw - 188px)"
top="calc(50vh - 191px)"
>
<template #content>
<div class="auth_info custom_scroll_bar content_h">
<div class="auth_info_box">
<div>
<span class="fankuai"></span>
{{ t('auths.authCode') }}
</div>
<div
class="auth_info_text"
@click="copy(authInfo.license_code)"
style="cursor: pointer"
title="点击可复制"
>
{{ authInfo.license_code || '' }}
<svg-icon name="copy" :size="20" style="margin-left: 30px"></svg-icon>
</div>
</div>
<div class="auth_info_box">
<div>
<span class="fankuai"></span>
{{ t('auths.authTime') }}
</div>
<div class="auth_info_text" v-if="authInfo.status != null">
<template v-if="authInfo.generateTime != ''">
{{ authInfo.generateTime || '2023-01-01' }}-
</template>
{{ authInfo.expireTime || '2023-01-01' }}
</div>
<div v-else class="auth_info_text">暂无</div>
</div>
<div class="auth_info_box">
<div>
<span class="fankuai"></span>
{{ t('auths.authType') }}
</div>
<div
v-if="authInfo.status != null"
class="auth_info_text"
style="font-size: 16px"
:style="{
color: authInfo.status ? 'rgba(27, 248, 195, 1)' : 'rgba(255, 161, 69, 1)'
}"
>
{{ authInfo.status ? t('auths.authTempExpire') : t('auths.authexpire') }}
</div>
<!-- <div v-else class="auth_info_text">{{ authInfo.message || '无' }}</div> -->
<div
v-else
class="auth_info_text"
style="font-size: 16px; color: rgba(241, 108, 85, 1)"
>
{{ t('auths.noAuthexpire') }}
</div>
</div>
<!-- <uploadFiles accept=".lic" :maxSize="1"></uploadFiles> -->
</div>
</template>
<template #footer>
<uploadFiles accept=".lic" :maxSize="1"></uploadFiles>
<button @click="close">退出系统</button>
</template>
</Dialog>
</div> </div>
</template> </template>
@ -167,6 +341,164 @@ onMounted(() => {
loginInit() loginInit()
initialize() initialize()
}) })
//授权判断
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import useClipboard from 'vue-clipboard3'
import { AuthApi } from '@/api/setting/auth'
import Dialog from '@/components/dialog/baseDialog.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { $sendElectronChanel } from '@/utils/communication'
let isAuth = ref(true)
const { ipcRenderer } = require('electron')
const router = useRouter()
const getAuthInfo = async () => {
try {
const res = await AuthApi.showAuth()
if (typeof res.data === 'object') {
authInfo.value.generateTime = res.data.generateTime
authInfo.value.expireTime = res.data.expireTime
getStatus2()
getStatus(res.data.expireTime)
}
} catch (error) {
// 统一处理错误
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
confirmButtonText: '去授权',
cancelButtonText: '退出系统',
type: 'warning',
closeOnClickModal: false
})
.then(async () => {
try {
baseDialog.value?.open()
} catch (error) {
console.error('打开授权对话框失败:', error)
}
})
.catch(() => {
// 用户点击取消,不执行任何操作
ipcRenderer.send('quit-app')
})
}
}
const baseDialog = ref(null)
const getStatus = (date) => {
const timestamp = new Date(date).getTime()
const currentTimestamp = Date.now()
if (timestamp > currentTimestamp) {
// router.push({ path: '/login' })
isAuth.value = false
} else {
ElMessageBox.confirm('您没有进行系统授权哦,系统功能将无法使用?', '提示', {
confirmButtonText: '去授权',
cancelButtonText: '退出系统',
type: 'warning',
closeOnClickModal: false
})
.then(async () => {
try {
baseDialog.value?.open()
} catch (error) {
console.error('打开授权对话框失败:', error)
}
})
.catch(() => {
// 用户点击取消,不执行任何操作
ipcRenderer.send('quit-app')
})
}
}
//授权页面
// const closeCallBack = (e) => {
// baseDialog.value?.close()
// }
const close = (e) => {
ElMessageBox.confirm('确定要退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(async () => {
ipcRenderer.send('quit-app')
})
.catch(() => {
// 用户点击取消,不执行任何操作
})
}
const eventBus = inject('bus')
const { t } = useI18n()
const authInfo = ref({
license_code: '',
//授权信息
generateTime: '', //开始时间
expireTime: '', //结束时间
authDays: null, //授权时间
status: null
})
//上传授权文件成功
eventBus.on('upload', (data) => {
if (data) {
isAuth.value = false
baseDialog.value?.close()
}
})
const { toClipboard } = useClipboard()
const getAuthInfo2 = async () => {
const res = await AuthApi.showAuth()
if (typeof res.data === 'object') {
authInfo.value.generateTime = res.data.generateTime
authInfo.value.expireTime = res.data.expireTime
getStatus2()
}
}
const getStatus2 = () => {
const timestamp = new Date(authInfo.value.expireTime).getTime()
const currentTimestamp = Date.now()
if (timestamp > currentTimestamp) {
authInfo.value.status = true
} else {
authInfo.value.status = false
}
window.checkAuthIsValid = authInfo.value.status
}
const getAuthCode = async () => {
const res = await AuthApi.authInfo()
authInfo.value.license_code = res.data
}
setTimeout(() => {
getAuthCode()
}, 5000)
//复制
const copy = async (text) => {
try {
await toClipboard(text)
ElMessage.success('复制成功')
} catch (e) {
ElMessage.error('复制失败')
}
}
if (!router.currentRoute.value.query.type) {
setTimeout(() => {
getAuthCode()
getAuthInfo()
}, 5000)
} else {
isAuth.value = false
}
</script> </script>
<style lang="scss"> <style lang="scss">
// 添加过渡样式 // 添加过渡样式
@ -262,7 +594,6 @@ onMounted(() => {
.el-select__tags-text { .el-select__tags-text {
color: rgba(0, 66, 66, 1) !important; color: rgba(0, 66, 66, 1) !important;
} }
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
@ -344,11 +675,28 @@ onMounted(() => {
color: rgba(0, 66, 66, 1); color: rgba(0, 66, 66, 1);
background-color: rgba(var(--color-base1), 1); background-color: rgba(var(--color-base1), 1);
border: none; border: none;
border-radius: 0;
} }
.el-button.is-loading:before { .el-button.is-loading:before {
background-color: rgb(116 230 249 / 8%); background-color: rgb(116 230 249 / 8%);
} }
.checkbox-svg {
position: absolute;
top: 9px;
left: 0;
}
::v-deep .el-checkbox {
.el-checkbox__input {
opacity: 0;
}
.el-checkbox__label {
color: #fff;
}
}
} }
} }
} }
@ -527,7 +875,360 @@ onMounted(() => {
align-items: center; align-items: center;
margin: 15px 0; margin: 15px 0;
.select {} .select {
}
}
}
}
}
.btn {
text-align: center;
button {
width: 166px;
height: 40px;
border-radius: 0;
::v-deep span {
font-weight: 500;
}
&:hover {
border: 1px solid rgba(var(--color-base1), 1) !important;
}
}
button:nth-child(1) {
background: rgba(0, 255, 255, 1) !important;
border-color: #ff000000 !important;
color: rgba(0, 66, 66, 1) !important;
}
button:nth-child(2) {
background: rgba(255, 255, 255, 1) !important;
border-color: rgba(204, 204, 204, 0.4) !important;
color: rgba(102, 102, 102, 1) !important;
}
}
}
}
//授权
.auth_info {
width: 100%;
display: flex;
flex-direction: column;
height: 100%;
overflow-y: auto;
color: rgba(var(--color-text2), 0.8);
.auth_info_text {
color: #fff;
font-size: 14px;
font-weight: 700;
margin: 7px 0 15px 15px;
display: flex;
align-items: center;
}
.auth_info_box {
margin-bottom: 15px;
border-bottom: 1px solid rgba(204, 204, 204, 0.2);
}
.el-button--primary {
color: #fff !important;
font-size: 16px;
background: rgba(var(--color-base1), 0.2) !important;
font-weight: bolder;
border-color: transparent;
border-radius: 4px;
}
}
.fankuai {
width: 10px;
height: 10px;
// 旋转角度
transform: rotate(45deg);
border: 2px solid rgba(var(--color-base1), 1);
display: inline-block;
margin-right: 5px;
margin-left: 5px;
}
.YJ-custom-base-dialog {
position: absolute;
color: #ffffff;
font-size: 14px;
z-index: 99;
background: linear-gradient(0deg, #00ffff33 0%, #00ffff00 100%), rgba(0, 0, 0, 0.6);
border: 1.5px solid;
border-image: linear-gradient(to bottom, rgba(var(--color-base1), 1) 6.25%, rgb(0, 200, 255) 100%)
1;
text-align: left;
font-family: 'sy-boldface';
}
.YJ-custom-base-dialog * {
box-sizing: border-box;
}
.YJ-custom-base-dialog:after {
display: block;
position: absolute;
content: '';
left: -1.5px;
top: -6px;
width: 70.5px;
height: 6px;
opacity: 1;
background: rgba(var(--color-base1), 1);
clip-path: polygon(0 0, calc(100% - 3px) 0, 100% 6px, 0 6px);
}
.YJ-custom-base-dialog svg {
fill: #ffffff;
width: 12px;
height: 12px;
margin-right: 5px;
}
.YJ-custom-base-dialog .custom-divider {
width: 100%;
display: block;
border-top: 1px solid rgba(204, 204, 204, 0.2);
}
.YJ-custom-base-dialog .text-number {
font-family: 'D-Din-Bold';
margin-left: 5px;
}
::v-deep .title-box {
line-height: 46px;
padding: 5px 16px 5px 16px !important;
position: relative;
}
::v-deep .title-box > .close-box {
display: none;
}
::v-deep .title-box > .title {
font-family: 'Ali-mother-counts-bold';
font-size: 18px;
font-weight: 400;
letter-spacing: 0px;
line-height: 0px;
color: rgba(255, 255, 255, 1);
text-align: left;
text-shadow: 0px 0px 9px rgba(20, 118, 255, 1);
-webkit-pointer-events: none;
-moz-pointer-events: none;
-ms-pointer-events: none;
-o-pointer-events: none;
pointer-events: none;
}
::v-deep .foot {
position: relative;
padding: 20px 24px;
display: flex;
justify-content: center;
}
::v-deep .foot > button {
margin-left: 10px;
border-radius: 4px;
background: rgba(var(--color-base1), 0.2);
border: 1px solid rgba(var(--color-base1), 0.5);
font-size: 14px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
padding: 5px 20px;
cursor: pointer;
}
::v-deep .foot > button:hover {
border: 1px solid rgba(var(--color-base1), 1);
color: rgba(var(--color-base1), 1);
}
::v-deep .foot > .show > .label {
margin: 0px 10px;
}
::v-deep .el-message-box {
--el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important;
background:
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
rgba(0, 0, 0, 0.6) !important;
}
#app {
.service {
z-index: 9999;
width: 100vw;
height: 100vh;
position: absolute;
.contentBox {
padding: 0 40px 40px 40px;
background-color: #ffffff;
backdrop-filter: blur(2px);
width: 450px;
position: absolute;
color: rgba(51, 51, 51, 1);
left: 50%;
top: 29%;
transform: translate(-50%, 0%);
display: flex;
flex-direction: column;
justify-content: space-between;
.hello {
color: rgba(0, 66, 66, 1);
font-family: 'ddin';
font-size: 30px;
font-weight: 700;
line-height: 30px;
margin-bottom: 16px;
}
.greet {
color: rgba(0, 66, 66, 1);
font-family: 'SourceHanSans';
font-size: 18px;
line-height: 18px;
font-weight: 500;
span {
color: rgba(153, 153, 153, 1);
font-weight: 500;
margin-right: 5px;
}
}
.titleBox {
height: 40px;
.title {
line-height: 50px;
padding-left: 15px;
font-size: 1rem;
text-shadow: 0px 0px 9px rgba(20, 118, 255, 1);
}
.closeBox {
right: 0;
position: absolute;
display: inline-block;
width: 30px;
height: 30px;
border-radius: 0 0 0 90%;
background: rgba(var(--color-base1), 1);
& > span {
font-size: 1rem;
position: absolute;
right: 0px;
cursor: pointer;
color: rgba(0, 66, 66, 1);
font-weight: 700;
width: 25px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.serviceContent {
margin-top: 30px;
flex: auto;
::v-deep .el-tabs {
.el-tabs__header {
margin-bottom: 5px;
.el-tabs__nav-wrap {
.el-tabs__nav-scroll {
.el-tabs__nav {
.el-tabs__active-bar {
background: rgba(0, 66, 66, 1);
height: 3px;
}
.el-tabs__item {
color: rgba(153, 153, 153, 1);
font-size: 16px;
font-weight: 500;
}
.el-tabs__item:focus-visible {
box-shadow: none;
}
.el-tabs__item.is-active {
font-size: 18px;
color: rgba(0, 66, 66, 1);
}
}
}
}
.el-tabs__nav-wrap::after {
height: 1px;
}
}
}
.tab {
border-radius: 5px;
//width: 50%;
width: 300px;
margin: 0 auto;
overflow: hidden;
background: rgba(var(--color-base1), 0.2);
display: flex;
.tab-item {
display: inline-block;
flex: 1;
height: 32px;
line-height: 32px;
text-align: center;
cursor: pointer;
}
.activeService {
border: 1px solid rgba(var(--color-base1), 1);
border-radius: 5px;
}
}
.itemLabel {
width: 64px;
flex: 0 0 64px;
white-space: nowrap;
text-align: right;
display: inline-block;
margin-right: 10px;
}
.tabPanel {
margin: 0;
.item {
display: flex;
align-items: center;
margin: 15px 0;
.select {
}
} }
} }
} }
@ -563,4 +1264,36 @@ onMounted(() => {
} }
} }
} }
::v-deep .el-popper {
z-index: 9999 !important;
}
</style>
<style lang="scss">
.el-message-box {
--el-messagebox-title-color: #fff !important;
--el-messagebox-content-color: #fff !important;
background:
linear-gradient(180deg, rgba(var(--color-base1), 0) 0%, rgba(var(--color-base1), 0.2) 100%),
rgba(0, 0, 0, 0.6) !important;
.el-message-box__btns {
.el-button {
--el-button-text-color: #fff;
--el-button-bg-color: rgba(var(--color-base1), 0.2) !important;
--el-button-hover-bg-color: rgba(var(--color-base1), 0.2) !important;
--el-button-border-color: rgba(var(--color-base1), 0.5) !important;
--el-button-hover-border-color: rgba(var(--color-base1), 1) !important;
--el-button-hover-text-color: rgba(var(--color-base1), 1) !important;
}
.el-button--primary {
--el-button-bg-color: rgba(var(--color-base1), 0.2) !important;
--el-button-hover-bg-color: rgba(var(--color-base1), 0.2) !important;
}
.el-button:focus-visible {
outline: none !important;
}
}
}
</style> </style>