Browse Source

clean: remove unused code

furffico 1 year ago
parent
commit
5a8ab2237d
59 changed files with 0 additions and 6748 deletions
  1. BIN
      src/assets/img/avatar.png
  2. BIN
      src/assets/img/base_z36574a.png
  3. BIN
      src/assets/img/bg_mobile_head_default2968da.png
  4. BIN
      src/assets/img/def.png
  5. BIN
      src/assets/img/index_z354723.png
  6. BIN
      src/assets/img/line.png
  7. 0 1
      src/assets/img/message.svg
  8. BIN
      src/assets/img/yami.png
  9. 0 70
      src/crud/admin/form.js
  10. 0 47
      src/crud/admin/indexImg.js
  11. 0 52
      src/crud/admin/message.js
  12. 0 77
      src/crud/prod/prodComm.js
  13. 0 46
      src/crud/prod/prodTag.js
  14. 0 30
      src/crud/prod/spec.js
  15. 0 52
      src/crud/shop/hotSearch.js
  16. 0 52
      src/crud/shop/notice.js
  17. 0 43
      src/crud/shop/pickAddr.js
  18. 0 27
      src/crud/shop/transport.js
  19. 0 30
      src/crud/sys/area.js
  20. 0 33
      src/crud/sys/config.js
  21. 0 47
      src/crud/sys/log.js
  22. 0 33
      src/crud/sys/role.js
  23. 0 50
      src/crud/sys/user.js
  24. 0 80
      src/crud/user/addr.js
  25. 0 224
      src/views/modules/admin/indexImg-add-or-update.vue
  26. 0 155
      src/views/modules/admin/indexImg.vue
  27. 0 154
      src/views/modules/admin/message-add-or-update.vue
  28. 0 208
      src/views/modules/admin/message.vue
  29. 0 138
      src/views/modules/prod/prod-transport.vue
  30. 0 164
      src/views/modules/prod/prodComm-add-or-update.vue
  31. 0 130
      src/views/modules/prod/prodComm.vue
  32. 0 114
      src/views/modules/prod/prodTag-add-or-update.vue
  33. 0 149
      src/views/modules/prod/prodTag.vue
  34. 0 221
      src/views/modules/prod/sku-table.vue
  35. 0 464
      src/views/modules/prod/sku-tag.vue
  36. 0 172
      src/views/modules/prod/spec-add-or-update.vue
  37. 0 160
      src/views/modules/prod/spec.vue
  38. 0 136
      src/views/modules/shop/hotSearch-add-or-update.vue
  39. 0 150
      src/views/modules/shop/hotSearch.vue
  40. 0 121
      src/views/modules/shop/notice-add-or-update.vue
  41. 0 145
      src/views/modules/shop/notice.vue
  42. 0 246
      src/views/modules/shop/pickAddr-add-or-update.vue
  43. 0 151
      src/views/modules/shop/pickAddr.vue
  44. 0 110
      src/views/modules/shop/transcity-add-or-update.vue
  45. 0 425
      src/views/modules/shop/transport-add-or-update.vue
  46. 0 158
      src/views/modules/shop/transport.vue
  47. 0 126
      src/views/modules/sys/area-add-or-update.vue
  48. 0 166
      src/views/modules/sys/area.vue
  49. 0 97
      src/views/modules/sys/config-add-or-update.vue
  50. 0 130
      src/views/modules/sys/config.vue
  51. 0 63
      src/views/modules/sys/log.vue
  52. 0 231
      src/views/modules/sys/menu-add-or-update.vue
  53. 0 151
      src/views/modules/sys/menu.vue
  54. 0 122
      src/views/modules/sys/role-add-or-update.vue
  55. 0 135
      src/views/modules/sys/role.vue
  56. 0 175
      src/views/modules/sys/user-add-or-update.vue
  57. 0 134
      src/views/modules/sys/user.vue
  58. 0 225
      src/views/modules/user/addr-add-or-update.vue
  59. 0 128
      src/views/modules/user/addr.vue

BIN
src/assets/img/avatar.png


BIN
src/assets/img/base_z36574a.png


BIN
src/assets/img/bg_mobile_head_default2968da.png


BIN
src/assets/img/def.png


BIN
src/assets/img/index_z354723.png


BIN
src/assets/img/line.png


+ 0 - 1
src/assets/img/message.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1541150803210" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17693" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css"></style></defs><path d="M776.704 436.736H291.84c-13.824 0-20.48 6.656-20.48 13.824 0 6.656 6.656 20.48 20.48 20.48h484.864c6.656 0 20.48-6.656 20.48-20.48-7.168-6.656-13.824-13.824-20.48-13.824zM701.44 600.576H359.936c-6.656 0-13.824 6.656-13.824 13.824 0 6.656 6.656 20.48 20.48 20.48h341.504c6.656 0 20.48-6.656 20.48-20.48-6.656-6.656-13.312-13.824-27.136-13.824z" p-id="17694" fill="#8a8a8a"></path><path d="M879.104 252.416H189.44c-47.616 0-81.92 34.304-81.92 75.264v416.256c0 40.96 34.304 81.92 81.92 81.92h225.28l95.744 122.88c6.656 6.656 13.824 13.824 20.48 13.824 6.656 0 20.48-6.656 20.48-13.824l95.744-122.88h225.28c20.48 0 34.304-6.656 54.784-20.48 20.48-13.824 27.136-34.304 27.136-61.44V327.68c-0.512-40.96-34.304-75.264-75.264-75.264z m27.136 498.688c0 6.656-6.656 13.824-6.656 20.48-6.656 0-6.656 6.656-20.48 6.656H640c-6.656 0-20.48 6.656-20.48 13.824l-81.92 116.224-81.92-116.224c-6.656-6.656-13.824-13.824-20.48-13.824H182.784c-13.824 0-27.136-13.824-27.136-27.136v-430.08c0-13.824 13.824-27.136 27.136-27.136H885.76c13.824 0 27.136 13.824 27.136 27.136l-6.656 430.08z" p-id="17695" fill="#8a8a8a"></path></svg>

BIN
src/assets/img/yami.png


+ 0 - 70
src/crud/admin/form.js

@@ -1,70 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  selection: true,
-  index: false,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '表单名称',
-    prop: 'formName',
-    search: true
-  }, {
-    label: '按钮文本',
-    prop: 'buttonName',
-    search: true
-  }, {
-    label: '提交次数',
-    prop: 'submitNum',
-    type: 'select',
-    dicData: [
-      {
-        label: '不做限制',
-        value: 0
-      }, {
-        label: '每个IP限填一次',
-        value: 1
-      }
-    ]
-  }, {
-    label: '开启验证',
-    prop: 'needValidation',
-    type: 'select',
-    dicData: [
-      {
-        label: '不需要',
-        value: 0
-      }, {
-        label: '需要',
-        value: 1
-      }
-    ]
-  }, {
-    label: '提交权限',
-    prop: 'submitPerm',
-    type: 'select',
-    dicData: [
-      {
-        label: '所有人',
-        value: 0
-      }, {
-        label: '仅会员可提交',
-        value: 1
-      }
-    ]
-  }]
-}

+ 0 - 47
src/crud/admin/indexImg.js

@@ -1,47 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  selection: true,
-  index: false,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '轮播图片',
-    prop: 'imgUrl',
-    type: 'upload',
-    slot: true,
-    listType: 'picture-img'
-  }, {
-    label: '顺序',
-    prop: 'seq'
-  }, {
-    width: 150,
-    label: '状态',
-    prop: 'status',
-    search: true,
-    type: 'select',
-    dicData: [
-      {
-        label: '禁用',
-        value: 0
-      }, {
-        label: '正常',
-        value: 1
-      }
-    ]
-  }]
-}

+ 0 - 52
src/crud/admin/message.js

@@ -1,52 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: false,
-  indexLabel: '序号',
-  selection: true,
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '创建时间',
-    prop: 'createTime'
-  },
-  {
-    label: '姓名',
-    prop: 'userName',
-    search: true
-  }, {
-    label: '邮箱',
-    prop: 'email'
-  }, {
-    label: '联系方式',
-    prop: 'contact'
-  }, {
-    label: '审核',
-    prop: 'status',
-    search: true,
-    slot: true,
-    type: 'select',
-    dicData: [
-      {
-        label: '未审核',
-        value: 0
-      }, {
-        label: '审核通过',
-        value: 1
-      }
-    ]
-  }]
-}

+ 0 - 77
src/crud/prod/prodComm.js

@@ -1,77 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  align: 'center',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  column: [
-    {
-      label: '商品名',
-      prop: 'prodName',
-      search: true
-    },
-    {
-      label: '用户昵称',
-      prop: 'nickName',
-      slot: true
-    },
-    {
-      label: '记录时间',
-      prop: 'recTime',
-      width: '200'
-    },
-    {
-      label: '回复时间',
-      slot: true,
-      prop: 'replyTime',
-      width: '200',
-      dicData: [
-        {
-          label: '无',
-          value: ''
-        }
-      ]
-    },
-    {
-      label: '评价得分',
-      prop: 'score'
-    },
-    {
-      label: '是否匿名',
-      prop: 'isAnonymous',
-      dicData: [
-        {
-          label: '否',
-          value: 0
-        }, {
-          label: '是',
-          value: 1
-        }
-      ]
-    },
-    {
-      prop: 'status',
-      label: '审核状态',
-      search: true,
-      type: 'select',
-      dicData: [
-        {
-          label: '待审核',
-          value: 0
-        }, {
-          label: '审核通过',
-          value: 1
-        }, {
-          label: '审核未通过',
-          value: -1
-        }
-      ]
-    }
-  ]
-}

+ 0 - 46
src/crud/prod/prodTag.js

@@ -1,46 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  align: 'center',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  column: [
-    {
-      label: '标签名称',
-      prop: 'title',
-      search: true,
-      slot: true
-    },
-    {
-      label: '状态',
-      prop: 'status',
-      type: 'select',
-      slot: true,
-      search: true,
-      dicData: [
-        {
-          label: '禁用',
-          value: 0
-        }, {
-          label: '正常',
-          value: 1
-        }
-      ]
-    },
-    {
-      label: '默认类型',
-      prop: 'isDfault',
-      slot: true
-    },
-    {
-      label: '排序',
-      prop: 'seq'
-    }
-  ]
-}

+ 0 - 30
src/crud/prod/spec.js

@@ -1,30 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  viewBtn: false,
-  delBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '属性名称',
-    prop: 'propName',
-    search: true
-  }, {
-    label: '属性值',
-    prop: 'prodPropValues',
-    slot: true
-  }]
-}

+ 0 - 52
src/crud/shop/hotSearch.js

@@ -1,52 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: false,
-  selection: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  align: 'center',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  column: [
-    {
-      label: '热搜标题',
-      prop: 'title',
-      search: true
-    },
-    {
-      label: '热搜内容',
-      prop: 'content',
-      search: true
-    },
-    {
-      label: '录入时间',
-      prop: 'recDate',
-      sortable: true
-    },
-    {
-      label: '顺序',
-      prop: 'seq',
-      sortable: true
-    },
-    {
-      label: '启用状态',
-      prop: 'status',
-      type: 'select',
-      slot: true,
-      search: true,
-      dicData: [
-        {
-          label: '未启用',
-          value: 0
-        }, {
-          label: '启用',
-          value: 1
-        }
-      ]
-    }
-  ]
-}

+ 0 - 52
src/crud/shop/notice.js

@@ -1,52 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  align: 'center',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  column: [
-    {
-      label: '公告内容',
-      prop: 'title',
-      search: true
-    },
-    {
-      label: '状态',
-      prop: 'status',
-      search: true,
-      slot: true,
-      type: 'select',
-      dicData: [
-        {
-          label: '撤销',
-          value: 0
-        }, {
-          label: '公布',
-          value: 1
-        }
-      ]
-    },
-    {
-      label: '是否置顶',
-      prop: 'isTop',
-      search: true,
-      slot: true,
-      type: 'select',
-      dicData: [
-        {
-          label: '否',
-          value: 0
-        }, {
-          label: '是',
-          value: 1
-        }
-      ]
-    }
-  ]
-}

+ 0 - 43
src/crud/shop/pickAddr.js

@@ -1,43 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: false,
-  selection: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  viewBtn: false,
-  delBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [
-    {
-      label: '自提点名称',
-      prop: 'addrName',
-      search: true
-    }, {
-      label: '手机号',
-      prop: 'mobile'
-    }, {
-      label: '省份',
-      prop: 'province'
-    }, {
-      label: '城市',
-      prop: 'city'
-    }, {
-      label: '区/县',
-      prop: 'area'
-    }, {
-      label: '地址',
-      prop: 'addr'
-    }]
-}

+ 0 - 27
src/crud/shop/transport.js

@@ -1,27 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: false,
-  selection: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '模板名称',
-    prop: 'transName',
-    search: true
-  }]
-}

+ 0 - 30
src/crud/sys/area.js

@@ -1,30 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  align: 'center',
-  addBtn: false,
-  editBtn: false,
-  column: [
-    {
-      label: '',
-      prop: 'areaId'
-    },
-    {
-      label: '',
-      prop: 'areaName'
-    },
-    {
-      label: '',
-      prop: 'parentId'
-    },
-    {
-      label: '',
-      prop: 'level'
-    }
-  ]
-}

+ 0 - 33
src/crud/sys/config.js

@@ -1,33 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  selection: true,
-  index: false,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '参数名',
-    prop: 'paramKey',
-    search: true
-  }, {
-    label: '参数值',
-    prop: 'paramValue'
-  }, {
-    label: '备注',
-    prop: 'remark'
-  }]
-}

+ 0 - 47
src/crud/sys/log.js

@@ -1,47 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  menu: false, // 移除操作栏
-  selection: true,
-  index: false,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '用户名',
-    prop: 'username',
-    search: true
-  }, {
-    label: '用户操作',
-    prop: 'operation',
-    search: true
-  }, {
-    label: '请求方法',
-    prop: 'method'
-  }, {
-    label: '请求参数',
-    prop: 'params'
-  }, {
-    label: '执行时长(毫秒)',
-    prop: 'time'
-  }, {
-    label: 'IP地址',
-    prop: 'ip'
-  }, {
-    label: '创建时间',
-    prop: 'createDate'
-  }]
-}

+ 0 - 33
src/crud/sys/role.js

@@ -1,33 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  selection: true,
-  index: false,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '角色名称',
-    prop: 'roleName',
-    search: true
-  }, {
-    label: '备注',
-    prop: 'remark'
-  }, {
-    label: '创建时间',
-    prop: 'createTime'
-  }]
-}

+ 0 - 50
src/crud/sys/user.js

@@ -1,50 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  selection: true,
-  index: false,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  menuWidth: 350,
-  align: 'center',
-  refreshBtn: true,
-  searchSize: 'mini',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  props: {
-    label: 'label',
-    value: 'value'
-  },
-  column: [{
-    label: '用户名',
-    prop: 'username',
-    search: true
-  }, {
-    label: '邮箱',
-    prop: 'email'
-  }, {
-    label: '手机号',
-    prop: 'mobile'
-  }, {
-    label: '创建时间',
-    prop: 'createTime'
-  }, {
-    label: '状态',
-    prop: 'status',
-    type: 'select',
-    dicData: [
-      {
-        label: '禁用',
-        value: 0
-      }, {
-        label: '正常',
-        value: 1
-      }
-    ]
-
-  }]
-}

+ 0 - 80
src/crud/user/addr.js

@@ -1,80 +0,0 @@
-export const tableOption = {
-  searchMenuSpan: 6,
-  columnBtn: false,
-  border: true,
-  index: true,
-  indexLabel: '序号',
-  stripe: true,
-  menuAlign: 'center',
-  align: 'center',
-  addBtn: false,
-  editBtn: false,
-  delBtn: false,
-  viewBtn: false,
-  column: [
-    {
-      label: '收货人名称',
-      prop: 'receiver'
-    },
-    {
-      label: '省',
-      prop: 'province'
-    },
-    {
-      label: '城市',
-      prop: 'city'
-    },
-    {
-      label: '区',
-      prop: 'area'
-    },
-    {
-      label: '地址',
-      prop: 'addr'
-    },
-    {
-      label: '邮编',
-      prop: 'postCode'
-    },
-    {
-      label: '手机',
-      prop: 'mobile'
-    },
-    {
-      label: '状态',
-      prop: 'status',
-      search: true,
-      type: 'select',
-      dicData: [
-        {
-          label: '无效',
-          value: 0
-        }, {
-          label: '正常',
-          value: 1
-        }
-      ]
-    },
-    {
-      label: '默认地址',
-      prop: 'commonAddr',
-      dicData: [
-        {
-          label: '否',
-          value: 0
-        }, {
-          label: '是',
-          value: 1
-        }
-      ]
-    },
-    {
-      label: '建立时间',
-      prop: 'createTime'
-    },
-    {
-      label: '更新时间',
-      prop: 'updateTime'
-    }
-  ]
-}

+ 0 - 224
src/views/modules/admin/indexImg-add-or-update.vue

