Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/admin into dev

wangfei 6 years ago
parent
commit
08dc08e765

+ 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><title>城的空间后台管理系统</title><link href=./static/css/app.ca5c568553d422363d3de51590c1ce78.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.09d071b18239c91b0a7d.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><title>城的空间后台管理系统</title><link href=./static/css/app.74e2f4a85378fd8f1cdc28df9fe4c4c3.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.40d79b6e7915c878f744.js></script></body></html>

+ 15
- 6
package-lock.json View File

@@ -674,8 +674,7 @@
674 674
     "async-limiter": {
675 675
       "version": "1.0.0",
676 676
       "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
677
-      "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
678
-      "dev": true
677
+      "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
679 678
     },
680 679
     "async-validator": {
681 680
       "version": "1.8.5",
@@ -8431,6 +8430,17 @@
8431 8430
         "whatwg-url": "6.5.0",
8432 8431
         "ws": "5.2.2",
8433 8432
         "xml-name-validator": "3.0.0"
8433
+      },
8434
+      "dependencies": {
8435
+        "ws": {
8436
+          "version": "5.2.2",
8437
+          "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
8438
+          "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==",
8439
+          "dev": true,
8440
+          "requires": {
8441
+            "async-limiter": "1.0.0"
8442
+          }
8443
+        }
8434 8444
       }
8435 8445
     },
8436 8446
     "jsesc": {
@@ -16154,10 +16164,9 @@
16154 16164
       }
16155 16165
     },
16156 16166
     "ws": {
16157
-      "version": "5.2.2",
16158
-      "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
16159
-      "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==",
16160
-      "dev": true,
16167
+      "version": "6.0.0",
16168
+      "resolved": "https://registry.npmjs.org/ws/-/ws-6.0.0.tgz",
16169
+      "integrity": "sha512-c2UlYcAZp1VS8AORtpq6y4RJIkJ9dQz18W32SpR/qXGfLDZ2jU4y4wKvvZwqbi7U6gxFQTeE+urMbXU/tsDy4w==",
16161 16170
       "requires": {
16162 16171
         "async-limiter": "1.0.0"
16163 16172
       }

+ 2
- 1
package.json View File

@@ -28,7 +28,8 @@
28 28
     "vue-fullcalendar": "^1.0.9",
29 29
     "vue-morris": "0.0.13",
30 30
     "vue-router": "^3.0.1",
31
-    "vuex": "^3.0.1"
31
+    "vuex": "^3.0.1",
32
+    "ws": "^6.0.0"
32 33
   },
33 34
   "devDependencies": {
34 35
     "@antv/g2": "^3.2.7",

+ 1
- 1
src/pages/system/cardAndCouponManager/couponManager/index.vue View File

@@ -54,7 +54,7 @@
54 54
             <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.StartDate, 'yyyy-MM-dd')}}</span>
55 55
             <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">至</span>
56 56
             <span v-if="scope.row.StartDate.substr(0, 4) !== '0001'" style="width:100%;display:block;text-align:center;white-space: nowrap;">{{toolClass.dateFormat(scope.row.EndDate, 'yyyy-MM-dd')}}</span>
57
-            <span v-else>-</span>
57
+            <span v-else>领取后{{scope.row.ValidDays}}天内有效</span>
58 58
           </template>
59 59
         </el-table-column>
60 60
         <el-table-column

+ 1
- 1
src/pages/system/cmsManager/newsManager/edit.vue View File

@@ -23,7 +23,7 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
-        <li class="flex-h" v-else>
26
+        <li class="flex-h" v-if="postData.ForwardType==='course'">
27 27
           <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">

+ 12
- 13
src/pages/system/cmsManager/newsManager/index.vue View File

@@ -69,10 +69,10 @@
69 69
     </div>
70 70
     <el-pagination
71 71
       @current-change="handleCurrentChange"
72
-      :current-page.sync="postData.currentPage"
73
-      :page-size="postData.pageSize"
72
+      :current-page.sync="postData.page"
73
+      :page-size="postData.pagesize"
74 74
       layout="prev, pager, next, jumper"
75
-      :total="postData.total">
75
+      :total="total">
76 76
     </el-pagination>
77 77
   </div>
78 78
 </template>
