Browse Source

Merge branch 'master' into dev_duxiangyu

duxiangyu 2 years ago
parent
commit
98414a1c40

+ 15 - 11
src/components/cadDrawingManage/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: ql
  * @Date: 2022-01-11 14:46:04
- * @LastEditTime: 2022-01-24 16:10:38
+ * @LastEditTime: 2022-01-24 17:18:04
  * @LastEditors: Please set LastEditors
  * @FilePath: \adm-frontend\src\components\cadDrawingManage\index.vue
 -->
@@ -36,7 +36,7 @@
                       :http-request='uploadHandle'
                       :before-upload="beforeUpload"
                       :show-file-list="false">
-                        <Button slot="trigger"  type="primary" icon="el-icon-download">上传.dwg CAD文件</Button>
+                        <Button style="max-width: 220px" slot="trigger"  type="primary" icon="el-icon-download">上传.dwg CAD文件</Button>
                     </el-upload>
                   </div>
                  
@@ -111,12 +111,15 @@ export default {
           majorCode: this.currentTab,
           files
         }
-        const res = cadDrawingController.addFile(params);
-        this.getFileList();
-        this.$message({
-          type: 'success',
-          message: '上传成功!'
-        });
+        const res = await cadDrawingController.addFile(params);
+        if(res.result === logicConfig.resultObj.success) {
+          await this.getFileList();
+          this.$message({
+            type: 'success',
+            message: '上传成功!'
+          });
+        }
+        
       }
     },
     currentTab(nv, ov) {
@@ -217,9 +220,10 @@ export default {
 
     },
     beforeUpload(file) {
-      console.log(file)
-      // if()
-      // return false
+      if(this.uploadVisible) {
+        return false
+      }
+      
     },
    
     delHandle(row) {

+ 1 - 1
src/controller/old-adm/buildController.ts

@@ -41,7 +41,7 @@ class BuildController {
           name: subitem.localName,
           open: false,
           disabled: false,
-          checked: subindex === 0 ? "checked" : 'uncheck',
+          checked: (index === 0 && subindex === 0) ? "checked" : 'uncheck',
         }));
         return {
           id,

+ 1 - 1
src/utils/http/basic/axiosUtils.ts

@@ -13,7 +13,6 @@ import {sessionStore} from '@/store/sessionStore'
 var CancelToken = axios.CancelToken;
 var cancel;
 
-
 // 创建axios实例
 const axiosservice = axios.create({
   timeout: 3000000, // 请求超时时间
@@ -28,6 +27,7 @@ const axiosservice = axios.create({
 
 axiosservice.interceptors.request.use(
   (config) => {
+    config.headers['token'] = sessionStore.userToken;
     return config;
   },
   (error) => {