Browse Source

test

master
肖正 3 weeks ago
parent
commit
75dc62d2df
  1. 2
      .gitignore
  2. BIN
      hukou.zip
  3. BIN
      hukou/assets/DS-DIGIT-Bz4sH1xK.TTF
  4. BIN
      hukou/assets/bg-Ca7X2M0b.jpg
  5. BIN
      hukou/assets/bg1-B6_C6NJE.png
  6. BIN
      hukou/assets/btn1-CRKIxnkF.png
  7. BIN
      hukou/assets/btn2-B0GpvJoC.png
  8. BIN
      hukou/assets/eath-CHEjiCYl.png
  9. BIN
      hukou/assets/headcenter-Njohw23C.png
  10. BIN
      hukou/assets/headleft-BoeOVS0y.png
  11. BIN
      hukou/assets/headright-C5bcIe9i.png
  12. 1
      hukou/assets/home-DXVefj4c.css
  13. 28
      hukou/assets/home-QKeLYwBm.js
  14. 19
      hukou/assets/home-legacy-CEa2V95L.js
  15. BIN
      hukou/assets/icon1-DzZ3EAAm.png
  16. BIN
      hukou/assets/icon2-TfyNJkmG.png
  17. BIN
      hukou/assets/icon3-CVEMzhGp.png
  18. BIN
      hukou/assets/icon4-BG4veA_t.png
  19. BIN
      hukou/assets/iconbg-un2BVcht.png
  20. 22
      hukou/assets/index-DOfL5DGB.js
  21. 13
      hukou/assets/index-legacy-BceoyPKk.js
  22. BIN
      hukou/assets/line1-B71bjm7p.png
  23. BIN
      hukou/assets/line2-BHsY8Ivs.png
  24. BIN
      hukou/assets/line3-CtTb4JFW.png
  25. BIN
      hukou/assets/line4-CEdqVrZG.png
  26. BIN
      hukou/assets/line5-CHX4vXjx.png
  27. BIN
      hukou/assets/line6-CbecP0qS.png
  28. BIN
      hukou/assets/line7-CDANFz2y.png
  29. 1
      hukou/assets/polyfills-legacy-BoP4WWJT.js
  30. 18
      hukou/index.html
  31. 1
      hukou/vite.svg
  32. 7649
      package-lock.json
  33. 9
      package.json
  34. 10
      preload.js
  35. 80
      src/background.js
  36. 23
      src/views/home.vue
  37. 11
      tsconfig.json
  38. 3
      vite.config.ts
  39. 4021
      yarn.lock

2
.gitignore

@ -9,6 +9,8 @@ lerna-debug.log*
node_modules node_modules
dist dist
hukou
hukou.zip
dist-ssr dist-ssr
*.local *.local

BIN
hukou.zip

Binary file not shown.

BIN
hukou/assets/DS-DIGIT-Bz4sH1xK.TTF

Binary file not shown.

BIN
hukou/assets/bg-Ca7X2M0b.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 KiB

BIN
hukou/assets/bg1-B6_C6NJE.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

BIN
hukou/assets/btn1-CRKIxnkF.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

BIN
hukou/assets/btn2-B0GpvJoC.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

BIN
hukou/assets/eath-CHEjiCYl.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

BIN
hukou/assets/headcenter-Njohw23C.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

BIN
hukou/assets/headleft-BoeOVS0y.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

BIN
hukou/assets/headright-C5bcIe9i.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

1
hukou/assets/home-DXVefj4c.css

File diff suppressed because one or more lines are too long

28
hukou/assets/home-QKeLYwBm.js

File diff suppressed because one or more lines are too long

19
hukou/assets/home-legacy-CEa2V95L.js

File diff suppressed because one or more lines are too long

BIN
hukou/assets/icon1-DzZ3EAAm.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

BIN
hukou/assets/icon2-TfyNJkmG.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

BIN
hukou/assets/icon3-CVEMzhGp.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

BIN
hukou/assets/icon4-BG4veA_t.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

BIN
hukou/assets/iconbg-un2BVcht.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

22
hukou/assets/index-DOfL5DGB.js

File diff suppressed because one or more lines are too long

13
hukou/assets/index-legacy-BceoyPKk.js

File diff suppressed because one or more lines are too long

BIN
hukou/assets/line1-B71bjm7p.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
hukou/assets/line2-BHsY8Ivs.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
hukou/assets/line3-CtTb4JFW.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

BIN
hukou/assets/line4-CEdqVrZG.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
hukou/assets/line5-CHX4vXjx.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
hukou/assets/line6-CbecP0qS.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

BIN
hukou/assets/line7-CDANFz2y.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

1
hukou/assets/polyfills-legacy-BoP4WWJT.js

File diff suppressed because one or more lines are too long

18
hukou/index.html

@ -1,18 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
<script type="module" crossorigin src="./assets/index-DOfL5DGB.js"></script>
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head>
<body>
<div id="app"></div>
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="./assets/polyfills-legacy-BoP4WWJT.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="./assets/index-legacy-BceoyPKk.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>

1
hukou/vite.svg

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

7649
package-lock.json

File diff suppressed because it is too large

9
package.json

