Prechádzať zdrojové kódy

渠道管理没有下级渠道时颜色黑色不可点击, 解决下级渠道隐藏缺陷

guanglong 3 rokov pred
rodič
commit
58cf88ab9c

+ 14 - 9
src/views/business/channel/childs.vue

@@ -89,13 +89,15 @@
           <el-table-column label="渠道编号" prop="channelId" width="100px" />
           <el-table-column label="渠道名称" prop="name" show-overflow-tooltip  width="180px">
             <template slot-scope="scope">
-              <el-link
-                  :underline="false"
-                   type="primary"
+              <el-button
+                  v-if="scope.row.childCnt > 0"
+                  size="mini"
+                  type="text"
                   @click="handleView(scope.row)"
                 >
                   {{scope.row.name}}
-              </el-link>
+              </el-button>
+              <span v-else>{{scope.row.name}}</span>
             </template>
           </el-table-column>
           <el-table-column label="手机号码" prop="mobile" show-overflow-tooltip  width="120px"/>
@@ -269,10 +271,16 @@ export default {
     console.log("parentId == "+parentId+  "title == "+title)
    // this.$route.meta.title = title + " - 子渠道管理"
     if(parentId){
-        this.getList();
+        this.initList();
     }
   },
   methods: {
+
+    initList(){
+      this.pageParams.pageNum = 1
+      this.getList();
+    },
+
     /** 查询用户列表 */
     getList() {
       this.loading = true;
@@ -377,7 +385,6 @@ export default {
     // 保存后的操作
     submitSuccess(){
       this.getList();
-      this.refreshChannelTree();
     },
     /**关闭弹窗*/
     hideDialog(){
@@ -401,11 +408,9 @@ export default {
       // this.createShow = true
       let parentId = row.channelId
       let title = row.name
-
-      // this.parentId = parentId
-      // this.title = title;
       this.queryParams.parentId = parentId
       this.queryParams.parentName = title
+      this.pageParams.pageNum = 1
       this.getList();
     },
   }

+ 2 - 0
src/views/business/channel/index.vue

@@ -118,12 +118,14 @@
           <el-table-column label="渠道名称" prop="name" show-overflow-tooltip  width="180px">
             <template slot-scope="scope">
               <el-button
+                  v-if="scope.row.childCnt > 0"
                   size="mini"
                   type="text"
                   @click="handleView(scope.row)"
                 >
                   {{scope.row.name}}
               </el-button>
+              <span v-else>{{scope.row.name}}</span>
             </template>
           </el-table-column>
           <el-table-column label="手机号码" prop="mobile" show-overflow-tooltip  width="120px"/>

+ 0 - 11
src/views/index.vue

@@ -268,21 +268,10 @@
              <div ref="echart4" style="width: 100%;height: 250px;"></div>
           </div>
         </div>
-
-
       </div>
     </div>
   </div>
 </template>
-
-
-<!--
-<template>
-  <div class="coontent">
-      <div ref="echart1" style="width: 100%;height: 250px;"></div>
-  </div>
-</template> -->
-
 <script>
 import { getDailyData,getPayAmtList, getPayUserCntList, getTicketBoxTop, getTicketSiteTop} from "@/api/admin/index";
 import echarts from "echarts"