Explorar o código

微信支付调试完成

wangtao %!s(int64=3) %!d(string=hai) anos
pai
achega
af10c1e932
Modificáronse 59 ficheiros con 2982 adicións e 1501 borrados
  1. 2 2
      .env.development
  2. 1 1
      .env.production
  3. 1 1
      .env.staging
  4. 4 2
      package.json
  5. BIN=BIN
      public/favicon.ico
  6. 201 198
      public/index.html
  7. 46 46
      src/api/monitor/job.js
  8. 18 18
      src/api/monitor/jobLog.js
  9. 9 0
      src/api/recharge/department.js
  10. 1 3
      src/api/recharge/detailed.js
  11. 19 0
      src/api/recharge/fileExport.js
  12. 0 1
      src/api/recharge/index.js
  13. 16 0
      src/api/recharge/personnel.js
  14. 8 0
      src/api/recharge/radio.js
  15. 1 1
      src/api/recharge/reportForm.js
  16. 8 0
      src/api/recharge/userRecharge.js
  17. 44 1
      src/api/system/product.js
  18. BIN=BIN
      src/assets/images/bg.png
  19. BIN=BIN
      src/assets/logo/logo-b.png
  20. BIN=BIN
      src/assets/logo/logo.png
  21. 1 1
      src/components/Breadcrumb/index.vue
  22. 2 2
      src/layout/components/Sidebar/Logo.vue
  23. 3 3
      src/layout/components/Sidebar/SidebarItem.vue
  24. 2 2
      src/main.js
  25. 35 23
      src/router/index.js
  26. 1 1
      src/settings.js
  27. 16 16
      src/store/getters.js
  28. 43 43
      src/store/modules/app.js
  29. 91 91
      src/store/modules/permission.js
  30. 163 163
      src/store/modules/tagsView.js
  31. 1 1
      src/store/modules/user.js
  32. 16 6
      src/utils/request.js
  33. 319 0
      src/utils/validate2.js
  34. 117 113
      src/views/index.vue
  35. 0 98
      src/views/index_v1.vue
  36. 7 8
      src/views/login.vue
  37. 534 0
      src/views/monitor/jobTaskIndex/index.vue
  38. 328 0
      src/views/monitor/jobTaskLog/log.vue
  39. 4 4
      src/views/monitor/logininfor/index.vue
  40. 5 5
      src/views/monitor/operlog/index.vue
  41. 0 1
      src/views/recharge/admin/index.vue
  42. 1 4
      src/views/recharge/channel/index.vue
  43. 25 210
      src/views/recharge/department/index.vue
  44. 62 18
      src/views/recharge/detailed/index.vue
  45. 249 0
      src/views/recharge/fileExport/index.vue
  46. 160 178
      src/views/recharge/personnel/index.vue
  47. 20 22
      src/views/recharge/qrCode/index.vue
  48. 9 12
      src/views/recharge/radio/index.vue
  49. 27 20
      src/views/recharge/reportForm/index.vue
  50. 138 26
      src/views/recharge/userRecharge/index.vue
  51. 1 1
      src/views/register.vue
  52. 3 5
      src/views/system/dept/index.vue
  53. 2 3
      src/views/system/menu/index.vue
  54. 162 125
      src/views/system/product/index.vue
  55. 11 3
      src/views/system/role/index.vue
  56. 26 7
      src/views/system/user/index.vue
  57. 6 6
      src/views/system/user/profile/index.vue
  58. 7 1
      src/views/system/user/profile/userAvatar.vue
  59. 6 5
      vue.config.js

+ 2 - 2
.env.development

@@ -1,10 +1,10 @@
 # 页面标题
-VUE_APP_TITLE = 一卡通管理系统
+VUE_APP_TITLE = 东信充值管理系统
 
 # 开发环境配置
 ENV = 'development'
 
-# 一卡通管理系统/开发环境
+# 东信充值管理系统/开发环境
 VUE_APP_BASE_API = '/dev-api'
 
 # 路由懒加载

+ 1 - 1
.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 一卡通管理系统
+VUE_APP_TITLE = 东信充值管理系统
 
 # 生产环境配置
 ENV = 'production'

+ 1 - 1
.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 一卡通管理系统
+VUE_APP_TITLE = 东信充值管理系统
 
 NODE_ENV = production
 

+ 4 - 2
package.json

@@ -1,7 +1,7 @@
 {
     "name": "dongxin",
     "version": "3.6.0",
-    "description": "一卡通管理系统",
+    "description": "东信充值管理系统",
     "author": "dongxin",
     "license": "MIT",
     "scripts": {
@@ -49,6 +49,8 @@
         "js-cookie": "2.2.1",
         "jsencrypt": "3.0.0-rc.1",
         "nprogress": "0.2.0",
+        "qrcode": "^1.5.0",
+        "qrcodejs2": "0.0.2",
         "quill": "1.3.7",
         "screenfull": "5.0.2",
         "sortablejs": "1.10.2",
@@ -85,4 +87,4 @@
         "> 1%",
         "last 2 versions"
     ]
-}
+}

BIN=BIN
public/favicon.ico


+ 201 - 198
public/index.html

@@ -1,208 +1,211 @@
 <!DOCTYPE html>
 <html>
-  <head>
+
+<head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="renderer" content="webkit">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title><%= webpackConfig.name %></title>
+    <title>
+        <%= webpackConfig.name %>
+    </title>
     <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
-	  <style>
-    html,
-    body,
-    #app {
-      height: 100%;
-      margin: 0px;
-      padding: 0px;
-    }
-    .chromeframe {
-      margin: 0.2em 0;
-      background: #ccc;
-      color: #000;
-      padding: 0.2em 0;
-    }
-
-    #loader-wrapper {
-      position: fixed;
-      top: 0;
-      left: 0;
-      width: 100%;
-      height: 100%;
-      z-index: 999999;
-    }
-
-    #loader {
-      display: block;
-      position: relative;
-      left: 50%;
-      top: 50%;
-      width: 150px;
-      height: 150px;
-      margin: -75px 0 0 -75px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      border-top-color: #FFF;
-      -webkit-animation: spin 2s linear infinite;
-      -ms-animation: spin 2s linear infinite;
-      -moz-animation: spin 2s linear infinite;
-      -o-animation: spin 2s linear infinite;
-      animation: spin 2s linear infinite;
-      z-index: 1001;
-    }
-
-    #loader:before {
-      content: "";
-      position: absolute;
-      top: 5px;
-      left: 5px;
-      right: 5px;
-      bottom: 5px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      border-top-color: #FFF;
-      -webkit-animation: spin 3s linear infinite;
-      -moz-animation: spin 3s linear infinite;
-      -o-animation: spin 3s linear infinite;
-      -ms-animation: spin 3s linear infinite;
-      animation: spin 3s linear infinite;
-    }
-
-    #loader:after {
-      content: "";
-      position: absolute;
-      top: 15px;
-      left: 15px;
-      right: 15px;
-      bottom: 15px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      border-top-color: #FFF;
-      -moz-animation: spin 1.5s linear infinite;
-      -o-animation: spin 1.5s linear infinite;
-      -ms-animation: spin 1.5s linear infinite;
-      -webkit-animation: spin 1.5s linear infinite;
-      animation: spin 1.5s linear infinite;
-    }
-
-
-    @-webkit-keyframes spin {
-      0% {
-        -webkit-transform: rotate(0deg);
-        -ms-transform: rotate(0deg);
-        transform: rotate(0deg);
-      }
-      100% {
-        -webkit-transform: rotate(360deg);
-        -ms-transform: rotate(360deg);
-        transform: rotate(360deg);
-      }
-    }
-
-    @keyframes spin {
-      0% {
-        -webkit-transform: rotate(0deg);
-        -ms-transform: rotate(0deg);
-        transform: rotate(0deg);
-      }
-      100% {
-        -webkit-transform: rotate(360deg);
-        -ms-transform: rotate(360deg);
-        transform: rotate(360deg);
-      }
-    }
-
-
-    #loader-wrapper .loader-section {
-      position: fixed;
-      top: 0;
-      width: 51%;
-      height: 100%;
-      background: #7171C6;
-      z-index: 1000;
-      -webkit-transform: translateX(0);
-      -ms-transform: translateX(0);
-      transform: translateX(0);
-    }
-
-    #loader-wrapper .loader-section.section-left {
-      left: 0;
-    }
-
-    #loader-wrapper .loader-section.section-right {
-      right: 0;
-    }
-
-
-    .loaded #loader-wrapper .loader-section.section-left {
-      -webkit-transform: translateX(-100%);
-      -ms-transform: translateX(-100%);
-      transform: translateX(-100%);
-      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-    }
-
-    .loaded #loader-wrapper .loader-section.section-right {
-      -webkit-transform: translateX(100%);
-      -ms-transform: translateX(100%);
-      transform: translateX(100%);
-      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-    }
-
-    .loaded #loader {
-      opacity: 0;
-      -webkit-transition: all 0.3s ease-out;
-      transition: all 0.3s ease-out;
-    }
-
-    .loaded #loader-wrapper {
-      visibility: hidden;
-      -webkit-transform: translateY(-100%);
-      -ms-transform: translateY(-100%);
-      transform: translateY(-100%);
-      -webkit-transition: all 0.3s 1s ease-out;
-      transition: all 0.3s 1s ease-out;
-    }
-
-    .no-js #loader-wrapper {
-      display: none;
-    }
-
-    .no-js h1 {
-      color: #222222;
-    }
-
-    #loader-wrapper .load_title {
-      font-family: 'Open Sans';
-      color: #FFF;
-      font-size: 19px;
-      width: 100%;
-      text-align: center;
-      z-index: 9999999999999;
-      position: absolute;
-      top: 60%;
-      opacity: 1;
-      line-height: 30px;
-    }
-
-    #loader-wrapper .load_title span {
-      font-weight: normal;
-      font-style: italic;
-      font-size: 13px;
-      color: #FFF;
-      opacity: 0.5;
-    }
-  </style>
-  </head>
-  <body>
+    <style>
+        html,
+        body,
+        #app {
+            height: 100%;
+            margin: 0px;
+            padding: 0px;
+        }
+        
+        .chromeframe {
+            margin: 0.2em 0;
+            background: #ccc;
+            color: #000;
+            padding: 0.2em 0;
+        }
+        
+        #loader-wrapper {
+            position: fixed;
+            top: 0;
+            left: 0;
+            width: 100%;
+            height: 100%;
+            z-index: 999999;
+        }
+        
+        #loader {
+            display: block;
+            position: relative;
+            left: 50%;
+            top: 50%;
+            width: 150px;
+            height: 150px;
+            margin: -75px 0 0 -75px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 2s linear infinite;
+            -ms-animation: spin 2s linear infinite;
+            -moz-animation: spin 2s linear infinite;
+            -o-animation: spin 2s linear infinite;
+            animation: spin 2s linear infinite;
+            z-index: 1001;
+        }
+        
+        #loader:before {
+            content: "";
+            position: absolute;
+            top: 5px;
+            left: 5px;
+            right: 5px;
+            bottom: 5px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -webkit-animation: spin 3s linear infinite;
+            -moz-animation: spin 3s linear infinite;
+            -o-animation: spin 3s linear infinite;
+            -ms-animation: spin 3s linear infinite;
+            animation: spin 3s linear infinite;
+        }
+        
+        #loader:after {
+            content: "";
+            position: absolute;
+            top: 15px;
+            left: 15px;
+            right: 15px;
+            bottom: 15px;
+            border-radius: 50%;
+            border: 3px solid transparent;
+            border-top-color: #FFF;
+            -moz-animation: spin 1.5s linear infinite;
+            -o-animation: spin 1.5s linear infinite;
+            -ms-animation: spin 1.5s linear infinite;
+            -webkit-animation: spin 1.5s linear infinite;
+            animation: spin 1.5s linear infinite;
+        }
+        
+        @-webkit-keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        @keyframes spin {
+            0% {
+                -webkit-transform: rotate(0deg);
+                -ms-transform: rotate(0deg);
+                transform: rotate(0deg);
+            }
+            100% {
+                -webkit-transform: rotate(360deg);
+                -ms-transform: rotate(360deg);
+                transform: rotate(360deg);
+            }
+        }
+        
+        #loader-wrapper .loader-section {
+            position: fixed;
+            top: 0;
+            width: 51%;
+            height: 100%;
+            background: #7171C6;
+            z-index: 1000;
+            -webkit-transform: translateX(0);
+            -ms-transform: translateX(0);
+            transform: translateX(0);
+        }
+        
+        #loader-wrapper .loader-section.section-left {
+            left: 0;
+        }
+        
+        #loader-wrapper .loader-section.section-right {
+            right: 0;
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-left {
+            -webkit-transform: translateX(-100%);
+            -ms-transform: translateX(-100%);
+            transform: translateX(-100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader-wrapper .loader-section.section-right {
+            -webkit-transform: translateX(100%);
+            -ms-transform: translateX(100%);
+            transform: translateX(100%);
+            -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+            transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
+        }
+        
+        .loaded #loader {
+            opacity: 0;
+            -webkit-transition: all 0.3s ease-out;
+            transition: all 0.3s ease-out;
+        }
+        
+        .loaded #loader-wrapper {
+            visibility: hidden;
+            -webkit-transform: translateY(-100%);
+            -ms-transform: translateY(-100%);
+            transform: translateY(-100%);
+            -webkit-transition: all 0.3s 1s ease-out;
+            transition: all 0.3s 1s ease-out;
+        }
+        
+        .no-js #loader-wrapper {
+            display: none;
+        }
+        
+        .no-js h1 {
+            color: #222222;
+        }
+        
+        #loader-wrapper .load_title {
+            font-family: 'Open Sans';
+            color: #FFF;
+            font-size: 19px;
+            width: 100%;
+            text-align: center;
+            z-index: 9999999999999;
+            position: absolute;
+            top: 60%;
+            opacity: 1;
+            line-height: 30px;
+        }
+        
+        #loader-wrapper .load_title span {
+            font-weight: normal;
+            font-style: italic;
+            font-size: 13px;
+            color: #FFF;
+            opacity: 0.5;
+        }
+    </style>
+</head>
+
+<body>
     <div id="app">
-	    <div id="loader-wrapper">
-		    <div id="loader"></div>
-		    <div class="loader-section section-left"></div>
-		    <div class="loader-section section-right"></div>
-		    <div class="load_title">正在加载系统资源,请耐心等待</div>
+        <div id="loader-wrapper">
+            <div id="loader"></div>
+            <div class="loader-section section-left"></div>
+            <div class="loader-section section-right"></div>
+            <div class="load_title">正在加载系统资源,请耐心等待</div>
         </div>
-	</div>
-  </body>
-</html>
+    </div>
+</body>
+
+</html>

+ 46 - 46
src/api/monitor/job.js

@@ -2,79 +2,79 @@ import request from '@/utils/request'
 
 // 查询定时任务调度列表
 export function listJob(query) {
-  return request({
-    url: '/monitor/job/list',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/monitor/job/list',
+        method: 'get',
+        params: query
+    })
 }
 
 // 查询定时任务调度详细
 export function getJob(jobId) {
-  return request({
-    url: '/monitor/job/' + jobId,
-    method: 'get'
-  })
+    return request({
+        url: '/monitor/job/' + jobId,
+        method: 'get'
+    })
 }
 
 // 新增定时任务调度
 export function addJob(data) {
-  return request({
-    url: '/monitor/job',
-    method: 'post',
-    data: data
-  })
+    return request({
+        url: '/monitor/job',
+        method: 'post',
+        data: data
+    })
 }
 
 // 修改定时任务调度
 export function updateJob(data) {
-  return request({
-    url: '/monitor/job',
-    method: 'put',
-    data: data
-  })
+    return request({
+        url: '/monitor/job',
+        method: 'put',
+        data: data
+    })
 }
 
 // 删除定时任务调度
 export function delJob(jobId) {
-  return request({
-    url: '/monitor/job/' + jobId,
-    method: 'delete'
-  })
+    return request({
+        url: '/monitor/job/' + jobId,
+        method: 'delete'
+    })
 }
 
 // 导出定时任务调度
 export function exportJob(query) {
-  return request({
-    url: '/monitor/job/export',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/monitor/job/export',
+        method: 'get',
+        params: query
+    })
 }
 
 // 任务状态修改
 export function changeJobStatus(jobId, status) {
-  const data = {
-    jobId,
-    status
-  }
-  return request({
-    url: '/monitor/job/changeStatus',
-    method: 'put',
-    data: data
-  })
+    const data = {
+        jobId,
+        status
+    }
+    return request({
+        url: '/monitor/job/changeStatus',
+        method: 'put',
+        data: data
+    })
 }
 
 
 // 定时任务立即执行一次
 export function runJob(jobId, jobGroup) {
-  const data = {
-    jobId,
-    jobGroup
-  }
-  return request({
-    url: '/monitor/job/run',
-    method: 'put',
-    data: data
-  })
+    const data = {
+        jobId,
+        jobGroup
+    }
+    return request({
+        url: '/monitor/job/run',
+        method: 'put',
+        data: data
+    })
 }

+ 18 - 18
src/api/monitor/jobLog.js

@@ -2,34 +2,34 @@ import request from '@/utils/request'
 
 // 查询调度日志列表
 export function listJobLog(query) {
-  return request({
-    url: '/monitor/jobLog/list',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/monitor/jobLog/list',
+        method: 'get',
+        params: query
+    })
 }
 
 // 删除调度日志
 export function delJobLog(jobLogId) {
-  return request({
-    url: '/monitor/jobLog/' + jobLogId,
-    method: 'delete'
-  })
+    return request({
+        url: '/monitor/jobLog/' + jobLogId,
+        method: 'delete'
+    })
 }
 
 // 清空调度日志
 export function cleanJobLog() {
-  return request({
-    url: '/monitor/jobLog/clean',
-    method: 'delete'
-  })
+    return request({
+        url: '/monitor/jobLog/clean',
+        method: 'delete'
+    })
 }
 
 // 导出调度日志
 export function exportJobLog(query) {
-  return request({
-    url: '/monitor/jobLog/export',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/monitor/jobLog/export',
+        method: 'get',
+        params: query
+    })
 }

+ 9 - 0
src/api/recharge/department.js

@@ -30,4 +30,13 @@ export function listChannel(data) {
         method: 'post',
         data: data
     })
+}
+
+// 同步部门信息
+export function deptJob(data) {
+    return request({
+        url: '/dxtop/smjob/deptJob',
+        method: 'post',
+        data: data
+    })
 }

+ 1 - 3
src/api/recharge/detailed.js

@@ -10,7 +10,6 @@ export function listDetal(data) {
 }
 // 修改
 export function updataChannel(data) {
-  console.log(data)
     return request({
         url: '/dxtop/order',
         method: 'put',
@@ -23,6 +22,5 @@ export function exportDetail(data) {
         url: '/dxtop/order/exportDetail',
         method: 'post',
         data: data,
-        responseType: 'blob'
     })
-}
+}

+ 19 - 0
src/api/recharge/fileExport.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 查询
+export function filelist(data) {
+    return request({
+        url: '/async',
+        method: 'get',
+        params: data
+    })
+}
+// 导出
+export function exportReport(data) {
+    return request({
+        url: '/sysFile/async1',
+        method: 'get',
+        params: data,
+        // responseType: 'blob'
+    })
+}

+ 0 - 1
src/api/recharge/index.js