@@ -1,224 +0,0 @@
-<template>
-  <div class="mod-index-img">
-    <el-dialog :title="!dataForm.imgId ? '新增' : '修改'"
-               :close-on-click-modal="false"
-               :visible.sync="visible">
-      <el-form :model="dataForm"
-               ref="dataForm"
-               :rules="dataRule"
-               label-width="100px">
-        <el-form-item label="轮播图片" prop="imgUrl">
-          <pic-upload v-model="dataForm.imgUrl"></pic-upload>
-        </el-form-item>
-        <el-form-item label="顺序"
-                      prop="seq"
-                      :rules="[
-                        { required: false, pattern: /\s\S+|S+\s|\S/, message: '请输入正确的顺序', trigger: 'blur' }
-                      ]">
-          <el-input v-model="dataForm.seq"></el-input>
-        </el-form-item>
-        <el-form-item label="状态"
-                      prop="status">
-          <el-radio-group v-model="dataForm.status">
-            <el-radio :label="0">禁用</el-radio>
-            <el-radio :label="1">正常</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="类型">
-          <el-radio-group v-model="dataForm.type"
-                          @change="deleteRelation">
-            <el-radio :label="-1">无</el-radio>
-            <el-radio :label="0">商品</el-radio>
-            <!-- <el-radio :label="1">店铺</el-radio>
-            <el-radio :label="2">活动</el-radio> -->
-          </el-radio-group>
-          <div v-if="dataForm.relation!=null">
-            <el-card :body-style="{ padding: '0px' }"
-                     style="height: 160px;width: 120px">
-              <img :src="card.pic"
-                   style="height:104px;width:100%">
-              <div class="card-prod-bottom">
-                <span class="card-prod-name">{{card.name}}</span>
-                <el-button type="text"
-                           class="card-prod-name-button"
-                           @click="deleteRelation">删除</el-button>
-              </div>
-            </el-card>
-          </div>
-          <div v-if="dataForm.relation==null">
-            <el-button @click="addProd"
-                       v-if=" dataForm.type == 0"
-                       size="small">选择商品</el-button>
-            <!-- <el-button @click="addShop"
-                       v-if=" dataForm.type == 1"
-                       size="small">选择店铺</el-button>
-            <el-button @click="addActivity"
-                       v-if="dataForm.type == 2"
-                       size="small">选择活动</el-button> -->
-          </div>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary"
-                     @click="dataFormSubmit()">确定</el-button>
-        </el-form-item>
-      </el-form>
-    </el-dialog>
-    <!-- 商品选择弹窗-->
-    <prods-select v-if="prodsSelectVisible"
-                   ref="prodsSelect"
-                   :isSingle="true"
-                   @refreshSelectProds="selectCouponProds"></prods-select>
-  </div>
-</template>
-
-<script>
-import PicUpload from '@/components/pic-upload'
-import ProdsSelect from '@/components/prods-select'
-import { Debounce } from '@/utils/debounce'
-export default {
-  data () {
-    return {
-      dataForm: {
-        status: 1,
-        des: '',
-        imgUrl: '',
-        seq: 0,
-        imgId: 0,
-        type: -1,
-        relation: null
-      },
-      dataRule: {
-        imgUrl: [
-          {required: true, message: '轮播图片不能为空', trigger: 'blur'}
-        ]
-      },
-      // 关联数据
-      card: {
-        id: 0,
-        pic: '',
-        name: '',
-        realData: {
-          prod: [],
-          shop: [],
-          activity: []
-        }
-      },
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      prodsSelectVisible: false,
-      visible: false
-    }
-  },
-  components: {
-    PicUpload,
-    ProdsSelect
-  },
-  methods: {
-    // 获取分类数据
-    init (id) {
-      this.visible = true
-      this.dataForm.imgId = id || 0
-      if (this.dataForm.imgId) {
-        // 获取产品数据
-        this.$http({
-          url: this.$http.adornUrl(`/admin/indexImg/info/${this.dataForm.imgId}`),
-          method: 'get',
-          params: this.$http.adornParams()
-        }).then(({ data }) => {
-          this.dataForm = data
-          if (data.relation) {
-            this.card.pic = data.pic
-            this.card.name = data.prodName
-            this.card.id = data.relation
-          }
-        })
-      } else {
-        this.$nextTick(() => {
-          this.$refs['dataForm'].resetFields()
-          this.dataForm.imgUrl = ''
-          this.relation = null
-        })
-      }
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (!valid) {
-          return
-        }
-        let param = this.dataForm
-        this.$http({
-          url: this.$http.adornUrl(`/admin/indexImg`),
-          method: param.imgId ? 'put' : 'post',
-          data: this.$http.adornData(param)
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.visible = false
-              this.$emit('refreshDataList', this.page)
-            }
-          })
-        })
-      })
-    }),
-    // 删除关联数据
-    deleteRelation () {
-      this.dataForm.relation = null
-    },
-    // 打开选择商品
-    addProd () {
-      this.prodsSelectVisible = true
-      this.$nextTick(() => {
-        this.$refs.prodsSelect.init(this.card.realData.prod)
-      })
-    },
-    // 添加指定商品
-    selectCouponProds (prods) {
-      this.card.realData.prods = prods
-      if (prods.length) {
-        let selectProd = prods[0]
-        this.dataForm.relation = selectProd.prodId
-        this.card.pic = selectProd.pic
-        this.card.name = selectProd.prodName
-        this.card.id = selectProd.prodId
-      } else {
-        this.card = {}
-        this.relation = null
-      }
-    },
-    addShop () {
-      alert('选择店铺')
-    },
-    addActivity () {
-      alert('选择活动')
-    }
-  }
-}
-</script>
-<style lang="scss">
-//card样式
-.card-prod-bottom {
-  position: relative;
-  text-align: left;
-  .card-prod-name {
-    margin: auto;
-    padding: 0 6px;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    width: 118px;
-    display: inline-block;
-  }
-  .card-prod-name-button {
-    position: absolute;
-    top: 24px;
-    right: 10px;
-  }
-}
-</style>

+ 0 - 155
src/views/modules/admin/indexImg.vue

@@ -1,155 +0,0 @@
-<template>
-  <div class="mod-prod">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :table-loading="dataListLoading"
-               :option="tableOption"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('admin:indexImg:save')"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   @click="deleteHandle()"
-                   size="small"
-                   v-if="isAuth('admin:indexImg:delete')"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-
-      <template slot-scope="scope"
-                slot="imgUrl">
-        <img v-if="scope.row.imgUrl" :src="scope.row.imgUrl"
-             width="100"
-             height="100" />
-        <img v-else src="~@/assets/img/def.png"
-             width="100"
-             height="100" />
-      </template>
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('admin:indexImg:update')"
-                   @click="addOrUpdateHandle(scope.row.imgId)">修改</el-button>
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   v-if="isAuth('admin:indexImg:delete')"
-                   @click="deleteHandle(scope.row.imgId)">删除</el-button>
-
-      </template>
-    </avue-crud>
-
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import AddOrUpdate from './indexImg-add-or-update'
-import { tableOption } from '@/crud/admin/indexImg'
-export default {
-  data () {
-    return {
-      dataForm: {
-        indexImg: ''
-      },
-      dataList: [],
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
-      // 修改
-      tableOption: tableOption,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      }
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/admin/indexImg/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        data.records.forEach(item => {
-          item.imgUrl = item.imgUrl ? this.resourcesUrl + item.imgUrl : ''
-        })
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      var ids = id ? [id] : this.dataListSelections.map(item => {
-        return item.imgId
-      })
-      this.$confirm(`确定进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/admin/indexImg'),
-          method: 'delete',
-          data: this.$http.adornData(ids, false)
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      })
-    },
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 多选变化
-    selectionChange (val) {
-      this.dataListSelections = val
-    }
-  }
-}
-</script>

+ 0 - 154
src/views/modules/admin/message-add-or-update.vue

@@ -1,154 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.id ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="80px">
-      <el-form-item label="创建时间"
-                    prop="createTime">
-        <el-date-picker v-model="dataForm.createTime"
-                        type="datetime"
-                        placeholder="选择日期"
-                        value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
-      </el-form-item>
-      <el-form-item label="姓名"
-                    prop="userName">
-        <el-input v-model="dataForm.userName"
-                  placeholder="姓名"></el-input>
-      </el-form-item>
-      <el-form-item label="邮箱"
-                    prop="email">
-        <el-input v-model="dataForm.email"
-                  placeholder="邮箱"></el-input>
-      </el-form-item>
-      <el-form-item label="联系方式"
-                    prop="contact">
-        <el-input v-model="dataForm.contact"
-                  placeholder="联系方式"></el-input>
-      </el-form-item>
-      <el-form-item label="留言内容"
-                    prop="content">
-        <tiny-mce v-model="dataForm.content"
-                  ref="content"></tiny-mce>
-      </el-form-item>
-      <el-form-item label="留言回复"
-                    prop="reply">
-        <tiny-mce v-model="dataForm.reply"
-                  ref="reply"></tiny-mce>
-      </el-form-item>
-      <el-form-item label="状态"
-                    size="mini"
-                    prop="status">
-        <el-radio-group v-model="dataForm.status">
-          <el-radio :label="0">未审核</el-radio>
-          <el-radio :label="1">审核通过</el-radio>
-        </el-radio-group>
-      </el-form-item>
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-import { isEmail } from '@/utils/validate'
-import TinyMce from '@/components/tiny-mce'
-export default {
-  data () {
-    var validateEmail = (rule, value, callback) => {
-      if (!isEmail(value)) {
-        callback(new Error('邮箱格式错误'))
-      } else {
-        callback()
-      }
-    }
-    return {
-      visible: false,
-      dataForm: {
-        id: 0,
-        createTime: '',
-        userName: '',
-        email: '',
-        contact: '',
-        content: '',
-        reply: '',
-        status: 0
-      },
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      dataRule: {
-        userMail: [
-          { required: true, message: '邮箱不能为空', trigger: 'blur' },
-          { validator: validateEmail, trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  components: {
-    TinyMce
-  },
-  methods: {
-    init (id) {
-      this.dataForm.id = id || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs.dataForm.resetFields()
-        this.$refs.content.setContent('')
-        this.$refs.reply.setContent('')
-      })
-      if (this.dataForm.id) {
-        this.$http({
-          url: this.$http.adornUrl(`/admin/message/info/${this.dataForm.id}`),
-          method: 'get',
-          params: this.$http.adornParams()
-        }).then(({ data }) => {
-          this.dataForm = data
-          this.$refs.content.setContent(data.content)
-          this.$refs.reply.setContent(data.reply)
-        })
-      }
-    },
-    // 表单提交
-    dataFormSubmit () {
-      this.$refs['dataForm'].validate(valid => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl(`/admin/message`),
-            method: this.dataForm.id ? 'put' : 'post',
-            data: this.$http.adornData({
-              id: this.dataForm.id || undefined,
-              createTime: this.dataForm.createTime,
-              userName: this.dataForm.userName,
-              email: this.dataForm.email,
-              contact: this.dataForm.contact,
-              content: this.dataForm.content,
-              reply: this.dataForm.reply,
-              status: this.dataForm.status
-            })
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList', this.page)
-              }
-            })
-          })
-        }
-      })
-    }
-  }
-}
-</script>

+ 0 - 208
src/views/modules/admin/message.vue

@@ -1,208 +0,0 @@
-<template>
-  <div class="mod-user">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               :permission="permission"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('admin:message:save')"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   @click="deleteHandle()"
-                   v-if="isAuth('admin:message:delete')"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-
-      <template slot-scope="scope"
-                slot="status">
-        <el-tag v-if="scope.row.status === 0"
-                size="small"
-                type="danger">未审核</el-tag>
-        <el-tag v-else
-                size="small">审核通过</el-tag>
-      </template>
-
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="text"
-                   size="small"
-                   v-if="isAuth('admin:message:release')"
-                   @click="setMessageRelease(scope.row.id)">公开留言</el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="isAuth('admin:message:cancel')"
-                   @click="setMessageCancel(scope.row.id)">取消公开</el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="isAuth('admin:message:update')"
-                   @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
-        <el-button type="text"
-                   size="small"
-                   v-if="isAuth('admin:message:delete')"
-                   @click="deleteHandle(scope.row.id)">删除</el-button>
-      </template>
-    </avue-crud>
-
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import AddOrUpdate from './message-add-or-update'
-import { tableOption } from '@/crud/admin/message'
-export default {
-  data () {
-    return {
-      dataForm: {
-        message: ''
-      },
-      dataList: [],
-      pageIndex: 1,
-      pageSize: 10,
-      totalPage: 0,
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      tableOption: tableOption,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      permission: {
-        delBtn: this.isAuth('prod:prod:delete')
-      }
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/admin/message/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 公开留言
-    setMessageRelease (id) {
-      if (id) {
-        this.$http({
-          url: this.$http.adornUrl(`/admin/message/release/${id}`),
-          method: 'put',
-          data: this.$http.adornData({
-            id: id
-          })
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1000,
-            onClose: () => {
-              this.visible = false
-              this.getDataList(this.page)
-            }
-          })
-        })
-      }
-    },
-    // 取消公开留言
-    setMessageCancel (id) {
-      if (id) {
-        this.$http({
-          url: this.$http.adornUrl(`/admin/message/cancel/${id}`),
-          method: 'put',
-          data: this.$http.adornData({
-            id: id
-          })
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1000,
-            onClose: () => {
-              this.visible = false
-              this.getDataList(this.page)
-            }
-          })
-        })
-      }
-    },
-    // 删除
-    deleteHandle (id) {
-      var ids = id
-        ? [id]
-        : this.dataListSelections.map(item => {
-          return item.id
-        })
-      this.$confirm(`确定进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$http({
-            url: this.$http.adornUrl(`/admin/message/${ids}`),
-            method: 'delete',
-            data: this.$http.adornData(ids, false)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.getDataList(this.page)
-              }
-            })
-          })
-        })
-        .catch(() => { })
-    },
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 多选变化
-    selectionChange (val) {
-      this.dataListSelections = val
-    }
-  }
-}
-</script>

+ 0 - 138
src/views/modules/prod/prod-transport.vue

@@ -1,138 +0,0 @@
-<template>
-  <div class="mod-prod-prod-transport">
-    <el-form-item label="运费设置"
-                  :rules="[{ required: true, message: '运费模板不能为空'}]">
-      <el-select v-model="transportId"
-                 placeholder="请选择"
-                 @change="changeTransport">
-        <el-option v-for="transport in transportList"
-                   :key="transport.transportId"
-                   :label="transport.transName"
-                   :value="transport.transportId">
-        </el-option>
-      </el-select>
-    </el-form-item>
-    <el-form-item>
-      <el-table :data="transportInfo.transfees"
-                style="width: 100%"
-                v-if="transportInfo.transfees">
-        <el-table-column label="配送区域"
-                         width="350">
-          <template slot-scope="scope">
-            <span v-if="!scope.row.cityList.length">所有地区</span>
-            <el-tag v-for="city in scope.row.cityList"
-                    :key="city.areaId"
-                    v-else>{{city.areaName}}</el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column prop="firstPiece"
-                         :label="tableTitle[0]">
-        </el-table-column>
-        <el-table-column prop="firstFee"
-                         :label="tableTitle[1]">
-        </el-table-column>
-        <el-table-column prop="continuousPiece"
-                         :label="tableTitle[2]">
-        </el-table-column>
-        <el-table-column prop="continuousFee"
-                         :label="tableTitle[3]">
-        </el-table-column>
-      </el-table>
-    </el-form-item>
-    <el-form-item v-if="transportInfo.hasFreeCondition === 1">
-      <el-table :data="transportInfo.transfeeFrees"
-                style="width: 100%">
-        <el-table-column label="指定区域"
-                         width="350">
-          <template slot-scope="scope">
-            <el-tag v-for="city in scope.row.freeCityList"
-                    :key="city.areaId">{{city.areaName}}</el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column prop="freeType"
-                         label="包邮条件">
-          <template slot-scope="scope">
-            <span v-if="scope.row.freeType === 0">满件/重量/体积包邮</span>
-            <span v-if="scope.row.freeType === 1">满金额包邮</span>
-            <span v-if="scope.row.freeType === 2">满件/重量/体积且满金额包邮</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="amount">
-          <template slot-scope="scope">
-            <span v-if="scope.row.freeType === 1">满{{scope.row.amount}}元金额包邮</span>
-            <span v-if="scope.row.freeType === 0">满{{scope.row.piece}}件/重量/体积包邮</span>
-            <span v-if="scope.row.freeType === 2">满{{scope.row.piece}}件/重量/体积且满{{scope.row.amount}}元金额包邮</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </el-form-item>
-  </div>
-</template>
-
-<script>
-export default {
-  data () {
-    return {
-      transportId: null,
-      transportList: [{
-        transportId: null,
-        transName: ''
-      }],
-      transportInfo: {
-        hasFreeCondition: false,
-        transfeeFrees: [{ freeCityList: [] }]
-      }
-    }
-  },
-  props: {
-    value: {
-      default: null,
-      type: Number
-    }
-  },
-  computed: {
-    tableTitle () {
-      var titles = [['首件(个)', '运费(元)', '续件(个)', '续费(元)'], ['首重(kg)', '运费(元)', '续重(kg)', '续费(元)'], ['首体积(m³)', '运费(元)', '续体积(m³)', '续费(元)']]
-      if (this.transportInfo.chargeType) {
-        return titles[this.transportInfo.chargeType]
-      }
-      return titles[0]
-    }
-  },
-  created () {
-    this.getTransportList()
-  },
-  watch: {
-    value: function (transportId) {
-      this.transportId = transportId
-    }
-  },
-  methods: {
-    getTransportList () {
-      this.$http({
-        url: this.$http.adornUrl('/shop/transport/list'),
-        method: 'get',
-        params: this.$http.adornParams({})
-      }).then(({ data }) => {
-        this.transportList = data
-      })
-    },
-    changeTransport (transportId) {
-      this.$emit('input', transportId)
-      if (!transportId) {
-        return
-      }
-      this.$http({
-        url: this.$http.adornUrl(`/shop/transport/info/${transportId}`),
-        method: 'get',
-        params: this.$http.adornParams({})
-      }).then(({ data }) => {
-        this.transportInfo = data
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss">
-</style>

+ 0 - 164
src/views/modules/prod/prodComm-add-or-update.vue

@@ -1,164 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.prodCommId ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="80px">
-
-      <div v-if="!isEdit">
-        <el-form-item label="评论内容"
-                      prop="userName">
-          <el-input type="textarea"
-                    :readonly='true'
-                    v-model="dataForm.content"></el-input>
-        </el-form-item>
-
-        <el-form-item label="评论图片"
-                      prop="userName">
-          <div v-if="dataForm.pics==null || dataForm.pics.length>0">
-            无
-          </div>
-          <img max-width="100%"
-               v-else
-               v-for="item in dataForm.pics"
-               :key="item"
-               :src="dialogImageUrl + item">
-        </el-form-item>
-
-        <el-form-item label="记录时间"
-                      prop="userName">
-          <el-input v-model="dataForm.recTime"
-                    :readonly='true'></el-input>
-        </el-form-item>
-        <el-form-item label="回复时间"
-                      prop="userName"
-                      :readonly='true'>
-          <el-input v-model="dataForm.replyTime"
-                    :readonly='true'></el-input>
-        </el-form-item>
-        <el-form-item label="IP来源"
-                      prop="userName">
-          <el-input v-model="dataForm.postip"
-                    :readonly='true'></el-input>
-        </el-form-item>
-        <el-form-item label="得分"
-                      prop="score">
-          <el-input v-model="dataForm.score"
-                    :readonly='true'></el-input>
-        </el-form-item>
-
-        <el-form-item label="是否匿名"
-                      size="mini"
-                      prop="isAnonymous">
-          <el-radio-group v-model="dataForm.isAnonymous"
-                          :disabled='true'>
-            <el-radio :label="1">是</el-radio>
-            <el-radio :label="0">不是</el-radio>
-          </el-radio-group>
-        </el-form-item>
-      </div>
-
-      <el-form-item label="掌柜回复"
-                    type="textarea"
-                    prop="userName">
-        <el-input v-model="dataForm.replyContent"
-                  :readonly='!isEdit'></el-input>
-      </el-form-item>
-
-      <el-form-item label="审核"
-                    size="mini"
-                    prop="status"
-                    v-if="isEdit">
-        <el-radio-group v-model="dataForm.status"
-                        :readonly='true'>
-          <el-radio :label="1">审核通过</el-radio>
-          <el-radio :label="-1">不通过</el-radio>
-          <el-radio :label="0">等待审核</el-radio>
-        </el-radio-group>
-      </el-form-item>
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 v-if="isEdit"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-export default {
-  data () {
-    return {
-      isEdit: false,
-      visible: false,
-      roleList: [],
-      dataForm: {
-        prodCommId: null,
-        prodId: null,
-        orderItemId: null,
-        userId: null,
-        content: null,
-        replyContent: null,
-        recTime: null,
-        replyTime: null,
-        replySts: null,
-        postip: null,
-        score: null,
-        usefulCounts: null,
-        photoJson: null,
-        isAnonymous: null,
-        status: null
-      },
-      dataRule: {
-      },
-      resourcesUrl: process.env.VUE_APP_RESOURCES_URL
-    }
-  },
-  methods: {
-    init (prodCommId, isEdit) {
-      this.isEdit = isEdit
-      this.dataForm.prodCommId = prodCommId || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        if (this.dataForm.prodCommId) {
-          this.$http({
-            url: this.$http.adornUrl('/prod/prodComm/info/' + this.dataForm.prodCommId),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({ data }) => {
-            this.dataForm = data
-          })
-        }
-      })
-    },
-    // 表单提交
-    dataFormSubmit () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl('/prod/prodComm'),
-            method: this.dataForm.prodCommId ? 'put' : 'post',
-            data: this.$http.adornData(this.dataForm)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList')
-              }
-            })
-          })
-        }
-      })
-    }
-  }
-}
-</script>

