Merge branch 'master' of http://60.204.229.151:20080/chenkangxu/merchant-web
This commit is contained in:
		
						commit
						2c3fe0f5da
					
				| 
						 | 
				
			
			@ -146,4 +146,12 @@ export const marketing = {
 | 
			
		|||
      data,
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
  //概况
 | 
			
		||||
  overview: (data) => {
 | 
			
		||||
    return $http.request({
 | 
			
		||||
      url: `/merchant-api/memberUnitUser/overview`,
 | 
			
		||||
      method: "get",
 | 
			
		||||
      params: data,
 | 
			
		||||
    });
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,6 +48,10 @@ export const mer_admin = {
 | 
			
		|||
  getProductPage: (data) => {
 | 
			
		||||
    return $http.post(`/merchant-api/product/page`, data);
 | 
			
		||||
  },
 | 
			
		||||
  //商品概况
 | 
			
		||||
  getProductOverview: (data) => {
 | 
			
		||||
    return $http.post(`/merchant-api/product/overview`, data);
 | 
			
		||||
  },
 | 
			
		||||
  //商户商品分类
 | 
			
		||||
  getProductCategory: (data) => {
 | 
			
		||||
    return $http.request({
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,20 +30,46 @@ export default {
 | 
			
		|||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "商品",
 | 
			
		||||
      url: "local-course/resources",
 | 
			
		||||
      name: "运营管理",
 | 
			
		||||
      url: "operation-management",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-menu",
 | 
			
		||||
      elIcon: "el-icon-s-help",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "店铺列表",
 | 
			
		||||
          url: "operation-management/shop-list/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-shopping-cart-full",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "分销商列表",
 | 
			
		||||
          url: "operation-management/distributor/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-shopping-cart-full",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "商品管理",
 | 
			
		||||
          url: "product/commodity/index",
 | 
			
		||||
          url: "operation-management/commodity/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-menu",
 | 
			
		||||
| 
						 | 
				
			
			@ -56,7 +82,7 @@ export default {
 | 
			
		|||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "订单管理",
 | 
			
		||||
          url: "product/order/index",
 | 
			
		||||
          url: "operation-management/order/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-menu",
 | 
			
		||||
| 
						 | 
				
			
			@ -69,7 +95,7 @@ export default {
 | 
			
		|||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "轮播图管理",
 | 
			
		||||
          url: "product/banner/index",
 | 
			
		||||
          url: "operation-management/banner/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-menu",
 | 
			
		||||
| 
						 | 
				
			
			@ -82,7 +108,7 @@ export default {
 | 
			
		|||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "公告管理",
 | 
			
		||||
          url: "product/notice/index",
 | 
			
		||||
          url: "operation-management/notice/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-menu",
 | 
			
		||||
| 
						 | 
				
			
			@ -90,123 +116,15 @@ export default {
 | 
			
		|||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "运费管理",
 | 
			
		||||
      url: "",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-money",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "运费模板",
 | 
			
		||||
          url: "logistics-fare/logistics-template/index",
 | 
			
		||||
          name: "角色管理",
 | 
			
		||||
          url: "operation-management/role/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "银行卡管理",
 | 
			
		||||
      url: "bank-card/index",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-picture-outline",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [],
 | 
			
		||||
      hideInMenu: true,
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "品牌管理",
 | 
			
		||||
      url: "",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-money",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "品牌管理",
 | 
			
		||||
          url: "brand/config/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "优惠卷管理",
 | 
			
		||||
      url: "coupon/index",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-document-remove",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "预售管理",
 | 
			
		||||
      url: "",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-data-analysis",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "预售商品",
 | 
			
		||||
          url: "presale/products/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "预售订单",
 | 
			
		||||
          url: "presale/order/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          elIcon: "el-icon-user",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
| 
						 | 
				
			
			@ -218,7 +136,7 @@ export default {
 | 
			
		|||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "数据中心",
 | 
			
		||||
      url: "",
 | 
			
		||||
      url: "datacenter",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-tickets",
 | 
			
		||||
| 
						 | 
				
			
			@ -270,8 +188,102 @@ export default {
 | 
			
		|||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "营销管理",
 | 
			
		||||
      url: "",
 | 
			
		||||
      name: "银行卡管理",
 | 
			
		||||
      url: "bank-card/index",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-picture-outline",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [],
 | 
			
		||||
      hideInMenu: true,
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "品牌管理",
 | 
			
		||||
      url: "brand",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-money",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "品牌管理",
 | 
			
		||||
          url: "brand/config/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "优惠卷营销工具管理",
 | 
			
		||||
      url: "coupon/index",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-document-remove",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "预售营销工具管理",
 | 
			
		||||
      url: "presale",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-data-analysis",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "预售商品",
 | 
			
		||||
          url: "presale/products/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "预售订单",
 | 
			
		||||
          url: "presale/order/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "会员营销工具管理",
 | 
			
		||||
      url: "marketing",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-tickets",
 | 
			
		||||
| 
						 | 
				
			
			@ -350,7 +362,7 @@ export default {
 | 
			
		|||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "代理商",
 | 
			
		||||
      url: "",
 | 
			
		||||
      url: "agent",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-tickets",
 | 
			
		||||
| 
						 | 
				
			
			@ -409,32 +421,6 @@ export default {
 | 
			
		|||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "店铺列表",
 | 
			
		||||
          url: "agent/shop-list/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-shopping-cart-full",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "分销商列表",
 | 
			
		||||
          url: "agent/distributor/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-shopping-cart-full",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
| 
						 | 
				
			
			@ -449,6 +435,7 @@ export default {
 | 
			
		|||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
      hideInMenu: true,
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
| 
						 | 
				
			
			@ -456,7 +443,7 @@ export default {
 | 
			
		|||
      parentName: null,
 | 
			
		||||
      name: "钱包管理",
 | 
			
		||||
      url: "local-course/resources",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      perms: "wallet",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-menu",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
| 
						 | 
				
			
			@ -477,6 +464,33 @@ export default {
 | 
			
		|||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      menuId: getUUID(),
 | 
			
		||||
      parentId: 0,
 | 
			
		||||
      parentName: null,
 | 
			
		||||
      name: "运费管理",
 | 
			
		||||
      url: "ogistics-fare",
 | 
			
		||||
      perms: "",
 | 
			
		||||
      type: 0,
 | 
			
		||||
      elIcon: "el-icon-money",
 | 
			
		||||
      orderNum: 0,
 | 
			
		||||
      open: null,
 | 
			
		||||
      list: [
 | 
			
		||||
        {
 | 
			
		||||
          menuId: getUUID(),
 | 
			
		||||
          parentId: 0,
 | 
			
		||||
          parentName: null,
 | 
			
		||||
          name: "运费模板",
 | 
			
		||||
          url: "logistics-fare/logistics-template/index",
 | 
			
		||||
          perms: "",
 | 
			
		||||
          type: 1,
 | 
			
		||||
          elIcon: "el-icon-postcard",
 | 
			
		||||
          orderNum: 0,
 | 
			
		||||
          open: null,
 | 
			
		||||
          list: [],
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  ],
 | 
			
		||||
  code: 0,
 | 
			
		||||
  permissions: [],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,7 @@ import Vue from "vue";
 | 
			
		|||
import Router from "vue-router";
 | 
			
		||||
import http from "@/utils/httpRequest";
 | 
			
		||||
import { isURL } from "@/utils/validate";
 | 
			
		||||
import { clearLoginInfo } from "@/utils";
 | 
			
		||||
import { clearLoginInfo, getMenu } from "@/utils";
 | 
			
		||||
import FULL_ROUTERS from "./full-routers";
 | 
			
		||||
import $api from "@/api/index.js";
 | 
			
		||||
import store from "@/store";
 | 
			
		||||
| 
						 | 
				
			
			@ -103,21 +103,24 @@ router.beforeEach((to, from, next) => {
 | 
			
		|||
    $api
 | 
			
		||||
      .getUserInfo()
 | 
			
		||||
      .then(({ data }) => {
 | 
			
		||||
        let permissionsData = getMenu(data.data.role);
 | 
			
		||||
        const filterTreeData = (data, permissions) => {
 | 
			
		||||
          return data; //临时性返回所有菜单方便调试
 | 
			
		||||
          // return data.reduce((filtered, node) => {
 | 
			
		||||
          //   // 如果节点的权限在权限数组中
 | 
			
		||||
          //   if (permissions.includes(node.url)) {
 | 
			
		||||
          //     // 递归过滤子节点
 | 
			
		||||
          //     const list = filterTreeData(node.list || [], permissions);
 | 
			
		||||
          //     // 创建一个新的节点,包含过滤后的子节点
 | 
			
		||||
          //     filtered.push({
 | 
			
		||||
          //       ...node,
 | 
			
		||||
          //       list,
 | 
			
		||||
          //     });
 | 
			
		||||
          //   }
 | 
			
		||||
          //   return filtered;
 | 
			
		||||
          // }, []);
 | 
			
		||||
          console.log(data);
 | 
			
		||||
 | 
			
		||||
          // return data; //临时性返回所有菜单方便调试
 | 
			
		||||
          return data.reduce((filtered, node) => {
 | 
			
		||||
            // 如果节点的权限在权限数组中
 | 
			
		||||
            if (permissions.includes(node.url)) {
 | 
			
		||||
              // 递归过滤子节点
 | 
			
		||||
              const list = filterTreeData(node.list || [], permissions);
 | 
			
		||||
              // 创建一个新的节点,包含过滤后的子节点
 | 
			
		||||
              filtered.push({
 | 
			
		||||
                ...node,
 | 
			
		||||
                list,
 | 
			
		||||
              });
 | 
			
		||||
            }
 | 
			
		||||
            return filtered;
 | 
			
		||||
          }, []);
 | 
			
		||||
        };
 | 
			
		||||
        console.log(data, "用户信息");
 | 
			
		||||
        sessionStorage.setItem("role", JSON.stringify(data.data.role));
 | 
			
		||||
| 
						 | 
				
			
			@ -160,10 +163,13 @@ router.beforeEach((to, from, next) => {
 | 
			
		|||
          JSON.stringify(data.data.permissions || "[]")
 | 
			
		||||
        );
 | 
			
		||||
        //添加全量菜单,根据权限进行过滤
 | 
			
		||||
        let _menu = filterTreeData(
 | 
			
		||||
          FULL_ROUTERS.menuList,
 | 
			
		||||
          data.data.permissions
 | 
			
		||||
        );
 | 
			
		||||
        // let _menu = filterTreeData(
 | 
			
		||||
        //   FULL_ROUTERS.menuList,
 | 
			
		||||
        //   data.data.permissions
 | 
			
		||||
        // );
 | 
			
		||||
        console.log(permissionsData);
 | 
			
		||||
        
 | 
			
		||||
        let _menu = filterTreeData(FULL_ROUTERS.menuList, permissionsData);
 | 
			
		||||
        fnAddDynamicMenuRoutes(_menu);
 | 
			
		||||
        sessionStorage.setItem("menuList", JSON.stringify(_menu));
 | 
			
		||||
        router.options.isAddDynamicMenuRoutes = true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -136,6 +136,69 @@ function doHandleMonth(month) {
 | 
			
		|||
  }
 | 
			
		||||
  return m;
 | 
			
		||||
}
 | 
			
		||||
/**
 | 
			
		||||
 * 权限
 | 
			
		||||
 * @param {*} min
 | 
			
		||||
 * @param {*} max
 | 
			
		||||
 */
 | 
			
		||||
export function getMenu(role) {
 | 
			
		||||
  if (role == "ROLE_MERCHANT" || role == "ROLE_MANAGER") {
 | 
			
		||||
    return [
 | 
			
		||||
      "operation-management",
 | 
			
		||||
      "operation-management/commodity/index",
 | 
			
		||||
      "operation-management/order/index",
 | 
			
		||||
      "operation-management/banner/index",
 | 
			
		||||
      "operation-management/notice/index",
 | 
			
		||||
      "operation-management/role/index",
 | 
			
		||||
      "datacenter",
 | 
			
		||||
      "datacenter/customer-analysis/index",
 | 
			
		||||
      "datacenter/product-analysis/index",
 | 
			
		||||
      "datacenter/order-analysis/index",
 | 
			
		||||
      "coupon/index",
 | 
			
		||||
      "presale",
 | 
			
		||||
      "presale/products/index",
 | 
			
		||||
      "presale/order/index",
 | 
			
		||||
      "marketing",
 | 
			
		||||
      "marketing/level/index",
 | 
			
		||||
      "marketing/user/index",
 | 
			
		||||
      "marketing/points-setting/index",
 | 
			
		||||
      "marketing/points-mall/index",
 | 
			
		||||
      "marketing/points-order/index",
 | 
			
		||||
      "local-course/resources",
 | 
			
		||||
      "wallet/index",
 | 
			
		||||
      "ogistics-fare",
 | 
			
		||||
      "logistics-fare/logistics-template/index",
 | 
			
		||||
    ];
 | 
			
		||||
  } else if (role == "ROLE_BRAND_MANAGER") {
 | 
			
		||||
    return [
 | 
			
		||||
      "operation-management",
 | 
			
		||||
      "operation-management/shop-list/index",
 | 
			
		||||
      "operation-management/order/index",
 | 
			
		||||
      "operation-management/role/index",
 | 
			
		||||
      "datacenter",
 | 
			
		||||
      "datacenter/customer-analysis/index",
 | 
			
		||||
      "datacenter/product-analysis/index",
 | 
			
		||||
      "datacenter/order-analysis/index",
 | 
			
		||||
      "brand",
 | 
			
		||||
      "brand/config/index",
 | 
			
		||||
      "local-course/resources",
 | 
			
		||||
      "wallet/index",
 | 
			
		||||
    ];
 | 
			
		||||
  } else if (role == "ROLE_AGENT") {
 | 
			
		||||
    return [
 | 
			
		||||
      "operation-management",
 | 
			
		||||
      "operation-management/shop-list/index",
 | 
			
		||||
      "operation-management/order/index",
 | 
			
		||||
      "operation-management/role/index",
 | 
			
		||||
      "datacenter",
 | 
			
		||||
      "datacenter/customer-analysis/index",
 | 
			
		||||
      "datacenter/product-analysis/index",
 | 
			
		||||
      "datacenter/order-analysis/index",
 | 
			
		||||
      "local-course/resources",
 | 
			
		||||
      "wallet/index",
 | 
			
		||||
    ];
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function isNumberStr(str) {
 | 
			
		||||
  return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -119,7 +119,7 @@ export default {
 | 
			
		|||
      JSON.parse(sessionStorage.getItem("password")) == "123456" &&
 | 
			
		||||
      JSON.parse(sessionStorage.getItem("role")) === "ROLE_BRAND_MANAGER"
 | 
			
		||||
    ) {
 | 
			
		||||
      this.dialogVisible = false;
 | 
			
		||||
      this.dialogVisible = true;
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
| 
						 | 
				
			
			@ -128,8 +128,9 @@ export default {
 | 
			
		|||
        console.log(valid);
 | 
			
		||||
        if (valid) {
 | 
			
		||||
          this.$api.mer_admin
 | 
			
		||||
            .simplePassword({
 | 
			
		||||
              password: this.form.password,
 | 
			
		||||
            .changePassword({
 | 
			
		||||
              oldPassword: JSON.parse(sessionStorage.getItem("password")),
 | 
			
		||||
              newPassword: this.form.password,
 | 
			
		||||
            })
 | 
			
		||||
            .then((res) => {
 | 
			
		||||
              this.$api.logout().then(({ data }) => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,6 +86,35 @@
 | 
			
		|||
            <el-button type="primary" @click="Reset">重置</el-button>
 | 
			
		||||
          </el-form-item>
 | 
			
		||||
        </el-form>
 | 
			
		||||
        <div class="stat-list">
 | 
			
		||||
          <div class="stat-item">
 | 
			
		||||
            <i style="font-size: 22px" class="el-icon-user-solid"></i>
 | 
			
		||||
            <div class="stat-right">
 | 
			
		||||
              <div class="stat-title">用户数量(人)</div>
 | 
			
		||||
              <div class="stat-value">
 | 
			
		||||
                <span style="font-size: 20px">{{
 | 
			
		||||
                  overviewList.totalCount
 | 
			
		||||
                }}</span>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="stat-item">
 | 
			
		||||
            <i style="font-size: 22px" class="el-icon-s-custom"></i>
 | 
			
		||||
            <div class="stat-right">
 | 
			
		||||
              <div class="stat-title">今日新增(人)</div>
 | 
			
		||||
              <div class="stat-value">
 | 
			
		||||
                <span style="font-size: 20px">{{
 | 
			
		||||
                  overviewList.todayCount
 | 
			
		||||
                }}</span>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="mb-2">
 | 
			
		||||
          <el-button type="success" size="small" @click="userExport"
 | 
			
		||||
            >导出</el-button
 | 
			
		||||
          >
 | 
			
		||||
        </div>
 | 
			
		||||
      </template>
 | 
			
		||||
    </obj-table-plus>
 | 
			
		||||
    <!-- 修改积分或成长值 -->
 | 
			
		||||
| 
						 | 
				
			
			@ -99,6 +128,8 @@
 | 
			
		|||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import * as XLSX from "xlsx";
 | 
			
		||||
import { saveAs } from "file-saver";
 | 
			
		||||
import modifyPoints from "./popup/modify-points.vue";
 | 
			
		||||
import viewDetails from "./popup/view-details.vue";
 | 
			
		||||
import { mapState } from "vuex";
 | 
			
		||||
| 
						 | 
				
			
			@ -123,6 +154,7 @@ export default {
 | 
			
		|||
      productFilterType: "SALE",
 | 
			
		||||
      selectList: [],
 | 
			
		||||
      value1: [],
 | 
			
		||||
      overviewList: {},
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
| 
						 | 
				
			
			@ -165,6 +197,11 @@ export default {
 | 
			
		|||
        .catch((err) => {
 | 
			
		||||
          this.$refs.oTable.complete(false);
 | 
			
		||||
        });
 | 
			
		||||
      this.$api.marketing
 | 
			
		||||
        .overview({ ...this.formInline, ...this.form })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          this.overviewList = res.data.data;
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    Reset() {
 | 
			
		||||
      this.form = {};
 | 
			
		||||
| 
						 | 
				
			
			@ -181,6 +218,42 @@ export default {
 | 
			
		|||
        this.form.endRegistrationTime = "";
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    async userExport() {
 | 
			
		||||
      let now = new Date();
 | 
			
		||||
      let year = now.getFullYear();
 | 
			
		||||
      let month = now.getMonth() + 1;
 | 
			
		||||
      let day = now.getDate();
 | 
			
		||||
      let res = await this.$api.marketing.marketingUserPage({
 | 
			
		||||
        pageNumber: 1,
 | 
			
		||||
        pageSize: 9999999,
 | 
			
		||||
        ...this.formInline,
 | 
			
		||||
        ...this.form,
 | 
			
		||||
      });
 | 
			
		||||
      console.log(res);
 | 
			
		||||
      let userData = res.data.data.data.map((item) => {
 | 
			
		||||
        return {
 | 
			
		||||
          用户ID: item.userId,
 | 
			
		||||
          用户头像: item.headUrl,
 | 
			
		||||
          用户昵称: item.username,
 | 
			
		||||
          手机号: item.mobile,
 | 
			
		||||
          会员等级id: item.levelId,
 | 
			
		||||
          会员等级名称: item.levelName,
 | 
			
		||||
          生日: item.birthday,
 | 
			
		||||
          注册时间: item.registrationTime,
 | 
			
		||||
        };
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      const workbook = XLSX.utils.book_new();
 | 
			
		||||
      const worksheet = XLSX.utils.json_to_sheet(userData);
 | 
			
		||||
 | 
			
		||||
      XLSX.utils.book_append_sheet(workbook, worksheet, "用户管理");
 | 
			
		||||
      const excelData = XLSX.write(workbook, {
 | 
			
		||||
        type: "array",
 | 
			
		||||
        bookType: "xlsx",
 | 
			
		||||
      });
 | 
			
		||||
      const blob = new Blob([excelData], { type: "application/octet-stream" });
 | 
			
		||||
      saveAs(blob, `用户管理-${year + "" + month + day}.xlsx`);
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    tableCols() {
 | 
			
		||||
| 
						 | 
				
			
			@ -345,4 +418,27 @@ export default {
 | 
			
		|||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped></style>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.stat-list {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  /* justify-content: space-between; */
 | 
			
		||||
  // flex-wrap: wrap;
 | 
			
		||||
  margin-bottom: 10px;
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
  border: 1px solid #ccc;
 | 
			
		||||
}
 | 
			
		||||
.stat-item {
 | 
			
		||||
  width: 30%;
 | 
			
		||||
  margin: 20px 20px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
}
 | 
			
		||||
.stat-right {
 | 
			
		||||
  margin-left: 12px;
 | 
			
		||||
  font-size: 18px;
 | 
			
		||||
}
 | 
			
		||||
.stat-title {
 | 
			
		||||
  margin-bottom: 5px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			@ -73,6 +73,22 @@
 | 
			
		|||
                </el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            <el-form-item label="应用">
 | 
			
		||||
              <el-select
 | 
			
		||||
                class="filter-item"
 | 
			
		||||
                style="width: 200px"
 | 
			
		||||
                v-model="formInline.app"
 | 
			
		||||
                placeholder="请选择应用"
 | 
			
		||||
              >
 | 
			
		||||
                <el-option
 | 
			
		||||
                  v-for="item in application"
 | 
			
		||||
                  :key="item.value"
 | 
			
		||||
                  :label="item.label"
 | 
			
		||||
                  :value="item.value"
 | 
			
		||||
                >
 | 
			
		||||
                </el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            <el-form-item>
 | 
			
		||||
              <el-button type="primary" @click="$refs.oTable.reload()"
 | 
			
		||||
                >查询</el-button
 | 
			
		||||
| 
						 | 
				
			
			@ -146,6 +162,17 @@ export default {
 | 
			
		|||
          label: "云店分类",
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
      application: [
 | 
			
		||||
        { label: "用户端", value: 1 },
 | 
			
		||||
        {
 | 
			
		||||
          label: "商家端",
 | 
			
		||||
          value: 2,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: "专员端",
 | 
			
		||||
          value: 3,
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
| 
						 | 
				
			
			@ -153,6 +180,7 @@ export default {
 | 
			
		|||
      type: 0,
 | 
			
		||||
      ownerId: this.shopId,
 | 
			
		||||
      module: "shop",
 | 
			
		||||
      app: 1,
 | 
			
		||||
    };
 | 
			
		||||
    this.$nextTick(() => {
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
| 
						 | 
				
			
			@ -203,6 +231,8 @@ export default {
 | 
			
		|||
      this.formInline = {
 | 
			
		||||
        type: 0,
 | 
			
		||||
        ownerId: this.shopId,
 | 
			
		||||
        module: "shop",
 | 
			
		||||
        app: 1,
 | 
			
		||||
      };
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			@ -62,6 +62,44 @@
 | 
			
		|||
              <el-button type="primary" @click="Reset">重置</el-button>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-form>
 | 
			
		||||
          <div class="stat-list">
 | 
			
		||||
            <div class="stat-item">
 | 
			
		||||
              <i style="font-size: 22px" class="el-icon-s-goods"></i>
 | 
			
		||||
              <div class="stat-right">
 | 
			
		||||
                <div class="stat-title">总商品数量(个)</div>
 | 
			
		||||
                <div class="stat-value">
 | 
			
		||||
                  <span style="font-size: 20px">{{overview.productCount}}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="stat-item">
 | 
			
		||||
              <i style="font-size: 22px" class="el-icon-s-shop"></i>
 | 
			
		||||
              <div class="stat-right">
 | 
			
		||||
                <div class="stat-title">上架中商品数量(个)</div>
 | 
			
		||||
                <div class="stat-value">
 | 
			
		||||
                  <span style="font-size: 20px">{{overview.productOnSaleCount}}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="stat-item">
 | 
			
		||||
              <i style="font-size: 22px" class="el-icon-s-marketing"></i>
 | 
			
		||||
              <div class="stat-right">
 | 
			
		||||
                <div class="stat-title">折扣商品数量(个)</div>
 | 
			
		||||
                <div class="stat-value">
 | 
			
		||||
                  <span style="font-size: 20px">{{overview.productDiscountCount}}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="stat-item">
 | 
			
		||||
              <i style="font-size: 22px" class="el-icon-s-promotion"></i>
 | 
			
		||||
              <div class="stat-right">
 | 
			
		||||
                <div class="stat-title">仓库中商品数量(个)</div>
 | 
			
		||||
                <div class="stat-value">
 | 
			
		||||
                  <span style="font-size: 20px">{{overview.productWarehouseCount}}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
          <el-tabs v-model="activeName" @tab-click="handleClick">
 | 
			
		||||
            <el-tab-pane label="在售" name="在售"></el-tab-pane>
 | 
			
		||||
            <el-tab-pane label="仓库中" name="仓库中"></el-tab-pane>
 | 
			
		||||
| 
						 | 
				
			
			@ -128,6 +166,7 @@ export default {
 | 
			
		|||
      },
 | 
			
		||||
      productFilterType: "SALE",
 | 
			
		||||
      selectList: [],
 | 
			
		||||
      overview:{}
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
| 
						 | 
				
			
			@ -143,14 +182,14 @@ export default {
 | 
			
		|||
  methods: {
 | 
			
		||||
    //如果有多个菜市场调用
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$api.mer_admin
 | 
			
		||||
        .storeList({ marketId: this.formInline.marketId })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          this.formInline.shopId = res.data.data[0].shopId;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.oTable.reload();
 | 
			
		||||
          });
 | 
			
		||||
        });
 | 
			
		||||
      // this.$api.mer_admin
 | 
			
		||||
      //   .storeList({ marketId: this.formInline.marketId })
 | 
			
		||||
      //   .then((res) => {
 | 
			
		||||
      //     this.formInline.shopId = res.data.data[0].shopId;
 | 
			
		||||
      //     this.$nextTick(() => {
 | 
			
		||||
      //       this.$refs.oTable.reload();
 | 
			
		||||
      //     });
 | 
			
		||||
      //   });
 | 
			
		||||
    },
 | 
			
		||||
    addProduct() {
 | 
			
		||||
      this.$refs.addOrUpdate.toggle().add(this.formInline.shopId);
 | 
			
		||||
| 
						 | 
				
			
			@ -180,7 +219,6 @@ export default {
 | 
			
		|||
    },
 | 
			
		||||
    queryList(pageNo, pageSize) {
 | 
			
		||||
      console.log(this.formInline);
 | 
			
		||||
 | 
			
		||||
      this.$api.mer_admin
 | 
			
		||||
        .getProductPage({
 | 
			
		||||
          p: {
 | 
			
		||||
| 
						 | 
				
			
			@ -202,6 +240,10 @@ export default {
 | 
			
		|||
        .catch((err) => {
 | 
			
		||||
          this.$refs.oTable.complete(false);
 | 
			
		||||
        });
 | 
			
		||||
      this.$api.mer_admin.getProductOverview(this.formInline).then((res) => {
 | 
			
		||||
        console.log(res,'概况');
 | 
			
		||||
        this.overview = res.data.data;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    Reset() {
 | 
			
		||||
      this.formInline = {
 | 
			
		||||
| 
						 | 
				
			
			@ -427,4 +469,27 @@ export default {
 | 
			
		|||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped></style>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.stat-list {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
  /* justify-content: space-between; */
 | 
			
		||||
  // flex-wrap: wrap;
 | 
			
		||||
  margin-bottom: 10px;
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
  border: 1px solid #ccc;
 | 
			
		||||
}
 | 
			
		||||
.stat-item {
 | 
			
		||||
  width: 20%;
 | 
			
		||||
  margin: 20px 20px;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  align-items: center;
 | 
			
		||||
}
 | 
			
		||||
.stat-right {
 | 
			
		||||
  margin-left: 12px;
 | 
			
		||||
  font-size: 18px;
 | 
			
		||||
}
 | 
			
		||||
.stat-title {
 | 
			
		||||
  margin-bottom: 5px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			@ -73,6 +73,22 @@
 | 
			
		|||
                </el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            <el-form-item label="应用">
 | 
			
		||||
              <el-select
 | 
			
		||||
                class="filter-item"
 | 
			
		||||
                style="width: 200px"
 | 
			
		||||
                v-model="formInline.app"
 | 
			
		||||
                placeholder="请选择分类类型"
 | 
			
		||||
              >
 | 
			
		||||
                <el-option
 | 
			
		||||
                  v-for="item in application"
 | 
			
		||||
                  :key="item.value"
 | 
			
		||||
                  :label="item.label"
 | 
			
		||||
                  :value="item.value"
 | 
			
		||||
                >
 | 
			
		||||
                </el-option>
 | 
			
		||||
              </el-select>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            <el-form-item>
 | 
			
		||||
              <el-button type="primary" @click="$refs.oTable.reload()"
 | 
			
		||||
                >查询</el-button
 | 
			
		||||
| 
						 | 
				
			
			@ -146,6 +162,17 @@ export default {
 | 
			
		|||
          label: "云店分类",
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
      application: [
 | 
			
		||||
        { label: "用户端", value: 1 },
 | 
			
		||||
        {
 | 
			
		||||
          label: "商家端",
 | 
			
		||||
          value: 2,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: "专员端",
 | 
			
		||||
          value: 3,
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
| 
						 | 
				
			
			@ -153,6 +180,7 @@ export default {
 | 
			
		|||
      type: 0,
 | 
			
		||||
      targetId: this.shopId,
 | 
			
		||||
      position: "3",
 | 
			
		||||
      app: 1,
 | 
			
		||||
    };
 | 
			
		||||
    this.$nextTick(() => {
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
| 
						 | 
				
			
			@ -203,6 +231,8 @@ export default {
 | 
			
		|||
      this.formInline = {
 | 
			
		||||
        type: 0,
 | 
			
		||||
        targetId: this.shopId,
 | 
			
		||||
        position: "3",
 | 
			
		||||
        app: 1,
 | 
			
		||||
      };
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <div style="height: calc(100vh - 200px)">
 | 
			
		||||
      <obj-table-plus
 | 
			
		||||
        ref="oTable"
 | 
			
		||||
| 
						 | 
				
			
			@ -62,15 +61,17 @@
 | 
			
		|||
          </div> -->
 | 
			
		||||
        </template>
 | 
			
		||||
      </obj-table-plus>
 | 
			
		||||
      <!-- 订单详情 -->
 | 
			
		||||
      <viewDetails ref="viewDetails"></viewDetails>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import content from "./content.vue";
 | 
			
		||||
import viewDetails from "./popup/view-details.vue";
 | 
			
		||||
import content from "./popup/content.vue";
 | 
			
		||||
import { mapState } from "vuex";
 | 
			
		||||
export default {
 | 
			
		||||
  components: { content },
 | 
			
		||||
  components: { content,viewDetails },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      activeName: "5",
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,81 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <obj-modal
 | 
			
		||||
      ref="modal"
 | 
			
		||||
      labelWidth="150px"
 | 
			
		||||
      :modalCols="modalCols"
 | 
			
		||||
      :modalConfig="modalConfig"
 | 
			
		||||
      :modalData="modalData"
 | 
			
		||||
      :modalHandles="modalHandles"
 | 
			
		||||
    >
 | 
			
		||||
      <template slot="dialog__after">
 | 
			
		||||
        <div class="introduce">
 | 
			
		||||
        </div>
 | 
			
		||||
      </template>
 | 
			
		||||
    </obj-modal>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import { debounce, cloneDeep } from "lodash";
 | 
			
		||||
import { Divider } from "element-ui";
 | 
			
		||||
export default {
 | 
			
		||||
  components: {},
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      isAdd: true,
 | 
			
		||||
      //表格属性
 | 
			
		||||
      modalConfig: {
 | 
			
		||||
        title: "订单详情",
 | 
			
		||||
        show: false,
 | 
			
		||||
        width: "60%",
 | 
			
		||||
      },
 | 
			
		||||
      modalData: {},
 | 
			
		||||
      value1: [],
 | 
			
		||||
      ProductData: {},
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    queryTableData(pageNo, pageSize) {},
 | 
			
		||||
    toggle(e) {
 | 
			
		||||
      if (this.modalConfig.show == false) {
 | 
			
		||||
        this.modalConfig.show = true;
 | 
			
		||||
      } else {
 | 
			
		||||
        this.modalConfig.show = false;
 | 
			
		||||
      }
 | 
			
		||||
      if (e) {
 | 
			
		||||
        this.init(cloneDeep(e));
 | 
			
		||||
      }
 | 
			
		||||
      return {
 | 
			
		||||
        add: () => {
 | 
			
		||||
          this.modalConfig.title = "订单详情";
 | 
			
		||||
          this.isAdd = true;
 | 
			
		||||
        },
 | 
			
		||||
        update: () => {
 | 
			
		||||
          this.isAdd = false;
 | 
			
		||||
        },
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    init(row) {
 | 
			
		||||
      this.modalData = row;
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    modalCols() {
 | 
			
		||||
      return [];
 | 
			
		||||
    },
 | 
			
		||||
    modalHandles() {
 | 
			
		||||
      return [
 | 
			
		||||
        {
 | 
			
		||||
          label: "取消",
 | 
			
		||||
          handle: () => {
 | 
			
		||||
            this.toggle();
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      ];
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  asyncComputed: {},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
</style>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,280 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <div style="height: calc(100vh - 200px)">
 | 
			
		||||
      <obj-table-plus
 | 
			
		||||
        ref="oTable"
 | 
			
		||||
        style="height: 100%"
 | 
			
		||||
        :tableCols="tableCols"
 | 
			
		||||
        :tableProp="tableProp"
 | 
			
		||||
        @query="queryList"
 | 
			
		||||
        v-model="dataList"
 | 
			
		||||
        :tableEvent="tableEvent"
 | 
			
		||||
      >
 | 
			
		||||
        <template slot="tableTop">
 | 
			
		||||
          <el-form :inline="true" :model="formInline" class="demo-form-inline">
 | 
			
		||||
            <el-form-item label="角色名称">
 | 
			
		||||
              <el-input
 | 
			
		||||
                placeholder="请输入角色名称"
 | 
			
		||||
                v-model="formInline.name"
 | 
			
		||||
              ></el-input>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            <el-form-item>
 | 
			
		||||
              <el-button type="primary" @click="$refs.oTable.reload()"
 | 
			
		||||
                >查询</el-button
 | 
			
		||||
              >
 | 
			
		||||
              <el-button type="primary" @click="Reset">重置</el-button>
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
          </el-form>
 | 
			
		||||
          <div class="mb-2">
 | 
			
		||||
            <el-button type="primary" size="small" @click="addBanner"
 | 
			
		||||
              >新增角色</el-button
 | 
			
		||||
            >
 | 
			
		||||
          </div>
 | 
			
		||||
        </template>
 | 
			
		||||
      </obj-table-plus>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!-- 轮播图 -->
 | 
			
		||||
    <addOrUpdate
 | 
			
		||||
      ref="addOrUpdate"
 | 
			
		||||
      @queryList="$refs.oTable.reload()"
 | 
			
		||||
    ></addOrUpdate>
 | 
			
		||||
    <el-dialog title="菜单权限" :visible.sync="dialogTableVisible">
 | 
			
		||||
      <el-form ref="form" :model="form" label-width="120px">
 | 
			
		||||
        <el-form-item label="角色权限:">
 | 
			
		||||
          <el-tree
 | 
			
		||||
            style="margin-top: 10px"
 | 
			
		||||
            ref="tree"
 | 
			
		||||
            :data="data"
 | 
			
		||||
            show-checkbox
 | 
			
		||||
            node-key="id"
 | 
			
		||||
            :default-expand-all="true"
 | 
			
		||||
            :default-checked-keys="menuCheckKeys"
 | 
			
		||||
            :props="defaultProps"
 | 
			
		||||
          >
 | 
			
		||||
          </el-tree>
 | 
			
		||||
        </el-form-item>
 | 
			
		||||
      </el-form>
 | 
			
		||||
      <div slot="footer" class="dialog-footer">
 | 
			
		||||
        <el-button type="primary">确定</el-button>
 | 
			
		||||
        <el-button @click="dialogTableVisible = false">取消</el-button>
 | 
			
		||||
      </div>
 | 
			
		||||
    </el-dialog>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import addOrUpdate from "./popup/add-or-update.vue";
 | 
			
		||||
import { mapState } from "vuex";
 | 
			
		||||
import FULL_ROUTERS from "@/router/full-routers";
 | 
			
		||||
export default {
 | 
			
		||||
  components: { addOrUpdate },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      dialogTableVisible: false,
 | 
			
		||||
      activeName: "5",
 | 
			
		||||
      advanceSellStatus: "",
 | 
			
		||||
      dataList: [],
 | 
			
		||||
      form: {},
 | 
			
		||||
      formInline: {
 | 
			
		||||
        name: "",
 | 
			
		||||
      },
 | 
			
		||||
      tableProp: {
 | 
			
		||||
        "auto-resize": true,
 | 
			
		||||
        border: true,
 | 
			
		||||
        height: "auto",
 | 
			
		||||
        "row-id": "id",
 | 
			
		||||
        "show-overflow": false,
 | 
			
		||||
      },
 | 
			
		||||
      selectList: [],
 | 
			
		||||
      data: [],
 | 
			
		||||
      defaultProps: {
 | 
			
		||||
        children: "list",
 | 
			
		||||
        label: "name",
 | 
			
		||||
        value: "menuId",
 | 
			
		||||
      },
 | 
			
		||||
      menuCheckKeys: [],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    addBanner() {
 | 
			
		||||
      this.$refs.addOrUpdate.toggle().add(this.formInline);
 | 
			
		||||
    },
 | 
			
		||||
    queryList(pageNo, pageSize) {
 | 
			
		||||
      console.log(FULL_ROUTERS);
 | 
			
		||||
      this.data = FULL_ROUTERS.menuList;
 | 
			
		||||
 | 
			
		||||
      setTimeout(() => {
 | 
			
		||||
        let data = [
 | 
			
		||||
          {
 | 
			
		||||
            col: "market_id",
 | 
			
		||||
            id: null,
 | 
			
		||||
            name: "市场经营者",
 | 
			
		||||
            operator: "eq",
 | 
			
		||||
            role: "ROLE_MANAGER",
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            col: null,
 | 
			
		||||
            id: null,
 | 
			
		||||
            name: "商户",
 | 
			
		||||
            operator: null,
 | 
			
		||||
            role: "ROLE_MERCHANT",
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            col: null,
 | 
			
		||||
            id: null,
 | 
			
		||||
            name: "专员",
 | 
			
		||||
            operator: null,
 | 
			
		||||
            role: "ROLE_ASSISTANT",
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            col: null,
 | 
			
		||||
            id: null,
 | 
			
		||||
            name: "代理商",
 | 
			
		||||
            operator: null,
 | 
			
		||||
            role: "ROLE_AGENT",
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            col: "MarketId",
 | 
			
		||||
            id: null,
 | 
			
		||||
            name: "老师",
 | 
			
		||||
            operator: null,
 | 
			
		||||
            role: "123",
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            col: "",
 | 
			
		||||
            id: null,
 | 
			
		||||
            name: "测试",
 | 
			
		||||
            operator: "",
 | 
			
		||||
            role: "ROLE_cheshi",
 | 
			
		||||
          },
 | 
			
		||||
        ];
 | 
			
		||||
        this.$refs.oTable.complete(data, Number(5));
 | 
			
		||||
      }, 500);
 | 
			
		||||
      //   this.$api.mer_admin
 | 
			
		||||
      //     .noticePage({
 | 
			
		||||
      //       pageNumber: pageNo,
 | 
			
		||||
      //       pageSize: pageSize,
 | 
			
		||||
      //       ...this.formInline,
 | 
			
		||||
      //     })
 | 
			
		||||
      //     .then((res) => {
 | 
			
		||||
      //       console.log(res);
 | 
			
		||||
      //       this.$refs.oTable.complete(
 | 
			
		||||
      //         res.data.data.data,
 | 
			
		||||
      //         Number(res.data.data.total)
 | 
			
		||||
      //       );
 | 
			
		||||
      //     })
 | 
			
		||||
      //     .catch((err) => {
 | 
			
		||||
      //       this.$refs.oTable.complete(false);
 | 
			
		||||
      //     });
 | 
			
		||||
    },
 | 
			
		||||
    Reset() {
 | 
			
		||||
      this.formInline = {
 | 
			
		||||
        name: "",
 | 
			
		||||
      };
 | 
			
		||||
      this.$refs.oTable.reload();
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    tableCols() {
 | 
			
		||||
      return [
 | 
			
		||||
        // { type: "checkbox", width: "60px", fixed: "left" },
 | 
			
		||||
        {
 | 
			
		||||
          type: "seq",
 | 
			
		||||
          width: "60px",
 | 
			
		||||
          fixed: "left",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          title: "序号",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "角色名称",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "name",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "备注",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          field: "remark",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          title: "操作",
 | 
			
		||||
          fixed: "right",
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          width: "380px",
 | 
			
		||||
          align: "center",
 | 
			
		||||
          render: ({ row }) => {
 | 
			
		||||
            //权限
 | 
			
		||||
            let permission = () => {
 | 
			
		||||
              this.dialogTableVisible = true;
 | 
			
		||||
            };
 | 
			
		||||
            let updateBanner = () => {
 | 
			
		||||
              this.$refs.addOrUpdate.toggle(row).update();
 | 
			
		||||
            };
 | 
			
		||||
            let deleteBanner = () => {};
 | 
			
		||||
            let onCancel = () => {};
 | 
			
		||||
            return (
 | 
			
		||||
              <div>
 | 
			
		||||
                <el-button
 | 
			
		||||
                  style="margin-right:10px"
 | 
			
		||||
                  size="mini"
 | 
			
		||||
                  type="warning"
 | 
			
		||||
                  onClick={permission}
 | 
			
		||||
                >
 | 
			
		||||
                  菜单权限
 | 
			
		||||
                </el-button>
 | 
			
		||||
                <el-button
 | 
			
		||||
                  style="margin-right:10px"
 | 
			
		||||
                  size="mini"
 | 
			
		||||
                  type="success"
 | 
			
		||||
                  onClick={updateBanner}
 | 
			
		||||
                >
 | 
			
		||||
                  数据权限
 | 
			
		||||
                </el-button>
 | 
			
		||||
                <el-button
 | 
			
		||||
                  style="margin-right:20px"
 | 
			
		||||
                  size="mini"
 | 
			
		||||
                  type="primary"
 | 
			
		||||
                  onClick={updateBanner}
 | 
			
		||||
                >
 | 
			
		||||
                  编辑
 | 
			
		||||
                </el-button>
 | 
			
		||||
                <el-popconfirm
 | 
			
		||||
                  onConfirm={deleteBanner}
 | 
			
		||||
                  onCancel={onCancel}
 | 
			
		||||
                  confirm-button-text="确定"
 | 
			
		||||
                  cancel-button-text="取消"
 | 
			
		||||
                  icon="el-icon-info"
 | 
			
		||||
                  icon-color="red"
 | 
			
		||||
                  title="确定删除吗?"
 | 
			
		||||
                >
 | 
			
		||||
                  <el-button size="mini" type="danger" slot="reference">
 | 
			
		||||
                    删除
 | 
			
		||||
                  </el-button>
 | 
			
		||||
                </el-popconfirm>
 | 
			
		||||
              </div>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      ];
 | 
			
		||||
    },
 | 
			
		||||
    tableEvent() {
 | 
			
		||||
      return {
 | 
			
		||||
        "checkbox-all": ({ records, reserves }) => {
 | 
			
		||||
          this.selectList = [...records, ...reserves];
 | 
			
		||||
        },
 | 
			
		||||
        "checkbox-change": ({ records, reserves }) => {
 | 
			
		||||
          this.selectList = [...records, ...reserves];
 | 
			
		||||
        },
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    ...mapState("userData", [
 | 
			
		||||
      "isMerchant",
 | 
			
		||||
      "marketList",
 | 
			
		||||
      "storeList",
 | 
			
		||||
      "marketId",
 | 
			
		||||
      "shopId",
 | 
			
		||||
    ]),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped></style>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,207 @@
 | 
			
		|||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <obj-modal
 | 
			
		||||
      ref="modal"
 | 
			
		||||
      labelWidth="150px"
 | 
			
		||||
      :modalCols="modalCols"
 | 
			
		||||
      :modalConfig="modalConfig"
 | 
			
		||||
      :modalData="modalData"
 | 
			
		||||
      :modalHandles="modalHandles"
 | 
			
		||||
    >
 | 
			
		||||
      <template slot="dialog__after"> </template>
 | 
			
		||||
    </obj-modal>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
import { debounce, cloneDeep } from "lodash";
 | 
			
		||||
import { Divider } from "element-ui";
 | 
			
		||||
export default {
 | 
			
		||||
  components: {},
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      isAdd: true,
 | 
			
		||||
      //表格属性
 | 
			
		||||
      modalConfig: {
 | 
			
		||||
        title: "",
 | 
			
		||||
        show: false,
 | 
			
		||||
        width: "700px",
 | 
			
		||||
      },
 | 
			
		||||
      modalData: {},
 | 
			
		||||
      settingId: "",
 | 
			
		||||
      form: {},
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  watch: {
 | 
			
		||||
    "modalConfig.show"(newVal) {
 | 
			
		||||
      if (!newVal) {
 | 
			
		||||
        //关闭弹窗清空校验
 | 
			
		||||
        setTimeout(() => {
 | 
			
		||||
          this.$refs.modal.resetFields();
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    queryTableData(pageNo, pageSize) {},
 | 
			
		||||
    toggle(e) {
 | 
			
		||||
      if (this.modalConfig.show == false) {
 | 
			
		||||
        this.modalConfig.show = true;
 | 
			
		||||
      } else {
 | 
			
		||||
        this.modalConfig.show = false;
 | 
			
		||||
      }
 | 
			
		||||
      if (e) {
 | 
			
		||||
        this.init(cloneDeep(e));
 | 
			
		||||
      }
 | 
			
		||||
      return {
 | 
			
		||||
        add: (row) => {
 | 
			
		||||
          console.log(row);
 | 
			
		||||
          this.modalData = {
 | 
			
		||||
            targetId: row.targetId,
 | 
			
		||||
            title: "",
 | 
			
		||||
            position: row.position,
 | 
			
		||||
            type: 0,
 | 
			
		||||
            status: true,
 | 
			
		||||
            app: 1,
 | 
			
		||||
          };
 | 
			
		||||
          this.fileList = [];
 | 
			
		||||
          this.modalConfig.title = "添加角色";
 | 
			
		||||
          this.isAdd = true;
 | 
			
		||||
        },
 | 
			
		||||
        update: () => {
 | 
			
		||||
          this.modalConfig.title = "编辑角色";
 | 
			
		||||
          this.isAdd = false;
 | 
			
		||||
        },
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
    init(row) {
 | 
			
		||||
      this.modalData = row;
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    modalCols() {
 | 
			
		||||
      return [
 | 
			
		||||
        {
 | 
			
		||||
          label: "角色名称",
 | 
			
		||||
          prop: "name",
 | 
			
		||||
          type: "Input",
 | 
			
		||||
          required: true,
 | 
			
		||||
          rules: {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: "请输入角色名称",
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: "角色编码",
 | 
			
		||||
          prop: "roleCode",
 | 
			
		||||
          type: "Input",
 | 
			
		||||
          required: true,
 | 
			
		||||
          rules: {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: "请输入角色编码",
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: "权限字段",
 | 
			
		||||
          prop: "col",
 | 
			
		||||
          type: "Input",
 | 
			
		||||
          required: true,
 | 
			
		||||
          rules: {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: "请输入权限字段",
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: "数据范围",
 | 
			
		||||
          prop: "range",
 | 
			
		||||
          maxlength: "30",
 | 
			
		||||
          rules: {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: "请选择数据范围",
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
          type: "jsx",
 | 
			
		||||
          render: () => {
 | 
			
		||||
            return (
 | 
			
		||||
              <el-select
 | 
			
		||||
                v-model={this.modalData.range}
 | 
			
		||||
                placeholder="请选择销售单位"
 | 
			
		||||
              >
 | 
			
		||||
                {[
 | 
			
		||||
                  {
 | 
			
		||||
                    label: "仅本级",
 | 
			
		||||
                    value: "eq",
 | 
			
		||||
                  },
 | 
			
		||||
                  {
 | 
			
		||||
                    label: "本级及以下",
 | 
			
		||||
                    value: "in",
 | 
			
		||||
                  },
 | 
			
		||||
                  {
 | 
			
		||||
                    label: "全部",
 | 
			
		||||
                    value: "all",
 | 
			
		||||
                  },
 | 
			
		||||
                ].map((item) => {
 | 
			
		||||
                  return (
 | 
			
		||||
                    <el-option
 | 
			
		||||
                      label={item.label}
 | 
			
		||||
                      value={item.value}
 | 
			
		||||
                    ></el-option>
 | 
			
		||||
                  );
 | 
			
		||||
                })}
 | 
			
		||||
              </el-select>
 | 
			
		||||
            );
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: "备注",
 | 
			
		||||
          prop: "remark",
 | 
			
		||||
          type: "Textarea",
 | 
			
		||||
          required: true,
 | 
			
		||||
          maxlength: "120",
 | 
			
		||||
          rows: "5",
 | 
			
		||||
          rules: {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: "请输入备注内容",
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      ];
 | 
			
		||||
    },
 | 
			
		||||
    modalHandles() {
 | 
			
		||||
      return [
 | 
			
		||||
        {
 | 
			
		||||
          label: "取消",
 | 
			
		||||
          handle: () => {
 | 
			
		||||
            this.toggle();
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: "确认",
 | 
			
		||||
          type: "primary",
 | 
			
		||||
          submit: true,
 | 
			
		||||
          handle: () => {
 | 
			
		||||
            console.log(this.modalData);
 | 
			
		||||
            this.toggle();
 | 
			
		||||
            // if (this.isAdd) {
 | 
			
		||||
            //   this.$api.mer_admin.noticeAdd(this.modalData).then((res) => {
 | 
			
		||||
            //     this.toggle();
 | 
			
		||||
            //     this.$emit("queryList");
 | 
			
		||||
            //   });
 | 
			
		||||
            // } else {
 | 
			
		||||
            //   this.$api.mer_admin.noticeUpdate(this.modalData).then((res) => {
 | 
			
		||||
            //     this.toggle();
 | 
			
		||||
            //     this.$emit("queryList");
 | 
			
		||||
            //   });
 | 
			
		||||
            // }
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      ];
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  asyncComputed: {},
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
</style>
 | 
			
		||||
		Loading…
	
		Reference in New Issue