哆啦好梦 2 年之前
父節點
當前提交
f0a76ebf63
共有 100 個文件被更改,包括 633 次插入4801 次删除
  1. 8 2
      electron/addon/tray/index.js
  2. 0 34
      electron/controller/effect.js
  3. 0 384
      electron/controller/framework.js
  4. 0 71
      electron/controller/hardware.js
  5. 0 349
      electron/controller/os.js
  6. 0 30
      electron/service/effect.js
  7. 0 181
      electron/service/framework.js
  8. 0 30
      electron/service/hardware.js
  9. 0 78
      electron/service/os.js
  10. 0 257
      electron/service/storage.js
  11. 510 489
      frontend/package-lock.json
  12. 2 5
      frontend/package.json
  13. 0 47
      frontend/src/api/main.js
  14. 0 58
      frontend/src/components/HelloWorld.vue
  15. 22 142
      frontend/src/config/router.config.js
  16. 4 118
      frontend/src/config/subMenu.js
  17. 2 20
      frontend/src/layouts/AppSider.vue
  18. 0 8
      frontend/src/layouts/Menu.vue
  19. 0 92
      frontend/src/views/effect/video/Index.vue
  20. 81 0
      frontend/src/views/example/hello/Index.vue
  21. 0 214
      frontend/src/views/framework/db/Index.vue
  22. 0 85
      frontend/src/views/framework/java/Index.vue
  23. 0 161
      frontend/src/views/framework/jobs/Index.vue
  24. 0 79
      frontend/src/views/framework/socket/HttpServer.vue
  25. 0 153
      frontend/src/views/framework/socket/Ipc.vue
  26. 0 76
      frontend/src/views/framework/socket/SocketServer.vue
  27. 0 67
      frontend/src/views/framework/software/Index.vue
  28. 0 270
      frontend/src/views/framework/sqlitedb/Index.vue
  29. 0 37
      frontend/src/views/framework/test/Index.vue
  30. 0 58
      frontend/src/views/framework/testapi/Index.vue
  31. 0 85
      frontend/src/views/framework/updater/Index.vue
  32. 0 97
      frontend/src/views/hardware/printer/Index.vue
  33. 0 77
      frontend/src/views/os/extension/Index.vue
  34. 0 193
      frontend/src/views/os/file/Index.vue
  35. 0 69
      frontend/src/views/os/launch/Index.vue
  36. 0 88
      frontend/src/views/os/notification/Index.vue
  37. 0 58
      frontend/src/views/os/powermonitor/Index.vue
  38. 0 62
      frontend/src/views/os/screen/Index.vue
  39. 0 144
      frontend/src/views/os/subwindow/Ipc.vue
  40. 0 68
      frontend/src/views/os/system/Index.vue
  41. 0 82
      frontend/src/views/os/theme/Index.vue
  42. 0 85
      frontend/src/views/os/window/Index.vue
  43. 0 72
      frontend/src/views/os/windowview/Index.vue
  44. 0 4
      package.json
  45. 0 1
      public/dist/css/app.8ada1737.css
  46. 1 0
      public/dist/css/app.bbb2662a.css
  47. 0 1
      public/dist/css/chunk-09b6db32.420fdb6d.css
  48. 0 1
      public/dist/css/chunk-0b695420.01116c37.css
  49. 0 1
      public/dist/css/chunk-0c3ec28a.57f7ab37.css
  50. 0 1
      public/dist/css/chunk-1ac5e88a.4a15bba1.css
  51. 0 1
      public/dist/css/chunk-1caa1be6.198b3d4f.css
  52. 0 1
      public/dist/css/chunk-21689cc4.6784fb2b.css
  53. 0 1
      public/dist/css/chunk-2bb45275.7b3b5479.css
  54. 0 1
      public/dist/css/chunk-2c1b05fb.c240d69c.css
  55. 0 1
      public/dist/css/chunk-2ed2f5b2.4abd2c84.css
  56. 0 1
      public/dist/css/chunk-31638db2.dd7e28b0.css
  57. 0 1
      public/dist/css/chunk-41d5921a.3febd410.css
  58. 0 1
      public/dist/css/chunk-45af09d4.38508275.css
  59. 1 0
      public/dist/css/chunk-54a1e8f7.50e81769.css
  60. 0 1
      public/dist/css/chunk-5c6e7977.3a28c15a.css
  61. 0 1
      public/dist/css/chunk-68bb1024.a8b5de09.css
  62. 0 1
      public/dist/css/chunk-68d57b43.2dda727d.css
  63. 0 1
      public/dist/css/chunk-69fb44ca.f714bef4.css
  64. 0 1
      public/dist/css/chunk-72ffb39f.af4f6a12.css
  65. 0 1
      public/dist/css/chunk-c19bf770.80cd7ae2.css
  66. 0 1
      public/dist/css/chunk-e16c8452.c241bcac.css
  67. 0 1
      public/dist/css/chunk-ec5e0b1e.8389c666.css
  68. 0 1
      public/dist/css/chunk-f98fc72c.90fc6ee5.css
  69. 0 0
      public/dist/css/chunk-vendors.73dc6b18.css
  70. 0 0
      public/dist/css/chunk-vendors.f4913a35.css
  71. 0 0
      public/dist/index.html
  72. 0 0
      public/dist/js/app.428aeb5d.js
  73. 0 0
      public/dist/js/app.428aeb5d.js.map
  74. 0 0
      public/dist/js/app.75a73325.js
  75. 0 0
      public/dist/js/app.75a73325.js.map
  76. 0 0
      public/dist/js/chunk-09b6db32.f8a3a592.js
  77. 0 0
      public/dist/js/chunk-09b6db32.f8a3a592.js.map
  78. 0 0
      public/dist/js/chunk-0b695420.90dd7b8d.js
  79. 0 0
      public/dist/js/chunk-0b695420.90dd7b8d.js.map
  80. 0 0
      public/dist/js/chunk-0c3ec28a.2c486055.js
  81. 0 0
      public/dist/js/chunk-0c3ec28a.2c486055.js.map
  82. 0 0
      public/dist/js/chunk-1ac5e88a.7d239202.js
  83. 0 0
      public/dist/js/chunk-1ac5e88a.7d239202.js.map
  84. 0 0
      public/dist/js/chunk-1caa1be6.29a9d62f.js
  85. 0 0
      public/dist/js/chunk-1caa1be6.29a9d62f.js.map
  86. 0 0
      public/dist/js/chunk-21689cc4.11a827c2.js
  87. 0 0
      public/dist/js/chunk-21689cc4.11a827c2.js.map
  88. 0 0
      public/dist/js/chunk-2bb45275.049828ca.js
  89. 0 0
      public/dist/js/chunk-2bb45275.049828ca.js.map
  90. 0 0
      public/dist/js/chunk-2c1b05fb.8405f8da.js
  91. 0 0
      public/dist/js/chunk-2c1b05fb.8405f8da.js.map
  92. 0 0
      public/dist/js/chunk-2ed2f5b2.47c316ba.js
  93. 0 0
      public/dist/js/chunk-2ed2f5b2.47c316ba.js.map
  94. 0 0
      public/dist/js/chunk-31638db2.2089063a.js
  95. 0 0
      public/dist/js/chunk-31638db2.2089063a.js.map
  96. 0 0
      public/dist/js/chunk-41d5921a.d7a42ba0.js
  97. 0 0
      public/dist/js/chunk-41d5921a.d7a42ba0.js.map
  98. 0 0
      public/dist/js/chunk-45af09d4.4947067b.js
  99. 0 0
      public/dist/js/chunk-45af09d4.4947067b.js.map
  100. 2 0
      public/dist/js/chunk-54a1e8f7.20b5b1cb.js

+ 8 - 2
electron/addon/tray/index.js

@@ -1,4 +1,4 @@
-const {Tray, Menu} = require('electron');
+const { Tray, Menu, shell } = require('electron');
 const path = require('path');
 const Ps = require('ee-core/ps');
 const Log = require('ee-core/log');
@@ -27,7 +27,7 @@ class TrayAddon {
 
     const app = this.app;
     const cfg = Conf.getValue('addons.tray');
-    const mainWindow = Electron.mainWindow;
+    const { mainWindow } = Electron;
 
     // 托盘图标
     let iconPath = path.join(Ps.getHomeDir(), cfg.icon);
@@ -63,6 +63,12 @@ class TrayAddon {
     this.tray.setToolTip(cfg.title);
     const contextMenu = Menu.buildFromTemplate(trayMenuTemplate);
     this.tray.setContextMenu(contextMenu);
+
+    // 使用默认浏览器打开链接
+    mainWindow.webContents.setWindowOpenHandler(({ url }) => {
+      shell.openExternal(url);
+      return { action: 'deny' }
+    })
   }
 }
 

+ 0 - 34
electron/controller/effect.js

@@ -1,34 +0,0 @@
-'use strict';
-
-const { Controller } = require('ee-core');
-const { dialog } = require('electron');
-const _ = require('lodash');
-
-/**
- * 特效 - 功能demo
- * @class
- */
-class EffectController extends Controller {
-
-  constructor(ctx) {
-    super(ctx);
-  }
-
-  /**
-   * 选择文件
-   */
-  selectFile () {
-    const filePaths = dialog.showOpenDialogSync({
-      properties: ['openFile']
-    });
-
-    if (_.isEmpty(filePaths)) {
-      return null
-    }
-
-    return filePaths[0];
-  }  
-}
-
-EffectController.toString = () => '[class EffectController]';
-module.exports = EffectController;  

+ 0 - 384
electron/controller/framework.js

@@ -1,384 +0,0 @@
-'use strict';
-
-const path = require('path');
-const fs = require('fs');
-const { exec } = require('child_process');
-const { Controller } = require('ee-core');
-const { app: electronApp, shell } = require('electron');
-const dayjs = require('dayjs');
-const Ps = require('ee-core/ps');
-const Log = require('ee-core/log');
-const Utils = require('ee-core/utils');
-const Conf = require('ee-core/config');
-
-/**
- * electron-egg framework - 功能demo
- * @class
- */
-class FrameworkController extends Controller {
-
-  constructor(ctx) {
-    super(ctx);
-  }
-
-  /**
-   * 所有方法接收两个参数
-   * @param args 前端传的参数
-   * @param event - ipc通信时才有值。详情见:控制器文档
-   */
-
-  /**
-   * test
-   */
-  async test() {
-    const result = await this.service.framework.test('electron');
-
-    // let tmpDir = Ps.getLogDir();
-    // Log.info('tmpDir:', tmpDir);
-
-    let mid = await Utils.machineIdSync(true);
-    Log.info('mid 11111111:', mid);
-
-    Utils.machineId().then((id) => {
-      Log.info('mid 222222222:', id);
-    });
-
-    return result;
-  }
-
-  /**
-   * json数据库操作
-   */   
-  async dbOperation(args) {
-    const { service } = this;
-    const paramsObj = args;
-    //Log.info('eeeee paramsObj:', paramsObj);
-    const data = {
-      action: paramsObj.action,
-      result: null,
-      all_list: []
-    };
-    
-    switch (paramsObj.action) {
-      case 'add' :
-        data.result = await service.storage.addTestData(paramsObj.info);;
-        break;
-      case 'del' :
-        data.result = await service.storage.delTestData(paramsObj.delete_name);;
-        break;
-      case 'update' :
-        data.result = await service.storage.updateTestData(paramsObj.update_name, paramsObj.update_age);
-        break;
-      case 'get' :
-        data.result = await service.storage.getTestData(paramsObj.search_age);
-        break;
-    }
-
-    data.all_list = await service.storage.getAllTestData();
-
-    return data;
-  }
-
-  /**
-   * sqlite数据库操作
-   */   
-  async sqlitedbOperation(args) {
-    const { service } = this;
-    const paramsObj = args;
-    //Log.info('eeeee paramsObj:', paramsObj);
-    const data = {
-      action: paramsObj.action,
-      result: null,
-      all_list: []
-    };
-    
-    switch (paramsObj.action) {
-      case 'add' :
-        data.result = await service.storage.addTestDataSqlite(paramsObj.info);;
-        break;
-      case 'del' :
-        data.result = await service.storage.delTestDataSqlite(paramsObj.delete_name);;
-        break;
-      case 'update' :
-        data.result = await service.storage.updateTestDataSqlite(paramsObj.update_name, paramsObj.update_age);
-        break;
-      case 'get' :
-        data.result = await service.storage.getTestDataSqlite(paramsObj.search_age);
-        break;
-      case 'getDataDir' :
-        data.result = await service.storage.getDataDir();
-        break;
-      case 'setDataDir' :
-        data.result = await service.storage.setCustomDataDir(paramsObj.data_dir);
-        break;            
-    }
-
-    data.all_list = await service.storage.getAllTestDataSqlite();
-
-    return data;
-  }  
-
-  /**
-   * 调用其它程序(exe、bash等可执行程序)
-   */
-  openSoftware(softName) {
-    if (!softName) {
-      return false;
-    }
-
-    let softwarePath = path.join(Ps.getExtraResourcesDir(), softName);
-    Log.info('[openSoftware] softwarePath:', softwarePath);
-
-    // 检查程序是否存在
-    if (!fs.existsSync(softwarePath)) {
-      return false;
-    }
-    // 命令行字符串 并 执行
-    let cmdStr = 'start ' + softwarePath;
-    exec(cmdStr);
-
-    return true;
-  }  
-  
-  /**
-   * 检查是否有新版本
-   */
-  checkForUpdater() { 
-    const autoUpdaterAddon = this.app.addon.autoUpdater;
-    autoUpdaterAddon.checkUpdate();  
-
-    return;
-  }
-
-  /**
-   * 下载新版本
-   */
-  downloadApp() {
-    const autoUpdaterAddon = this.app.addon.autoUpdater;
-    autoUpdaterAddon.download();
-    return;
-  }
-
-  /**
-   * 检测http服务是否开启
-   */ 
-  async checkHttpServer() {
-    const httpServerConfig = Conf.getValue('httpServer');
-    const url = httpServerConfig.protocol + httpServerConfig.host + ':' + httpServerConfig.port;
-
-    const data = {
-      enable: httpServerConfig.enable,
-      server: url
-    }
-    return data;
-  }
-
-  /**
-   * 一个http请求访问此方法
-   */ 
-  async doHttpRequest() {
-    // http方法
-    const method = this.app.request.method;
-    // http get 参数
-    let params = this.app.request.query;
-    params = (params instanceof Object) ? params : JSON.parse(JSON.stringify(params));
-    // http post 参数
-    const body = this.app.request.body;
-
-    const httpInfo = {
-      method,
-      params,
-      body
-    }
-    Log.info('httpInfo:', httpInfo);
-
-    if (!body.id) {
-      return false;
-    }
-    const dir = electronApp.getPath(body.id);
-    shell.openPath(dir);
-    
-    return true;
-  } 
- 
-  /**
-   * 一个socket io请求访问此方法
-   */ 
-  async doSocketRequest(args) {
-    if (!args.id) {
-      return false;
-    }
-    const dir = electronApp.getPath(args.id);
-    shell.openPath(dir);
-    
-    return true;
-  }
-  
-  /**
-   * 异步消息类型
-   */ 
-  async ipcInvokeMsg(args, event) {
-    let timeNow = dayjs().format('YYYY-MM-DD HH:mm:ss');
-    const data = args + ' - ' + timeNow;
-    
-    return data;
-  }  
-
-  /**
-   * 同步消息类型
-   */ 
-  async ipcSendSyncMsg(args) {
-    let timeNow = dayjs().format('YYYY-MM-DD HH:mm:ss');
-    const data = args + ' - ' + timeNow;
-    
-    return data;
-  }  
-
-  /**
-   * 双向异步通信
-   */
-  async ipcSendMsg(args, event) {
-    const { type, content } = args;
-    const data = await this.service.framework.bothWayMessage(type, content, event);
-
-    return data;
-  }
-
-  /**
-   * 上传文件
-   */  
-  async uploadFile() {
-    let tmpDir = Ps.getLogDir();
-    const files = this.app.request.files;
-    let file = files.file;
-    
-    let tmpFilePath = path.join(tmpDir, file.originalFilename);
-    try {
-      let tmpFile = fs.readFileSync(file.filepath);
-      fs.writeFileSync(tmpFilePath, tmpFile);
-    } finally {
-      await fs.unlink(file.filepath, function(){});
-    }
-    const fileStream = fs.createReadStream(tmpFilePath);
-    const uploadRes = await this.service.framework.uploadFileToSMMS(fileStream);
-
-    return uploadRes;
-  }
-
-  /**
-   * 启动java项目
-   */ 
-  async startJavaServer() {
-    let data = {
-      code: 0,
-      msg: '',
-      server: ''
-    }
-    const javaCfg = Conf.getValue('addons.javaServer') || {};
-    if (!javaCfg.enable) {
-      data.code = -1;
-      data.msg = 'addon not enabled!';
-      return data;
-    }
-
-    const javaServerAddon = this.app.addon.javaServer;
-    await javaServerAddon.createServer();
-
-    data.server = 'http://localhost:' + javaCfg.port;
-
-    return data;
-  }
-
-  /**
-   * 关闭java项目
-   */ 
-  async closeJavaServer() {
-    let data = {
-      code: 0,
-      msg: '',
-    }
-    const javaCfg = Conf.getValue('addons.javaServer') || {};
-    if (!javaCfg.enable) {
-      data.code = -1;
-      data.msg = 'addon not enabled!';
-      return data;
-    }
-
-    const javaServerAddon = this.app.addon.javaServer;
-    await javaServerAddon.kill();
-
-    return data;
-  }
-
-  /**
-   * 任务
-   */ 
-  someJob(args, event) {
-    let jobId = args.id;
-    let action = args.action;
-    
-    let result;
-    switch (action) {
-      case 'create':
-        result = this.service.framework.doJob(jobId, action, event);
-        break;       
-      case 'close':
-        this.service.framework.doJob(jobId, action, event);
-        break;
-      default:  
-    }
-    
-    let data = {
-      jobId,
-      action,
-      result
-    }
-    return data;
-  }
-
-  /**
-   * 创建任务池
-   */ 
-  async createPool(args, event) {
-    let num = args.number;
-    this.service.framework.doCreatePool(num, event);
-
-    // test monitor
-    this.service.framework.monitorJob();
-
-    return;
-  }
-
-  /**
-   * 通过进程池执行任务
-   */ 
-  someJobByPool(args, event) {
-    let jobId = args.id;
-    let action = args.action;
-    
-    let result;
-    switch (action) {
-      case 'run':
-        result = this.service.framework.doJobByPool(jobId, action, event);
-        break;
-      default:  
-    }
-    
-    let data = {
-      jobId,
-      action,
-      result
-    }
-    return data;
-  }
-
-  /**
-   * 测试接口
-   */ 
-  hello(args) {
-    Log.info('hello ', args);
-  }   
-}
-
-FrameworkController.toString = () => '[class FrameworkController]';
-module.exports = FrameworkController;  