+ 0 - 130
src/views/modules/prod/prodComm.vue

@@ -1,130 +0,0 @@
-<template>
-  <div class="mod-prod-prodComm">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :table-loading="dataListLoading"
-               :option="tableOption"
-               @search-change="searchChange"
-               @on-load="getDataList"
-               @refresh-change="refreshChange"
-               @row-del="rowDel">
-
-      <template slot-scope="scope"
-                slot="nickName">
-        {{scope.row.user.nickName}}
-      </template>
-      <template slot-scope="scope"
-                slot="replyTime">
-        {{scope.row.replyTime ? scope.row.replyTime : '-'}}
-      </template>
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   size="small"
-                   icon="el-icon-edit"
-                   @click="addOrUpdateHandle(scope.row.prodCommId,true)">编辑</el-button>
-
-        <el-button type="success"
-                   size="small"
-                   icon="el-icon-view"
-                   @click="addOrUpdateHandle(scope.row.prodCommId,false)">查看</el-button>
-
-      </template>
-    </avue-crud>
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="refreshChange"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/prod/prodComm'
-import AddOrUpdate from './prodComm-add-or-update'
-export default {
-  data () {
-    return {
-      dataList: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      dataListLoading: false,
-      tableOption: tableOption,
-      permission: {
-        delBtn: this.isAuth('prod:prodComm:delete')
-      },
-      addOrUpdateVisible: false
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  created () {
-  },
-  mounted () {
-  },
-  methods: {
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/prod/prodComm/page'),
-        method: 'get',
-        params: this.$http.adornParams(Object.assign({
-          current: page == null ? this.page.currentPage : page.currentPage,
-          size: page == null ? this.page.pageSize : page.pageSize
-        }, params))
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id, isEdit) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id, isEdit)
-      })
-    },
-    rowDel: function (row, index) {
-      this.$confirm('确定进行删除操作?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/prod/prodComm/' + row.prodCommId),
-          method: 'delete',
-          data: this.$http.adornData({})
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      }).catch(() => { })
-    },
-    /**
-     * 刷新回调
-     */
-    refreshChange () {
-      this.getDataList(this.page)
-    },
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 114
src/views/modules/prod/prodTag-add-or-update.vue

@@ -1,114 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.id ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="80px">
-      <el-form-item label="标签名称"
-                    :rules="[
-                      { required: true, message: '标签名称不能为空', trigger: 'blur' },
-                      { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的标签名称', trigger: 'blur' }
-                    ]"
-                    prop="title">
-        <el-input v-model="dataForm.title"></el-input>
-      </el-form-item>
-      <el-form-item label="状态"
-                    prop="status">
-        <el-radio-group v-model="dataForm.status">
-          <el-radio :label="1">正常</el-radio>
-          <el-radio :label="0">禁用</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="列表样式"
-                    prop="style">
-        <el-radio-group v-model="dataForm.style">
-          <el-radio :label="0">一列一个</el-radio>
-          <el-radio :label="1">一列两个</el-radio>
-          <el-radio :label="2">一列三个</el-radio>
-        </el-radio-group>
-      </el-form-item>
-
-      <el-form-item label="排序"
-                    prop="seq">
-        <!-- <el-input v-model="dataForm.seq"></el-input> -->
-        <el-input-number v-model="dataForm.seq"
-                         controls-position="right"
-                         :min="0"
-                         label="排序号"></el-input-number>
-      </el-form-item>
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-import { Debounce } from '@/utils/debounce'
-export default {
-  data () {
-    return {
-      visible: false,
-      roleList: [],
-      dataForm: {
-        id: null,
-        title: null,
-        shopId: null,
-        status: 1,
-        isDefault: null,
-        prodCount: null,
-        seq: null,
-        style: 0
-      },
-      dataRule: {
-      }
-    }
-  },
-  methods: {
-    init (id) {
-      this.dataForm.id = id || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        if (this.dataForm.id) {
-          this.$http({
-            url: this.$http.adornUrl('/prod/prodTag/info/' + this.dataForm.id),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({ data }) => {
-            this.dataForm = data
-          })
-        }
-      })
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl('/prod/prodTag'),
-            method: this.dataForm.id ? 'put' : 'post',
-            data: this.$http.adornData(this.dataForm)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList')
-              }
-            })
-          })
-        }
-      })
-    })
-  }
-}
-</script>

+ 0 - 149
src/views/modules/prod/prodTag.vue

@@ -1,149 +0,0 @@
-<template>
-  <div class="mod-prod-prodTag">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :table-loading="dataListLoading"
-               :option="tableOption"
-               @search-change="searchChange"
-               @on-load="getDataList"
-               @refresh-change="refreshChange">
-      <template slot="menuLeft">
-        <el-button v-if="isAuth('prod:prodTag:save')"
-                   type="primary"
-                   size="small"
-                   icon="el-icon-plus"
-                   @click="addOrUpdateHandle()">新增</el-button>
-      </template>
-      <template slot-scope="scope"
-                slot="title">
-        {{ scope.row.title || '-' }}
-      </template>
-      <template slot-scope="scope"
-                slot="status">
-        <el-tag v-if="scope.row.status === 0"
-                size="small"
-                type="danger">禁用</el-tag>
-        <el-tag v-else
-                size="small">正常</el-tag>
-      </template>
-
-      <template slot-scope="scope"
-                slot="isDfault">
-        <el-tag v-if="scope.row.isDefault === 0"
-                size="small">自定义类型</el-tag>
-        <el-tag v-else
-                size="small">默认类型</el-tag>
-      </template>
-
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button v-if="isAuth('prod:prodTag:update')"
-                   type="primary"
-                   size="small"
-                   icon="el-icon-edit"
-                   @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
-        <el-button v-if="isAuth('prod:prodTag:delete')"
-                   type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   @click.stop="deleteHandle(scope.row.id)">删除</el-button>
-      </template>
-
-    </avue-crud>
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="refreshChange"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/prod/prodTag'
-import AddOrUpdate from './prodTag-add-or-update'
-export default {
-  data () {
-    return {
-      dataList: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      dataListLoading: false,
-      tableOption: tableOption,
-      permission: {
-        delBtn: this.isAuth('prod:prodTag:delete')
-      },
-      addOrUpdateVisible: false
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  created () {
-  },
-  mounted () {
-  },
-  methods: {
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/prod/prodTag/page'),
-        method: 'get',
-        params: this.$http.adornParams(Object.assign({
-          current: page == null ? this.page.currentPage : page.currentPage,
-          size: page == null ? this.page.pageSize : page.pageSize
-        }, params))
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    deleteHandle (id) {
-      this.$confirm('确定进行删除操作?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/prod/prodTag/' + id),
-          method: 'delete',
-          data: this.$http.adornData({})
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList(this.page)
-            }
-          })
-        })
-      }).catch(() => { })
-    },
-    /**
-     * 刷新回调
-     */
-    refreshChange () {
-      this.getDataList(this.page)
-    },
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 221
src/views/modules/prod/sku-table.vue

@@ -1,221 +0,0 @@
-<template>
-  <div class="mod-prod-sku-table">
-    <el-form-item>
-      <el-table
-        :data="value"
-        border
-        style="width: 100%; margin-top: 20px"
-         :span-method="tableSpanMethod">
-        <el-table-column v-for="(leftTitle, index) in tableLeftTitles" :key="index" :label="leftTitle">
-          <template slot-scope="scope">
-            {{scope.row.properties.split(';')[index].split(':')[1]}}
-          </template>
-        </el-table-column>
-        <el-table-column v-if="tableLeftTitles.length"
-          prop="pic"
-          label="sku图片"
-          width="180">
-          <template slot-scope="scope">
-            <pic-upload v-model="scope.row.pic">
-            </pic-upload>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="prodName"
-          label="商品名称"
-          width="250"  v-if="tableLeftTitles.length">
-          <template slot-scope="scope">
-            <el-input v-model="scope.row.prodName" type="textarea" :disabled="!scope.row.status"></el-input>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="price"
-          label="销售价"
-          width="160">
-          <template slot-scope="scope">
-             <el-input-number
-              size="small"
-              v-model="scope.row.price"
-              controls-position="right"
-              :precision="2"
-              :max="1000000000"
-              :min="0.01"
-              :disabled="!scope.row.status">
-          </el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="oriPrice"
-          label="市场价"
-          width="160">
-          <template slot-scope="scope">
-            <el-input-number
-              size="small"
-              v-model="scope.row.oriPrice"
-              controls-position="right"
-              :precision="2"
-              :max="1000000000"
-              :min="0.01"
-              :disabled="!scope.row.status">
-            </el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="stocks"
-          label="库存"
-          width="160">
-          <template slot-scope="scope">
-            <el-input-number size="small" :min="0" controls-position="right" v-model="scope.row.stocks" type="number" :disabled="!scope.row.status"></el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="weight"
-          label="商品重量(kg)"
-          width="210">
-          <template slot-scope="scope">
-            <el-input-number :precision="2" :min="0" controls-position="right" v-model="scope.row.weight" :disabled="!scope.row.status"></el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="volume"
-          label="商品体积(m³)"
-          width="210">
-          <template slot-scope="scope">
-            <el-input-number :precision="2" :min="0" controls-position="right" v-model="scope.row.volume" :disabled="!scope.row.status"></el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="操作">
-          <template slot-scope="scope">
-            <el-button type="text" size="small" @click="changeSkuStatus(`${scope.$index}`)" v-if="scope.row.status">禁用</el-button>
-            <el-button type="text" size="small" @click="changeSkuStatus(`${scope.$index}`)" v-else>启用</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </el-form-item>
-  </div>
-</template>
-
-<script>
-  import PicUpload from '@/components/pic-upload'
-  export default {
-    data () {
-      return {
-        // 数据库中的规格
-        dbSpecs: [],
-        // 根据选定的规格所查询出来的规格值
-        dbSpecValues: [],
-        specs: [], // 使用的规格
-        initing: false
-      }
-    },
-    components: {
-      PicUpload
-    },
-    props: {
-      value: {
-        default: [],
-        type: Array
-      },
-      prodName: {
-        default: ''
-      }
-    },
-    watch: {
-      prodName: function () {
-        this.skuAddProdName()
-      }
-    },
-    // activated: function () {
-    //   this.$emit('input', [Object.assign({}, this.defalutSku)])
-    // },
-    created: function () {
-      this.$http({
-        url: this.$http.adornUrl(`/prod/spec/list`),
-        method: 'get',
-        params: this.$http.adornParams()
-      }).then(({data}) => {
-        this.dbSpecs = data
-      })
-    },
-    computed: {
-      tableLeftTitles () {
-        let res = []
-        for (let i = 0; i < this.skuTags.length; i++) {
-          const skuTag = this.skuTags[i]
-          res.push(skuTag.tagName)
-        }
-        return res
-      },
-      skuTags: {
-        get () { return this.$store.state.prod.skuTags }
-      },
-      defalutSku () {
-        return this.$store.state.prod.defalutSku
-      }
-    },
-    methods: {
-      init () {
-        this.initing = true
-      },
-      getTableSpecData () {
-        return this.value
-      },
-      tableSpanMethod ({ row, column, rowIndex, columnIndex }) {
-
-      },
-      changeSkuStatus (tagIndex) {
-        this.value[tagIndex].status = this.value[tagIndex].status ? 0 : 1
-      },
-      skuAddProdName () {
-        if (this.initing) {
-          return
-        }
-        let skuList = []
-        for (let i = 0; i < this.value.length; i++) {
-          const sku = Object.assign({}, this.value[i])
-          if (!sku.properties) {
-            return
-          }
-          sku.skuName = ''
-          let properties = sku.properties.split(';')
-          for (const propertiesKey in properties) {
-            sku.skuName += properties[propertiesKey].split(':')[1] + ' '
-          }
-          sku.prodName = this.prodName + ' ' + sku.skuName
-          skuList.push(sku)
-        }
-        this.$emit('input', skuList)
-      }
-    }
-  }
-</script>
-
-<style lang="scss">
-
-  .mod-prod-sku-table{
-    .pic-uploader-component .el-upload {
-      border: 1px dashed #d9d9d9;
-      border-radius: 6px;
-      cursor: pointer;
-      position: relative;
-      overflow: hidden;
-      .pic-uploader-icon {
-        font-size: 28px;
-        color: #8c939d;
-        width: 120px;
-        height: 120px;
-        line-height: 120px;
-        text-align: center;
-      }
-      .pic {
-        width: 120px;
-        height: 120px;
-        display: block;
-      }
-    }
-    .pic-uploader-component .el-upload:hover {
-      border-color: #409EFF;
-    }
-  }
-</style>

+ 0 - 464
src/views/modules/prod/sku-tag.vue

