zh 2 năm trước cách đây
mục cha
commit
00510ced0c

+ 4 - 2
src/layout/components/AppMain.vue

@@ -35,7 +35,7 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['show']),
+    ...mapGetters(['show', 'isCustomer']),
     cachedViews() {
       return this.$store.state.tagsView.cachedViews
     },
@@ -55,7 +55,9 @@ export default {
     setModuleId(this.$route.meta.moduleId)
   },
   mounted() {
-    this.handleInterVal()
+    if (this.isCustomer) {
+      this.handleInterVal()
+    }
   },
   beforeDestroy() {
     this.handleClearInterVal()

+ 25 - 12
src/views/dashboard.vue

@@ -16,13 +16,31 @@
                 :span="4"
                 style="margin-top: 16px; padding: 3px 20px"
               >
-                <el-link class="link" :underline="false" @click="clickMenu(it.path)">{{ it.moduleName }}</el-link>
+                <el-link class="link" :underline="false" @click="clickMenu(it.fullUrl)">{{ it.moduleName }}</el-link>
               </el-col>
             </el-row>
           </div>
         </div>
-        <div class="group">
-          <MenuRouter v-if="routes && routes.length" :list="routes" :flag="true" />
+        <div v-for="(item, index) in menuList" :key="index" class="group">
+          <div v-if="item.moduleName != '首页'">
+            <div class="main-title">
+              <div class="title">{{ item.moduleName }}</div>
+            </div>
+            <div v-if="item.children && item.children.length" class="child">
+              <el-row :gutter="20">
+                <el-col v-for="(it, idx) in item.children" :key="idx" class="item" :span="4">
+                  <el-link class="link" :underline="false" @click="clickMenu(it.fullUrl)">{{ it.moduleName }}</el-link>
+                </el-col>
+              </el-row>
+            </div>
+            <div v-else class="child">
+              <div class="item">
+                <el-link class="link" :underline="false" @click="clickMenu(item.fullUrl)">{{
+                  item.moduleName
+                }}</el-link>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
       <!-- 弹窗 -->
@@ -71,7 +89,7 @@ import {
   getListInvoiceOrder
 } from '@/api/dashboard'
 import { getArrivalNotice } from '@/api/stock'
-import MenuRouter from '@/components/MenuRouter'
+
 import { getListOrderTrack } from '@/api/supply/pickup'
 import { getFileUrl } from '@/api/common'
 import { mapGetters } from 'vuex'
@@ -79,8 +97,7 @@ import popu from '@/components/template/popu.vue'
 export default {
   name: 'Dashboard',
   components: {
-    popu,
-    MenuRouter
+    popu
   },
   created() {
     getRouter({
@@ -88,16 +105,12 @@ export default {
       adminUserId: this.userid
     }).then(res => {
       this.menuList = res.data
+      console.log(res.data)
     })
     this.getMenuList()
   },
   computed: {
-    ...mapGetters(['showMessages', 'userid', 'isCustomer']),
-    routes() {
-      // return this.$router.options.routes
-      // this.$router.options.routes.concat(global.antRouter)
-      return global.antRouter // 把路由concat进去
-    }
+    ...mapGetters(['showMessages', 'userid', 'isCustomer'])
   },
   data() {
     return {

+ 1 - 0
src/views/sales_policy/components/AddPolicy.vue

@@ -263,6 +263,7 @@
                   v-model="scope.row.priceType"
                   size="mini"
                   filterable
+                  clearable
                   @change="setText($event, scope.$index, scope.row, 'priceType')"
                   @focus="handlePriceType(scope.row)"
                 >

+ 5 - 4
src/views/sales_policy/components/details.vue

@@ -1137,7 +1137,7 @@ export default {
       this.clistLoading = true
       getPolicyList({
         pageNum: this.policyList.currentPages,
-        pageSize: this.policyList.pageSize,
+        pageSize: this.policyList.pageSizes,
         policyId: this.id,
         keyword: this.policyList.keyword
       }).then(res => {
@@ -1271,13 +1271,14 @@ export default {
     },
     // 更改每页数量
     handleSizeChanges4(val) {
-      this.policyList.pageSizes = val
-      this.policyList.currentPages = 1
+      this.$set(this.policyList, 'pageSizes', val)
+      this.$set(this.policyList, 'currentPages', 1)
       this.getPolicyList()
     },
     // 更改当前页
     handleCurrentChanges4(val) {
-      this.policyList.currentPages = val
+      this.$set(this.policyList, 'currentPages', val)
+
       this.getPolicyList()
     },
     // 导入

+ 1 - 0
src/views/sales_policy/components/editPolicy.vue

@@ -267,6 +267,7 @@
                     v-model="scope.row.priceType"
                     size="mini"
                     filterable
+                    clearable
                     @change="setText($event, scope.$index, scope.row, 'priceType')"
                     @focus="handlePriceType(scope.row)"
                   >

+ 1 - 1
src/views/sales_policy/policy_list.vue

@@ -214,7 +214,7 @@ export default {
   }),
   methods: {
     selectable(row, index) {
-      if (row.status === '有效' && row.examineStatus === '审核通过') {
+      if (row.examineStatus === '审核通过') {
         return true
       } else {
         return false