+ 0 - 71
electron/controller/hardware.js

@@ -1,71 +0,0 @@
-'use strict';
-
-const { Controller } = require('ee-core');
-const path = require('path');
-const Ps = require('ee-core/ps');
-const Electron = require('ee-core/electron');
-
-/**
- * 硬件设备 - 功能demo
- * @class
- */
-class HardwareController extends Controller {
-
-  constructor(ctx) {
-    super(ctx);
-  }
-
-  /**
-   * 获取打印机列表
-   */
-  getPrinterList () {
-
-    //主线程获取打印机列表
-    const list = Electron.mainWindow.webContents.getPrinters();
-
-    return list;
-  }  
-
-  /**
-   * 打印
-   */
-  print (args, event) {
-    const { view, deviceName } = args;
-    let content = null;
-    if (view.type == 'html') {
-      content = path.join('file://', Ps.getHomeDir(), view.content)
-    } else {
-      content = view.content;
-    }
-
-    const addonWindow = this.app.addon.window;
-    let opt = {
-      title: 'printer window',
-      x: 10,
-      y: 10,
-      width: 980, 
-      height: 650 
-    }
-    const name = 'window-printer';
-    const printWindow = addonWindow.create(name, opt);
-
-    printWindow.loadURL(content);
-    printWindow.webContents.once('did-finish-load', () => {
-      // 页面完全加载完成后,开始打印
-      printWindow.webContents.print({
-        silent: false, // 显示打印对话框
-        printBackground: true,
-        deviceName,
-      }, (success, failureReason) => {
-        const channel = 'controller.hardware.printStatus';
-        event.reply(`${channel}`, { success, failureReason });
-        printWindow.close();
-      });
-    });
-
-    return true;
-  }  
-}
-
-HardwareController.toString = () => '[class HardwareController]';
-module.exports = HardwareController;  

+ 0 - 349
electron/controller/os.js

@@ -1,349 +0,0 @@
-'use strict';
-
-const _ = require('lodash');
-const path = require('path');
-const { Controller } = require('ee-core');
-const {
-  app: electronApp, dialog, shell, Notification, 
-  powerMonitor, screen, nativeTheme
-} = require('electron');
-const Conf = require('ee-core/config');
-const Ps = require('ee-core/ps');
-
-/**
- * 操作系统 - 功能demo
- * @class
- */
-class OsController extends Controller {
-
-  constructor(ctx) {
-    super(ctx);
-  }
-
-  /**
-   * 所有方法接收两个参数
-   * @param args 前端传的参数
-   * @param event - ipc通信时才有值。详情见:控制器文档
-   */
-
-  /**
-   * 消息提示对话框
-   */
-  messageShow() {
-    dialog.showMessageBoxSync({
-      type: 'info', // "none", "info", "error", "question" 或者 "warning"
-      title: '自定义标题-message',
-      message: '自定义消息内容',
-      detail: '其它的额外信息'
-    })
-  
-    return '打开了消息框';
-  }
-
-  /**
-   * 消息提示与确认对话框
-   */
-  messageShowConfirm() {
-    const res = dialog.showMessageBoxSync({
-      type: 'info',
-      title: '自定义标题-message',
-      message: '自定义消息内容',
-      detail: '其它的额外信息',
-      cancelId: 1, // 用于取消对话框的按钮的索引
-      defaultId: 0, // 设置默认选中的按钮
-      buttons: ['确认', '取消'], // 按钮及索引
-    })
-    let data = (res === 0) ? '点击确认按钮' : '点击取消按钮';
-  
-    return data;
-  }
-
-  /**
-   * 选择目录
-   */
-  selectFolder() {
-    const filePaths = dialog.showOpenDialogSync({
-      properties: ['openDirectory', 'createDirectory']
-    });
-
-    if (_.isEmpty(filePaths)) {
-      return null
-    }
-
-    return filePaths[0];
-  } 
-
-  /**
-   * 打开目录
-   */
-  openDirectory(args) {
-    if (!args.id) {
-      return false;
-    }
-    let dir = '';
-    if (path.isAbsolute(args.id)) {
-      dir = args.id;
-    } else {
-      dir = electronApp.getPath(args.id);
-    }
-
-    shell.openPath(dir);
-    return true;
-  }
-
-  /**
-   * 加载视图内容
-   */
-  loadViewContent(args) {
-    const { type, content } = args;
-    let contentUrl = content;
-    if (type == 'html') {
-      contentUrl = path.join('file://', electronApp.getAppPath(), content);
-    }
-
-    this.service.os.createBrowserView(contentUrl);
-
-    return true
-  }
-
-  /**
-   * 移除视图内容
-   */
-  removeViewContent() {
-   
-    this.service.os.removeBrowserView();
-
-    return true
-  }  
-
-  /**
-   * 打开新窗口
-   */
-  createWindow(args) {
-    const { type, content, windowName, windowTitle } = args;
-    let contentUrl = null;
-    if (type == 'html') {
-      contentUrl = path.join('file://', electronApp.getAppPath(), content)
-    } else if (type == 'web') {
-      contentUrl = content;
-    } else if (type == 'vue') {
-      let addr = 'http://localhost:8080'
-      if (Ps.isProd()) {
-        const mainServer = Conf.getValue('mainServer');
-        addr = mainServer.protocol + mainServer.host + ':' + mainServer.port;
-      }
-
-      contentUrl = addr + content;
-    } else {
-      // some
-    }
-
-    console.log('contentUrl: ', contentUrl);
-    const addonWindow = this.app.addon.window;
-    let opt = {
-      title: windowTitle
-    }
-    const win = addonWindow.create(windowName, opt);
-    const winContentsId = win.webContents.id;
-
-    // load page
-    win.loadURL(contentUrl);
-
-    return winContentsId;
-  }
-  
-  /**
-   * 获取窗口contents id
-   */
-  getWCid(args) {
-    const addonWindow = this.app.addon.window;
-
-    // 主窗口的name默认是main,其它窗口name开发者自己定义
-    const name = args;
-    const id = addonWindow.getWCid(name);
-
-    return id;
-  }
-
-  /**
-   * 加载扩展程序
-   */
-  // async loadExtension (args) {
-  //   const crxFile = args[0];
-  //   if (_.isEmpty(crxFile)) {
-  //     return false;
-  //   }
-  //   const extensionId = path.basename(crxFile, '.crx');
-  //   const chromeExtensionDir = chromeExtension.getDirectory();
-  //   const extensionDir = path.join(chromeExtensionDir, extensionId);
-
-  //   Log.info("[api] [example] [loadExtension] extension id:", extensionId);
-  //   unzip(crxFile, extensionDir).then(() => {    
-  //     Log.info("[api] [example] [loadExtension] unzip success!");
-  //     chromeExtension.load(extensionId);
-  //   });
-
-  //   return true;
-  // }
-
-  /**
-   * 创建系统通知
-   */
-  sendNotification(args, event) {
-    const { title, subtitle, body, silent} = args;
-
-    if (!Notification.isSupported()) {
-      return '当前系统不支持通知';
-    }
-
-    let options = {};
-    if (!_.isEmpty(title)) {
-      options.title = title;
-    }
-    if (!_.isEmpty(subtitle)) {
-      options.subtitle = subtitle;
-    }
-    if (!_.isEmpty(body)) {
-      options.body = body;
-    }
-    if (!_.isEmpty(silent)) {
-      options.silent = silent;
-    }
-
-    this.service.os.createNotification(options, event);
-
-    return true
-  }  
-
-  /**
-   * 电源监控
-   */
-  initPowerMonitor(args, event) {
-    const channel = 'controller.os.initPowerMonitor';
-    powerMonitor.on('on-ac', (e) => {
-      let data = {
-        type: 'on-ac',
-        msg: '接入了电源'
-      }
-      event.reply(`${channel}`, data)
-    });
-
-    powerMonitor.on('on-battery', (e) => {
-      let data = {
-        type: 'on-battery',
-        msg: '使用电池中'
-      }
-      event.reply(`${channel}`, data)
-    });
-
-    powerMonitor.on('lock-screen', (e) => {
-      let data = {
-        type: 'lock-screen',
-        msg: '锁屏了'
-      }
-      event.reply(`${channel}`, data)
-    });
-
-    powerMonitor.on('unlock-screen', (e) => {
-      let data = {
-        type: 'unlock-screen',
-        msg: '解锁了'
-      }
-      event.reply(`${channel}`, data)
-    });
-
-    return true
-  }  
-
-  /**
-   * 获取屏幕信息
-   */
-  getScreen(args) {
-    let data = [];
-    let res = {};
-    if (args == 0) {
-      let res = screen.getCursorScreenPoint();
-      data = [
-        {
-          title: '横坐标',
-          desc: res.x
-        },
-        {
-          title: '纵坐标',
-          desc: res.y
-        },
-      ]
-      
-      return data;
-    }
-    if (args == 1) {
-      res = screen.getPrimaryDisplay();
-    }
-    if (args == 2) {
-      let resArr = screen.getAllDisplays();
-      // 数组,只取一个吧
-      res = resArr[0];
-    }
-    // Log.info('[electron] [ipc] [example] [getScreen] res:', res);
-    data = [
-      {
-        title: '分辨率',
-        desc: res.bounds.width + ' x ' + res.bounds.height
-      },
-      {
-        title: '单色显示器',
-        desc: res.monochrome ? '是' : '否'
-      },
-      {
-        title: '色深',
-        desc: res. colorDepth
-      },
-      {
-        title: '色域',
-        desc: res.colorSpace
-      },
-      {
-        title: 'scaleFactor',
-        desc: res.scaleFactor
-      },
-      {
-        title: '加速器',
-        desc: res.accelerometerSupport
-      },
-      {
-        title: '触控',
-        desc: res.touchSupport == 'unknown' ? '不支持' : '支持'
-      },
-    ]
-
-    return data;
-  }
-
-  /**
-   * 获取系统主题
-   */
-  getTheme() {
-    let theme = 'system';
-    if (nativeTheme.shouldUseHighContrastColors) {
-      theme = 'light';
-    } else if (nativeTheme.shouldUseInvertedColorScheme) {
-      theme = 'dark';
-    }
-
-    return theme;
-  }
-
-  /**
-   * 设置系统主题
-   */
-  setTheme(args) {
-
-    // TODO 好像没有什么明显效果
-    nativeTheme.themeSource = args;
-
-    return args;
-  }  
-}
-
-OsController.toString = () => '[class OsController]';
-module.exports = OsController;  

+ 0 - 30
electron/service/effect.js

@@ -1,30 +0,0 @@
-'use strict';
-
-const { Service } = require('ee-core');
-
-/**
- * effect(service层为单例)
- * @class
- */
-class EffectService extends Service {
-
-  constructor(ctx) {
-    super(ctx);
-  }
-
-  /**
-   * test
-   */
-  async test(args) {
-    let obj = {
-      status:'ok',
-      params: args
-    }
-
-    return obj;
-  }
-
-}
-
-EffectService.toString = () => '[class EffectService]';
-module.exports = EffectService;  

+ 0 - 181
electron/service/framework.js