@@ -1,464 +0,0 @@
-<template>
-  <div class="mod-prod-sku-tag">
-    <el-form-item label="商品规格">
-      <el-button size="mini" @click="shopTagInput()">添加规格</el-button>
-      <div v-for="(tag, tagIndex) in skuTags" :key="tagIndex">
-        <span>{{tag.tagName}}</span>
-        <el-button class="button-new-tag" type="text"  icon="el-icon-delete" @click="removeTag(tagIndex)">删除</el-button>
-        <br/>
-        <el-tag
-          v-for="(tagItem, tagItemIndex) in tag.tagItems"
-          :key="tagItem.valueId"
-          closable
-          :disable-transitions="false"
-          @close="handleTagClose(tagIndex, tagItemIndex)">
-          {{tagItem.propValue}}
-        </el-tag>
-        <el-input
-          class="input-new-tag"
-          v-if="tagItemInputs[tagIndex] && tagItemInputs[tagIndex].visible"
-          v-model="tagItemInputs[tagIndex].value"
-          :ref="`saveTagInput${tagIndex}`"
-          size="small"
-          @keyup.enter.native="handleInputConfirm(tagIndex)"
-          @blur="handleInputConfirm(tagIndex)">
-        </el-input>
-        <el-button v-else class="button-new-tag" size="small" @click="showTagInput(tagIndex)">+ 添加</el-button>
-      </div>
-    </el-form-item>
-    <el-form-item label="规格名" v-show="isShowTagInput">
-      <el-col :span="8">
-        <el-select v-model="addTagInput.propName" filterable allow-create default-first-option placeholder="请选择" @change="handleTagClick">
-          <el-option
-            v-for="item in unUseTags"
-            :key="item.propId"
-            :label="item.propName"
-            :value="item.propName">
-          </el-option>
-        </el-select>
-      </el-col>
-    </el-form-item>
-    <el-form-item label="规格值" v-show="isShowTagInput">
-      <el-col :span="8">
-        <el-select v-model="addTagInput.selectValues" multiple filterable allow-create default-first-option placeholder="请选择">
-          <el-option
-            v-for="item in dbTagValues"
-            :key="item.valueId"
-            :label="item.propValue"
-            :value="item.propValue">
-          </el-option>
-        </el-select>
-      </el-col>
-    </el-form-item>
-    <el-form-item>
-      <el-button size="mini" type="primary" @click="addTag()" v-show="isShowTagInput">确定</el-button>
-      <el-button size="mini" @click="hideTagInput()" v-show="isShowTagInput">取消</el-button>
-    </el-form-item>
-
-
-  </div>
-</template>
-
-<script>
-export default {
-  data () {
-    return {
-      value: [],
-      isShowTagInput: false,
-      addTagInput: {
-        propName: '',
-        selectValues: []
-      },
-      type: 0,
-      tagItemName: '',
-      tagName: '',
-      tagNameIndex: 0,
-      tagItemInputs: [],
-      // sku的标记
-      // tags: [],
-      // 数据库中的规格
-      dbTags: [],
-      // 根据选定的规格所查询出来的规格值
-      dbTagValues: [],
-      specs: [], // 使用的规格
-      maxValueId: 0, // 规格值id最大
-      maxPropId: 0, // 规格id 最大
-      initing: false
-    }
-  },
-  created: function () {
-    this.$http({
-      url: this.$http.adornUrl(`/prod/spec/list`),
-      method: 'get',
-      params: this.$http.adornParams()
-    }).then(({data}) => {
-      this.dbTags = data
-      if (data) {
-        this.maxPropId = Math.max.apply(Math, data.map(item => { return item.propId }))
-      } else {
-        this.maxPropId = 0
-      }
-    })
-    this.$http({
-      url: this.$http.adornUrl(`/prod/spec/listSpecMaxValueId`),
-      method: 'get',
-      params: this.$http.adornParams()
-    }).then(({ data }) => {
-      if (data) {
-        this.maxValueId = data
-      } else {
-        this.maxValueId = 0
-      }
-    })
-  },
-  props: {
-  //   tags: { // sku的标记
-  //     default: [],
-  //     type: Array
-  //   }
-  // },
-    skuList: {
-      default: []
-    }
-  },
-  computed: {
-    // 未使用的规格, 通过计算属性计算
-    unUseTags () {
-      let res = []
-      for (let i = 0; i < this.dbTags.length; i++) {
-        const dbTag = this.dbTags[i]
-        let specIndex = this.skuTags.findIndex(tag => tag.tagName === dbTag.propName)
-        if (specIndex === -1) {
-          res.push(dbTag)
-        }
-      }
-      return res
-    },
-    skuTags: {
-      get () { return this.$store.state.prod.skuTags },
-      set (val) { this.$store.commit('prod/updateSkuTags', val) }
-    },
-    defalutSku () {
-      return this.$store.state.prod.defalutSku
-    }
-  },
-  watch: {
-    skuTags: {
-      handler (val, oldVal) {
-        if (this.initing) {
-          this.initing = false
-          return
-        }
-        let skuList = []
-        if (this.type === 4) {
-        // 删除规格值
-          this.skuList.forEach(sku => {
-            let propertiesArray = sku.properties.split(';')
-            if (this.tagItemName !== propertiesArray[this.tagNameIndex].split(':')[1]) {
-              skuList.push(sku)
-            }
-          })
-        } else if (this.type === 2) {
-        // 添加规格值
-          var properties = this.tagName + ':' + this.tagItemName
-        // 增加或删除规格
-          let tempSkuList = []
-          val.forEach(tag => {
-            if (skuList.length === 0) {
-              if (this.tagName === tag.tagName) {
-                let sku = Object.assign({}, this.defalutSku)
-                sku.properties = properties // 销售属性组合字符串
-                skuList.push(sku)
-              } else {
-                tag.tagItems.forEach(tagItem => {
-                  let sku = Object.assign({}, this.defalutSku)
-                  sku.properties = `${tag.tagName}:${tagItem.propValue}` // 销售属性组合字符串
-                  skuList.push(sku)
-                })
-              }
-              if (val.length === 1) {
-                skuList = this.skuList.concat(skuList)
-              }
-            } else {
-              tempSkuList = []
-              if (this.tagName === tag.tagName) {
-                skuList.forEach(sku => {
-                  if (sku.properties.indexOf(this.tagName) === -1) {
-                    let newSku = Object.assign({}, sku)
-                    newSku.properties = `${sku.properties};${properties}`
-                    tempSkuList.push(newSku)
-                  }
-                })
-              } else {
-                tag.tagItems.forEach(tagItem => {
-                  skuList.forEach(sku => {
-                    if (sku.properties.indexOf(tag.tagName) === -1) {
-                      let newSku = Object.assign({}, sku)
-                      newSku.properties = `${sku.properties};${tag.tagName}:${tagItem.propValue}`
-                      tempSkuList.push(newSku)
-                    }
-                  })
-                })
-              }
-              skuList = this.skuList.concat(tempSkuList)
-              console.log('skuList', skuList)
-            }
-          })
-        } else {
-        // 增加或删除规格
-          let tempSkuList = []
-          val.forEach(tag => {
-          // console.log('tag', tag)
-            if (skuList.length === 0) {
-              tag.tagItems.forEach(tagItem => {
-                let sku = Object.assign({}, this.defalutSku)
-                sku.properties = `${tag.tagName}:${tagItem.propValue}` // 销售属性组合字符串
-                skuList.push(sku)
-              })
-            } else {
-              tempSkuList = []
-              tag.tagItems.forEach(tagItem => {
-                skuList.forEach(sku => {
-                  let newSku = Object.assign({}, sku)
-                  newSku.properties = `${sku.properties};${tag.tagName}:${tagItem.propValue}`
-                  tempSkuList.push(newSku)
-                })
-              })
-              skuList = tempSkuList
-            }
-          })
-        }
-        if (!skuList.length) {
-          skuList.push(Object.assign({}, this.defalutSku))
-        }
-      // debugger
-        this.$emit('change', skuList)
-      },
-      deep: true
-    }
-  },
-  methods: {
-    init (skuList) {
-      this.value = skuList
-      if (!skuList || !skuList.length) {
-        this.skuTags = []
-        this.$emit('change', [Object.assign({}, this.defalutSku)])
-        return
-      }
-      this.initing = true
-      let skuTags = []
-      for (let i = 0; i < skuList.length; i++) {
-        const sku = skuList[i]
-        if (!sku.properties) break
-        let propertiesArray = sku.properties.split(';')
-        for (let j in propertiesArray) {
-          let properties = propertiesArray[j].split(':')
-          if (!skuTags[j]) {
-            skuTags[j] = {
-              tagName: properties[0],
-              tagItems: []
-            }
-            this.tagItemInputs.push({ visible: false, value: '' })
-          }
-          let tagItemNameIndex = skuTags[j].tagItems.findIndex((tagItemName) => tagItemName.propValue === properties[1])
-          if (tagItemNameIndex === -1) {
-            // skuTags[j].tagItems.push(properties[1])
-            skuTags[j].tagItems.push({propValue: properties[1]})
-          }
-        }
-      }
-      this.skuTags = skuTags
-    },
-    // 显示规格名、规格值输入框
-    shopTagInput () {
-      this.isShowTagInput = !this.isShowTagInput
-    },
-    // 隐藏规格名、规格值输入框
-    hideTagInput () {
-      this.isShowTagInput = false
-      this.cleanTagInput()
-    },
-    addTag () {
-      let selectValues = this.addTagInput.selectValues
-      if (!this.addTagInput.propName) {
-        this.$message.error('请输入规格名')
-        return
-      }
-      if (!selectValues.length) {
-        this.$message.error('请输入规格值')
-        return
-      }
-      this.isShowTagInput = false
-      for (let i = 0; i < selectValues.length; i++) {
-        const element = selectValues[i]
-        let is = Object.prototype.toString.call(element) === '[object Object]'
-        if (!is) {
-          this.maxPropId = this.maxPropId + 1
-          break
-        }
-      }
-      let tagItems = []
-      for (let i = 0; i < selectValues.length; i++) {
-        const element = selectValues[i]
-        let is = Object.prototype.toString.call(element) === '[object Object]'
-        if (is) {
-          tagItems.push(element)
-        } else {
-          this.maxValueId = this.maxValueId + 1
-          tagItems.push({propId: this.maxPropId, propValue: element, valueId: this.maxValueId})
-        }
-      }
-      // 向规格中放入规格输入框内的数据
-      this.$store.commit('prod/addSkuTag', {
-        tagName: this.addTagInput.propName,
-        tagItems
-      })
-      this.type = 1
-      this.cleanTagInput()
-    },
-    // 清除规格值输入框内容
-    cleanTagInput () {
-      this.addTagInput = {
-        propName: '',
-        selectValues: []
-      }
-      this.dbTagValues = []
-    },
-      // 规格名输入框,选中规格事件
-    handleTagClick () {
-        // 清空规格值输入框
-      this.dbTagValues = []
-      this.addTagInput.selectValues = []
-        // 判断规格名输入的值是否为数据库中已有的值
-      let specsIndex = this.dbTags.findIndex(spec => spec.propName === this.addTagInput.propName)
-        // 如果不是,则说明为用户随便输入
-      if (specsIndex === -1) return
-        // 如果数据库已有该规格名,则获取根据id获取该规格名称含有的规格值
-      this.$http({
-        url: this.$http.adornUrl(`/prod/spec/listSpecValue/${this.dbTags[specsIndex].propId}`),
-        method: 'get',
-        params: this.$http.adornParams()
-      }).then(({data}) => {
-        this.dbTagValues = data
-      })
-    },
-    // 关闭标签 --删除
-    handleTagClose (tagIndex, tagItemIndex) {
-      this.tagName = this.skuTags[tagIndex].tagName
-      this.tagNameIndex = tagIndex
-      this.tagItemName = this.skuTags[tagIndex].tagItems[tagItemIndex].propValue
-      if (this.skuTags[tagIndex].tagItems.length === 1) {
-        return
-      }
-      this.type = 4
-      this.$store.commit('prod/removeSkuTagItem', { tagIndex, tagItemIndex })
-    },
-    // 标签输入框确定时调用
-    handleInputConfirm (tagIndex) {
-      if (this.checkTagItem(tagIndex)) {
-        return
-      }
-      var tagItems = this.skuTags[tagIndex].tagItems
-      var itemValue = this.tagItemInputs[tagIndex].value
-      let index = tagItems.length - 1
-      this.tagName = this.skuTags[tagIndex].tagName
-      this.tagItemName = this.tagItemInputs[tagIndex].value
-      let maxValue = this.getMaxValueId(this.skuTags[tagIndex].tagItems)
-      let tagItem = {propId: index === -1 ? 0 : this.skuTags[tagIndex].tagItems[index].propId, propValue: itemValue, valueId: index === -1 ? 0 : (maxValue + 1)}
-      if (tagItem) {
-        this.$store.commit('prod/addSkuTagItem', { tagIndex, tagItem })
-      }
-      this.tagItemInputs[tagIndex].visible = false
-      this.tagItemInputs[tagIndex].value = ''
-      this.type = 2
-    },
-    // 显示标签输入框
-    showTagInput (tagIndex) {
-      this.tagItemInputs.push({ visible: false, value: '' })
-      this.tagItemInputs[tagIndex].visible = true
-      this.$nextTick(() => {
-        this.$refs[`saveTagInput${tagIndex}`][0].$refs.input.focus()
-      })
-    },
-    // 获取数据集合所有对象中某个属性的最大值
-    getMaxValueId (list) {
-      let value = Math.max.apply(Math, list.map(item => { return item.valueId }))
-      return value
-    },
-    // 删除 规格
-    removeTag (tagIndex) {
-      this.type = 3
-      this.$store.commit('prod/removeSkuTag', tagIndex)
-    },
-    /**
-     * 新增规格值时,判断是否存在同名的规格值
-     */
-    checkTagItem (tagIndex) {
-      let tagItem = this.tagItemInputs[tagIndex].value
-      if (!tagItem) {
-        this.tagItemInputs[tagIndex].visible = false
-        this.tagItemInputs[tagIndex].value = ''
-        return true
-      }
-      var isSame = false
-      this.skuTags.forEach(tag => {
-        let arr = tag.tagItems.map((item, index) => {
-          return item.propValue
-        })
-        if (arr.indexOf(tagItem) > -1) {
-          isSame = true
-          this.$message.error('product.specificationValue')
-          return false
-        }
-      })
-      return isSame
-    }
-  }
-}
-</script>
-
-<style lang="scss">
-.mod-prod-sku-tag {
-  .el-tag + .el-tag {
-    margin-left: 10px;
-  }
-  .button-new-tag {
-    margin-left: 10px;
-    height: 32px;
-    line-height: 30px;
-    padding-top: 0;
-    padding-bottom: 0;
-  }
-  .input-new-tag {
-    width: 90px;
-    margin-left: 10px;
-    vertical-align: bottom;
-  }
-}
-
-// 新增规格外部边框
-.sku-border{
-  border: 1px solid #EBEEF5;
-  width:70%
-}
-.sku-background{
-  background-color: #F6f6f6;
-  margin: 12px 12px;
-  .el-button{
-    margin-left: 10px;
-    span{
-      color:#000 !important;
-    }
-  }
-  .el-form-item__label{
-    padding:0 24px 0 0
-  }
-}
-.sku-tag{
-  margin: 12px 12px;
-}
-.tagTree{
-  margin-left: 18px;
-  padding-bottom:8px;
-}
-</style>

+ 0 - 172
src/views/modules/prod/spec-add-or-update.vue

@@ -1,172 +0,0 @@
-<template>
-  <el-dialog :title="!this.dataList[0].propId ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-table :data="dataList"
-              border
-              style="width: 100%;">
-      <el-table-column prop="propName"
-                       header-align="center"
-                       align="center"
-                       label="属性名称">
-        <template slot-scope="scope">
-          <el-input placeholder="请输入内容"
-                    v-model="scope.row.propName"
-                    maxlength="10"
-                    show-word-limit
-                    clearable></el-input>
-        </template>
-      </el-table-column>
-      <el-table-column prop="prodPropValues"
-                       header-align="center"
-                       align="center"
-                       label="属性值">
-        <template slot-scope="scope">
-          <el-col :span="12"
-                  v-for="item in scope.row.prodPropValues"
-                  :key="item.valueId">
-            <el-input placeholder="请输入内容"
-                      v-model="item.propValue"
-                      class="prop-value-input"
-                      @clear="clearProdPropValues"
-                      maxlength="20"
-                      show-word-limit
-                      clearable></el-input>
-          </el-col>
-          <el-col :span="4">
-            <el-button
-              v-show="scope.row.prodPropValues[scope.row.prodPropValues.length-1].propValue"
-              type="primary"
-              class="add-input"
-              icon="el-icon-circle-plus"
-              @click="addInput()"
-            >
-            </el-button>
-          </el-col>
-        </template>
-      </el-table-column>
-    </el-table>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-<script>
-import { Debounce } from '@/utils/debounce'
-export default {
-  data () {
-    return {
-      visible: false,
-      dataList: [{ propId: 0, propName: '', prodPropValues: [{ valueId: 0 }] }],
-      dataRule: {
-        propName: [
-          { required: true, message: '属性名称不能为空', trigger: 'blur' }
-        ]
-      },
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      }
-    }
-  },
-  methods: {
-    init (val) {
-      if (val) {
-        this.dataList = [JSON.parse(JSON.stringify(val))]
-      } else {
-        this.dataList = [
-          { propId: 0, propName: '', prodPropValues: [{ valueId: 0 }] }
-        ]
-      }
-      this.visible = true
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      if (this.dataList[0].prodPropValues) {
-        let temp = []
-        for (const key in this.dataList[0].prodPropValues) {
-          if (this.dataList[0].prodPropValues.hasOwnProperty(key)) {
-            const element = this.dataList[0].prodPropValues[key]
-            if (element.propValue) {
-              temp.push(this.dataList[0].prodPropValues[key])
-            }
-          }
-        }
-        this.dataList[0].prodPropValues = temp
-      }
-      if (!this.dataList[0].propName.trim()) {
-        this.dataList[0].propName = ''
-        this.$message.error('属性名不能为空')
-        return
-      }
-      if (this.dataList[0].prodPropValues.length < 1) {
-        this.dataList[0].prodPropValues = [{ valueId: 0 }]
-        this.$message.error('规格项不能为空')
-        return
-      }
-      if (this.dataList[0].propName.length > 10) {
-        this.$message.error('属性名称长度不能大于10')
-        return
-      }
-      if (this.dataList[0].prodPropValues.find(el => !el.propValue.trim())) {
-        this.$message.error('属性值不能为空')
-        return
-      }
-      if (this.dataList[0].prodPropValues.find(el => el.propValue.length > 20)) {
-        this.$message.error('属性值长度不能大于20')
-        return
-      }
-      this.$http({
-        url: this.$http.adornUrl(`/prod/spec`),
-        method: this.dataList[0].propId ? 'put' : 'post',
-        data: this.$http.adornData({
-          propId: this.dataList[0].propId || undefined,
-          propName: this.dataList[0].propName,
-          prodPropValues: this.dataList[0].prodPropValues
-        })
-      }).then(({ data }) => {
-        this.$message({
-          message: '操作成功',
-          type: 'success',
-          duration: 1500,
-          onClose: () => {
-            this.visible = false
-            this.$emit('refreshDataList', this.page)
-          }
-        })
-      })
-    }),
-    clearProdPropValues () {
-      if (this.dataList[0].prodPropValues.length === 1) {
-        return
-      }
-      for (let i = 0; i < this.dataList[0].prodPropValues.length; i++) {
-        const element = this.dataList[0].prodPropValues[i]
-        if (!element.propValue) {
-          this.dataList[0].prodPropValues.splice(i, 1)
-        }
-      }
-    },
-    addInput () {
-      let temp = this.dataList[0].prodPropValues
-      if (temp[temp.length - 1].propValue) {
-        temp.push({})
-      }
-    }
-  }
-}
-</script>
-
-<style scoped>
-.prop-value-input {
-  padding: 3px;
-}
-
-.add-input {
-  margin: 3px;
-}
-</style>

+ 0 - 160
src/views/modules/prod/spec.vue

@@ -1,160 +0,0 @@
-<template>
-  <div class="mod-prod">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               :permission="permission"
-               @search-change="searchChange"
-               @on-load="getDataList">
-      <template slot-scope="scope"
-                slot="prodPropValues">
-        <el-tag v-for="item in scope.row.prodPropValues"
-                :key="item.valueId">{{item.propValue}}</el-tag>
-      </template>
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('shop:pickAddr:save')"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-      </template>
-
-      <template slot-scope="scope"
-                slot="prodPropValues">
-        <div v-for="item in scope.row.prodPropValues"
-                  :key="item.valueId" class="prop-value">
-          <el-tag>{{item.propValue}}</el-tag>          
-        </div>
-
-      </template>
-
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('prod:spec:update')"
-                   @click.stop="addOrUpdateHandle(scope.row)">编辑</el-button>
-
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   v-if="isAuth('prod:spec:delete')"
-                   @click.stop="deleteHandle(scope.row.propId)">删除</el-button>
-      </template>
-    </avue-crud>
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import AddOrUpdate from './spec-add-or-update'
-import { tableOption } from '@/crud/prod/spec'
-export default {
-  data () {
-    return {
-      dataForm: {
-        prodProp: ''
-      },
-      dataList: [],
-      pageIndex: 1,
-      pageSize: 10,
-      totalPage: 0,
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      permission: {
-        delBtn: this.isAuth('prod:prod:delete')
-      },
-      tableOption: tableOption
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/prod/spec/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (val) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(val)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      var ids = id
-        ? [id]
-        : this.dataListSelections.map(item => {
-          return item.propId
-        })
-      this.$confirm(`确定进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$http({
-            url: this.$http.adornUrl(`/prod/spec/${ids}`),
-            method: 'delete',
-            data: this.$http.adornData(ids, false)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.getDataList(this.page)
-              }
-            })
-          })
-        })
-        .catch(() => { })
-    },
-
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    }
-  }
-}
-</script>
-
-<style scoped>
-.prop-value {
-  display: inline-block;
-  margin: 0 3px 3px 0;
-}
-</style>

+ 0 - 136
src/views/modules/shop/hotSearch-add-or-update.vue

@@ -1,136 +0,0 @@
-<template>
-  <div class="mod-hotSearch-add-or-update">
-    <el-dialog :title="!dataForm.hotSearchId ? '新增' : '修改'"
-               :close-on-click-modal="false"
-               :visible.sync="visible">
-      <el-form :model="dataForm"
-               :rules="dataRule"
-               ref="dataForm"
-               @keyup.enter.native="dataFormSubmit()"
-               label-width="80px">
-
-        <el-form-item label="标题"
-                      prop="title">
-          <el-input v-model="dataForm.title"
-                    controls-position="right"
-                    :min="0"
-                    maxlength="50"
-                    show-word-limit
-                    label="标题"></el-input>
-        </el-form-item>
-
-        <el-form-item label="内容"
-                      prop="content">
-          <el-input v-model="dataForm.content"
-                    controls-position="right"
-                    type="textarea"
-                    :min="0"
-                    maxlength="255"
-                    show-word-limit
-                    label="内容"></el-input>
-        </el-form-item>
-        <el-form-item label="排序号"
-                      prop="seq">
-          <el-input-number v-model="dataForm.seq"
-                           controls-position="right"
-                           :min="0"
-                           label="排序号"></el-input-number>
-        </el-form-item>
-        <el-form-item label="状态"
-                      size="mini"
-                      prop="status">
-          <el-radio-group v-model="dataForm.status">
-            <el-radio :label="0">下线</el-radio>
-            <el-radio :label="1">正常</el-radio>
-          </el-radio-group>
-        </el-form-item>
-      </el-form>
-      <span slot="footer"
-            class="dialog-footer">
-        <el-button @click="visible = false">取消</el-button>
-        <el-button type="primary"
-                   @click="dataFormSubmit()">确定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { Debounce } from '@/utils/debounce'
-export default {
-  data () {
-    return {
-      dataForm: {
-        hotSearchId: 0,
-        title: '',
-        content: '',
-        recDate: '',
-        seq: 0,
-        status: 0
-      },
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      addProdVisible: false,
-      visible: false,
-      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
-      dataRule: {
-        title: [
-          { required: true, message: '标题不能为空', trigger: 'blur' },
-          { min: 1, max: 50, message: '长度在1到50个字符内', trigger: 'blur' },
-          { pattern: /\s\S+|S+\s|\S/, message: '标题不能为空', trigger: 'blur' }
-        ],
-        content: [
-          { required: true, message: '内容不能为空', trigger: 'blur' },
-          { min: 1, max: 255, message: '长度在1到255个字符内', trigger: 'blur' },
-          { pattern: /\s\S+|S+\s|\S/, message: '内容不能为空', trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  components: {},
-  methods: {
-    init (id) {
-      this.dataForm.hotSearchId = id || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        if (this.dataForm.hotSearchId) {
-          this.$http({
-            url: this.$http.adornUrl('/admin/hotSearch/info/' + this.dataForm.hotSearchId),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({data}) => {
-            this.dataForm = data
-          })
-        }
-      })
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      this.$refs['dataForm'].validate(valid => {
-        if (valid) {
-          let param = this.dataForm
-          this.$http({
-            url: this.$http.adornUrl(`/admin/hotSearch`),
-            method: param.hotSearchId ? 'put' : 'post',
-            data: this.$http.adornData(param)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList', this.page)
-              }
-            })
-          })
-        }
-      })
-    })
-  }
-}
-</script>

+ 0 - 150
src/views/modules/shop/hotSearch.vue

@@ -1,150 +0,0 @@
-<template>
-  <div class="mod-hotSearcch">
-
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :table-loading="dataListLoading"
-               :option="tableOption"
-               @search-change="searchChange"
-               @on-load="getDataList"
-               @refresh-change="refreshChange"
-               @selection-change="selectionChange">
-      <template slot="menuLeft">
-        <el-button v-if="isAuth('admin:hotSearch:save')"
-                   type="primary"
-                   size="small"
-                   icon="el-icon-plus"
-                   @click="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   size="small"
-                   @click.stop="deleteHandle"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-
-      <template slot-scope="scope"
-                slot="status">
-        <el-tag v-if="scope.row.status === 0"
-                size="small"
-                type="danger">未启用</el-tag>
-        <el-tag v-else
-                size="small">启用</el-tag>
-      </template>
-
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button v-if="isAuth('admin:hotSearch:update')"
-                   type="primary"
-                   size="small"
-                   icon="el-icon-edit"
-                   @click="addOrUpdateHandle(scope.row.hotSearchId)">修改</el-button>
-        <el-button v-if="isAuth('admin:hotSearch:delete')"
-                   type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   @click.stop="deleteHandle(scope.row,scope.index)">删除</el-button>
-      </template>
-
-    </avue-crud>
-
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/shop/hotSearch'
-import AddOrUpdate from './hotSearch-add-or-update'
-export default {
-  data () {
-    return {
-      dataForm: {
-
-      },
-      dataList: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      tableOption: tableOption
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/admin/hotSearch/page'),
-        method: 'get',
-        params: this.$http.adornParams(Object.assign({
-          current: page ? page.currentPage : 1,
-          size: page ? page.pageSize : 20
-        }, params))
-      }).then(({ data }) => {
-        this.page.total = data.total
-        this.page.pageSize = data.size
-        this.page.currentPage = data.current
-        this.dataList = data.records
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 多选回调
-    selectionChange (list) {
-      this.dataListSelections = list
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 点击查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 删除
-    deleteHandle (row, index) {
-      var ids = row.hotSearchId ? [row.hotSearchId] : this.dataListSelections.map(item => {
-        return item.hotSearchId
-      })
-      this.$confirm(`确定进行[${row.hotSearchId ? '删除' : '批量删除'}]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/admin/hotSearch'),
-          method: 'delete',
-          data: this.$http.adornData(ids, false)
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      }).catch(() => { })
-    },
-    refreshChange () {
-      this.getDataList(this.page)
-    }
-  }
-}
-</script>

