diff --git a/packages/system-client/src/api/application.js b/packages/system-client/src/api/application.js
index 25d90dbe63..4c1f027e50 100644
--- a/packages/system-client/src/api/application.js
+++ b/packages/system-client/src/api/application.js
@@ -176,3 +176,32 @@ export async function removeApplicationService(appid) {
})
return res
}
+
+/**
+ * 导出应用
+ * @param {string} appid
+ * @returns
+ */
+export async function exportApplication(appid) {
+ const res = await request({
+ url: `/apps/${appid}/export`,
+ method: 'get'
+ })
+ return res
+}
+
+/**
+ * 导入应用
+ * @param {string} appid
+ * @returns
+ */
+export async function importApplication(appid, import_data) {
+ const res = await request({
+ url: `/apps/${appid}/import`,
+ method: 'post',
+ data: {
+ import_data
+ }
+ })
+ return res
+}
diff --git a/packages/system-client/src/utils/file.js b/packages/system-client/src/utils/file.js
new file mode 100644
index 0000000000..b674a4cf93
--- /dev/null
+++ b/packages/system-client/src/utils/file.js
@@ -0,0 +1,28 @@
+
+/**
+ * export raw text
+ * @param {string} name
+ * @param {string} data
+ */
+export function exportRawText(name, data) {
+ var urlObject = window.URL || window.webkitURL || window
+ var export_blob = new Blob([data])
+ var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a')
+ save_link.href = urlObject.createObjectURL(export_blob)
+ save_link.download = name
+ save_link.click()
+}
+
+/**
+ * read text from local file
+ * @param {File} file
+ */
+export async function readTextFromFile(file, encoding = 'utf-8') {
+ const reader = new FileReader()
+ reader.readAsText(file)
+
+ return new Promise((resolve, reject) => {
+ reader.onload = () => resolve(reader.result)
+ reader.onerror = error => reject(error)
+ })
+}
diff --git a/packages/system-client/src/views/application/index.vue b/packages/system-client/src/views/application/index.vue
index 3c732231e9..12e175f66d 100644
--- a/packages/system-client/src/views/application/index.vue
+++ b/packages/system-client/src/views/application/index.vue
@@ -22,8 +22,8 @@
-
- {{ scope.row.name }}
+
+ {{ row.name }}
@@ -50,13 +50,16 @@
-
-
+
开发管理
-
- 编辑
+
+ 导出
+
+
+ 导入
释放
@@ -80,8 +83,8 @@
-
- {{ scope.row.name }}
+
+ {{ row.name }}
@@ -108,13 +111,16 @@
-
-
+
开发管理
-
- 编辑
+
+ 导出
+
+
+ 导入
释放
@@ -147,12 +153,53 @@
+
+
+
+
+
+ {{ importForm.app.name }}
+
+
+
+ 选取导入文件
+
+
+
+
+