@@ -1,181 +0,0 @@
-'use strict';
-
-const { Service } = require('ee-core');
-const Log = require('ee-core/log');
-const { ChildJob, ChildPoolJob } = require('ee-core/jobs');
-
-/**
- * framework
- * @class
- */
-class FrameworkService extends Service {
-
-  constructor(ctx) {
-    super(ctx);
-
-    // 在构造函数中初始化一些变量
-    this.myTimer = null;
-    this.myJob = new ChildJob();
-    this.myJobPool = new ChildPoolJob();
-    this.taskForJob = {};
-  }
-
-  /**
-   * test
-   */
-  async test(args) {
-    let obj = {
-      status:'ok',
-      params: args
-    }
-
-    return obj;
-  }
-
-  /**
-   * ipc通信(双向)
-   */
-  bothWayMessage(type, content, event) {
-    // 前端ipc频道 channel
-    const channel = 'controller.framework.ipcSendMsg';
-
-    if (type == 'start') {
-      // 每隔1秒,向前端页面发送消息
-      // 用定时器模拟
-      this.myTimer = setInterval(function(e, c, msg) {
-        let timeNow = Date.now();
-        let data = msg + ':' + timeNow;
-        e.reply(`${c}`, data)
-      }, 1000, event, channel, content)
-
-      return '开始了'
-    } else if (type == 'end') {
-      clearInterval(this.myTimer);
-      return '停止了'    
-    } else {
-      return 'ohther'
-    }
-  }
-
-  /**
-   * 执行任务
-   */ 
-  doJob(jobId, action, event) {
-    let res = {};
-    let oneTask;
-    const channel = 'controller.framework.timerJobProgress';
-    if (action == 'create') {
-      // 执行任务及监听进度
-      const timerTask = this.myJob.exec('./jobs/example/timer', {jobId});
-      timerTask.emitter.on('job-timer-progress', (data) => {
-        Log.info('[main-process] timerTask, from TimerJob data:', data);
-        // 发送数据到渲染进程
-        event.sender.send(`${channel}`, data)
-      })
-    
-      // 执行任务及监听进度 异步
-      // myjob.execPromise('./jobs/example/timer', {jobId}).then(task => {
-      //   task.emitter.on('job-timer-progress', (data) => {
-      //     Log.info('[main-process] timerTask, from TimerJob data:', data);
-      //     // 发送数据到渲染进程
-      //     event.sender.send(`${channel}`, data)
-      //   })
-      // });
-
-      res.pid = timerTask.pid; 
-      this.taskForJob[jobId] = timerTask;
-    }
-    if (action == 'close') {
-      oneTask = this.taskForJob[jobId];
-      oneTask.kill();
-      event.sender.send(`${channel}`, {jobId, number:0, pid:0});
-    }    
-
-    return res;
-  }
-
-  /**
-   * 创建pool
-   */ 
-  doCreatePool(num, event) {
-    const channel = 'controller.framework.createPoolNotice';
-    this.myJobPool.create(num).then(pids => {
-      event.reply(`${channel}`, pids);
-    });
-  }
-
-  /**
-   * 通过进程池执行任务
-   */ 
-  doJobByPool(jobId, action, event) {
-    let res = {};
-    const channel = 'controller.framework.timerJobProgress';
-    if (action == 'run') {
-      // 异步-执行任务及监听进度
-      this.myJobPool.runPromise('./jobs/example/timer', {jobId}).then(task => {
-        task.emitter.on('job-timer-progress', (data) => {
-          Log.info('[main-process] [ChildPoolJob] timerTask, from TimerJob data:', data);
-  
-          // 发送数据到渲染进程
-          event.sender.send(`${channel}`, data)
-        })
-        res.pid = task.pid; 
-      });
-    }
-    return res;
-  }
-
-  /**
-   * test 
-   */ 
-  monitorJob() {
-    setInterval(() => {
-      let jobPids = this.myJob.getPids();
-      let jobPoolPids = this.myJobPool.getPids();
-      Log.info(`[main-process] [monitorJob] jobPids: ${jobPids}, jobPoolPids: ${jobPoolPids}`);
-    }, 5000)
-  }  
-
-  /**
-   * 上传到smms
-   */
-  async uploadFileToSMMS(tmpFile) {
-    const res = {
-      code: 1000,
-      message: 'unknown error',
-    };
-
-    try {
-      const headersObj = {
-        'Content-Type': 'multipart/form-data',
-        'Authorization': 'aaaaaaaaaaaaa' // 请修改这个token,用你自己的账号token
-      };
-      const url = 'https://sm.ms/api/v2/upload';
-      const response = await this.app.curl(url, {
-        method: 'POST',
-        headers: headersObj,
-        files: {
-          smfile: tmpFile,
-        },
-        dataType: 'json',
-        timeout: 15000,
-      });
-      const result = response.data;
-      if (this.app.config.env === 'local') {
-        Log.info('[FrameworkService] [uploadFileToSMMS]: info result:%j', result);
-      }
-      if (result.code !== 'success') {
-        Log.error('[FrameworkService] [uploadFileToSMMS]: res error result:%j', result);
-      }
-      return result;
-    } catch (e) {
-      Log.error('[FrameworkService] [uploadFileToSMMS]:  ERROR ', e);
-    }
-
-    return res;
-  }
-
-}
-
-FrameworkService.toString = () => '[class FrameworkService]';
-module.exports = FrameworkService;  

+ 0 - 30
electron/service/hardware.js

@@ -1,30 +0,0 @@
-'use strict';
-
-const { Service } = require('ee-core');
-
-/**
- * hardware(service层为单例)
- * @class
- */
-class HardwareService extends Service {
-
-  constructor(ctx) {
-    super(ctx);
-  }
-
-  /**
-   * test
-   */
-  async test(args) {
-    let obj = {
-      status:'ok',
-      params: args
-    }
-
-    return obj;
-  }
-
-}
-
-HardwareService.toString = () => '[class HardwareService]';
-module.exports = HardwareService;  

+ 0 - 78
electron/service/os.js

@@ -1,78 +0,0 @@
-'use strict';
-
-const { Service } = require('ee-core');
-const { BrowserView, Notification } = require('electron');
-const Electron = require('ee-core/electron');
-
-/**
- * os(service层为单例)
- * @class
- */
-class OsService extends Service {
-
-  constructor(ctx) {
-    super(ctx);
-    this.myBrowserView = null;
-    this.myNotification = null;
-  }
-
-  /**
-   * createBrowserView
-   */
-  createBrowserView(contentUrl) {
-
-    // electron 实验性功能,慎用
-    this.myBrowserView = new BrowserView();
-    Electron.mainWindow.setBrowserView(this.myBrowserView);
-    this.myBrowserView.setBounds({
-      x: 300,
-      y: 170,
-      width: 650,
-      height: 400
-    });
-    this.myBrowserView.webContents.loadURL(contentUrl);
-  }
-
-  /**
-   * removeBrowserView
-   */
-  removeBrowserView() {
-
-    // removeBrowserView移除视图后,进程依然存在,估计是electron bug
-    Electron.mainWindow.removeBrowserView(this.myBrowserView);
-  }
-
-  /**
-   * createNotification
-   */
-  createNotification(options, event) {
-    const channel = 'controller.os.sendNotification';
-    this.myNotification = new Notification(options);
-
-    if (options.clickEvent) {
-      this.myNotification.on('click', (e) => {
-        let data = {
-          type: 'click',
-          msg: '您点击了通知消息'
-        }
-        event.reply(`${channel}`, data)
-      });
-    }
-
-    if (options.closeEvent) {
-      this.myNotification.on('close', (e) => {
-        let data = {
-          type: 'close',
-          msg: '您关闭了通知消息'
-        }
-        event.reply(`${channel}`, data)
-      });
-    }
-
-    this.myNotification.show();
-  } 
-
-}
-
-OsService.toString = () => '[class OsService]';
-module.exports = OsService;  

+ 0 - 257
electron/service/storage.js

@@ -1,257 +0,0 @@
-'use strict';
-
-const { Service } = require('ee-core');
-const Storage = require('ee-core/storage');
-const _ = require('lodash');
-const path = require('path');
-
-/**
- * 数据存储
- * @class
- */
-class StorageService extends Service {
-
-  constructor (ctx) {
-    super(ctx);
-
-    // jsondb数据库
-    this.demoDB = Storage.connection('demo');  
-    this.demoDBKey = {
-      test_data: 'test_data'
-    };
-
-    // sqlite数据库
-    this.sqliteFile = 'sqlite-demo.db';
-    let sqliteOptions = {
-      driver: 'sqlite',
-      default: {
-        timeout: 6000,
-        verbose: console.log // 打印sql语法
-      }
-    }
-    this.demoSqliteDB = Storage.connection(this.sqliteFile, sqliteOptions);
-  }
-
-  /*
-   * 增 Test data
-   */
-  async addTestData(user) {
-    const key = this.demoDBKey.test_data;
-    if (!this.demoDB.db.has(key).value()) {
-      this.demoDB.db.set(key, []).write();
-    }
-    
-    const data = this.demoDB.db
-    .get(key)
-    .push(user)
-    .write();
-
-    return data;
-  }
-
-  /*
-   * 删 Test data
-   */
-  async delTestData(name = '') {
-    const key = this.demoDBKey.test_data;
-    const data = this.demoDB.db
-    .get(key)
-    .remove({name: name})
-    .write();
-
-    return data;
-  }
-
-  /*
-   * 改 Test data
-   */
-  async updateTestData(name= '', age = 0) {
-    const key = this.demoDBKey.test_data;
-    const data = this.demoDB.db
-    .get(key)
-    .find({name: name}) // 修改找到的第一个数据,貌似无法批量修改 todo
-    .assign({age: age})
-    .write();
-
-    return data;
-  }
-
-  /*
-   * 查 Test data
-   */
-  async getTestData(age = 0) {
-    const key = this.demoDBKey.test_data;
-    let data = this.demoDB.db
-    .get(key)
-    //.find({age: age}) 查找单个
-    .filter(function(o) {
-      let isHas = true;
-      isHas = age === o.age ? true : false;
-      return isHas;
-    })
-    //.orderBy(['age'], ['name']) 排序
-    //.slice(0, 10) 分页
-    .value();
-
-    if (_.isEmpty(data)) {
-      data = []
-    }
-
-    return data;
-  }
-
-  /*
-   * all Test data
-   */
-  async getAllTestData() {
-    const key = this.demoDBKey.test_data;
-    if (!this.demoDB.db.has(key).value()) {
-      this.demoDB.db.set(key, []).write();
-    }
-    let data = this.demoDB.db
-    .get(key)
-    .value();
-
-    if (_.isEmpty(data)) {
-      data = []
-    }
-
-    return data;
-  }
-
-  /*
-   * 检查并创建表 (sqlite)
-   */
-  async checkAndCreateTableSqlite(tableName = '') {
-    if (_.isEmpty(tableName)) {
-      throw new Error(`table name is required`);
-    }
-    // 检查表是否存在
-    const userTable = this.demoSqliteDB.db.prepare('SELECT * FROM sqlite_master WHERE type=? AND name = ?');
-    const result = userTable.get('table', tableName);
-    //console.log('result:', result);
-    if (result) {
-      return;
-    }
-
-    // 创建表
-    const create_table_user =
-    `CREATE TABLE ${tableName}
-     (
-        id INTEGER PRIMARY KEY AUTOINCREMENT,
-        name CHAR(50) NOT NULL,
-        age INT
-     );`
-    this.demoSqliteDB.db.exec(create_table_user);
-
-  }
-
-  /*
-   * 增 Test data (sqlite)
-   */
-  async addTestDataSqlite(data) {
-    //console.log("add data:", data);
-
-    let table = 'user';
-    await this.checkAndCreateTableSqlite(table);
-
-    const insert = this.demoSqliteDB.db.prepare(`INSERT INTO ${table} (name, age) VALUES (@name, @age)`);
-    insert.run(data);
-
-    return true;
-  }
-
-  /*
-   * 删 Test data (sqlite)
-   */
-  async delTestDataSqlite(name = '') {
-    //console.log("delete name:", name);
-
-    let table = 'user';
-    await this.checkAndCreateTableSqlite(table);
-
-    const delUser = this.demoSqliteDB.db.prepare(`DELETE FROM ${table} WHERE name = ?`);
-    delUser.run(name);
-
-    return true;
-  }
-
-  /*
-   * 改 Test data (sqlite)
-   */
-  async updateTestDataSqlite(name= '', age = 0) {
-    //console.log("update :", {name, age});
-
-    let table = 'user';
-    await this.checkAndCreateTableSqlite(table);
-
-    const updateUser = this.demoSqliteDB.db.prepare(`UPDATE ${table} SET age = ? WHERE name = ?`);
-    updateUser.run(age, name);
-
-    return true;
-  }  
-
-  /*
-   * 查 Test data (sqlite)
-   */
-  async getTestDataSqlite(age = 0) {
-    //console.log("select :", {age});
-
-    let table = 'user';
-    await this.checkAndCreateTableSqlite(table);
-
-    const selectUser = this.demoSqliteDB.db.prepare(`SELECT * FROM ${table} WHERE age = @age`);
-    const users = selectUser.all({age: age});
-    //console.log("select users:", users);
-    return users;
-  }  
-  
-  /*
-   * all Test data (sqlite)
-   */
-  async getAllTestDataSqlite() {
-    //console.log("select all user");
-
-    let table = 'user';
-    await this.checkAndCreateTableSqlite(table);
-
-    const selectAllUser = this.demoSqliteDB.db.prepare(`SELECT * FROM ${table} `);
-    const allUser =  selectAllUser.all();
-    //console.log("select allUser:", allUser);
-    return allUser;
-  }
-  
-  /*
-   * get data dir (sqlite)
-   */
-  async getDataDir() {
-    const dir = this.demoSqliteDB.getStorageDir();    
-
-    return dir;
-  } 
-
-  /*
-   * set custom data dir (sqlite)
-   */
-  async setCustomDataDir(dir) {
-    if (_.isEmpty(dir)) {
-      return;
-    }
-
-    // the absolute path of the db file
-    const dbFile = path.join(dir, this.sqliteFile);
-    const sqliteOptions = {
-      driver: 'sqlite',
-      default: {
-        timeout: 6000,
-        verbose: console.log
-      }
-    }
-    this.demoSqliteDB = Storage.connection(dbFile, sqliteOptions);    
-
-    return;
-  }
-}
-
-StorageService.toString = () => '[class StorageService]';
-module.exports = StorageService;

File diff suppressed because it is too large
+ 510 - 489
frontend/package-lock.json


+ 2 - 5
frontend/package.json

@@ -11,13 +11,10 @@
     "ant-design-vue": "^1.7.8",
     "axios": "^0.21.1",
     "core-js": "^3.6.5",
-    "socket.io-client": "^4.4.1",
-    "store2": "^2.13.2",
+    "store2": "^2.14.2",
     "vue": "^2.6.11",
-    "vue-quill-editor": "^3.0.6",
     "vue-router": "^3.4.9",
-    "vuex": "^3.6.0",
-    "xgplayer": "^2.31.6"
+    "vuex": "^3.6.0"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.5.0",

+ 0 - 47
frontend/src/api/main.js