+ 0 - 121
src/views/modules/shop/notice-add-or-update.vue

@@ -1,121 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.id ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="80px">
-      <el-form-item label="公告标题"
-                    prop="title">
-        <el-input v-model="dataForm.title"></el-input>
-      </el-form-item>
-      <el-form-item label="状态"
-                    prop="status">
-        <el-radio-group v-model="dataForm.status">
-          <el-radio :label="1">公布</el-radio>
-          <el-radio :label="0">撤销</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="置顶"
-                    prop="isTop">
-        <el-radio-group v-model="dataForm.isTop">
-          <el-radio :label="1">是</el-radio>
-          <el-radio :label="0">否</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="公告内容"
-                    prop="content">
-        <tiny-mce v-model="dataForm.content"></tiny-mce>
-      </el-form-item>
-
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button size="small"
-                 @click="visible = false">取消</el-button>
-      <el-button size="small"
-                 type="primary"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-import TinyMce from '@/components/tiny-mce'
-import { Debounce } from '@/utils/debounce'
-export default {
-  data () {
-    var validateTitle = (rule, value, callback) => {
-      if (!value.trim()) {
-        this.dataForm.title = ''
-        callback(new Error('公告标题不能为空'))
-      } else {
-        callback()
-      }
-    }
-    return {
-      visible: false,
-      roleList: [],
-      dataForm: {
-        title: null,
-        content: null,
-        url: null,
-        status: 1,
-        isTop: 0
-      },
-      dataRule: {
-        title: [
-          {required: true, message: '公告标题不能为空', trigger: 'blur'},
-          { validator: validateTitle, trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  components: {
-    TinyMce
-  },
-  methods: {
-    init (id) {
-      this.dataForm.id = id || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        if (this.dataForm.id) {
-          this.$http({
-            url: this.$http.adornUrl('/shop/notice/info/' + this.dataForm.id),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({ data }) => {
-            this.dataForm = data
-          })
-        }
-      })
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl('/shop/notice'),
-            method: this.dataForm.id ? 'put' : 'post',
-            data: this.$http.adornData(this.dataForm)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList')
-                this.dataForm.content = ''
-              }
-            })
-          })
-        }
-      })
-    })
-  }
-}
-</script>

+ 0 - 145
src/views/modules/shop/notice.vue

@@ -1,145 +0,0 @@
-<template>
-  <div class="mod-shop-notice">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :table-loading="dataListLoading"
-               :option="tableOption"
-               @search-change="searchChange"
-               @on-load="getDataList"
-               @refresh-change="refreshChange">
-
-      <template slot-scope="scope"
-                slot="status">
-        <el-tag v-if="scope.row.status === 0"
-                size="small"
-                type="danger">撤销</el-tag>
-        <el-tag v-else
-                size="small">公布</el-tag>
-      </template>
-      <template slot-scope="scope"
-                slot="isTop">
-        <el-tag v-if="scope.row.isTop === 0"
-                size="small">否</el-tag>
-        <el-tag v-else
-                size="small">是</el-tag>
-      </template>
-      <template slot="menuLeft">
-
-        <el-button v-if="isAuth('shop:notice:save')"
-                   type="primary"
-                   size="small"
-                   icon="el-icon-plus"
-                   @click="addOrUpdateHandle()">新增</el-button>
-      </template>
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button v-if="isAuth('shop:notice:update')"
-                   type="primary"
-                   size="small"
-                   icon="el-icon-edit"
-                   @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
-        <el-button v-if="isAuth('shop:notice:delete')"
-                   type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   @click.stop="deleteHandle(scope.row.id)">删除</el-button>
-      </template>
-
-    </avue-crud>
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="refreshChange"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/shop/notice'
-import AddOrUpdate from './notice-add-or-update'
-export default {
-  data () {
-    return {
-      dataList: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      dataListLoading: false,
-      tableOption: tableOption,
-      permission: {
-        delBtn: this.isAuth('shop:notice:delete')
-      },
-      addOrUpdateVisible: false
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  created () {
-  },
-  mounted () {
-  },
-  methods: {
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/shop/notice/page'),
-        method: 'get',
-        params: this.$http.adornParams(Object.assign({
-          current: page == null ? this.page.currentPage : page.currentPage,
-          size: page == null ? this.page.pageSize : page.pageSize
-        }, params))
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    deleteHandle (id) {
-      this.$confirm('确定进行删除操作?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/shop/notice/' + id),
-          method: 'delete',
-          data: this.$http.adornData({})
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      }).catch(() => { })
-    },
-    /**
-     * 刷新回调
-     */
-    refreshChange () {
-      this.getDataList(this.page)
-    },
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 246
src/views/modules/shop/pickAddr-add-or-update.vue

@@ -1,246 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.addrId ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="80px">
-      <el-form-item label="名称"
-                    prop="addrName">
-        <el-input v-model="dataForm.addrName"
-                  placeholder="自提点名称"></el-input>
-      </el-form-item>
-      <el-form-item label="省份">
-        <el-col :span="8">
-          <el-form-item prop="province">
-            <el-select v-model="dataForm.provinceId"
-                       placeholder="请选择"
-                       @change="selectProvince">
-              <el-option v-for="province in provinceList"
-                         :key="province.areaId"
-                         :label="province.areaName"
-                         :value="province.areaId"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="city">
-            <el-select v-model="dataForm.cityId"
-                       placeholder="请选择"
-                       @change="selectCity">
-              <el-option v-for="city in cityList"
-                         :key="city.areaId"
-                         :label="city.areaName"
-                         :value="city.areaId"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="area">
-            <el-select v-model="dataForm.areaId"
-                       placeholder="请选择">
-              <el-option v-for="area in areaList"
-                         :key="area.areaId"
-                         :label="area.areaName"
-                         :value="area.areaId"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-      </el-form-item>
-      <el-form-item label="地址"
-                    prop="addr">
-        <el-input v-model="dataForm.addr"
-                  placeholder="地址"></el-input>
-      </el-form-item>
-      <el-form-item label="手机号"
-                    prop="mobile">
-        <el-input v-model="dataForm.mobile"
-                  maxlength="11"
-                  placeholder="手机号"></el-input>
-      </el-form-item>
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-import { isMobile } from '@/utils/validate'
-import { Debounce } from '@/utils/debounce'
-
-export default {
-  data () {
-    var validateMobile = (rule, value, callback) => {
-      if (!isMobile(value)) {
-        callback(new Error('手机号格式错误'))
-      } else {
-        callback()
-      }
-    }
-    return {
-      visible: false,
-      provinceList: [],
-      cityList: [],
-      areaList: [],
-      dataForm: {
-        addrId: 0,
-        addr: '',
-        addrName: '',
-        mobile: '',
-        area: '',
-        city: '',
-        province: '',
-        areaId: null,
-        cityId: null,
-        provinceId: null
-      },
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      dataRule: {
-        addrName: [
-          { required: true, message: '自提点名称不能为空', trigger: 'blur' },
-          { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的自提点名称', trigger: 'blur' }
-        ],
-        addr: [
-          { required: true, message: '地址不能为空', trigger: 'blur' },
-          { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的地址', trigger: 'blur' }
-        ],
-        city: [{ required: true, message: '城市不能为空', trigger: 'blur' }],
-        province: [
-          { required: true, message: '省份不能为空', trigger: 'blur' }
-        ],
-        area: [{ required: true, message: '区/县不能为空', trigger: 'blur' }],
-        mobile: [
-          { required: true, message: '手机号不能为空', trigger: 'blur' },
-          { validator: validateMobile, trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  methods: {
-    init (id) {
-      this.dataForm.addrId = id || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs.dataForm.resetFields()
-        this.cityList = []
-        this.areaList = []
-        this.dataForm.provinceId = null
-        this.dataForm.cityId = null
-        this.dataForm.areaId = null
-      })
-      this.listAreaByParentId().then(({ data }) => {
-        this.provinceList = data
-      })
-      if (this.dataForm.addrId) {
-        this.$http({
-          url: this.$http.adornUrl(
-            `/shop/pickAddr/info/${this.dataForm.addrId}`
-          ),
-          method: 'get',
-          params: this.$http.adornParams()
-        }).then(({ data }) => {
-          this.dataForm.addr = data.addr
-          this.dataForm.mobile = data.mobile
-          this.dataForm.addrName = data.addrName
-          this.dataForm.areaId = data.areaId
-          this.dataForm.cityId = data.cityId
-          this.dataForm.provinceId = data.provinceId
-          this.listAreaByParentId(data.provinceId).then(({ data }) => {
-            this.cityList = data
-          })
-          this.listAreaByParentId(data.cityId).then(({ data }) => {
-            this.areaList = data
-          })
-        })
-      }
-    },
-    listAreaByParentId (pid) {
-      if (!pid) pid = 0
-      return this.$http({
-        url: this.$http.adornUrl(`/admin/area/listByPid`),
-        method: 'get',
-        params: this.$http.adornParams({ pid })
-      })
-    },
-    // 选择省
-    selectProvince (val) {
-      this.dataForm.cityId = null
-      this.dataForm.city = ''
-      // 获取城市的select
-      this.listAreaByParentId(val).then(({ data }) => {
-        this.cityList = data
-      })
-    },
-    // 选择市
-    selectCity (val) {
-      this.dataForm.areaId = null
-      this.dataForm.area = ''
-      // 获取区的select
-      this.listAreaByParentId(val).then(({ data }) => {
-        this.areaList = data
-      })
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      for (let i = 0; i < this.provinceList.length; i++) {
-        if (this.provinceList[i].areaId === this.dataForm.provinceId) {
-          // 将省名字保存起来
-          this.dataForm.province = this.provinceList[i].areaName
-        }
-      }
-      for (let i = 0; i < this.cityList.length; i++) {
-        if (this.cityList[i].areaId === this.dataForm.cityId) {
-          // 将市名字保存起来
-          this.dataForm.city = this.cityList[i].areaName
-        }
-      }
-      for (let i = 0; i < this.areaList.length; i++) {
-        if (this.areaList[i].areaId === this.dataForm.areaId) {
-          // 将市名字保存起来
-          this.dataForm.area = this.areaList[i].areaName
-        }
-      }
-      this.$refs['dataForm'].validate(valid => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl(`/shop/pickAddr`),
-            method: this.dataForm.addrId ? 'put' : 'post',
-            data: this.$http.adornData({
-              addrId: this.dataForm.addrId || undefined,
-              addr: this.dataForm.addr,
-              addrName: this.dataForm.addrName,
-              mobile: this.dataForm.mobile,
-              area: this.dataForm.area,
-              city: this.dataForm.city,
-              province: this.dataForm.province,
-              areaId: this.dataForm.areaId,
-              cityId: this.dataForm.cityId,
-              provinceId: this.dataForm.provinceId
-            })
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList', this.page)
-              }
-            })
-          })
-        }
-      })
-    })
-  }
-}
-</script>

+ 0 - 151
src/views/modules/shop/pickAddr.vue

@@ -1,151 +0,0 @@
-<template>
-  <div class="mod-pickAddr">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               :permission="permission"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('shop:pickAddr:save')"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   @click="deleteHandle()"
-                   v-if="isAuth('shop:pickAddr:delete')"
-                   size="small"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('shop:pickAddr:update')"
-                   @click.stop="addOrUpdateHandle(scope.row.addrId)">编辑</el-button>
-
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   v-if="isAuth('shop:pickAddr:delete')"
-                   @click.stop="deleteHandle(scope.row.addrId)">删除</el-button>
-      </template>
-    </avue-crud>
-
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import AddOrUpdate from './pickAddr-add-or-update'
-import { tableOption } from '@/crud/shop/pickAddr'
-export default {
-  data () {
-    return {
-      dataForm: {
-        addrName: ''
-      },
-      dataList: [],
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      tableOption: tableOption,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      permission: {
-        delBtn: this.isAuth('prod:prod:delete')
-      }
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/shop/pickAddr/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      var ids = id
-        ? [id]
-        : this.dataListSelections.map(item => {
-          return item.addrId
-        })
-      this.$confirm(
-        `确定进行删除操作?`, '提示',
-        {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }
-      )
-        .then(() => {
-          this.$http({
-            url: this.$http.adornUrl('/shop/pickAddr'),
-            method: 'delete',
-            data: this.$http.adornData(ids, false)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.getDataList(this.page)
-              }
-            })
-          })
-        })
-        .catch(() => { })
-    },
-
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 多选变化
-    selectionChange (val) {
-      this.dataListSelections = val
-    }
-  }
-}
-</script>

+ 0 - 110
src/views/modules/shop/transcity-add-or-update.vue

@@ -1,110 +0,0 @@
-<template>
-  <div class="shop-transcity-add-or-update">
-    <el-dialog
-      :modal="false"
-      title="选择配送区域"
-      :close-on-click-modal="false"
-      :visible.sync="visible">
-      <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px" style="height:400px">
-        <el-scrollbar style="height:100%">
-          <el-form-item size="mini" label="配送区域">
-            <el-tree
-              :data="menuList"
-              :props="menuListTreeProps"
-              node-key="areaId"
-              ref="menuListTree"
-              show-checkbox
-              v-if="visible">
-            </el-tree>
-          </el-form-item>
-        </el-scrollbar>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="visible = false">取消</el-button>
-        <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import { treeDataTranslate } from '@/utils'
-  export default {
-    data () {
-      return {
-        type: 0,
-        visible: false,
-        menuList: [],
-        rowIndex: 0,
-        menuListTreeProps: {
-          label: 'areaName',
-          children: 'children'
-        },
-        dataForm: {
-          transfeeId: 0
-        }
-      }
-    },
-    methods: {
-      init (rowIndex, cityList, allSelectCityList, type) {
-        this.type = type
-        this.rowIndex = rowIndex
-        if (this.menuList.length === 0) {
-          // 获取所有省和市
-          this.$http({
-            url: this.$http.adornUrl('/admin/area/list'),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({data}) => {
-            this.menuList = treeDataTranslate(data, 'areaId', 'parentId')
-          }).then(() => {
-            this.visible = true
-            this.disabledNodes(cityList, allSelectCityList)
-            this.$nextTick(() => {
-              this.$refs['dataForm'].resetFields()
-              this.$refs.menuListTree.setCheckedNodes(cityList)
-            })
-          })
-        } else {
-          this.visible = true
-          this.disabledNodes(cityList, allSelectCityList)
-          this.$nextTick(() => {
-            this.$refs['dataForm'].resetFields()
-            this.$refs.menuListTree.setCheckedNodes(cityList)
-          })
-        }
-      },
-      disabledNodes (cityList, allSelectCityList) {
-        for (let i = 0; i < this.menuList.length; i++) {
-          const childrens = this.menuList[i].children
-          this.menuList[i].disabled = false
-          let disabledNum = 0
-          for (let j = 0; j < childrens.length; j++) {
-            const city = childrens[j]
-            this.menuList[i].children[j].disabled = false
-            let allHasCity = allSelectCityList.findIndex((item) => city.areaId === item.areaId) > -1
-            let listHasCity = cityList.findIndex((item) => city.areaId === item.areaId) > -1
-            if (allHasCity && !listHasCity) {
-              this.menuList[i].children[j].disabled = true
-              disabledNum++
-            }
-          }
-          if (disabledNum === this.menuList[i].children.length) {
-            this.menuList[i].disabled = true
-          }
-        }
-      },
-      // 表单提交
-      dataFormSubmit () {
-        this.$emit('refreshDataList', this.rowIndex, this.$refs.menuListTree.getCheckedNodes(true), this.type)
-        this.visible = false
-      }
-    }
-  }
-</script>
-
-<style  lang="scss">
-.shop-transcity-add-or-update {
-  .el-scrollbar__wrap{overflow-x:hidden;}
-}
-</style>

+ 0 - 425
src/views/modules/shop/transport-add-or-update.vue

@@ -1,425 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.transportId ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible"
-             width="1400px"
-             class="transport-dialog"
-  >
-    <el-form :model="dataForm"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="80px">
-      <el-form-item label="模板名称"
-                    prop="transName"
-                    :rules="[
-                      { required: true, message: '模板名称不能为空'},
-                      { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的模板名称', trigger: 'blur' }
-                    ]">
-        <el-input v-model="dataForm.transName"
-                  placeholder="模板名称"></el-input>
-      </el-form-item>
-      <el-form-item label="模板类型"
-                    prop="isFreeFee"
-                    required="required">
-        <template>
-          <el-radio-group v-model="dataForm.isFreeFee"
-                          @change="changeFreeFee">
-            <el-radio :label="0">买家承担运费</el-radio>
-            <el-radio :label="1">卖家包邮</el-radio>
-          </el-radio-group>
-        </template>
-      </el-form-item>
-      <el-form-item label="收费方式"
-                    prop="chargeType">
-        <template>
-          <el-radio-group v-model="dataForm.chargeType"
-                          :disabled="dataForm.isFreeFee == 1">
-            <el-radio :label="0">按件数</el-radio>
-            <el-radio :label="1">按重量</el-radio>
-            <el-radio :label="2">按体积</el-radio>
-          </el-radio-group>
-        </template>
-      </el-form-item>
-      <el-table :data="dataForm.transfees"
-                border
-                style="width: 100%;"
-                class="table-con"
-      >
-        <el-table-column header-align="center"
-                         align="center"
-                         width="450"
-                         label="可配送区域">
-          <template slot-scope="scope">
-            <span v-if="scope.$index == 0">所有地区</span>
-            <span v-if="(!scope.row.cityList || !scope.row.cityList.length) && scope.$index > 0">请选择可配送区域</span>
-            <span v-if="scope.$index > 0">
-              <el-tag v-for="city in scope.row.cityList"
-                    :key="city.areaId"
-                    >{{city.areaName}}</el-tag>
-            </span>
-            <el-button v-if="isAuth('shop:transfee:update') && scope.$index > 0"
-                       type="text"
-                       size="small"
-                       @click="addOrUpdateHandle(`${scope.$index}`)">编辑</el-button>
-            <el-button v-if="isAuth('shop:transfee:delete') && scope.$index > 0"
-                       type="text"
-                       size="small"
-                       @click="deleteHandle(`${scope.$index}`)">删除</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column header-align="center"
-                         align="center"
-                         width="180"
-                         :label="tableTitle[0]">
-          <template slot-scope="scope">
-            <el-form-item :prop="`transfees.${scope.$index}.firstPiece`"
-                          label-width="0px"
-                          :rules="[{ required: true, message: `${tableTitle[0]}不能为空`}]">
-              <el-input type="number"
-                        @change="checkNumber(scope.row, 1)"
-                        v-model="scope.row.firstPiece"
-                        :disabled="!scope.row.status && scope.$index === 0"></el-input>
-            </el-form-item>
-          </template>
-        </el-table-column>
-        <el-table-column header-align="center"
-                         align="center"
-                         :label="tableTitle[1]">
-          <template slot-scope="scope">
-            <el-form-item :prop="`transfees.${scope.$index}.firstFee`"
-                          label-width="0px"
-                          :rules="[{ required: true, message: `${tableTitle[1]}不能为空`}]">
-              <el-input type="number"
-                        v-model="scope.row.firstFee"
-                        :disabled="!scope.row.status && scope.$index === 0"></el-input>
-            </el-form-item>
-          </template>
-        </el-table-column>
-        <el-table-column header-align="center"
-                         align="center"
-                         :label="tableTitle[2]">
-          <template slot-scope="scope">
-            <el-form-item :prop="`transfees.${scope.$index}.continuousPiece`"
-                          label-width="0px"
-                          :rules="[{ required: true, message: `${tableTitle[2]}不能为空`}]">
-              <el-input type="number"
-                        @change="checkNumber(scope.row, 3)"
-                        v-model="scope.row.continuousPiece"
-                        :disabled="!scope.row.status && scope.$index === 0"></el-input>
-            </el-form-item>
-          </template>
-        </el-table-column>
-        <el-table-column header-align="center"
-                         align="center"
-                         :label="tableTitle[3]">
-          <template slot-scope="scope">
-            <el-form-item :prop="`transfees.${scope.$index}.continuousFee`"
-                          label-width="0px"
-                          :rules="[{ required: true, message: `${tableTitle[3]}不能为空`}]">
-              <el-input type="number"
-                        v-model="scope.row.continuousFee"
-                        :disabled="!scope.row.status && scope.$index === 0"></el-input>
-            </el-form-item>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div style="margin-top: 20px"
-           v-if="dataForm.isFreeFee == 0">
-        <el-button type="primary"
-                   icon="el-icon-location-outline"
-                   @click="addTransfee()">点击添加可配送的区域和运费</el-button>
-      </div>
-      <el-checkbox v-model="dataForm.hasFreeCondition"
-                   v-if="!dataForm.isFreeFee"
-                   style="margin-top:10px;font-size:50px">指定条件包邮</el-checkbox>
-      <el-table v-if="dataForm.hasFreeCondition && !dataForm.isFreeFee"
-                :data="dataForm.transfeeFrees"
-                border
-                style="width: 100%;">
-        <el-table-column header-align="center"
-                         align="center"
-                         width="350"
-                         label="指定区域">
-          <template slot-scope="scope">
-            <span v-if="!scope.row.freeCityList || !scope.row.freeCityList.length">请选择指定包邮城市</span>
-            <el-tag v-for="city in scope.row.freeCityList"
-                    :key="city.areaId">{{city.areaName}}</el-tag>
-            <el-button v-if="isAuth('shop:transfee:update')"
-                       type="text"
-                       size="small"
-                       @click="addOrUpdateTransfeeFree(`${scope.$index}`)">编辑</el-button>
-            <el-button v-if="isAuth('shop:transfee:delete')"
-                       type="text"
-                       size="small"
-                       @click="deleteTransfeeFree(`${scope.$index}`)">删除</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column header-align="center"
-                         align="center"
-                         width="600"
-                         label="设置包邮条件">
-          <template slot-scope="scope">
-            <el-radio-group v-model="scope.row.freeType">
-              <el-radio :label="0">满件/重量/体积包邮</el-radio>
-              <el-radio :label="1">满金额包邮</el-radio>
-              <el-radio :label="2">满件/重量/体积且满金额包邮</el-radio>
-            </el-radio-group>
-          </template>
-        </el-table-column>
-        <el-table-column header-align="center"
-                         align="left">
-          <template slot-scope="scope">
-            <el-form-item :prop="`transfeeFrees.${scope.$index}.amount`"
-                          v-if="scope.row.freeType == 1 || scope.row.freeType == 2"
-                          label-width="0px"
-                          :rules="[{ required: true, message: `不能为空`}]">
-              满 <el-input style="width:100px"
-                        v-model="scope.row.amount"></el-input> 元包邮
-            </el-form-item>
-            <el-form-item :prop="`transfeeFrees.${scope.$index}.piece`"
-                          v-if="scope.row.freeType == 0 || scope.row.freeType == 2"
-                          label-width="0px"
-                          :rules="[{ required: true, message: `不能为空`}]">
-              满 <el-input style="width:100px"
-                        v-model="scope.row.piece"></el-input> 件/重量/体积包邮
-            </el-form-item>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div style="margin-top: 20px"
-           v-if="dataForm.isFreeFee == 0">
-        <el-button type="primary"
-                   icon="el-icon-location-outline"
-                   @click="addTransfeeFree()">点击添加指定包邮条件</el-button>
-      </div>
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </el-dialog>
-</template>
-
-<script>
-import { Debounce } from '@/utils/debounce'
-import AddOrUpdate from './transcity-add-or-update'
-export default {
-  data () {
-    return {
-      hasFreeCondition: 0,
-      visible: false,
-      addOrUpdateVisible: false,
-      dataForm: {
-        hasFreeCondition: false,
-        transName: '',
-        createTime: '',
-        chargeType: 0,
-        transportId: 0,
-        isFreeFee: 0,
-        transfees: [{ cityList: [], status: 1 }],
-        transfeeFrees: [{ freeCityList: [], freeType: 0 }]
-      },
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      editVisible: false
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  watch: {
-    // 如果当前对话框不可见,则关闭选择城市的对话框
-    visible: function (val) {
-      if (!val) {
-        this.addOrUpdateVisible = false
-      }
-    }
-  },
-  computed: {
-    tableTitle () {
-      var titles = [['首件(个)', '运费(元)', '续件(个)', '续费(元)'], ['首重(kg)', '运费(元)', '续重(kg)', '续费(元)'], ['首体积(m³)', '运费(元)', '续体积(m³)', '续费(元)']]
-      if (this.dataForm.chargeType) {
-        return titles[this.dataForm.chargeType]
-      }
-      return titles[0]
-    }
-  },
-  methods: {
-    init (id) {
-      this.visible = true
-      this.dataForm.transportId = id || 0
-      this.$nextTick(() => {
-        this.$refs.dataForm.resetFields()
-        this.dataForm = {
-          hasFreeCondition: false,
-          transName: '',
-          createTime: '',
-          chargeType: 0,
-          transportId: 0,
-          isFreeFee: 0,
-          transfees: [{ cityList: [], status: 1 }],
-          transfeeFrees: [{ freeCityList: [], freeType: 0 }]
-        }
-      })
-      if (this.dataForm.transportId) {
-        this.$http({
-          // 获取运费模板数据
-          url: this.$http.adornUrl(`/shop/transport/info/${this.dataForm.transportId}`),
-          method: 'get'
-        }).then(({ data }) => {
-          if (data.isFreeFee) {
-            data.transfees[0].status = 0
-          } else {
-            data.transfees[0].status = 1
-          }
-          this.dataForm = data
-          this.dataForm.hasFreeCondition = !!data.hasFreeCondition
-        })
-      }
-    },
-    getDataList (row, cityList, type) {
-      if (type === 0) {
-        this.$set(this.dataForm.transfees[row], 'cityList', cityList)
-      }
-      if (type === 1) {
-        this.$set(this.dataForm.transfeeFrees[row], 'freeCityList', cityList)
-      }
-    },
-    // 添加运费项
-    addTransfee () {
-      this.editVisible = true
-      this.dataForm.transfees.push({ cityList: [], status: 1 })
-    },
-    // 删除运费项
-    deleteHandle (rowIndex) {
-      this.dataForm.transfees.splice(rowIndex, 1)
-    },
-    // 可配送区域和运费编辑
-    addOrUpdateHandle (rowIndex) {
-      this.addOrUpdateVisible = true
-      let allSelectCityList = []
-      for (let i = 1; i < this.dataForm.transfees.length; i++) {
-        const cityList = this.dataForm.transfees[i].cityList
-        allSelectCityList = allSelectCityList.concat(cityList)
-      }
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(rowIndex, this.dataForm.transfees[rowIndex].cityList || [], allSelectCityList, 0)
-      })
-    },
-    // 添加指定包邮条件
-    addTransfeeFree () {
-      if (this.dataForm.hasFreeCondition) {
-        this.dataForm.transfeeFrees.push({ freeCityList: [], freeType: 0 })
-      }
-    },
-    // 删除指定包邮条件
-    deleteTransfeeFree (rowIndex) {
-      this.dataForm.transfeeFrees.splice(rowIndex, 1)
-    },
-    // 指定包邮条件编辑
-    addOrUpdateTransfeeFree (rowIndex) {
-      this.addOrUpdateVisible = true
-      let allSelectCityList = []
-      for (let i = 1; i < this.dataForm.transfeeFrees.length; i++) {
-        const freeCityList = this.dataForm.transfeeFrees[i].freeCityList
-        allSelectCityList = allSelectCityList.concat(freeCityList)
-      }
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(rowIndex, this.dataForm.transfeeFrees[rowIndex].freeCityList || [], allSelectCityList, 1)
-      })
-    },
-    // 改变模板类型, 0 买家承担运费 1 卖家包邮
-    changeFreeFee (val) {
-      this.dataForm.hasFreeCondition = false
-      if (val) {
-        this.dataForm.chargeType = 0
-        this.dataForm.transfees = [{ cityList: [], status: 0, firstPiece: 1, firstFee: 0, continuousPiece: 1, continuousFee: 0 }]
-      } else {
-        this.dataForm.transfees = [{ cityList: [], status: 1 }]
-      }
-    },
-    /**
-     * 校验输入的数字
-     */
-    checkNumber (row, type) {
-      if (type === 1) {
-        row.firstPiece = this.getNumber(row.firstPiece)
-        row.firstPiece = row.firstPiece === 0 ? 1 : row.firstPiece
-      } else if (type === 3) {
-        row.continuousPiece = this.getNumber(row.continuousPiece)
-        row.continuousPiece = row.continuousPiece === 0 ? 1 : row.continuousPiece
-      }
-    },
-    /**
-     * 保留整数并小于零的数设为0
-     */
-    getNumber (num) {
-      num = Math.round(num)
-      return num < 0 ? 0 : num
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          for (let i = 1; i < this.dataForm.transfees.length; i++) {
-            const transfee = this.dataForm.transfees[i]
-            if (transfee.cityList.length === 0) {
-              this.$message({
-                message: '请选择可配送区域',
-                type: 'error',
-                duration: 1500
-              })
-              return
-            }
-          }
-          if (this.dataForm.hasFreeCondition) {
-            this.hasFreeCondition = 1
-          } else {
-            this.hasFreeCondition = 0
-          }
-          this.dataForm.transfees[0].cityList = []
-          this.$http({
-            url: this.$http.adornUrl(`/shop/transport`),
-            method: this.dataForm.transportId ? 'put' : 'post',
-            data: this.$http.adornData({
-              'transportId': this.dataForm.transportId || undefined,
-              'transName': this.dataForm.transName,
-              'chargeType': this.dataForm.chargeType,
-              'isFreeFee': this.dataForm.isFreeFee,
-              'transfees': this.dataForm.transfees,
-              'transfeeFrees': this.dataForm.transfeeFrees,
-              'hasFreeCondition': this.hasFreeCondition
-            })
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList', this.page)
-              }
-            })
-          })
-        }
-      })
-    })
-  }
-}
-</script>
-
-<style scoped>
-.transport-dialog .table-con .el-form-item {
-  margin-top: 16px;
-  margin-bottom: 16px!important;
-}
-</style>

+ 0 - 158
src/views/modules/shop/transport.vue

@@ -1,158 +0,0 @@
-<template>
-  <div class="mod-transport">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-      <template slot-scope="scope"
-                slot="prodPropValues">
-        <el-tag v-for="item in scope.row.prodPropValues"
-                :key="item.valueId">{{item.propValue}}
-        </el-tag>
-      </template>
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('shop:transport:save')"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   @click="deleteHandle()"
-                   v-if="isAuth('shop:transport:delete')"
-                   size="small"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('shop:transport:update')"
-                   @click.stop="addOrUpdateHandle(scope.row.transportId)">修改</el-button>
-
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   v-if="isAuth('shop:transport:delete')"
-                   @click.stop="deleteHandle(scope.row.transportId)">删除</el-button>
-      </template>
-    </avue-crud>
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/shop/transport'
-import AddOrUpdate from './transport-add-or-update'
-export default {
-  data () {
-    return {
-      dataForm: {
-        transName: ''
-      },
-      dataList: [],
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      tableOption: tableOption
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/shop/transport/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      var ids = id ? [id] : this.dataListSelections.map(item => { return item.transportId })
-      this.$confirm(
-        `确定进行[${id ? '删除' : '批量删除'}]操作?`,
-        '提示',
-        {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }
-      ).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/shop/transport'),
-          method: 'delete',
-          data: this.$http.adornData(ids, false)
-        }).then(({data}) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              // this.getDataList(this.page)
-              this.refreshChange()
-            }
-          })
-        })
-      }).catch((e) => {
-        console.log('e: ', e)
-      })
-    },
-
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 刷新回调用
-    refreshChange () {
-      this.page = this.$refs.crud.$refs.tablePage.defaultPage
-      this.getDataList(this.page)
-      this.dataListSelections = []
-      this.$refs.crud.selectClear()
-    },
-    // 多选变化
-    selectionChange (val) {
-      console.log('val: ', val)
-      this.dataListSelections = val
-    }
-  }
-}
-</script>

+ 0 - 126
src/views/modules/sys/area-add-or-update.vue

@@ -1,126 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.areaId ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="100px">
-      <el-form-item label="地区名称"
-                    prop="areaName">
-        <el-input v-model="dataForm.areaName" placeholder="请输入地区名称" maxlength="50" show-word-limit></el-input>
-      </el-form-item>
-      <el-form-item label="上级地区"
-                    prop="parentId">
-        <el-cascader expand-trigger="hover"
-                     :options="areaList"
-                     :props="categoryTreeProps"
-                     change-on-select
-                     filterable
-                     v-model="selectedOptions"
-                     @change="handleChange">
-        </el-cascader>
-      </el-form-item>
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false"
-                 size="mini">取消</el-button>
-      <el-button type="primary"
-                 @click="dataFormSubmit()"
-                 size="mini">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-import { treeDataTranslate } from '@/utils'
-import { Debounce } from '@/utils/debounce'
-export default {
-  data () {
-    return {
-      visible: false,
-      roleList: [],
-      dataForm: {
-        areaId: '',
-        areaName: null,
-        parentId: null,
-        level: null
-      },
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 20 // 每页显示多少条
-      },
-      dataRule: {
-        areaName: [
-          { required: true, message: '区域名称不能为空', trigger: 'blur' },
-          { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的区域名称', trigger: 'blur' }
-        ]
-      },
-      areaList: [],
-      categoryTreeProps: {
-        value: 'areaId',
-        label: 'areaName'
-      },
-      selectedOptions: []
-    }
-  },
-  methods: {
-    init (areaId) {
-      this.dataForm.areaId = areaId || 0
-      this.visible = true
-      this.selectedOptions = []
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        if (this.dataForm.areaId) {
-          this.$http({
-            url: this.$http.adornUrl('/admin/area/info/' + this.dataForm.areaId),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({ data }) => {
-            this.dataForm = data
-            this.selectedOptions.push(this.dataForm.parentId)
-            this.categoryTreeProps.areaId = this.dataForm.areaId
-            this.categoryTreeProps.areaName = this.dataForm.areaName
-          })
-        }
-
-        this.$http({
-          url: this.$http.adornUrl('/admin/area/list'),
-          method: 'get',
-          params: this.$http.adornParams()
-        }).then(({ data }) => {
-          this.areaList = treeDataTranslate(data, 'areaId', 'parentId')
-        })
-      })
-    },
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl('/admin/area'),
-            method: this.dataForm.areaId ? 'put' : 'post',
-            data: this.$http.adornData(this.dataForm)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList', this.page)
-              }
-            })
-          })
-        }
-      })
-    }),
-    handleChange (val) {
-      this.dataForm.parentId = val[val.length - 1]
-    }
-  }
-}
-</script>

+ 0 - 166
src/views/modules/sys/area.vue

