|
|
@@ -181,7 +181,7 @@ export default {
|
|
|
const params = {
|
|
|
action: 'getDataDir',
|
|
|
}
|
|
|
- this.$ipcInvoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
+ this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
this.data_dir = res.result;
|
|
|
})
|
|
|
},
|
|
|
@@ -190,7 +190,7 @@ export default {
|
|
|
const params = {
|
|
|
action: 'all',
|
|
|
}
|
|
|
- this.$ipcInvoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
+ this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
if (res.all_list.length == 0) {
|
|
|
return false;
|
|
|
}
|
|
|
@@ -198,7 +198,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
selectDir() {
|
|
|
- this.$ipcInvoke(ipcApiRoute.selectFolder, '').then(r => {
|
|
|
+ this.$ipc.invoke(ipcApiRoute.selectFolder, '').then(r => {
|
|
|
this.data_dir = r;
|
|
|
// 修改数据目录
|
|
|
this.modifyDataDir(r);
|
|
|
@@ -206,7 +206,7 @@ export default {
|
|
|
},
|
|
|
openDir() {
|
|
|
console.log('dd:', this.data_dir);
|
|
|
- this.$ipcInvoke(ipcApiRoute.openDirectory, {id: this.data_dir}).then(res => {
|
|
|
+ this.$ipc.invoke(ipcApiRoute.openDirectory, {id: this.data_dir}).then(res => {
|
|
|
//
|
|
|
})
|
|
|
},
|
|
|
@@ -215,7 +215,7 @@ export default {
|
|
|
action: 'setDataDir',
|
|
|
data_dir: dir
|
|
|
}
|
|
|
- this.$ipcInvoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
+ this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
this.all_list = res.all_list;
|
|
|
})
|
|
|
},
|
|
|
@@ -235,7 +235,7 @@ export default {
|
|
|
if (ac == 'add' && this.name.length == 0) {
|
|
|
self.$message.error(`请填写数据`);
|
|
|
}
|
|
|
- this.$ipcInvoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
+ this.$ipc.invoke(ipcApiRoute.sqlitedbOperation, params).then(res => {
|
|
|
console.log('res:', res);
|
|
|
if (ac == 'get') {
|
|
|
if (res.result.length == 0) {
|