Bläddra i källkod

Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

evoxwht 2 år sedan
förälder
incheckning
48a5caf846

+ 14 - 7
template/admin/src/components/goodsList/index.vue

@@ -4,11 +4,18 @@
       <Row type="flex" :gutter="24">
         <Col v-bind="grid" v-if="!liveStatus">
           <FormItem label="商品分类:" label-for="pid">
-            <Select v-model="formValidate.cate_id" style="width: 200px" clearable @on-change="userSearchs">
+            <!-- <Select v-model="formValidate.cate_id" style="width: 200px" clearable @on-change="userSearchs">
               <Option v-for="item in treeSelect" :value="item.id" :key="item.id"
                 >{{ item.html + item.cate_name }}
               </Option>
-            </Select>
+            </Select> -->
+            <el-cascader
+              v-model="formValidate.cate_id"
+              size="small"
+              :options="treeSelect"
+              :props="{ emitPath: false }"
+              clearable
+            ></el-cascader>
           </FormItem>
         </Col>
         <Col v-bind="grid" v-if="!type && diy">
@@ -61,7 +68,7 @@
 
 <script>
 import { mapState } from 'vuex';
-import { treeListApi, changeListApi } from '@/api/product';
+import { cascaderListApi, changeListApi } from '@/api/product';
 import { liveGoods } from '@/api/live';
 import { getProductList } from '@/api/diy';
 export default {
@@ -306,7 +313,7 @@ export default {
     },
     // 商品分类;
     goodsCategory() {
-      treeListApi(1)
+      cascaderListApi(1)
         .then((res) => {
           this.treeSelect = res.data;
         })
@@ -335,17 +342,17 @@ export default {
 
             let data = res.data;
             if (this.selectIds.length) {
-              let arr = []
+              let arr = [];
               this.selectIds.map((item) => {
                 data.list.map((i) => {
                   if (i.id == item) {
                     console.log(i);
                     i._checked = true;
-                    arr.push(i)
+                    arr.push(i);
                   }
                 });
               });
-              this.changeCheckbox(arr)
+              this.changeCheckbox(arr);
             }
             this.tableList = data.list;
             this.total = res.data.count;

+ 12 - 17
template/admin/src/layout/navBars/breadcrumb/user.vue

@@ -197,23 +197,18 @@ export default {
               if (action === 'confirm') {
                 instance.confirmButtonLoading = true;
                 instance.confirmButtonText = this.$t('message.user.logOutExit');
-                setTimeout(() => {
-                  AccountLogout().then((res) => {
-                    this.$Message.success('您已成功退出');
-                    this.$router.replace({ path: `${settings.routePre}/login` });
-                    removeCookies('token');
-                    removeCookies('expires_time');
-                    removeCookies('uuid');
-                    // window.location.reload()
-                    done();
-
-                    setTimeout(() => {
-                      setTimeout(() => {
-                        instance.confirmButtonLoading = false;
-                      }, 300);
-                    }, 3000);
-                  });
-                }, 700);
+                AccountLogout().then((res) => {
+                  this.$Message.success('您已成功退出');
+                  this.$router.replace({ path: `${settings.routePre}/login` });
+                  removeCookies('token');
+                  removeCookies('expires_time');
+                  removeCookies('uuid');
+                  // window.location.reload()
+                  done();
+                  setTimeout(() => {
+                    instance.confirmButtonLoading = false;
+                  }, 300);
+                });
               } else {
                 done();
               }

+ 0 - 1
template/admin/src/pages/product/productAdd/index.vue

@@ -1340,7 +1340,6 @@ import WangEditor from '@/components/wangEditor/index.vue';
 import { userLabelAddApi } from '@/api/user';
 import {
   productInfoApi,
-  treeListApi,
   cascaderListApi,
   productAddApi,
   generateAttrApi,

+ 1 - 3
template/admin/src/pages/product/productClassify/index.vue

@@ -6,9 +6,7 @@
           <Col v-bind="grid">
             <FormItem label="商品分类:" prop="pid" label-for="pid">
               <Select v-model="artFrom.pid" placeholder="请选择商品分类" @on-change="userSearchs" clearable>
-                <Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{
-                  item.html + item.cate_name
-                }}</Option>
+                <Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{ item.cate_name }}</Option>
               </Select>
             </FormItem>
           </Col>

+ 22 - 8
template/admin/src/pages/product/productList/index.vue

@@ -13,11 +13,18 @@
         <Row type="flex" :gutter="24">
           <Col v-bind="grid">
             <FormItem label="商品分类:" label-for="pid">
-              <Select v-model="artFrom.cate_id" placeholder="请选择商品分类" clearable @on-change="userSearchs">
+              <!-- <Select v-model="artFrom.cate_id" placeholder="请选择商品分类" clearable @on-change="userSearchs">
                 <Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{
                   item.html + item.cate_name
                 }}</Option>
-              </Select>
+              </Select> -->
+              <el-cascader
+                v-model="artFrom.cate_id"
+                size="small"
+                :options="treeSelect"
+                :props="{ emitPath: false }"
+                clearable
+              ></el-cascader>
             </FormItem>
           </Col>
           <Col v-bind="grid">
@@ -165,11 +172,18 @@
           <Col span="24" v-if="batchType == 1">
             <Divider orientation="left">基础设置</Divider>
             <FormItem label="商品分类:" prop="cate_id">
-              <Select v-model="batchFormData.cate_id" placeholder="请选择商品分类" multiple class="perW20">
+              <!-- <Select v-model="batchFormData.cate_id" placeholder="请选择商品分类" multiple class="perW20">
                 <Option v-for="item in treeSelect" :disabled="item.pid === 0" :value="item.id" :key="item.id">{{
                   item.html + item.cate_name
                 }}</Option>
-              </Select>
+              </Select> -->
+              <el-cascader
+                v-model="batchFormData.cate_id"
+                size="small"
+                :options="treeSelect"
+                :props="{ emitPath: false }"
+                clearable
+              ></el-cascader>
             </FormItem>
           </Col>
           <Col span="24" v-if="batchType == 2">
@@ -277,7 +291,7 @@ import {
   getGoodHeade,
   getGoods,
   PostgoodsIsShow,
-  treeListApi, // 分类列表
+  cascaderListApi, // 分类列表
   productShowApi,
   productUnshowApi,
   storeProductApi,
@@ -428,7 +442,7 @@ export default {
   },
   watch: {
     $route() {
-      if (this.$route.fullPath === (this.$routeProStr + '/product/product_list?type=5')) {
+      if (this.$route.fullPath === this.$routeProStr + '/product/product_list?type=5') {
         this.getPath();
       }
     },
@@ -437,7 +451,7 @@ export default {
   activated() {
     this.goodHeade();
     this.goodsCategory();
-    if (this.$route.fullPath === (this.$routeProStr + '/product/product_list?type=5')) {
+    if (this.$route.fullPath === this.$routeProStr + '/product/product_list?type=5') {
       this.getPath();
     } else {
       this.getDataList();
@@ -746,7 +760,7 @@ export default {
     },
     // 商品分类;
     goodsCategory() {
-      treeListApi(1)
+      cascaderListApi(1)
         .then((res) => {
           this.treeSelect = res.data;
         })

+ 11 - 4
template/admin/src/pages/product/productList/taoBao.vue

@@ -60,11 +60,18 @@
             </Col>
             <Col span="24">
               <FormItem label="商品分类:" prop="cate_id">
-                <Select v-model="formValidate.cate_id" multiple>
+                <!-- <Select v-model="formValidate.cate_id" multiple>
                   <Option v-for="item in treeSelect" :disabled="item.pid === 0" :value="item.id" :key="item.id">{{
                     item.html + item.cate_name
                   }}</Option>
-                </Select>
+                </Select> -->
+                <el-cascader
+                  v-model="formValidate.cate_id"
+                  size="small"
+                  :options="treeSelect"
+                  :props="{ multiple: true, emitPath: false }"
+                  clearable
+                ></el-cascader>
               </FormItem>
             </Col>
             <Col v-bind="grid">
@@ -264,7 +271,7 @@
 </template>
 
 <script>
-import { crawlFromApi, treeListApi, crawlSaveApi, productGetTemplateApi, copyConfigApi } from '@/api/product';
+import { crawlFromApi, cascaderListApi, crawlSaveApi, productGetTemplateApi, copyConfigApi } from '@/api/product';
 import uploadPictures from '@/components/uploadPictures';
 import WangEditor from '@/components/wangEditor/index.vue';
 
@@ -539,7 +546,7 @@ export default {
     },
     // 商品分类;
     goodsCategory() {
-      treeListApi(1)
+      cascaderListApi(1)
         .then((res) => {
           this.treeSelect = res.data;
         })