@@ -1,166 +0,0 @@
-<template>
-  <div class="mod-sys-area">
-    <el-input v-model="areaName"
-              class="area-search-input"
-              placeholder="地区关键词">
-    </el-input>
-    <el-button type="primary"
-               size="mini"
-               class="area-add-btn"
-               @click="addOrUpdateHandle()">新增</el-button>
-
-    <el-tree :data="data"
-             node-key="areaId"
-             :filter-node-method="filterNode"
-             ref="tree2"
-             :props="props"
-             :expand-on-click-node="false">
-
-      <span class="custom-tree-node"
-            slot-scope="{ node, data }">
-        <span>{{ node.label }}</span>
-        <span>
-          <el-button type="text"
-                     icon="el-icon-edit"
-                     size="small"
-                     @click="() => update(node, data)">
-            修改
-          </el-button>
-          <el-button type="text"
-                     icon="el-icon-delete"
-                     size="small"
-                     @click="() => remove(node, data)">
-            删除
-          </el-button>
-        </span>
-      </span>
-    </el-tree>
-
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/sys/area'
-import AddOrUpdate from './area-add-or-update'
-import { treeDataTranslate } from '@/utils'
-export default {
-  data () {
-    return {
-      dataList: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      dataListLoading: false,
-      tableOption: tableOption,
-      addOrUpdateVisible: false,
-      areaName: '',
-      dataForm: {},
-      data: [],
-      params: {
-        areaName: null
-      },
-      props: {
-        id: 'areaId',
-        label: 'areaName',
-        children: 'children'
-      }
-    }
-  },
-  created () {
-    this.getDataList(this.page)
-  },
-  mounted () {
-  },
-  components: {
-    AddOrUpdate
-  },
-  watch: {
-    areaName (val) {
-      this.$refs.tree2.filter(val)
-    }
-  },
-  methods: {
-    getDataList (page, params, done) {
-      this.$http({
-        url: this.$http.adornUrl('/admin/area/list'),
-        method: 'get',
-        params: this.$http.adornParams(Object.assign({
-          current: page == null ? this.page.currentPage : page.currentPage,
-          size: page == null ? this.page.pageSize : page.pageSize
-        }, params))
-      }).then(({ data }) => {
-        let treeData = treeDataTranslate(data, 'areaId', 'parentId')
-        this.data = treeData
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-
-    // 删除
-    deleteHandle (areaId) {
-      this.$confirm('确定进行删除操作?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/admin/area/' + areaId),
-          method: 'delete',
-          data: this.$http.adornData({})
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList(this.page)
-            }
-          })
-        })
-      }).catch(() => { })
-    },
-    update (node, data) {
-      this.addOrUpdateHandle(data.areaId)
-    },
-
-    remove (node, data) {
-      this.deleteHandle(data.areaId)
-    },
-
-    filterNode (value, data) {
-      if (!value) return true
-      return data.areaName.indexOf(value) !== -1
-    }
-  }
-
-}
-</script>
-
-<style lang="scss" scoped>
-.mod-sys-area {
-  .custom-tree-node {
-    flex: 1;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    font-size: 14px;
-    padding-right: 8px;
-  }
-  .area-search-input {
-    width: 30%;
-  }
-  .area-add-btn {
-    float: right;
-  }
-}
-</style>

+ 0 - 97
src/views/modules/sys/config-add-or-update.vue

@@ -1,97 +0,0 @@
-<template>
-  <el-dialog
-    :title="!dataForm.id ? '新增' : '修改'"
-    :close-on-click-modal="false"
-    :visible.sync="visible">
-    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
-      <el-form-item label="参数名" prop="paramKey">
-        <el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
-      </el-form-item>
-      <el-form-item label="参数值" prop="paramValue">
-        <el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
-      </el-form-item>
-      <el-form-item label="备注" prop="remark">
-        <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
-      </el-form-item>
-    </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-import { Debounce } from '@/utils/debounce'
-
-export default {
-  data () {
-    return {
-      visible: false,
-      dataForm: {
-        id: 0,
-        paramKey: '',
-        paramValue: '',
-        remark: ''
-      },
-      dataRule: {
-        paramKey: [
-            { required: true, message: '参数名不能为空', trigger: 'blur' },
-            { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的参数名', trigger: 'blur' }
-        ],
-        paramValue: [
-            { required: true, message: '参数值不能为空', trigger: 'blur' },
-            { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的参数值', trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  methods: {
-    init (id) {
-      this.dataForm.id = id || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        if (this.dataForm.id) {
-          this.$http({
-            url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({data}) => {
-            this.dataForm.paramKey = data.paramKey
-            this.dataForm.paramValue = data.paramValue
-            this.dataForm.remark = data.remark
-          })
-        }
-      })
-    },
-      // 表单提交
-    dataFormSubmit: Debounce(function () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl(`/sys/config`),
-            method: this.dataForm.id ? 'put' : 'post',
-            data: this.$http.adornData({
-              'id': this.dataForm.id || undefined,
-              'paramKey': this.dataForm.paramKey,
-              'paramValue': this.dataForm.paramValue,
-              'remark': this.dataForm.remark
-            })
-          }).then(({data}) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList')
-              }
-            })
-          })
-        }
-      })
-    })
-  }
-}
-</script>

+ 0 - 130
src/views/modules/sys/config.vue

@@ -1,130 +0,0 @@
-<template>
-  <div class="mod-config">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   @click="deleteHandle()"
-                   size="small"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   @click.stop="addOrUpdateHandle(scope.row.id)">编辑</el-button>
-
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   @click.stop="deleteHandle(scope.row.id)">删除</el-button>
-      </template>
-    </avue-crud>
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/sys/config'
-import AddOrUpdate from './config-add-or-update'
-export default {
-  data () {
-    return {
-      dataList: [],
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      tableOption: tableOption,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      }
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/sys/config/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 多选变化
-    selectionChange (val) {
-      this.dataListSelections = val
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      var ids = id ? [id] : this.dataListSelections.map(item => {
-        return item.id
-      })
-      this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/sys/config'),
-          method: 'delete',
-          data: this.$http.adornData(ids, false)
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      }).catch(() => { })
-    }
-  }
-}
-</script>

+ 0 - 63
src/views/modules/sys/log.vue

@@ -1,63 +0,0 @@
-<template>
-  <div class="mod-log">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               @search-change="searchChange"
-               @on-load="getDataList">
-    </avue-crud>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/sys/log'
-export default {
-  data () {
-    return {
-      dataList: [],
-      dataListLoading: false,
-      selectionDataList: [],
-      tableOption: tableOption,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      }
-    }
-  },
-  created () {
-    this.getDataList()
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/sys/log/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    }
-  }
-}
-</script>

+ 0 - 231
src/views/modules/sys/menu-add-or-update.vue

