哆啦好梦 2 anos atrás
pai
commit
465ea1e851

+ 1 - 0
electron/controller/effect.js

@@ -1,5 +1,6 @@
 'use strict';
 
+const { Controller } = require('ee-core');
 
 /**
  * 特效 - 功能demo

+ 2 - 0
electron/controller/hardware.js

@@ -1,5 +1,7 @@
 'use strict';
 
+const { Controller } = require('ee-core');
+
 /**
  * 硬件设备 - 功能demo
  * @class

+ 0 - 1
electron/controller/os.js

@@ -9,7 +9,6 @@ const {
   powerMonitor, screen, nativeTheme
 } = require('electron');
 
-let myTimer = null;
 let browserViewObj = null;
 let notificationObj = null;
 

Diferenças do arquivo suprimidas por serem muito extensas
+ 249 - 102
frontend/package-lock.json


+ 2 - 1
frontend/package.json

@@ -16,7 +16,8 @@
     "vue": "^2.6.11",
     "vue-quill-editor": "^3.0.6",
     "vue-router": "^3.4.9",
-    "vuex": "^3.6.0"
+    "vuex": "^3.6.0",
+    "xgplayer": "^2.31.6"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "~4.5.0",

+ 13 - 13
frontend/src/config/subMenu.js

@@ -65,43 +65,43 @@ export default {
 		},                                             
 	},	
   os: {
-		'menu_200' : {
+		'menu_100' : {
 			icon: 'profile',
 			title: '文件',
 			pageName: 'OsFileIndex',
 			params: {}
 		},
-		'menu_201' : {
+		'menu_101' : {
 			icon: 'profile',
 			title: '视图',
 			pageName: 'OsWindowViewIndex',
 			params: {}
 		},
-		'menu_202' : {
+		'menu_102' : {
 			icon: 'profile',
 			title: '窗口',
 			pageName: 'OsWindowIndex',
 			params: {}
 		},
-		'menu_203' : {
+		'menu_103' : {
 			icon: 'profile',
 			title: '桌面通知',
 			pageName: 'OsNotificationIndex',
 			params: {}
 		},
-		'menu_204' : {
+		'menu_104' : {
 			icon: 'profile',
 			title: '电源监控',
 			pageName: 'OsPowerMonitorIndex',
 			params: {}
 		},
-		'menu_205' : {
+		'menu_105' : {
 			icon: 'profile',
 			title: '屏幕信息',
 			pageName: 'OsScreenIndex',
 			params: {}
 		},
-		'menu_206' : {
+		'menu_106' : {
 			icon: 'profile',
 			title: '系统主题',
 			pageName: 'OsThemeIndex',
@@ -109,15 +109,15 @@ export default {
 		},   
 	},  
 	hardware: {
-		'menu_300' : {
-		  icon: 'profile',
-		  title: '打印机',
-		  pageName: 'HardwarePrinterIndex',
-		  params: {}
+		'menu_100' : {
+      icon: 'profile',
+      title: '打印机',
+      pageName: 'HardwarePrinterIndex',
+      params: {}
 		}                                               
   },
   effect: {
-    'menu_400' : {
+    'menu_100' : {
       icon: 'profile',
       title: '视频播放器',
       pageName: 'EffectVideoIndex',

+ 3 - 5
frontend/src/views/effect/video/Index.vue

@@ -62,16 +62,14 @@ export default {
       this.p = new Player(this.op);
     },    
     selectFile () {
-      // todo
-      const self = this;
       const params = {}
-      this.$ipcInvoke(ipcApiRoute.effect.selectFile, params).then(res => {
+      this.$ipc.invoke(ipcApiRoute.selectFile, params).then(res => {
         console.log('res:', res)
         if (res) {
-          self.fileUrl = res;
+          this.fileUrl = res;
           this.p.start(self.fileUrl);
         } else {
-          self.$message.warning('请选择视频');
+          this.$message.warning('请选择视频');
         }
       }) 
     },

+ 5 - 7
frontend/src/views/hardware/printer/Index.vue

@@ -49,16 +49,15 @@ export default {
   },  
   methods: {
     init () {
-      const self = this;
       // 避免重复监听,或者将 on 功能写到一个统一的地方,只加载一次
-      this.$ipc.removeAllListeners(ipcApiRoute.hardware.printStatus);
-      this.$ipc.on(ipcApiRoute.hardware.printStatus, (event, result) => {
+      this.$ipc.removeAllListeners(ipcApiRoute.printStatus);
+      this.$ipc.on(ipcApiRoute.printStatus, (event, result) => {
         console.log('result', result);
-        self.$message.info('打印中...');
+        this.$message.info('打印中...');
       })
     },    
     getPrinter () {
-      this.$ipcInvoke(ipcApiRoute.hardware.getPrinterList, {}).then(res => {
+      this.$ipc.invoke(ipcApiRoute.getPrinterList, {}).then(res => {
         this.printerList = res;
       }) 
     },
@@ -68,8 +67,7 @@ export default {
         view: this.views[index],
         deviceName: this.defaultDeviceName
       };
-      this.$ipc.send(ipcApiRoute.hardware.print, params)
-
+      this.$ipc.send(ipcApiRoute.print, params)
     },
     defaultDevice (item) {
       let desc = "";

+ 9 - 9
package-lock.json

@@ -295,9 +295,9 @@
       }
     },
     "@types/formidable": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmmirror.com/@types/formidable/-/formidable-2.0.5.tgz",
-      "integrity": "sha512-uvMcdn/KK3maPOaVUAc3HEYbCEhjaGFwww4EsX6IJfWIJ1tzHtDHczuImH3GKdusPnAAmzB07St90uabZeCKPA==",
+      "version": "2.0.6",
+      "resolved": "https://registry.npmmirror.com/@types/formidable/-/formidable-2.0.6.tgz",
+      "integrity": "sha512-L4HcrA05IgQyNYJj6kItuIkXrInJvsXTPC5B1i64FggWKKqSL+4hgt7asiSNva75AoLQjq29oPxFfU4GAQ6Z2w==",
       "requires": {
         "@types/node": "*"
       }
@@ -347,9 +347,9 @@
       "dev": true
     },
     "@types/node": {
-      "version": "20.1.1",
-      "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.1.1.tgz",
-      "integrity": "sha512-uKBEevTNb+l6/aCQaKVnUModfEMjAl98lw2Si9P5y4hLu9tm6AlX2ZIoXZX6Wh9lJueYPrGPKk5WMCNHg/u6/A=="
+      "version": "20.1.2",
+      "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.1.2.tgz",
+      "integrity": "sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g=="
     },
     "@types/plist": {
       "version": "3.0.2",
@@ -377,9 +377,9 @@
       "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw=="
     },
     "@types/validator": {
-      "version": "13.7.16",
-      "resolved": "https://registry.npmmirror.com/@types/validator/-/validator-13.7.16.tgz",
-      "integrity": "sha512-VyKmLktUHYLbrSbsRi241MSUlGYomQgK/tfCNpej3Gt5qDOM10AZ3nU2aR2s5JritClXuOBu4K7MkywVW/Y6Ow=="
+      "version": "13.7.17",
+      "resolved": "https://registry.npmmirror.com/@types/validator/-/validator-13.7.17.tgz",
+      "integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ=="
     },
     "@types/verror": {
       "version": "1.10.6",

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff