Pārlūkot izejas kodu

feat: 改变页面目录结构

aXin-0810 2 gadi atpakaļ
vecāks
revīzija
7c0841e8e9
5 mainītis faili ar 18 papildinājumiem un 245 dzēšanām
  1. 1 0
      src/permission.js
  2. 1 229
      src/router/index.js
  3. 16 16
      src/views/dashboard.vue
  4. 0 0
      src/views/issue.vue
  5. 0 0
      src/views/notice.vue

+ 1 - 0
src/permission.js

@@ -13,6 +13,7 @@ const _import = require('./router/_import_' + process.env.NODE_ENV) // 获取组
 const whiteList = ['/login'] // no redirect whitelist
 const lay = {
   path: '/',
+  redirect: '/dashboard',
   component: Layout,
   children: []
 }

+ 1 - 229
src/router/index.js

@@ -46,235 +46,7 @@ export const constantRoutes = [
     path: '/404',
     component: () => import('@/views/404'),
     hidden: true
-  },
-
-  // {
-  //   path: '/return_goods',
-  //   component: Layout,
-  //   children: [
-  //     {
-  //       path: 'new_apply',
-  //       name: 'new_apply',
-  //       component: () => import('@/views/supply/apply/new_apply'),
-  //       meta: { title: '零售退货申请', icon: '' }
-  //     },
-  //     {
-  //       path: 'new_engin',
-  //       name: 'new_apply',
-  //       component: () => import('@/views/supply/apply/new_engin'),
-  //       meta: { title: '工程退货申请', icon: '' }
-  //     }
-  //   ]
-  // }
-
-  // {
-  //   path: '/goods',
-  //   component: Layout,
-  //   name: 'goods',
-  //   meta: { title: '商品管理', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'goods_index',
-  //       name: 'goods_index',
-  //       component: () => import('@/views/goods/goods_index'),
-  //       meta: { title: '商品列表', icon: 'form' }
-  //     },
-  //     {
-  //       path: 'goods_add',
-  //       name: 'goods_add',
-  //       hidden: true,
-  //       component: () => import('@/views/goods/goods_add'),
-  //       meta: { title: '添加商品', icon: 'form', parent:{ name:'goods_index' }}
-  //     },
-  //     {
-  //       path: 'classify_index',
-  //       name: 'classify',
-  //       component: () => import('@/views/goods/classify_index'),
-  //       meta: { title: '分类管理', icon: 'form' }
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/order',
-  //   component: Layout,
-  //   name: 'order',
-  //   meta: { title: '订单管理', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'order_list',
-  //       name: 'order_list',
-  //       component: () => import('@/views/order/order_list'),
-  //       meta: { title: '订单列表', icon: 'form'}
-  //     },
-  //     {
-  //       path: 'detail',
-  //       name: 'detail',
-  //       hidden: true,
-  //       component: () => import('@/views/order/detail'),
-  //       meta: { title: '订单详情', parent:{ name:'order_list' } },
-  //     },
-  //     {
-  //       path: 'order_refund',
-  //       name: 'order_refund',
-  //       component: () => import('@/views/order/order_refund'),
-  //       meta: { title: '维权订单', icon: 'form'},
-  //     },
-  //     {
-  //       path: 'order_refund/order_refund_detail',
-  //       name: 'order_refund_detail',
-  //       hidden: true,
-  //       component: () => import('@/views/order/order_refund_detail'),
-  //       meta: { title: '维权详情', parent:{ name:'order_refund' } }
-  //     },
-  //     {
-  //       path: 'invoice',
-  //       name: 'invoice',
-  //       component: () => import('@/views/order/invoice'),
-  //       meta: { title: '开发票', icon: 'form' }
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/activity',
-  //   component: Layout,
-  //   name: 'activity',
-  //   meta: { title: '活动管理', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'seckill_index',
-  //       name: 'seckill_index',
-  //       component: () => import('@/views/activity/seckill_index'),
-  //       meta: { title: '秒杀活动', icon: 'form' }
-  //     },
-  //     {
-  //       path: 'seckill_add',
-  //       name: 'seckill_add',
-  //       hidden: true,
-  //       component: () => import('@/views/activity/seckill_add'),
-  //       meta: { title: '添加商品', icon: 'form', parent:{ name:'seckill_index' }}
-  //     },
-  //     {
-  //       path: 'coupon_index',
-  //       name: 'coupon',
-  //       component: () => import('@/views/activity/coupon_index'),
-  //       meta: { title: '优惠券设置', icon: 'form' }
-  //     }
-  //   ]
-  // },
-
-  // {
-  //   path: '/member',
-  //   component: Layout,
-  //   name: 'member',
-  //   meta: { title: '会员管理', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       name: 'index',
-  //       component: () => import('@/views/member/index'),
-  //       meta: { title: '会员管理', icon: 'form' }
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/settlement',
-  //   component: Layout,
-  //   name: 'settlement',
-  //   meta: { title: '结算管理', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       name: 'settlement_index',
-  //       component: () => import('@/views/settlement/index'),
-  //       meta: { title: '结算管理', icon: 'form' }
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/freight',
-  //   component: Layout,
-  //   name: 'freight',
-  //   meta: { title: '配送管理', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       name: 'freight_index',
-  //       component: () => import('@/views/freight/index'),
-  //       meta: { title: '配送管理', icon: 'form' }
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/storage',
-  //   component: Layout,
-  //   name: 'storage',
-  //   meta: { title: '仓储管理', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       name: 'storage_index',
-  //       component: () => import('@/views/storage/index'),
-  //       meta: { title: '仓储管理', icon: 'form' }
-  //     }
-  //   ]
-  // },
-  // {
-  //   path: '/notice',
-  //   component: Layout,
-  //   name: 'notice',
-  //   meta: { title: '消息中心', icon: 'el-icon-s-help' },
-  //   children: [
-  //     {
-  //       path: 'index',
-  //       name: 'notice_index',
-  //       component: () => import('@/views/notice/index'),
-  //       meta: { title: '消息列表', icon: 'form' }
-  //     }
-  //   ]
-  // },
-
-  // {
-  //   path: '/setting',
-  //   component: Layout,
-  //   name: 'Setting',
-  //   meta: { title: '系统设置', icon: 'el-icon-s-tools' },
-  //   alwaysShow: true,
-  //   children: [
-  //     {
-  //       path: 'personal',
-  //       name: 'personal',
-  //       component: () => import('@/views/setting/personal'),
-  //       meta: { title: '个人信息', icon: 'table' }
-  //     },
-  //     {
-  //       path: 'account',
-  //       name: 'account',
-  //       component: () => import('@/views/setting/account'),
-  //       meta: { title: '账户管理', icon: 'table' }
-  //     },
-  //     {
-  //       path: 'role',
-  //       name: 'role',
-  //       component: () => import('@/views/setting/role'),
-  //       meta: { title: '权限管理', icon: 'table' }
-  //     },
-  //     {
-  //       path: 'oplog',
-  //       name: 'oplog',
-  //       component: () => import('@/views/setting/oplog'),
-  //       meta: { title: '操作日志', icon: 'table' }
-  //     },
-  //     {
-  //       path: 'banner',
-  //       name: 'banner',
-  //       component: () => import('@/views/setting/banner'),
-  //       meta: { title: '轮播图管理', icon: 'table' }
-  //     }
-  //   ]
-  // },
-
-  // 404 page must be placed at the end !!!
-  // { path: '*', redirect: '/404', hidden: true }
+  }
 ]
 
 const createRouter = () =>