@@ -47,7 +47,6 @@ export function collectApi(data) {
 
 // 充值数据统计
 export function dateCollectApi(data) {
-    console.log(data)
     return request({
         url: '/dxtop/order/dateCollect',
         method: 'get',

+ 16 - 0
src/api/recharge/personnel.js

@@ -30,4 +30,20 @@ export function listChannel(data) {
         method: 'post',
         data: data
     })
+}
+// 同步人员信息
+export function personJob(data) {
+    return request({
+        url: '/dxtop/smjob/personJob',
+        method: 'post',
+        data: data
+    })
+}
+// 批量处理充值到账比例
+export function staff(data) {
+    return request({
+        url: '/dxtop/staff/',
+        method: 'post',
+        data: data
+    })
 }

+ 8 - 0
src/api/recharge/radio.js

@@ -38,4 +38,12 @@ export function listRadio(query) {
         method: 'get',
         params: query
     })
+}
+// 查询所有到账比例
+export function allRadio(query) {
+    return request({
+        url: '/dxtop/topRadio/all',
+        method: 'get',
+        params: query
+    })
 }

+ 1 - 1
src/api/recharge/reportForm.js

@@ -14,6 +14,6 @@ export function exportReport(data) {
         url: '/dxtop/order/reportExport',
         method: 'get',
         params: data,
-        responseType: 'blob'
+        // responseType: 'blob'
     })
 }

+ 8 - 0
src/api/recharge/userRecharge.js

@@ -15,4 +15,12 @@ export function scanPayQr(data) {
         method: 'post',
         data: data
     })
+}
+// 扫描二维码接口获取url
+export function topScanPayApi(data) {
+    return request({
+        url: '/dxtop/order/backPayPath',
+        method: 'post',
+        data: data
+    })
 }

+ 44 - 1
src/api/system/product.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 新增
 export function addChannel(data) {
     return request({
-        url: '/dxtop/company ',
+        url: '/dxtop/company',
         method: 'post',
         data: data
     })
@@ -30,4 +30,47 @@ export function listChannel(query) {
         method: 'get',
         params: query
     })
+}
+
+//图片上传获取四步曲
+// 获取上传图片批次id
+export function fileId(query) { // batchNo(文件批次id)
+    return request({
+        url: '/sysFile/generateBatchNo',
+        method: 'get',
+        params: query
+    })
+}
+// 上传图片
+export function uploadFileApi(a, b, c) { // batchNo(文件批次id)、businessType(文件应用场景)、uploadType(file / url )
+    return request({
+        url: '/sysFile' + "?batchNo=" + a + "&businessType=" + b + "&uploadType=file",
+        method: 'post',
+        data: c
+    })
+}
+// 图片生效
+export function fileTakeEffect(batchNo, ids) { // batchNo(文件批次id)
+    return request({
+        url: '/sysFile/active?batchNo=' + batchNo,
+        method: 'post',
+        data: ids
+    })
+}
+// 获取图片url 单张
+export function getFile(data) {
+    return request({
+        url: '/sysFile/getFile',
+        method: 'post',
+        data: data
+    })
+}
+
+// 获取图片url 多张
+export function getFileArray(data) {
+    return request({
+        url: '/sysFile/files',
+        method: 'post',
+        data: data
+    })
 }

BIN=BIN
src/assets/images/bg.png


BIN=BIN
src/assets/logo/logo-b.png


BIN=BIN
src/assets/logo/logo.png


+ 1 - 1
src/components/Breadcrumb/index.vue

@@ -35,7 +35,7 @@ export default {
       const first = matched[0]
 
       if (!this.isDashboard(first)) {
-        matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
+        matched = [{ path: '/index',}].concat(matched)
       }
 
       this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)

+ 2 - 2
src/layout/components/Sidebar/Logo.vue

@@ -52,7 +52,7 @@ export default {
   },
   data() {
     return {
-      title: "一卡通管理系统",
+      title: "东信充值管理系统",
       logo: logoImg,
     };
   },
@@ -107,7 +107,7 @@ export default {
     .sidebar-logo {
       margin-right: 0px;
       width: 40px;
-      height: 20px;
+      height: 15px;
     }
   }
 }

+ 3 - 3
src/layout/components/Sidebar/SidebarItem.vue

