许成详 6 years ago
parent
commit
60c22e49e0

+ 1
- 1
config/index.js View File

@@ -15,7 +15,7 @@ module.exports = {
15 15
         target: 'http://192.168.0.62:8080', //wf
16 16
         // target: 'http://127.0.0.1:8080', 
17 17
         // target: 'http://192.168.0.11:8080', //ys
18
-        // target: 'http://192.168.0.102:8080', //hyq
18
+        // target: 'http://192.168.0.125:8080', //hyq
19 19
         // target: 'http://dev.ycjcjy.com', //frp
20 20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
21 21
         // pathRewrite: {

+ 1
- 1
dist/index.html View File

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.46d158869775a9a06a72a840092ae813.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.71fd787520fc12b02935.js></script><script type=text/javascript src=./static/js/app.0f75a2871724b9967071.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.f404906b44856b72c6d22da1ac019ab1.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.992319e39e0ff64940a3.js></script><script type=text/javascript src=./static/js/app.93f4ee001438a3a439fb.js></script></body></html>

+ 0
- 1
src/pages/system/courseManager/courseList/add.vue View File

@@ -5,7 +5,6 @@
5 5
         <li class="flex-h">
6 6
           <span>课程主图:<em>*</em></span>
7 7
           <div class="flex-item">
8
-            <div class="red-hint">建议上传750*960尺寸的图片</div>
9 8
             <div>
10 9
               <el-upload
11 10
                 class="avatar-uploader"

+ 1
- 0
src/pages/system/courseManager/courseList/index.vue View File

@@ -163,6 +163,7 @@
163 163
         <li class="flex-h" style="align-items: flex-start;">
164 164
           <span>课程详情图片:</span>
165 165
           <div class="flex-item">
166
+            <div class="red-hint">建议上传750*960尺寸的图片</div>
166 167
             <div>
167 168
               <el-upload
168 169
                 class="avatar-uploader"

+ 23
- 23
src/pages/system/dashboard/index.vue View File

@@ -35,7 +35,7 @@
35 35
         </div>
36 36
       </div>
37 37
     </div>
38
-    <div class="bottomData">
38
+    <div class="bottomData" :hidden="!bottomData.length">
39 39
       <div class="flex-h">
40 40
         <div class="flex-item">
41 41
           <h1>数据统计</h1>
@@ -92,24 +92,24 @@ export default {
92 92
       bottomNav: ['推荐会员新增', '排课数', '课程预约量', '饮品下单量', '到场人次'],
93 93
       bottomData: [],
94 94
       pageData: [
95
-        [
96
-          { type: 'dashboardList', remark: '列表面板', data: { title: '', list: [{ name: '会员总数', value: '1000', }, { name: '课程预约总量', value: '1000', }, { name: '饮品下单总量', value: '1000', }] } }
97
-        ],
98
-        [
99
-          { type: 'histogram', remark: '柱状图', data: { title: '今日数据', list: [{ x: '推荐会员新增', y: 38 }, { x: '课程数', y: 52 }, { x: '预约数', y: 61 }, { x: '到场人次', y: 145 }] } },
100
-          { type: 'pieDiagram', remark: '扇形图', data: { title: '明日课程预约数据', list: [{ item: '小小体验官', count: 40, percent: 0.4 }, { item: '哈他瑜伽', count: 52, percent: 0.52 }, { item: '小小飞行家', count: 8, percent: 0.08 }] } }
101
-        ],
102
-        [
103
-          { type: 'brokenLineGraph', remark: '折线图', data: { title: '下单饮品数据', list: [{ x: '09/05', y: 3 }, { x: '09/06', y: 4 }, { x: '09/07', y: 3.5 }, { x: '09/08', y: 5 }, { x: '09/09', y: 4.9 }, { x: '09/10', y: 6 }, { x: '09/11', y: 7 }, { x: '09/12', y: 9 }, { x: '09/13', y: 13 }] } },
104
-          { type: 'ringChart', remark: '环形图', data: { title: '本月课程预约', list: [{ item: '健身课程', count: 40, percent: 0.4 }, { item: '社交课程', count: 21, percent: 0.21 }, { item: '教育课程', count: 17, percent: 0.17 }, { item: '健康课程', count: 13, percent: 0.13 }, { item: '艺术课程', count: 9, percent: 0.09 }] } },
105
-        ],
106
-        [
107
-          { type: 'dashboard', remark: '仪表盘', data: { title: '参与率', list: [{ value: 5.6 }] } },
108
-          { type: 'dashboard', remark: '仪表盘', data: { title: '参与率', list: [{ value: 3.1 }] } },
109
-        ],
110
-        [
111
-          { type: 'brokenLineGraphGroup', remark: '折线图组合', data: { title: '下单饮品数据', list: [{ month: 'Jan', city: 'Tokyo', temperature: 7 }, { month: 'Jan', city: 'London', temperature: 3.9 }, { month: 'Feb', city: 'Tokyo', temperature: 6.9 }, { month: 'Feb', city: 'London', temperature: 4.2 }, { month: 'Mar', city: 'Tokyo', temperature: 9.5 }, { month: 'Mar', city: 'London', temperature: 5.7 }, { month: 'Apr', city: 'Tokyo', temperature: 14.5 }, { month: 'Apr', city: 'London', temperature: 8.5 }, { month: 'May', city: 'Tokyo', temperature: 18.4 }, { month: 'May', city: 'London', temperature: 11.9 }, { month: 'Jun', city: 'Tokyo', temperature: 21.5 }, { month: 'Jun', city: 'London', temperature: 15.2 }, { month: 'Jul', city: 'Tokyo', temperature: 25.2 }, { month: 'Jul', city: 'London', temperature: 17 }, { month: 'Aug', city: 'Tokyo', temperature: 26.5 }, { month: 'Aug', city: 'London', temperature: 16.6 }, { month: 'Sep', city: 'Tokyo', temperature: 23.3 }, { month: 'Sep', city: 'London', temperature: 14.2 }, { month: 'Oct', city: 'Tokyo', temperature: 18.3 }, { month: 'Oct', city: 'London', temperature: 10.3 }, { month: 'Nov', city: 'Tokyo', temperature: 13.9 }, { month: 'Nov', city: 'London', temperature: 6.6 }, { month: 'Dec', city: 'Tokyo', temperature: 9.6 }, { month: 'Dec', city: 'London', temperature: 4.8 }] } },
112
-        ],
95
+        // [
96
+        //   { type: 'dashboardList', remark: '列表面板', data: { title: '', list: [{ name: '会员总数', value: '1000', }, { name: '课程预约总量', value: '1000', }, { name: '饮品下单总量', value: '1000', }] } }
97
+        // ],
98
+        // [
99
+        //   { type: 'histogram', remark: '柱状图', data: { title: '今日数据', list: [{ x: '推荐会员新增', y: 38 }, { x: '课程数', y: 52 }, { x: '预约数', y: 61 }, { x: '到场人次', y: 145 }] } },
100
+        //   { type: 'pieDiagram', remark: '扇形图', data: { title: '明日课程预约数据', list: [{ item: '小小体验官', count: 40, percent: 0.4 }, { item: '哈他瑜伽', count: 52, percent: 0.52 }, { item: '小小飞行家', count: 8, percent: 0.08 }] } }
101
+        // ],
102
+        // [
103
+        //   { type: 'brokenLineGraph', remark: '折线图', data: { title: '下单饮品数据', list: [{ x: '09/05', y: 3 }, { x: '09/06', y: 4 }, { x: '09/07', y: 3.5 }, { x: '09/08', y: 5 }, { x: '09/09', y: 4.9 }, { x: '09/10', y: 6 }, { x: '09/11', y: 7 }, { x: '09/12', y: 9 }, { x: '09/13', y: 13 }] } },
104
+        //   { type: 'ringChart', remark: '环形图', data: { title: '本月课程预约', list: [{ item: '健身课程', count: 40, percent: 0.4 }, { item: '社交课程', count: 21, percent: 0.21 }, { item: '教育课程', count: 17, percent: 0.17 }, { item: '健康课程', count: 13, percent: 0.13 }, { item: '艺术课程', count: 9, percent: 0.09 }] } },
105
+        // ],
106
+        // [
107
+        //   { type: 'dashboard', remark: '仪表盘', data: { title: '参与率', list: [{ value: 5.6 }] } },
108
+        //   { type: 'dashboard', remark: '仪表盘', data: { title: '参与率', list: [{ value: 3.1 }] } },
109
+        // ],
110
+        // [
111
+        //   { type: 'brokenLineGraphGroup', remark: '折线图组合', data: { title: '下单饮品数据', list: [{ month: 'Jan', city: 'Tokyo', temperature: 7 }, { month: 'Jan', city: 'London', temperature: 3.9 }, { month: 'Feb', city: 'Tokyo', temperature: 6.9 }, { month: 'Feb', city: 'London', temperature: 4.2 }, { month: 'Mar', city: 'Tokyo', temperature: 9.5 }, { month: 'Mar', city: 'London', temperature: 5.7 }, { month: 'Apr', city: 'Tokyo', temperature: 14.5 }, { month: 'Apr', city: 'London', temperature: 8.5 }, { month: 'May', city: 'Tokyo', temperature: 18.4 }, { month: 'May', city: 'London', temperature: 11.9 }, { month: 'Jun', city: 'Tokyo', temperature: 21.5 }, { month: 'Jun', city: 'London', temperature: 15.2 }, { month: 'Jul', city: 'Tokyo', temperature: 25.2 }, { month: 'Jul', city: 'London', temperature: 17 }, { month: 'Aug', city: 'Tokyo', temperature: 26.5 }, { month: 'Aug', city: 'London', temperature: 16.6 }, { month: 'Sep', city: 'Tokyo', temperature: 23.3 }, { month: 'Sep', city: 'London', temperature: 14.2 }, { month: 'Oct', city: 'Tokyo', temperature: 18.3 }, { month: 'Oct', city: 'London', temperature: 10.3 }, { month: 'Nov', city: 'Tokyo', temperature: 13.9 }, { month: 'Nov', city: 'London', temperature: 6.6 }, { month: 'Dec', city: 'Tokyo', temperature: 9.6 }, { month: 'Dec', city: 'London', temperature: 4.8 }] } },
112
+        // ],
113 113
       ],
114 114
     }
115 115
   },