@@ -85,10 +85,10 @@ export default {
85 85
   name: '',
86 86
   data () {
87 87
     return {
88
+      total: 0,
88 89
       postData: {
89
-        currentPage: 1, // 当前页码
90
-        pageSize: 10,
91
-        total: 0,
90
+        page: 1, // 当前页码
91
+        pagesize: 10,
92 92
       },
93 93
       tableSearch: { // 表格搜索条件
94 94
         key: '', // 搜索关键字
@@ -113,15 +113,13 @@ export default {
113 113
   methods: {
114 114
     ...mapCmsActions(['updateLocationInfo']),
115 115
     handleCurrentChange (val) {
116
-      console.log(`当前页: ${val}`)
116
+      this.postData.page = val
117 117
       this.getList()
118 118
     },
119 119
     handleEdit (index, row) { // 编辑
120
-      console.log(index, row)
121 120
       this.$router.push({ name: 'editNews', query: { id: row.NewsId } })
122 121
     },
123 122
     handleDelete (index, row) { // 删除
124
-      console.log(index, row)
125 123
       this.$confirm('确认删除此资讯?', '提示', {
126 124
         confirmButtonText: '确定',
127 125
         cancelButtonText: '取消',
@@ -136,6 +134,8 @@ export default {
136 134
       })
137 135
     },
138 136
     searchList (key) { // 搜索列表
137
+      this.postData.page = 1
138
+      this.total = 1
139 139
       this.tableSearch.key = key
140 140
       this.getList()
141 141
     },
@@ -147,8 +147,7 @@ export default {
147 147
       this.$ajax(this.$api.cms.news.url, {
148 148
         method: this.$api.cms.news.method,
149 149
         queryData: {
150
-          page: this.postData.currentPage,
151
-          pagesize: this.postData.pageSize,
150
+          ...this.postData,
152 151
           locationid: this.tableSearch.LocationId,
153 152
           title: this.tableSearch.key
154 153
         }
@@ -157,8 +156,8 @@ export default {
157 156
           res.list[i].Status === 1 ? res.list[i].StatusShow = '是' : res.list[i].StatusShow = '否'
158 157
         }
159 158
         this.tableData = res.list
160
-        this.postData.total = res.pagenum
161
-        this.postData.currentPage = res.page
159
+        this.total = res.pagenum
160
+        this.postData.page = res.page
162 161
       }).catch(msg => {
163 162
 
164 163
       })

+ 26
- 12
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -83,7 +83,7 @@ import { createNamespacedHelpers, mapState, mapActions } from 'vuex'
83 83
 import { getLodop } from '@/util/LodopFuncs'
84 84
 
85 85
 import { formatTimeBySeconds } from '@/util/util'
86
-
86
+// const WebSocket = require('ws')
87 87
 const { mapState: mapOrderState, mapActions: mapOrderActions } = createNamespacedHelpers('goodsorder')
88 88
 
89 89
 var LODOP
@@ -130,8 +130,12 @@ export default {
130 130
       }
131 131
     })
132 132
   },
133
+  mounted () {
134
+    setTimeout(window.location.reload, 600 * 1000)
135
+  },
133 136
   methods: {
134 137
     init () {
138
+      var param = []
135 139
       if (!this.caseid) {
136 140
         this.$message({
137 141
           type: 'info',
@@ -141,16 +145,27 @@ export default {
141 145
       }
142 146
       clearInterval(this.interval)
143 147
       this.GetOrdersList({ caseid: this.caseid }).then((res) => {
144
-        // console.log(JSON.stringify(res))
145 148
         for (var n = 0; n < res.list.length; n++) {
146 149
           if (res.list[n].IsIntimidate === 0) {
147
-            this.printPdf(`item_${res.list[n].OrdersId}`).then(() => {
148
-              this.putPrintGoodsOrder({
149
-                id: res.list[n].OrdersId
150
-              })
151
-            })
150
+            param.push(res.list[n].OrdersId)
152 151
           }
153 152
         }
153
+        var bool = true
154
+        var timer = setInterval(() => {
155
+          if (param.length && bool) {
156
+            bool = false
157
+            this.printPdf(`item_${param[0]}`)
158
+            console.log(param[0])
159
+            this.putPrintGoodsOrder({
160
+              id: param[0]
161
+            }).then(() => {
162
+              param.splice(0, 1)
163
+              bool = true
164
+            })
165
+          } else {
166
+            clearInterval(timer)
167
+          }
168
+        }, 300)
154 169
         this.getBusinessStatus(this.caseid).then(() => {
155 170
           if (this.businessStatus) {
156 171
             this.initWebSocket()
@@ -232,11 +247,8 @@ export default {
232 247
       })
233 248
     },
234 249
     printPdf (cl) {
235
-      return new Promise((resolve) => {
236
-        this.CreateOneFormPage(cl)
237
-        LODOP.PRINT()
238
-        resolve()
239
-      })
250
+      this.CreateOneFormPage(cl)
251
+      LODOP.PRINT()
240 252
     },
241 253
     CreateOneFormPage (cl) {
242 254
       LODOP = getLodop()
@@ -258,6 +270,8 @@ export default {
258 270
       this.websock.onopen = console.log
259 271
       this.websock.onmessage = this.websocketonmessage
260 272
       this.websock.onclose = console.log
273
+
274
+      setInterval(() => this.websock.send(10), 120000)
261 275
     },
262 276
     websocketonmessage (e) {
263 277
       // let oldList = this.list

+ 2
- 2
src/util/api.js View File

@@ -1,5 +1,5 @@
1
-// const baseUrl = '/api-v2'
2
-const baseUrl = '/api'
1
+const baseUrl = '/api-v2'
2
+// const baseUrl = '/api'
3 3
 const common = '/common/:org'
4 4
 const guest = '/guest/:org'
5 5