+ 16 - 16
src/views/dashboard/index.vue → src/views/dashboard.vue

@@ -168,27 +168,28 @@
           highlight-current-row
           stripe
         >
-        <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip >
+          <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{ scope.row.id }}</el-link>
-              <template v-else>{{ scope.row.id  }}</template>
+              <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
+                scope.row.id
+              }}</el-link>
+              <template v-else>{{ scope.row.id }}</template>
             </template>
           </el-table-column>
           <el-table-column align="center" label="内容" prop="orderTrackStatus" min-width="160" show-overflow-tooltip />
           <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip >
-              <template slot-scope="scope">
-                  {{ scope.row.address?scope.row.address:'——' }}
-              </template>
+          <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.address ? scope.row.address : '——' }}
+            </template>
           </el-table-column>
-          <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip >
-            <template slot-scope="scope">{{ scope.row.receivingName?scope.row.receivingName:'——' }}</template>
+          <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
+            <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
           </el-table-column>
           <el-table-column align="center" label="" min-width="80" show-overflow-tooltip fixed="right">
             <template slot-scope="scope">
               <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
-
             </template>
           </el-table-column>
         </el-table>
@@ -311,7 +312,7 @@ export default {
     this.getMenuList()
   },
   computed: {
-    ...mapGetters(['showMessages', 'userid','isCustomer'])
+    ...mapGetters(['showMessages', 'userid', 'isCustomer'])
   },
   data() {
     return {
@@ -336,7 +337,6 @@ export default {
       visible: false,
       orderId: '',
       logisticsDetail: []
-
     }
   },
 
@@ -570,9 +570,9 @@ export default {
       this.orderId = ''
       this.visible = false
     },
-    handleJump(id){
-      this.$router.push({path:`/exwarehouse/sum_list?id=${id}`})
-      this.$store.commit('user/SET_MESSAGE', false);
+    handleJump(id) {
+      this.$router.push({ path: `/exwarehouse/sum_list?id=${id}` })
+      this.$store.commit('user/SET_MESSAGE', false)
       this.inDialog = false
     }
   }

+ 0 - 0
src/views/issue/index.vue → src/views/issue.vue


+ 0 - 0
src/views/notice/index.vue → src/views/notice.vue