提交
This commit is contained in:
60
electron.vite.config.1762408912589.mjs
Normal file
60
electron.vite.config.1762408912589.mjs
Normal file
@ -0,0 +1,60 @@
|
||||
// electron.vite.config.ts
|
||||
import { resolve } from "path";
|
||||
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import AutoImport from "unplugin-auto-import/vite";
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
||||
import path from "path";
|
||||
var electron_vite_config_default = defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
renderer: {
|
||||
resolve: {
|
||||
alias: {
|
||||
"@renderer": resolve("src/renderer/src"),
|
||||
"@": resolve("src/renderer/src")
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
imports: ["vue"],
|
||||
dts: "src/auto-imports.d.ts",
|
||||
// 自动生成类型声明文件
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
// SVG图标插件配置
|
||||
// 配置SVG图标插件
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [path.resolve(process.cwd(), "src/renderer/src/icons/svg")],
|
||||
symbolId: "icon-[name]",
|
||||
// 自动清除 SVG 中的 fill 和 stroke 属性
|
||||
svgoOptions: {
|
||||
plugins: [{ name: "removeAttrs", params: { attrs: ["fill", "stroke", "stroke-width"] } }]
|
||||
}
|
||||
})
|
||||
]
|
||||
/*server: {
|
||||
port: 8848,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: localStorage.getItem('ip') || 'http://127.0.0.1:8848',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
});
|
||||
export {
|
||||
electron_vite_config_default as default
|
||||
};
|
||||
60
electron.vite.config.1762408928311.mjs
Normal file
60
electron.vite.config.1762408928311.mjs
Normal file
@ -0,0 +1,60 @@
|
||||
// electron.vite.config.ts
|
||||
import { resolve } from "path";
|
||||
import { defineConfig, externalizeDepsPlugin } from "electron-vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import AutoImport from "unplugin-auto-import/vite";
|
||||
import Components from "unplugin-vue-components/vite";
|
||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
||||
import path from "path";
|
||||
var electron_vite_config_default = defineConfig({
|
||||
main: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
preload: {
|
||||
plugins: [externalizeDepsPlugin()]
|
||||
},
|
||||
renderer: {
|
||||
resolve: {
|
||||
alias: {
|
||||
"@renderer": resolve("src/renderer/src"),
|
||||
"@": resolve("src/renderer/src")
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
imports: ["vue"],
|
||||
dts: "src/auto-imports.d.ts",
|
||||
// 自动生成类型声明文件
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
// SVG图标插件配置
|
||||
// 配置SVG图标插件
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [path.resolve(process.cwd(), "src/renderer/src/icons/svg")],
|
||||
symbolId: "icon-[name]",
|
||||
// 自动清除 SVG 中的 fill 和 stroke 属性
|
||||
svgoOptions: {
|
||||
plugins: [{ name: "removeAttrs", params: { attrs: ["fill", "stroke", "stroke-width"] } }]
|
||||
}
|
||||
})
|
||||
]
|
||||
/*server: {
|
||||
port: 8848,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: localStorage.getItem('ip') || 'http://127.0.0.1:8848',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
});
|
||||
export {
|
||||
electron_vite_config_default as default
|
||||
};
|
||||
@ -276,6 +276,25 @@ function createWindow(): void {
|
||||
mainWindow.on('leave-full-screen', () => {
|
||||
mainWindow.webContents.send('fullscreen-status-changed', false)
|
||||
});
|
||||
mainWindow.on("close", (e) => {
|
||||
e.preventDefault();
|
||||
dialog
|
||||
.showMessageBox(mainWindow, {
|
||||
type: "warning",
|
||||
title: "提示",
|
||||
message: "是否确认退出系统?",
|
||||
buttons: ["cancel", "ok"],
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.response) {
|
||||
setTimeout(() => {
|
||||
mainWindow.destroy()
|
||||
mainWindow = null;
|
||||
}, 200);
|
||||
windowAllClosed();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
let recorder;
|
||||
ipcMain.on("startRecoder", () => {
|
||||
@ -498,8 +517,10 @@ function forceQuit() {
|
||||
app.relaunch();
|
||||
}
|
||||
console.log('------退出-------');
|
||||
app.exit();
|
||||
app.quit();
|
||||
setTimeout(() => {
|
||||
app.exit();
|
||||
app.quit();
|
||||
}, 500);
|
||||
} else {
|
||||
// 其他系统
|
||||
process.exit(0);
|
||||
@ -518,14 +539,12 @@ function closeAllWindows() {
|
||||
});
|
||||
}
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
if (!gotTheLock) {
|
||||
app.quit();
|
||||
} else {
|
||||
if (app.isReady()) {
|
||||
}
|
||||
|
||||
app.on("ready", createWindow);
|
||||
app.whenReady().then(() => {
|
||||
// alert(devSplashURL)
|
||||
// alert(prodSplashURL)
|
||||
@ -559,14 +578,6 @@ if (!gotTheLock) {
|
||||
|
||||
// IPC test
|
||||
ipcMain.on('ping', () => console.log('pong'))
|
||||
|
||||
createWindow()
|
||||
|
||||
app.on('activate', function () {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||
})
|
||||
})
|
||||
|
||||
// 退出时注销所有快捷键
|
||||
|
||||
@ -85,7 +85,7 @@ let getWidth = (durationTime) => {
|
||||
// 6. 让 progressStyle 间接依赖 refreshKey(通过 getWidth)
|
||||
let progressStyle = (task) => {
|
||||
let taskLeft = task.startTime - window['tsObj']._Store._startTimestamp;
|
||||
let style = {
|
||||
let style:any = {
|
||||
width: getWidth(task.duration_time) * 1000 + "px",
|
||||
left: getWidth(taskLeft) + "px",
|
||||
};
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
import {inject, ref} from 'vue'
|
||||
|
||||
const eventBus: any = inject('bus')
|
||||
let eventObj = ref(null)
|
||||
let eventObj:any = ref(null)
|
||||
eventBus.on('click-event-show-plane', (params) => {
|
||||
console.log('兄弟 B 的方法被触发了!', params)
|
||||
eventObj.value = (eventObj.value == null ? params : null)
|
||||
|
||||
@ -130,7 +130,7 @@ let eventCallback = () => {
|
||||
let timeId = Math.round(props.TSOBJ._Store._currentTimestamp / 1000);
|
||||
timeId *= 1000;
|
||||
// console.log(timeId)
|
||||
let taskIds = [];
|
||||
let taskIds:any = [];
|
||||
let dataMap = props.TSOBJ._Store.dealData("startTime");
|
||||
console.log(dataMap)
|
||||
|
||||
|
||||
@ -3,12 +3,7 @@
|
||||
<div class="head_box">
|
||||
<!-- <span class="head_title">实景三维电子沙盘系统</span> -->
|
||||
<!-- <headSvg style="width: 100%;height: 100%;"></headSvg> -->
|
||||
<img
|
||||
width="100%"
|
||||
height="100%"
|
||||
:src="`../../../src/assets/images/theme/${skinInfo}/head.png`"
|
||||
alt=""
|
||||
/>
|
||||
<img width="100%" height="100%" :src="headImg" alt="" />
|
||||
</div>
|
||||
<div class="dateTime">
|
||||
<span>{{ date.hms }}</span>
|
||||
@ -17,12 +12,7 @@
|
||||
<span>{{ t(`week.4`) }}</span>
|
||||
</div>
|
||||
<div class="weather">
|
||||
<svg-icon
|
||||
name="weatherBase"
|
||||
:class="weatherClick ? 'weatherIcon' : ''"
|
||||
:size="40"
|
||||
@click="clickFun"
|
||||
></svg-icon>
|
||||
<svg-icon name="weather" :size="40" @click="clickFun"></svg-icon>
|
||||
</div>
|
||||
</div>
|
||||
<setTool ref="setToolRef"></setTool>
|
||||
@ -63,7 +53,8 @@ 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 date = ref({
|
||||
@ -71,25 +62,26 @@ const date = ref({
|
||||
hms: '',
|
||||
week: 0
|
||||
})
|
||||
window.addEventListener('setItemEvent', (e: any) => {
|
||||
window.addEventListener("setItemEvent", (e: any) => {
|
||||
console.log('e', e)
|
||||
if (e.key == 'systemSetting') {
|
||||
let obj = JSON.parse(e.newValue)
|
||||
skinInfo.value = obj.skinInfo
|
||||
if (e.key == "systemSetting") {
|
||||
let obj = JSON.parse(e.newValue);
|
||||
skinInfo.value = obj.skinInfo;
|
||||
|
||||
let setting = JSON.parse(e.newValue)
|
||||
let dialogElm: any = document.getElementsByClassName('YJ-custom-base-dialog')
|
||||
if (setting.language === 'zh-EN') {
|
||||
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++) {
|
||||
dialogElm[i].classList.remove('dialog-en')
|
||||
dialogElm[i].classList.remove('dialog-en');
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
var weatherClick = ref(false)
|
||||
const setTime = () => {
|
||||
let date1 = new Date()
|
||||
@ -140,7 +132,7 @@ var clickFun = () => {
|
||||
z-index: 999;
|
||||
pointer-events: none;
|
||||
|
||||
> * {
|
||||
>* {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
@ -185,7 +177,7 @@ var clickFun = () => {
|
||||
align-items: center;
|
||||
font-family: 'alimamashuheiti';
|
||||
|
||||
& > span:first-child {
|
||||
&>span:first-child {
|
||||
letter-spacing: 1px;
|
||||
font-size: 2rem;
|
||||
font-family: 'alimamashuheiti';
|
||||
@ -197,23 +189,20 @@ var clickFun = () => {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
& > span:first-child {
|
||||
&>span:first-child {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
& > span:last-child {
|
||||
&>span:last-child {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.weather {
|
||||
margin-left: 15px;
|
||||
.weatherIcon {
|
||||
fill: rgba(var(--color-base1), 1) !important;
|
||||
}
|
||||
|
||||
svg {
|
||||
// fill: rgba(var(--color-base1), 1) !important;
|
||||
fill: rgba(var(--color-base1), 1) !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
//@ts-nocheck
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { $changeComponentShow } from '@/utils/communication'
|
||||
import { useRightOperate } from './hooks/rightOperate'
|
||||
|
||||
@ -607,7 +607,7 @@ export const useTree = () => {
|
||||
brightness: 1
|
||||
})
|
||||
}
|
||||
res.data.list[i].icon = await cusNodeIcon(res.data.list[i]);
|
||||
res.data.list[i].svg = await cusNodeIcon(res.data.list[i]);
|
||||
}
|
||||
}
|
||||
zNodes.value = res.data.list
|
||||
|
||||
@ -193,28 +193,29 @@ onMounted(() => {
|
||||
|
||||
.content {
|
||||
.el-input__wrapper {
|
||||
background-color: transparent;
|
||||
// background-color: transparent;
|
||||
border: 0.2px solid rgba(var(--color-base1), 1);
|
||||
box-shadow: 0 0 0 0.2px rgba(var(--color-base1), 1) inset !important;
|
||||
/* 新增此行 */
|
||||
border-radius: 0;
|
||||
padding: 3px 11px;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
color: #fff;
|
||||
color: rgb(0, 66, 66);
|
||||
}
|
||||
|
||||
/* 新增图标颜色控制 */
|
||||
.el-input__prefix,
|
||||
.el-input__suffix {
|
||||
.el-icon {
|
||||
color: rgba(var(--color-base1), 1);
|
||||
color: rgb(0, 66, 66);
|
||||
/* 将#00ffff替换为你想用的颜色 */
|
||||
font-size: 18px;
|
||||
/* 可选:调整图标大小 */
|
||||
}
|
||||
|
||||
&:hover .el-icon {
|
||||
color: rgba(var(--color-base1), 1);
|
||||
color: rgb(0, 66, 66);
|
||||
/* 悬停颜色保持一致 */
|
||||
}
|
||||
}
|
||||
@ -300,13 +301,13 @@ onMounted(() => {
|
||||
color: #eee;
|
||||
text-align: center;
|
||||
text-shadow: 0px 0px 4px rgba(80, 227, 230, 0.2);
|
||||
font-style: italic;
|
||||
// font-style: italic;
|
||||
letter-spacing: 5px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.title2 {
|
||||
font-size: 3rem;
|
||||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
color: #eee;
|
||||
text-align: center;
|
||||
@ -337,7 +338,7 @@ onMounted(() => {
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
margin-bottom: 1.5vw;
|
||||
padding: 0.6vw 0;
|
||||
padding: 19px 0;
|
||||
letter-spacing: 0.2vw;
|
||||
font-size: 14px;
|
||||
color: rgba(0, 66, 66, 1);
|
||||
|
||||
Reference in New Issue
Block a user