浏览代码

'提交本地'

魏志佳 4 年之前
父节点
当前提交
cdadfb1304
共有 2 个文件被更改,包括 35 次插入8 次删除
  1. 33 6
      src/views/modules/autoLaunch/newAppId.vue
  2. 2 2
      vue.config.js

+ 33 - 6
src/views/modules/autoLaunch/newAppId.vue

@@ -309,17 +309,44 @@ export default {
             
         },
         handleChange(info) {
-            // console.log(info)
-            this.loadDisabled = false 
-            this.$message.success('文件导入成功,异步创建中,请稍后查看...')
+            console.log(info)
+            let fileList = [...info.fileList];
+
+            // 1. Limit the number of uploaded files
+            //    Only to show two recent uploaded files, and old ones will be replaced by the new
+            fileList = fileList.slice(-2);
+
+            // 2. read from response and show file link
+            fileList = fileList.map(file => {
+                if (file.response) {
+                    // Component will show file.url as link
+                    file.url = file.response.url;
+                }
+                return file;
+            });
+            if(fileList.length>0){
+                this.fileList = [
+                    {
+                        ...fileList[fileList.length-1]
+                    }
+                ]
+            }else{
+                this.fileList=[]
+            }
+            // this.loadDisabled = false 
+            // this.$message.success('文件导入成功,异步创建中,请稍后查看...')
             if (info.file.status !== 'uploading') {
                 console.log(info.file, info.fileList)
             }
             if (info.file.status === 'done') {
-                this.$message.success(`${info.file.name} 上传成功`)
+                
                 this.loadDisabled = false 
-                this.attachmentName=info.file.response.result.attachmentName || ''         
-                this.attachmentUrl=info.file.response.result.attachmentUrl || ''
+                if(info.file.response.code==0){
+                  this.$message.success(info.file.response.message)
+                }else{
+                  this.$message.error(info.file.response.message)
+                }
+                
             } else if (info.file.status === 'error') {
                 this.$message.error(`${info.file.name}上传失败`)
                 this.loadDisabled = false

+ 2 - 2
vue.config.js

@@ -68,7 +68,7 @@ module.exports = {
     open : true,
     proxy: {
       '/jeecg-boot': {
-         target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
+        //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
@@ -79,7 +79,7 @@ module.exports = {
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安
         // target: 'http://192.168.1.193:8080', //请求本地 需要jeecg-boot后台项目  李煜一
         // target: 'http://192.168.1.193:31012', //请求本地 需要jeecg-boot后台项目  李煜一
-        //  target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
+         target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目
         // target: 'http://39.106.184.70:8088/', //请求本地 需要jeecg-boot后台项目
         //  target: 'http://adsp.tjyourong.com.cn/', //请求本地 需要jeecg-boot后台项目