@@ -418,6 +439,28 @@ function refreshFolder() {
getFolder()
getList()
}
+const elUploadRef = ref()
+const importApplication = (file: any) => {
+ const formData = new FormData()
+ formData.append('file', file.raw, file.name)
+ elUploadRef.value.clearFiles()
+ ApplicaitonApi.importApplication(formData, loading)
+ .then(async (res: any) => {
+ if (res?.data) {
+ getList()
+ }
+ })
+ .catch((e) => {
+ if (e.code === 400) {
+ MsgConfirm(t('common.tip'), t('views.application.tip.professionalMessage'), {
+ cancelButtonText: t('common.confirm'),
+ confirmButtonText: t('common.professional'),
+ }).then(() => {
+ window.open('https://maxkb.cn/pricing.html', '_blank')
+ })
+ }
+ })
+}
onMounted(() => {
getFolder()