Explorar el Código

替换所有ipccall

gsx hace 3 años
padre
commit
aa32bf62a8

+ 2 - 3
frontend/src/views/base/db/Index.vue

@@ -156,7 +156,7 @@ export default {
       const params = {
         action: 'all',
       }
-      this.$ipcCall(ipcApiRoute.dbOperation, params).then(res => {
+      this.$ipcInvoke(ipcApiRoute.dbOperation, params).then(res => {
         console.log('res:', res);
         if (res.all_list.length == 0) {
           return false;
@@ -180,8 +180,7 @@ export default {
       if (ac == 'add' && this.name.length == 0) {
         self.$message.error(`请填写数据`);
       }
-
-      this.$ipcCall(ipcApiRoute.dbOperation, params).then(res => {
+      this.$ipcInvoke(ipcApiRoute.dbOperation, params).then(res => {
         console.log('res:', res);
         if (ac == 'get') {
           if (res.result.length == 0) {

+ 4 - 4
frontend/src/views/base/file/Index.vue

@@ -89,13 +89,13 @@ export default {
   },
   methods: {
     openDirectry (id) {
-      this.$ipcCall(ipcApiRoute.openDirectory, {id: id}).then(res => {
+      this.$ipcInvoke(ipcApiRoute.openDirectory, {id: id}).then(res => {
         //console.log('res:', res)
       })      
     },
     selectDir() {
       const self = this;
-      self.$ipcCall(ipcApiRoute.selectFolder, '').then(r => {
+      self.$ipcInvoke(ipcApiRoute.selectFolder, '').then(r => {
         self.dir_path = r;
         self.$message.info(r);
       })      
@@ -103,14 +103,14 @@ export default {
 		messageShow(type) {
       const self = this;
       console.log('[messageShow] type:', type)
-      this.$ipcCall(ipcApiRoute.messageShow, '').then(r => {
+      this.$ipcInvoke(ipcApiRoute.messageShow, '').then(r => {
         self.$message.info(r);
       })
     },    
     messageShowConfirm(type) {
       const self = this;
       console.log('[messageShowConfirm] type:', type)
-      this.$ipcCall(ipcApiRoute.messageShowConfirm, '').then(r => {
+      this.$ipcInvoke(ipcApiRoute.messageShowConfirm, '').then(r => {
         self.$message.info(r);
       })
     },

+ 1 - 1
frontend/src/views/base/screen/Index.vue

@@ -40,7 +40,7 @@ export default {
   methods: {
     getScreen (index) {
       const self = this;
-      this.$ipcCall(ipcApiRoute.getScreen, index).then(result => {
+      this.$ipcInvoke(ipcApiRoute.getScreen, index).then(result => {
         self.data = result;
       })
     },

+ 1 - 1
frontend/src/views/base/socket/HttpServer.vue

@@ -40,7 +40,7 @@ export default {
   methods: {
     init () {
       const self = this;
-      this.$ipcCall(ipcApiRoute.checkHttpServer, {}).then(r => {
+      this.$ipcInvoke(ipcApiRoute.checkHttpServer, {}).then(r => {
         if (r.enable) {
           self.currentStatus = '开启';
           self.servicAddress = r.server;

+ 1 - 1
frontend/src/views/base/software/Index.vue

@@ -40,7 +40,7 @@ export default {
   methods: {
     openSoft (id) {
       const self = this;   
-      this.$ipcCall(ipcApiRoute.openSoftware, id).then(result => {
+      this.$ipcInvoke(ipcApiRoute.openSoftware, id).then(result => {
         if (!result) {
           self.$message.error('程序不存在');
         }

+ 1 - 1
frontend/src/views/base/system/Index.vue

@@ -37,7 +37,7 @@ export default {
     init () {
       // todo .....
       const self = this;
-      self.$ipcCall(ipcApiRoute.autoLaunch, 'check').then(result => {
+      self.$ipcInvoke(ipcApiRoute.autoLaunch, 'check').then(result => {
         console.log('[ipcRenderer] [autoLaunch] result:', result)
         this.autoLaunchChecked = result.status;
       })      

+ 1 - 1
frontend/src/views/base/testapi/Index.vue

@@ -27,7 +27,7 @@ export default {
       const params = {
         id: id
       }
-      this.$ipcCall(ipcApiRoute.test, params).then(res => {
+      this.$ipcInvoke(ipcApiRoute.test, params).then(res => {
         console.log('res:', res)
       }) 
     },

+ 2 - 2
frontend/src/views/base/theme/Index.vue

@@ -53,14 +53,14 @@ export default {
       this.currentThemeMode = e.target.value;
       console.log('setTheme currentThemeMode:', this.currentThemeMode)
 
-      this.$ipcCall(ipcApiRoute.setTheme, this.currentThemeMode).then(result => {
+      this.$ipcInvoke(ipcApiRoute.setTheme, this.currentThemeMode).then(result => {
         console.log('result:', result)
         self.currentThemeMode = result;
       })      
     },
     getTheme () {
       const self = this;
-      this.$ipcCall(ipcApiRoute.getTheme).then(result => {
+      this.$ipcInvoke(ipcApiRoute.getTheme).then(result => {
         console.log('result:', result)
         self.currentThemeMode = result;
       })  

+ 2 - 2
frontend/src/views/base/updater/Index.vue

@@ -54,7 +54,7 @@ export default {
       })
     },
     checkForUpdater () {
-      this.$ipcCall(ipcApiRoute.checkForUpdater).then(r => {
+      this.$ipcInvoke(ipcApiRoute.checkForUpdater).then(r => {
         console.log(r);
       })
     },
@@ -63,7 +63,7 @@ export default {
         this.$message.info('没有可用版本');
         return
       }
-      this.$ipcCall(ipcApiRoute.downloadApp).then(r => {
+      this.$ipcInvoke(ipcApiRoute.downloadApp).then(r => {
         console.log(r);
       })
     },

+ 1 - 1
frontend/src/views/base/window/Index.vue

@@ -42,7 +42,7 @@ export default {
   },
   methods: {
     createWindow (index) {
-      this.$ipcCall(ipcApiRoute.createWindow, this.views[index]).then(r => {
+      this.$ipcInvoke(ipcApiRoute.createWindow, this.views[index]).then(r => {
         console.log(r);
       })
     },

+ 2 - 2
frontend/src/views/base/windowview/Index.vue

@@ -45,13 +45,13 @@ export default {
   methods: {
     loadViewContent (index) {
       const self = this;
-      self.$ipcCall(ipcApiRoute.loadViewContent, this.views[index]).then(r => {
+      self.$ipcInvoke(ipcApiRoute.loadViewContent, this.views[index]).then(r => {
         console.log(r);
       })
     },
     removeViewContent (index) {
       const self = this;
-      self.$ipcCall(ipcApiRoute.removeViewContent, self.views[index]).then(r => {
+      self.$ipcInvoke(ipcApiRoute.removeViewContent, self.views[index]).then(r => {
         console.log(r);
       })
     },