@@ -148,10 +148,10 @@ export default {
148 148
   },
149 149
   mounted () {
150 150
     this.$nextTick(function () {
151
-      if (this.defaultCaseId !== null) {
152
-        this.getData(this.defaultCaseId)
153
-        this.getBottomData(this.defaultCaseId, this.bottomSelectValue)
154
-      }
151
+      // if (this.defaultCaseId !== null) {
152
+      //   this.getData(this.defaultCaseId)
153
+      //   this.getBottomData(this.defaultCaseId, this.bottomSelectValue)
154
+      // }
155 155
     })
156 156
   },
157 157
   methods: {

+ 7
- 1
src/pages/system/dataStatistics/goodsOrderList/index.vue View File

@@ -81,7 +81,7 @@
81 81
               <span>案场:{{returnListItem(goodsOrderList, index).CaseName}}</span>
82 82
               <span>用户类型:{{returnListItem(goodsOrderList, index).UserType === 'sales' ? '销售' : returnListItem(goodsOrderList, index).UserType === 'manager' ? '主管' : '用户'}}</span>
83 83
               <span>下单时间:{{toolClass.dateFormat(returnListItem(goodsOrderList, index).CreateDate)}}</span>
84
-              <span>支付方式:{{returnListItem(goodsOrderList, index).PayTypeStr}}</span>
84
+              <span>支付方式:{{returnStr(returnListItem(goodsOrderList, index).PayType)}}</span>
85 85
             </div>
86 86
             <span>{{returnStatus(returnListItem(goodsOrderList, index).MakeStatus)}}</span>
87 87
           </div>
@@ -189,6 +189,9 @@ export default {
189 189
       }, {
190 190
         value: '积分',
191 191
         id: 'points'
192
+      }, {
193
+        value: '城币+优惠券',
194
+        id: 'coupon-coin'
192 195
       }],