@@ -1,231 +0,0 @@
-<template>
-  <el-dialog
-    :title="!dataForm.id ? '新增' : '修改'"
-    :close-on-click-modal="false"
-    :visible.sync="visible">
-    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
-      <el-form-item label="类型" prop="type">
-        <el-radio-group v-model="dataForm.type">
-          <el-radio v-for="(type, index) in dataForm.typeList" :label="index" :key="index">{{ type }}</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item :label="dataForm.typeList[dataForm.type] + '名称'" prop="name">
-        <el-input v-model="dataForm.name" :placeholder="dataForm.typeList[dataForm.type] + '名称'"></el-input>
-      </el-form-item>
-      <el-form-item label="上级菜单">
-        <el-cascader
-          expand-trigger="hover"
-          :options="menuList"
-          :props="menuListTreeProps"
-          change-on-select
-          v-model="selectedMenu"
-          @change="handleSelectMenuChange">
-        </el-cascader>
-      </el-form-item>
-      <el-form-item v-if="dataForm.type === 1" label="菜单路由" prop="url">
-        <el-input v-model="dataForm.url" placeholder="菜单路由"></el-input>
-      </el-form-item>
-      <el-form-item v-if="dataForm.type !== 0" label="授权标识" prop="perms">
-        <el-input v-model="dataForm.perms" placeholder="多个用逗号分隔, 如: user:list,user:create"></el-input>
-      </el-form-item>
-      <el-form-item v-if="dataForm.type !== 2" label="排序号" prop="orderNum">
-        <el-input-number v-model="dataForm.orderNum" controls-position="right" :min="0" label="排序号"></el-input-number>
-      </el-form-item>
-      <el-form-item v-if="dataForm.type !== 2" label="菜单图标" prop="icon">
-        <el-row>
-          <el-col :span="22">
-            <el-popover
-              ref="iconListPopover"
-              placement="bottom-start"
-              trigger="click"
-              popper-class="mod-menu__icon-popover">
-              <div class="mod-menu__icon-list">
-                <el-button
-                  v-for="(item, index) in iconList"
-                  :key="index"
-                  @click="iconActiveHandle(item)"
-                  :class="{ 'is-active': item === dataForm.icon }">
-                  <icon-svg :name="item"></icon-svg>
-                </el-button>
-              </div>
-            </el-popover>
-            <el-input v-model="dataForm.icon" v-popover:iconListPopover :readonly="true" placeholder="菜单图标名称" class="icon-list__input"></el-input>
-          </el-col>
-          <el-col :span="2" class="icon-list__tips">
-            <el-tooltip placement="top" effect="light">
-              <div slot="content">全站推荐使用SVG Sprite, 详细请参考:icons/index.js 描述</div>
-              <i class="el-icon-warning"></i>
-            </el-tooltip>
-          </el-col>
-        </el-row>
-      </el-form-item>
-    </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-  import { treeDataTranslate, idList } from '@/utils'
-  import Icon from '@/icons'
-  import { Debounce } from '@/utils/debounce'
-  export default {
-    data () {
-      var validateUrl = (rule, value, callback) => {
-        if (this.dataForm.type === 1 && !/\S/.test(value)) {
-          callback(new Error('菜单URL不能为空'))
-        } else {
-          callback()
-        }
-      }
-      return {
-        visible: false,
-        dataForm: {
-          id: 0,
-          type: 1,
-          typeList: ['目录', '菜单', '按钮'],
-          name: '',
-          parentId: 0,
-          url: '',
-          perms: '',
-          orderNum: 0,
-          icon: '',
-          iconList: []
-        },
-        dataRule: {
-          name: [
-            { required: true, message: '菜单名称不能为空', trigger: 'blur' },
-            { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的菜单名称', trigger: 'blur' }
-          ],
-          url: [
-            { validator: validateUrl, trigger: 'blur' }
-          ]
-        },
-        menuList: [],
-        selectedMenu: [],
-        menuListTreeProps: {
-          value: 'menuId',
-          label: 'name'
-        }
-      }
-    },
-    created () {
-      this.iconList = Icon.getNameList()
-    },
-    methods: {
-      init (id) {
-        this.dataForm.id = id || 0
-        this.$http({
-          url: this.$http.adornUrl('/sys/menu/list'),
-          method: 'get',
-          params: this.$http.adornParams()
-        }).then(({data}) => {
-          this.menuList = treeDataTranslate(data, 'menuId')
-        }).then(() => {
-          this.visible = true
-          this.$nextTick(() => {
-            this.$refs['dataForm'].resetFields()
-          })
-        }).then(() => {
-          if (this.dataForm.id) {
-            // 修改
-            this.$http({
-              url: this.$http.adornUrl(`/sys/menu/info/${this.dataForm.id}`),
-              method: 'get',
-              params: this.$http.adornParams()
-            }).then(({data}) => {
-              this.dataForm.id = data.menuId
-              this.dataForm.type = data.type
-              this.dataForm.name = data.name
-              this.dataForm.parentId = data.parentId
-              this.dataForm.url = data.url
-              this.dataForm.perms = data.perms
-              this.dataForm.orderNum = data.orderNum
-              this.dataForm.icon = data.icon
-              this.selectedMenu = idList(this.menuList, data.parentId, 'menuId', 'children').reverse()
-            })
-          } else {
-            this.selectedMenu = []
-          }
-        })
-      },
-      handleSelectMenuChange (val) {
-        this.dataForm.parentId = val[val.length - 1]
-      },
-      // 图标选中
-      iconActiveHandle (iconName) {
-        this.dataForm.icon = iconName
-      },
-      // 表单提交
-      dataFormSubmit: Debounce(function () {
-        this.$refs['dataForm'].validate((valid) => {
-          if (valid) {
-            this.$http({
-              url: this.$http.adornUrl(`/sys/menu`),
-              method: this.dataForm.id ? 'put' : 'post',
-              data: this.$http.adornData({
-                'menuId': this.dataForm.id || undefined,
-                'type': this.dataForm.type,
-                'name': this.dataForm.name,
-                'parentId': this.dataForm.parentId,
-                'url': this.dataForm.url,
-                'perms': this.dataForm.perms,
-                'orderNum': this.dataForm.orderNum,
-                'icon': this.dataForm.icon
-              })
-            }).then(({data}) => {
-              this.$message({
-                message: '操作成功',
-                type: 'success',
-                duration: 1500,
-                onClose: () => {
-                  this.visible = false
-                  this.$emit('refreshDataList')
-                }
-              })
-            })
-          }
-        })
-      })
-    }
-  }
-</script>
-
-<style lang="scss">
-
-  .mod-menu {
-    .menu-list__input,
-    .icon-list__input {
-       > .el-input__inner {
-        cursor: pointer;
-      }
-    }
-    &__icon-popover {
-      max-width: 420px;
-    }
-    &__icon-list {
-      max-height: 180px;
-      padding: 0;
-      margin: -8px 0 0 -8px;
-      > .el-button {
-        padding: 8px;
-        margin: 8px 0 0 8px;
-        > span {
-          display: inline-block;
-          vertical-align: middle;
-          width: 18px;
-          height: 18px;
-          font-size: 18px;
-        }
-      }
-    }
-    .icon-list__tips {
-      font-size: 18px;
-      text-align: center;
-      color: #e6a23c;
-      cursor: pointer;
-    }
-  }
-</style>

+ 0 - 151
src/views/modules/sys/menu.vue

@@ -1,151 +0,0 @@
-<template>
-  <div class="mod-menu">
-    <el-form :inline="true"
-             :model="dataForm">
-      <el-form-item>
-        <el-button v-if="isAuth('sys:menu:save')"
-                   type="primary"
-                   @click="addOrUpdateHandle()">新增</el-button>
-      </el-form-item>
-    </el-form>
-    <el-table :data="dataList"
-              border
-              style="width: 100%;"
-              row-key="menuId">
-      <el-table-column prop="name"
-                       header-align="center"
-                       treeKey="menuId"
-                       width="150"
-                       label="名称">
-      </el-table-column>
-      <el-table-column header-align="center"
-                       align="center"
-                       label="图标">
-        <template slot-scope="scope">
-          <icon-svg :name="scope.row.icon || ''"></icon-svg>
-        </template>
-      </el-table-column>
-      <el-table-column prop="type"
-                       header-align="center"
-                       align="center"
-                       label="类型">
-        <template slot-scope="scope">
-          <el-tag v-if="scope.row.type === 0"
-                  size="small">目录</el-tag>
-          <el-tag v-else-if="scope.row.type === 1"
-                  size="small"
-                  type="success">菜单</el-tag>
-          <el-tag v-else-if="scope.row.type === 2"
-                  size="small"
-                  type="info">按钮</el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column prop="orderNum"
-                       header-align="center"
-                       align="center"
-                       label="排序号">
-      </el-table-column>
-      <el-table-column prop="url"
-                       header-align="center"
-                       align="center"
-                       width="150"
-                       :show-overflow-tooltip="true"
-                       label="菜单URL">
-        <template slot-scope="scope">{{scope.row.url || '-'}}</template>
-      </el-table-column>
-      <el-table-column prop="perms"
-                       header-align="center"
-                       align="center"
-                       width="150"
-                       :show-overflow-tooltip="true"
-                       label="授权标识">
-        <template slot-scope="scope">{{scope.row.perms || '-'}}</template>
-      </el-table-column>
-      <el-table-column fixed="right"
-                       header-align="center"
-                       align="center"
-                       width="150"
-                       label="操作">
-        <template slot-scope="scope">
-          <el-button v-if="isAuth('sys:menu:update')"
-                     type="text"
-                     size="small"
-                     @click="addOrUpdateHandle(scope.row.menuId)">修改</el-button>
-          <el-button v-if="isAuth('sys:menu:delete')"
-                     type="text"
-                     size="small"
-                     @click="deleteHandle(scope.row.menuId)">删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import AddOrUpdate from './menu-add-or-update'
-import { treeDataTranslate } from '@/utils'
-export default {
-  data () {
-    return {
-      dataForm: {},
-      dataList: [],
-      dataListLoading: false,
-      addOrUpdateVisible: false
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  activated () {
-    this.getDataList()
-  },
-  methods: {
-    // 获取数据列表
-    getDataList () {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/sys/menu/table'),
-        method: 'get',
-        params: this.$http.adornParams()
-      }).then(({ data }) => {
-        this.dataList = treeDataTranslate(data, 'menuId')
-        this.dataListLoading = false
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      this.$confirm(`确定对[id=${id}]进行[删除]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl(`/sys/menu/${id}`),
-          method: 'delete',
-          data: this.$http.adornData()
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      })
-    }
-  }
-}
-</script>

+ 0 - 122
src/views/modules/sys/role-add-or-update.vue

@@ -1,122 +0,0 @@
-<template>
-  <el-dialog
-    :title="!dataForm.id ? '新增' : '修改'"
-    :close-on-click-modal="false"
-    :visible.sync="visible">
-    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
-      <el-form-item label="角色名称" prop="roleName">
-        <el-input v-model="dataForm.roleName" placeholder="角色名称"></el-input>
-      </el-form-item>
-      <el-form-item label="备注" prop="remark">
-        <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
-      </el-form-item>
-      <el-form-item size="mini" label="授权">
-        <el-tree
-          :data="menuList"
-          :props="menuListTreeProps"
-          node-key="menuId"
-          ref="menuListTree"
-          show-checkbox>
-        </el-tree>
-      </el-form-item>
-    </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-  import { treeDataTranslate } from '@/utils'
-  import { Debounce } from '@/utils/debounce'
-  export default {
-    data () {
-      return {
-        visible: false,
-        menuList: [],
-        menuListTreeProps: {
-          label: 'name',
-          children: 'children'
-        },
-        dataForm: {
-          id: 0,
-          roleName: '',
-          remark: ''
-        },
-        dataRule: {
-          roleName: [
-            { required: true, message: '角色名称不能为空', trigger: 'blur' },
-            { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的角色名称', trigger: 'blur' }
-          ],
-          remark: [
-            { required: false, pattern: /\s\S+|S+\s|\S/, message: '输入格式有误', trigger: 'blur' }
-          ]
-        },
-        tempKey: -666666 // 临时key, 用于解决tree半选中状态项不能传给后台接口问题. # 待优化
-      }
-    },
-    methods: {
-      init (id) {
-        this.dataForm.id = id || 0
-        this.$http({
-          url: this.$http.adornUrl('/sys/menu/table'),
-          method: 'get',
-          params: this.$http.adornParams()
-        }).then(({data}) => {
-          this.menuList = treeDataTranslate(data, 'menuId', 'parentId')
-        }).then(() => {
-          this.visible = true
-          this.$nextTick(() => {
-            this.$refs['dataForm'].resetFields()
-            this.$refs.menuListTree.setCheckedKeys([])
-          })
-        }).then(() => {
-          if (this.dataForm.id) {
-            this.$http({
-              url: this.$http.adornUrl(`/sys/role/info/${this.dataForm.id}`),
-              method: 'get',
-              params: this.$http.adornParams()
-            }).then(({data}) => {
-              this.dataForm.roleName = data.roleName
-              this.dataForm.remark = data.remark
-              var idx = data.menuIdList.indexOf(this.tempKey)
-              if (idx !== -1) {
-                data.menuIdList.splice(idx, data.menuIdList.length - idx)
-              }
-              console.log(data.menuIdList)
-              this.$refs.menuListTree.setCheckedKeys(data.menuIdList)
-            })
-          }
-        })
-      },
-      // 表单提交
-      dataFormSubmit: Debounce(function () {
-        this.$refs['dataForm'].validate((valid) => {
-          if (valid) {
-            this.$http({
-              url: this.$http.adornUrl(`/sys/role`),
-              method: this.dataForm.id ? 'put' : 'post',
-              data: this.$http.adornData({
-                'roleId': this.dataForm.id || undefined,
-                'roleName': this.dataForm.roleName,
-                'remark': this.dataForm.remark,
-                'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys())
-              })
-            }).then(({data}) => {
-              this.$message({
-                message: '操作成功',
-                type: 'success',
-                duration: 1500,
-                onClose: () => {
-                  this.visible = false
-                  this.$emit('refreshDataList')
-                }
-              })
-            })
-          }
-        })
-      })
-    }
-  }
-</script>

+ 0 - 135
src/views/modules/sys/role.vue

@@ -1,135 +0,0 @@
-<template>
-  <div class="mod-role">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('sys:role:save')"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   @click="deleteHandle()"
-                   v-if="isAuth('sys:role:delete')"
-                   size="small"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('sys:role:update')"
-                   @click.stop="addOrUpdateHandle(scope.row.roleId)">编辑</el-button>
-
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   v-if="isAuth('sys:role:delete')"
-                   @click.stop="deleteHandle(scope.row.roleId)">删除</el-button>
-      </template>
-    </avue-crud>
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/sys/role'
-import AddOrUpdate from './role-add-or-update'
-export default {
-  data () {
-    return {
-      dataList: [],
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      tableOption: tableOption,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      }
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/sys/role/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 多选变化
-    selectionChange (val) {
-      this.dataListSelections = val
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      var ids = id ? [id] : this.dataListSelections.map(item => {
-        return item.roleId
-      })
-      this.$confirm(`确定进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/sys/role'),
-          method: 'delete',
-          data: this.$http.adornData(ids, false)
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      }).catch(() => { })
-    }
-  }
-}
-</script>

+ 0 - 175
src/views/modules/sys/user-add-or-update.vue

@@ -1,175 +0,0 @@
-<template>
-  <el-dialog
-    :title="!dataForm.id ? '新增' : '修改'"
-    :close-on-click-modal="false"
-    :visible.sync="visible">
-    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
-      <el-form-item label="用户名" prop="userName">
-        <el-input v-model="dataForm.userName" placeholder="登录帐号"></el-input>
-      </el-form-item>
-      <el-form-item label="密码" prop="password" :class="{ 'is-required': !dataForm.id }">
-        <el-input v-model="dataForm.password" type="password" placeholder="密码"></el-input>
-      </el-form-item>
-      <el-form-item label="确认密码" prop="comfirmPassword" :class="{ 'is-required': !dataForm.id }">
-        <el-input v-model="dataForm.comfirmPassword" type="password" placeholder="确认密码"></el-input>
-      </el-form-item>
-      <el-form-item label="邮箱" prop="email">
-        <el-input v-model="dataForm.email" placeholder="邮箱"></el-input>
-      </el-form-item>
-      <el-form-item label="手机号" prop="mobile">
-        <el-input v-model="dataForm.mobile" maxlength="11" placeholder="手机号"></el-input>
-      </el-form-item>
-      <el-form-item label="角色" size="mini" prop="roleIdList">
-        <el-checkbox-group v-model="dataForm.roleIdList">
-          <el-checkbox v-for="role in roleList" :key="role.roleId" :label="role.roleId">{{ role.roleName }}</el-checkbox>
-        </el-checkbox-group>
-      </el-form-item>
-      <el-form-item label="状态" size="mini" prop="status">
-        <el-radio-group v-model="dataForm.status">
-          <el-radio :label="0">禁用</el-radio>
-          <el-radio :label="1">正常</el-radio>
-        </el-radio-group>
-      </el-form-item>
-    </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-  import { isEmail, isMobile } from '@/utils/validate'
-  import { Debounce } from '@/utils/debounce'
-  import { encrypt } from '@/utils/crypto'
-  export default {
-    data () {
-      var validatePassword = (rule, value, callback) => {
-        if (!this.dataForm.id && !/\S/.test(value)) {
-          callback(new Error('密码不能为空'))
-        } else {
-          callback()
-        }
-      }
-      var validateComfirmPassword = (rule, value, callback) => {
-        if (!this.dataForm.id && !/\S/.test(value)) {
-          this.dataForm.password = ''
-          callback(new Error('确认密码不能为空'))
-        } else if (this.dataForm.password !== value) {
-          callback(new Error('确认密码与密码输入不一致'))
-        } else {
-          callback()
-        }
-      }
-      var validateEmail = (rule, value, callback) => {
-        if (!isEmail(value)) {
-          callback(new Error('邮箱格式错误'))
-        } else {
-          callback()
-        }
-      }
-      var validateMobile = (rule, value, callback) => {
-        if (!isMobile(value)) {
-          callback(new Error('手机号格式错误'))
-        } else {
-          callback()
-        }
-      }
-      return {
-        visible: false,
-        roleList: [],
-        dataForm: {
-          id: 0,
-          userName: '',
-          password: '',
-          comfirmPassword: '',
-          email: '',
-          mobile: '',
-          roleIdList: [],
-          status: 1
-        },
-        dataRule: {
-          userName: [
-            { required: true, message: '用户名不能为空', trigger: 'blur' },
-            { pattern: /\s\S+|S+\s|\S/, message: '请输入正确的用户名', trigger: 'blur' }
-          ],
-          password: [
-            { validator: validatePassword, trigger: 'blur' }
-          ],
-          comfirmPassword: [
-            { validator: validateComfirmPassword, trigger: 'blur' }
-          ],
-          email: [
-            { required: true, message: '邮箱不能为空', trigger: 'blur' },
-            { validator: validateEmail, trigger: 'blur' }
-          ],
-          mobile: [
-            { required: true, message: '手机号不能为空', trigger: 'blur' },
-            { validator: validateMobile, trigger: 'blur' }
-          ]
-        }
-      }
-    },
-    methods: {
-      init (id) {
-        this.dataForm.id = id || 0
-        this.$http({
-          url: this.$http.adornUrl('/sys/role/list'),
-          method: 'get',
-          params: this.$http.adornParams()
-        }).then(({data}) => {
-          this.roleList = data
-        }).then(() => {
-          this.visible = true
-          this.$nextTick(() => {
-            this.$refs.dataForm.resetFields()
-          })
-        }).then(() => {
-          if (this.dataForm.id) {
-            this.$http({
-              url: this.$http.adornUrl(`/sys/user/info/${this.dataForm.id}`),
-              method: 'get',
-              params: this.$http.adornParams()
-            }).then(({data}) => {
-              this.dataForm.userName = data.username
-              this.dataForm.email = data.email
-              this.dataForm.mobile = data.mobile
-              this.dataForm.roleIdList = data.roleIdList
-              this.dataForm.status = data.status
-            })
-          }
-        })
-      },
-      // 表单提交
-      dataFormSubmit: Debounce(function () {
-        this.$refs['dataForm'].validate((valid) => {
-          if (valid) {
-            this.$http({
-              url: this.$http.adornUrl(`/sys/user`),
-              method: this.dataForm.id ? 'put' : 'post',
-              data: this.$http.adornData({
-                'userId': this.dataForm.id || undefined,
-                'username': this.dataForm.userName,
-                'password': encrypt(this.dataForm.password),
-                'email': this.dataForm.email,
-                'mobile': this.dataForm.mobile,
-                'status': this.dataForm.status,
-                'roleIdList': this.dataForm.roleIdList
-              })
-            }).then(({data}) => {
-              this.$message({
-                message: '操作成功',
-                type: 'success',
-                duration: 1500,
-                onClose: () => {
-                  this.visible = false
-                  this.$emit('refreshDataList')
-                }
-              })
-            })
-          }
-        })
-      })
-    }
-  }
-</script>

+ 0 - 134
src/views/modules/sys/user.vue

@@ -1,134 +0,0 @@
-<template>
-  <div class="mod-user">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :option="tableOption"
-               @search-change="searchChange"
-               @selection-change="selectionChange"
-               @on-load="getDataList">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('sys:user:save')"
-                   @click.stop="addOrUpdateHandle()">新增</el-button>
-
-        <el-button type="danger"
-                   @click="deleteHandle()"
-                   v-if="isAuth('sys:user:delete')"
-                   size="small"
-                   :disabled="dataListSelections.length <= 0">批量删除</el-button>
-      </template>
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('sys:user:update')"
-                   @click.stop="addOrUpdateHandle(scope.row.userId)">编辑</el-button>
-
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   v-if="isAuth('sys:user:delete')"
-                   @click.stop="deleteHandle(scope.row.userId)">删除</el-button>
-      </template>
-    </avue-crud>
-    <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="getDataList"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/sys/user'
-import AddOrUpdate from './user-add-or-update'
-export default {
-  data () {
-    return {
-      dataList: [],
-      dataListLoading: false,
-      dataListSelections: [],
-      addOrUpdateVisible: false,
-      tableOption: tableOption,
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      }
-    }
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    // 获取数据列表
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/sys/user/page'),
-        method: 'get',
-        params: this.$http.adornParams(
-          Object.assign(
-            {
-              current: page == null ? this.page.currentPage : page.currentPage,
-              size: page == null ? this.page.pageSize : page.pageSize
-            },
-            params
-          )
-        )
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 条件查询
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    },
-    // 多选变化
-    selectionChange (val) {
-      this.dataListSelections = val
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    // 删除
-    deleteHandle (id) {
-      var userIds = id ? [id] : this.dataListSelections.map(item => {
-        return item.userId
-      })
-      this.$confirm(`确定对[id=${userIds.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/sys/user'),
-          method: 'delete',
-          data: this.$http.adornData(userIds, false)
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList()
-            }
-          })
-        })
-      }).catch(() => { })
-    }
-  }
-}
-</script>

+ 0 - 225
src/views/modules/user/addr-add-or-update.vue

@@ -1,225 +0,0 @@
-<template>
-  <el-dialog :title="!dataForm.addrId ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="100px">
-      <el-form-item label="收货人姓名"
-                    prop="receiver">
-        <el-input v-model="dataForm.receiver"></el-input>
-      </el-form-item>
-      <el-form-item label="省份">
-        <el-col :span="8">
-          <el-form-item prop="province">
-            <el-select v-model="dataForm.provinceId"
-                       placeholder="请选择"
-                       @change="selectProvince">
-              <el-option v-for="province in provinceList"
-                         :key="province.areaId"
-                         :label="province.areaName"
-                         :value="province.areaId"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="city">
-            <el-select v-model="dataForm.cityId"
-                       placeholder="请选择"
-                       @change="selectCity">
-              <el-option v-for="city in cityList"
-                         :key="city.areaId"
-                         :label="city.areaName"
-                         :value="city.areaId"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="8">
-          <el-form-item prop="area">
-            <el-select v-model="dataForm.areaId"
-                       placeholder="请选择">
-              <el-option v-for="area in areaList"
-                         :key="area.areaId"
-                         :label="area.areaName"
-                         :value="area.areaId"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-      </el-form-item>
-      <el-form-item label="详细地址"
-                    prop="addr">
-        <el-input v-model="dataForm.addr"></el-input>
-      </el-form-item>
-      <el-form-item label="邮编"
-                    prop="postCode">
-        <el-input v-model="dataForm.postCode"></el-input>
-      </el-form-item>
-      <el-form-item label="手机"
-                    prop="mobile">
-        <el-input v-model="dataForm.mobile"></el-input>
-      </el-form-item>
-      <el-form-item label="状态"
-                    prop="status">
-        <el-radio-group v-model="dataForm.status"
-                        size="medium">
-          <el-radio :label="1">正常</el-radio>
-          <el-radio :label="0">禁用</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item label="默认地址"
-                    prop="commonAddr">
-        <el-radio-group v-model="dataForm.commonAddr"
-                        size="medium">
-          <el-radio :label="0">否</el-radio>
-          <el-radio :label="1">是</el-radio>
-        </el-radio-group>
-      </el-form-item>
-    </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </el-dialog>
-</template>
-
-<script>
-import { Debounce } from '@/utils/debounce'
-export default {
-  data () {
-    return {
-      visible: false,
-      roleList: [],
-      provinceList: [],
-      cityList: [],
-      areaList: [],
-      dataForm: {
-        addrId: null,
-        userId: null,
-        receiver: null,
-        provinceId: null,
-        province: null,
-        city: null,
-        cityId: null,
-        area: null,
-        areaId: null,
-        postCode: null,
-        addr: null,
-        mobile: null,
-        status: 1,
-        commonAddr: 0
-      },
-      dataRule: {
-      }
-    }
-  },
-  methods: {
-    init (addrId) {
-      this.dataForm.addrId = addrId || 0
-      this.visible = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        this.cityList = []
-        this.areaList = []
-        this.dataForm.provinceId = null
-        this.dataForm.cityId = null
-        this.dataForm.areaId = null
-        if (this.dataForm.addrId) {
-          this.$http({
-            url: this.$http.adornUrl(`/user/addr/info/${this.dataForm.addrId}`),
-            method: 'get',
-            params: this.$http.adornParams()
-          }).then(({ data }) => {
-            this.dataForm = data
-            this.dataForm.addr = data.addr
-            this.dataForm.addrName = data.addrName
-            this.dataForm.areaId = data.areaId
-            this.dataForm.cityId = data.cityId
-            this.dataForm.provinceId = data.provinceId
-            this.listAreaByParentId(data.provinceId).then(({ data }) => {
-              this.cityList = data
-            })
-            this.listAreaByParentId(data.cityId).then(({ data }) => {
-              this.areaList = data
-            })
-          })
-        }
-      })
-      this.listAreaByParentId().then(({ data }) => {
-        this.provinceList = data
-      })
-    },
-    listAreaByParentId (pid) {
-      if (!pid) pid = 0
-      return this.$http({
-        url: this.$http.adornUrl(`/admin/area/listByPid`),
-        method: 'get',
-        params: this.$http.adornParams({ pid })
-      })
-    },
-    // 选择省
-    selectProvince (val) {
-      this.dataForm.cityId = null
-      this.dataForm.city = ''
-      // 获取城市的select
-      this.listAreaByParentId(val).then(({ data }) => {
-        this.cityList = data
-      })
-    },
-    // 选择市
-    selectCity (val) {
-      this.dataForm.areaId = null
-      this.dataForm.area = ''
-      // 获取区的select
-      this.listAreaByParentId(val).then(({ data }) => {
-        this.areaList = data
-      })
-    },
-
-    // 表单提交
-    dataFormSubmit: Debounce(function () {
-      for (let i = 0; i < this.provinceList.length; i++) {
-        if (this.provinceList[i].areaId === this.dataForm.provinceId) {
-          // 将省名字保存起来
-          this.dataForm.province = this.provinceList[i].areaName
-        }
-      }
-      for (let i = 0; i < this.cityList.length; i++) {
-        if (this.cityList[i].areaId === this.dataForm.cityId) {
-          // 将市名字保存起来
-          this.dataForm.city = this.cityList[i].areaName
-        }
-      }
-      for (let i = 0; i < this.areaList.length; i++) {
-        if (this.areaList[i].areaId === this.dataForm.areaId) {
-          // 将市名字保存起来
-          this.dataForm.area = this.areaList[i].areaName
-        }
-      }
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.$http({
-            url: this.$http.adornUrl('/user/addr'),
-            method: this.dataForm.addrId ? 'put' : 'post',
-            data: this.$http.adornData(this.dataForm)
-          }).then(({ data }) => {
-            this.$message({
-              message: '操作成功',
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$refs['dataForm'].resetFields()
-                this.$emit('refreshDataList')
-              }
-            })
-          })
-        }
-      })
-    })
-  }
-}
-</script>

+ 0 - 128
src/views/modules/user/addr.vue

@@ -1,128 +0,0 @@
-<template>
-  <div class="mod-user-userAddr">
-    <avue-crud ref="crud"
-               :page="page"
-               :data="dataList"
-               :table-loading="dataListLoading"
-               :option="tableOption"
-               @search-change="searchChange"
-               @on-load="getDataList"
-               @refresh-change="refreshChange"
-               @row-del="rowDel">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   v-if="isAuth('user:addr:save')"
-                   @click="addOrUpdateHandle()">新增</el-button>
-      </template>
-      <template slot-scope="scope"
-                slot="menu">
-        <el-button type="primary"
-                   icon="el-icon-edit"
-                   size="small"
-                   v-if="isAuth('user:addr:update')"
-                   @click="addOrUpdateHandle(scope.row.addrId)">修改</el-button>
-        <el-button type="danger"
-                   icon="el-icon-delete"
-                   size="small"
-                   v-if="isAuth('user:addr:delete')"
-                   @click="rowDel(scope.row,scope.$index)">删除</el-button>
-      </template>
-    </avue-crud>
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="refreshChange"></add-or-update>
-  </div>
-</template>
-
-<script>
-import { tableOption } from '@/crud/user/addr'
-import AddOrUpdate from './addr-add-or-update'
-export default {
-  data () {
-    return {
-      dataList: [],
-      page: {
-        total: 0, // 总页数
-        currentPage: 1, // 当前页数
-        pageSize: 10 // 每页显示多少条
-      },
-      dataListLoading: false,
-      tableOption: tableOption,
-      permission: {
-        delBtn: this.isAuth('user:userAddr:delete')
-      },
-      addOrUpdateVisible: false
-    }
-  },
-  created () {
-  },
-  mounted () {
-  },
-  components: {
-    AddOrUpdate
-  },
-  methods: {
-    getDataList (page, params, done) {
-      this.dataListLoading = true
-      this.$http({
-        url: this.$http.adornUrl('/user/addr/page'),
-        method: 'get',
-        params: this.$http.adornParams(Object.assign({
-          current: page == null ? this.page.currentPage : page.currentPage,
-          size: page == null ? this.page.pageSize : page.pageSize
-        }, params))
-      }).then(({ data }) => {
-        this.dataList = data.records
-        this.page.total = data.total
-        this.dataListLoading = false
-        if (done) {
-          done()
-        }
-      })
-    },
-    // 新增 / 修改
-    addOrUpdateHandle (id) {
-      this.addOrUpdateVisible = true
-      this.$nextTick(() => {
-        this.$refs.addOrUpdate.init(id)
-      })
-    },
-    rowDel (row, index) {
-      this.$confirm('确定进行删除操作?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$http({
-          url: this.$http.adornUrl('/user/addr/' + row.addrId),
-          method: 'delete',
-          data: this.$http.adornData({})
-        }).then(({ data }) => {
-          this.$message({
-            message: '操作成功',
-            type: 'success',
-            duration: 1500,
-            onClose: () => {
-              this.getDataList(this.page)
-            }
-          })
-        })
-      }).catch(() => { })
-    },
-    /**
-     * 刷新回调
-     */
-    refreshChange () {
-      this.getDataList(this.page)
-    },
-    searchChange (params, done) {
-      this.getDataList(this.page, params, done)
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-</style>