chenyc
2022-07-04 145c0bf73ebd82ca635a1d1c82ca2bd2fb953f92
初始化
50个文件已添加
2280 ■■■■■ 已修改文件
.gitignore 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/.debug.script.mjs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/extensions.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/launch.json 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/settings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/tasks.json 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CHANGELOG.md 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
electron-builder.json5 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
electron/main/index.ts 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
electron/preload/splash.ts 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
index.html 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/electron-vite-vue.gif 补丁 | 查看 | 原始文档 | blame | 历史
public/favicon.ico 补丁 | 查看 | 原始文档 | blame | 历史
public/node.png 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/user/index.ts 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/electron.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/imgs/login/favicon.svg 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/imgs/login/login-background.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/imgs/login/login-icon-logo.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/imgs/login/login-icon-user.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/imgs/login/login.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/logo.png 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/vite.svg 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/vue.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/HelloWorld.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/env.d.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/global.d.ts 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.ts 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.ts 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/samples/node-api.ts 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/samples/sockteStomp.ts 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/stores/meun.ts 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/stores/patient.ts 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/stores/sockteInfo.ts 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/stores/userInfo.ts 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/axios.ts 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/formatTime.ts 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/meuns.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/storage.ts 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/index.vue 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/component/account.vue 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/test/index.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
tsconfig.json 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
tsconfig.node.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
types.d.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.ts 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
New file
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
release
.vscode/.debug.env
package-lock.json
pnpm-lock.yaml
yarn.lock
.vscode/.debug.script.mjs
New file
@@ -0,0 +1,14 @@
import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'
import { createRequire } from 'module'
const pkg = createRequire(import.meta.url)('../package.json')
const __dirname = path.dirname(fileURLToPath(import.meta.url))
// write .debug.env
const envContent = Object.entries(pkg.env).map(([key, val]) => `${key}=${val}`)
fs.writeFileSync(path.join(__dirname, '.debug.env'), envContent.join('\n'))
// bootstrap
import('../scripts/watch.mjs?debug=vscode')
.vscode/extensions.json
New file
@@ -0,0 +1,6 @@
{
    "recommendations": [
        "Vue.volar",
        "Vue.vscode-typescript-vue-plugin"
    ]
}
.vscode/launch.json
New file
@@ -0,0 +1,44 @@
{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "compounds": [
    {
      "name": "Debug App",
      "preLaunchTask": "start .debug.script.mjs",
      "configurations": [
        "Debug Main Process",
        "Debug Renderer Process"
      ],
      "presentation": {
        "hidden": false,
        "group": "",
        "order": 1
      },
      "stopAll": true
    }
  ],
  "configurations": [
    {
      "name": "Debug Main Process",
      "type": "pwa-node",
      "request": "launch",
      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
      "windows": {
        "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd"
      },
      "runtimeArgs": [
        "--remote-debugging-port=9229",
        "${workspaceRoot}/dist/main/index.cjs"
      ],
      "envFile": "${workspaceFolder}/.vscode/.debug.env"
    },
    {
      "name": "Debug Renderer Process",
      "port": 9229,
      "request": "attach",
      "type": "pwa-chrome"
    },
  ]
}
.vscode/settings.json
New file
@@ -0,0 +1,4 @@
{
  "typescript.tsdk": "node_modules/typescript/lib",
  "typescript.enablePromptUseWorkspaceTsdk": true,
}
.vscode/tasks.json
New file
@@ -0,0 +1,14 @@
{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
    {
      "label": "start .debug.script.mjs",
      "type": "shell",
      "command": "node .vscode/.debug.script.mjs",
      "isBackground": true,
      "problemMatcher": []
    }
  ]
}
CHANGELOG.md
New file
@@ -0,0 +1,25 @@
## 2022-06-04
[v2.0.0](https://github.com/electron-vite/electron-vite-vue/pull/156)
- 🖖 Based on the `vue-ts` template created by `npm create vite`, integrate `vite-plugin-electron`
- ⚡️ More simplify, is in line with Vite project structure
## 2022-01-30
[v1.0.0](https://github.com/electron-vite/electron-vite-vue/releases/tag/v1.0.0)
- ⚡️ Main、Renderer、preload, all built with vite
## 2022-01-27
- Refactor the scripts part.
- Remove `configs` directory.
## 2021-11-11
- Refactor the project. Use vite.config.ts build `Main-process`, `Preload-script` and `Renderer-process` alternative rollup.
- Scenic `Vue>=3.2.13`, `@vue/compiler-sfc` is no longer necessary.
- If you prefer Rollup, Use rollup branch.
```bash
Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree.
```
LICENSE
New file
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 草鞋没号
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
electron-builder.json5
New file
@@ -0,0 +1,36 @@
/**
 * @see https://www.electron.build/configuration/configuration
 */
{
  "appId": "YourAppID",
  "asar": true,
  "directories": {
    "output": "release/${version}"
  },
  "files": [
    "dist"
  ],
  "mac": {
    "artifactName": "${productName}_${version}.${ext}",
    "target": [
      "dmg"
    ]
  },
  "win": {
    "target": [
      {
        "target": "nsis",
        "arch": [
          "x64"
        ]
      }
    ],
    "artifactName": "${productName}_${version}.${ext}"
  },
  "nsis": {
    "oneClick": false,
    "perMachine": false,
    "allowToChangeInstallationDirectory": true,
    "deleteAppDataOnUninstall": false
  }
}
electron/main/index.ts
New file
@@ -0,0 +1,115 @@
import { app, BrowserWindow, shell, ipcMain } from 'electron'
import { release } from 'os'
import { join } from 'path'
import fs from 'fs'
import iconv from 'iconv-lite'
// 配制文件的读写实例
const Store = require('electron-store');
const  store = new Store();
console.log(store.path)
// 读
// console.log(store.get('clientCode'))
// console.log(store.get('deviceList'))
// 写
// store.set("testr","test001")
// Disable GPU Acceleration for Windows 7
if (release().startsWith('6.1')) app.disableHardwareAcceleration()
// Set application name for Windows 10+ notifications
if (process.platform === 'win32') app.setAppUserModelId(app.getName())
if (!app.requestSingleInstanceLock()) {
  app.quit()
  process.exit(0)
}
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
let win: BrowserWindow | null = null
// Here, you can also use other preload
const splash = join(__dirname, '../preload/splash.js')
// 🚧 Use ['ENV_NAME'] avoid vite:define plugin
const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
async function createWindow() {
  win = new BrowserWindow({
    title: 'Main window',
    webPreferences: {
      preload: splash,
      nodeIntegration: true,
      contextIsolation: false,
    },
  })
  if (app.isPackaged) {
    win.loadFile(join(__dirname, '../../index.html'))
  } else {
    win.loadURL(url)
  }
  // Test active push message to Renderer-process
  // 测试推送消息到Renderer进程
  win.webContents.on('did-finish-load', () => {
    win?.webContents.send('main-process-message', new Date().toLocaleString())
    win?.webContents.send('getConfigData',store.get('clientCode'),store.get('deviceList'))
  })
  // Make all links open with the browser, not with the application
  // 用浏览器打开所有链接,而不是应用程序
  win.webContents.setWindowOpenHandler(({ url }) => {
    if (url.startsWith('https:')) shell.openExternal(url)
    return { action: 'deny' }
  })
}
app.whenReady().then(createWindow)
app.on('window-all-closed', () => {
  win = null
  if (process.platform !== 'darwin') app.quit()
})
app.on('second-instance', () => {
  if (win) {
    // Focus on the main window if the user tried to open another
    if (win.isMinimized()) win.restore()
    win.focus()
  }
})
app.on('activate', () => {
  const allWindows = BrowserWindow.getAllWindows()
  if (allWindows.length) {
    allWindows[0].focus()
  } else {
    createWindow()
  }
})
// new window example arg: new windows url
ipcMain.handle("open-win", (event, arg) => {
  const childWindow = new BrowserWindow({
    webPreferences: {
      preload: splash,
    },
  })
  if (app.isPackaged) {
    childWindow.loadFile(join(__dirname, `../renderer/index.html`), {
      hash: `${arg}`,
    })
  } else {
    childWindow.loadURL(`${url}/#${arg}`)
    // childWindow.webContents.openDevTools({ mode: "undocked", activate: true })
  }
})
// 渲染端发送消息到主进程
ipcMain.on("main-process-message2",()=>{
  console.log("33344")
})
// 渲染端发送消息到主进程
ipcMain.on('synchronous-message', (event, arg) => {
  console.log(arg) // 在 Node 控制台中打印“ping”
  event.returnValue = store.get('clientCode')
})
electron/preload/splash.ts
New file
@@ -0,0 +1,97 @@
function domReady(condition: DocumentReadyState[] = ['complete', 'interactive']) {
    return new Promise(resolve => {
      if (condition.includes(document.readyState)) {
        resolve(true)
      } else {
        document.addEventListener('readystatechange', () => {
          if (condition.includes(document.readyState)) {
            resolve(true)
          }
        })
      }
    })
  }
  const safeDOM = {
    append(parent: HTMLElement, child: HTMLElement) {
      if (!Array.from(parent.children).find(e => e === child)) {
        return parent.appendChild(child)
      }
    },
    remove(parent: HTMLElement, child: HTMLElement) {
      if (Array.from(parent.children).find(e => e === child)) {
        return parent.removeChild(child)
      }
    },
  }
  /**
   * https://tobiasahlin.com/spinkit
   * https://connoratherton.com/loaders
   * https://projects.lukehaas.me/css-loaders
   * https://matejkustec.github.io/SpinThatShit
   */
  function useLoading() {
    const className = `loaders-css__square-spin`
    const styleContent = `
  @keyframes square-spin {
    25% { transform: perspective(100px) rotateX(180deg) rotateY(0); }
    50% { transform: perspective(100px) rotateX(180deg) rotateY(180deg); }
    75% { transform: perspective(100px) rotateX(0) rotateY(180deg); }
    100% { transform: perspective(100px) rotateX(0) rotateY(0); }
  }
  .${className} > div {
    animation-fill-mode: both;
    width: 50px;
    height: 50px;
    background: #fff;
    animation: square-spin 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite;
  }
  .app-loading-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #282c34;
    z-index: 9;
  }
      `
    const oStyle = document.createElement('style')
    const oDiv = document.createElement('div')
    oStyle.id = 'app-loading-style'
    oStyle.innerHTML = styleContent
    oDiv.className = 'app-loading-wrap'
    oDiv.innerHTML = `<div class="${className}"><div></div></div>`
    return {
      appendLoading() {
        safeDOM.append(document.head, oStyle)
        safeDOM.append(document.body, oDiv)
      },
      removeLoading() {
        safeDOM.remove(document.head, oStyle)
        safeDOM.remove(document.body, oDiv)
      },
    }
  }
  // ----------------------------------------------------------------------
  const { appendLoading, removeLoading } = useLoading()
  domReady().then(appendLoading)
  window.onmessage = ev => {
    ev.data.payload === 'removeLoading' && removeLoading()
  }
  setTimeout(removeLoading, 4999)
index.html
New file
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
    <title>自助签到</title>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>
package.json
New file
@@ -0,0 +1,52 @@
{
  "name": "electron-vue-vite",
  "version": "2.0.0",
  "main": "dist/electron/main/index.js",
  "author": "",
  "license": "MIT",
  "private": true,
  "scripts": {
    "dev": "vite",
    "build": "vue-tsc --noEmit && vite build && electron-builder"
  },
  "engines": {
    "node": ">=14.17.0"
  },
  "devDependencies": {
    "@types/node": "^18.0.0",
    "@types/stompjs": "^2.3.5",
    "@vitejs/plugin-vue": "^2.3.3",
    "electron": "^19.0.3",
    "electron-builder": "^23.0.3",
    "sass": "^1.53.0",
    "stylelint": "^14.9.1",
    "stylelint-scss": "^4.2.0",
    "typescript": "^4.7.3",
    "vite": "^2.9.9",
    "vite-plugin-electron": "^0.4.6",
    "vite-plugin-resolve": "^2.1.2",
    "vue": "^3.2.36",
    "vue-tsc": "^0.36.0"
  },
  "env": {
    "VITE_DEV_SERVER_HOST": "127.0.0.1",
    "VITE_DEV_SERVER_PORT": 3344
  },
  "keywords": [
    "electron",
    "rollup",
    "vite",
    "vue3",
    "vue"
  ],
  "dependencies": {
    "axios": "^0.27.2",
    "electron-store": "^8.0.2",
    "element-plus": "^2.2.6",
    "iconv-lite": "^0.6.3",
    "internet-available": "^1.0.0",
    "pinia": "^2.0.14",
    "stompjs": "^2.3.3",
    "vue-router": "^4.0.16"
  }
}
public/electron-vite-vue.gif
public/favicon.ico
public/node.png
src/App.vue
New file
@@ -0,0 +1,22 @@
<script setup lang="ts">
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
import HelloWorld from './components/HelloWorld.vue'
</script>
<template>
    <div id="app" class="app-view">
        <router-view></router-view>
    </div>
</template>
<style>
#app {
  /* font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px; */
}
</style>
src/api/user/index.ts
New file
@@ -0,0 +1,59 @@
import request from '@/utils/axios'
export function signIn(params: string) {
    return request({
        url: '/user/info/login',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: params,
    })
}
export function getuserinfo() {
    return request({
        url: '/user/info/getUserInfo',
        method: 'post'
    })
}
export function getUsersByRoleCode(params: string) {
    return request({
        url: '/user/info/getUsersByRoleCode',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: params,
    })
}
export function getUsersByRoleGroup(params: Object) {
    return request({
        url: '/user/info/getUsersByRoleGroup',
        method: 'post',
        data: params,
    })
}
// 修改用户信息
export function editUserInfo(params:object) {
    return request({
        url: '/user/info/update',
        method: 'post',
        data: params
    })
}
export function sendValidateCode(params: string) {
    return request({
        url: '/user/info/sendValidateCode',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: params,
    })
}
export function forgetPassword(params: Object) {
    return request({
        url: '/user/info/forgetPassword',
        method: 'post',
        data: params,
    })
}
src/assets/electron.png
src/assets/imgs/login/favicon.svg
New file
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     viewBox="0 0 165.8 145.1" style="enable-background:new 0 0 165.8 145.1;" xml:space="preserve">
<style type="text/css">
    .st0{opacity:0.5;fill:#009944;enable-background:new    ;}
    .st1{opacity:0.5;fill:#ABCD03;enable-background:new    ;}
    .st2{opacity:0.5;fill:#9FD9F6;enable-background:new    ;}
    .st3{fill:#FFFFFF;}
    .st4{fill:#009944;}
    .st5{fill:#333333;}
</style>
<g id="图层_2_00000116917764199459789490000017025768404478583708_">
    <g id="图层_1-2">
        <g id="content">
            <path class="st0" d="M0,50.9v58.8c17.4,8.3,111.1-77.9,165.8-69.6v38.1C111.1,86.6,17.4,42.7,0,50.9"/>
            <path class="st1" d="M0,0.4v144.2c49.7,8.3,92.8-97,165.8-88.7v56.4C92.8,120.6,49.7-7.9,0,0.4"/>
            <path class="st2" d="M0,44.3v27.4C45.6,79.9,107.7-2.9,165.8,5.4v111.9C107.7,125.5,45.6,36,0,44.3"/>
            <g id="name_and_slogan_id">
                <path class="st3" d="M85,77.9l-1-1v-7.6l1-1h1.6l0.1,0l0.1,0c0.1-0.3,0.1-0.7,0.1-1V51.4H85l-1-1v-5.7l1-1h9.4l1,1v22.8
                    c0,0.5,0,1,0.1,1.4c0,0.2,0.1,0.3,0.2,0.4c0.2,0.1,0.4,0.2,0.6,0.3v-6.1l1-1h1.9v-3.8h-1.4l-1-1v-4.2l-0.8-0.8v-5.1l0.7-0.7
                    l-0.8-0.8v-4.4l1-1h0.5l-0.6-0.6v-4.2l1-1h19.7l0.8-0.8h6.6l1,1c0,0.8-0.1,1.7-0.4,2.4c-0.4,0.9-1,1.6-1.7,2.1
                    c-0.7,0.5-1.6,0.9-2.5,1.2h4.5l1,1v4.4l-0.7,0.7l0.8,0.8v5.1l-1,1H124l0.9,1.3l-0.1,1.2l-1.1,1.2h1.4l1,1v7.4
                    c0.1,1.4-0.3,2.8-1.1,4l1,0l1,1v5.9l-1,1H97.2c-0.1,0-0.3,0-0.4,0c-1.1,0-2.2-0.2-3.3-0.7l-0.1,0c-0.5-0.3-0.9-0.7-1.3-1.1
                    c0,0.1-0.1,0.1-0.1,0.2c-0.2,0.4-0.6,0.9-1.1,1.2c-0.4,0.3-0.8,0.5-1.3,0.6c-0.6,0.1-1.1,0.2-1.6,0.2H85z M112.4,69.7v-4.4l1-1
                    h3.5v-1.1h-3.8l-1-1V60l0.2-0.6l0.7-0.8h-4.2v4.1c0,1.3-0.1,2.6-0.5,3.8c-0.3,1-0.8,2-1.6,2.7c-0.2,0.2-0.4,0.4-0.6,0.5
                    L112.4,69.7z M117.3,51.9c-0.6-0.6-1.1-1.2-1.4-2v2H117.3z M106.8,51.9v-1.6c-0.3,0.6-0.8,1.1-1.3,1.6H106.8z M47.7,77.8l-1-1
                    v-1.6c-0.1,0.2-0.3,0.4-0.5,0.6c-0.8,0.8-1.7,1.3-2.8,1.5c-1.1,0.3-2.3,0.4-3.5,0.4l-0.3,0l-1-1v-7.9l1-1h0.1V35l1-1h15.4l1,1
                    v5.4h1.1v-5.9l1-1h4.4l1,1v4.7h1.4v-4.7l1-1h6.8l1,1v4.7h5.9l1,1v6.1l-1,1h-5.9v6.9h5.4l1,1v6.3l-1,1h-5.4v6.9h6.5l1,1v6.1l-1,1
                    H57l-1-1v-1.8c-0.2,0.3-0.4,0.6-0.7,0.9c-0.7,0.8-1.6,1.4-2.6,1.7c-1.1,0.3-2.2,0.4-3.2,0.4L47.7,77.8z M66.2,69.4v-6.9h-8.3
                    l-0.6-0.6v6.6c0,0.3,0,0.6,0,0.9H66.2z M48.8,68.4v-4.7h-0.8v4.7H48.8z M48.8,56.4v-4h-0.8v4H48.8z M57.2,54.8l0.6-0.6h8.3v-6.9
                    h-1.5c-0.3,1.8-0.9,3.2-2,4c-1.2,0.9-2.9,1.4-5.4,1.4V54.8z M48.8,45v-4h-0.8v4H48.8z M84.6,42.5v-7.9l1-1l0.3,0
                    c1.2,0,2.4,0.1,3.6,0.3c1.1,0.2,2.2,0.6,3.1,1.3c0.9,0.8,1.6,1.8,1.9,2.9c0.4,1.4,0.6,2.9,0.5,4.4l-1,1l-8.4,0L84.6,42.5z"/>
                <path id="namepathdata" class="st4" d="M73.9,61.5v8.9h7.5v6.1H57v-6.1h10.2v-8.9h-9.3v-6.3h9.3v-8.9h-3.4
                    c-0.1,2-0.7,3.4-1.8,4.2s-2.7,1.2-5,1.2V41.4h2.3v-6.9h4.4v5.7h3.4v-5.7h6.8v5.7h6.9v6.1h-6.9v8.9h6.4v6.3H73.9z M56.2,35v33.5
                    c0,1.3-0.1,2.7-0.4,4c-0.2,0.9-0.6,1.8-1.2,2.5c-0.5,0.7-1.3,1.2-2.1,1.4c-1.1,0.3-2.2,0.4-3.2,0.4h-1.5v-7.3h2.1v-6.7h-2.8v5.9
                    c0,1.3-0.1,2.7-0.3,4c-0.2,0.9-0.6,1.7-1.2,2.3c-0.6,0.6-1.4,1-2.2,1.2c-1.2,0.3-2.4,0.4-3.6,0.4v-7.9h1.1V35H56.2z M47.1,57.4
                    h2.8v-6h-2.8V57.4z M47.1,46h2.8v-6h-2.8V46z M126.1,70.7v5.9H97.2C96.1,76.7,95,76.5,94,76c-0.8-0.5-1.5-1.2-2-2.1
                    c-0.2,0.5-0.5,1-0.8,1.5c-0.2,0.4-0.5,0.7-0.8,0.9c-0.3,0.2-0.6,0.4-1,0.4c-0.5,0.1-1,0.1-1.5,0.1H85v-7.7h1.6
                    c0.5,0.1,0.9-0.2,1.1-0.6c0.1-0.4,0.2-0.9,0.2-1.4V50.4H85v-5.7h9.4v22.8c0,0.5,0,1.1,0.1,1.6c0,0.4,0.2,0.7,0.5,1
                    c0.3,0.3,0.8,0.5,1.2,0.5c0.7,0.1,1.3,0.2,2,0.2L126.1,70.7z M96.9,41.5h10.9v-1.6h-10v-4.2h20.5v-0.8h6.6
                    c0,0.7-0.1,1.4-0.3,2.1c-0.3,0.6-0.7,1.2-1.3,1.6c-0.7,0.5-1.5,0.9-2.4,1.1c-1.3,0.2-2.5,0.3-3.8,0.3h-2.2v1.6h10.9v4.4h-3.5
                    v1.5h3.6v5.1h-2.6c-2.5,0-4.2-0.5-5.3-1.4c-1.1-1-1.7-2.5-1.6-3.9v-1.3h-1.5v6.3h-7.1v-6.3h-1.3v1.3c0.1,1.5-0.5,3-1.6,3.9
                    c-1,0.9-2.8,1.4-5.3,1.4h-2.5v-5.1h3.6v-1.5h-3.7V41.5z M97.9,52.9h24.4l1.8,2.5l-2.5,2.9h3.6v7.4c0.1,1.3-0.2,2.5-1,3.6
                    c-0.6,0.8-1.9,1.1-3.7,1.1h-7.1v-5.1h4.5v-3.1h-4.8V60l1.9-2.4h-7.2v5.1c0,1.2-0.1,2.4-0.4,3.6c-0.2,0.9-0.7,1.7-1.3,2.3
                    c-0.6,0.6-1.4,1-2.2,1.2c-1,0.3-2,0.4-3.1,0.4h-3.5v-6.8h2.9v-5.8h-2.4L97.9,52.9z M85.6,42.5v-7.9c1.2,0,2.5,0.1,3.7,0.2
                    c1,0.1,1.9,0.5,2.6,1.1c0.8,0.6,1.3,1.4,1.6,2.4c0.4,1.3,0.5,2.7,0.5,4.1L85.6,42.5z"/>
                <path class="st3" d="M101.8,98.2l-1-1v-0.9l1.1-1c0,0,0,0,0,0c0.2,0,0.4-0.1,0.5-0.2c0.1-0.1,0.2-0.2,0.3-0.4l-2.1-5.3v3.4
                    c0.1,0,0.1,0,0.2,0l1,1v0.9l-0.7,0.9c-0.2,0.1-0.4,0.1-0.6,0.1c0,0-0.5,0-0.6,0c-0.6,0-1.1-0.2-1.6-0.5l-0.2-0.1
                    c-0.5-0.5-0.7-1.2-0.6-1.9l0-8.1l1-1h1.1l1,1v2.5l0.5-0.7h1.2l0.9,0.7l1.1,3.1l1.1-3.1l0.9-0.7h1.1l0.6,0.9
                    c0.1-0.1,0.2-0.2,0.3-0.3c0.7-0.5,1.4-0.7,2.2-0.7c0.1,0,0.2,0,0.3,0c0,0,0,0,0,0c0.3,0,0.6,0,1,0.1c0.3,0,0.7,0.1,1,0.3l0.6,1
                    l-0.1,0.9l-1.3,0.9c-0.2-0.1-0.4-0.1-0.5-0.1c-0.2,0-0.5,0-0.7,0c0,0-0.2,0-0.2,0l0.3,0.1c0.3,0.1,0.7,0.2,1.1,0.3
                    c0.4,0.1,0.7,0.3,1,0.6c0.3,0.3,0.5,0.6,0.7,1c0,0,0,0.1,0,0.1V88l0.5-0.5c-0.3-0.2-0.6-0.5-0.6-1.4c0-0.3,0-1.1,0.7-1.4
                    c0.3-0.2,0.6-0.2,0.9-0.2c0,0,0.1,0,0.1,0c0.3,0,0.6,0.1,0.9,0.2c0.3,0.1,0.7,0.5,0.7,1.4c0,0.8-0.3,1.2-0.6,1.3l0.5,0.5v1.5
                    c0-0.7,0.3-1.4,0.9-1.9l0.1-0.1c0.6-0.5,1.4-0.7,2.2-0.7c0.1,0,0.2,0,0.3,0c0,0,0,0,0,0c0.3,0,0.7,0,1,0.1c0.3,0,0.7,0.1,1,0.3
                    l0.6,1l-0.1,0.9l-1.4,0.8c-0.1-0.1-0.3-0.1-0.4-0.1c-0.2,0-0.5,0-0.7,0l-0.2,0c0,0-0.1,0-0.1,0l0.4,0.1c0.3,0.1,0.7,0.2,1.1,0.3
                    c0.4,0.1,0.7,0.3,1,0.6c0.3,0.2,0.5,0.6,0.6,1c0.1,0.4,0.2,0.7,0.2,1.1c0.1,0.8-0.3,1.7-1,2.2l-0.2,0.1
                    c-0.7,0.4-1.5,0.6-2.3,0.6l-0.1,0l0,0h-0.5l0-1v1c-0.2,0-0.4,0-0.6-0.1c-0.3,0-0.5,0-0.7-0.1c-0.1,0-0.1,0-0.2,0l-0.8-0.9l-1,1
                    h-1.1l-1-1v-0.9c-0.2,0.5-0.5,1-1,1.4l-0.1,0.1c-0.6,0.4-1.4,0.5-2.1,0.5c-0.1,0-0.2,0-0.2,0l0,0h-0.6c-0.2,0-0.4,0-0.7-0.1
                    c-0.2,0-0.4,0-0.6-0.1l-1.1-1v-0.9l1.3-1l0.3,0.1c0.2,0,0.4,0,0.6,0.1c0,0,0.2,0,0.3,0l0.7,0c0.1,0,0.3,0,0.4-0.1c0,0,0,0,0-0.1
                    l-0.1,0c-0.2-0.1-0.4-0.2-0.7-0.2c-0.3-0.1-0.7-0.2-1-0.3l-0.1,0c-0.3-0.1-0.5-0.3-0.8-0.5l-0.2-0.2c-0.2-0.3-0.4-0.6-0.4-0.9
                    c0,0,0,0,0-0.1l-1.6,4.2c-0.1,0.4-0.3,0.9-0.5,1.3c-0.2,0.4-0.5,0.8-0.8,1.1c-0.3,0.4-0.7,0.6-1.2,0.8c-0.5,0.2-1,0.2-1.5,0.2
                    L101.8,98.2z M116.8,93.6l1.2-0.9l0.2,0.1c0.2,0,0.4,0,0.6,0.1c0.1,0,0.2,0,0.3,0l0.6,0c0.2,0,0.3,0,0.5-0.1c0,0,0,0,0-0.1
                    l-0.2,0c-0.2-0.1-0.3-0.1-0.5-0.2c-0.4-0.1-0.8-0.2-1-0.3l-0.1,0c-0.3-0.1-0.6-0.3-0.8-0.5c-0.3-0.3-0.5-0.7-0.6-1.1
                    c-0.1-0.3-0.1-0.6-0.1-0.9V93.6z M116.8,89.7C116.8,89.7,116.8,89.7,116.8,89.7L116.8,89.7z M92.5,95.9c-0.8,0-1.5-0.2-2.2-0.7
                    L90.2,95c-0.3-0.3-0.5-0.7-0.6-1.2v0.9l-1,1h-1.1l-1-1V88l0.5-0.5c-0.3-0.2-0.6-0.5-0.6-1.4c0-0.3,0-1.1,0.6-1.4
                    c0.3-0.2,0.6-0.3,0.9-0.3l0.1,0l0.1,0c0.3,0,0.6,0.1,0.8,0.2c0.3,0.1,0.7,0.5,0.7,1.4c0,0.3,0,1-0.6,1.4l0.5,0.5v3.9
                    c0-0.1,0.1-0.3,0.1-0.4c0.2-0.4,0.4-0.8,0.8-1.1l0.1-0.1c0.4-0.2,0.8-0.4,1.2-0.5c0.1,0,0.2,0,0.3-0.1l-1-0.8V88l0.8-1l0.8-0.1
                    l0.2,0c0,0,0.8,0,0.8,0c0.6,0,1,0,1.5,0.1l0.1,0c0.4,0.1,0.8,0.3,1.1,0.6l0.1,0.1c0.3,0.3,0.5,0.7,0.7,1.1
                    c0.1,0.4,0.2,0.7,0.2,1.1v4.8l-1,1h-0.9l-0.5-0.4c-0.1,0-0.1,0.1-0.2,0.1c-0.3,0.2-0.6,0.3-1,0.3c-0.3,0.1-0.6,0.1-0.9,0.1
                    C92.7,95.9,92.6,95.9,92.5,95.9z M92.5,92.6c0,0.1,0,0.1,0,0.2l0,0.1c0,0,0.1,0.1,0.2,0.1c0,0,0.1,0,0.1,0c0.4,0,0.7-0.1,1-0.2
                    c0.1-0.1,0.2-0.1,0.3-0.2l-1,0c-0.2,0-0.3,0-0.5,0C92.6,92.6,92.6,92.6,92.5,92.6z M81.9,95.9c-0.6,0-1.2-0.1-1.8-0.3l-0.1,0
                    c-0.5-0.3-0.9-0.6-1.2-1.1c-0.2-0.3-0.4-0.6-0.5-1c-0.2,0.5-0.5,1-0.8,1.4c-0.4,0.4-0.9,0.7-1.5,0.9c-0.5,0.2-1,0.3-1.6,0.3
                    h-0.1c-0.5,0-1.1-0.1-1.6-0.2c-0.5-0.1-1-0.4-1.4-0.8c-0.4-0.5-0.7-1-0.8-1.5c0-0.1-0.1-0.2-0.1-0.4v1.8l-1,1h-1.1l-1-1v-4.2
                    c0-0.3,0-0.5-0.1-0.7c0,0-0.1,0-0.1,0c0,0-0.1,0-0.1,0c-0.1,0-0.2,0-0.3,0c-0.1,0-0.2,0-0.2,0.1c0,0-0.1,0.1-0.1,0.1
                    c0,0.1-0.1,0.1-0.1,0.2v4.5l-1,1h-1.1l-1-1v-4.2c0-0.3,0-0.5-0.1-0.7c0,0-0.2,0-0.2,0c-0.1,0-0.2,0-0.3,0l-0.1,0
                    c-0.1,0-0.1,0-0.2,0.1c0,0-0.1,0-0.1,0.1c0,0.1-0.1,0.2-0.1,0.2v4.5l-1,1h-1.1l-1-1v-3.1l-0.8,0.9L55,92.7c0,0,0,0,0,0
                    c0.1,0.1,0.1,0.1,0.2,0.1c0.2,0.1,0.4,0.1,0.6,0.1c0,0,0.1,0,0.1,0c0.3,0,0.6,0,0.9-0.1c0.3-0.1,0.6-0.1,0.8-0.2l1.4,0.9v1
                    l-0.7,0.9l-0.4,0.1l-0.1,0l-0.6,0.1c-0.3,0-0.5,0.1-0.7,0.1c-0.3,0-0.6,0.1-0.8,0.1l-0.1-1v1c-0.5,0-1.1-0.1-1.6-0.2
                    c-0.5-0.1-1-0.4-1.4-0.8c-0.4-0.5-0.7-1-0.8-1.5c0-0.1-0.1-0.2-0.1-0.4v1.8l-1,1h-1.1l-1-1v-4.2c0-0.2,0-0.3,0-0.5
                    c0-0.1,0-0.1,0-0.2c0,0-0.1,0-0.2,0c-0.2,0-0.3,0-0.5,0c-0.1,0-0.2,0.1-0.3,0.1c-0.1,0-0.1,0.1-0.2,0.2
                    c-0.1,0.1-0.1,0.2-0.2,0.3v4.4l-1,1h-1.1l-1-1v-9.5l1-1h1.1l1,1V87c0.1,0,0.3-0.1,0.4-0.1c0.3,0,0.5-0.1,0.8-0.1l0.1,0
                    c0.5,0,0.9,0.1,1.4,0.2c0.4,0.1,0.8,0.4,1.1,0.7c0.3,0.3,0.4,0.7,0.6,1l0,0.2c0,0.2,0.1,0.5,0.1,0.7c0-0.1,0.1-0.3,0.1-0.4
                    c0.1-0.6,0.4-1.1,0.8-1.5c0.4-0.4,0.9-0.7,1.5-0.9c0.4-0.1,0.9-0.2,1.4-0.2l0.2,0c0.6,0,1.1,0.1,1.7,0.3c0.5,0.3,0.9,0.6,1.3,1
                    c0.2,0.4,0.4,0.7,0.5,1.1V88l1-1h1.1l0.2,0.2c0,0,0.1,0,0.1-0.1l0.1-0.1c0.5-0.2,0.9-0.2,1.4-0.2c0,0,0.1,0,0.2,0
                    c0.6,0,1.1,0.2,1.6,0.4c0.1,0,0.2,0.1,0.2,0.1c0.2-0.1,0.3-0.2,0.5-0.2c0.2-0.1,0.5-0.2,0.8-0.3c0.2-0.1,0.5-0.1,0.8-0.1
                    c0,0,0,0,0,0c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.4,1.1,0.8c0.2,0.3,0.4,0.6,0.6,1c0.1,0.3,0.1,0.6,0.2,0.9
                    c0-0.1,0.1-0.3,0.1-0.4c0.1-0.6,0.4-1.1,0.8-1.5c0.4-0.4,0.9-0.7,1.5-0.9c0.5-0.1,1-0.2,1.5-0.2s1.1,0.1,1.6,0.2
                    c0.5,0.1,1.1,0.4,1.5,0.9c0.4,0.4,0.6,0.9,0.8,1.4c0,0,0,0,0,0c0.1-0.3,0.3-0.7,0.4-1c0.3-0.5,0.7-0.9,1.2-1.1
                    c0.6-0.3,1.1-0.4,1.7-0.4c0.1,0,0.3,0,0.3,0c0.3,0,0.6,0,0.9,0.1l0.1,0c0,0,0.1,0,0.1,0v-1.8l1-1h1.1l1,1v9.5l-1,1h-0.9
                    l-0.4-0.4c-0.5,0.3-1.2,0.5-1.8,0.5C82.1,95.9,82,95.9,81.9,95.9z M74.6,93.9l0.1-1c0.2,0,0.4,0,0.5-0.1l0.1,0
                    c0.1-0.1,0.1-0.2,0.1-0.3l0-0.1c0.1-0.3,0.1-0.7,0.1-1c0-0.4,0-0.7-0.1-1.1l0-0.1c0-0.1,0-0.2-0.1-0.2c-0.1-0.1-0.1-0.1-0.2-0.2
                    c-0.2,0-0.3-0.1-0.5-0.1c0,0-0.1,0-0.1,0c-0.2,0-0.4,0-0.5,0.1c-0.1,0-0.1,0.1-0.2,0.1c-0.1,0.1-0.1,0.3-0.1,0.4
                    c0,0.3,0,0.7,0,1c0,0.4,0,0.7,0,1.1c0,0.1,0.1,0.3,0.2,0.4c0.2,0.1,0.4,0.1,0.6,0.1h0.1L74.6,93.9z M82.2,92.9
                    c0.2,0,0.4,0,0.6-0.1c0,0,0.1-0.1,0.1-0.1c0.1-0.1,0.1-0.3,0.2-0.5c0-0.3,0-0.6,0-0.9c0-0.3,0-0.6,0-0.9c0-0.2-0.1-0.3-0.2-0.5
                    c0,0-0.1-0.1-0.2-0.1c-0.2-0.1-0.4-0.1-0.5-0.1c0,0-0.2,0-0.2,0c-0.1,0-0.2,0-0.3,0.1l-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1
                    c-0.1,0.1-0.1,0.3-0.1,0.5c0,0.3-0.1,0.6-0.1,0.8c0,0.3,0,0.6,0.1,0.9c0,0.2,0.1,0.4,0.1,0.5c0,0.1,0.1,0.1,0.1,0.1
                    c0.1,0.1,0.3,0.1,0.4,0.1H82.2L82.2,92.9z"/>
                <path id="sloganpathdata" class="st5" d="M48.6,87.9c0.4,0,0.8,0,1.1,0.2c0.3,0.1,0.5,0.2,0.7,0.4c0.2,0.2,0.3,0.4,0.4,0.7
                    c0,0.3,0.1,0.6,0.1,0.9v4.7h-1.1v-4.3c0-0.2,0-0.5-0.1-0.7c0-0.2-0.1-0.4-0.2-0.6c-0.1-0.1-0.2-0.2-0.4-0.3
                    c-0.2-0.1-0.5-0.1-0.7-0.1c-0.2,0-0.4,0-0.6,0.1c-0.2,0-0.4,0.1-0.6,0.2c-0.2,0.1-0.4,0.3-0.5,0.4c-0.1,0.2-0.3,0.4-0.4,0.7v4.6
                    h-1.1v-9.5h1.1v3.7c0.1-0.2,0.3-0.4,0.4-0.5c0.1-0.1,0.3-0.3,0.5-0.3c0.2-0.1,0.4-0.1,0.6-0.2C48.2,87.9,48.4,87.9,48.6,87.9z
                     M58.5,90.7c0,0.1,0,0.2-0.1,0.4v0.4l-4.6,0.2c0,0.3,0,0.7,0.1,1c0.1,0.2,0.2,0.5,0.4,0.6c0.2,0.2,0.4,0.4,0.7,0.4
                    c0.3,0.1,0.7,0.1,1,0.1c0.4,0,0.8,0,1.1-0.1c0.3-0.1,0.7-0.2,1-0.3v1l-0.4,0.1l-0.6,0.1c-0.2,0-0.4,0.1-0.6,0.1
                    c-0.2,0-0.5,0.1-0.8,0.1c-0.4,0-0.9-0.1-1.3-0.2c-0.4-0.1-0.7-0.3-1-0.6c-0.3-0.3-0.5-0.7-0.6-1.1c-0.2-0.5-0.3-1.1-0.2-1.7
                    c0-0.6,0.1-1.1,0.2-1.7c0.1-0.4,0.3-0.8,0.6-1.1c0.3-0.3,0.6-0.5,1-0.6c0.4-0.1,0.8-0.2,1.2-0.2c0.5,0,1,0.1,1.4,0.2
                    c0.3,0.2,0.6,0.4,0.8,0.7c0.2,0.3,0.3,0.6,0.4,0.9C58.5,90,58.5,90.3,58.5,90.7z M57.4,90.7c0-0.2,0-0.5-0.1-0.7
                    c0-0.2-0.1-0.4-0.2-0.6c-0.1-0.2-0.3-0.4-0.5-0.4c-0.3-0.1-0.6-0.2-0.9-0.2c-0.3,0-0.6,0.1-0.9,0.2c-0.2,0.1-0.4,0.2-0.6,0.4
                    c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.2-0.1,0.6-0.1,0.9L57.4,90.7z M67.4,87.9c0.3,0,0.7,0.1,1,0.2c0.3,0.1,0.5,0.2,0.7,0.4
                    c0.2,0.2,0.3,0.4,0.4,0.7c0.1,0.3,0.1,0.6,0.1,0.9v4.7h-1.1v-4.3c0-0.4-0.1-0.9-0.2-1.2c-0.3-0.3-0.7-0.5-1.1-0.4
                    c-0.2,0-0.4,0-0.6,0.1c-0.2,0-0.3,0.1-0.5,0.2c-0.1,0.1-0.3,0.2-0.4,0.4c-0.1,0.2-0.2,0.4-0.3,0.6v4.8h-1.1v-4.2
                    c0-0.4-0.1-0.9-0.2-1.2c-0.2-0.3-0.6-0.5-1-0.4c-0.2,0-0.4,0-0.6,0.1c-0.2,0-0.4,0.1-0.5,0.2c-0.2,0.1-0.3,0.2-0.4,0.4
                    c-0.1,0.2-0.2,0.4-0.2,0.6v4.7h-1.1V88h1.1v0.9c0.2-0.3,0.5-0.6,0.8-0.8c0.4-0.1,0.7-0.2,1.1-0.2c0.4,0,0.9,0.1,1.2,0.3
                    c0.3,0.2,0.6,0.5,0.7,0.8c0.1-0.2,0.2-0.4,0.4-0.6c0.2-0.1,0.4-0.2,0.6-0.3c0.2-0.1,0.4-0.2,0.6-0.2
                    C67,87.9,67.2,87.9,67.4,87.9z M74.6,94.9c-0.4,0-0.9-0.1-1.3-0.2c-0.4-0.1-0.7-0.3-1-0.6c-0.3-0.3-0.5-0.7-0.6-1.1
                    c-0.2-0.5-0.3-1.1-0.2-1.7c0-0.6,0.1-1.1,0.2-1.7c0.1-0.4,0.3-0.8,0.6-1.1c0.3-0.3,0.6-0.5,1-0.6c0.9-0.2,1.8-0.2,2.6,0
                    c0.4,0.1,0.7,0.3,1,0.6c0.3,0.3,0.5,0.7,0.6,1.1c0.1,0.6,0.2,1.1,0.2,1.7c0,0.6,0,1.1-0.2,1.7c-0.1,0.4-0.3,0.8-0.6,1.1
                    c-0.3,0.3-0.6,0.5-1,0.6C75.5,94.8,75,94.9,74.6,94.9z M74.6,93.9c0.3,0,0.6,0,0.9-0.1c0.2,0,0.5-0.2,0.6-0.4
                    c0.2-0.2,0.3-0.5,0.3-0.8c0.1-0.4,0.1-0.8,0.1-1.2c0-0.4,0-0.8-0.1-1.2c0-0.3-0.1-0.6-0.3-0.8c-0.2-0.2-0.4-0.3-0.6-0.4
                    c-0.3-0.1-0.6-0.1-0.9-0.1c-0.3,0-0.6,0-0.9,0.1c-0.2,0.1-0.4,0.3-0.6,0.4c-0.1,0.3-0.3,0.5-0.3,0.8c0,0.4-0.1,0.8-0.1,1.2
                    c0,0.4,0,0.8,0.1,1.2c0.1,0.3,0.2,0.6,0.4,0.8c0.1,0.2,0.3,0.3,0.6,0.4C73.9,93.9,74.2,93.9,74.6,93.9z M85.3,85.2v9.5h-0.9
                    l-0.1-1.1c-0.1,0.4-0.4,0.7-0.8,0.9c-0.4,0.3-0.9,0.4-1.4,0.4c-0.5,0-1-0.1-1.4-0.2c-0.3-0.2-0.6-0.4-0.8-0.8
                    c-0.2-0.3-0.4-0.7-0.4-1.1c-0.1-0.5-0.1-1-0.1-1.4c0-0.5,0-0.9,0.1-1.4c0.1-0.4,0.2-0.8,0.4-1.1c0.2-0.3,0.5-0.6,0.8-0.8
                    c0.5-0.2,0.9-0.3,1.4-0.3c0.3,0,0.5,0,0.8,0.1c0.2,0.1,0.4,0.2,0.6,0.3c0.2,0.1,0.3,0.2,0.4,0.4c0.1,0.2,0.2,0.4,0.3,0.6v-3.9
                    L85.3,85.2z M82.1,93.9c0.3,0,0.7,0,1-0.1c0.3-0.1,0.5-0.3,0.7-0.6c0.1-0.3,0.3-0.5,0.3-0.8c0-0.4,0.1-0.7,0.1-1.1
                    c0-0.4,0-0.7-0.1-1.1c-0.1-0.3-0.2-0.6-0.3-0.8c-0.2-0.3-0.4-0.5-0.7-0.6c-0.3-0.1-0.7-0.2-1-0.2c-0.3,0-0.7,0.1-0.9,0.2
                    c-0.2,0.1-0.4,0.3-0.6,0.6c-0.1,0.3-0.2,0.6-0.2,0.9c-0.1,0.3-0.1,0.6-0.1,0.9c0,0.3,0,0.7,0.1,1c0,0.3,0.1,0.6,0.2,0.8
                    c0.1,0.2,0.3,0.4,0.6,0.6C81.5,93.9,81.8,93.9,82.1,93.9z M88.1,86.7c-0.2,0-0.4,0-0.5-0.1c-0.1,0-0.1-0.2-0.1-0.5
                    s0-0.5,0.1-0.5c0.1-0.1,0.3-0.2,0.5-0.1c0.2,0,0.4,0,0.5,0.1c0.1,0,0.1,0.2,0.1,0.5s0,0.4-0.1,0.5
                    C88.4,86.7,88.2,86.7,88.1,86.7L88.1,86.7z M87.5,88h1.1v6.8h-1.1V88z M93.6,87.9c0.4,0,0.9,0,1.3,0.1c0.3,0.1,0.6,0.3,0.8,0.4
                    c0.2,0.2,0.3,0.4,0.4,0.7c0.1,0.3,0.1,0.5,0.1,0.8v4.8h-0.9l-0.2-1c-0.1,0.2-0.2,0.3-0.4,0.4c-0.2,0.2-0.3,0.3-0.6,0.4
                    c-0.2,0.1-0.4,0.2-0.7,0.2c-0.2,0-0.5,0.1-0.8,0.1c-0.6,0.1-1.3-0.1-1.8-0.5c-0.4-0.4-0.5-1-0.5-1.5c0-0.3,0-0.7,0.2-1
                    c0.1-0.3,0.3-0.5,0.5-0.7c0.3-0.2,0.6-0.3,0.9-0.4c0.3-0.1,0.7-0.1,1.1-0.1h2.1v-0.6c0-0.2,0-0.3-0.1-0.5c0-0.2-0.1-0.3-0.2-0.4
                    c-0.1-0.1-0.3-0.2-0.5-0.3c-0.3-0.1-0.5-0.1-0.8-0.1c-0.3,0-0.5,0-0.8,0.1L92,88.9V88l0.8-0.1H93.6z M92.8,94
                    c0.5,0,1-0.1,1.5-0.4c0.4-0.2,0.7-0.5,0.8-0.9v-1.1h-1.9c-0.3,0-0.5,0-0.8,0.1c-0.2,0-0.3,0.1-0.5,0.2c-0.1,0.1-0.2,0.2-0.3,0.4
                    c-0.1,0.2-0.1,0.5-0.1,0.7c0,0.3,0.1,0.6,0.3,0.8C92.1,93.9,92.4,94,92.8,94z M100,94.8c-0.4,0-0.8-0.1-1.1-0.3
                    c-0.3-0.3-0.4-0.7-0.4-1.1v-8.1h1.1v7.9c0,0.3,0.1,0.5,0.2,0.6c0.1,0.1,0.3,0.2,0.4,0.2h0.2c0.1,0,0.2-0.1,0.3-0.1v0.9
                    c-0.1,0-0.2,0.1-0.3,0.1L100,94.8z M101.8,96.3c0.4,0,0.9-0.1,1.2-0.4c0.3-0.3,0.6-0.7,0.7-1.2l-2.7-6.7h1.2l2.1,5.6h0.1
                    l1.9-5.6h1.1l-2.4,6.5c-0.1,0.4-0.3,0.8-0.5,1.2c-0.2,0.3-0.4,0.6-0.6,0.8c-0.2,0.3-0.5,0.5-0.8,0.6c-0.4,0.1-0.8,0.2-1.2,0.2
                    V96.3z M110.2,94.8h-0.6c-0.2,0-0.4,0-0.6-0.1c-0.2,0-0.3,0-0.5-0.1c-0.1,0-0.2-0.1-0.4-0.1v-0.9l0.4,0.1c0.2,0,0.3,0,0.5,0.1
                    c0.2,0,0.4,0.1,0.6,0.1h0.5c0.4,0,0.8,0,1.1-0.2c0.3-0.2,0.5-0.5,0.4-0.8c0-0.2,0-0.3-0.1-0.5c0-0.1-0.1-0.2-0.2-0.3
                    c-0.1-0.1-0.3-0.2-0.4-0.2c-0.3-0.1-0.5-0.2-0.8-0.2c-0.3-0.1-0.6-0.1-0.9-0.2c-0.2-0.1-0.4-0.2-0.6-0.4
                    c-0.1-0.2-0.2-0.4-0.2-0.6c-0.1-0.2-0.1-0.5-0.1-0.8c0-0.5,0.2-1,0.6-1.3c0.5-0.4,1.2-0.5,1.8-0.5c0.3,0,0.6,0,0.9,0.1
                    c0.3,0,0.5,0.1,0.8,0.2l-0.1,0.9c-0.2-0.1-0.5-0.1-0.7-0.2c-0.3,0-0.6-0.1-0.9-0.1c-0.4,0-0.7,0-1.1,0.2
                    c-0.3,0.2-0.4,0.5-0.4,0.8c0,0.1,0,0.3,0.1,0.4c0,0.1,0.1,0.2,0.2,0.3c0.1,0.1,0.3,0.1,0.4,0.2l0.6,0.2c0.3,0.1,0.7,0.2,1,0.3
                    c0.2,0.1,0.4,0.2,0.6,0.4c0.2,0.1,0.3,0.3,0.4,0.6c0.1,0.3,0.1,0.5,0.1,0.8c0,0.6-0.2,1.1-0.7,1.5
                    C111.6,94.7,110.9,94.8,110.2,94.8L110.2,94.8z M115.2,86.8c-0.2,0-0.3,0-0.5-0.1c-0.1,0-0.1-0.2-0.1-0.5s0-0.5,0.1-0.5
                    c0.1-0.1,0.3-0.1,0.5-0.1c0.2,0,0.4,0,0.5,0.1c0.1,0,0.2,0.2,0.2,0.5s-0.1,0.4-0.2,0.5C115.5,86.7,115.4,86.8,115.2,86.8
                    L115.2,86.8z M114.7,88h1.1v6.8h-1.1V88z M119.6,94.8h-0.5c-0.2,0-0.4,0-0.6-0.1c-0.2,0-0.3,0-0.5-0.1c-0.1,0-0.2-0.1-0.4-0.1
                    v-0.9l0.4,0.1c0.2,0,0.4,0,0.6,0.1c0.2,0,0.3,0.1,0.5,0.1h0.5c0.4,0,0.8,0,1.2-0.2c0.3-0.2,0.4-0.5,0.4-0.8c0-0.2,0-0.3-0.1-0.5
                    c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.3-0.2-0.5-0.2c-0.2-0.1-0.5-0.2-0.8-0.2c-0.4-0.1-0.7-0.2-0.9-0.2c-0.2-0.1-0.4-0.2-0.6-0.4
                    c-0.2-0.2-0.3-0.3-0.3-0.6c0-0.2-0.1-0.5-0.1-0.8c0-0.5,0.2-1,0.6-1.3c0.5-0.4,1.2-0.5,1.8-0.5c0.3,0,0.7,0,1,0.1
                    c0.3,0,0.5,0.1,0.8,0.2l-0.1,0.9c-0.2-0.1-0.5-0.2-0.7-0.2c-0.3,0-0.6-0.1-0.9-0.1c-0.4,0-0.7,0-1.1,0.2
                    c-0.3,0.2-0.4,0.5-0.4,0.8c0,0.1,0,0.3,0.1,0.4c0,0.1,0.1,0.2,0.2,0.3c0.1,0.1,0.2,0.2,0.4,0.2l0.6,0.2c0.3,0.1,0.7,0.2,1,0.3
                    c0.3,0.1,0.5,0.2,0.7,0.4c0.2,0.1,0.3,0.3,0.3,0.5c0.1,0.3,0.1,0.5,0.1,0.8c0,0.6-0.2,1.1-0.6,1.5
                    C120.9,94.7,120.2,94.8,119.6,94.8L119.6,94.8z"/>
            </g>
        </g>
    </g>
</g>
</svg>
src/assets/imgs/login/login-background.jpg
src/assets/imgs/login/login-icon-logo.png
src/assets/imgs/login/login-icon-user.png
src/assets/imgs/login/login.jpg
src/assets/logo.png
src/assets/vite.svg
New file
@@ -0,0 +1,15 @@
<svg width="410" height="404" viewBox="0 0 410 404" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z" fill="url(#paint0_linear)"/>
<path d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z" fill="url(#paint1_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="6.00017" y1="32.9999" x2="235" y2="344" gradientUnits="userSpaceOnUse">
<stop stop-color="#41D1FF"/>
<stop offset="1" stop-color="#BD34FE"/>
</linearGradient>
<linearGradient id="paint1_linear" x1="194.651" y1="8.81818" x2="236.076" y2="292.989" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFEA83"/>
<stop offset="0.0833333" stop-color="#FFDD35"/>
<stop offset="1" stop-color="#FFA800"/>
</linearGradient>
</defs>
</svg>
src/assets/vue.png
src/components/HelloWorld.vue
New file
@@ -0,0 +1,59 @@
<script setup lang="ts">
import { ref } from 'vue'
import { ipcRenderer } from 'electron'
const clickBUt=()=>{
  console.log('000')
  count.value++
}
defineProps<{ msg: string }>()
const count = ref(0)
</script>
<template>
  <h1>{{ msg }}</h1>
  <p>
    Recommended IDE setup:
    <a href="https://code.visualstudio.com/" target="_blank">VS Code</a>
    +
    <a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
  </p>
  <p>See <code>README.md</code> for more information.</p>
  <p>
    <a href="https://vitejs.dev/guide/features.html" target="_blank">
      Vite Docs
    </a>
    |
    <a href="https://v3.vuejs.org/" target="_blank">Vue 3 Docs</a>
  </p>
  <el-button type="info" @click="clickBUt">count is: {{ count }}</el-button>
  <p>
    Edit
    <code>components/HelloWorld.vue</code> to test hot module replacement.
  </p>
</template>
<style scoped>
a {
  color: #42b983;
}
label {
  margin: 0 0.5em;
  font-weight: bold;
}
code {
  background-color: #eee;
  padding: 2px 4px;
  border-radius: 4px;
  color: #304455;
}
</style>
src/env.d.ts
New file
@@ -0,0 +1,8 @@
/// <reference types="vite/client" />
declare module '*.vue' {
  import type { DefineComponent } from 'vue'
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
  const component: DefineComponent<{}, {}, any>
  export default component
}
src/global.d.ts
New file
@@ -0,0 +1,12 @@
export { }
declare global {
  interface Window {
    removeLoading: () => void,
    myApi:{},
    myApi2:{fun:()=>string}
  }
}
src/main.ts
New file
@@ -0,0 +1,14 @@
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router/index'
import { createPinia } from 'pinia'
import App from './App.vue'
import './samples/node-api'
createApp(App)
  .use(createPinia())
  .use(ElementPlus)
  .use(router)
  .mount('#app')
  .$nextTick(window.removeLoading)
src/router/index.ts
New file
@@ -0,0 +1,36 @@
import {
    createRouter, createWebHashHistory, RouteRecordRaw,
} from 'vue-router'
import { Session } from '@/utils/storage'
const routes: Array<RouteRecordRaw> = [
    // { path: '/', name: 'Home', component: () => import('@/views/home/index.vue')},
    { path: '/', name: 'test', component: () => import('@/views/home/index.vue')},
    { path: '/test', name: 'Home', component: () => import('@/views/test/index.vue')},
    { path: '/login', name: 'login', component: () => import('@/views/login/index.vue')},
]
const router = createRouter({
    history: createWebHashHistory(),    // history 模式则使用 createWebHistory()
    routes,
})
// 路由加载前
// router.beforeEach(async(to, from, next) => {
//     // console.log(to, 'to')
//     const token = Session.get('token')
//     if (to.path === '/login' && !token) {
//         next()
//     }
//     else {
//         if (!token||to.path === '/login') {
//             console.log('如果toke为空,就定位到登录页')
//             next('/test')
//             Session.clear()
//         } else {
//             next()
//         }
//     }
// })
export default router
src/samples/node-api.ts
New file
@@ -0,0 +1,36 @@
import { lstat } from 'fs/promises'
import { cwd } from 'process'
import { ipcRenderer } from 'electron'
import {creatorClient} from './sockteStomp'
import {sockteStore} from '@/stores/sockteInfo'
import internetAvailable  from "internet-available"
let deviceList=[]
let clientCode=''
// 主进程发送消息到渲染进程
ipcRenderer.on('main-process-message', (_event, ...args) => {
  console.log('[Receive Main-process message]:', ...args)
})
// 重主进程获取配置项
ipcRenderer.on('getConfigData',(_event,...args)=>{
  console.log("config.json",...args)
  if(args.length>0&&args[0].length>0){
    clientCode=args[0]
    deviceList=args[1]
    // 建立sockte 通讯
    creatorClient(deviceList,clientCode)
  }
})
setInterval(function(){
  // 检查网络状态
  internetAvailable({
    domainName: "baidu.com",
    host: '114.114.114.114'
  }).then(()=>{
    console.log('网路已连接')
    sockteStore().setnetLink(true)
  }).catch(()=>{
    sockteStore().setnetLink(false)
    console.log("网路链接失败")
  })
},10000)
src/samples/sockteStomp.ts
New file
@@ -0,0 +1,121 @@
import Stomp from 'stompjs'
var stompClient: Stomp.Client | null=null
import { userInfoStore } from '@/stores/userInfo'
import {sockteStore} from '@/stores/sockteInfo'
interface device{
    deviceName:string
    deviceType:string
}
let devices:Array<device>=[]
let clientCode:string=''
const writeResult=(resultInfo:any)=>{
    if(devices.length>0){
        const deviceInfo=devices.find(de=>{de.deviceName===resultInfo.deviceName})
        if(deviceInfo!==undefined){
            switch(deviceInfo.deviceType){
                case '读卡器':
                    sockteStore().setdkqSockte(
                        {
                            deviceName:resultInfo.deviceName,
                            type:"读卡器",
                            result:resultInfo.result,
                            resultTime:resultInfo.resultTime,
                            state:true
                        }
                    )
                    break
                case "体重秤":
                    sockteStore().setweightSockte(
                        {
                            deviceName:resultInfo.deviceName,
                            type:"体重秤",
                            result:resultInfo.result,
                            resultTime:resultInfo.resultTime,
                            state:true
                        }
                    )
                    break
                case "血压计":
                    sockteStore().setxyjSockte(
                        {
                            deviceName:resultInfo.deviceName,
                            type:"血压计",
                            result:resultInfo.result,
                            resultTime:resultInfo.resultTime,
                            state:true
                        }
                    )
                    break
                default:
                    console.log('有配置类型没有匹配')
            }
        }
    }
}
// 订阅结果事件返回函数
const  callback = function(message:any) {
    if (message.body) {
        const data=JSON.parse(message.body)
    if(data.deviceName)
        console.log(data,'接收到的数据')
        writeResult(data)
    } else {
        alert("接收数据异常");
    }
};
const callbackState=function(message:any){
    if (message.body) {
        const data=JSON.parse(message.body)
    if(data.deviceName)
        console.log(data,'设备心跳包数据')
        writeResult(data)
    } else {
        alert("接收数据异常");
    }
}
const connectCallback=function(){
    console.log("链接成功",stompClient)
    // 更新sockte链接状态
    sockteStore().setsockteIsLink(true)
    console.log(sockteStore().isLink)
    if(stompClient!==null){
        if(devices.length>0){
            devices.forEach(de=>{
                stompClient.subscribe(`/queue/${clientCode}/${de.deviceName}/result`,callback)
                stompClient.send(`/app/device/request/${clientCode}/${de.deviceName}`, {}, JSON.stringify({"deviceNumber":de.deviceName}));
            })
        }
    }
}
const error_callback=function(error:any){
    console.log('链接错误',error);
    setTimeout(()=>{
        console.log('10秒之后重连')
        console.log(devices,'设备列表')
        const socket = new WebSocket('ws://hemobs.icoldchain.cn/broadcast')
        stompClient = Stomp.over(socket)
        stompClient.connect({}, connectCallback,error_callback)
    },10000)
}
// 创建客户端链接
const creatorClient=(devices2:any,clientCode2:any)=>{
    devices=devices2
    clientCode=clientCode2
    console.log(devices,'设备列表')
    const socket = new WebSocket('ws://hemobs.icoldchain.cn/broadcast')
    stompClient = Stomp.over(socket)
    stompClient.connect({}, connectCallback,error_callback)
}
export {creatorClient}
src/stores/meun.ts
New file
@@ -0,0 +1,64 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { Session } from '@/utils/storage'
export const meunStore =defineStore('meun',()=>{
    const meunIndex=ref(0)// 初始值
    const meunPath=ref('/scheme')
    const meuns=ref([
        {
            'value': 0,
            'text': '透析处方',
            'path': '/scheme'
        },
        {
            'value': 1,
            'text': '透前评估',
            'path': '/pingguBefore'
        },
        {
            'value': 2,
            'text': '双人核对',
            'path': '/douleCheck'
        },
        {
            'value': 3,
            'text': '监测记录',
            'path': '/monitorData'
        },
        {
            'value': 4,
            'text': '耗材出库',
            'path': '/checkOut'
        },
        {
            'value': 5,
            'text': '医嘱信息',
            'path': '/drugOrder'
        },
        {
            'value': 6,
            'text': '透后评估',
            'path': '/bodyStateAfter'
        },
        {
            'value': 7,
            'text': '治疗小结',
            'path': '/zlxj'
        },
        {
            'value': 8,
            'text': '患者信息',
            'path': '/patientInfo'
        }
    ])
    function setMeunIndex(index:number){
        console.log('设置菜单下标'+index)
        meunIndex.value=index
        meunPath.value=meuns.value[index].path
    }
    function setMeuns(Meuns:any){
        meuns.value=Meuns
    }
    return {meunIndex,meunPath,setMeunIndex,setMeuns,meuns}
})
src/stores/patient.ts
New file
@@ -0,0 +1,12 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { Session } from '@/utils/storage'
export const patientInfoStore =defineStore('patientInfo',()=>{
    const patientInfo=ref({id:0,code:'',patientCode:'',schemeName:'',scheduleDate:'',patientPreHemoWeight:0,pureWeight:0,confirmUserInfo:{userName:''},patientInfo:{patientName:'',patientGender:0,age:'',patientHemoCode:''},deviceInfo:{deviceNo:''}})// 初始值
    function setpatientInfo(patient:any){
        patientInfo.value=patient
        Session.set('patientInfo', patient)
    }
    return {patientInfo,setpatientInfo}
})
src/stores/sockteInfo.ts
New file
@@ -0,0 +1,80 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { Session } from '@/utils/storage'
import { boolean, string } from 'yargs'
interface info {
    type:string;
    deviceName:string;
    result:string;
    resultTime:string;
    state:boolean;
}
let weightInfo:info={
    type:"体重秤",
    state:false,
    deviceName:"",
    result:"",
    resultTime:""
}
let xyjInfo:info={
    type:"血压计",
    state:false,
    deviceName:"",
    result:"",
    resultTime:""
}
let dkqInfo:info={
    type:"读卡器",
    state:false,
    deviceName:"",
    result:"",
    resultTime:""
}
export const sockteStore =defineStore('sockteInfo',()=>{
    const isLink=ref(false) // sockte 链接状态
    const netLink=ref(false) // 网络链接状态
    const weightSockte=weightInfo // 体重秤sockte结果
    const xyjSockte=xyjInfo // 血压计sockte结果
    const dkqSockte=dkqInfo // 读卡器sockte结果
    // 更新连接状态
    function setsockteIsLink(Link:boolean){
        isLink.value=Link
    }
    // 更新连接状态
    function setnetLink(Link:boolean){
        netLink.value=Link
    }
    /**
     * 更新体重秤结果
     * @param roleText 体重结果
     */
    function setweightSockte(info:info){
        weightSockte.deviceName=info.deviceName
        weightSockte.result=info.result
        weightSockte.resultTime=info.resultTime
        weightSockte.state=info.state
    }
      /**
     * 更新血压计结果
     * @param roleText 体重结果
     */
    function setxyjSockte(info:info){
        xyjSockte.deviceName=info.deviceName
        xyjSockte.result=info.result
        xyjSockte.resultTime=info.resultTime
        xyjSockte.state=info.state
    }
      /**
     * 更新血压计结果
     * @param roleText 体重结果
     */
    function setdkqSockte(info:info){
        dkqSockte.deviceName=info.deviceName
        dkqSockte.result=info.result
        dkqSockte.resultTime=info.resultTime
        dkqSockte.state=info.state
    }
    return {isLink,netLink,weightSockte,xyjSockte,dkqSockte,setsockteIsLink,setnetLink,setweightSockte,setxyjSockte,setdkqSockte}
})
src/stores/userInfo.ts
New file
@@ -0,0 +1,47 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { Session } from '@/utils/storage'
export const userInfoStore =defineStore('userInfo',()=>{
    const userInfo=ref({
        id:0,
        userAvatar:'',
        userName:'',
        role:'医生',
        userNo:'',
        userMobile:'',
        userSignPicUrl:'',
        roles:[
            {
                code: '',
                id: 0,
                roleName: '',
                rolePermission: '',
                roleText: '',
            }
        ],
        currentClientInfo:{code:''}})// 初始值
    function setUserInfo(user:any){
        console.log(Session.get('role'),'获取零时的角色')
        const roleName=Session.get('role')===null?'护士':Session.get('role')
        userInfo.value={
            id:user.id,
            userName:user.userName,
            role:roleName,
            userNo:user.userNo,
            userMobile:user.userMobile,
            userSignPicUrl:user.userSignPicUrl,
            roles:user.roles,
            userAvatar:user.userAvatar,
            currentClientInfo:user.currentClientInfo
        }
    }
    /**
     * 更新用户选择角色
     * @param roleText 角色名称
     */
    function setRoleInfo(roleText:any){
        Session.set('role',roleText)
        userInfo.value.role=roleText
    }
    return {userInfo,setUserInfo,setRoleInfo}
})
src/utils/axios.ts
New file
@@ -0,0 +1,74 @@
import axios, {AxiosError, AxiosResponse} from 'axios'
import { Session } from '@/utils/storage'
import { ElMessage } from 'element-plus'
const BASE_URL = 'https://hemobs.icoldchain.cn'
const TIME_OUT = 10 * 1000
/**
 * 创建axios实例
 */
const instance = axios.create({
    baseURL: BASE_URL,
    timeout: TIME_OUT
})
const errorHandle = (status: number, error:any): void => {
    // HTTP状态码判断
    switch (status) {
        case 401:
            return alert(`Error Code: ${status}, Message: ${error.msg || '登录失效,请重新登录'}`)
        case 403:
            return alert(`Error Code: ${status}, Message: ${error.msg || '你没有访问权限'}`)
        case 500:
            return alert(`Error Code: ${status}, Message: ${error.msg || '后台错误,请联系管理员'}`)
        case 502:
            return alert(`Error Code: ${status}, Message: ${error.msg || '平台环境异常'}`)
        default:
            alert(`Error Code: ${status}, Message: ${error.msg || '未知错误,请刷新重试'}`)
    }
}
// 前置拦截器(发起请求之前的拦截)
instance.interceptors.request.use(
    (response:any) =>{
        if (Session.get('token')) {
            response.headers.common['Authorization'] = 'Bearer '+ `${Session.get('token')}`
        }
        return response
    },
    (error) => Promise.reject(error)
)
// 后置拦截器(获取到响应时的拦截)
instance.interceptors.response.use(
    (res: AxiosResponse) => {
        if (String(res.status).indexOf('2') !== 0) {
            return {
                code: res.status,
                message: res.data.message || '请求异常,请刷新重试',
                result: false
            }
        }
        if (res.data.code===200){
            return res.data
        }
        else {
            ElMessage.error(res.data.message)
            return Promise.reject(instance.interceptors.response)
        }
    },
    (error: AxiosError) => {
        if (error && error.response) {
            // 请求已发出,但是不在2xx的范围
            errorHandle(error.response.status, error.response)
            return Promise.reject(error.response)
        }
        console.log('网络请求失败, 请刷新重试')
        return Promise.reject(error)
    }
)
export default instance
src/utils/formatTime.ts
New file
@@ -0,0 +1,213 @@
/**
 * 时间日期转换
 * @param date 当前时间,new Date() 格式
 * @param format 需要转换的时间格式字符串
 * @description format 字符串随意,如 `YYYY-mm、YYYY-mm-dd`
 * @description format 季度:"YYYY-mm-dd HH:MM:SS QQQQ"
 * @description format 星期:"YYYY-mm-dd HH:MM:SS WWW"
 * @description format 几周:"YYYY-mm-dd HH:MM:SS ZZZ"
 * @description format 季度 + 星期 + 几周:"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ"
 * @returns 返回拼接后的时间字符串
 */
export function formatDate(date: Date, format: string): string {
    const we = date.getDay() // 星期
    const z = getWeek(date) // 周
    const qut = Math.floor((date.getMonth() + 3) / 3).toString() // 季度
    const opt: { [key: string]: string } = {
        'Y+': date.getFullYear().toString(), // 年
        'm+': (date.getMonth() + 1).toString(), // 月(月份从0开始,要+1)
        'd+': date.getDate().toString(), // 日
        'H+': date.getHours().toString(), // 时
        'M+': date.getMinutes().toString(), // 分
        'S+': date.getSeconds().toString(), // 秒
        'q+': qut, // 季度
    }
    // 中文数字 (星期)
    const week: { [key: string]: string } = {
        '0': '日',
        '1': '一',
        '2': '二',
        '3': '三',
        '4': '四',
        '5': '五',
        '6': '六',
    }
    // 中文数字(季度)
    const quarter: { [key: string]: string } = {
        '1': '一',
        '2': '二',
        '3': '三',
        '4': '四',
    }
    if (/(W+)/.test(format))
        format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? '星期' + week[we] : '周' + week[we]) : week[we])
    if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length === 4 ? '第' + quarter[qut] + '季度' : quarter[qut])
    if (/(Z+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length === 3 ? '第' + z + '周' : z + '')
    for (const k in opt) {
        const r = new RegExp('(' + k + ')').exec(format)
        // 若输入的长度不为1,则前面补零
        if (r) format = format.replace(r[1], RegExp.$1.length === 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0'))
    }
    return format
}
/**
 * 获取当前日期是第几周
 * @param dateTime 当前传入的日期值
 * @returns 返回第几周数字值
 */
export function getWeek(dateTime: Date): number {
    const temptTime = new Date(dateTime.getTime())
    // 周几
    const weekday = temptTime.getDay() || 7
    // 周1+5天=周六
    temptTime.setDate(temptTime.getDate() - weekday + 1 + 5)
    let firstDay = new Date(temptTime.getFullYear(), 0, 1)
    const dayOfWeek = firstDay.getDay()
    let spendDay = 1
    if (dayOfWeek !== 0) spendDay = 7 - dayOfWeek + 1
    firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay)
    const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000)
    const result = Math.ceil(d / 7)
    return result
}
export function getWeekDatas(week:number){
    const datas=[]
    const todey=new Date()
    const dqweek=getWeek(todey)
    if (week<dqweek){
        todey.setTime(todey.getTime()-3600 * 1000 * 24 * 7 * (dqweek-week))
    }
    else if (week>dqweek){
        todey.setTime(todey.getTime()+3600 * 1000 * 24 * 7 * (week-dqweek))
    }
    const num= todey.getDay()
    if (num>0){
        for (let i=0;i<8;i++){
            if (i===num){
                datas.push(formatDate(todey,'YYYY-mm-dd  WWW'))
            } else if (i<num){
                const start = new Date(todey)
                start.setTime(start.getTime() - 3600 * 1000 * 24 * (num-i))
                datas.push(formatDate(start,'YYYY-mm-dd  WWW'))
            } else if (i>num){
                const start2 = new Date(todey)
                start2.setTime(start2.getTime() + 3600 * 1000 * 24 * (i-num))
                datas.push(formatDate(start2,'YYYY-mm-dd  WWW'))
            }
        }
        datas.splice(0,1)// 删除第一个
        return datas
    }
    else {
        for (let x=6;x>=0;x--){
            const start = new Date(todey)
            start.setTime(start.getTime() - 3600 * 1000 * 24 * (x))
            datas.push(formatDate(start,'YYYY-mm-dd  WWW'))
        }
        return datas
    }
}
/**
 *
 * @param param 获取周列表
 * @param format  当前周
 * @returns
 */
export function getgetWeeks(){
    // eslint-disable-next-line no-var
    for (let x=7;x>0;x--){
        const start2 = new Date()
        start2.setTime(start2.getTime() + 3600 * 1000 * 24 * (x*7))
        const weeks=formatDate(start2,'YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ')
        console.log(weeks)
    }
    for (let x=0;x<7;x++){
        const start2 = new Date()
        start2.setTime(start2.getTime() - 3600 * 1000 * 24 * (x*7))
        const weeks=formatDate(start2,'YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ')
        console.log(weeks)
    }
    // console.log(week)
}
/**
 * 将时间转换为 `几秒前`、`几分钟前`、`几小时前`、`几天前`
 * @param param 当前时间,new Date() 格式或者字符串时间格式
 * @param format 需要转换的时间格式字符串
 * @description param 10秒:  10 * 1000
 * @description param 1分:   60 * 1000
 * @description param 1小时: 60 * 60 * 1000
 * @description param 24小时:60 * 60 * 24 * 1000
 * @description param 3天:   60 * 60* 24 * 1000 * 3
 * @returns 返回拼接后的时间字符串
 */
export function formatPast(param: string | Date, format = 'YYYY-mm-dd'): string {
    // 传入格式处理、存储转换值
    let t: any, s: number
    // 获取js 时间戳
    let time: number = new Date().getTime()
    // 是否是对象
    typeof param === 'string' || 'object' ? (t = new Date(param).getTime()) : (t = param)
    // 当前时间戳 - 传入时间戳
    time = Number.parseInt(`${time - t}`)
    if (time < 10000) {
        // 10秒内
        return '刚刚'
    } else if (time < 60000 && time >= 10000) {
        // 超过10秒少于1分钟内
        s = Math.floor(time / 1000)
        return `${s}秒前`
    } else if (time < 3600000 && time >= 60000) {
        // 超过1分钟少于1小时
        s = Math.floor(time / 60000)
        return `${s}分钟前`
    } else if (time < 86400000 && time >= 3600000) {
        // 超过1小时少于24小时
        s = Math.floor(time / 3600000)
        return `${s}小时前`
    } else if (time < 259200000 && time >= 86400000) {
        // 超过1天少于3天内
        s = Math.floor(time / 86400000)
        return `${s}天前`
    } else {
        // 超过3天
        const date = typeof param === 'string' || 'object' ? new Date(param) : param
        return formatDate(date, format)
    }
}
/**
 * 时间问候语
 * @param param 当前时间,new Date() 格式
 * @description param 调用 `formatAxis(new Date())` 输出 `上午好`
 * @returns 返回拼接后的时间字符串
 */
export function formatAxis(param: Date): string {
    const hour: number = new Date(param).getHours()
    if (hour < 6) return '凌晨好'
    else if (hour < 9) return '早上好'
    else if (hour < 12) return '上午好'
    else if (hour < 14) return '中午好'
    else if (hour < 17) return '下午好'
    else if (hour < 19) return '傍晚好'
    else if (hour < 22) return '晚上好'
    else return '夜里好'
}
// 计算日期之间的月数
export function datemonth(date1:string,date2:string){
    // 拆分年月日
    const date11 = date1.split('-')
    // 得到月数
    // date1 = parseInt(date1[0]) * 12 + parseInt(date1[1]);
    // 拆分年月日
    const date22 = date2.split('-')
    // 得到月数
    // date2 = parseInt(date2[0]) * 12 + parseInt(date2[1]);
    const m = Math.abs(parseInt(date11[0]) - parseInt(date22[0]))
    const y=Math.abs(parseInt(date1[11]) - parseInt(date2[12]))
    return m+'年'+y+'月'
}
src/utils/meuns.ts
New file
@@ -0,0 +1,16 @@
const meuns=[
    {text:'透析处方',path:'/scheme',roles:['医生','护士']},
    {text:'透前评估',path:'/pingguBefore',roles:['护士']},
    {text:'双人核对',path:'/douleCheck',roles:['护士']},
    {text:'监测记录',path:'/monitorData',roles:['护士']},
    {text:'耗材出库',path:'/checkOut',roles:['护士']},
    {text:'医嘱信息',path:'/drugOrder',roles:['医生','护士']},
    {text:'透后评估',path:'/bodyStateAfter',roles:['护士']},
    {text:'治疗小结',path:'/zlxj',roles:['护士']},
    {text:'患者信息',path:'/patientInfo',roles:['医生','护士']},
    {text:'病程记录',path:'/progressNote',roles:['医生']},
    {text:'血管通路',path:'/vascularAccess',roles:['医生']},
    {text:'文书管理',path:'/wenshuguanli',roles:['医生']},
    {text:'检验检查',path:'/inspection',roles:['医生']}
]
export default meuns
src/utils/storage.ts
New file
@@ -0,0 +1,53 @@
/**
 * window.localStorage 浏览器永久缓存
 * @method set 设置永久缓存
 * @method get 获取永久缓存
 * @method remove 移除永久缓存
 * @method clear 移除全部永久缓存
 */
export const Local = {
    // 设置永久缓存
    set(key: string, val: any) {
        window.localStorage.setItem(key, JSON.stringify(val))
    },
    // 获取永久缓存
    get(key: string) {
        const json: any = window.localStorage.getItem(key)
        return JSON.parse(json)
    },
    // 移除永久缓存
    remove(key: string) {
        window.localStorage.removeItem(key)
    },
    // 移除全部永久缓存
    clear() {
        window.localStorage.clear()
    },
}
/**
 * window.sessionStorage 浏览器临时缓存
 * @method set 设置临时缓存
 * @method get 获取临时缓存
 * @method remove 移除临时缓存
 * @method clear 移除全部临时缓存
 */
export const Session = {
    // 设置临时缓存
    set(key: string, val: any) {
        window.sessionStorage.setItem(key, JSON.stringify(val))
    },
    // 获取临时缓存
    get(key: string) {
        const json: any = window.sessionStorage.getItem(key)
        return JSON.parse(json)
    },
    // 移除临时缓存
    remove(key: string) {
        window.sessionStorage.removeItem(key)
    },
    // 移除全部临时缓存
    clear() {
        window.sessionStorage.clear()
    },
}
src/views/home/index.vue
New file
@@ -0,0 +1,140 @@
<script lang="ts">
import { userInfoStore } from '@/stores/userInfo'
import { sockteStore } from '@/stores/sockteInfo'
import { ipcRenderer } from 'electron'
import { reactive,computed, toRefs } from "vue"
 export default {
        setup() {
            const user = userInfoStore()
            const sockte= sockteStore()
            const isLink= computed(()=>{
                return sockte.isLink
            })
            const netLink= computed(()=>{
                return sockte.netLink
            })
            const state=reactive({
            })
            const ubtCilert=()=>{
                console.log('ss')
                // console.log(user.userInfo)
                // console.log(sockteStore().isLink)
                // ipcRenderer.send('main-process-message2', { 'param1': "hello" });
                // console.log(window.myApi.fun('陈银城'))
            }
            return{ ...toRefs(state), ubtCilert,isLink,netLink
            }
        }
    }
</script>
<template>
    <div class="home">
        <!-- <el-button @click="ubtCilert">
            test
        </el-button> -->
        <el-row>
            <el-col :span="12">
                <div class="tale">
                    <img class="imgss" alt="Vue logo" src="@/assets/logo.png" />
                </div>
            </el-col>
            <el-col :span="12">
                <div> sockte连接状态{{isLink}}</div>
                <div> 网络连接状态{{netLink}}</div>
            </el-col>
        </el-row>
        <div class="grid-container">
            <div class="grid-item">
                <el-avatar
                    shape="square"
                    :size="100"
                    fit="cover"
                    src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
                />
                <div class="zsf">张三丰</div>
            </div>
            <div class="grid-item">
                <div class="lableText">当前时间:</div>
                <div class="conText">2022-06-21 14:10</div>
            </div>
            <div class="grid-item">
                <div class="lableText">当前时间:</div>
                <div class="conText">2022-06-21 14:10</div>
            </div>
            <div class="grid-item">
                <div class="lableText">机号:</div>
                <div class="conText">001</div>
            </div>
            <div class="grid-item">
                <div class="lableText">序号:</div>
                <div class="conText">10</div>
            </div>
            <div class="grid-item">
                <div class="lableText">干体重(kg):</div>
                <div class="conText">88</div>
            </div>
            <div class="grid-item">
                <div class="lableText">透前称重(kg):</div>
                <div class="conText">90</div>
            </div>
            <div class="grid-item">
                <div class="lableText">目标脱水量:</div>
                <div class="conText">2</div>
            </div>
            <div class="grid-item">
                <div class="lableText">血压:</div>
                <div class="conText">140/90</div>
            </div>
        </div>
    </div>
</template>
<style>
body {
    background: #f3f7fb;
}
.coldev {
    height: 200px;
    background: #ffff;
}
.grid-container {
    display: grid;
    grid-template-columns: 33% 33% 33%;
    grid-gap: 20px;
    background: #f3f7fb;
    padding: 10px;
}
.grid-container > div {
    background: #ffffff;
    height: 150px;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
}
.lableText {
    text-align: left;
    /* height: 50px; */
    /* line-height: 50px; */
    padding-top: 30px;
    font-size: 13pt;
}
.conText {
    height: 50px;
    line-height: 50px;
    padding-top: 30px;
    color: #769aff;
    font-size: 20pt;
}
.imgss {
    height: 30px;
}
.tale {
    height: 30px;
    line-height: 50px;
    /* text-align: center; */
}
.zsf {
    font-size: 18pt;
    margin-top: 15pt;
    color: #769aff;
}
</style>
src/views/login/component/account.vue
New file
@@ -0,0 +1,169 @@
<template>
    <el-form class="login-content-form" ref="ruleFormRef">
        <el-form-item class="form-input">
            <el-input type="text" placeholder="请输入用户名" :prefix-icon="Avatar" v-model="ruleForm.userName" clearable autocomplete="off">
            </el-input>
        </el-form-item>
        <el-form-item class="form-input form-item-bottom">
            <el-input
                :type="isShowPassword ? 'text' : 'password'"
                placeholder="请输入密码"
                v-model="ruleForm.password"
                autocomplete="off"
                :prefix-icon="GoodsFilled"
            >
            </el-input>
        </el-form-item>
        <el-form-item>
            <div class="login-footer">
                <div>
                    <span style="vertical-align: middle;margin-right:10px">
                        <el-checkbox v-model="rememberPassword"></el-checkbox>
                    </span>
                    <span>自动登录</span>
                </div>
            </div>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" class="login-content-submit" round @click="onSignIn" :loading="loading.signIn">
                <span>立即登录</span>
            </el-button>
        </el-form-item>
    </el-form>
</template>
<script lang="ts">
import { toRefs, reactive, defineComponent, computed, getCurrentInstance } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { Session } from '@/utils/storage'
import { Avatar, GoodsFilled } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus';
import {signIn,getuserinfo} from '@/api/user/index';
export default defineComponent({
    name: 'loginAccount',
    setup() {
        const { proxy } = getCurrentInstance() as any;
        const route = useRoute();
        const router = useRouter();
        const state = reactive({
            isShowClients2:false,
            // 记住密码
            rememberPassword: false,
            isShowClients:false,
            isShowPassword: false,
            user:{},
            clientCode:'',
            CilentOptions:[],
            ruleForm: {
                userName: '',
                password: '',
                code: '1234',
            },
            seconds:60,
            loading: {
                signIn: false,
            },
        });
        // 登录
        const onSignIn = async () => {
            state.loading.signIn = true;
            if(state.ruleForm.userName===""||state.ruleForm.password===""){
                ElMessage.error('登录名和密码不能为空')
                state.loading.signIn = false;
                return
            }
            const signInRes = await signIn(`user_no=${state.ruleForm.userName}&user_password=${state.ruleForm.password}`)
            // 缓存token游览器
            Session.set('token', signInRes.data);
            const userinfoRes = await getuserinfo()
            const userRet=userinfoRes.data
            // 模拟数据
            state.loading.signIn = false;
            // 跳转到首页
            router.push('/');
        };
        return {
            onSignIn,
            GoodsFilled,
            Avatar,
            ...toRefs(state),
        };
    },
});
</script>
<style scoped lang="scss">
.el-input__icon {
    color: rgb(32, 80, 240);
}
.login-content-form {
    margin-top: 20px;
    .login-footer {
        display: flex;
        justify-content: space-between;
        font-weight: 400;
        color: #AAAAAA;
    }
    .login-content-password {
        display: inline-block;
        width: 25px;
        cursor: pointer;
        &:hover {
            color: #909399;
        }
    }
    .form-input {
        ::v-deep .el-input__inner {
            border: none !important;
            border-bottom: 1px solid #EBEBEB !important;
            padding: 0 50px;
            font-weight: 500;
        }
    }
    ::v-deep .form-item-bottom.el-form-item {
        margin-bottom: 0 !important;
    }
    .login-content-code {
        display: flex;
        align-items: center;
        justify-content: space-around;
        .login-content-code-img {
            width: 100%;
            height: 40px;
            line-height: 40px;
            background-color: #ffffff;
            border: 1px solid rgb(220, 223, 230);
            color: #333;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 5px;
            text-indent: 5px;
            text-align: center;
            cursor: pointer;
            transition: all ease 0.2s;
            border-radius: 4px;
            user-select: none;
            &:hover {
                border-color: #c0c4cc;
                transition: all ease 0.2s;
            }
        }
    }
    .login-content-submit {
        width: 100%;
        letter-spacing: 2px;
        margin-top: 15px;
        font-weight: 500;
        color: #FFFFFF;
    }
}
</style>
src/views/login/index.vue
New file
@@ -0,0 +1,200 @@
<template>
    <div class="login-container">
        <div class="login-logo">
            <span>岱特智能科技</span>
        </div>
        <div class="login-content" :class="{ 'login-content-mobile': tabsActiveName === 'mobile' }">
            <el-row :gutter="0">
                <el-col :xs="0" :sm="12" :md="12" :lg="12" :xl="12">
                    <div class="login-content-image">
                        <div></div>
                    </div>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <div class="login-content-main">
                        <div class="login-content-title">
                            <div class="login-content-logo"></div>
                            <div class="login-title">胜透血液透析管理平台</div>
                            <div class="login-welcome">WELCOME欢迎登陆</div>
                        </div>
                        <div>
                            <Account />
                        </div>
                    </div>
                </el-col>
            </el-row>
        </div>
        <div class="login-copyright">
            <div class="mb5 login-copyright-company"></div>
            <div class="login-copyright-msg"></div>
        </div>
    </div>
</template>
<script lang="ts">
import { toRefs, reactive, computed } from 'vue';
import Account from '@/views/login/component/account.vue';
export default {
    name: 'loginIndex',
    components: { Account },
    setup() {
        const state = reactive({
            tabsActiveName: 'account',
            isTabPaneShow: true,
            isScan: false,
        });
        return {
            ...toRefs(state),
        };
    },
};
</script>
<style scoped lang="scss">
.login-container {
    width: 100%;
    height: 100%;
    background: url('@/assets/imgs/login/login-background.jpg') no-repeat;
    background-size: 100% 100%;
    .login-logo {
        position: absolute;
        top: 30px;
        left: 50%;
        height: 50px;
        display: flex;
        align-items: center;
        font-size: 20px;
        color: var(--color-primary);
        letter-spacing: 2px;
        width: 90%;
        transform: translateX(-50%);
    }
    .login-content {
        width: 848px;
        // padding: 20px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) translate3d(0, 0, 0);
        background-color: rgba(255, 255, 255, 0.99);
        // border: 5px solid var(--color-primary-light-8);
        border-radius: 10px;
        transition: height 0.2s linear;
        // height: 480px;
        overflow: hidden;
        z-index: 1;
        .login-content-image {
            padding: 40px 20px;
            width: 100%;
            height: 100%;
            background-color: #F1F7FF
        }
        .login-content-image div {
            width: 100%;
            height: 100%;
            background: url('@/assets/imgs/login/login.jpg') no-repeat;
            background-size: 100% 100%;
        }
        .login-content-main {
            margin: 75px 50px;
            // margin: 0 auto;
            // width: 80%;
            .login-content-title {
                color: #333;
                font-weight: 500;
            font-size: 22px;
                text-align: left;
                // letter-spacing: 4px;
                // margin: 15px 0 30px;
                white-space: nowrap;
                z-index: 5;
                // position: relative;
                // transition: all 0.3s ease;
                .login-content-logo {
                    text-align: left;
                    width: 40px;
                    height: 30px;
                    background: url('@/assets/imgs/login/favicon.svg') no-repeat;
                    display: inline-block;
                    vertical-align: middle;
                }
                .login-title {
                    display: inline-block;
                    width: 224px;
                    height: 30px;
                    font-size: 21px;
                    font-family: PingFangSC-Medium, PingFang SC;
                    font-weight: 500;
                    color: #232426;
                    line-height: 30px;
                    letter-spacing: 1px;
                    vertical-align: middle;
                }
                .login-welcome {
                    width: 149px;
                    height: 20px;
                    font-size: 14px;
                    font-family: PingFangSC-Medium, PingFang SC;
                    font-weight: 500;
                    color: #AAAAAA;
                    line-height: 20px;
                }
            }
        }
        .login-content-main-sacn {
            // position: absolute;
            // top: 0;
            // right: 0;
            // width: 50px;
            // height: 50px;
            overflow: hidden;
            cursor: pointer;
            transition: all ease 0.3s;
            &-delta {
                position: absolute;
                width: 35px;
                height: 70px;
                z-index: 2;
                top: 2px;
                right: 21px;
                background: var(--el-color-white);
                transform: rotate(-45deg);
            }
            &:hover {
                opacity: 1;
                transition: all ease 0.3s;
                color: var(--color-primary);
            }
            i {
                width: 47px;
                height: 50px;
                display: inline-block;
                font-size: 48px;
                position: absolute;
                right: 2px;
                top: -1px;
            }
        }
    }
    .login-content-mobile {
        height: 418px;
    }
    .login-copyright {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 30px;
        text-align: center;
        color: var(--color-whites);
        font-size: 12px;
        opacity: 0.8;
        .login-copyright-company {
            white-space: nowrap;
        }
        .login-copyright-msg {
            @extend .login-copyright-company;
        }
    }
}
</style>
src/views/test/index.vue
New file
@@ -0,0 +1,106 @@
<script lang="ts">
import { userInfoStore } from '@/stores/userInfo'
import Stomp from 'stompjs'
import { ipcRenderer } from 'electron'
 export default {
        setup() {
            const user = userInfoStore()
            var stompClient: Stomp.Client | null=null
            console.log(user.userInfo)
            const  callback = function(message:any) {
                if (message.body) {
                console.log(message.body,'接收到的数据')
                } else {
                alert("接收数据异常");
                }
            };
            const connectCallback=function(){
                console.log("链接成功")
                if(stompClient!==null){
                    stompClient.subscribe('/queue/12345/67890/keepalive',callback)
                    stompClient.send("/app/device/keepalive/12345/67890", {}, JSON.stringify({"deviceNumber":"testfsfd"}));
                }
            }
            const error_callback=function(error:any){
                console.log('链接错误',error);
                setTimeout(()=>{
                    console.log('10秒之后重连')
                   ubtCilert()
                },10000)
            }
            const ubtCilert=()=>{
                 console.log('ss')
                 ipcRenderer.send('msg_renderer_to_main', { 'param1': "hello" });
                // const socket = new WebSocket('ws://hemobs.icoldchain.cn/broadcast')
                // stompClient = Stomp.over(socket)
                // stompClient.connect({}, connectCallback,error_callback)
               }
            return{
                ubtCilert
            }
        },
}
</script>
<template>
    <div class="home">
        <el-button @click="ubtCilert">
            test
        </el-button>
    </div>
</template>
<style>
body {
    background: #f3f7fb;
}
.coldev {
    height: 200px;
    background: #ffff;
}
.grid-container {
    display: grid;
    grid-template-columns: 33% 33% 33%;
    grid-gap: 20px;
    background: #f3f7fb;
    padding: 10px;
}
.grid-container > div {
    background: #ffffff;
    height: 150px;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
}
.lableText {
    text-align: left;
    /* height: 50px; */
    /* line-height: 50px; */
    padding-top: 30px;
    font-size: 13pt;
}
.conText {
    height: 50px;
    line-height: 50px;
    padding-top: 30px;
    color: #769aff;
    font-size: 20pt;
}
.imgss {
    height: 30px;
}
.tale {
    height: 30px;
    line-height: 50px;
    /* text-align: center; */
}
.zsf {
    font-size: 18pt;
    margin-top: 15pt;
    color: #769aff;
}
</style>
tsconfig.json
New file
@@ -0,0 +1,25 @@
{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "node",
    "importHelpers": true,
    "jsx": "preserve",
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "sourceMap": true,
    "strict": true,
    "allowSyntheticDefaultImports": true,
    "skipLibCheck": true,
    "baseUrl": "./",//。所有非相对模块导入都会被当做相对于 baseUrl。
    "paths": {
      "@/*": ["src/*"],
      "views/*": ["src/views/*"],
      "components/*": ["src/components/*"],
      "assets/*": ["src/assets/*"]
    },
  },
  "references": [
    { "path": "./tsconfig.node.json" }
  ]
}
tsconfig.node.json
New file
@@ -0,0 +1,8 @@
{
  "compilerOptions": {
    "composite": true,
    "module": "ESNext",
    "moduleResolution": "Node"
  },
  "include": ["vite.config.ts"]
}
types.d.ts
New file
@@ -0,0 +1,8 @@
declare namespace NodeJS {
  interface ProcessEnv {
    NODE_ENV: 'development' | 'production'
    readonly VITE_DEV_SERVER_HOST: string
    readonly VITE_DEV_SERVER_PORT: string
  }
}
vite.config.ts
New file
@@ -0,0 +1,52 @@
import { rmSync } from 'fs'
import { join } from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
import electron from 'vite-plugin-electron'
import renderer from 'vite-plugin-electron/renderer'
rmSync('dist', { recursive: true, force: true }) // v14.14.0
const pathResolve = (dir: string) => resolve(__dirname, dir)
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    electron({
      main: {
        entry: 'electron/main/index.ts',
        vite: {
          build: {
            sourcemap: false,
            outDir: 'dist/electron/main',
          },
        },
      },
      preload: {
        input: {
          // You can configure multiple preload here
          splash: join(__dirname, 'electron/preload/splash.ts'),
        },
        vite: {
          build: {
            // For debug
            sourcemap: 'inline',
            outDir: 'dist/electron/preload',
          }
        }
      },
    }),
    // Enable use Electron, Node.js API in Renderer-process
    renderer(),
  ],
  base:'./',
  resolve:{
    alias: {
        '@': pathResolve('./src'),  // 设置 `@` 指向 `src` 目录
        views: pathResolve('./src/views'), // 设置 `views` 指向 `./src/views` 目录,下同
        components: pathResolve('./src/components'),
        assets: pathResolve('./src/assets'),
    },
},
})