@@ -94,9 +94,9 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-// .item2:last-child{
-//     padding-bottom:60px !important
-// }
+.item2:last-child{
+    margin-bottom:80px !important
+}
 .router-link-active:active,.router-link-active:hover,.item2:hover{
     background-color: #004BAD !important;
     color:#fff !important;

+ 2 - 2
src/main.js

@@ -47,8 +47,8 @@ Vue.prototype.downloadBlob = downloadBlob
 Vue.prototype.handleTree = handleTree
 Vue.prototype.$echarts = echarts
 
-Vue.prototype.msgSuccess = function(msg) {
-    this.$message({ showClose: true, message: msg, type: "success" });
+Vue.prototype.msgSuccess = function(msg, time) {
+    this.$message({ showClose: true, message: msg, type: "success", duration: time || 3000 });
 }
 
 Vue.prototype.msgError = function(msg) {

+ 35 - 23
src/router/index.js

@@ -55,29 +55,41 @@ export const constantRoutes = [{
         component: (resolve) => require(['@/views/error/401'], resolve),
         hidden: true
     },
-    // {
-    //     path: '',
-    //     component: Layout,
-    //     redirect: 'index',
-    //     children: [{
-    //         path: 'index',
-    //         component: (resolve) => require(['@/views/index'], resolve),
-    //         name: '首页',
-    //         meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
-    //     }, ]
-    // },
-    // {
-    //     path: '/user',
-    //     component: Layout,
-    //     hidden: true,
-    //     redirect: 'noredirect',
-    //     children: [{
-    //         path: 'profile',
-    //         component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
-    //         name: 'Profile',
-    //         meta: { title: '个人中心', icon: 'user' }
-    //     }]
-    // },
+    //{
+    // path: '/',
+    // component: (resolve) => require(['@/views/index'], resolve),
+    // hidden: true
+    // path: '/',
+    // component: Layout,
+    // hidden: true,
+    // children: [{
+    //     path: '/view/index',
+    //     component: (resolve) => require(['@/views/'], resolve)
+    // }]
+    //},
+    {
+        path: '',
+        component: Layout,
+        redirect: 'index',
+        children: [{
+            path: 'index',
+            component: (resolve) => require(['@/views/index'], resolve),
+            name: '首页',
+            meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
+        }, ]
+    },
+    {
+        path: '/user',
+        component: Layout,
+        hidden: true,
+        redirect: 'noredirect',
+        children: [{
+            path: 'profile',
+            component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
+            name: 'Profile',
+            meta: { title: '个人中心', icon: 'user' }
+        }]
+    },
     // {
     //     path: '/system/user-auth',
     //     component: Layout,

+ 1 - 1
src/settings.js

@@ -32,7 +32,7 @@ module.exports = {
     /**
      * 是否显示动态标题
      */
-    dynamicTitle: false,
+    dynamicTitle: true,
 
     /**
      * @type {string | array} 'production' | ['production', 'development']

+ 16 - 16
src/store/getters.js

@@ -1,18 +1,18 @@
 const getters = {
-  sidebar: state => state.app.sidebar,
-  size: state => state.app.size,
-  device: state => state.app.device,
-  visitedViews: state => state.tagsView.visitedViews,
-  cachedViews: state => state.tagsView.cachedViews,
-  token: state => state.user.token,
-  avatar: state => state.user.avatar,
-  name: state => state.user.name,
-  introduction: state => state.user.introduction,
-  roles: state => state.user.roles,
-  permissions: state => state.user.permissions,
-  permission_routes: state => state.permission.routes,
-  topbarRouters:state => state.permission.topbarRouters,
-  defaultRoutes:state => state.permission.defaultRoutes,
-  sidebarRouters:state => state.permission.sidebarRouters,
+    sidebar: state => state.app.sidebar,
+    size: state => state.app.size,
+    device: state => state.app.device,
+    visitedViews: state => state.tagsView.visitedViews,
+    cachedViews: state => state.tagsView.cachedViews,
+    token: state => state.user.token,
+    avatar: state => state.user.avatar,
+    name: state => state.user.name,
+    introduction: state => state.user.introduction,
+    roles: state => state.user.roles,
+    permissions: state => state.user.permissions,
+    permission_routes: state => state.permission.routes,
+    topbarRouters: state => state.permission.topbarRouters,
+    defaultRoutes: state => state.permission.defaultRoutes,
+    sidebarRouters: state => state.permission.sidebarRouters,
 }
-export default getters
+export default getters

+ 43 - 43
src/store/modules/app.js

@@ -1,56 +1,56 @@
 import Cookies from 'js-cookie'
 
 const state = {
-  sidebar: {
-    opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
-    withoutAnimation: false
-  },
-  device: 'desktop',
-  size: Cookies.get('size') || 'medium'
+    sidebar: {
+        opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
+        withoutAnimation: false
+    },
+    device: 'desktop',
+    size: Cookies.get('size') || 'medium'
 }
 
 const mutations = {
-  TOGGLE_SIDEBAR: state => {
-    state.sidebar.opened = !state.sidebar.opened
-    state.sidebar.withoutAnimation = false
-    if (state.sidebar.opened) {
-      Cookies.set('sidebarStatus', 1)
-    } else {
-      Cookies.set('sidebarStatus', 0)
+    TOGGLE_SIDEBAR: state => {
+        state.sidebar.opened = !state.sidebar.opened
+        state.sidebar.withoutAnimation = false
+        if (state.sidebar.opened) {
+            Cookies.set('sidebarStatus', 1)
+        } else {
+            Cookies.set('sidebarStatus', 0)
+        }
+    },
+    CLOSE_SIDEBAR: (state, withoutAnimation) => {
+        Cookies.set('sidebarStatus', 0)
+        state.sidebar.opened = false
+        state.sidebar.withoutAnimation = withoutAnimation
+    },
+    TOGGLE_DEVICE: (state, device) => {
+        state.device = device
+    },
+    SET_SIZE: (state, size) => {
+        state.size = size
+        Cookies.set('size', size)
     }
-  },
-  CLOSE_SIDEBAR: (state, withoutAnimation) => {
-    Cookies.set('sidebarStatus', 0)
-    state.sidebar.opened = false
-    state.sidebar.withoutAnimation = withoutAnimation
-  },
-  TOGGLE_DEVICE: (state, device) => {
-    state.device = device
-  },
-  SET_SIZE: (state, size) => {
-    state.size = size
-    Cookies.set('size', size)
-  }
 }
 
 const actions = {
-  toggleSideBar({ commit }) {
-    commit('TOGGLE_SIDEBAR')
-  },
-  closeSideBar({ commit }, { withoutAnimation }) {
-    commit('CLOSE_SIDEBAR', withoutAnimation)
-  },
-  toggleDevice({ commit }, device) {
-    commit('TOGGLE_DEVICE', device)
-  },
-  setSize({ commit }, size) {
-    commit('SET_SIZE', size)
-  }
+    toggleSideBar({ commit }) {
+        commit('TOGGLE_SIDEBAR')
+    },
+    closeSideBar({ commit }, { withoutAnimation }) {
+        commit('CLOSE_SIDEBAR', withoutAnimation)
+    },
+    toggleDevice({ commit }, device) {
+        commit('TOGGLE_DEVICE', device)
+    },
+    setSize({ commit }, size) {
+        commit('SET_SIZE', size)
+    }
 }
 
 export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions
-}
+    namespaced: true,
+    state,
+    mutations,
+    actions
+}

+ 91 - 91
src/store/modules/permission.js

@@ -5,109 +5,109 @@ import ParentView from '@/components/ParentView';
 import InnerLink from '@/layout/components/InnerLink'
 
 const permission = {
-  state: {
-    routes: [],
-    addRoutes: [],
-    defaultRoutes: [],
-    topbarRouters: [],
-    sidebarRouters: []
-  },
-  mutations: {
-    SET_ROUTES: (state, routes) => {
-      state.addRoutes = routes
-      state.routes = constantRoutes.concat(routes)
+    state: {
+        routes: [],
+        addRoutes: [],
+        defaultRoutes: [],
+        topbarRouters: [],
+        sidebarRouters: []
     },
-    SET_DEFAULT_ROUTES: (state, routes) => {
-      state.defaultRoutes = constantRoutes.concat(routes)
+    mutations: {
+        SET_ROUTES: (state, routes) => {
+            state.addRoutes = routes
+            state.routes = constantRoutes.concat(routes)
+        },
+        SET_DEFAULT_ROUTES: (state, routes) => {
+            state.defaultRoutes = constantRoutes.concat(routes)
+        },
+        SET_TOPBAR_ROUTES: (state, routes) => {
+            // 顶部导航菜单默认添加统计报表栏指向首页
+            const index = [{
+                path: 'index',
+                meta: { title: '统计报表', icon: 'dashboard' }
+            }]
+            state.topbarRouters = routes.concat(index);
+        },
+        SET_SIDEBAR_ROUTERS: (state, routes) => {
+            state.sidebarRouters = routes
+        },
     },
-    SET_TOPBAR_ROUTES: (state, routes) => {
-      // 顶部导航菜单默认添加统计报表栏指向首页
-      const index = [{
-        path: 'index',
-        meta: { title: '统计报表', icon: 'dashboard'}
-      }]
-      state.topbarRouters = routes.concat(index);
-    },
-    SET_SIDEBAR_ROUTERS: (state, routes) => {
-      state.sidebarRouters = routes
-    },
-  },
-  actions: {
-    // 生成路由
-    GenerateRoutes({ commit }) {
-      return new Promise(resolve => {
-        // 向后端请求路由数据
-        getRouters().then(res => {
-          const sdata = JSON.parse(JSON.stringify(res.data))
-          const rdata = JSON.parse(JSON.stringify(res.data))
-          const sidebarRoutes = filterAsyncRouter(sdata)
-          const rewriteRoutes = filterAsyncRouter(rdata, false, true)
-          rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
-          commit('SET_ROUTES', rewriteRoutes)
-          commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
-          commit('SET_DEFAULT_ROUTES', sidebarRoutes)
-          commit('SET_TOPBAR_ROUTES', sidebarRoutes)
-          resolve(rewriteRoutes)
-        })
-      })
+    actions: {
+        // 生成路由
+        GenerateRoutes({ commit }) {
+            return new Promise(resolve => {
+                // 向后端请求路由数据
+                getRouters().then(res => {
+                    const sdata = JSON.parse(JSON.stringify(res.data))
+                    const rdata = JSON.parse(JSON.stringify(res.data))
+                    const sidebarRoutes = filterAsyncRouter(sdata)
+                    const rewriteRoutes = filterAsyncRouter(rdata, false, true)
+                    rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
+                    commit('SET_ROUTES', rewriteRoutes)
+                    commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
+                    commit('SET_DEFAULT_ROUTES', sidebarRoutes)
+                    commit('SET_TOPBAR_ROUTES', sidebarRoutes)
+                    resolve(rewriteRoutes)
+                })
+            })
+        }
     }
-  }
 }
 
 // 遍历后台传来的路由字符串,转换为组件对象
 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
-  return asyncRouterMap.filter(route => {
-    if (type && route.children) {
-      route.children = filterChildren(route.children)
-    }
-    if (route.component) {
-      // Layout ParentView 组件特殊处理
-      if (route.component === 'Layout') {
-        route.component = Layout
-      } else if (route.component === 'ParentView') {
-        route.component = ParentView
-      } else if (route.component === 'InnerLink') {
-        route.component = InnerLink
-      } else {
-        route.component = loadView(route.component)
-      }
-    }
-    if (route.children != null && route.children && route.children.length) {
-      route.children = filterAsyncRouter(route.children, route, type)
-    } else {
-      delete route['children']
-      delete route['redirect']
-    }
-    return true
-  })
+    return asyncRouterMap.filter(route => {
+        if (type && route.children) {
+            route.children = filterChildren(route.children)
+        }
+        if (route.component) {
+            // Layout ParentView 组件特殊处理
+            if (route.component === 'Layout') {
+                route.component = Layout
+            } else if (route.component === 'ParentView') {
+                route.component = ParentView
+            } else if (route.component === 'InnerLink') {
+                route.component = InnerLink
+            } else {
+                route.component = loadView(route.component)
+            }
+        }
+        if (route.children != null && route.children && route.children.length) {
+            route.children = filterAsyncRouter(route.children, route, type)
+        } else {
+            delete route['children']
+            delete route['redirect']
+        }
+        return true
+    })
 }
 
 function filterChildren(childrenMap, lastRouter = false) {
-  var children = []
-  childrenMap.forEach((el, index) => {
-    if (el.children && el.children.length) {
-      if (el.component === 'ParentView') {
-        el.children.forEach(c => {
-          c.path = el.path + '/' + c.path
-          if (c.children && c.children.length) {
-            children = children.concat(filterChildren(c.children, c))
-            return
-          }
-          children.push(c)
-        })
-        return
-      }
-    }
-    if (lastRouter) {
-      el.path = lastRouter.path + '/' + el.path
-    }
-    children = children.concat(el)
-  })
-  return children
+    var children = []
+    childrenMap.forEach((el, index) => {
+        if (el.children && el.children.length) {
+            if (el.component === 'ParentView') {
+                el.children.forEach(c => {
+                    c.path = el.path + '/' + c.path
+                    if (c.children && c.children.length) {
+                        children = children.concat(filterChildren(c.children, c))
+                        return
+                    }
+                    children.push(c)
+                })
+                return
+            }
+        }
+        if (lastRouter) {
+            el.path = lastRouter.path + '/' + el.path
+        }
+        children = children.concat(el)
+    })
+    return children
 }
 
 export const loadView = (view) => { // 路由懒加载
-  return (resolve) => require([`@/views/${view}`], resolve)
+    return (resolve) => require([`@/views/${view}`], resolve)
 }
 
-export default permission
+export default permission

+ 163 - 163
src/store/modules/tagsView.js

@@ -1,183 +1,183 @@
 const state = {
-  visitedViews: [],
-  cachedViews: []
+    visitedViews: [],
+    cachedViews: []
 }
 
 const mutations = {
-  ADD_VISITED_VIEW: (state, view) => {
-    if (state.visitedViews.some(v => v.path === view.path)) return
-    state.visitedViews.push(
-      Object.assign({}, view, {
-        title: view.meta.title || 'no-name'
-      })
-    )
-  },
-  ADD_CACHED_VIEW: (state, view) => {
-    if (state.cachedViews.includes(view.name)) return
-    if (!view.meta.noCache) {
-      state.cachedViews.push(view.name)
-    }
-  },
+    ADD_VISITED_VIEW: (state, view) => {
+        if (state.visitedViews.some(v => v.path === view.path)) return
+        state.visitedViews.push(
+            Object.assign({}, view, {
+                title: view.meta.title || 'no-name'
+            })
+        )
+    },
+    ADD_CACHED_VIEW: (state, view) => {
+        if (state.cachedViews.includes(view.name)) return
+        if (!view.meta.noCache) {
+            state.cachedViews.push(view.name)
+        }
+    },
 
-  DEL_VISITED_VIEW: (state, view) => {
-    for (const [i, v] of state.visitedViews.entries()) {
-      if (v.path === view.path) {
-        state.visitedViews.splice(i, 1)
-        break
-      }
-    }
-  },
-  DEL_CACHED_VIEW: (state, view) => {
-    const index = state.cachedViews.indexOf(view.name)
-    index > -1 && state.cachedViews.splice(index, 1)
-  },
+    DEL_VISITED_VIEW: (state, view) => {
+        for (const [i, v] of state.visitedViews.entries()) {
+            if (v.path === view.path) {
+                state.visitedViews.splice(i, 1)
+                break
+            }
+        }
+    },
+    DEL_CACHED_VIEW: (state, view) => {
+        const index = state.cachedViews.indexOf(view.name)
+        index > -1 && state.cachedViews.splice(index, 1)
+    },
 
-  DEL_OTHERS_VISITED_VIEWS: (state, view) => {
-    state.visitedViews = state.visitedViews.filter(v => {
-      return v.meta.affix || v.path === view.path
-    })
-  },
-  DEL_OTHERS_CACHED_VIEWS: (state, view) => {
-    const index = state.cachedViews.indexOf(view.name)
-    if (index > -1) {
-      state.cachedViews = state.cachedViews.slice(index, index + 1)
-    } else {
-      state.cachedViews = []
-    }
-  },
+    DEL_OTHERS_VISITED_VIEWS: (state, view) => {
+        state.visitedViews = state.visitedViews.filter(v => {
+            return v.meta.affix || v.path === view.path
+        })
+    },
+    DEL_OTHERS_CACHED_VIEWS: (state, view) => {
+        const index = state.cachedViews.indexOf(view.name)
+        if (index > -1) {
+            state.cachedViews = state.cachedViews.slice(index, index + 1)
+        } else {
+            state.cachedViews = []
+        }
+    },
 
-  DEL_ALL_VISITED_VIEWS: state => {
-    // keep affix tags
-    const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
-    state.visitedViews = affixTags
-  },
-  DEL_ALL_CACHED_VIEWS: state => {
-    state.cachedViews = []
-  },
+    DEL_ALL_VISITED_VIEWS: state => {
+        // keep affix tags
+        const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
+        state.visitedViews = affixTags
+    },
+    DEL_ALL_CACHED_VIEWS: state => {
+        state.cachedViews = []
+    },
 
-  UPDATE_VISITED_VIEW: (state, view) => {
-    for (let v of state.visitedViews) {
-      if (v.path === view.path) {
-        v = Object.assign(v, view)
-        break
-      }
-    }
-  },
-  
-  DEL_RIGHT_VIEWS: (state, view) => {
-    const index = state.visitedViews.findIndex(v => v.path === view.path)
-    if (index === -1) {
-      return
+    UPDATE_VISITED_VIEW: (state, view) => {
+        for (let v of state.visitedViews) {
+            if (v.path === view.path) {
+                v = Object.assign(v, view)
+                break
+            }
+        }
+    },
+
+    DEL_RIGHT_VIEWS: (state, view) => {
+        const index = state.visitedViews.findIndex(v => v.path === view.path)
+        if (index === -1) {
+            return
+        }
+        state.visitedViews = state.visitedViews.filter((item, idx) => {
+            if (idx <= index || (item.meta && item.meta.affix)) {
+                return true
+            }
+            const i = state.cachedViews.indexOf(item.name)
+            if (i > -1) {
+                state.cachedViews.splice(i, 1)
+            }
+            return false
+        })
     }
-    state.visitedViews = state.visitedViews.filter((item, idx) => {
-      if (idx <= index || (item.meta && item.meta.affix)) {
-        return true
-      }
-      const i = state.cachedViews.indexOf(item.name)
-      if (i > -1) {
-        state.cachedViews.splice(i, 1)
-      }
-      return false
-    })
-  }
 }
 
 const actions = {
-  addView({ dispatch }, view) {
-    dispatch('addVisitedView', view)
-    dispatch('addCachedView', view)
-  },
-  addVisitedView({ commit }, view) {
-    commit('ADD_VISITED_VIEW', view)
-  },
-  addCachedView({ commit }, view) {
-    commit('ADD_CACHED_VIEW', view)
-  },
+    addView({ dispatch }, view) {
+        dispatch('addVisitedView', view)
+        dispatch('addCachedView', view)
+    },
+    addVisitedView({ commit }, view) {
+        commit('ADD_VISITED_VIEW', view)
+    },
+    addCachedView({ commit }, view) {
+        commit('ADD_CACHED_VIEW', view)
+    },
 
-  delView({ dispatch, state }, view) {
-    return new Promise(resolve => {
-      dispatch('delVisitedView', view)
-      dispatch('delCachedView', view)
-      resolve({
-        visitedViews: [...state.visitedViews],
-        cachedViews: [...state.cachedViews]
-      })
-    })
-  },
-  delVisitedView({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_VISITED_VIEW', view)
-      resolve([...state.visitedViews])
-    })
-  },
-  delCachedView({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_CACHED_VIEW', view)
-      resolve([...state.cachedViews])
-    })
-  },
+    delView({ dispatch, state }, view) {
+        return new Promise(resolve => {
+            dispatch('delVisitedView', view)
+            dispatch('delCachedView', view)
+            resolve({
+                visitedViews: [...state.visitedViews],
+                cachedViews: [...state.cachedViews]
+            })
+        })
+    },
+    delVisitedView({ commit, state }, view) {
+        return new Promise(resolve => {
+            commit('DEL_VISITED_VIEW', view)
+            resolve([...state.visitedViews])
+        })
+    },
+    delCachedView({ commit, state }, view) {
+        return new Promise(resolve => {
+            commit('DEL_CACHED_VIEW', view)
+            resolve([...state.cachedViews])
+        })
+    },
 
-  delOthersViews({ dispatch, state }, view) {
-    return new Promise(resolve => {
-      dispatch('delOthersVisitedViews', view)
-      dispatch('delOthersCachedViews', view)
-      resolve({
-        visitedViews: [...state.visitedViews],
-        cachedViews: [...state.cachedViews]
-      })
-    })
-  },
-  delOthersVisitedViews({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_OTHERS_VISITED_VIEWS', view)
-      resolve([...state.visitedViews])
-    })
-  },
-  delOthersCachedViews({ commit, state }, view) {
-    return new Promise(resolve => {
-      commit('DEL_OTHERS_CACHED_VIEWS', view)
-      resolve([...state.cachedViews])
-    })
-  },
+    delOthersViews({ dispatch, state }, view) {
+        return new Promise(resolve => {
+            dispatch('delOthersVisitedViews', view)
+            dispatch('delOthersCachedViews', view)
+            resolve({
+                visitedViews: [...state.visitedViews],
+                cachedViews: [...state.cachedViews]
+            })
+        })
+    },
+    delOthersVisitedViews({ commit, state }, view) {
+        return new Promise(resolve => {
+            commit('DEL_OTHERS_VISITED_VIEWS', view)
+            resolve([...state.visitedViews])
+        })
+    },
+    delOthersCachedViews({ commit, state }, view) {
+        return new Promise(resolve => {
+            commit('DEL_OTHERS_CACHED_VIEWS', view)
+            resolve([...state.cachedViews])
+        })
+    },
 
-  delAllViews({ dispatch, state }, view) {
-    return new Promise(resolve => {
-      dispatch('delAllVisitedViews', view)
-      dispatch('delAllCachedViews', view)
-      resolve({
-        visitedViews: [...state.visitedViews],
-        cachedViews: [...state.cachedViews]
-      })
-    })
-  },
-  delAllVisitedViews({ commit, state }) {
-    return new Promise(resolve => {
-      commit('DEL_ALL_VISITED_VIEWS')
-      resolve([...state.visitedViews])
-    })
-  },
-  delAllCachedViews({ commit, state }) {
-    return new Promise(resolve => {
-      commit('DEL_ALL_CACHED_VIEWS')
-      resolve([...state.cachedViews])
-    })
-  },
+    delAllViews({ dispatch, state }, view) {
+        return new Promise(resolve => {
+            dispatch('delAllVisitedViews', view)
+            dispatch('delAllCachedViews', view)
+            resolve({
+                visitedViews: [...state.visitedViews],
+                cachedViews: [...state.cachedViews]
+            })
+        })
+    },
+    delAllVisitedViews({ commit, state }) {
+        return new Promise(resolve => {
+            commit('DEL_ALL_VISITED_VIEWS')
+            resolve([...state.visitedViews])
+        })
+    },
+    delAllCachedViews({ commit, state }) {
+        return new Promise(resolve => {
+            commit('DEL_ALL_CACHED_VIEWS')
+            resolve([...state.cachedViews])
+        })
+    },
 
-  updateVisitedView({ commit }, view) {
-    commit('UPDATE_VISITED_VIEW', view)
-  },
+    updateVisitedView({ commit }, view) {
+        commit('UPDATE_VISITED_VIEW', view)
+    },
 
-  delRightTags({ commit }, view) {
-    return new Promise(resolve => {
-      commit('DEL_RIGHT_VIEWS', view)
-      resolve([...state.visitedViews])
-    })
-  }
+    delRightTags({ commit }, view) {
+        return new Promise(resolve => {
+            commit('DEL_RIGHT_VIEWS', view)
+            resolve([...state.visitedViews])
+        })
+    }
 }
 
 export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions
-}
+    namespaced: true,
+    state,
+    mutations,
+    actions
+}

+ 1 - 1
src/store/modules/user.js

@@ -93,4 +93,4 @@ const user = {
     }
 }
 
-export default user
+export default user

+ 16 - 6
src/utils/request.js

@@ -3,8 +3,8 @@ import { Notification, MessageBox, Message } from 'element-ui'
 import store from '@/store'
 import { getToken } from '@/utils/auth'
 import errorCode from '@/utils/errorCode'
-
-axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
+let url2 = undefined
+axios.defaults.headers['Content-Type'] = 'application/json;multipart/form-data;charset=utf-8'
     // 创建axios实例
 const service = axios.create({
         // axios中请求配置有baseURL选项,表示请求URL公共部分
@@ -44,10 +44,10 @@ service.interceptors.request.use(config => {
         url = url.slice(0, -1);
         config.params = {};
         config.url = url;
+
     }
     return config
 }, error => {
-    console.log(error)
     Promise.reject(error)
 })
 
@@ -64,7 +64,7 @@ service.interceptors.response.use(res => {
                 type: 'warning'
             }).then(() => {
                 store.dispatch('LogOut').then(() => {
-                    location.href = '/index';
+                    location.href = '/vuedx/#/';
                 })
             }).catch(() => {});
             return Promise.reject()
@@ -84,12 +84,17 @@ service.interceptors.response.use(res => {
         }
     },
     error => {
-        console.log('err' + error)
+        // console.log('err' + error)
         let { message } = error;
         if (message == "Network Error") {
             message = "后端接口连接异常";
         } else if (message.includes("timeout")) {
-            message = "系统接口请求超时";
+            if (localStorage.getItem("timeout") == "大于10s") {
+                localStorage.removeItem("timeout")
+                return
+            } else {
+                message = "系统接口请求超时";
+            }
         } else if (message.includes("Request failed with status code")) {
             message = "系统接口" + message.substr(message.length - 3) + "异常";
         }
@@ -102,4 +107,9 @@ service.interceptors.response.use(res => {
     }
 )
 
+
+
+
+
+
 export default service

+ 319 - 0
src/utils/validate2.js

@@ -0,0 +1,319 @@
+/*是否合法IP地址*/
+export function validateIP(rule, value, callback) {
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else {
+        const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
+        if ((!reg.test(value)) && value != '') {
+            callback(new Error('请输入正确的IP地址'));
+        } else {
+            callback();
+        }
+    }
+}
+
+/* 是否手机号码或者固话*/
+export function validatePhoneTwo(rule, value, callback) {
+    const reg = /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/;;
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else {
+        if ((!reg.test(value)) && value != '') {
+            callback(new Error('请输入正确的电话号码或者固话号码'));
+        } else {
+            callback();
+        }
+    }
+}
+/* 是否固话*/
+export function validateTelphone(rule, value, callback) {
+    const reg = /0\d{2}-\d{7,8}/;
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else {
+        if ((!reg.test(value)) && value != '') {
+            callback(new Error('请输入正确的固话(格式:区号+号码,如010-1234567)'));
+        } else {
+            callback();
+        }
+    }
+}
+/* 是否手机号码*/
+export function validatePhone(rule, value, callback) {
+    const reg = /^[1][3,4,5,7,8][0-9]{9}$/;
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else {
+        if ((!reg.test(value)) && value != '') {
+            callback(new Error('请输入正确的电话号码'));
+        } else {
+            callback();
+        }
+    }
+}
+/* 是否身份证号码*/
+export function validateIdNo(rule, value, callback) {
+    const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else {
+        if ((!reg.test(value)) && value != '') {
+            callback(new Error('请输入正确的身份证号码'));
+        } else {
+            callback();
+        }
+    }
+}
+/* 是否邮箱*/
+export function validateEMail(rule, value, callback) {
+    const reg = /^([a-zA-Z0-9]+[-_\.]?)+@[a-zA-Z0-9]+\.[a-z]+$/;
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else {
+        if (!reg.test(value)) {
+            callback(new Error('请输入正确的邮箱地址'));
+        } else {
+            callback();
+        }
+    }
+}
+/* 合法uri*/
+export function validateURL(textval) {
+    const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
+    return urlregex.test(textval);
+}
+
+/*验证内容是否英文数字以及下划线*/
+export function isPassword(rule, value, callback) {
+    const reg = /^[_a-zA-Z0-9]+$/;
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else {
+        if (!reg.test(value)) {
+            callback(new Error('密码仅由英文字母,数字以及下划线组成'));
+        } else {
+            callback();
+        }
+    }
+}
+
+/*自动检验数值的范围*/
+export function checkMax20000(rule, value, callback) {
+    if (value == '' || value == undefined || value == null) {
+        callback();
+    } else if (!Number(value)) {
+        callback(new Error('请输入[1,20000]之间的数字'));
+    } else if (value < 1 || value > 20000) {
+        callback(new Error('请输入[1,20000]之间的数字'));
+    } else {
+        callback();
+    }
+}
+
+//验证数字输入框最大数值,32767
+export function checkMaxVal(rule, value, callback) {
+    if (value < 0 || value > 32767) {
+        callback(new Error('请输入[0,32767]之间的数字'));
+    } else {
+        callback();
+    }
+}
+//验证是否1-99之间
+export function isOneToNinetyNine(rule, value, callback) {
+    if (!value) {
+        return callback(new Error('输入不可以为空'));
+    }
+    setTimeout(() => {
+        if (!Number(value)) {
+            callback(new Error('请输入正整数'));
+        } else {
+            const re = /^[1-9][0-9]{0,1}$/;
+            const rsCheck = re.test(value);
+            if (!rsCheck) {
+                callback(new Error('请输入正整数,值为【1,99】'));
+            } else {
+                callback();
+            }
+        }
+    }, 0);
+}
+
+// 验证是否整数
+export function isInteger(rule, value, callback) {
+    if (!value) {
+        return callback(new Error('输入不可以为空'));
+    }
+    setTimeout(() => {
+        if (!Number(value)) {
+            callback(new Error('请输入正整数'));
+        } else {
+            const re = /^[0-9]*[1-9][0-9]*$/;
+            const rsCheck = re.test(value);
+            if (!rsCheck) {
+                callback(new Error('请输入正整数'));
+            } else {
+                callback();
+            }
+        }
+    }, 0);
+}
+// 验证是否整数,非必填
+export function isIntegerNotMust(rule, value, callback) {
+    if (!value) {
+        callback();
+    }
+    setTimeout(() => {
+        if (!Number(value)) {
+            callback(new Error('请输入正整数'));
+        } else {
+            const re = /^[0-9]*[1-9][0-9]*$/;
+            const rsCheck = re.test(value);
+            if (!rsCheck) {
+                callback(new Error('请输入正整数'));
+            } else {
+                callback();
+            }
+        }
+    }, 1000);
+}
+
+// 验证是否是[0-1]的小数
+export function isDecimal(rule, value, callback) {
+    if (!value) {
+        return callback(new Error('输入不可以为空'));
+    }
+    setTimeout(() => {
+        if (!Number(value)) {
+            callback(new Error('请输入[0,1]之间的数字'));
+        } else {
+            if (value < 0 || value > 1) {
+                callback(new Error('请输入[0,1]之间的数字'));
+            } else {
+                callback();
+            }
+        }
+    }, 100);
+}
+
+// 验证是否是[1-10]的小数,即不可以等于0
+export function isBtnOneToTen(rule, value, callback) {
+    if (typeof value == 'undefined') {
+        return callback(new Error('输入不可以为空'));
+    }
+    setTimeout(() => {
+        if (!Number(value)) {
+            callback(new Error('请输入正整数,值为[1,10]'));
+        } else {
+            if (!(value == '1' || value == '2' || value == '3' || value == '4' || value == '5' || value == '6' || value == '7' || value == '8' || value == '9' || value == '10')) {
+                callback(new Error('请输入正整数,值为[1,10]'));
+            } else {
+                callback();
+            }
+        }
+    }, 100);
+}
+// 验证是否是[1-100]的小数,即不可以等于0
+export function isBtnOneToHundred(rule, value, callback) {
+    if (!value) {
+        return callback(new Error('输入不可以为空'));
+    }
+    setTimeout(() => {
+        if (!Number(value)) {
+            callback(new Error('请输入整数,值为[1,100]'));
+        } else {
+            if (value < 1 || value > 100) {
+                callback(new Error('请输入整数,值为[1,100]'));
+            } else {
+                callback();
+            }
+        }
+    }, 100);
+}
+// 验证是否是[0-100]的小数
+export function isBtnZeroToHundred(rule, value, callback) {
+    if (!value) {
+        return callback(new Error('输入不可以为空'));
+    }
+    setTimeout(() => {
+        if (!Number(value)) {
+            callback(new Error('请输入[1,100]之间的数字'));
+        } else {
+            if (value < 0 || value > 100) {
+                callback(new Error('请输入[1,100]之间的数字'));
+            } else {
+                callback();
+            }
+        }
+    }, 100);
+}
+
+// 验证端口是否在[0,65535]之间
+export function isPort(rule, value, callback) {
+    if (!value) {
+        return callback(new Error('输入不可以为空'));
+    }
+    setTimeout(() => {
+        if (value == '' || typeof(value) == undefined) {
+            callback(new Error('请输入端口值'));
+        } else {
+            const re = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/;
+            const rsCheck = re.test(value);
+            if (!rsCheck) {
+                callback(new Error('请输入在[0-65535]之间的端口值'));
+            } else {
+                callback();
+            }
+        }
+    }, 100);
+}
+// 验证端口是否在[0,65535]之间,非必填,isMust表示是否必填
+export function isCheckPort(rule, value, callback) {
+    if (!value) {
+        callback();
+    }
+    setTimeout(() => {
+        if (value == '' || typeof(value) == undefined) {
+            //callback(new Error('请输入端口值'));
+        } else {
+            const re = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/;
+            const rsCheck = re.test(value);
+            if (!rsCheck) {
+                callback(new Error('请输入在[0-65535]之间的端口值'));
+            } else {
+                callback();
+            }
+        }
+    }, 100);
+}
+
+/* 小写字母*/
+export function validateLowerCase(str) {
+    const reg = /^[a-z]+$/;
+    return reg.test(str);
+}
+/*保留2为小数*/
+export function validatetoFixedNew(str) {
+    return str;
+}
+/* 验证key*/
+// export function validateKey(str) {
+//     var reg = /^[a-z_\-:]+$/;
+//     return reg.test(str);
+// }
+
+/* 大写字母*/
+export function validateUpperCase(str) {
+    const reg = /^[A-Z]+$/;
+    return reg.test(str);
+}
+
+/* 大小写字母*/
+export function validatAlphabets(str) {
+    const reg = /^[A-Za-z]+$/;
+    return reg.test(str);
+}
+/* 输入金额保留两位小数*/
+export function money2(str) {
+    const reg = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/;
+    return reg.test(str);
+}

+ 117 - 113
src/views/index.vue

@@ -7,9 +7,7 @@
             <span>用户概括</span>
           </div>
           <div class="contain">
-            <div class="num">{{employeesCountNum}}</div>
-            <div class="num_txt">已注册人数</div>
-            <div id="user" style="width: 100%;height:300px;margin-left:-20%"></div>
+            <div id="user" ref="user" style="width: 100%;height: 400px;"></div>
           </div>
         </el-card>
         <el-card class="box-card card2" v-loading="loading">
@@ -27,8 +25,8 @@
             <el-card class="box-card">
               <div class="left"><img :src="tj2" alt="" class="tjimg"></div>
               <div class="right">
-                <div class="num"  style="color:#9ED475">{{collectList.balance}}</div>
-                <div class="num_txt">当前账户余额总额(元)</div>
+                <div class="num"  style="color:#9ED475">{{collectList.dishCount}}</div>
+                <div class="num_txt">当天消费次数</div>
               </div>
             </el-card>
           </div>
@@ -57,42 +55,43 @@
             <div class="middle">
               <el-card class="box-card" style="height:270px">
                 <div class="header"><span>支付方式</span></div>
-                <div class="zf" style="margin-top:0px">
+                <div class="zf" style="margin-top:40px">
                   <div class="introduce">
-                    <div class="round zfbbor"></div>
-                    <div class="name">{{payTypeCollectList[0].payType ==1?"微信":""}}</div>
-                    <div class="ratio zfbc">{{payTypeCollectList[0].money}} ({{payTypeCollectList[0].radio}})</div>
+                    <div class="round xjbor"></div>
+                    <div class="name">{{ payTypeCollectList[0].payType ==1?"现金":""}}</div>
+                    <div class="ratio xjbc">{{payTypeCollectList[0].money}} ({{payTypeCollectList[0].radio}})</div>
                   </div>
                   <div class="progress">
-                    <div class="progress1 zfbbg"></div>
-                    <div class="progress2 zfbbg" :style="progressWidth[0]"></div>
+                    <div class="progress1 xjbg"></div>
+                    <div class="progress2 xjbg" :style="payTypeCollectList[0].radio"></div>
                   </div>
                 </div>
-
                 <div class="zf">
                   <div class="introduce">
-                    <div class="round wxbor"></div>
-                    <div class="name">{{payTypeCollectList[1].payType==2?"支付宝":""}}</div>
-                    <div class="ratio wxbc">{{payTypeCollectList[1].money}} ({{payTypeCollectList[1].radio}})</div>
+                    <div class="round zfbbor"></div>
+                    <div class="name">{{payTypeCollectList[1].payType == 2?"微信":""}}</div>
+                    <div class="ratio zfbc">{{payTypeCollectList[1].money}} ({{payTypeCollectList[1].radio}})</div>
                   </div>
                   <div class="progress">
-                    <div class="progress1 wxbg"></div>
-                    <div class="progress2 wxbg" :style="progressWidth[1]"></div>
+                    <div class="progress1 zfbbg"></div>
+                    <div class="progress2 zfbbg" :style="payTypeCollectList[1].radio"></div>
                   </div>
                 </div>
 
                 <div class="zf">
                   <div class="introduce">
-                    <div class="round xjbor"></div>
-                    <div class="name">{{payTypeCollectList[2].payType==3?"现金":""}}</div>
-                    <div class="ratio xjbc">{{payTypeCollectList[2].money}} ({{payTypeCollectList[2].radio}})</div>
+                    <div class="round wxbor"></div>
+                    <div class="name">{{payTypeCollectList[2].payType==3?"支付宝":""}}</div>
+                    <div class="ratio wxbc">{{payTypeCollectList[2].money}} ({{payTypeCollectList[2].radio}})</div>
                   </div>
                   <div class="progress">
-                    <div class="progress1 xjbg"></div>
-                    <div class="progress2 xjbg" :style="progressWidth[2]"></div>
+                    <div class="progress1 wxbg"></div>
+                    <div class="progress2 wxbg" :style="payTypeCollectList[2].radio"></div>
                   </div>
                 </div>
 
+
+
                 <div class="zf">
                   <div class="introduce">
                     <div class="round qtbor"></div>
@@ -101,13 +100,13 @@
                   </div>
                   <div class="progress">
                     <div class="progress1 qtbg"></div>
-                    <div class="progress2 qtbg" :style="progressWidth[3]"></div>
+                    <div class="progress2 qtbg" :style="payTypeCollectList[3].radio"></div>
                   </div>
                 </div>
               </el-card>
               <el-card class="box-card" style="height:270px">
                 <div class="header"><span>充值渠道</span></div>
-                <div id="channel" style="width: 100%;height:240px;margin-top:-15%;"></div>
+                <div id="channel" style="width:100%;height:240px;" ></div>
               </el-card>
             </div>
           </div>
@@ -124,7 +123,7 @@
                   {{year}}<i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="dropdown" >
-                  <template v-for="(index, item) in yearList"  >
+                  <template v-for="item in yearList"  >
                     <el-dropdown-item  :command="item.id"   :key="item.id">{{item.value}}</el-dropdown-item>
                   </template>
                 </el-dropdown-menu>
@@ -134,7 +133,7 @@
                   {{month}}<i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="dropdown">
-                  <template v-for="(index, item) in monthList">
+                  <template v-for="item in monthList">
                     <el-dropdown-item  :command="item.id"  :key="item.id">{{item.value}}</el-dropdown-item>
                   </template>
                 </el-dropdown-menu>
@@ -144,7 +143,6 @@
               <div id="statistics" style="width: 100%;height:300px;margin-top:0px;"></div>
             </div>
           </div>
-
         </el-card>
       </div>
     </div>
@@ -168,7 +166,6 @@ export default {
         {payType:null,money:null,radio:null},
         {payType:null,money:null,radio:null}
       ], //支付方式数据
-      progressWidth:[], //支付方式进度条
       payTypeCollectListCount:null,
       orderMoney:null, //今日充值金额
       orderCount:null, //今日充值次数
@@ -213,7 +210,6 @@ export default {
 
     };
   },
-
   created(){
     this.yearListCreate()
   },
@@ -242,7 +238,7 @@ export default {
       })
     },
     employeesCount() {//注册总人数
-      employeesCountApi().then(response => {
+        employeesCountApi().then(response => {
           this.employeesCountNum = response.data;
         }
       );
@@ -268,7 +264,10 @@ export default {
           }
 
         }
-        this.drawLine1();
+        setTimeout(()=>{
+          this.drawLine1();
+        },100)
+
       });
     },
     channelOrderMoney() {//渠道订单金额
@@ -297,19 +296,29 @@ export default {
     },
     payTypeCollect(){ //支付方式
       payTypeCollectApi().then(response => {
-        this.payTypeCollectList = response.data
+        console.log(response.data)
+        let arr = response.data
         var total = ''
-        for(let i = 0; i<this.payTypeCollectList.length; i++){
-          total = Number(total) +  Number(this.payTypeCollectList[i].money)
+        for(let i = 0; i<arr.length; i++){
+          total = Number(total) +  Number(arr[i].money)
         }
-        for(let i = 0; i<this.payTypeCollectList.length; i++){
-          this.payTypeCollectList[i].radio = ((this.payTypeCollectList[i].money / total) * 100).toFixed(2) + '%'
+        for(let i = 0; i<arr.length; i++){
+          if(total == 0){
+            arr[i].radio = '0%'
+          }else{
+            arr[i].radio = ((arr[i].money / total) * 100).toFixed(2) + '%'
+          }
         }
-        this.progressWidth = this.payTypeCollectList.map(item=>{
-          return {
-            width:item.radio
+        for(let i = 0; i<arr.length; i++){
+          if(arr.find(val=>val.payType == Number(i+1))){
+            arr[i].money = arr.find(val=>val.payType == Number(i+1)).money
+            arr[i].payType = arr.find(val=>val.payType == Number(i+1)).payType
+            arr[i].radio = arr.find(val=>val.payType == Number(i+1)).radio
+            console.log(arr.find(val=>val.payType == Number(i+1)).payType)
           }
-        })
+        }
+        console.log(arr)
+        this.payTypeCollectList = arr
       });
     },
     orderMoneyList() {// 今日充值信息
@@ -319,7 +328,7 @@ export default {
         if(this.orderCount == 0){
           this.orderMoneyAverage = 0
         }else{
-          this.orderMoneyAverage = (this.orderMoney / this.orderCount).toFixed(2) + '%'
+          this.orderMoneyAverage = (this.orderMoney / this.orderCount).toFixed(2)
         }
         this.loading = false
       });
@@ -383,7 +392,7 @@ export default {
       }else{
         this.monthParameter = tMonth
       }
-      this.dateCollectType(0, tYear + '-' + tMonth + '-' + '00' + ' 00:00:00', tYear + '-' + tMonth + '-' + lastDay + ' 00:00:00')
+      this.dateCollectType(0, tYear + '-' + tMonth + '-' + '00' + ' 00:00:00', tYear + '-' + tMonth + '-' + lastDay + ' 23:59:59')
     },
     dateCollectType(type, startTime, endTime){
       dateCollectApi(this.addDateRange({"type":type, "startTime":startTime, "endTime":endTime})).then(response =>{
@@ -394,12 +403,12 @@ export default {
         this.drawLine4();
       })
     },
+
     drawLine4(){
 	    // 基于准备好的dom,初始化echarts实例
       let statistics = this.$echarts.init(document.getElementById('statistics'))
-      window.onresize = function() {
-        statistics.resize();
-      };
+      let channel = this.$echarts.init(document.getElementById('channel'))
+      let user = this.$echarts.init(document.getElementById('user'))
       // 指定图表的配置项和数据
       var option4 = {
         color:[
@@ -410,14 +419,16 @@ export default {
           textStyle: {//主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
               fontSize: 12,
               fontWeight: 'normal',
-              color: "#333"
+              color: "#999"
           },
         },
         tooltip: {
           trigger: 'axis'
         },
         legend: {
-          // data: ['Email']
+           // orient: 'vertical',
+          bottom:'0',
+          padding:[0,0,0,100],
         },
         grid: {
           // left: '3%',
@@ -436,9 +447,9 @@ export default {
           data: this.dataOrderTime,
           axisLine: {
               lineStyle: {
-                  color: '#ccc',
+                  color: '#999',
                   width: 1 //这里是为了突出显示加上的
-                 
+
               }
           },
         },
@@ -447,14 +458,12 @@ export default {
           boundaryGap: false,
           axisLine: {
               lineStyle: {
-                  color: '#ccc',
+                  color: '#999',
                   width: 1 //这里是为了突出显示加上的
-                
+
               }
           },
         },
-
-
         series: [
           {
             // name: 'Email',
@@ -480,14 +489,13 @@ export default {
         ]
       };
       statistics.setOption(option4);
+      window.onresize = function() {
+
+      };
     },
     drawLine3(){
 	    // 基于准备好的dom,初始化echarts实例
       let channel = this.$echarts.init(document.getElementById('channel'))
-      window.onresize = function() {
-        channel.resize();
-      };
-
       // 指定图表的配置项和数据
       var option3 = {
         color:['#FF8A78', '#71A9D4', '#9ED475', '#5BCB5E', '#80F3E9', '#D971FF', '#D3DA67', '#42C7FF', '#9454FF', '#B97E76', '#A8A9B3', '#67BDC0'],
@@ -500,9 +508,6 @@ export default {
         legend: {
            // orient: 'vertical',
           bottom: '0%',
-          left: 'left',
-          left: '25%'
-
         },
         // series: [
         //   {
@@ -549,68 +554,59 @@ export default {
         ]
       };
       channel.setOption(option3);
+
     },
+
     drawLine1(){
 	    // 基于准备好的dom,初始化echarts实例
       let user = this.$echarts.init(document.getElementById('user'))
-      window.onresize = function() {
-        user.resize();
-      };
-
       // 指定图表的配置项和数据
       var option1 = {
         color:['#FF7859', '#598CFF', '#FFC63C', '#5BCB5E', '#80F3E9', '#D971FF', '#D3DA67', '#42C7FF', '#9454FF', '#B97E76', '#A8A9B3', '#67BDC0'],
         tooltip: {
           trigger: 'item'
         },
+        title: {
+            //backgroundColor: "pink", // 标题背景色
+            text: "已注册人数",
+            x: "34.8%",
+            y: "45%",
+            center:'center',
+            textStyle: {
+                fontSize: 12,
+                color: "#000",
+            }
+        },
+        graphic: {
+            backgroundColor: "pink",
+            type: "text",
+            left: "34.8%",
+            top: "35%",
+            center:'center',
+            style: {
+                // text: this.employeesCountNum,
+                text: 23,
+                textAlign: "center",
+                fill: "#000",
+                fontSize: 30,
+                backgroundColor: "pink",
+            }
+        },
         legend: {
           orient: 'vertical',
-          top: '15%',
-          left: 'left',
-          left: '80%'
+          top: '0%',
+          right: '0%',
+          center:'center',
+          formatter: function(name){
+          return name.length>4?name.substr(0,4)+"...":name;
+        }
         },
-        // series: [
-        //   {
-        //     name: '',
-        //     type: 'pie',
-        //     radius: ['50%', '60%'],
-        //     avoidLabelOverlap: false,
-        //     itemStyle: {
-        //       borderRadius: 10,
-        //       borderColor: '#fff',
-        //       borderWidth: 0
-        //     },
-        //     normal:{
-        //       label: {
-        //         show: false,
-        //         position: 'inside',
-        //         formatter: '{b}: {c}({d}%)'
-
-        //       },
-        //     },
-        //     label: {
-        //       show: false,
-
-        //     },
-        //     emphasis: {
-        //       label: {
-        //         show: false,
-        //         fontSize: '16',
-        //         fontWeight: 'bold'
-        //       }
-        //     },
-        //     labelLine: {
-        //       show: false
-        //     },
-        //     data: this.personnelRatioList
-        //   }
-        // ]
         series : [
           {
               name: '',
               type: 'pie',
-              radius : ['50%', '60%'],
-              // center: ['50%', '60%'],
+              radius : ['40%', '50%'],
+              center: ['40%', '40%'],
               label: {
                   normal: {
                       show: true,
@@ -621,8 +617,6 @@ export default {
           }
         ]
       }
-
-
       user.setOption(option1);
     },
   }
@@ -688,6 +682,7 @@ export default {
       .card1{
         height:500px;
         .contain{
+
           margin:30px auto 0;
           text-align: center;
           position: relative;
@@ -699,9 +694,9 @@ export default {
             font-size: 30px;
             margin:0 16px;
             position: absolute;
-            top:43%;
+            top:31%;
             width:100%;
-            margin-left:-20%;
+            margin-left:-10%;
             text-align: center;
 
           }
@@ -710,9 +705,9 @@ export default {
             color:#000;
             opacity: 0.65;
             position: absolute;
-            top:55%;
+            top:43%;
             width:100%;
-            margin-left:-20%;
+            margin-left:-10%;
             text-align: center;
 
           }
@@ -780,7 +775,7 @@ export default {
           margin:0 auto;
         }
         .contain{
-          width:85%;
+          width:92%;
           margin:30px auto 0;
           .top{
             // display: flex;
@@ -814,17 +809,26 @@ export default {
               width:48%;
               float: left;
               padding:0 !important;
+              position: relative;
               .el-card__body{
                  padding:0 !important;
               }
               .header{
                 width:100%;
                 height:46px;
-                font-size: 16px;
+                font-size: 14px;
                 color:#000;
+                font-weight: 700;
                 opacity: 0.65;
                 margin-top:0;
+                top:0px;
+                left:0px;
                 background-color: #FAFAFA;
+                position: absolute;
+                span{
+                  margin:12px  0 0 10px;
+                  display: block;
+                }
                 // padding:10px 20px;
               }
 

+ 0 - 98
src/views/index_v1.vue

@@ -1,98 +0,0 @@
-<template>
-  <div class="dashboard-editor-container">
-
-    <panel-group @handleSetLineChartData="handleSetLineChartData" />
-
-    <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
-      <line-chart :chart-data="lineChartData" />
-    </el-row>
-
-    <el-row :gutter="32">
-      <el-col :xs="24" :sm="24" :lg="8">
-        <div class="chart-wrapper">
-          <raddar-chart />
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :lg="8">
-        <div class="chart-wrapper">
-          <pie-chart />
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="24" :lg="8">
-        <div class="chart-wrapper">
-          <bar-chart />
-        </div>
-      </el-col>
-    </el-row>
-
-    
-  </div>
-</template>
-
-<script>
-import PanelGroup from './dashboard/PanelGroup'
-import LineChart from './dashboard/LineChart'
-import RaddarChart from './dashboard/RaddarChart'
-import PieChart from './dashboard/PieChart'
-import BarChart from './dashboard/BarChart'
-
-const lineChartData = {
-  newVisitis: {
-    expectedData: [100, 120, 161, 134, 105, 160, 165],
-    actualData: [120, 82, 91, 154, 162, 140, 145]
-  },
-  messages: {
-    expectedData: [200, 192, 120, 144, 160, 130, 140],
-    actualData: [180, 160, 151, 106, 145, 150, 130]
-  },
-  purchases: {
-    expectedData: [80, 100, 121, 104, 105, 90, 100],
-    actualData: [120, 90, 100, 138, 142, 130, 130]
-  },
-  shoppings: {
-    expectedData: [130, 140, 141, 142, 145, 150, 160],
-    actualData: [120, 82, 91, 154, 162, 140, 130]
-  }
-}
-
-export default {
-  name: 'Index',
-  components: {
-    PanelGroup,
-    LineChart,
-    RaddarChart,
-    PieChart,
-    BarChart
-  },
-  data() {
-    return {
-      lineChartData: lineChartData.newVisitis
-    }
-  },
-  methods: {
-    handleSetLineChartData(type) {
-      this.lineChartData = lineChartData[type]
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.dashboard-editor-container {
-  padding: 32px;
-  background-color: rgb(240, 242, 245);
-  position: relative;
-
-  .chart-wrapper {
-    background: #fff;
-    padding: 16px 16px 0;
-    margin-bottom: 32px;
-  }
-}
-
-@media (max-width:1024px) {
-  .chart-wrapper {
-    padding: 8px;
-  }
-}
-</style>

+ 7 - 8
src/views/login.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="login" >
-    <div class="bg"><img :src="bg" alt=""></div>
+    <div class="bg"><img :src="bg" alt="" style="width:100%"></div>
     <div class="logo">
       <img :src="logo" alt="">
-      <span class="logo_txt">一卡通管理系统</span>
+      <span class="logo_txt">东信充值管理系统</span>
     </div>
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
       <h3 class="title">用户登录 <span>LOGIN</span></h3>
@@ -24,7 +24,7 @@
           <svg-icon slot="prefix" icon-class="eye"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='password'" />
           <svg-icon slot="prefix" icon-class="eye-open"  class="el-input__icon input-icon"  style="position:absolute;right:-340px"  @click="eyeTab" v-show="passwordtxt =='text'" />
         </el-input>
-        
+
       </el-form-item>
       <el-form-item prop="code" v-if="captchaOnOff">
         <el-input
@@ -125,11 +125,10 @@ export default {
       }else{
         this.passwordtxt = "password"
       }
-      console.log(this.passwordtxt)
+
     },
     getCode() {
       getCodeImg().then(res => {
-        // console.log(res)
         this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
         if (this.captchaOnOff) {
           this.codeUrl = "data:image/gif;base64," + res.img;
@@ -161,8 +160,8 @@ export default {
             Cookies.remove('rememberMe');
           }
           this.$store.dispatch("Login", this.loginForm).then((res) => {
-            console.log(this.loginForm)
-            this.$router.push({ path: "/index" || "/index" }).catch(()=>{});
+            this.$router.push({ path: "/index"}).catch(()=>{});
+
           }).catch(() => {
             this.loading = false;
             if (this.captchaOnOff) {
@@ -225,7 +224,7 @@ export default {
   font-size: 20px;
   span{
     margin-left:10px;
-    opacity: 0.25; 
+    opacity: 0.25;
   }
 }
 

+ 534 - 0
src/views/monitor/jobTaskIndex/index.vue

@@ -0,0 +1,534 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="任务名称" prop="jobName">
+        <el-input
+          v-model="queryParams.jobName"
+          placeholder="请输入任务名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- <el-form-item label="任务组名" prop="jobGroup">
+        <el-select v-model="queryParams.jobGroup" placeholder="请选择任务组名" clearable size="small">
+          <el-option
+            v-for="dict in jobGroupOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item> -->
+      <el-form-item label="任务状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['monitor:job:add']"
+        >新增</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['monitor:job:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['monitor:job:remove']"
+        >删除</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['monitor:job:export']"
+        >导出</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-s-operation"
+          size="mini"
+          @click="handleJobLog"
+          v-hasPermi="['monitor:job:query']"
+        >日志</el-button>
+      </el-col> -->
+      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
+    </el-row>
+
+    <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="任务编号" align="center" prop="jobId" />
+      <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
+      <!-- <el-table-column label="任务组名" align="center" prop="jobGroup" :formatter="jobGroupFormat" /> -->
+      <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
+      <el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
+      <el-table-column label="状态" align="center">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.status"
+            active-value="0"
+            inactive-value="1"
+            @change="handleStatusChange(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['monitor:job:edit']"
+          >修改</el-button>
+          <!-- <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['monitor:job:remove']"
+          >删除</el-button> -->
+          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
+            <span class="el-dropdown-link">
+              <i class="el-icon-d-arrow-right el-icon--right"></i>更多
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="handleRun" icon="el-icon-caret-right"
+                v-hasPermi="['monitor:job:changeStatus']">执行一次</el-dropdown-item>
+              <el-dropdown-item command="handleView" icon="el-icon-view"
+                v-hasPermi="['monitor:job:query']">任务详细</el-dropdown-item>
+              <el-dropdown-item command="handleJobLog" icon="el-icon-s-operation"
+                v-hasPermi="['monitor:job:query']">调度日志</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改定时任务对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="任务名称" prop="jobName">
+              <el-input v-model="form.jobName" placeholder="请输入任务名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="任务分组" prop="jobGroup">
+              <el-select v-model="form.jobGroup" placeholder="请选择">
+                <el-option
+                  v-for="dict in jobGroupOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item prop="invokeTarget">
+              <span slot="label">
+                调用方法
+                <el-tooltip placement="top">
+                  <div slot="content">
+                    Bean调用示例:ryTask.ryParams('ry')
+                    <br />Class类调用示例:com.ruoyi.quartz.task.RyTask.ryParams('ry')
+                    <br />参数说明:支持字符串,布尔类型,长整型,浮点型,整型
+                  </div>
+                  <i class="el-icon-question"></i>
+                </el-tooltip>
+              </span>
+              <el-input v-model="form.invokeTarget" placeholder="请输入调用目标字符串" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="cron表达式" prop="cronExpression">
+              <el-input v-model="form.cronExpression" placeholder="请输入cron执行表达式" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="是否并发" prop="concurrent">
+              <el-radio-group v-model="form.concurrent" size="small">
+                <el-radio-button label="0">允许</el-radio-button>
+                <el-radio-button label="1">禁止</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="错误策略" prop="misfirePolicy">
+              <el-radio-group v-model="form.misfirePolicy" size="small">
+                <el-radio-button label="1">立即执行</el-radio-button>
+                <el-radio-button label="2">执行一次</el-radio-button>
+                <el-radio-button label="3">放弃执行</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="状态">
+              <el-radio-group v-model="form.status">
+                <el-radio
+                  v-for="dict in statusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictValue"
+                >{{dict.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 任务日志详细 -->
+    <el-dialog title="任务详细" :visible.sync="openView" width="700px" append-to-body>
+      <el-form ref="form" :model="form" label-width="120px" size="mini">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="任务编号:">{{ form.jobId }}</el-form-item>
+            <el-form-item label="任务名称:">{{ form.jobName }}</el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="任务分组:">{{ jobGroupFormat(form) }}</el-form-item>
+            <el-form-item label="创建时间:">{{ form.createTime }}</el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="cron表达式:">{{ form.cronExpression }}</el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="下次执行时间:">{{ parseTime(form.nextValidTime) }}</el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="调用目标方法:">{{ form.invokeTarget }}</el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="任务状态:">
+              <div v-if="form.status == 0">正常</div>
+              <div v-else-if="form.status == 1">失败</div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="是否并发:">
+              <div v-if="form.concurrent == 0">允许</div>
+              <div v-else-if="form.concurrent == 1">禁止</div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="执行策略:">
+              <div v-if="form.misfirePolicy == 0">默认策略</div>
+              <div v-else-if="form.misfirePolicy == 1">立即执行</div>
+              <div v-else-if="form.misfirePolicy == 2">执行一次</div>
+              <div v-else-if="form.misfirePolicy == 3">放弃执行</div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="openView = false">关 闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listJob, getJob, delJob, addJob, updateJob, exportJob, runJob, changeJobStatus } from "@/api/monitor/job";
+
+export default {
+  name: "Job",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 定时任务表格数据
+      jobList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 是否显示详细弹出层
+      openView: false,
+      // 任务组名字典
+      jobGroupOptions: [],
+      // 状态字典
+      statusOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        jobName: undefined,
+        jobGroup: undefined,
+        status: undefined
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        jobName: [
+          { required: true, message: "任务名称不能为空", trigger: "blur" }
+        ],
+        invokeTarget: [
+          { required: true, message: "调用目标字符串不能为空", trigger: "blur" }
+        ],
+        cronExpression: [
+          { required: true, message: "cron执行表达式不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    if(localStorage.getItem('personnel') == 1){ // 人员信息执行一次
+      runJob(104,"smperson")
+      localStorage.removeItem('personnel')
+    }else if(localStorage.getItem('department') == 1){ // 部门信息执行一次
+      runJob(105, "smgroup")
+      localStorage.removeItem('department')
+    }else{
+      
+    }
+
+    
+    this.getList();
+    this.getDicts("sys_job_group").then(response => {
+      this.jobGroupOptions = response.data;
+    });
+    this.getDicts("sys_job_status").then(response => {
+      this.statusOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询定时任务列表 */
+    getList() {
+      this.loading = true;
+      listJob(this.queryParams).then(response => {
+        this.jobList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 任务组名字典翻译
+    jobGroupFormat(row, column) {
+      return this.selectDictLabel(this.jobGroupOptions, row.jobGroup);
+    },
+    // 状态字典翻译
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.status);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        jobId: undefined,
+        jobName: undefined,
+        jobGroup: undefined,
+        invokeTarget: undefined,
+        cronExpression: undefined,
+        misfirePolicy: 1,
+        concurrent: 1,
+        status: "0"
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.jobId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
+    // 更多操作触发
+    handleCommand(command, row) {
+      switch (command) {
+        case "handleRun":
+          this.handleRun(row);
+          break;
+        case "handleView":
+          this.handleView(row);
+          break;
+        case "handleJobLog":
+          this.handleJobLog(row);
+          break;
+        default:
+          break;
+      }
+    },
+    // 任务状态修改
+    handleStatusChange(row) {
+      let text = row.status === "0" ? "启用" : "停用";
+      this.$confirm('确认要"' + text + '""' + row.jobName + '"任务吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return changeJobStatus(row.jobId, row.status);
+        }).then(() => {
+          this.msgSuccess(text + "成功");
+        }).catch(function() {
+          row.status = row.status === "0" ? "1" : "0";
+        });
+    },
+    /* 立即执行一次 */
+    handleRun(row) {
+      this.$confirm('确认要立即执行一次"' + row.jobName + '"任务吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return runJob(row.jobId, row.jobGroup);
+        }).then(() => {
+          this.msgSuccess("执行成功");
+        }).catch(() => {});
+    },
+    /** 任务详细信息 */
+    handleView(row) {
+      getJob(row.jobId).then(response => {
+        this.form = response.data;
+        this.openView = true;
+      });
+    },
+    /** 任务日志列表查询 */
+    handleJobLog(row) {
+      const jobId = row.jobId || 0;
+      this.$router.push({ path: '/system/job/jobTaskLog/', query: { jobId: jobId } })
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加任务";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const jobId = row.jobId || this.ids;
+      getJob(jobId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改任务";
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.jobId != undefined) {
+            updateJob(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addJob(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const jobIds = row.jobId || this.ids;
+      this.$confirm('是否确认删除定时任务编号为"' + jobIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delJob(jobIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有定时任务数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportJob(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 328 - 0
src/views/monitor/jobTaskLog/log.vue

@@ -0,0 +1,328 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="任务名称" prop="jobName">
+        <el-input
+          v-model="queryParams.jobName"
+          placeholder="请输入任务名称"
+          clearable
+          size="small"
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- <el-form-item label="任务组名" prop="jobGroup">
+        <el-select
+          v-model="queryParams.jobGroup"
+          placeholder="请任务组名"
+          clearable
+          size="small"
+          style="width: 240px"
+        >
+          <el-option
+            v-for="dict in jobGroupOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item> -->
+      <el-form-item label="执行状态" prop="status">
+        <el-select
+          v-model="queryParams.status"
+          placeholder="请选择执行状态"
+          clearable
+          size="small"
+          style="width: 240px"
+        >
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="执行时间">
+        <el-date-picker
+          v-model="dateRange"
+          size="small"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['monitor:job:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          @click="handleClean"
+          v-hasPermi="['monitor:job:remove']"
+        >清空</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['monitor:job:export']"
+        >导出</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-close"
+          size="mini"
+          @click="handleClose"
+        >关闭</el-button>
+      </el-col> -->
+      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
+    </el-row>
+
+    <el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="日志编号" width="80" align="center" prop="jobLogId" />
+      <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
+      <!-- <el-table-column label="任务组名" align="center" prop="jobGroup" :formatter="jobGroupFormat" :show-overflow-tooltip="true" /> -->
+      <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
+      <el-table-column label="日志信息" align="center" prop="jobMessage" :show-overflow-tooltip="true" />
+      <el-table-column label="执行状态" align="center" prop="status" :formatter="statusFormat" />
+      <el-table-column label="执行时间" align="center" prop="createTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="handleView(scope.row)"
+            v-hasPermi="['monitor:job:query']"
+          >详细</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 调度日志详细 -->
+    <el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" label-width="100px" size="mini">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="日志序号:">{{ form.jobLogId }}</el-form-item>
+            <el-form-item label="任务名称:">{{ form.jobName }}</el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="任务分组:">{{ form.jobGroup }}</el-form-item>
+            <el-form-item label="执行时间:">{{ form.createTime }}</el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="调用方法:">{{ form.invokeTarget }}</el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="日志信息:">{{ form.jobMessage }}</el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="执行状态:">
+              <div v-if="form.status == 0">正常</div>
+              <div v-else-if="form.status == 1">失败</div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="异常信息:" v-if="form.status == 1">{{ form.exceptionInfo }}</el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="open = false">关 闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getJob} from "@/api/monitor/job";
+import { listJobLog, delJobLog, exportJobLog, cleanJobLog } from "@/api/monitor/jobLog";
+
+export default {
+  name: "JobLog",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 调度日志表格数据
+      jobLogList: [],
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 表单参数
+      form: {},
+      // 执行状态字典
+      statusOptions: [],
+      // 任务组名字典
+      jobGroupOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        jobName: undefined,
+        jobGroup: undefined,
+        status: undefined
+      }
+    };
+  },
+  created() {
+    const jobId = this.$route.query.jobId;
+    if (jobId !== undefined && jobId != 0) {
+      getJob(jobId).then(response => {
+        this.queryParams.jobName = response.data.jobName;
+        this.queryParams.jobGroup = response.data.jobGroup;
+        this.getList();
+      });
+    } else {
+      this.getList();
+    }
+    this.getDicts("sys_common_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_job_group").then(response => {
+      this.jobGroupOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询调度日志列表 */
+    getList() {
+      this.loading = true;
+      listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+          this.jobLogList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 执行状态字典翻译
+    statusFormat(row, column) {
+      return this.selectDictLabel(this.statusOptions, row.status);
+    },
+    // 任务组名字典翻译
+    jobGroupFormat(row, column) {
+      return this.selectDictLabel(this.jobGroupOptions, row.jobGroup);
+    },
+    // 返回按钮
+    handleClose() {
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.push({ path: "/monitor/job" });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.jobLogId);
+      this.multiple = !selection.length;
+    },
+    /** 详细按钮操作 */
+    handleView(row) {
+      this.open = true;
+      this.form = row;
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const jobLogIds = this.ids;
+      this.$confirm('是否确认删除调度日志编号为"' + jobLogIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delJobLog(jobLogIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 清空按钮操作 */
+    handleClean() {
+      this.$confirm("是否确认清空所有调度日志数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return cleanJobLog();
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("清空成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有调度日志数据项?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportJobLog(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 4 - 4
src/views/monitor/logininfor/index.vue

@@ -55,7 +55,7 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <!-- <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
           type="danger"
@@ -77,7 +77,7 @@
           v-hasPermi="['monitor:logininfor:remove']"
         >清空</el-button>
       </el-col>
-      <!-- <el-col :span="1.5">
+      <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -87,9 +87,9 @@
           @click="handleExport"
           v-hasPermi="['monitor:logininfor:export']"
         >导出</el-button>
-      </el-col> -->
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+    </el-row> -->
 
     <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
       <el-table-column type="selection" width="55" align="center" />

+ 5 - 5
src/views/monitor/operlog/index.vue

@@ -71,7 +71,7 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <!-- <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
           type="danger"
@@ -93,7 +93,7 @@
           v-hasPermi="['monitor:operlog:remove']"
         >清空</el-button>
       </el-col>
-      <!-- <el-col :span="1.5">
+      <el-col :span="1.5">
         <el-button
           type="warning"
           plain
@@ -103,9 +103,9 @@
           @click="handleExport"
           v-hasPermi="['monitor:operlog:export']"
         >导出</el-button>
-      </el-col> -->
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+    </el-row> -->
 
     <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
       <el-table-column type="selection" width="55" align="center" />
@@ -144,7 +144,7 @@
     />
 
     <!-- 操作日志详细 -->
-    <el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body :before-close="cancel" :close-on-click-modal="false">
+    <el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body  :close-on-click-modal="false">
       <el-form ref="form" :model="form" label-width="100px" size="mini">
         <el-row>
           <el-col :span="12">

+ 0 - 1
src/views/recharge/admin/index.vue

@@ -218,7 +218,6 @@ export default {
     getList() {
       this.loading = true;
       listAdmin(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-        console.log(response)
           this.adminList = response.rows;
           // this.total = response.total;
           this.loading = false;

+ 1 - 4
src/views/recharge/channel/index.vue

@@ -65,8 +65,7 @@
       <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
     </el-row>
 
-    <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+    <el-table v-loading="loading" :data="adminList" >
       <el-table-column label="渠道名称" align="center" prop="name" />
       <el-table-column label="渠道标识" align="center" prop="aliasName"/>
       <el-table-column label="创建人" align="center" prop="createBy" />
@@ -237,7 +236,6 @@ export default {
       this.ids = selection.map(item => item.id)
       this.single = selection.length!=1
       this.multiple = !selection.length
-      console.log(this.ids)
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
@@ -256,7 +254,6 @@ export default {
           this.loading = true
           if (this.form.id != undefined) {
             updataChannel(this.form).then(response => {
-              console.log(response)
               this.loading = false,
               this.msgSuccess("修改成功");
               this.open = false;

+ 25 - 210
src/views/recharge/department/index.vue

@@ -1,109 +1,32 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="渠道名称" prop="name">
+  <div class="app-container" v-loading="loading">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" >
+      <el-form-item label="部门名称" prop="name">
         <el-input
           v-model.trim="queryParams.name"
-          placeholder="请输入渠道名称"
+          placeholder="请输入部门名称"
           clearable
           size="small"
-          style="width: 240px"
+          style="width: 160px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <!-- <el-form-item label="渠道标识" prop="aliasName">
-        <el-input
-          v-model="queryParams.aliasName"
-          placeholder="请输入渠道标识"
-          clearable
-          size="small"
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item> -->
-      <!-- <el-form-item>
+      <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item> -->
+        <el-button icon="el-icon-refresh" size="mini" @click="synchrodeptJob">部门信息同步</el-button>
+      </el-form-item>
     </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['system:admin:add']"
-        >新增</el-button>
-      </el-col> -->
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:admin:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:admin:remove']"
-        >删除</el-button> 
-      </el-col>wt注释-->
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleExport"
-          v-hasPermi="['system:admin:export']"
-        >导出</el-button>
-      </el-col> -->
-      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
-    </el-row>
-
-    <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="渠道名称" align="center" prop="name" />
-      <el-table-column label="渠道标识" align="center" prop="aliasName"/>
+    <el-table  :data="adminList" >
+      <el-table-column label="id" align="center" prop="id"/>
+      <el-table-column label="部门名称" align="center" prop="name" />
       <el-table-column label="创建人" align="center" prop="createBy" />
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
-      <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:admin:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:admin:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column> -->
     </el-table>
-
     <pagination
       v-show="total>0"
       :total="total"
@@ -111,28 +34,11 @@
       :limit.sync="queryParams.size"
       @pagination="getList"
     />
-
-    <!-- 添加或修改参数配置对话框 -->
-    <el-dialog   :title="title" :visible.sync="open" width="600px" append-to-body :before-close="cancel" :close-on-click-modal="false"  >
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px" >
-        <el-form-item label="渠道名称" prop="name">
-          <el-input v-model.trim="form.name" placeholder="请输入渠道名称" />
-        </el-form-item>
-        <el-form-item label="渠道标识" prop="aliasName">
-          <el-input v-model.trim="form.aliasName" placeholder="请输入渠道标识" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm" v-if="!loading">确 定</el-button>
-        <el-button :loading="loading" type="primary" @click="submitForm" v-else>提交中...</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
 <script>
-import { addChannel, updataChannel, delChannel, listChannel } from "@/api/recharge/department";
+import { listChannel, deptJob } from "@/api/recharge/department";
 
 export default {
   name: "admin",
@@ -175,15 +81,6 @@ export default {
         name:'',
         aliasName:''
       },
-      // 表单校验
-      rules: {
-        name: [
-          { required: true, message: "渠道名称不能为空", trigger: "blur" }
-        ],
-        aliasName: [
-          { required: true, message: "渠道标识不能为空", trigger: "blur" }
-        ],
-      }
     };
   },
   created() {
@@ -200,20 +97,19 @@ export default {
         }
       );
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        ids: undefined,
-        name: undefined,
-        aliasName: undefined,
-        adminType: "Y",
-      };
-      this.resetForm("form");
+    // 同步部门信息
+    synchrodeptJob(){
+      if(this.queryParams.name){
+        deptJob({"name":this.queryParams.name}).then(response =>{
+          this.getList();
+        })
+        localStorage.setItem("timeout","大于10s")
+        this.msgSuccess('请在定时任务中部门信息中,选择点击更多--调度日志查询同步进度 ', 5000)
+        this.$router.push({path:'/system/job/jobTaskIndex'})
+        localStorage.setItem('department', 1)
+      }else{
+        this.$message.error('同步部门信息不能为空')
+      }
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -226,87 +122,6 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加参数";
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
-      console.log(this.ids)
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      // this.reset();
-      // const id = row.id || this.ids
-      // getadmin(id).then(response => {
-      Object.assign(this.form, row.id ? this.adminList.find(val=>val.id === row.id) : this.adminList.find(val=>val.id === this.ids[0]))
-      this.open = true;
-      this.title = "修改参数";
-      // });
-    },
-    /** 提交按钮 */
-    submitForm(row) {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          this.loading = true
-          if (this.form.id != undefined) {
-            updataChannel(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addChannel(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delChannel(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有参数数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportadmin(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
-    },
-    /** 刷新缓存按钮操作 */
-    handleRefreshCache() {
-      refreshCache().then(() => {
-        this.msgSuccess("刷新成功");
-      });
-    }
   }
 };
 </script>

+ 62 - 18
src/views/recharge/detailed/index.vue

@@ -29,7 +29,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="支付状态:" prop="orderFlag">
-        <el-select v-model="queryParams.orderFlag" style="width: 240px" placeholder="请选择支付方式" clearable size="small">
+        <el-select v-model="queryParams.orderFlag" style="width: 240px" placeholder="请选择支付状态" clearable size="small">
           <el-option label="未支付" :value="0"/>
           <el-option label="支付等待中" :value="1"/>
           <el-option label="支付失败" :value="2"/>
@@ -82,10 +82,10 @@
       </el-form-item>
     </el-form>
 
-    <el-table v-loading="loading" :data="adminList">
+    <el-table v-loading="loading" :data="adminList" >
       <el-table-column label="姓名" align="center" prop="userName" />
       <el-table-column label="手机号" align="center" prop="userPhone"/>
-      <el-table-column label="金额" align="center" prop="money"/>
+      <el-table-column label="充值金额" align="center" prop="money"/>
       <el-table-column label="支付状态" align="center" prop="orderFlag">
         <template slot-scope="scope">
           <span v-if="scope.row.orderFlag == 0" style="color:#909399">未支付</span>
@@ -97,12 +97,20 @@
           <span v-if="scope.row.orderFlag == 6" style="color:#67C23A">已成功</span>
         </template>
       </el-table-column>
+      <el-table-column label="到账金额" align="center" prop="realMoney"/>
       <el-table-column label="支付方式" align="center" prop="payType">
         <template slot-scope="scope">
           <span>{{ scope.row.payType == 1 ? '现金支付':scope.row.payType ==2 ? '微信':scope.row.payType ==3 ? '支付宝': '' }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="充值来源" align="center" prop="topSource" />
+      <el-table-column label="充值场景" align="center" prop="scene">
+        <template slot-scope="scope">
+          <span v-if="scope.row.scene == 1" style="color:#000000">后台充值</span>
+          <span v-if="scope.row.scene == 2" style="color:#E6A23C">游客充值</span>
+          <span v-if="scope.row.scene == 3" style="color:#67C23A">ERPapp充值</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="充值渠道" align="center" prop="channelName" />
       <el-table-column label="时间" align="center" prop="createTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -250,20 +258,56 @@ export default {
       let queryParams = {...this.queryParams};
       delete queryParams.current
       delete queryParams.size
-      this.$confirm('是否确认导出数据?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportDetail(queryParams);
-        }).then(res => {
-          this.downloadBlob(res)
-          this.exportLoading = false;
-        }).catch(() => {
-          this.exportLoading = false;
-        });
-    },
+      this.exportLoading = true;
+      exportDetail(queryParams).then(response =>{
+        this.exportLoading = false;
+        localStorage.setItem('fileExportId', response.msg)
+        this.$router.push({path:'/recharge/fileExport'})
+      })
+      // this.$confirm('是否确认导出数据?', "警告", {
+      //   confirmButtonText: "确定",
+      //   cancelButtonText: "取消",
+      //   type: "warning"
+      // }).then(() => {
+      //   this.exportLoading = true;
+      //   return exportDetail(queryParams);
+      // }).then(res => {
+      //   this.downloadBlob(res)
+      //   this.exportLoading = false;
+      // }).catch(() => {
+      //   this.exportLoading = false;
+      // });
+    }
+     
+    //   exportDetail(queryParams).then(res => {
+    //       this.$router.push({path:'/recharge/detailed'})
+    //       localStorage.setItem('fileExportId', msg)
+    //       // // this.downloadBlob(res)
+    //       // this.exportLoading = false;
+    //     }).catch(() => {
+    //       // this.exportLoading = false;
+    //     });
+    //     // exportDetail(queryParams).then(response =>{
+    //     //   this.$router.push({path:'/recharge/detailed'})
+    //     //   localStorage.setItem('fileExportId', msg)
+    //     // }).catch(err =>{
+
+    //     // })
+    //     // localStorage.setItem("timeout","大于10s")
+    //   //  this.$confirm('是否确认导出数据?', "警告", {
+    //   //     confirmButtonText: "确定",
+    //   //     cancelButtonText: "取消",
+    //   //     type: "warning"
+    //   //   }).then(() => {
+    //   //     this.exportLoading = true;
+    //   //     return exportDetail(queryParams);
+    //   //   }).then(res => {
+    //   //     // this.downloadBlob(res)
+    //   //     this.exportLoading = false;
+    //   //   }).catch(() => {
+    //   //     this.exportLoading = false;
+    //   //   });
+    // },
   }
 };
 </script>

+ 249 - 0
src/views/recharge/fileExport/index.vue

@@ -0,0 +1,249 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
+      <el-form-item label="文件id:" prop="asyncTaskId">
+        <el-input
+          v-model.trim="queryParams.asyncTaskId"
+          placeholder="请输入文件id"
+          clearable
+          size="small"
+          style="width: 180px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="文件名称:" prop="userName">
+        <el-input
+          v-model.trim="queryParams.userName"
+          placeholder="请输入文件名称"
+          clearable
+          size="small"
+          style="width: 180px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- <el-form-item label="时间:">
+         <el-date-picker
+          v-model="dateRange"
+          size="small"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item> -->
+      <!-- <el-form-item label="文件类型" prop="type">
+         <el-select v-model="queryParams.type" placeholder="文件类型" size="small">
+          <el-option label="文件" :value="file"/>
+        </el-select>
+      </el-form-item> -->
+      <el-form-item style="margin-left:100px">
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <!-- <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['system:admin:export']"
+        >导出</el-button> -->
+      </el-form-item>
+    </el-form>
+
+    <el-table v-loading="loading" :data="adminList">
+      <el-table-column label="id" align="center" prop="id" />
+      <el-table-column label="类别" align="center" prop="resultType" />
+      <el-table-column label="文件名称" align="center" prop="funcType" />
+      <el-table-column label="开始时间" align="center" prop="startTime" />
+      <el-table-column label="结束时间" align="center" prop="endTime" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button v-if ="scope.row.isSuccess == true"
+            size="mini"
+            type="text"
+            icon="el-icon-bottom"
+            @click="handleExport(scope.row)"
+          >下载</el-button>
+          <span v-if="scope.row.isSuccess == false">文件整理中...请稍后查看</span>
+        </template>
+      </el-table-column> 
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.current"
+      :limit.sync="queryParams.size"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { filelist } from "@/api/recharge/fileExport";
+import { getFile } from "@/api/system/product";
+export default {
+  name: "admin",
+  data() {
+    return {
+      // 导出遮罩层
+      exportLoading: false,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 参数表格数据
+      adminList: [],
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        current: 1,
+        size: 10,
+        type: 1,
+        asyncTaskId:undefined,
+        // asyncTaskId:'1451438997761200140',
+        userName: undefined,
+        fileType: "File"
+      },
+      // 表单参数
+      form: {},
+    };
+  },
+  created() {
+    if(localStorage.getItem("fileExportId")){
+      this.loading = false
+      let asyncTaskId = localStorage.getItem("fileExportId")
+      this.queryParams.asyncTaskId = asyncTaskId
+      this.getList();
+      localStorage.removeItem('fileExportId')
+    }else{
+      this.loading = false
+      this.getList();
+      // this.$message.error('请从人员信息充值入口进入该页面')
+      // setTimeout(() =>{
+      //   this.$router.push({path:'personnel'})
+      // },1500)
+    }
+    
+  },
+  methods: {
+    /** 查询参数列表 */
+    getList() {
+        this.loading = true;
+        filelist(this.addDateRange(this.queryParams,this.dateRange,'section')).then(response => {
+            if(response.data.records.length>0){
+                this.total = response.data.total;
+                let arrBig = response.data.records
+                let arr = []
+                arr = response.data.records.map(item =>{
+                    return {
+                        batchNos:[item.result]
+                    }
+                })
+                for(let i=1;i<response.data.records.length; i++){
+                    arr[0].batchNos.push(response.data.records[i].result)
+                }
+                getFile(arr[0]).then(response =>{
+                    const reverse = response.data.reverse()
+                    for(let i=0;i<response.data.length;i++){
+                        arrBig[i].url = reverse[i].url
+                    }
+                })
+                    this.loading = false;
+                    this.adminList = arrBig;
+                    this.total = response.data.total;
+                }
+            // let has = response.data.records
+            // this.total = response.data.total;
+            // if(has.length>0){
+            //     let arr = has
+            //     let a = []
+            //     for(let i = 0;i<has.length;i++){
+            //         if(has[i].isSuccess == true){
+            //             a.push(has[i].result)
+            //         }
+            //     }
+            //     a = a.map(item =>{
+            //         return {
+            //             batchNos:[item]
+            //         }
+            //     })
+            //     // for(let i=1;i<response.data.records.length; i++){
+            //     //     arr[0].batchNos.push(response.data.records[i].result)
+            //     // }
+            //     getFile(a).then(response =>{
+            //         const reverse = response.data.reverse()
+            //         for(let i=0;i<response.data.length;i++){
+            //             arr[i] = reverse[i]
+            //         }
+            //         this.adminList = arr;
+            //         this.loading = false;
+            //     })
+
+            // }
+        }).catch(err =>{
+            this.loading = false;
+        })
+        // filelist(this.addDateRange(this.queryParams,this.dateRange)).then(response => {
+        //     // let has = response.data.records
+        //     // this.total = response.data.total;
+        //     // if(has.length>0){
+        //     //     let arr = []
+        //     //     for(let i = 0;i<has.length;i++){
+        //     //         if(has[i].isSuccess == true){
+        //     //             arr.push(has[i].result)
+        //     //         }
+        //     //     }
+        //     //     arr = arr.map(item =>{
+        //     //         return {
+        //     //             batchNos:[item]
+        //     //         }
+        //     //     })
+        //     //     for(let i=1;i<response.data.records.length; i++){
+        //     //         arr[0].batchNos.push(response.data.records[i].result)
+        //     //     }
+        //     //     getFile(arr[0]).then(response =>{
+        //     //         const reverse = response.data.reverse()
+        //     //         for(let i=0;i<response.data.length;i++){
+        //     //             arr[i] = reverse[i]
+        //     //         }
+        //     //         this.adminList = arr;
+        //     //         this.loading = false;
+        //     //     })
+
+        //     // }
+        // }).catch(err =>{
+        //     this.loading = false;
+        // })
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.current = 1;
+      this.queryParams.startTime = undefined;
+      this.queryParams.endTime = undefined;
+      this.queryParams.endTime = undefined;
+      this.queryParams.type = 1
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 导出按钮操作 */
+    handleExport(row) {
+        var a = document.createElement("a"); //创建一个<a></a>标签
+        a.href = row.url; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
+        a.download = row.oriName; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
+        a.style.display = "none"; // 障眼法藏起来a标签
+        document.body.appendChild(a); // 将a标签追加到文档对象中
+        a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
+        a.remove();
+    },
+  }
+};
+</script>

+ 160 - 178
src/views/recharge/personnel/index.vue

@@ -1,127 +1,72 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+  <div class="app-container" v-loading="loading">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" >
       <el-form-item label="人员名称" prop="name">
         <el-input
           v-model.trim="queryParams.name"
           placeholder="请输入人员名称"
           clearable
-          size="small"
-          style="width: 240px"
+          size="medium"
+          style="width: 200px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="部门名称" prop="aliasName">
+      <el-form-item label="手机号" prop="phone">
         <el-input
-          v-model.trim="queryParams.aliasName"
-          placeholder="请输入部门名称"
+          v-model.trim="queryParams.phone"
+          placeholder="请输入手机号"
           clearable
-          size="small"
-          style="width: 240px"
+          size="medium"
+          style="width: 200px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="卡号" prop="card">
+        <el-input
+          v-model.trim="queryParams.card"
+          placeholder="请输入卡号"
+          clearable
+          size="medium"
+          style="width: 200px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" size="medium" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="synchroPersonnel">人员信息同步</el-button>
+        <el-button type="primary" icon="el-icon-circle-plus-outline" size="mini" @click="batchChange(0)">批量绑定</el-button>
+        <el-button type="primary" icon="el-icon-remove-outline" size="mini" @click="batchChange(1)">批量解除</el-button>
       </el-form-item>
     </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['system:admin:add']"
-        >新增</el-button>
-      </el-col> -->
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:admin:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:admin:remove']"
-        >删除</el-button> 
-      </el-col>wt注释-->
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleExport"
-          v-hasPermi="['system:admin:export']"
-        >导出</el-button>
-      </el-col> -->
-      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
-    </el-row>
-
-    <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+    <el-table  :data="adminList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="50" align="center" />
+      <el-table-column label="id" align="center" prop="id" />
       <el-table-column label="人员名称" align="center" prop="name" />
-      <el-table-column label="部门名称" align="center" prop="deptName" />
-      <!-- <el-table-column label="渠道标识" align="center" prop="aliasName"/>
-      <el-table-column label="创建人" align="center" prop="createBy" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </template>
-      </el-table-column> -->
-      <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="身份信息" align="center" prop="identity" />
+      <el-table-column label="手机号" align="center" prop="contacts" />
+      <el-table-column label="卡号" align="center" prop="cardId" />
+      <el-table-column label="充值到账比例" align="center" prop="proportion" />
+      <el-table-column label="创建时间" align="center" prop="createTime" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:admin:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:admin:remove']"
-          >删除</el-button>
+            icon="el-icon-link"
+            @click="radio(scope.row)"
+          >充值</el-button>
         </template>
-      </el-table-column> -->
+      </el-table-column> 
     </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.current"
-      :limit.sync="queryParams.size"
-      @pagination="getList"
-    />
-
     <!-- 添加或修改参数配置对话框 -->
     <el-dialog   :title="title" :visible.sync="open" width="600px" append-to-body :before-close="cancel" :close-on-click-modal="false"  >
-      <el-form ref="form" :model="form" :rules="rules" label-width="120px" >
-        <el-form-item label="人员名称" prop="name">
-          <el-input v-model.trim="form.name" placeholder="请输入人员名称" />
+      <el-form ref="queryParams" :model="queryParams"  :rules="rules" label-width="120px" >
+        <el-form-item label="到账比例:" prop="id">
+          <el-select v-model="queryParams.id" style="width: 240px" placeholder="请选择到账比例" clearable size="small" >
+            <el-option :label="`${item.identity}:${item.proportion}`"  :value="item.id" v-for="(item, index) in radioList" :key="index" />
+          </el-select>
         </el-form-item>
-        <!-- <el-form-item label="渠道标识" prop="aliasName">
-          <el-input v-model="form.aliasName" placeholder="请输入渠道标识" />
-        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm" v-if="!loading">确 定</el-button>
@@ -129,22 +74,29 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+    <pagination 
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.current"
+      :limit.sync="queryParams.size"
+      @pagination="getList"
+    />
   </div>
 </template>
 
 <script>
-import { addChannel, updataChannel, delChannel, listChannel } from "@/api/recharge/personnel";
-
+import {  listChannel, personJob, staff } from "@/api/recharge/personnel";
+import { allRadio } from "@/api/recharge/radio";
 export default {
   name: "admin",
-  data() {
+  data() { 
     return {
       // 遮罩层
       loading: true,
       // 导出遮罩层
       exportLoading: false,
       dialogFormVisible:false,
-      // 选中数组
+      // 选中数组id
       ids: [],
       // 非单个禁用
       single: true,
@@ -171,28 +123,41 @@ export default {
         name: undefined,
         aliasName: undefined,
         startTime: undefined,
-        endTime: undefined
+        endTime: undefined,
+        identity: undefined,
+        proportion: undefined,
+        id:undefined,
+        phone:undefined,
+        card:undefined
+
       },
       // 表单参数
       form: {
         name:'',
         aliasName:''
       },
+      // 到账比例
+      radioList:[
+
+      ],
+      //批量到账比例处理
+      staffList:[],
       // 表单校验
       rules: {
-        name: [
-          { required: true, message: "渠道名称不能为空", trigger: "blur" }
-        ],
-        aliasName: [
-          { required: true, message: "渠道标识不能为空", trigger: "blur" }
+        id:[
+           { required: true, message: "充值比例不能为空", trigger: "change"},
         ],
       }
     };
   },
   created() {
     this.getList();
+    this.getListczgl(); 
   },
   methods: {
+    forceUpdate(){ //重置form
+      this.form = JSON.parse(JSON.stringify(this.form));
+    },
     /** 查询参数列表 */
     getList() {
       this.loading = true;
@@ -204,6 +169,18 @@ export default {
         }
       );
     },
+    /** 获取充值管理的数据用于修改赋值 */
+    getListczgl() {
+      allRadio().then(response => {
+        this.radioList = response.data.map(item=>{
+          return {
+            identity:item.identity,
+            proportion:item.proportion,
+            id:item.id
+          }
+        })
+      });
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -216,8 +193,27 @@ export default {
         name: undefined,
         aliasName: undefined,
         adminType: "Y",
+        proportion:undefined,
+        id:undefined
       };
+      this.staffList = []
       this.resetForm("form");
+    },
+    // 同步人员信息
+    synchroPersonnel(){
+      if(this.queryParams.name){
+        personJob({"blurry":this.queryParams.name}).then(response =>{
+          this.getList();
+        })
+        localStorage.setItem("timeout","大于10s")
+        this.msgSuccess('请在定时任务中人员信息中,选择点击更多--调度日志查询同步进度 ', 5000)
+        this.$router.push({path:'/system/job/jobTaskIndex'})
+        localStorage.setItem('personnel', 1)
+      }else{
+        this.$message.error('同步人员信息不能为空')
+      }
+      
+      
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -230,91 +226,77 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加参数";
+    /** 充值跳转 */
+    radio(row){
+      this.$router.push({path:'userRecharge'})
+      localStorage.setItem('chongzhi', JSON.stringify({"name":row.name,"proportion":row.proportion,"sid":row.sid,"contacts":row.contacts}))
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
-      console.log(this.ids)
+      this.ids = selection.map(item => item);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
     },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      // this.reset();
-      // const id = row.id || this.ids
-      // getadmin(id).then(response => {
-      Object.assign(this.form, row.id ? this.adminList.find(val=>val.id === row.id) : this.adminList.find(val=>val.id === this.ids[0]))
-      this.open = true;
-      this.title = "修改参数";
-      // });
+    //批量处理
+    batchChange(change){
+      if(this.ids.length>0){
+        if(change == 0){
+            this.open = true;
+            this.title = "修改参数";
+        }else{
+          this.loading = true;
+          this.staffList = this.ids.map(item=>{
+            return {
+              staffId:item.sid,
+              radioId:item.radioId,
+              delFlag:change
+            }
+          })
+          staff(this.staffList).then(response =>{
+            this.loading = false;
+            this.msgSuccess('批量处理完成')
+            this.getList();
+          }).catch(err=>{
+            this.loading = false;
+          })
+        }
+      }else{
+        this.$message.error('请勾选需要批量处理充值到账比例人员信息')
+      }
+      
+      
     },
     /** 提交按钮 */
-    submitForm(row) {
-      this.$refs["form"].validate(valid => {
+    submitForm() {
+      this.$refs["queryParams"].validate(valid => {
         if (valid) {
-          this.loading = true
-          if (this.form.id != undefined) {
-            updataChannel(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addChannel(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("新增成功");
+          if(this.queryParams.id){
+            this.loading = true;
+            this.staffList = this.ids.map(item=>{
+              return {
+                staffId:item.sid,
+                radioId:this.queryParams.id,
+                delFlag:0
+              }
+            })
+            staff(this.staffList).then(response =>{
+              this.loading = false;
               this.open = false;
+              this.msgSuccess('批量处理完成')
               this.getList();
-            });
+              this.reset()
+            }).catch(err=>{
+              this.loading = false; 
+            })
           }
         }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delChannel(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
+      })
     },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有参数数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportadmin(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
-    },
-    /** 刷新缓存按钮操作 */
-    handleRefreshCache() {
-      refreshCache().then(() => {
-        this.msgSuccess("刷新成功");
-      });
-    }
   }
 };
 </script>
-<style lang="scss" scoped>
-// .el-button--primary{color:#50B300;border:1px solid #50B300;background: #fff;}
-// .el-button--primary:hover{color:#fff;border:1px solid #50B300;background: #50B300;}
+<style lang="scss" >
+.el-select-dropdown__item.selected{
+  font-weight: none !important;
+}
 </style>

+ 20 - 22
src/views/recharge/qrCode/index.vue

@@ -11,16 +11,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <!-- <el-form-item label="充值到账比例" prop="proportion">
-        <el-input
-          v-model="queryParams.proportion"
-          placeholder="请输入充值到账比例"
-          clearable
-          size="small"
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item> -->
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -63,17 +53,19 @@
     </el-row>
 
     <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="二维码名称" align="center" prop="name" />
       <el-table-column label="渠道名称" align="center" prop="topChannelName"/>
-      <el-table-column label="渠道名称" align="center" prop="topChannelName"/>
-      <el-table-column label="二维码" align="center" prop="createBy">
-        <template slot-scope="scope">
+     
+      <el-table-column label="二维码" align="center" prop="qrPath" >
+        <!-- <div class="qrcode" ref="qrCodeUrl"></div> -->
+        <template slot-scope="scope" >
+          
           <el-image
             v-if="scope.row.qrPath"
             style="width: 24px; height: 24px"
-            :preview-src-list="['data:image/gif;base64,' + scope.row.qrPath]"
-            :src="'data:image/gif;base64,' + scope.row.qrPath">
+            :preview-src-list="[scope.row.qrPath]"
+            :src="scope.row.qrPath">
           </el-image>
         </template>
       </el-table-column>
@@ -137,7 +129,8 @@
 
 <script>
 import { addCode, updataCode, delCode, listCode, channlPageCode, getBs } from "@/api/recharge/qrCode";
-
+// import QRCode from 'qrcodejs2'
+import QRCode from 'qrcode'
 export default {
   name: "admin",
   data() {
@@ -200,11 +193,17 @@ export default {
     getList() {
       this.loading = true;
       listCode(this.addDateRange(this.queryParams)).then(response => {
-          this.adminList = response.data.records;
-          this.total = response.data.total;
-          this.loading = false;
+        console.log(response)
+        var data = response.data.records
+        for(let i =0;i<data.length; i++){
+          QRCode.toDataURL(data[i].qrPath).then(imgData => {
+            data[i].qrPath = imgData
+          });
         }
-      );
+        this.adminList = data;
+        this.total = response.data.total;
+        this.loading = false;
+      });
     },
     // 取消按钮
     cancel() {
@@ -243,7 +242,6 @@ export default {
       this.ids = selection.map(item => item.id)
       this.single = selection.length!=1
       this.multiple = !selection.length
-      console.log(this.ids)
     },
     /** 修改按钮操作 */
     handleUpdate(row) {

+ 9 - 12
src/views/recharge/radio2/index.vue → src/views/recharge/radio/index.vue

@@ -74,7 +74,7 @@
       <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
     </el-row>
 
-    <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange" >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="身份信息" align="center" prop="identity" />
       <el-table-column label="充值到账比例" align="center" prop="proportion"/>
@@ -134,9 +134,9 @@
       </div>
     </el-dialog>
     <el-dialog  :title="title" :visible.sync="open2" width="600px" append-to-body :before-close="cancel" :close-on-click-modal="false">
-      <el-form ref="staffId" :model="staffId" :rules="rules" label-width="120px" >
-        <el-form-item label="充值到账比例" prop="staffId">
-          <el-select v-model="staffId.staffId"  placeholder="请选择充值到账比例" clearable size="small" @input="forceUpdate">
+      <el-form ref="radio" :model="radio" :rules="rules" label-width="120px" >
+        <el-form-item label="充值到账比例" prop="radioId">
+          <el-select v-model="radio.radioId"  placeholder="请选择充值到账比例" clearable size="small" @input="forceUpdate">
             <el-option :label="index.value"  :value="index.value" v-for = "(index, item) in proportionList" :key="item" />
           </el-select>
         </el-form-item>
@@ -164,7 +164,7 @@ export default {
       // 选中数组
       ids: [],
       // 多选修改充值比例
-      staffId:{staffId:undefined},
+      radio:{radioId:undefined},
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -271,17 +271,15 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      // console.log(selection)
       this.ids = selection.map(item => {
         return{
           delFlag:0,
-          radioId:item.id,
-          staffId:undefined
+          staffId:item.id,
+          radioId:undefined
         }
       })
       this.single = selection.length!=1
       this.multiple = !selection.length
-      console.log(this.ids)
       if(this.ids.length>1){
         this.single = false
       }else{
@@ -303,12 +301,11 @@ export default {
     /** 提交按钮 */
     submitForm(row) {
       if(this.ids.length>1){
-        this.$refs["staffId"].validate(valid => {
+        this.$refs["radio"].validate(valid => {
           if (valid) {
-            console.log(this.staffId)
             this.loading = true
             for(let i=0;i<this.ids.length;i++){
-              this.ids[i].staffId = this.staffId.staffId
+              this.ids[i].radioId = this.radio.radioId
             }
             updataStaff(this.ids).then(response => {
               this.loading = false

+ 27 - 20
src/views/recharge/reportForm/index.vue

@@ -43,9 +43,9 @@
         </template>
       </el-table-column>
       <el-table-column label="总金额" align="center" prop="totalMoney" />
-      <el-table-column label="支付宝" align="center" prop="cashMoney" />
+      <el-table-column label="现金" align="center" prop="cashMoney" />
       <el-table-column label="微信" align="center" prop="wxMoney" />
-      <el-table-column label="现金" align="center" prop="zfbMoney" />
+      <el-table-column label="支付宝" align="center" prop="zfbMoney" />
     </el-table>
 
     <pagination
@@ -107,15 +107,15 @@ export default {
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.current = 1;
-      this.queryParams.startTime = undefined;
-      this.queryParams.endTime = undefined;
-      this.queryParams.endTime = undefined;
-      this.queryParams.type = 1;
       this.getList();
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams.current = 1;
+      this.queryParams.startTime = undefined;
+      this.queryParams.endTime = undefined;
+      this.queryParams.endTime = undefined;
+      this.queryParams.type = 1
       this.dateRange = [];
       this.resetForm("queryForm");
       this.handleQuery();
@@ -125,19 +125,26 @@ export default {
       let queryParams = {...this.queryParams};
       delete queryParams.current
       delete queryParams.size
-      this.$confirm('是否确认导出数据?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportReport(queryParams);
-        }).then(res => {
-          this.downloadBlob(res)
-          this.exportLoading = false;
-        }).catch(() => {
-          this.exportLoading = false;
-        });
+      this.exportLoading = true;
+      exportReport(queryParams).then(response =>{
+        this.exportLoading = false;
+        localStorage.setItem('fileExportId', response.msg)
+        this.$router.push({path:'/recharge/fileExport'})
+      })
+      
+      // this.$confirm('是否确认导出数据?', "警告", {
+      //     confirmButtonText: "确定",
+      //     cancelButtonText: "取消",
+      //     type: "warning"
+      //   }).then(() => {
+      //     this.exportLoading = true;
+      //     return exportReport(queryParams);
+      //   }).then(res => {
+      //     this.downloadBlob(res)
+      //     this.exportLoading = false;
+      //   }).catch(() => {
+      //     this.exportLoading = false;
+      //   });
     },
   }
 };

+ 138 - 26
src/views/recharge/userRecharge/index.vue

@@ -1,11 +1,12 @@
 <template>
-  <div class="app-container">
-    <el-form :model="form" :rules="rules" ref="form" label-width="100px">
+  <div class="app-container" v-loading="loading">
+    <el-form :model="form" :rules="rules" ref="form" label-width="140px">
       <el-form-item label="姓名:" prop="userName">
         <el-input
           v-model.trim="form.userName"
           placeholder="请输入姓名"
           clearable
+          :readonly=true
         />
       </el-form-item>
       <el-form-item label="手机号码:" prop="userPhone">
@@ -14,17 +15,30 @@
           placeholder="请输入手机号码"
           clearable
           maxlength="11"
+          minlength="11"
           type="text"
           onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
         />
       </el-form-item>
       <el-form-item label="充值金额:" prop="money">
-        <el-input
+        <el-input  v-model.trim="form.money"  placeholder="请输入充值金额" type="tel"   @input="inputMoney" min="0.10" />
+        <!-- <el-input
+
           v-model.trim="form.money"
           placeholder="请输入充值金额"
           clearable
+          onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
+        /> -->
+      </el-form-item>
+      <el-form-item label="充值到账比例:" prop="proportion">
+        <el-input
+          v-model.trim="form.proportion"
+          placeholder="请输入充值到账比例"
+          clearable
+          :readonly=true
         />
       </el-form-item>
+
       <el-form-item label-width="0" style="margin-top:50px;" class="payTypeClass" prop="payType">
         <img src="../../../assets/images/xj.png" alt="" @click="form.payType = 1" v-if="form.payType !== 1">
         <img src="../../../assets/images/xj-c.png" alt="" v-if="form.payType === 1">
@@ -37,35 +51,54 @@
         <el-button type="primary" @click="submitForm" style="width:100%">充值</el-button>
       </el-form-item>
     </el-form>
-    <img :src="codeUrl" alt="请扫描二维码支付" v-if="codeUrl" title="请扫描二维码支付">
+    <div class="qrcode" ref="qrCodeUrl"></div>
+    <!-- <img :src="codeUrl" alt="请扫描二维码支付" v-if="codeUrl" title="请扫描二维码支付"> -->
   </div>
 </template>
 
 <script>
-import { order, scanPayQr } from "@/api/recharge/userRecharge";
-
+import QRCode from 'qrcodejs2'
+import { order, topScanPayApi } from "@/api/recharge/userRecharge";
+import { validatePhone } from "@/utils/validate2";
 export default {
   name: "admin",
   data() {
     return {
+      loading:true,
       // 表单参数
       form: {
+        userPhone:'',
+        userName:'',
+        money:'',
+        proportion:'',
+        payType:0,
+        userId:undefined,
+        scene:1
+      },
+      formSubmit:{
         userPhone:'',
         userName:'',
         money:'',
         payType:0,
+        userId:undefined,
+        scene:1
       },
       codeUrl:null,
       // 表单校验
       rules: {
         userPhone: [
-          { required: true, message: "手机号码不能为空", trigger: "blur" }
+          { required: true, message: "手机号码不能为空", trigger: "blur",  },
+          { validator: validatePhone,  trigger: "blur" },
+
         ],
         userName: [
           { required: true, message: "姓名不能为空", trigger: "blur" }
         ],
         money: [
-          { required: true, message: "充值金额不能为空", trigger: "blur" }
+          { required: true, message: "充值金额不能为空", trigger: "blur" },
+        ],
+        proportion: [
+          { required: true, message: "充值到账比例不能为空,请返回页面绑定比例关系", trigger: "blur" }
         ],
         payType: [
           { required: true, message: "请选择支付方式", trigger: "blur" }
@@ -73,30 +106,109 @@ export default {
       }
     };
   },
+  created(){
+    if(localStorage.getItem("chongzhi")){
+      this.loading = false
+      let obj = JSON.parse(localStorage.getItem("chongzhi"))
+      this.form.userName = obj.name
+      this.form.proportion = obj.proportion
+      this.form.userId = obj.sid
+      this.form.userPhone = obj.contacts
+      localStorage.removeItem('chongzhi')
+    }else{
+      this.$message.error('请从人员信息充值入口进入该页面')
+      setTimeout(() =>{
+        this.$router.push({path:'personnel'})
+      },1500)
+    }
+  },
   methods: {
+    creatQrCode(url) {
+      console.log(url)
+      var qrcode = new QRCode(this.$refs.qrCodeUrl, {
+          text: url, // 需要转换为二维码的内容
+          width: 250,
+          height: 250,
+          colorDark: '#000000',
+          colorLight: '#ffffff',
+          correctLevel: QRCode.CorrectLevel.H
+      })
+      this.msgSuccess("已生成支付二维码,请扫描二维码进行支付。");
+      this.loading = false
+    },
+    inputMoney(e){ //金额充值效验
+      var val = e.replace(/(^\s*)|(\s*$)/g, "")
+      if (!val) {
+        this.form.money = '';
+        return
+      }
+      var reg = /[^\d.]/g
+      // 只能是数字和小数点,不能是其他输入
+      val = val.replace(reg, "")
+      // // 保证第一位只能是数字,不能是点
+      val = val.replace(/^\./g, "");
+      // // 小数只能出现1位
+      val = val.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
+      // // 小数点后面保留2位
+      val = val.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
+      if(val.indexOf("0") == 0){
+        if(val.length == 2){
+          val = "0."
+        }
+      }
+      this.$nextTick(() => {
+          this.form.money = val;
+      })
+	  },
     forceUpdate(){ //重置form
       this.form = JSON.parse(JSON.stringify(this.form));
     },
-    
+
     /** 提交按钮 */
     submitForm(row) {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if(!this.form.payType) return this.msgError("请选择支付方式");
-          if (this.form.payType === 1) {
-            order(this.form).then(response => {
-              this.msgSuccess("已生成支付订单");
-              this.codeUrl = '';
-            });
-          } else {
-            scanPayQr(this.form).then(response => {
-              this.codeUrl = "data:image/gif;base64," + response.msg;
-              this.msgSuccess("已生成支付二维码,请扫描二维码进行支付。");
-            });
+
+      if(this.form.money == 0){
+        this.msgError("充值金额不能为0元")
+      }else{
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if(!this.form.payType) return this.msgError("请选择支付方式");
+            this.loading = true
+
+            this.formSubmit.userPhone = this.form.userPhone
+            this.formSubmit.userName = this.form.userName
+            this.formSubmit.money = Number(this.form.money).toFixed(2)
+            this.formSubmit.payType = this.form.payType
+            this.formSubmit.userId = this.form.userId
+            this.formSubmit.userId = this.form.userId
+            if (this.form.payType === 1) { //后台现金
+              order(this.formSubmit).then(response => {
+                this.msgSuccess("已生成支付订单");
+                this.codeUrl = '';
+                this.loading = false
+              });
+            } else {
+
+              //移除二维码
+              var div = document.getElementsByClassName("qrcode")[0];
+              // 获取 div 标签下的所有子节点
+              var pObjs = div.childNodes;
+              for (var i = pObjs.length - 1; i >= 0; i--) { // 一定要倒序,正序是删不干净的,可自行尝试
+                div.removeChild(pObjs[i]);
+              }
+              topScanPayApi(this.formSubmit).then(response => {
+                this.creatQrCode(response.msg)
+              })
+              // scanPayQr(this.form).then(response => {
+              //   this.codeUrl = "data:image/gif;base64," + response.msg;
+              //   this.msgSuccess("已生成支付二维码,请扫描二维码进行支付。");
+              //   this.loading = false
+              // });
+            }
+            // this.reset()
           }
-          // this.reset()
-        }
-      });
+        })
+      }
     },
     // 表单重置
     reset() {
@@ -127,4 +239,4 @@ export default {
     margin: 0 10px;
   }
 }
-</style>
+</style>

+ 1 - 1
src/views/register.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="register">
     <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
-      <h3 class="title">一卡通管理系统</h3>
+      <h3 class="title">东信充值管理系统</h3>
       <el-form-item prop="username">
         <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
           <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

+ 3 - 5
src/views/system/dept/index.vue

@@ -47,15 +47,15 @@
       default-expand-all
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
     >
-      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
+      <el-table-column prop="deptName" label="部门名称" ></el-table-column>
       <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
-      <el-table-column prop="status" label="状态" :formatter="statusFormat" width="100"></el-table-column>
+      <el-table-column prop="status" label="状态" :formatter="statusFormat" width="200"></el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" width="200">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" width="250" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -210,9 +210,7 @@ export default {
     getList() {
       this.loading = true;
       listDept(this.queryParams).then(response => {
-        console.log(response.data)
         this.deptList = this.handleTree(response.data, "deptId");
-        console.log(this.deptList)
         this.loading = false;
       });
     },

+ 2 - 3
src/views/system/menu/index.vue

@@ -279,7 +279,8 @@ export default {
       // 查询参数
       queryParams: {
         menuName: undefined,
-        visible: undefined
+        visible: undefined,
+        visible: 0 // 将菜单栏不需要的隐藏 ,打开时不需要此参数
       },
       // 表单参数
       form: {},
@@ -301,7 +302,6 @@ export default {
     this.getList();
     this.getDicts("sys_show_hide").then(response => {
       this.visibleOptions = response.data;
-      console.log(this.visibleOptions)
     });
     this.getDicts("sys_normal_disable").then(response => {
       this.statusOptions = response.data;
@@ -401,7 +401,6 @@ export default {
       this.reset();
       this.getTreeselect();
       getMenu(row.menuId).then(response => {
-        console.log(response)
         this.form = response.data;
         this.open = true;
         this.title = "修改菜单";

+ 162 - 125
src/views/system/product/index.vue

@@ -16,7 +16,6 @@
         <!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
       </el-form-item>
     </el-form>
-
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -30,13 +29,12 @@
       </el-col>
     </el-row>
 
-    <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+    <el-table v-loading="loading" :data="adminList" >
       <el-table-column label="公司名称" align="center" prop="name" />
       <el-table-column label="公司介绍" align="center" prop="introduce"/>
       <el-table-column label="公司LOGO">
-        <template width="90" slot-scope="scope">
-          <img style="width:120px;border:none;" :src="scope.row.logo">
+        <template width="90" slot-scope="scope" >
+          <img style="width:120px;border:none;" :src="scope.row.logo"  >
         </template>
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
@@ -82,48 +80,28 @@
           <el-input type="textarea" :rows="4" placeholder="请输入公司介绍" v-model="form.introduce">
           </el-input>
         </el-form-item>
-
-        <el-form-item label="公司LOGO" prop="logo">
-          <el-upload  
-            :before-upload="beforeUpload"
-            accept="image/png,image/jpg,image/jpeg"
-            :on-change="getFile"  
-            :limit="1" 
-            v-model="form.logo"
-            action="#"
-            list-type="picture-card"
-            style="color:#D9D9D9"
-            :auto-upload="false">
-              <i slot="default" class="el-icon-plus"></i>
-              <div slot="file" slot-scope="{file}">
-                <img
-                  class="el-upload-list__item-thumbnail imgupload"
-                  :src="file.url" alt="" 
-                >
-                <span class="el-upload-list__item-actions">
-                  <!-- <span
-                    class="el-upload-list__item-preview"
-                    @click="handlePictureCardPreview(file)"
-                  >
-                    <i class="el-icon-zoom-in"></i>
-                  </span> -->
-                  <!-- <span
-                    v-if="!disabled"
-                    class="el-upload-list__item-delete"
-                    @click="handleDownload(file)"
-                  >
-                    <i class="el-icon-download"></i>
-                  </span> -->
-                  <span
-                    v-if="!disabled"
-                    class="el-upload-list__item-delete"
-                    @click="handleRemove(file)"
-                  >
-                    <i class="el-icon-delete"></i>
+        <el-form-item label="公司LOGO" prop="logo" ref="img">
+          <!-- <el-checkbox-group v-model="form.logo" v-show="false"></el-checkbox-group> -->
+            <el-upload  
+              action="#" 
+              accept="image/png,image/jpg,image/jpeg"
+              :http-request="uploadFile"
+              :limit = limit
+              list-type="picture-card"
+              :file-list="fileList"
+              style="color:#D9D9D9"
+              on-sucsee="handSuccess"
+              :auto-upload="true">
+                <i slot="default" class="el-icon-plus"></i>
+                <div slot="file" slot-scope="{file}">
+                  <img class="el-upload-list__item-thumbnail imgupload" :src="file.url" alt="" > 
+                  <span class="el-upload-list__item-actions">
+                    <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
+                      <i class="el-icon-delete"></i>
+                    </span>
                   </span>
-                </span>
-              </div>
-          </el-upload>
+                </div>
+            </el-upload>
           <el-dialog :visible.sync="dialogVisible" >
             <img width="100%" :src="dialogImageUrl" alt="">
           </el-dialog>
@@ -131,21 +109,21 @@
         
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm" v-if="!loading">确 定</el-button>
-        <el-button :loading="loading" type="primary" @click="submitForm" v-else>提交中...</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
+          <el-button type="primary" @click="submitForm" v-if="!loading">确 定</el-button>
+          <el-button :loading="loading" type="primary" @click="submitForm" v-else>提交中...</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { addChannel, updataChannel, delChannel, listChannel } from "@/api/system/product";
-
+import { addChannel, updataChannel, delChannel, listChannel, fileId, uploadFileApi, fileTakeEffect, getFile } from "@/api/system/product";
 export default {
   name: "admin",
   data() {
-    return {
+    return { 
       // 遮罩层
       loading: true,
       // 导出遮罩层
@@ -161,6 +139,8 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
+      // 图片显示
+      fileList:[{"url":''}],
       // 参数表格数据
       adminList: [],
       // 弹出层标题
@@ -184,14 +164,17 @@ export default {
         name:'',
         introduce:'',
         logo:"",
+        batchNo:undefined,
+        businessType:"产品logo",
+        uploadType:"file"
       },
       // 表单校验
       rules: {
         name: [
-          { required: true, message: "渠道名称不能为空", trigger: "blur" }
+          { required: true, message: "公司名称不能为空", trigger: "blur" }
         ],
-        aliasName: [
-          { required: true, message: "渠道标识不能为空", trigger: "blur" }
+        logo: [
+          { required: true, message: "公司logo不能为空", trigger: "change" }
         ],
       },
       //  上传图片
@@ -204,39 +187,64 @@ export default {
           image64: "",
           imageName: "",
       },
+      formData:undefined,
+      limit:100,
     };
   },
   created() {
     this.getList();
   },
   methods: {
-    upSuccess(response, file, fileList) {
-      console.log(response, file, fileList)
-        // this.ruleForm.fileList.push(file)
-        // this.$refs.ruleForm.validateField('fileList')
-    },
     handleRemove(file) {
+      this.form.logo = undefined
+      // this.$nextTick(() => {
+      //       this.$refs['form'].clearValidate(['logo']);
+      //   })
+      this.limit = 100
       document.getElementsByClassName("el-upload-list el-upload-list--picture-card")[0].firstChild.remove()
-      console.log(file);
-    },
-    handlePictureCardPreview(file) {
-      console.log(file)
-      this.dialogImageUrl = file.url;
-      this.dialogVisible = true;
+      document.getElementsByClassName("el-upload--picture-card")[0].style.display="block"
     },
-    // handleDownload(file) {
-    //   console.log(file);
-    // },
     /** 查询参数列表 */
     getList() {
       this.loading = true;
       listChannel(this.addDateRange(this.queryParams)).then(response => {
-        console.log(response)
-          this.adminList = response.data.records;
-          this.total = response.data.total;
+        if(response.data.records.length>0){
+          let arrBig = response.data.records
+          let arr = []
+          arr = response.data.records.map(item =>{
+            return {
+              batchNos:[item.logo]
+            }
+          })
+          for(let i=1;i<response.data.records.length; i++){
+            arr[0].batchNos.push(response.data.records[i].logo)
+          }
+          getFile(arr[0]).then(response =>{
+            const reverse = response.data.reverse()
+            for(let i=0;i<response.data.length;i++){
+              arrBig[i].logo = reverse[i].url
+            }
+          })
+          setTimeout(()=>{
+            this.loading = false;
+            this.adminList = arrBig;
+            this.total = response.data.total;
+            this.logo = arrBig.logo;
+          },1000)
+          
+        }else{
           this.loading = false;
         }
-      );
+        
+      })
+    },
+    // 移出图片
+    removeImg(){
+      this.form.logo = undefined
+      setTimeout(()=>{
+        this.limit = 100
+        this.fileList=[]
+      },1000)
     },
     // 取消按钮
     cancel() {
@@ -251,6 +259,7 @@ export default {
         aliasName: undefined,
         adminType: "Y",
       };
+      this.fileList=[]
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -270,26 +279,38 @@ export default {
       this.form.name =undefined
       this.form.introduce =undefined
       this.form.logo =undefined
-      
+      this.form.batchNo =undefined
       this.reset();
       this.open = true;
       this.title = "添加参数";
+      setTimeout(()=>{
+        document.getElementsByClassName("el-upload--picture-card")[0].style.display="block"
+      },200)
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
       this.single = selection.length!=1
       this.multiple = !selection.length
-      console.log(this.ids)
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      // this.reset();
+      this.reset();
+      
       // const id = row.id || this.ids
       // getadmin(id).then(response => {
       Object.assign(this.form, row.id ? this.adminList.find(val=>val.id === row.id) : this.adminList.find(val=>val.id === this.ids[0]))
       this.open = true;
       this.title = "修改参数";
+      setTimeout(() =>{
+        if(this.fileList.length>0){
+        }else{
+          this.fileList.push([])
+          this.fileList[0].url = row.logo
+        }
+        document.getElementsByClassName("el-upload--picture-card")[0].style.display="none"
+      },100)
+      this.limit = 1
       // });
     },
     // 图片上传尺寸大小检验
@@ -304,6 +325,7 @@ export default {
           let valid = img.width === width && img.height === height;
           valid ? resolve() : reject();
         }
+        
         img.src = _URL.createObjectURL(file);
       }).then(() => {
         return file;
@@ -316,7 +338,6 @@ export default {
       // }
       // return isSize&is1M
     },
-    
      // 图片 转base64
     getBase64(file) {
       return new Promise(function (resolve, reject) {
@@ -334,43 +355,73 @@ export default {
         };
       });
     },
-    getFile(file, fileList) {
-      this.imageList = JSON.parse(JSON.stringify(fileList));
-      //fileList图片文件集合
-      let fileAllList = JSON.stringify(this.imageList);
-      this.getBase64(file.raw).then((res) => {
-          this.formInline.image64 = res;
-          file.base64 = res;
-          this.form.logo = file.base64
-      });
+    uploadFile(param){
+      this.limit = 1
+      document.getElementsByClassName("el-upload--picture-card")[0].style.display="none"
+      fileId().then(res=>{
+        this.$nextTick(() => {
+            this.$refs['form'].clearValidate(['logo']);
+        })
+        this.form.batchNo = res.msg
+        this.form.logo = res.msg
+        this.formData = new FormData()// FormData 对象
+        this.formData.append('files', param.file)// 文件对象
+      })
+    },
+    handSuccess(){
+      this.$refs.img.clearValidate();
     },
+     //变化设置图片
+    onChange(file, fileList) {
+      this.form.file = fileList;
+    },
+    /** 提交按钮 */
     submitForm(row) {
-      /** 提交按钮 */
+      if(this.form.logo){
+      }else{
+          this.$refs.img.clearValidate();
+      }
       this.$refs["form"].validate(valid => {
         if (valid) {
-          console.log(this.form)
           this.loading = true
-          if (this.form.id != undefined) {
-            updataChannel(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            }).catch(()=>{
-              this.loading = false,
-              this.open = false
-            })
-          } else {
-            addChannel(this.form).then(response => {
-              this.loading = false,
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            }).catch(()=>{
-              this.loading = false,
-              this.open = false
-            })
-          }
+          // 上传图片
+          uploadFileApi(this.form.batchNo,this.form.businessType,this.formData).then(response => {
+            if(response.data.length>0){
+              let ids = new FormData()
+              ids.append('ids[]', response.data[0].id)
+              // 上传图片生效
+              fileTakeEffect(response.data[0].batchNo,ids).then(response => {
+                // this.msgSuccess("上传成功");
+                if (this.form.id != undefined) {
+                  updataChannel(this.form).then(response => {
+                    this.loading = false,
+                    this.msgSuccess("修改成功");
+                    this.open = false;
+                    this.getList();
+                  }).catch(()=>{
+                    this.loading = false,
+                    this.open = false
+                  })
+                } else {
+                  addChannel(this.form).then(response => {
+                    this.loading = false,
+                    this.msgSuccess("新增成功");
+                    this.open = false;
+                    this.getList();
+                  }).catch(()=>{
+                    this.loading = false,
+                    this.open = false
+                  })
+                }
+              }).catch(err =>{
+              })
+            }
+          })
+          .catch((e) => {
+            this.$message.error('上传失败')
+            this.getList();
+          })
+          // this.removeImg()
         }
       });
     },
@@ -388,21 +439,6 @@ export default {
           this.msgSuccess("删除成功");
         }).catch(() => {});
     },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有参数数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportadmin(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
-    },
     /** 刷新缓存按钮操作 */
     handleRefreshCache() {
       refreshCache().then(() => {
@@ -416,3 +452,4 @@ export default {
 // .el-button--primary{color:#50B300;border:1px solid #50B300;background: #fff;}
 // .el-button--primary:hover{color:#fff;border:1px solid #50B300;background: #50B300;}
 </style>
+

+ 11 - 3
src/views/system/role/index.vue

@@ -139,7 +139,14 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:role:remove']"
           >删除</el-button>
-          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-circle-check"
+            @click="handleDataScope(scope.row)"
+            v-hasPermi="['system:role:edit']"
+          >数据权限</el-button>
+          <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
             <span class="el-dropdown-link">
               <i class="el-icon-d-arrow-right el-icon--right"></i>更多
             </span>
@@ -149,7 +156,7 @@
               <el-dropdown-item command="handleAuthUser" icon="el-icon-user"
                 v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item>
             </el-dropdown-menu>
-          </el-dropdown>
+          </el-dropdown> -->
         </template>
       </el-table-column>
     </el-table>
@@ -217,7 +224,7 @@
     </el-dialog>
 
     <!-- 分配角色数据权限对话框 -->
-    <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body :before-close="cancel" :close-on-click-modal="false">
+    <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body >
       <el-form :model="form" label-width="80px">
         <el-form-item label="角色名称">
           <el-input v-model="form.roleName" :disabled="true" />
@@ -360,6 +367,7 @@ export default {
     this.getDicts("sys_normal_disable").then(response => {
       this.statusOptions = response.data;
     });
+    
   },
   methods: {
     /** 查询角色列表 */

+ 26 - 7
src/views/system/user/index.vue

@@ -182,7 +182,14 @@
                 @click="handleDelete(scope.row)"
                 v-hasPermi="['system:user:remove']"
               >删除</el-button>
-              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-key"
+                @click="handleResetPwd(scope.row)"
+                v-hasPermi="['system:user:resetPwd']"
+              >重置密码</el-button>
+              <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
                 <span class="el-dropdown-link">
                   <i class="el-icon-d-arrow-right el-icon--right"></i>更多
                 </span>
@@ -192,7 +199,7 @@
                   <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
                     v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>
                 </el-dropdown-menu>
-              </el-dropdown>
+              </el-dropdown> -->
             </template>
           </el-table-column>
         </el-table>
@@ -274,7 +281,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="岗位">
-              <el-select v-model="form.postIds" multiple placeholder="请选择">
+              <el-select v-model="form.postIds"  placeholder="请选择" multiple>
                 <el-option
                   v-for="item in postOptions"
                   :key="item.postId"
@@ -286,8 +293,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="角色">
-              <el-select v-model="form.roleIds" multiple placeholder="请选择">
+            <el-form-item label="角色" prop="roleIds">
+              <el-select v-model="form.roleIds"  placeholder="请选择" multiple>
                 <el-option
                   v-for="item in roleOptions"
                   :key="item.roleId"
@@ -449,6 +456,7 @@ export default {
           { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
         ],
         email: [
+          { required: true, message: "邮箱地址不能为空", trigger: "blur" },
           {
             type: "email",
             message: "'请输入正确的邮箱地址",
@@ -456,12 +464,17 @@ export default {
           }
         ],
         phonenumber: [
+          { required: true, message: "手机号码不能为空", trigger: "blur" },
           {
             pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
             message: "请输入正确的手机号码",
             trigger: "blur"
           }
-        ]
+        ],
+        roleIds:[
+           { required: true, message: "用户角色不能为空", trigger: "change"},
+        ],
+
       }
     };
   },
@@ -624,7 +637,7 @@ export default {
     /** 分配角色操作 */
     handleAuthRole: function(row) {
       const userId = row.userId;
-      this.$router.push("/system/user-auth/role/" + userId);
+      this.$router.push("/system/role");
     },
     /** 提交按钮 */
     submitForm: function() {
@@ -637,6 +650,9 @@ export default {
               this.msgSuccess("修改成功");
               this.open = false;
               this.getList();
+            }).catch(err=>{
+              this.loading = false
+              this.open = false;
             });
           } else {
             addUser(this.form).then(response => {
@@ -644,6 +660,9 @@ export default {
               this.msgSuccess("新增成功");
               this.open = false;
               this.getList();
+             }).catch(err=>{
+              this.loading = false
+              this.open = false;
             });
           }
         }

+ 6 - 6
src/views/system/user/profile/index.vue

@@ -12,27 +12,27 @@
             </div>
             <ul class="list-group list-group-striped">
               <li class="list-group-item">
-                <svg-icon icon-class="user" />用户名称
+                <svg-icon icon-class="user" /> 用户名称
                 <div class="pull-right">{{ user.userName }}</div>
               </li>
               <li class="list-group-item">
-                <svg-icon icon-class="phone" />手机号码
+                <svg-icon icon-class="phone" /> 手机号码
                 <div class="pull-right">{{ user.phonenumber }}</div>
               </li>
               <li class="list-group-item">
-                <svg-icon icon-class="email" />用户邮箱
+                <svg-icon icon-class="email" /> 用户邮箱
                 <div class="pull-right">{{ user.email }}</div>
               </li>
               <li class="list-group-item">
-                <svg-icon icon-class="tree" />所属部门
+                <svg-icon icon-class="tree" /> 所属部门
                 <div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div>
               </li>
               <li class="list-group-item">
-                <svg-icon icon-class="peoples" />所属角色
+                <svg-icon icon-class="peoples" /> 所属角色
                 <div class="pull-right">{{ roleGroup }}</div>
               </li>
               <li class="list-group-item">
-                <svg-icon icon-class="date" />创建日期
+                <svg-icon icon-class="date" /> 创建日期
                 <div class="pull-right">{{ user.createTime }}</div>
               </li>
             </ul>

+ 7 - 1
src/views/system/user/profile/userAvatar.vue

@@ -1,7 +1,8 @@
 <template>
   <div>
     <div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened"  @close="closeDialog()" :before-close="cancel" :close-on-click-modal="false">
+    <!-- :before-close="cancel" -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened"  @close="closeDialog()"  :close-on-click-modal="false">
       <el-row>
         <el-col :xs="24" :md="12" :style="{height: '350px'}">
           <vue-cropper
@@ -82,6 +83,11 @@ export default {
       previews: {}
     };
   },
+  created(){
+    let index=this.options.img.lastIndexOf("dxtop/");
+    index=this.options.img.substring(index+5,index.length);
+    this.options.img = "https://smartpark.caih.com" + index
+  },
   methods: {
     // 编辑头像
     editCropper() {

+ 6 - 5
vue.config.js

@@ -5,7 +5,7 @@ function resolve(dir) {
     return path.join(__dirname, dir)
 }
 
-const name = process.env.VUE_APP_TITLE || '一卡通管理系统' // 网页标题
+const name = process.env.VUE_APP_TITLE || '东信充值管理系统' // 网页标题
 
 const port = process.env.port || process.env.npm_config_port || 80 // 端口
 
@@ -16,7 +16,7 @@ module.exports = {
     // 部署生产环境和开发环境下的URL。
     // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
     // 例如 https://www.yongtian.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.yongtian.vip/admin/,则设置 baseUrl 为 /admin/。
-    publicPath: process.env.NODE_ENV === "production" ? "/vuedx" : "/vuedx",
+    publicPath: process.env.NODE_ENV === "production" ? "/vuedx/" : "/vuedx/",
     // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
     outputDir: 'dist',
     // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@@ -33,9 +33,10 @@ module.exports = {
         proxy: {
             // detail: https://cli.vuejs.org/config/#devserver-proxy
             [process.env.VUE_APP_BASE_API]: {
-                //target: 'http://101.133.214.75/dxapi/',
-                target: 'https://wx.ewoogi.com/dxapi/',
-                //target: `http://172.16.120.104:8085`,
+                //target: 'https://wx.ewoogi.com/dxapi/',
+                //target: `http://172.16.120.104:8085`, //本地
+                target: 'https://smartpark.caih.com/dxapi/', //东信
+                //target: 'https://qhome.usky.cn/dxapi/', //75服务器
                 changeOrigin: true,
                 pathRewrite: {
                     ['^' + process.env.VUE_APP_BASE_API]: ''