ZaiZai 1 year ago
parent
commit
1c339616fc

BIN
build/icon.icns


BIN
build/icon.ico


BIN
build/icon.png


BIN
resources/icon.png


+ 7 - 0
src/main/index.js

@@ -124,6 +124,13 @@ app.whenReady().then(() => {
         BrowserWindow.getFocusedWindow().webContents.openDevTools()
     })
 
+    // IPC openExternal
+    ipcMain.handle('openExternal', async (event, options) => {
+        if (options.url) {
+            await shell.openExternal(options.url)
+        }
+    })
+
     createWindow()
 
     app.on('activate', function () {

+ 1 - 2
src/renderer/src/App.vue

@@ -11,8 +11,7 @@ import { setElementMainColor } from 'js-fast-way'
 
 nextTick(() => {
     window['$split'] = split
-    setElementMainColor('#204DA0')
-    document.documentElement.setAttribute('class', 'color-blue')
+    setElementMainColor('#02a271')
 })
 </script>
 

BIN
src/renderer/src/assets/icon.png


+ 13 - 1
src/renderer/src/layout/index.vue

@@ -15,6 +15,8 @@
                         <template #dropdown>
                             <el-dropdown-menu>
                                 <el-dropdown-item @click="handleProject">项目管理</el-dropdown-item>
+                                <el-dropdown-item divided @click="handleOnline">在线档案管理</el-dropdown-item>
+                                <el-dropdown-item divided @click="handleAbout">关于我们</el-dropdown-item>
                                 <!-- el-dropdown-item divided @click="handleClear">清除数据</el-dropdown-item>
                                 <el-dropdown-item divided @click="handleUpdate">检测更新</el-dropdown-item -->
                             </el-dropdown-menu>
@@ -34,7 +36,7 @@ import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRoute } from 'vue-router'
 import { getProjectInfo } from '../store/app'
-import { toPage } from '../utils/tools'
+import { openExternal, toPage } from '../utils/tools'
 
 //初始组合式
 const store = useAppStore()
@@ -86,6 +88,16 @@ const handleProject = () => {
     })
 }
 
+//在线档案管理
+const handleOnline = () => {
+    openExternal('https://archives.hczcxx.cn')
+}
+
+//关于我们
+const handleAbout = () => {
+    openExternal('http://hczc.hcxxy.com')
+}
+
 //清除数据
 const handleClear = () => {
 

+ 5 - 0
src/renderer/src/utils/tools.js

@@ -36,6 +36,11 @@ export const delMessage = (cbk) => {
     })
 }
 
+//显示打开文件对话框
+export const openExternal = (url) => {
+    window.electron.ipcRenderer.invoke('openExternal', { url })
+}
+
 //显示打开文件对话框
 export const showOpenDialog = async (options) => {
     return await window.electron.ipcRenderer.invoke('showOpenDialog', options)

+ 1 - 2
src/renderer/src/views/project.vue

@@ -24,13 +24,12 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '../store'
+import { useRoute } from 'vue-router'
 import { getProjectInfo } from '../store/app'
-import { useRoute, useRouter } from 'vue-router'
 import { getArrValue, getObjValue, isArrIndex, isNullES } from 'js-fast-way'
 import { delMessage, exists_file, showOpenDialog, toPage, write_file } from '../utils/tools'
 
 //初始组合式
-const router = useRouter()
 const useRoutes = useRoute()
 const store = useAppStore()
 

+ 0 - 2
src/renderer/src/views/query.vue

@@ -74,7 +74,6 @@
 <script setup>
 import { nextTick, onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
-import { useRouter } from 'vue-router'
 import { sql_count, sql_table } from '../utils/dbConnect'
 import { getArrValue, isNullES } from 'js-fast-way'
 import QueryFileRoll from '../components/query/file-roll.vue'
@@ -82,7 +81,6 @@ import { toPage } from '../utils/tools'
 
 //初始组合式
 const store = useAppStore()
-const router = useRouter()
 
 defineOptions({
     name: 'HcQuery',