Browse Source

产品管理中搜索bug修复

wangtao 3 years ago
parent
commit
8f90559147

+ 1 - 1
package.json

@@ -87,4 +87,4 @@
         "> 1%",
         "last 2 versions"
     ]
-}
+}

+ 1 - 1
src/permission.js

@@ -28,7 +28,7 @@ router.beforeEach((to, from, next) => {
                     })
                 }).catch(err => {
                     store.dispatch('LogOut').then(() => {
-                        Message.error(err)
+                        // Message.error(err)
                         next({ path: '/vuedx/#/' })
                     })
                 })

+ 1 - 1
src/utils/request.js

@@ -68,7 +68,7 @@ service.interceptors.response.use(res => {
                 })
             }).catch(() => {});
             // return Promise.reject()
-            return msg && Promise.reject(new Error(msg)) || ""
+            // return msg && Promise.reject(new Error(msg)) || ""
         } else if (code === 500) {
             Message({
                 message: msg,

+ 9 - 2
src/views/system/dept/index.vue

@@ -136,12 +136,13 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
- 
+
   </div>
 </template>
 
 <script>
 import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
+import { listChannel } from "@/api/system/product";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
@@ -170,7 +171,9 @@ export default {
         status: undefined
       },
       // 表单参数
-      form: {},
+      form: {
+        // parentId:[]
+      },
       // 表单校验
       rules: {
         parentId: [
@@ -213,6 +216,10 @@ export default {
         this.deptList = this.handleTree(response.data, "deptId");
         this.loading = false;
       });
+      //获取父级部门
+      // listChannel({current:1, size: 10}).then(Response =>{
+      //   this.form.parentId = this.Response.data.records
+      // })
     },
     /** 转换部门数据结构 */
     normalizer(node) {

+ 2 - 2
src/views/system/dict/index.vue

@@ -195,7 +195,6 @@
 
 <script>
 import { listType, getType, delType, addType, updateType, exportType, refreshCache } from "@/api/system/dict/type";
-
 export default {
   name: "Dict",
   data() {
@@ -252,6 +251,7 @@ export default {
     });
   },
   methods: {
+
     /** 查询字典类型列表 */
     getList() {
       this.loading = true;
@@ -371,4 +371,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 10 - 10
src/views/system/product/index.vue

@@ -82,8 +82,8 @@
         </el-form-item>
         <el-form-item label="公司LOGO" prop="logo" ref="img">
           <!-- <el-checkbox-group v-model="form.logo" v-show="false"></el-checkbox-group> -->
-            <el-upload  
-              action="#" 
+            <el-upload
+              action="#"
               accept="image/png,image/jpg,image/jpeg"
               :http-request="uploadFile"
               :limit = limit
@@ -94,7 +94,7 @@
               :auto-upload="true">
                 <i slot="default" class="el-icon-plus"></i>
                 <div slot="file" slot-scope="{file}">
-                  <img class="el-upload-list__item-thumbnail imgupload" :src="file.url" alt="" > 
+                  <img class="el-upload-list__item-thumbnail imgupload" :src="file.url" alt="" >
                   <span class="el-upload-list__item-actions">
                     <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
                       <i class="el-icon-delete"></i>
@@ -106,14 +106,14 @@
             <img width="100%" :src="dialogImageUrl" alt="">
           </el-dialog>
         </el-form-item>
-        
+
       </el-form>
       <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="submitForm" v-if="!loading">确 定</el-button>
           <el-button :loading="loading" type="primary" @click="submitForm" v-else>提交中...</el-button>
           <el-button @click="cancel">取 消</el-button>
         </div>
-      
+
     </el-dialog>
   </div>
 </template>
@@ -123,7 +123,7 @@ import { addChannel, updataChannel, delChannel, listChannel, fileId, uploadFileA
 export default {
   name: "admin",
   data() {
-    return { 
+    return {
       // 遮罩层
       loading: true,
       // 导出遮罩层
@@ -231,11 +231,11 @@ export default {
             this.total = response.data.total;
             this.logo = arrBig.logo;
           },1000)
-          
+
         }else{
+          this.adminList = []
           this.loading = false;
         }
-        
       })
     },
     // 移出图片
@@ -296,7 +296,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      
+
       // const id = row.id || this.ids
       // getadmin(id).then(response => {
       Object.assign(this.form, row.id ? this.adminList.find(val=>val.id === row.id) : this.adminList.find(val=>val.id === this.ids[0]))
@@ -325,7 +325,7 @@ export default {
           let valid = img.width === width && img.height === height;
           valid ? resolve() : reject();
         }
-        
+
         img.src = _URL.createObjectURL(file);
       }).then(() => {
         return file;

+ 2 - 2
vue.config.js

@@ -33,8 +33,8 @@ module.exports = {
         proxy: {
             // detail: https://cli.vuejs.org/config/#devserver-proxy
             [process.env.VUE_APP_BASE_API]: {
-                //target: `http://172.16.120.104:8085`, //本地
-                target: 'https://smartpark.caih.com/dxapi/', //东信
+                target: `http://172.16.120.104:8085`, //本地
+                //target: 'https://smartpark.caih.com/dxapi/', //东信
                 changeOrigin: true,
                 pathRewrite: {
                     ['^' + process.env.VUE_APP_BASE_API]: ''

BIN
vuedx.zip


File diff suppressed because it is too large
+ 0 - 0
vuedx/index.html


File diff suppressed because it is too large
+ 0 - 0
vuedx/static/css/chunk-5e64aecb.dd9c368a.css


File diff suppressed because it is too large
+ 0 - 0
vuedx/static/js/app.70c56c6b.js


File diff suppressed because it is too large
+ 0 - 0
vuedx/static/js/app.ff043f09.js


File diff suppressed because it is too large
+ 0 - 0
vuedx/static/js/chunk-5e64aecb.968e5ba0.js


Some files were not shown because too many files changed in this diff