@ -2,12 +2,16 @@
"name": "hukou", "name": "hukou",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"main": "background.js",
"type": "module", "type": "module",
"description": "任务管理桌面应用",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vue-tsc && vite build", "build": "vue-tsc && vite build",
"preview": "vite preview", "preview": "vite preview",
"build:no-vue-tsc": "vite build" "build:no-vue-tsc": "vite build",
"electron:serve": "npm run build && electron .",
"electron:build": "vite build && electron-builder"
}, },
"dependencies": { "dependencies": {
"axios": "^1.7.2", "axios": "^1.7.2",
@ -16,6 +20,7 @@
"echarts-wordcloud": "^2.1.0", "echarts-wordcloud": "^2.1.0",
"element-plus": "^2.7.5", "element-plus": "^2.7.5",
"element-ui": "^2.15.14", "element-ui": "^2.15.14",
"screenfull": "^6.0.2",
"vue": "^3.4.21", "vue": "^3.4.21",
"vue-count-to": "^1.0.13", "vue-count-to": "^1.0.13",
"vue-router": "^4.3.2", "vue-router": "^4.3.2",
@ -23,6 +28,8 @@
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.14.2", "@types/node": "^20.14.2",
"electron": "^32.1.2",
"electron-builder": "^25.1.7",
"@vitejs/plugin-legacy": "^5.4.1", "@vitejs/plugin-legacy": "^5.4.1",
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.0.4",
"less": "^4.2.0", "less": "^4.2.0",

10
preload.js

@ -0,0 +1,10 @@
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
for (const dependency of ['chrome', 'node', 'electron']) {
replaceText(`${dependency}-version`, process.versions[dependency])
}
})

80
src/background.js

@ -0,0 +1,80 @@
'use strict'
import { app, protocol, BrowserWindow } from 'electron'
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
import installExtension, { VUEJS3_DEVTOOLS } from 'electron-devtools-installer'
const isDevelopment = process.env.NODE_ENV !== 'production'
// Scheme must be registered before the app is ready
protocol.registerSchemesAsPrivileged([
{ scheme: 'app', privileges: { secure: true, standard: true } },
])
async function createWindow() {
// Create the browser window.
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
// Use pluginOptions.nodeIntegration, leave this alone
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION,
},
})
if (process.env.WEBPACK_DEV_SERVER_URL) {
// Load the url of the dev server if in development mode
await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL)
if (!process.env.IS_TEST) win.webContents.openDevTools()
} else {
createProtocol('app')
// Load the index.html when not in development
win.loadURL('app://./index.html')
}
}
// Quit when all windows are closed.
app.on('window-all-closed', () => {
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
// 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()
})
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', async () => {
if (isDevelopment && !process.env.IS_TEST) {
// Install Vue Devtools
try {
await installExtension(VUEJS3_DEVTOOLS)
} catch (e) {
console.error('Vue Devtools failed to install:', e.toString())
}
}
createWindow()
})
// Exit cleanly on request from parent process in development mode.
if (isDevelopment) {
if (process.platform === 'win32') {
process.on('message', (data) => {
if (data === 'graceful-exit') {
app.quit()
}
})
} else {
process.on('SIGTERM', () => {
app.quit()
})
}
}

23
src/views/home.vue

@ -2,7 +2,7 @@
<div class="videobg style1"></div> <div class="videobg style1"></div>
<div class="mainbox" style="width: 100%; height: 100%"> <div class="mainbox" style="width: 100%; height: 100%">
<div class="head fadeInDown"> <div class="head fadeInDown">
<h1><span>湖口县全民健康大数据平台</span></h1> <h1 @click="enterFullscreen"><span>湖口县全民健康大数据平台</span></h1>
<div class="timebox"> <div class="timebox">
{{state.time}}<span>{{ state.weekday }}</span> {{state.time}}<span>{{ state.weekday }}</span>
</div> </div>
@ -219,15 +219,36 @@ const state = reactive({
}) })
const maptabsCurrent = ref(0); const maptabsCurrent = ref(0);
onMounted(() => { onMounted(() => {
// setTimeout(() => {
// enterFullscreen()
// }, 2000 )
init(); init();
timer.value = setTimeout(time, 1000);// timer.value = setTimeout(time, 1000);//
setInterval(() => { setInterval(() => {
state.born++; state.born++;
if (state.born > 100) {
state.born = 16;
}
}, 20000); }, 20000);
setInterval(() => { setInterval(() => {
state.die++; state.die++;
if (state.die > 100) {
state.die = 28;
}
}, 21000); }, 21000);
}) })
const enterFullscreen =() => {
const elem = document.documentElement;
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen();
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
}
}
function time() { function time() {
clearTimeout(t);// clearTimeout(t);//
let dt = new Date(); let dt = new Date();

11
tsconfig.json

@ -1,8 +1,13 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2020", "target": "es5",
"module": "commonjs",
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
// "target": "ES2020",
"useDefineForClassFields": true, "useDefineForClassFields": true,
"module": "ESNext", // "module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"], "lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true, "skipLibCheck": true,
"moduleResolution": "node", "moduleResolution": "node",
@ -27,6 +32,6 @@
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true
}, },
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue","main.ts"],
"references": [{ "path": "./tsconfig.node.json" }] "references": [{ "path": "./tsconfig.node.json" }]
} }

3
vite.config.ts

@ -36,8 +36,9 @@ export default defineConfig(({ mode, command }) => {
    },     },
    publicPath: './',     publicPath: './',
    base: './',     base: './',
outputDir: 'dist',
    build: {     build: {
      outDir: 'hukou', //       outDir: 'hukou',
      assetsDir: 'assets',       assetsDir: 'assets',
    },     },
resolve: { resolve: {

4021
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save