193 196
       statusList: [{
194 197
         value: '',
@@ -249,6 +252,9 @@ export default {
249 252
           return '已取消'
250 253
       }
251 254
     },
255
+    returnStr (val) {
256
+      return (this.paytype.filter(x => x.id === val)[0] || {}).value || ''
257
+    },
252 258
     returnListItem (target, index) {
253 259
       return target[Math.ceil((index + 1) / 2) - 1]
254 260
     },

+ 42
- 22
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -44,7 +44,7 @@
44 44
             </div>
45 45
           </div>
46 46
           <div style="padding:10px 20px;border-bottom:1px solid #cccccc;white-space: normal;">备注:{{item.Remark}}</div>
47
-          <div style="padding:10px 20px;" @click="printPdf(`item${index}`)">下单人:{{item.UserName}}</div>
47
+          <div style="padding:10px 20px;">下单人:{{item.UserName}}</div>
48 48
         </div>
49 49
         <div class="print-area" :class="'item_' + item.OrdersId" style="width:180px;">
50 50
           <div style="padding:0px 10px 5px;border-bottom:2px solid #cccccc;">
@@ -139,12 +139,10 @@ export default {
139 139
   beforeRouteLeave (to, from, next) {
140 140
     // 导航离开该组件的对应路由时调用
141 141
     // 可以访问组件实例 `this`
142
-    console.log(this.websockets)
142
+    // console.log(this.websockets)
143 143
     this.needReload = false
144 144
     Object.keys(this.websockets).forEach((key) => {
145
-      console.log(key, this.websockets[key])
146
-      this.websockets[key].close()
147
-      clearInterval(this.websockets[key].interval)
145
+      this.destroyWebsocket(this.websockets[key])
148 146
     })
149 147
     this.websockets = {}
150 148
     next()
@@ -155,7 +153,7 @@ export default {
155 153
         this.needReload = false
156 154
         Object.keys(this.websockets).forEach((key) => {
157 155
           // console.log(key, this.websockets[key])
158
-          this.websockets[key].close()
156
+          this.destroyWebsocket(this.websockets[key])
159 157
         })
160 158
         this.websockets = {}
161 159
         // console.log('init')
@@ -299,36 +297,58 @@ export default {
299 297
       // let newinfo = newList.filter(x => this.list.filter(item => item.OrdersId === x.OrdersId).length === 0)
300 298
       this.updateList({ list: this.list.concat(newList) }).then(() => {
301 299
         newList.forEach((it) => {
302
-          // console.log('it:', it)
303
-          this.printPdf(`item_${it.OrdersId}`)
304
-          this.putPrintGoodsOrder({
305
-            id: it.OrdersId
306
-          })
300
+          // console.log(it)
301
+          if (!it.IsIntimidate) {
302
+            // console.log('print')
303
+            this.putPrintGoodsOrder({
304
+              id: it.OrdersId
305
+            }).then(() => {
306
+              this.printPdf(`item_${it.OrdersId}`)
307
+            })
308
+          }
307 309
         })
308 310
       })
309 311
     },
310 312
     newWebsocket (wsRealPath) {
311 313
       const ws = this.websockets[wsRealPath]
314
+      // console.log('newWebsocket', ws)
312 315
       if (!ws) {
313 316
         const url = `${window.location.origin.replace('http', 'ws')}${wsRealPath}?token=${localStorage.getItem('JWT')}`
314 317
         this.websockets[wsRealPath] = new WebSocket(url)
315 318
         this.websockets[wsRealPath].onopen = console.log
316 319
         this.websockets[wsRealPath].onmessage = this.websocketonmessage
317
-        this.websockets[wsRealPath].onclose = this.reloadWebSocket
318
-        this.websockets[wsRealPath].onerror = this.reloadWebSocket
319
-        this.websockets[wsRealPath].interval = setInterval(() => this.websockets[wsRealPath].send(10), 120000)
320
+        this.websockets[wsRealPath].onclose = ((ws) => {
321
+          return e => this.reloadWebSocket(e, ws)
322
+        })(this.websockets[wsRealPath])
323
+        this.websockets[wsRealPath].interval = setInterval(() => {
324
+          try { this.websockets[wsRealPath].send(10) } catch (err) { console.log(err) }
325
+        }, 120000)
320 326
       }
321 327
     },
322
-    reloadWebSocket (e) {
323
-      console.log(e.currentTarget.url)
324
-      Object.keys(this.websockets).forEach((key) => {
325
-        clearInterval(this.websockets[key].interval)
326
-      })
327
-      if (this.needReload) { // 此变量判断是否需要重连
328
-        this.websockets = {}
329
-        this.initWebSocket()
328
+    reloadWebSocket (e, ws) {
329
+      if (e.target.readyState >= 2) {
330
+        // console.log(e.currentTarget.url)
331
+        Object.keys(this.websockets).forEach((key) => {
332
+          // this.websockets[key].close()
333
+          clearInterval(this.websockets[key].interval)
334
+        })
335
+        ws = null
336
+        setTimeout(() => {
337
+          if (this.needReload) { // 此变量判断是否需要重连
338
+            this.websockets = {}
339
+            this.initWebSocket()
340
+          }
341
+        }, 5000)
330 342
       }
331 343
     },
344
+    destroyWebsocket (ws) {
345
+      ws.onclose = ((ws) => {
346
+        // console.log('close')
347
+      })(ws)
348
+      ws.close()
349
+      clearInterval(ws.interval)
350
+      ws = null
351
+    },
332 352
     open () {
333 353
       if (!this.CaseId) {
334 354
         this.$message({