@@ -5,52 +5,7 @@ import request from '@/utils/request'
  * 路由定义(主进程与渲染进程通信频道定义)
  */
 const ipcApiRoute = {
-  // framework
-  test: 'controller.framework.test',
-  checkForUpdater: 'controller.framework.checkForUpdater',
-  downloadApp: 'controller.framework.downloadApp',
-  dbOperation: 'controller.framework.dbOperation',
-  sqlitedbOperation: 'controller.framework.sqlitedbOperation',
-  uploadFile: 'controller.framework.uploadFile',
-  checkHttpServer: 'controller.framework.checkHttpServer',
-  doHttpRequest: 'controller.framework.doHttpRequest',
-  doSocketRequest: 'controller.framework.doSocketRequest',
-  ipcInvokeMsg: 'controller.framework.ipcInvokeMsg',
-  ipcSendSyncMsg: 'controller.framework.ipcSendSyncMsg',
-  ipcSendMsg: 'controller.framework.ipcSendMsg',
-  startJavaServer: 'controller.framework.startJavaServer',
-  closeJavaServer: 'controller.framework.closeJavaServer',
-  someJob: 'controller.framework.someJob',
-  timerJobProgress: 'controller.framework.timerJobProgress',
-  createPool: 'controller.framework.createPool',
-  createPoolNotice: 'controller.framework.createPoolNotice',
-  someJobByPool: 'controller.framework.someJobByPool',
   hello: 'controller.framework.hello',
-  openSoftware: 'controller.framework.openSoftware', 
-
-  // os
-  messageShow: 'controller.os.messageShow',
-  messageShowConfirm: 'controller.os.messageShowConfirm',
-  selectFolder: 'controller.os.selectFolder',
-  openDirectory: 'controller.os.openDirectory',
-  loadViewContent: 'controller.os.loadViewContent',
-  removeViewContent: 'controller.os.removeViewContent',
-  createWindow: 'controller.os.createWindow',
-  getWCid: 'controller.os.getWCid',
-  sendNotification: 'controller.os.sendNotification',
-  initPowerMonitor: 'controller.os.initPowerMonitor',
-  getScreen: 'controller.os.getScreen',
-  autoLaunch: 'controller.os.autoLaunch',
-  setTheme: 'controller.os.setTheme',
-  getTheme: 'controller.os.getTheme',
-
-  // hardware
-  getPrinterList: 'controller.hardware.getPrinterList',
-  print: 'controller.hardware.print',
-  printStatus: 'controller.hardware.printStatus',
-
-  // effect
-  selectFile: 'controller.effect.selectFile',
 }
 
 /**
@@ -58,8 +13,6 @@ const ipcApiRoute = {
  */
 const specialIpcRoute = {
   appUpdater: 'app.updater', // 此频道在后端也有相同定义
-  window1ToWindow2: 'window1-to-window2', // 窗口之间通信
-  window2ToWindow1: 'window2-to-window1', // 窗口之间通信
 }
 
 /**

+ 0 - 58
frontend/src/components/HelloWorld.vue

@@ -1,58 +0,0 @@
-<template>
-  <div class="hello">
-    <h1>{{ msg }}</h1>
-    <p>
-      For a guide and recipes on how to configure / customize this project,<br>
-      check out the
-      <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
-    </p>
-    <h3>Installed CLI Plugins</h3>
-    <ul>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
-    </ul>
-    <h3>Essential Links</h3>
-    <ul>
-      <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
-      <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
-      <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
-      <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
-      <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
-    </ul>
-    <h3>Ecosystem</h3>
-    <ul>
-      <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
-      <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
-      <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
-      <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
-      <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
-    </ul>
-  </div>
-</template>
-
-<script>
-export default {
-  name: 'HelloWorld',
-  props: {
-    msg: String
-  }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped>
-h3 {
-  margin: 40px 0 0;
-}
-ul {
-  list-style-type: none;
-  padding: 0;
-}
-li {
-  display: inline-block;
-  margin: 0 10px;
-}
-a {
-  color: #42b983;
-}
-</style>

+ 22 - 142
frontend/src/config/router.config.js

@@ -15,152 +15,32 @@ export const constantRouterMap = [
     component: AppSider,
     children: [
       {
-        path: '/framework',
-        name: 'Framework',
-        component: Menu,
-        props: { id: 'framework' },
-        redirect: { name: 'FrameworkSocketIpc' },
+        path: '/example',
+        name: 'Example',
+        component: RouteView,
+        redirect: { name: 'ExampleHelloIndex' },
         children: [
           {
-            path: '/framework/socket/ipc',
-            name: 'FrameworkSocketIpc',
-            component: () => import('@/views/framework/socket/Ipc')
-          },
-          {
-            path: '/framework/socket/httpserver',
-            name: 'FrameworkSocketHttpServer',
-            component: () => import('@/views/framework/socket/HttpServer')
-          },
-          {
-            path: '/framework/socket/socketserver',
-            name: 'FrameworkSocketSocketServer',
-            component: () => import('@/views/framework/socket/SocketServer')
-          }, 
-          {
-            path: '/framework/db/index',
-            name: 'FrameworkDBIndex',
-            component: () => import('@/views/framework/db/Index')
-          },
-          {
-            path: '/framework/sqlitedb/index',
-            name: 'FrameworkSqliteDBIndex',
-            component: () => import('@/views/framework/sqlitedb/Index')
-          },
-          {
-            path: '/framework/jobs/index',
-            name: 'FrameworkJobsIndex',
-            component: () => import('@/views/framework/jobs/Index')
-          },
-          {
-            path: '/framework/updater/index',
-            name: 'FrameworkUpdaterIndex',
-            component: () => import('@/views/framework/updater/Index')
-          }, 
-          {
-            path: '/framework/software/index',
-            name: 'FrameworkSoftwareIndex',
-            component: () => import('@/views/framework/software/Index')
-          },
-          {
-            path: '/framework/java/index',
-            name: 'FrameworkJavaIndex',
-            component: () => import('@/views/framework/java/Index')
-          },
-          {
-            path: '/framework/testapi/index',
-            name: 'FrameworkTestApiIndex',
-            component: () => import('@/views/framework/testapi/Index')
-          },
-        ]  
-      },
-      {
-        path: '/os',
-        name: 'Os',
-        component: Menu,
-        props: { id: 'os' },
-        redirect: { name: 'OsFileIndex' },
-        children: [
-          {
-            path: '/os/file/index',
-            name: 'OsFileIndex',
-            component: () => import('@/views/os/file/Index')
-          },
-          {
-            path: '/os/windowview/index',
-            name: 'OsWindowViewIndex',
-            component: () => import('@/views/os/windowview/Index')
-          },
-          {
-            path: '/os/window/index',
-            name: 'OsWindowIndex',
-            component: () => import('@/views/os/window/Index')
-          },
-          {
-            path: '/os/notification/index',
-            name: 'OsNotificationIndex',
-            component: () => import('@/views/os/notification/Index')
-          },
-          {
-            path: '/os/powermonitor/index',
-            name: 'OsPowerMonitorIndex',
-            component: () => import('@/views/os/powermonitor/Index')
-          },
-          {
-            path: '/os/screen/index',
-            name: 'OsScreenIndex',
-            component: () => import('@/views/os/screen/Index')
-          },
-          {
-            path: '/os/theme/index',
-            name: 'OsThemeIndex',
-            component: () => import('@/views/os/theme/Index')
-          },   
-          {
-            path: '/os/system/index',
-            name: 'OsSystemIndex',
-            component: () => import('@/views/os/system/Index')
-          },
-        ]  
-      },      
-      {
-        path: '/hardware',
-        name: 'Hardware',
-        component: Menu,
-        props: { id: 'hardware' },
-        redirect: { name: 'HardwarePrinterIndex' },
-        children: [
-          {
-            path: '/hardware/printer/index',
-            name: 'HardwarePrinterIndex',
-            component: () => import('@/views/hardware/printer/Index')
-          },
-        ]  
-      },
-      {
-        path: '/effect',
-        name: 'Effect',
-        component: Menu,
-        props: { id: 'effect' },
-        redirect: { name: 'EffectVideoIndex' },
-        children: [
-          {
-            path: '/effect/video/index',
-            name: 'EffectVideoIndex',
-            component: () => import('@/views/effect/video/Index')
+            path: '/example/hello/index',
+            name: 'ExampleHelloIndex',
+            component: () => import('@/views/example/hello/Index')
           },
         ]  
       },
+      // {
+      //   path: '/example',
+      //   name: 'Example',
+      //   component: Menu,
+      //   props: { id: 'example' },
+      //   redirect: { name: 'ExampleHelloIndex' },
+      //   children: [
+      //     {
+      //       path: '/example/hello/index',
+      //       name: 'ExampleHelloIndex',
+      //       component: () => import('@/views/example/hello/Index')
+      //     },
+      //   ]  
+      // },
     ]
-  },
-  {
-    path: '/special',
-    component: RouteView,
-    children: [
-      {
-        path: 'subwindow',
-        name: 'SpecialSubwindowIpc',
-        component: () => import('@/views/os/subwindow/Ipc')
-      }
-    ]
-  },
+  }
 ]

+ 4 - 118
frontend/src/config/subMenu.js

@@ -2,126 +2,12 @@
  * 子菜单
  */
 export default {
-	framework: {
+  example: {
 		'menu_100' : {
 			icon: 'profile',
-			title: '通信',
-			pageName: 'FrameworkSocketIpc',
+			title: 'Example',
+			pageName: 'ExampleHelloIndex',
 			params: {}
 		},
-		'menu_101' : {
-			icon: 'profile',
-			title: 'http服务',
-			pageName: 'FrameworkSocketHttpServer',
-			params: {}
-		},
-		'menu_102' : {
-			icon: 'profile',
-			title: 'socket服务',
-			pageName: 'FrameworkSocketSocketServer',
-			params: {}
-		},    
-		'menu_103' : {
-			icon: 'profile',
-			title: 'json数据库',
-			pageName: 'FrameworkDBIndex',
-			params: {}
-		},
-		'menu_104' : {
-			icon: 'profile',
-			title: 'sqlite数据库',
-			pageName: 'FrameworkSqliteDBIndex',
-			params: {}
-		},
-		'menu_105' : {
-			icon: 'profile',
-			title: '任务',
-			pageName: 'FrameworkJobsIndex',
-			params: {}
-		},				
-		'menu_106' : {
-			icon: 'profile',
-			title: '自动更新',
-			pageName: 'FrameworkUpdaterIndex',
-			params: {}
-		},    
-		'menu_107' : {
-			icon: 'profile',
-			title: '软件调用',
-			pageName: 'FrameworkSoftwareIndex',
-			params: {}
-		},		
-    'menu_108' : {
-			icon: 'profile',
-			title: 'java',
-			pageName: 'FrameworkJavaIndex',
-			params: {}
-		},
-    'menu_109' : {
-			icon: 'profile',
-			title: '测试',
-			pageName: 'FrameworkTestApiIndex',
-			params: {}
-		},                                             
-	},	
-  os: {
-		'menu_100' : {
-			icon: 'profile',
-			title: '文件',
-			pageName: 'OsFileIndex',
-			params: {}
-		},
-		'menu_101' : {
-			icon: 'profile',
-			title: '视图',
-			pageName: 'OsWindowViewIndex',
-			params: {}
-		},
-		'menu_102' : {
-			icon: 'profile',
-			title: '窗口',
-			pageName: 'OsWindowIndex',
-			params: {}
-		},
-		'menu_103' : {
-			icon: 'profile',
-			title: '桌面通知',
-			pageName: 'OsNotificationIndex',
-			params: {}
-		},
-		'menu_104' : {
-			icon: 'profile',
-			title: '电源监控',
-			pageName: 'OsPowerMonitorIndex',
-			params: {}
-		},
-		'menu_105' : {
-			icon: 'profile',
-			title: '屏幕信息',
-			pageName: 'OsScreenIndex',
-			params: {}
-		},
-		'menu_106' : {
-			icon: 'profile',
-			title: '系统主题',
-			pageName: 'OsThemeIndex',
-			params: {}
-		},   
-	},  
-	hardware: {
-		'menu_100' : {
-      icon: 'profile',
-      title: '打印机',
-      pageName: 'HardwarePrinterIndex',
-      params: {}
-		}                                               
-  },
-  effect: {
-    'menu_100' : {
-      icon: 'profile',
-      title: '视频播放器',
-      pageName: 'EffectVideoIndex',
-      params: {}
-    }                                                 
-  } 	
+  }
 }

+ 2 - 20
frontend/src/layouts/AppSider.vue

@@ -34,27 +34,9 @@ export default {
         'menu_1' : {
           icon: 'home',
           title: '框架',
-          pageName: 'Framework',
+          pageName: 'Example',
           params: {},
-        },
-        'menu_2' : {
-          icon: 'desktop',
-          title: '系统',
-          pageName: 'Os',
-          params: {},
-        },
-        'menu_3' : {
-          icon: 'control',
-          title: '硬件',
-          pageName: 'Hardware',
-          params: {},
-        },
-        'menu_4' : {
-          icon: 'bulb',
-          title: '特效',
-          pageName: 'Effect',
-          params: {},
-        },            
+        },           
       }
     };
   },

+ 0 - 8
frontend/src/layouts/Menu.vue

@@ -51,14 +51,6 @@ export default {
     menuHandle () {
       this.current = this.default_key;
       this.menu = subMenu[this.id];
-      // switch (this.id) {
-      //   case 'base' :
-      //     this.menu = subMenu.base;
-      //     break;
-      //   case 'other' :
-      //     this.menu = subMenu.other;
-      //     break;                                    
-      // }
       const linkInfo = this.menu[this.current];
       this.$router.push({ name: linkInfo.pageName, params: linkInfo.params});
     },

+ 0 - 92
frontend/src/views/effect/video/Index.vue

@@ -1,92 +0,0 @@
-<template>
-  <div id="app-effect-video">
-    <div class="one-block-1">
-      <span>
-        1. 视频播放
-      </span>
-    </div>  
-    <!-- <div class="one-block-2">
-      <a-button @click="selectFile()"> 打开 / 浏览 </a-button>
-    </div> -->
-    <div class="one-block-2">
-      <div id="video-player"></div>
-    </div>    
-  </div>
-</template>
-<script>
-import Player from 'xgplayer'
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      fileUrl: '',
-      p: {},
-      op: {
-        id: 'video-player',
-        volume: 0.3,
-        url:'//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-360p.mp4',
-        poster: "//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg",
-        playsinline: false,
-        danmu: {
-          comments: [
-            {
-              duration: 15000,
-              id: '1',
-              start: 3000,
-              txt: '这是一个弹幕',
-              style: {  //弹幕自定义样式
-                color: '#ff9500',
-                fontSize: '20px',
-                border: 'solid 1px #ff9500',
-                borderRadius: '50px',
-                padding: '5px 11px',
-                backgroundColor: 'rgba(255, 255, 255, 0.1)'
-              }
-            }
-          ],
-          area: {
-            start: 0,
-            end: 1
-          }
-        },
-      },
-    };
-  },
-  mounted () {
-    this.init();
-  },    
-  methods: {
-    init () {
-      //require('E:/video/nos_mp4_2021_05_30_sga9a3cj7_shd.mp4')
-      this.p = new Player(this.op);
-    },    
-    selectFile () {
-      const params = {}
-      this.$ipc.invoke(ipcApiRoute.selectFile, params).then(res => {
-        console.log('res:', res)
-        if (res) {
-          this.fileUrl = res;
-          this.p.start(self.fileUrl);
-        } else {
-          this.$message.warning('请选择视频');
-        }
-      }) 
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-effect-video {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 81 - 0
frontend/src/views/example/hello/Index.vue

@@ -0,0 +1,81 @@
+<template>
+  <section id="hero">
+    <h1 class="tagline">
+      <span class="accent">Electron-Egg</span>
+    </h1>
+    <p class="description">
+      A fast, desktop software development framework.
+    </p>
+    <p class="actions">
+      <a class="setup" href="https://www.kaka996.com/" target="_blank">Get Started</a>
+    </p>
+  </section>
+</template>
+<script>
+
+export default {
+  data() {
+    return {
+      action_url: '',
+    };
+  },
+  methods: {
+    test () {
+      // 
+    },
+  }
+};
+</script>
+<style scoped>
+section {
+  padding: 42px 32px;
+}
+
+#hero {
+  padding: 96px 32px;
+  text-align: center;
+}
+
+.tagline {
+  font-size: 52px;
+  line-height: 1.25;
+  font-weight: 900;
+  letter-spacing: -1.5px;
+  max-width: 960px;
+  margin: 0px auto;
+}
+html:not(.dark) .accent,
+.dark .tagline {
+  background: -webkit-linear-gradient(315deg, #42d392 25%, #647eff);
+  background-clip: text;
+  -webkit-background-clip: text;
+  -webkit-text-fill-color: transparent;
+}
+
+.description {
+  max-width: 960px;
+  line-height: 1.5;
+  color: var(--vt-c-text-2);
+  transition: color 0.5s;
+  font-size: 22px;
+  margin: 24px auto 40px;
+}
+.actions a {
+  font-size: 16px;
+  display: inline-block;
+  background-color: var(--vt-c-bg-mute);
+  padding: 8px 18px;
+  font-weight: 500;
+  border-radius: 8px;
+  transition: background-color 0.5s, color 0.5s;
+}
+.actions .setup {
+  color: var(--vt-c-text-code);
+  background: -webkit-linear-gradient(315deg, #42d392 25%, #647eff);
+}
+.actions .setup:hover {
+  background-color: var(--vt-c-gray-light-4);
+  transition-duration: 0.2s;
+}
+</style>
+  

+ 0 - 214
frontend/src/views/framework/db/Index.vue

@@ -1,214 +0,0 @@
-<template>
-  <div id="app-base-db">
-    <div class="one-block-1">
-      <span>
-        1. jsondb本地数据库
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="8">
-          • 小数据量: 0~100M(单库)
-        </a-col>
-        <a-col :span="8">
-          • json数据库
-        </a-col>
-        <a-col :span="8">
-          • 兼容lodash语法
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 测试数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="24">
-          {{ all_list }}
-        </a-col>
-      </a-row>
-    </div>    
-    <div class="one-block-1">
-      <span>
-        3. 添加数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="name" :value="name" addon-before="姓名" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-input v-model="age" :value="age" addon-before="年龄" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="dbOperation('add')">
-            添加
-          </a-button>
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        4. 获取数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="search_age" :value="search_age" addon-before="年龄" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="dbOperation('get')">
-            查找
-          </a-button>
-        </a-col>
-      </a-row>
-      <a-row>
-        <a-col :span="24">
-          {{ userList }}
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        5. 修改数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="update_name" :value="update_name" addon-before="姓名" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-input v-model="update_age" :value="update_age" addon-before="年龄" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="dbOperation('update')">
-            更新
-          </a-button>
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        6. 删除数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="delete_name" :value="delete_name" addon-before="姓名" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="dbOperation('del')">
-            删除
-          </a-button>
-        </a-col>
-      </a-row>
-    </div>       
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      name: '张三',
-      age: 10,
-      userList: ['空'],
-      search_age: 10,
-      update_name: '张三',
-      update_age: 21,
-      delete_name: '张三',
-      all_list: ['空']
-    };
-  },
-  mounted () {
-    this.getAllTestData();
-  },
-  methods: {
-    getAllTestData () {
-      const params = {
-        action: 'all',
-      }
-      this.$ipc.invoke(ipcApiRoute.dbOperation, params).then(res => {
-        console.log('res:', res);
-        if (res.all_list.length == 0) {
-          return false;
-        }
-        this.all_list = res.all_list;
-      }) 
-    },
-    dbOperation (ac) {
-      const params = {
-        action: ac,
-        info: {
-          name: this.name,
-          age: parseInt(this.age)
-        },
-        search_age: parseInt(this.search_age),
-        update_name: this.update_name,
-        update_age: parseInt(this.update_age),
-        delete_name: this.delete_name,
-      }
-      if (ac == 'add' && this.name.length == 0) {
-        this.$message.error(`请填写数据`);
-      }
-      this.$ipc.invoke(ipcApiRoute.dbOperation, params).then(res => {
-        console.log('res:', res);
-        if (ac == 'get') {
-          if (res.result.length == 0) {
-            this.$message.error(`没有数据`);
-            return;
-          }
-          this.userList = res.result;
-        }
-        if (res.all_list.length == 0) {
-          this.all_list = ['空'];
-          return;
-        }
-        this.all_list = res.all_list;
-        this.$message.success(`success`);
-      }) 
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-db {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 85
frontend/src/views/framework/java/Index.vue

@@ -1,85 +0,0 @@
-<template>
-  <div id="app-other">
-    <div class="one-block-1">
-      <span>
-        请求java服务接口
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="startServer()"> 启动java项目 </a-button>
-        <a-button @click="sendRequest()"> 测试接口 </a-button>
-        <a-button @click="closeServer()"> 关闭java项目 </a-button>
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-import storage from 'store2'
-import { ipcApiRoute } from '@/api/main';
-
-export default {
-  data() {
-    return {
-      server: '',
-    };
-  },
-  mounted() {
-
-  },  
-  methods: {
-    startServer () {
-      this.$ipc.invoke(ipcApiRoute.startJavaServer, {}).then(r => {
-        if (r.code != 0) {
-          this.$message.error(r.msg);
-        } else {
-          this.$message.info('异步启动');
-          storage.set('javaService', r.server);
-        }
-      })
-    },
-
-    closeServer () {
-      this.$ipc.invoke(ipcApiRoute.closeJavaServer, {}).then(r => {
-        if (r.code != 0) {
-          this.$message.error(r.msg);
-        }
-        this.$message.info('异步关闭');
-        storage.remove('javaService');
-      })
-    },
-
-    sendRequest () {
-      const server = storage.get('javaService') || '';
-      if (server == '') {
-        this.$message.error('服务未开启 或 正在启动中');
-        return
-      }
-      let testApi = server + '/test1/get';
-      let params = {
-        url: testApi,
-        method: 'get',
-        params: { id: '1111111'},
-        timeout: 60000,
-      }
-      this.$http(params).then(res => {
-        this.$message.info(`java服务返回: ${res}`, );
-      })
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-other {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 161
frontend/src/views/framework/jobs/Index.vue

@@ -1,161 +0,0 @@
-<template>
-  <div id="app-base-jobs">
-    <div class="one-block-1">
-      <span>
-        1. 任务 / 并发任务
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="runJob(1, 'create')">执行任务1</a-button>
-        进度:{{ progress1 }} , 进程pid:{{ progress1_pid }}
-        <a-button @click="runJob(1, 'close')">关闭</a-button>
-      </a-space>
-      <p></p>
-      <a-space>
-        <a-button @click="runJob(2, 'create')">执行任务2</a-button>
-        进度:{{ progress2 }} , 进程pid:{{ progress2_pid }}
-        <a-button @click="runJob(2, 'close')">关闭</a-button>
-      </a-space>            
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 任务池 / 并发任务
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="createPool()">创建进程池</a-button>
-        进程pids:{{ processPids }}
-      </a-space>
-      <p></p>      
-      <a-space>
-        <a-button @click="runJobByPool(3, 'run')">执行任务3</a-button>
-        进度:{{ progress3 }} , 进程pid:{{ progress3_pid }}
-      </a-space>
-      <p></p>
-      <a-space>
-        <a-button @click="runJobByPool(4, 'run')">执行任务4</a-button>
-        进度:{{ progress4 }} , 进程pid:{{ progress4_pid }}
-      </a-space>            
-    </div>            
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-export default {
-  data() {
-    return {
-      progress1: 0,
-      progress1_pid: 0,
-      progress2: 0,
-      progress2_pid: 0,
-      progress3: 0,
-      progress3_pid: 0,
-      progress4: 0,
-      progress4_pid: 0,
-      processPids: '',
-    }
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      // 避免重复监听,或者将 on 功能写到一个统一的地方,只加载一次
-      this.$ipc.removeAllListeners(ipcApiRoute.timerJobProgress);
-      this.$ipc.removeAllListeners(ipcApiRoute.createPoolNotice);
-
-      // 监听任务进度
-      this.$ipc.on(ipcApiRoute.timerJobProgress, (event, result) => {
-        switch (result.jobId) {
-          case 1:
-            this.progress1 = result.number;
-            this.progress1_pid = result.pid == 0 ? result.pid : this.progress1_pid;
-            break;
-          case 2:
-            this.progress2 = result.number;
-            this.progress2_pid = result.pid == 0 ? result.pid : this.progress2_pid;
-            break;
-          case 3:
-            this.progress3 = result.number;
-            this.progress3_pid = result.pid == 0 ? result.pid : this.progress3_pid;
-            break;
-          case 4:
-            this.progress4 = result.number;  
-            this.progress4_pid = result.pid == 0 ? result.pid : this.progress4_pid;          
-            break;
-        }
-      })
-
-      // 监听pool
-      this.$ipc.on(ipcApiRoute.createPoolNotice, (event, result) => {
-        let pidsStr = JSON.stringify(result);
-        this.processPids = pidsStr;
-      })   
-    },
-    runJob(jobId, operation) {
-      let params = {
-        id: jobId,
-        type: 'timer',
-        action: operation
-      }
-      this.$ipc.invoke(ipcApiRoute.someJob, params).then(data => {
-        switch (data.jobId) {
-          case 1:
-            if (data.action == 'create') {
-              this.progress1_pid = data.result.pid;
-            }
-            break;
-          case 2:
-            if (data.action == 'create') {
-              this.progress2_pid = data.result.pid;
-            }
-            break;
-        }
-      })
-    },
-    createPool() {
-      let params = {
-        number: 3,
-      }
-      this.$ipc.send(ipcApiRoute.createPool, params);
-    },
-    runJobByPool(jobId, operation) {
-      let params = {
-        id: jobId,
-        type: 'timer',
-        action: operation
-      }
-      this.$ipc.invoke(ipcApiRoute.someJobByPool, params).then(data => {
-        switch (data.jobId) {
-          case 3:
-            if (data.action == 'run') {
-              this.progress3_pid = data.result.pid;
-            }
-            break;
-          case 4:
-            if (data.action == 'run') {
-              this.progress4_pid = data.result.pid;
-            }
-            break;
-        }
-      })
-    },
-  }
-}
-</script>
-<style lang="less" scoped>
-#app-base-jobs {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 79
frontend/src/views/framework/socket/HttpServer.vue

@@ -1,79 +0,0 @@
-<template>
-  <div id="app-base-httpserver">
-    <div class="one-block-1">
-      <span>
-        1. 内置http server服务
-      </span>
-    </div>
-    <div class="one-block-2">
-      <a-space>
-        <p>* 状态:{{ currentStatus }}</p>
-      </a-space>
-      <p>* 地址:{{ servicAddress }}</p>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 发送请求
-      </span>
-    </div>    
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="sendRequest('pictures')"> 打开【我的图片】 </a-button>
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-import storage from 'store2'
-import { ipcApiRoute, requestHttp } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      currentStatus: '关闭',
-      servicAddress: '无'
-    };
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      this.$ipc.invoke(ipcApiRoute.checkHttpServer, {}).then(r => {
-        if (r.enable) {
-          this.currentStatus = '开启';
-          this.servicAddress = r.server;
-          storage.set('httpServiceConfig', r);
-        }
-      })
-    },
-    sendRequest (id) {
-      if (this.currentStatus == '关闭') {
-        this.$message.error('http服务未开启');
-        return;
-      }
-
-      const params = {
-        id: id
-      }
-      requestHttp(ipcApiRoute.doHttpRequest, params).then(res => {
-        //console.log('res:', res)
-      }) 
-    },  
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-httpserver {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 153
frontend/src/views/framework/socket/Ipc.vue

@@ -1,153 +0,0 @@
-<template>
-  <div id="app-base-socket-ipc">
-    <div class="one-block-1">
-      <span>
-        1. 发送异步消息
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="handleInvoke">发送 - 回调</a-button>
-        结果:{{ message1 }}
-      </a-space>
-      <p></p>
-      <a-space>
-        <a-button @click="handleInvoke2">发送 - async/await</a-button>
-        结果:{{ message2 }}
-      </a-space>            
-    </div>   
-    <div class="one-block-1">
-      <span>
-        <!-- 尽量不要使用,任何错误都容易引起卡死 -->
-        2. 同步消息(不推荐,阻塞执行)
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="handleSendSync">同步消息</a-button>
-        结果:{{ message3 }}
-      </a-space>   
-    </div>        
-    <div class="one-block-1">
-      <span>
-        3. 长消息: 服务端持续向前端页面发消息
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="sendMsgStart">开始</a-button>
-        <a-button @click="sendMsgStop">结束</a-button>
-        结果:{{ messageString }}
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        4. 多窗口通信:子窗口与主进程通信,子窗口互相通信
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="createWindow(0)">打开新窗口2</a-button>
-        <a-button @click="sendTosubWindow()">向新窗口2发消息</a-button>
-      </a-space>
-    </div>      
-  </div>
-</template>
-<script>
-import { ipcApiRoute, specialIpcRoute } from '@/api/main'
-export default {
-  data() {
-    return {
-      messageString: '',
-      message1: '',
-      message2: '',
-      message3: '',
-      windowName: 'window-ipc',
-      newWcId: 0,
-      views: [
-        {
-          type: 'vue',
-          content: '/#/special/subwindow',
-          windowName: 'window-ipc',
-          windowTitle: 'ipc window'
-        },    
-      ],
-    }
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      // 避免重复监听,或者将 on 功能写到一个统一的地方,只加载一次
-      this.$ipc.removeAllListeners(ipcApiRoute.ipcSendMsg);
-      this.$ipc.on(ipcApiRoute.ipcSendMsg, (event, result) => {
-        console.log('[ipcRenderer] [socketMsgStart] result:', result);
-
-        this.messageString = result;
-        // 调用后端的另一个接口
-        event.sender.send(ipcApiRoute.hello, 'electron-egg');
-      })
-
-      // 监听 窗口2 发来的消息
-      this.$ipc.removeAllListeners(specialIpcRoute.window2ToWindow1);
-      this.$ipc.on(specialIpcRoute.window2ToWindow1, (event, arg) => {
-        this.$message.info(arg);
-      })
-    },
-    sendMsgStart() {
-      const params = {
-        type: 'start',
-        content: '开始'
-      }
-      this.$ipc.send(ipcApiRoute.ipcSendMsg, params)
-    },
-    sendMsgStop() {
-      const params = {
-        type: 'end',
-        content: ''
-      }
-      this.$ipc.send(ipcApiRoute.ipcSendMsg, params)
-    },
-    handleInvoke() {
-      this.$ipc.invoke(ipcApiRoute.ipcInvokeMsg, '异步-回调').then(r => {
-        console.log('r:', r);
-        this.message1 = r;
-      });
-    },
-    async handleInvoke2() {
-      const msg = await this.$ipc.invoke(ipcApiRoute.ipcInvokeMsg, '异步');
-      console.log('msg:', msg);
-      this.message2 = msg;
-    },
-    handleSendSync() {
-      const msg = this.$ipc.sendSync(ipcApiRoute.ipcSendSyncMsg, '同步');
-      this.message3 = msg;
-    },
-    createWindow(index) {
-      this.$ipc.invoke(ipcApiRoute.createWindow, this.views[index]).then(id => {
-        console.log('[createWindow] id:', id);
-      })
-    },
-    async sendTosubWindow() {
-      // 新窗口id
-      this.newWcId = await this.$ipc.invoke(ipcApiRoute.getWCid, this.windowName);
-      this.$ipc.sendTo(this.newWcId, specialIpcRoute.window1ToWindow2, '窗口1通过 sendTo 给窗口2发送消息');
-    },
-  }
-}
-</script>
-<style lang="less" scoped>
-#app-base-socket-ipc {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 76
frontend/src/views/framework/socket/SocketServer.vue

@@ -1,76 +0,0 @@
-<template>
-  <div id="app-base-httpserver">
-    <div class="one-block-1">
-      <span>
-        1. 内置socket-io server服务
-      </span>
-    </div>
-    <div class="one-block-2">
-      <a-space>
-        <p>* 状态:{{ currentStatus }}</p>
-      </a-space>
-      <p>* 地址:{{ servicAddress }}</p>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 发送请求
-      </span>
-    </div>    
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="sendRequest('downloads')"> 打开【我的下载】 </a-button>
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-import { io } from 'socket.io-client'
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      currentStatus: '关闭',
-      servicAddress: 'ws://localhost:7070'
-    };
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      this.socket = io(this.servicAddress);
-      this.socket.on('connect', () => {
-        console.log('connect!!!!!!!!');
-        this.currentStatus = '开启';
-      });
-    },
-    sendRequest (id) {
-      if (this.currentStatus == '关闭') {
-        this.$message.error('socketio服务未开启');
-        return;
-      }
-
-      const method = ipcApiRoute.doSocketRequest; 
-      this.socket.emit('c1', { cmd: method, params: {id: id} }, (response) => {
-        // response为返回值
-        console.log('response:', response)
-      });
-    },  
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-httpserver {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 67
frontend/src/views/framework/software/Index.vue

@@ -1,67 +0,0 @@
-<template>
-  <div id="app-base-software-open">
-    <div class="one-block-1">
-      <span>
-        1. 调用其它软件(exe、bash等可执行程序)
-      </span>
-      <p/>
-      <span class="sub-content">
-        注:请先将【powershell.exe】复制到【electron-egg/build/extraResources】目录中
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-list bordered :data-source="data">
-        <a-list-item slot="renderItem" slot-scope="item" @click="openSoft(item.id)">
-          {{ item.content }}
-          <a-button type="link">
-            执行
-          </a-button>
-        </a-list-item>
-      </a-list>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-const data = [
-  {
-    content: 'powershell.exe',
-    id: 'powershell.exe'
-  }
-];
-
-export default {
-  data() {
-    return {
-      data,
-    };
-  },
-  methods: {
-    openSoft (id) { 
-      this.$ipc.invoke(ipcApiRoute.openSoftware, id).then(result => {
-        if (!result) {
-          this.$message.error('程序不存在');
-        }
-      })       
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-software-open {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-    .sub-content {
-      font-size: 14px;
-    }
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 270
frontend/src/views/framework/sqlitedb/Index.vue

@@ -1,270 +0,0 @@
-<template>
-  <div id="app-base-db">
-    <div class="one-block-1">
-      <span>
-        1. sqlite本地数据库
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="8">
-          • 大数据量: 0-1024GB(单库)
-        </a-col>
-        <a-col :span="8">
-          • 高性能
-        </a-col>
-        <a-col :span="8">
-          • 类mysql语法
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 数据目录
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="12">
-          <a-input v-model="data_dir" :value="data_dir" addon-before="数据目录" />
-        </a-col>
-        <a-col :span="2">
-        </a-col>
-        <a-col :span="5">
-          <a-button @click="selectDir">
-            修改目录
-          </a-button>
-        </a-col>
-        <a-col :span="5">
-          <a-button @click="openDir">
-            打开目录
-          </a-button>
-        </a-col>        
-      </a-row>
-    </div>     
-    <div class="one-block-1">
-      <span>
-        3. 测试数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="24">
-          {{ all_list }}
-        </a-col>
-      </a-row>
-    </div>    
-    <div class="one-block-1">
-      <span>
-        4. 添加数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="name" :value="name" addon-before="姓名" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-input v-model="age" :value="age" addon-before="年龄" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="sqlitedbOperation('add')">
-            添加
-          </a-button>
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        4. 获取数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="search_age" :value="search_age" addon-before="年龄" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="sqlitedbOperation('get')">
-            查找
-          </a-button>
-        </a-col>
-      </a-row>
-      <a-row>
-        <a-col :span="24">
-          {{ userList }}
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        5. 修改数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="update_name" :value="update_name" addon-before="姓名(条件)" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-input v-model="update_age" :value="update_age" addon-before="年龄" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="sqlitedbOperation('update')">
-            更新
-          </a-button>
-        </a-col>
-      </a-row>
-    </div>
-    <div class="one-block-1">
-      <span>
-        6. 删除数据
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="6">
-          <a-input v-model="delete_name" :value="delete_name" addon-before="姓名" />
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-        </a-col>
-        <a-col :span="3">
-        </a-col>
-        <a-col :span="6">
-          <a-button @click="sqlitedbOperation('del')">
-            删除
-          </a-button>
-        </a-col>
-      </a-row>
-    </div>       
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      name: '李四',
-      age: 20,
-      userList: ['空'],
-      search_age: 20,
-      update_name: '李四',
-      update_age: 31,
-      delete_name: '李四',
-      all_list: ['空'],
-      data_dir: ''
-    };
-  },
-  mounted () {
-    this.init();
-    this.getAllTestData();
-  },
-  methods: {
-    init() {
-      const params = {
-        action: 'getDataDir',
-      }
-      this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
-        this.data_dir = res.result;
-      }) 
-    },
-    getAllTestData () {
-      const self = this;
-      const params = {
-        action: 'all',
-      }
-      this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
-        if (res.all_list.length == 0) {
-          return false;
-        }
-        self.all_list = res.all_list;
-      }) 
-    },
-    selectDir() {
-      this.$ipc.invoke(ipcApiRoute.selectFolder, '').then(r => {
-        this.data_dir = r;
-        // 修改数据目录
-        this.modifyDataDir(r);
-      })
-    },
-    openDir() {
-      console.log('dd:', this.data_dir);
-      this.$ipc.invoke(ipcApiRoute.openDirectory, {id: this.data_dir}).then(res => {
-        //
-      })
-    },    
-    modifyDataDir(dir) {
-      const params = {
-        action: 'setDataDir',
-        data_dir: dir
-      }
-      this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
-        this.all_list = res.all_list;
-      }) 
-    },
-    sqlitedbOperation (ac) {
-      const params = {
-        action: ac,
-        info: {
-          name: this.name,
-          age: parseInt(this.age)
-        },
-        search_age: parseInt(this.search_age),
-        update_name: this.update_name,
-        update_age: parseInt(this.update_age),
-        delete_name: this.delete_name,
-      }
-      if (ac == 'add' && this.name.length == 0) {
-        this.$message.error(`请填写数据`);
-      }
-      this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
-        console.log('res:', res);
-        if (ac == 'get') {
-          if (res.result.length == 0) {
-            this.$message.error(`没有数据`);
-            return;
-          }
-          this.userList = res.result;
-        }
-        if (res.all_list.length == 0) {
-          this.all_list = ['空'];
-          return;
-        }
-        this.all_list = res.all_list;
-        this.$message.success(`success`);
-      }) 
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-db {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 37
frontend/src/views/framework/test/Index.vue

@@ -1,37 +0,0 @@
-<template>
-  <div id="app-other">
-    <div class="one-block-1">
-      <span>
-        待开发...
-      </span>
-    </div>  
-    <div class="one-block-2">
-    </div>
-  </div>
-</template>
-<script>
-
-export default {
-  data() {
-    return {};
-  },
-  methods: {
-    test () {
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-other {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 58
frontend/src/views/framework/testapi/Index.vue

@@ -1,58 +0,0 @@
-<template>
-  <div id="app-base-test-api">
-    <div class="one-block-1">
-      <span>
-        1. 测试一些操作系统api
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="exec(1)"> 点击 </a-button>
-        <a-button @click="exec2(1)"> 点击2 </a-button>
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute, requestHttp } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      type: 1,
-    };
-  },
-  methods: {
-    exec (id) {
-      const params = {
-        id: id
-      }
-      this.$ipc.invoke(ipcApiRoute.test, params).then(res => {
-        console.log('res:', res)
-      }) 
-    },
-    exec2 (id) {
-      const params = {
-        id: id
-      }
-      requestHttp(ipcApiRoute.test, params).then(res => {
-        console.log('res2:', res)
-      }) 
-    },    
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-test-api {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 85
frontend/src/views/framework/updater/Index.vue

@@ -1,85 +0,0 @@
-<template>
-  <div id="app-demo-window">
-    <div class="one-block-1">
-      <span>
-        1. 自动更新
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="checkForUpdater()">检查更新</a-button>
-        <a-button @click="download()">下载并安装</a-button>
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 下载进度
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-progress :percent="percentNumber" status="active" />
-      <a-space>
-        {{ progress }}
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute, specialIpcRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      status: 0, // -1:异常,1:有可用更新,2:没有可用更新,3:下载中, 4:下载完成
-      progress: '',
-      percentNumber: 0
-    };
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      this.$ipc.removeAllListeners(specialIpcRoute.appUpdater);
-      this.$ipc.on(specialIpcRoute.appUpdater, (event, result) => {
-        result = JSON.parse(result);
-        this.status = result.status;
-        if (result.status == 3) {
-          this.progress = result.desc;
-          this.percentNumber = result.percentNumber;
-        } else {
-          this.$message.info(result.desc);
-        }
-      })
-    },
-    checkForUpdater () {
-      this.$ipc.invoke(ipcApiRoute.checkForUpdater).then(r => {
-        console.log(r);
-      })
-    },
-    download () {
-      if (this.status !== 1) {
-        this.$message.info('没有可用版本');
-        return
-      }
-      this.$ipc.invoke(ipcApiRoute.downloadApp).then(r => {
-        console.log(r);
-      })
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-demo-window {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 97
frontend/src/views/hardware/printer/Index.vue

@@ -1,97 +0,0 @@
-<template>
-  <div id="app-hw-bluetooth">
-    <div class="one-block-1">
-      <span>
-        1. 打印机设备
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-button @click="getPrinter()"> 获取打印机列表 </a-button>
-    </div>
-    <div class="one-block-2">
-      <a-list size="small" bordered :data-source="printerList">
-        <a-list-item slot="renderItem" slot-scope="item">
-          {{ item.displayName }} {{ defaultDevice(item) }}
-        </a-list-item>
-        <div slot="header">
-          设备列表
-        </div>
-      </a-list>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 打印内容
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-button @click="doPrint(0)"> 打印一个页面 </a-button>
-    </div>      
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      defaultDeviceName: '',
-      printerList: [],
-      views: [
-        {
-          type: 'html',
-          content: '/public/html/view_example.html'
-        },        
-      ],
-    };
-  },
-  mounted () {
-    this.init();
-  },  
-  methods: {
-    init () {
-      // 避免重复监听,或者将 on 功能写到一个统一的地方,只加载一次
-      this.$ipc.removeAllListeners(ipcApiRoute.printStatus);
-      this.$ipc.on(ipcApiRoute.printStatus, (event, result) => {
-        console.log('result', result);
-        this.$message.info('打印中...');
-      })
-    },    
-    getPrinter () {
-      this.$ipc.invoke(ipcApiRoute.getPrinterList, {}).then(res => {
-        this.printerList = res;
-      }) 
-    },
-    doPrint (index) {
-      console.log('defaultDeviceName:', this.defaultDeviceName)
-      const params = {
-        view: this.views[index],
-        deviceName: this.defaultDeviceName
-      };
-      this.$ipc.send(ipcApiRoute.print, params)
-    },
-    defaultDevice (item) {
-      let desc = "";
-      if (item.isDefault) {
-        desc = "- 默认";
-        this.defaultDeviceName = item.name;
-      }
-      
-      return desc;
-    } 
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-hw-bluetooth {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 77
frontend/src/views/os/extension/Index.vue

@@ -1,77 +0,0 @@
-<template>
-  <div id="app-base-extension">
-    <div class="one-block-1">
-      <span>
-        1. 上传扩展程序(crx文件格式)
-      </span>
-    </div>
-    <div class="one-block-2">
-      <a-upload-dragger
-        name="file"
-        :multiple="true"
-        :action="action_url"
-        @change="handleChange"
-      >
-        <p class="ant-upload-drag-icon">
-          <a-icon type="inbox" />
-        </p>
-        <p class="ant-upload-text">
-          上传
-        </p>
-        <p class="ant-upload-hint">
-        </p>
-      </a-upload-dragger>
-    </div>
-    <div class="one-block-1">
-      2. chrome扩展商店(crx下载)
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        极简插件:https://chrome.zzzmh.cn/
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-
-export default {
-  data() {
-    return {
-      action_url: process.env.VUE_APP_API_BASE_URL + '/api/example/uploadExtension',
-    };
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-    },
-		handleChange(info) {
-      const status = info.file.status;
-      if (status !== 'uploading') {
-        console.log(info.file);
-      }
-      if (status === 'done') {
-        const uploadRes = info.file.response;
-        console.log('uploadRes:', uploadRes)
-      } else if (status === 'error') {
-        this.$message.error(`${info.file.name} file upload failed.`);
-      }
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-extension {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 193
frontend/src/views/os/file/Index.vue

@@ -1,193 +0,0 @@
-<template>
-  <div id="app-base-file">
-    <div class="one-block-1">
-      <span>
-        1. 系统原生对话框
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="messageShow()">消息提示(ipc)</a-button>
-        <a-button @click="messageShowConfirm()">消息提示与确认(ipc)</a-button>
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 选择保存目录
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-row>
-        <a-col :span="12">
-          <a-input v-model="dir_path" :value="dir_path" addon-before="保存目录" />
-        </a-col>
-        <a-col :span="12">
-          <a-button @click="selectDir">
-            修改目录
-          </a-button>
-        </a-col>
-      </a-row>
-    </div>      
-    <div class="one-block-1">
-      <span>
-        3. 打开文件夹
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-list :grid="{ gutter: 16, column: 4 }" :data-source="file_list">
-        <a-list-item slot="renderItem" slot-scope="item" @click="openDirectry(item.id)">
-          <a-card :title="item.content">
-            <a-button type="link">
-              打开
-            </a-button>
-          </a-card>
-        </a-list-item>
-      </a-list>
-    </div>
-    <div class="one-block-1">
-      <span>
-        4. 上传文件到图床
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-upload-dragger
-        name="file"
-        :multiple="true"
-        :action="action_url"
-        @change="handleFileChange"
-      >
-        <p class="ant-upload-drag-icon">
-          <a-icon type="inbox" />
-        </p>
-        <p class="ant-upload-text">
-          点击 或 拖拽文件到这里
-        </p>
-        <p class="ant-upload-hint">
-          注意:请使用您自己的图床token
-        </p>
-      </a-upload-dragger>
-    </div>
-    <div class="footer">
-    </div>
-  </div>
-</template>
-<script>
-import storage from 'store2'
-import { ipcApiRoute } from '@/api/main'
-
-const fileList = [
-  {
-    content: '【下载】目录',
-    id: 'downloads'
-  },
-  {
-    content: '【图片】目录',
-    id: 'pictures'
-  },
-  {
-    content: '【文档】目录',
-    id: 'documents'
-  },
-  {
-    content: '【音乐】目录',
-    id: 'music'
-  }
-];
-
-export default {
-  data() {
-    return {
-      file_list: fileList,
-      action_url: '',
-      image_info: [],
-      num: 0,
-      servicAddress: '',
-			dir_path: "D:\\www\\ee",
-    };
-  },
-  mounted () {
-    this.getHost();
-  },
-  methods: {
-    getHost () {
-      this.$ipc.invoke(ipcApiRoute.checkHttpServer, {}).then(r => {
-        if (r.enable) {
-          this.servicAddress = r.server;
-          storage.set('httpServiceConfig', r);
-
-          // url转换
-          const host = r.server || 'http://localhost:7071';
-          let uri = ipcApiRoute.uploadFile;
-          let url = uri.split('.').join('/');
-          this.action_url = host + '/' + url;
-        }
-      })
-    },
-    openDirectry (id) {
-      this.$ipc.invoke(ipcApiRoute.openDirectory, {id: id}).then(res => {
-        //console.log('res:', res)
-      })      
-    },
-    selectDir() {
-      this.$ipc.invoke(ipcApiRoute.selectFolder, '').then(r => {
-        this.dir_path = r;
-        this.$message.info(r);
-      })      
-    },
-		messageShow() {
-      this.$ipc.invoke(ipcApiRoute.messageShow, '').then(r => {
-        this.$message.info(r);
-      })
-    },    
-    messageShowConfirm() {
-      this.$ipc.invoke(ipcApiRoute.messageShowConfirm, '').then(r => {
-        this.$message.info(r);
-      })
-    },
-    handleFileChange(info) {
-      console.log('handleFileChange-----');
-      if (this.action_url == '') {
-        this.$message.error('http服务未开启');
-        return;
-      }
-      const status = info.file.status;
-      if (status !== 'uploading') {
-        console.log(info.file);
-      }
-      if (status === 'done') {
-        const uploadRes = info.file.response;
-        console.log('uploadRes:', uploadRes)
-        if (uploadRes.code !== 'success') {
-          this.$message.error(`file upload failed ${uploadRes.code} .`);
-          return false;
-        }
-        this.num++;
-        const picInfo = uploadRes.data;
-        picInfo.id = this.num;
-        picInfo.imageUrlText = 'image url';
-        this.image_info.push(picInfo);
-        this.$message.success(`${info.file.name} file uploaded successfully.`);
-      } else if (status === 'error') {
-        this.$message.error(`${info.file.name} file upload failed.`);
-      }
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-file {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-  .footer {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 69
frontend/src/views/os/launch/Index.vue

@@ -1,69 +0,0 @@
-<template>
-  <div id="app-base-system-launch">
-    <div class="one-block-2">
-      <a-list class="set-auto" itemLayout="horizontal">
-        <a-list-item style="text-align: left;">
-          <a-list-item-meta>
-            <template v-slot:title>
-              <a>启动</a>
-            </template>
-            <template v-slot:description>
-              <span>
-                开机自动启动
-              </span>
-            </template>
-          </a-list-item-meta>
-          <template v-slot:actions>
-            <a-switch v-model="autoLaunchChecked" checkedChildren="开" unCheckedChildren="关" @change="autoLaunchChange()" />
-          </template>
-        </a-list-item>
-      </a-list>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data () {
-    return {
-      autoLaunchChecked: false
-    }
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      // todo .....
-      const self = this;
-      self.$ipcInvoke(ipcApiRoute.os.autoLaunch, 'check').then(result => {
-        console.log('[ipcRenderer] [autoLaunch] result:', result)
-        this.autoLaunchChecked = result.status;
-      })      
-    },
-    autoLaunchChange (checkStatus) {
-      console.log('[ipcRenderer] [autoLaunch] self.autoLaunchChecked:', this.autoLaunchChecked)
-    },
-  }
-}
-</script>
-<style lang="less" scoped>
-#app-base-system-launch {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-  .set-auto {
-    .ant-list-item:last-child {
-      border-bottom: 1px solid #e8e8e8;
-    }
-  }
-}  
-</style>  

+ 0 - 88
frontend/src/views/os/notification/Index.vue

@@ -1,88 +0,0 @@
-<template>
-  <div id="app-base-notification">
-    <div class="one-block-1">
-      <span>
-        1. 弹出桌面通知
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="sendNotification(0)">默认</a-button>
-        <a-button @click="sendNotification(1)">发出提示音</a-button>
-        <a-button @click="sendNotification(2)">点击通知触发事件</a-button>
-        <a-button @click="sendNotification(3)">关闭通知触发事件</a-button>
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      views: [
-        {
-          type: 'main',
-          title: '通知标题',
-          subtitle: '副标题', // macOS系统专有属性
-          body: '这是通知内容-默认',
-          silent: true,
-        },
-        {
-          type: 'main',
-          title: '提示音',
-          subtitle: '副标题-提示音',
-          body: '这是通知内容-提示音',
-          silent: false,
-        },
-        {
-          type: 'main',
-          title: '点击通知事件',
-          subtitle: '副标题-点击通知事件',
-          body: '这是通知内容-点击通知事件',
-          clickEvent: true
-        },
-        {
-          type: 'main',
-          title: '关闭通知事件',
-          subtitle: '副标题-关闭通知事件',
-          body: '这是通知内容-点击通知事件',
-          closeEvent: true
-        },             
-      ],
-    };
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      // 避免重复监听,或者将 on 功能写到一个统一的地方,只加载一次
-      this.$ipc.removeAllListeners(ipcApiRoute.sendNotification);
-      this.$ipc.on(ipcApiRoute.sendNotification, (event, result) => {
-        if (Object.prototype.toString.call(result) == '[object Object]') {
-          this.$message.info(result.msg);
-        }  
-      })
-    },
-    sendNotification (index) {
-      this.$ipc.send(ipcApiRoute.sendNotification, this.views[index]);
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-notification {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 58
frontend/src/views/os/powermonitor/Index.vue

@@ -1,58 +0,0 @@
-<template>
-  <div id="app-base-powermonitor">
-    <div class="one-block-1">
-      <span>
-        1. 监控电源状态
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <p>* 当前状态:{{ currentStatus }}</p>
-      </a-space>
-      <p>* 拔掉电源,使用电池供电</p>
-      <p>* 接入电源</p>
-      <p>* 锁屏</p>
-      <p>* 解锁</p>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      currentStatus: '无',
-    };
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      this.$ipc.removeAllListeners(ipcApiRoute.initPowerMonitor);
-      this.$ipc.on(ipcApiRoute.initPowerMonitor, (event, result) => {
-        if (Object.prototype.toString.call(result) == '[object Object]') {
-          this.currentStatus = result.msg;
-          this.$message.info(result.msg);
-        }
-      })
-      this.$ipc.send(ipcApiRoute.initPowerMonitor, '');
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-powermonitor {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 62
frontend/src/views/os/screen/Index.vue

@@ -1,62 +0,0 @@
-<template>
-  <div id="app-base-screen">
-    <div class="one-block-1">
-      <span>
-        1. 屏幕信息
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="getScreen(0)">获取当前鼠标位置</a-button>
-        <a-button @click="getScreen(1)">获取主屏幕</a-button>
-        <a-button @click="getScreen(2)">获取所有屏幕</a-button>
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        结果:
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-descriptions title="">
-        <a-descriptions-item v-for="(info, index) in data" :key="index" :label="info.title" >
-          {{ info.desc }}
-        </a-descriptions-item>
-      </a-descriptions>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      data: [],
-    };
-  },
-  mounted () {
-  },
-  methods: {
-    getScreen (index) {
-      this.$ipc.invoke(ipcApiRoute.getScreen, index).then(result => {
-        this.data = result;
-      })
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-screen {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 144
frontend/src/views/os/subwindow/Ipc.vue

@@ -1,144 +0,0 @@
-<template>
-  <div id="app-base-subwindow-ipc">
-    <div class="one-block-1">
-      <span>
-        1. 发送异步消息
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="handleInvoke">发送 - 回调</a-button>
-        结果:{{ message1 }}
-      </a-space>
-      <p></p>
-      <a-space>
-        <a-button @click="handleInvoke2">发送 - async/await</a-button>
-        结果:{{ message2 }}
-      </a-space>            
-    </div>   
-    <div class="one-block-1">
-      <span>
-        <!-- 尽量不要使用,任何错误都容易引起卡死 -->
-        2. 同步消息(不推荐,阻塞执行)
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="handleSendSync">同步消息</a-button>
-        结果:{{ message3 }}
-      </a-space>   
-    </div>        
-    <div class="one-block-1">
-      <span>
-        3. 长消息: 服务端持续向前端页面发消息
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="sendMsgStart">开始</a-button>
-        <a-button @click="sendMsgStop">结束</a-button>
-        结果:{{ messageString }}
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        4. 多窗口通信:窗口之间互相通信
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="sendTosubWindow()">向主窗口发消息</a-button>
-      </a-space>
-    </div>       
-  </div>
-</template>
-<script>
-import { ipcApiRoute, specialIpcRoute } from '@/api/main'
-export default {
-  data() {
-    return {
-      messageString: '',
-      message1: '',
-      message2: '',
-      message3: '',
-      mainWCid: 0,
-    }
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      const self = this;
-      // 避免重复监听,或者将 on 功能写到一个统一的地方,只加载一次
-      this.$ipc.removeAllListeners(ipcApiRoute.ipcSendMsg);
-      this.$ipc.on(ipcApiRoute.ipcSendMsg, (event, result) => {
-        console.log('[ipcRenderer] [socketMsgStart] result:', result);
-
-        self.messageString = result;
-        // 调用后端的另一个接口
-        event.sender.send(ipcApiRoute.hello, 'electron-egg');
-      })
-
-      // 监听主窗口发来的消息
-      this.$ipc.removeAllListeners(specialIpcRoute.window1ToWindow2);
-      this.$ipc.on(specialIpcRoute.window1ToWindow2, (event, arg) => {
-          this.$message.info(arg);
-      })
-    },
-    sendMsgStart() {
-      const params = {
-        type: 'start',
-        content: '开始'
-      }
-      this.$ipc.send(ipcApiRoute.ipcSendMsg, params)
-    },
-    sendMsgStop() {
-      const params = {
-        type: 'end',
-        content: ''
-      }
-      this.$ipc.send(ipcApiRoute.ipcSendMsg, params)
-    },
-    handleInvoke () {
-      const self = this;
-      this.$ipc.invoke(ipcApiRoute.ipcInvokeMsg, '异步-回调').then(r => {
-        console.log('r:', r);
-        self.message1 = r;
-      });
-    },
-    async handleInvoke2 () {
-      const msg = await this.$ipc.invoke(ipcApiRoute.ipcInvokeMsg, '异步');
-      console.log('msg:', msg);
-      this.message2 = msg;
-    },
-    handleSendSync () {
-      const msg = this.$ipc.sendSync(ipcApiRoute.ipcSendSyncMsg, '同步');
-      this.message3 = msg;
-    },
-    sendTosubWindow () {
-      // 获取主窗口id
-      this.$ipc.invoke(ipcApiRoute.getWCid, 'main').then(id => {
-        this.mainWCid = id;
-        this.$ipc.sendTo(this.mainWCid, specialIpcRoute.window2ToWindow1, '窗口2 通过 sendTo 给主窗口发送消息');
-      });
-    },
-  }
-}
-</script>
-<style lang="less" scoped>
-#app-base-subwindow-ipc {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  height: 100%;
-  background-color: #f0f2f5;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 68
frontend/src/views/os/system/Index.vue

@@ -1,68 +0,0 @@
-<template>
-  <div id="app-base-system-launch">
-    <div class="one-block-2">
-      <a-list class="set-auto" itemLayout="horizontal">
-        <a-list-item style="text-align: left;">
-          <a-list-item-meta>
-            <template v-slot:title>
-              <a>启动</a>
-            </template>
-            <template v-slot:description>
-              <span>
-                开机自动启动
-              </span>
-            </template>
-          </a-list-item-meta>
-          <template v-slot:actions>
-            <a-switch v-model="autoLaunchChecked" checkedChildren="开" unCheckedChildren="关" @change="autoLaunchChange()" />
-          </template>
-        </a-list-item>
-      </a-list>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data () {
-    return {
-      autoLaunchChecked: false
-    }
-  },
-  mounted () {
-    this.init();
-  },
-  methods: {
-    init () {
-      // todo .....
-      this.$ipc.invoke(ipcApiRoute.autoLaunch, 'check').then(result => {
-        console.log('[ipcRenderer] [autoLaunch] result:', result)
-        this.autoLaunchChecked = result.status;
-      })      
-    },
-    autoLaunchChange (checkStatus) {
-      console.log('[ipcRenderer] [autoLaunch] self.autoLaunchChecked:', this.autoLaunchChecked)
-    },
-  }
-}
-</script>
-<style lang="less" scoped>
-#app-base-system-launch {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-  .set-auto {
-    .ant-list-item:last-child {
-      border-bottom: 1px solid #e8e8e8;
-    }
-  }
-}  
-</style>  

+ 0 - 82
frontend/src/views/os/theme/Index.vue

@@ -1,82 +0,0 @@
-<template>
-  <div id="app-base-screen">
-    <div class="one-block-1">
-      <span>
-        1. 系统主题模式
-      </span>
-    </div>
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="getTheme()">获取模式</a-button>
-      </a-space>
-      <span>
-        结果:{{ currentThemeMode }}
-      </span>
-    </div>
-    <div class="one-block-1">
-      2. 设置主题模式(请自行实现前端UI效果)
-    </div>  
-    <div class="one-block-2">
-      <a-radio-group v-model="currentThemeMode" @change="setTheme">
-        <a-radio :value="themeList[0]">
-          {{ themeList[0] }}
-        </a-radio>
-        <a-radio :value="themeList[1]">
-          {{ themeList[1] }}
-        </a-radio>
-        <a-radio :value="themeList[2]">
-          {{ themeList[2] }}
-        </a-radio>
-      </a-radio-group>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      currentThemeMode: '',
-      themeList: [
-        'system',
-        'light',
-        'dark'
-      ]
-    };
-  },
-  mounted () {
-  },
-  methods: {
-    setTheme (e) {
-      this.currentThemeMode = e.target.value;
-      console.log('setTheme currentThemeMode:', this.currentThemeMode)
-
-      this.$ipc.invoke(ipcApiRoute.setTheme, this.currentThemeMode).then(result => {
-        console.log('result:', result)
-        this.currentThemeMode = result;
-      })      
-    },
-    getTheme () {
-      this.$ipc.invoke(ipcApiRoute.getTheme).then(result => {
-        console.log('result:', result)
-        this.currentThemeMode = result;
-      })  
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-screen {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 85
frontend/src/views/os/window/Index.vue

@@ -1,85 +0,0 @@
-<template>
-  <div id="app-base-window">
-    <div class="one-block-1">
-      <span>
-        1. 新窗口中加载web内容
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="createWindow(0)">打开哔哩哔哩</a-button>
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 新窗口中加载html内容
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="createWindow(1)">打开html页面</a-button>
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        3. 新窗口中加载当前项目页面
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="createWindow(2)">打开vue页面</a-button>
-      </a-space>
-    </div>    
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      views: [
-        {
-          type: 'web',
-          content: 'https://www.bilibili.com/',
-          windowName: 'window-web',
-          windowTitle: 'bilibili'
-        },
-        {
-          type: 'html',
-          content: '/public/html/view_example.html',
-          windowName: 'window-html',
-          windowTitle: 'html window'
-        },
-        {
-          type: 'vue',
-          content: '/#/special/subwindow',
-          windowName: 'window-vue',
-          windowTitle: 'vue window'
-        },    
-      ],
-    };
-  },
-  methods: {
-    createWindow (index) {
-      this.$ipc.invoke(ipcApiRoute.createWindow, this.views[index]).then(r => {
-        console.log(r);
-      })
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-window {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 72
frontend/src/views/os/windowview/Index.vue

@@ -1,72 +0,0 @@
-<template>
-  <div id="app-base-window-view">
-    <div class="one-block-1">
-      <span>
-        1. 嵌入web内容
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="loadViewContent(0)">加载百度页面</a-button>
-        <a-button @click="removeViewContent(0)">移除百度页面</a-button>
-      </a-space>
-    </div>
-    <div class="one-block-1">
-      <span>
-        2. 嵌入html内容
-      </span>
-    </div>  
-    <div class="one-block-2">
-      <a-space>
-        <a-button @click="loadViewContent(1)">加载html页面</a-button>
-        <a-button @click="removeViewContent(1)">移除html页面</a-button>
-      </a-space>
-    </div>
-  </div>
-</template>
-<script>
-import { ipcApiRoute } from '@/api/main'
-
-export default {
-  data() {
-    return {
-      views: [
-        {
-          type: 'web',
-          content: 'https://www.baidu.com/'
-        },
-        {
-          type: 'html',
-          content: '/public/html/view_example.html'
-        },        
-      ],
-    };
-  },
-  methods: {
-    loadViewContent (index) {
-      this.$ipc.invoke(ipcApiRoute.loadViewContent, this.views[index]).then(r => {
-        console.log(r);
-      })
-    },
-    removeViewContent (index) {
-      this.$ipc.invoke(ipcApiRoute.removeViewContent, this.views[index]).then(r => {
-        console.log(r);
-      })
-    },
-  }
-};
-</script>
-<style lang="less" scoped>
-#app-base-window-view {
-  padding: 0px 10px;
-  text-align: left;
-  width: 100%;
-  .one-block-1 {
-    font-size: 16px;
-    padding-top: 10px;
-  }
-  .one-block-2 {
-    padding-top: 10px;
-  }
-}
-</style>

+ 0 - 4
package.json

@@ -107,13 +107,9 @@
     "electron": "^13.6.9",
     "electron-builder": "^23.6.0",
     "electron-rebuild": "^3.2.8",
-    "eslint": "^5.13.0",
-    "eslint-plugin-prettier": "^3.0.1",
     "nodemon": "^2.0.16"
   },
   "dependencies": {
-    "better-sqlite3": "^7.6.2",
-    "dayjs": "^1.10.7",
     "ee-core": "^2.1.1",
     "electron-updater": "^5.3.0",
     "lodash": "^4.17.21"

+ 0 - 1
public/dist/css/app.8ada1737.css

@@ -1 +0,0 @@
-#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}#app,#app-layout-sider[data-v-0affac82]{height:100%}#app-layout-sider .logo[data-v-0affac82]{border-bottom:1px solid #e8e8e8}#app-layout-sider .pic-logo[data-v-0affac82]{height:32px;margin:10px}#app-layout-sider .layout-sider[data-v-0affac82]{border-top:1px solid #e8e8e8;border-right:1px solid #e8e8e8}#app-layout-sider .menu-item .ant-menu-item[data-v-0affac82]{background-color:#fff;margin-top:0;margin-bottom:0;padding:0 0!important}#app-menu[data-v-339390a5]{height:100%;text-align:center}#app-menu .layout-sider[data-v-339390a5]{border-top:1px solid #e8e8e8;border-right:1px solid #e8e8e8;background-color:#fafafa;overflow:auto}

+ 1 - 0
public/dist/css/app.bbb2662a.css

@@ -0,0 +1 @@
+#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}#app,#app-layout-sider[data-v-21c98d33]{height:100%}#app-layout-sider .logo[data-v-21c98d33]{border-bottom:1px solid #e8e8e8}#app-layout-sider .pic-logo[data-v-21c98d33]{height:32px;margin:10px}#app-layout-sider .layout-sider[data-v-21c98d33]{border-top:1px solid #e8e8e8;border-right:1px solid #e8e8e8}#app-layout-sider .menu-item .ant-menu-item[data-v-21c98d33]{background-color:#fff;margin-top:0;margin-bottom:0;padding:0 0!important}#app-menu[data-v-ce639046]{height:100%;text-align:center}#app-menu .layout-sider[data-v-ce639046]{border-top:1px solid #e8e8e8;border-right:1px solid #e8e8e8;background-color:#fafafa;overflow:auto}

+ 0 - 1
public/dist/css/chunk-09b6db32.420fdb6d.css

@@ -1 +0,0 @@
-#app-base-db[data-v-7ef3a393]{padding:0 10px;text-align:left;width:100%}#app-base-db .one-block-1[data-v-7ef3a393]{font-size:16px;padding-top:10px}#app-base-db .one-block-2[data-v-7ef3a393]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-0b695420.01116c37.css

@@ -1 +0,0 @@
-#app-effect-video[data-v-4ef9e121]{padding:0 10px;text-align:left;width:100%}#app-effect-video .one-block-1[data-v-4ef9e121]{font-size:16px;padding-top:10px}#app-effect-video .one-block-2[data-v-4ef9e121]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-0c3ec28a.57f7ab37.css

@@ -1 +0,0 @@
-#app-base-httpserver[data-v-18be5318]{padding:0 10px;text-align:left;width:100%}#app-base-httpserver .one-block-1[data-v-18be5318]{font-size:16px;padding-top:10px}#app-base-httpserver .one-block-2[data-v-18be5318]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-1ac5e88a.4a15bba1.css

@@ -1 +0,0 @@
-#app-base-software-open[data-v-1e6f3e54]{padding:0 10px;text-align:left;width:100%}#app-base-software-open .one-block-1[data-v-1e6f3e54]{font-size:16px;padding-top:10px}#app-base-software-open .one-block-1 .sub-content[data-v-1e6f3e54]{font-size:14px}#app-base-software-open .one-block-2[data-v-1e6f3e54]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-1caa1be6.198b3d4f.css

@@ -1 +0,0 @@
-#app-base-db[data-v-4d1de9e2]{padding:0 10px;text-align:left;width:100%}#app-base-db .one-block-1[data-v-4d1de9e2]{font-size:16px;padding-top:10px}#app-base-db .one-block-2[data-v-4d1de9e2]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-21689cc4.6784fb2b.css

@@ -1 +0,0 @@
-#app-base-window[data-v-be4003c2]{padding:0 10px;text-align:left;width:100%}#app-base-window .one-block-1[data-v-be4003c2]{font-size:16px;padding-top:10px}#app-base-window .one-block-2[data-v-be4003c2]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-2bb45275.7b3b5479.css

@@ -1 +0,0 @@
-#app-base-system-launch[data-v-3bc3c7d3]{padding:0 10px;text-align:left;width:100%}#app-base-system-launch .one-block-1[data-v-3bc3c7d3]{font-size:16px;padding-top:10px}#app-base-system-launch .one-block-2[data-v-3bc3c7d3]{padding-top:10px}#app-base-system-launch .set-auto .ant-list-item[data-v-3bc3c7d3]:last-child{border-bottom:1px solid #e8e8e8}

+ 0 - 1
public/dist/css/chunk-2c1b05fb.c240d69c.css

@@ -1 +0,0 @@
-#app-base-notification[data-v-fc31597c]{padding:0 10px;text-align:left;width:100%}#app-base-notification .one-block-1[data-v-fc31597c]{font-size:16px;padding-top:10px}#app-base-notification .one-block-2[data-v-fc31597c]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-2ed2f5b2.4abd2c84.css

@@ -1 +0,0 @@
-#app-hw-bluetooth[data-v-3c213f56]{padding:0 10px;text-align:left;width:100%}#app-hw-bluetooth .one-block-1[data-v-3c213f56]{font-size:16px;padding-top:10px}#app-hw-bluetooth .one-block-2[data-v-3c213f56]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-31638db2.dd7e28b0.css

@@ -1 +0,0 @@
-#app-base-test-api[data-v-415aace6]{padding:0 10px;text-align:left;width:100%}#app-base-test-api .one-block-1[data-v-415aace6]{font-size:16px;padding-top:10px}#app-base-test-api .one-block-2[data-v-415aace6]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-41d5921a.3febd410.css

@@ -1 +0,0 @@
-#app-base-window-view[data-v-3e352df0]{padding:0 10px;text-align:left;width:100%}#app-base-window-view .one-block-1[data-v-3e352df0]{font-size:16px;padding-top:10px}#app-base-window-view .one-block-2[data-v-3e352df0]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-45af09d4.38508275.css

@@ -1 +0,0 @@
-#app-base-powermonitor[data-v-2729881b]{padding:0 10px;text-align:left;width:100%}#app-base-powermonitor .one-block-1[data-v-2729881b]{font-size:16px;padding-top:10px}#app-base-powermonitor .one-block-2[data-v-2729881b]{padding-top:10px}

+ 1 - 0
public/dist/css/chunk-54a1e8f7.50e81769.css

@@ -0,0 +1 @@
+section[data-v-2e955286]{padding:42px 32px}#hero[data-v-2e955286]{padding:96px 32px;text-align:center}.tagline[data-v-2e955286]{font-size:52px;line-height:1.25;font-weight:900;letter-spacing:-1.5px;max-width:960px;margin:0 auto}.dark .tagline[data-v-2e955286],html:not(.dark) .accent[data-v-2e955286]{background:-webkit-linear-gradient(315deg,#42d392 25%,#647eff);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.description[data-v-2e955286]{max-width:960px;line-height:1.5;color:var(--vt-c-text-2);transition:color .5s;font-size:22px;margin:24px auto 40px}.actions a[data-v-2e955286]{font-size:16px;display:inline-block;background-color:var(--vt-c-bg-mute);padding:8px 18px;font-weight:500;border-radius:8px;transition:background-color .5s,color .5s}.actions .setup[data-v-2e955286]{color:var(--vt-c-text-code);background:-webkit-linear-gradient(315deg,#42d392 25%,#647eff)}.actions .setup[data-v-2e955286]:hover{background-color:var(--vt-c-gray-light-4);transition-duration:.2s}

+ 0 - 1
public/dist/css/chunk-5c6e7977.3a28c15a.css

@@ -1 +0,0 @@
-#app-base-screen[data-v-4f9c7a7c]{padding:0 10px;text-align:left;width:100%}#app-base-screen .one-block-1[data-v-4f9c7a7c]{font-size:16px;padding-top:10px}#app-base-screen .one-block-2[data-v-4f9c7a7c]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-68bb1024.a8b5de09.css

@@ -1 +0,0 @@
-#app-base-jobs[data-v-0a164fce]{padding:0 10px;text-align:left;width:100%}#app-base-jobs .one-block-1[data-v-0a164fce]{font-size:16px;padding-top:10px}#app-base-jobs .one-block-2[data-v-0a164fce]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-68d57b43.2dda727d.css

@@ -1 +0,0 @@
-#app-demo-window[data-v-0d11ef69]{padding:0 10px;text-align:left;width:100%}#app-demo-window .one-block-1[data-v-0d11ef69]{font-size:16px;padding-top:10px}#app-demo-window .one-block-2[data-v-0d11ef69]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-69fb44ca.f714bef4.css

@@ -1 +0,0 @@
-#app-base-file[data-v-6d05cf8f]{padding:0 10px;text-align:left;width:100%}#app-base-file .one-block-1[data-v-6d05cf8f]{font-size:16px;padding-top:10px}#app-base-file .footer[data-v-6d05cf8f],#app-base-file .one-block-2[data-v-6d05cf8f]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-72ffb39f.af4f6a12.css

@@ -1 +0,0 @@
-#app-base-screen[data-v-66c147e0]{padding:0 10px;text-align:left;width:100%}#app-base-screen .one-block-1[data-v-66c147e0]{font-size:16px;padding-top:10px}#app-base-screen .one-block-2[data-v-66c147e0]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-c19bf770.80cd7ae2.css

@@ -1 +0,0 @@
-#app-base-httpserver[data-v-191b0b20]{padding:0 10px;text-align:left;width:100%}#app-base-httpserver .one-block-1[data-v-191b0b20]{font-size:16px;padding-top:10px}#app-base-httpserver .one-block-2[data-v-191b0b20]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-e16c8452.c241bcac.css

@@ -1 +0,0 @@
-#app-other[data-v-4b1bef5c]{padding:0 10px;text-align:left;width:100%}#app-other .one-block-1[data-v-4b1bef5c]{font-size:16px;padding-top:10px}#app-other .one-block-2[data-v-4b1bef5c]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-ec5e0b1e.8389c666.css

@@ -1 +0,0 @@
-#app-base-subwindow-ipc[data-v-59c87dd9]{padding:0 10px;text-align:left;width:100%;height:100%;background-color:#f0f2f5}#app-base-subwindow-ipc .one-block-1[data-v-59c87dd9]{font-size:16px;padding-top:10px}#app-base-subwindow-ipc .one-block-2[data-v-59c87dd9]{padding-top:10px}

+ 0 - 1
public/dist/css/chunk-f98fc72c.90fc6ee5.css

@@ -1 +0,0 @@
-#app-base-socket-ipc[data-v-010d9bff]{padding:0 10px;text-align:left;width:100%}#app-base-socket-ipc .one-block-1[data-v-010d9bff]{font-size:16px;padding-top:10px}#app-base-socket-ipc .one-block-2[data-v-010d9bff]{padding-top:10px}

File diff suppressed because it is too large
+ 0 - 0
public/dist/css/chunk-vendors.73dc6b18.css


File diff suppressed because it is too large
+ 0 - 0
public/dist/css/chunk-vendors.f4913a35.css


File diff suppressed because it is too large
+ 0 - 0
public/dist/index.html


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/app.428aeb5d.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/app.428aeb5d.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/app.75a73325.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/app.75a73325.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-09b6db32.f8a3a592.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-09b6db32.f8a3a592.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-0b695420.90dd7b8d.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-0b695420.90dd7b8d.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-0c3ec28a.2c486055.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-0c3ec28a.2c486055.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-1ac5e88a.7d239202.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-1ac5e88a.7d239202.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-1caa1be6.29a9d62f.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-1caa1be6.29a9d62f.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-21689cc4.11a827c2.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-21689cc4.11a827c2.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-2bb45275.049828ca.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-2bb45275.049828ca.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-2c1b05fb.8405f8da.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-2c1b05fb.8405f8da.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-2ed2f5b2.47c316ba.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-2ed2f5b2.47c316ba.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-31638db2.2089063a.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-31638db2.2089063a.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-41d5921a.d7a42ba0.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-41d5921a.d7a42ba0.js.map


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-45af09d4.4947067b.js


File diff suppressed because it is too large
+ 0 - 0
public/dist/js/chunk-45af09d4.4947067b.js.map


+ 2 - 0
public/dist/js/chunk-54a1e8f7.20b5b1cb.js

@@ -0,0 +1,2 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-54a1e8f7"],{"5b68":function(t,s,a){"use strict";a("ccc6")},ccc6:function(t,s,a){},ec0d:function(t,s,a){"use strict";a.r(s);var e=function(){var t=this;t._self._c;return t._m(0)},c=[function(){var t=this,s=t._self._c;return s("section",{attrs:{id:"hero"}},[s("h1",{staticClass:"tagline"},[s("span",{staticClass:"accent"},[t._v("Electron-Egg")])]),s("p",{staticClass:"description"},[t._v(" A fast, desktop software development framework. ")]),s("p",{staticClass:"actions"},[s("a",{staticClass:"setup",attrs:{href:"https://www.kaka996.com/",target:"_blank"}},[t._v("Get Started")])])])}],n={data(){return{action_url:""}},methods:{test(){}}},r=n,i=(a("5b68"),a("2877")),o=Object(i["a"])(r,e,c,!1,null,"2e955286",null);s["default"]=o.exports}}]);
+//# sourceMappingURL=chunk-54a1e8f7.20b5b1cb.js.map

Some files were not shown because too many files changed in this diff