manage-client 3.2.61-aode → 3.2.62-aode

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,193 +1,193 @@
1
- var express = require('express')
2
- var webpack = require('webpack')
3
- var config = require('./webpack.dev.conf')
4
- var proxyMiddleware = require('http-proxy-middleware')
5
- // var httpProxy = require('http-proxy')
6
-
7
- var app = express()
8
- var compiler = webpack(config)
9
- // var proxy = httpProxy.createProxyServer()
10
-
11
- // Define HTTP proxies to your custom API backend
12
- // https://github.com/chimurai/http-proxy-middleware
13
- // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
- // var str = 'http://127.0.0.1:8080/manage', str2 = 'http://192.168.50.199:8300'
15
- var str = 'http://192.168.10.14:8300', fuwu = 'http://192.168.10.233:8300', bendi = 'http://localhost:9025/'
16
- // var str = 'http://121.36.106.17:8400' , fuwu = 'http://121.36.106.17:8400' , bendi = 'http://192.168.10.14:8300'
17
- var proxyTable = {
18
-
19
- '/rs/easyexcel/': {
20
- target: 'http://192.168.10.14:8600/manage/'
21
- },
22
- '/rs/logic/exportfile': {
23
- target: fuwu
24
- },
25
- '/rs/sql/aode_YearByChargeType':{
26
- target:fuwu+"/staticpage/yearbychargetype/"
27
- },
28
- '/rs/sql/aode_YearByUserType':{
29
- target:fuwu+"/staticpage/yearbyusertype/"
30
- },
31
- '/rs/sql/aode_monthByChargeType':{
32
- target:fuwu+"/staticpage/monthbychargetype/"
33
- },
34
- '/files': {
35
- target: fuwu
36
- },
37
- // 查找资源服务数据
38
- '/rs/search': {
39
- target: fuwu
40
- },
41
- '/rs/ckh/singleTableParam': {
42
- target: fuwu
43
- },
44
- '/rs/easyexcel/exportCkh': {
45
- target: fuwu
46
- },
47
-
48
- '/rs/sql/webmeter_getNewHandChanceList': {
49
- target: bendi
50
- },
51
-
52
- '/rs/logic/chargevaluesave': {
53
- target: 'http://localhost:8025'
54
- },
55
- '/rs/logic/chargevalueaddinfo': {
56
- target: 'http://localhost:8025'
57
- },
58
- '/rs/logic/valueaddinfo': {
59
- target: 'http://localhost:8025'
60
- },
61
- // 查找资源服务数据
62
- '/rs/logic/getLogin': {
63
- target: fuwu
64
- },
65
- // 查找资源服务数据
66
- '/rs/logic/getInitData': {
67
- target: fuwu
68
- },
69
- // 用户登录服务地址
70
- '/rs/user': {
71
- target: fuwu
72
- },
73
- '/rs/path/getParams': {
74
- target: fuwu
75
- },
76
- '/rs/data': {
77
- target: fuwu
78
- },
79
- '/rs/license': {
80
- target: fuwu
81
- },
82
- '/rs/db': {
83
- target: fuwu
84
- },
85
- '/excel': {
86
- target: fuwu
87
- },
88
- '/rs/config': {
89
- target: fuwu
90
- },
91
- '/rs/sql/getLicenseById': {
92
- target: fuwu
93
- },
94
- '/rs/report': {
95
- target: fuwu
96
- },
97
- '/rs/vue': {
98
- target: fuwu
99
- },
100
- '/rs': {
101
- target: fuwu
102
- }
103
- }
104
-
105
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
106
- publicPath: config.output.publicPath,
107
- stats: {
108
- colors: true,
109
- chunks: false
110
- }
111
- })
112
-
113
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
114
- // force page reload when html-webpack-plugin template changes
115
- compiler.plugin('compilation', function (compilation) {
116
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
117
- hotMiddleware.publish({action: 'reload'})
118
- cb()
119
- })
120
- })
121
-
122
- // proxy api requests
123
- Object.keys(proxyTable).forEach(function (context) {
124
- var options = proxyTable[context]
125
- if (typeof options === 'string') {
126
- options = {target: options}
127
- }
128
- app.use(proxyMiddleware(context, options))
129
- })
130
-
131
- // handle fallback for HTML5 history API
132
- app.use(require('connect-history-api-fallback')())
133
- // app.use(function (req, res, next) {
134
- // res.header('Access-Control-Allow-Origin', '*')
135
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
136
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
137
- // res.header('X-Powered-By', '3,2,1')
138
- // res.header('Access-Control-Allow-Credentials', 'true')
139
- // res.header('Content-Type', 'application/json;charset=utf-8')
140
- // next()
141
- // })
142
-
143
- // serve webpack bundle output
144
- app.use(devMiddleware)
145
-
146
- // enable hot-reload and state-preserving
147
- // compilation error display
148
- app.use(hotMiddleware)
149
-
150
- // serve pure static assets
151
- app.use('/static', express.static('./static'))
152
-
153
- // app.all('/rs/*', function (req, res) {
154
- // proxy.web(req, res, {
155
- // target: 'http://127.0.0.1:8081/reports'
156
- // })
157
- // })
158
-
159
- // app.all('/rs/*', function (req, res) {
160
- // proxy.web(req, res, {
161
- // target: 'http://127.0.0.1:8081/ldap'
162
- // })
163
- // })
164
- // app.all('/excel/*', function (req, res) {
165
- // proxy.web(req, res, {
166
- // target: 'http://127.0.0.1:8081/charge'
167
- // })
168
- // })
169
-
170
- // app.all('/rs/*', function (req, res) {
171
- // proxy.web(req, res, {
172
- // target: 'http://127.0.0.1:82/charge'
173
- // })
174
- // })
175
-
176
- // app.all('/*', function (req, res) {
177
- // proxy.web(req, res, {
178
- // target: 'http://127.0.0.1:82'
179
- // })
180
- // })
181
- // app.all('/rs/user', function (req, res) {
182
- // proxy.web(req, res, {
183
- // target: 'http://127.0.0.1:82'
184
- // })
185
- // })
186
-
187
- module.exports = app.listen(8099, function (err) {
188
- if (err) {
189
- console.log(err)
190
- return
191
- }
192
- console.log('Listening at http://localhost:8099')
193
- })
1
+ var express = require('express')
2
+ var webpack = require('webpack')
3
+ var config = require('./webpack.dev.conf')
4
+ var proxyMiddleware = require('http-proxy-middleware')
5
+ // var httpProxy = require('http-proxy')
6
+
7
+ var app = express()
8
+ var compiler = webpack(config)
9
+ // var proxy = httpProxy.createProxyServer()
10
+
11
+ // Define HTTP proxies to your custom API backend
12
+ // https://github.com/chimurai/http-proxy-middleware
13
+ // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
+ // var str = 'http://127.0.0.1:8080/manage', str2 = 'http://192.168.50.199:8300'
15
+ var str = 'http://192.168.10.14:8300', fuwu = 'http://192.168.10.233:8300', bendi = 'http://localhost:9025/'
16
+ // var str = 'http://121.36.106.17:8400' , fuwu = 'http://121.36.106.17:8400' , bendi = 'http://192.168.10.14:8300'
17
+ var proxyTable = {
18
+
19
+ '/rs/easyexcel/': {
20
+ target: fuwu
21
+ },
22
+ '/rs/logic/exportfile': {
23
+ target: fuwu
24
+ },
25
+ '/rs/sql/aode_YearByChargeType':{
26
+ target:fuwu+"/staticpage/yearbychargetype/"
27
+ },
28
+ '/rs/sql/aode_YearByUserType':{
29
+ target:fuwu+"/staticpage/yearbyusertype/"
30
+ },
31
+ '/rs/sql/aode_monthByChargeType':{
32
+ target:fuwu+"/staticpage/monthbychargetype/"
33
+ },
34
+ '/files': {
35
+ target: fuwu
36
+ },
37
+ // 查找资源服务数据
38
+ '/rs/search': {
39
+ target: fuwu
40
+ },
41
+ '/rs/ckh/singleTableParam': {
42
+ target: fuwu
43
+ },
44
+ '/rs/easyexcel/exportCkh': {
45
+ target: fuwu
46
+ },
47
+
48
+ '/rs/sql/webmeter_getNewHandChanceList': {
49
+ target: bendi
50
+ },
51
+
52
+ '/rs/logic/chargevaluesave': {
53
+ target: 'http://localhost:8025'
54
+ },
55
+ '/rs/logic/chargevalueaddinfo': {
56
+ target: 'http://localhost:8025'
57
+ },
58
+ '/rs/logic/valueaddinfo': {
59
+ target: 'http://localhost:8025'
60
+ },
61
+ // 查找资源服务数据
62
+ '/rs/logic/getLogin': {
63
+ target: fuwu
64
+ },
65
+ // 查找资源服务数据
66
+ '/rs/logic/getInitData': {
67
+ target: fuwu
68
+ },
69
+ // 用户登录服务地址
70
+ '/rs/user': {
71
+ target: fuwu
72
+ },
73
+ '/rs/path/getParams': {
74
+ target: fuwu
75
+ },
76
+ '/rs/data': {
77
+ target: fuwu
78
+ },
79
+ '/rs/license': {
80
+ target: fuwu
81
+ },
82
+ '/rs/db': {
83
+ target: fuwu
84
+ },
85
+ '/excel': {
86
+ target: fuwu
87
+ },
88
+ '/rs/config': {
89
+ target: fuwu
90
+ },
91
+ '/rs/sql/getLicenseById': {
92
+ target: fuwu
93
+ },
94
+ '/rs/report': {
95
+ target: fuwu
96
+ },
97
+ '/rs/vue': {
98
+ target: fuwu
99
+ },
100
+ '/rs': {
101
+ target: fuwu
102
+ }
103
+ }
104
+
105
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
106
+ publicPath: config.output.publicPath,
107
+ stats: {
108
+ colors: true,
109
+ chunks: false
110
+ }
111
+ })
112
+
113
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
114
+ // force page reload when html-webpack-plugin template changes
115
+ compiler.plugin('compilation', function (compilation) {
116
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
117
+ hotMiddleware.publish({action: 'reload'})
118
+ cb()
119
+ })
120
+ })
121
+
122
+ // proxy api requests
123
+ Object.keys(proxyTable).forEach(function (context) {
124
+ var options = proxyTable[context]
125
+ if (typeof options === 'string') {
126
+ options = {target: options}
127
+ }
128
+ app.use(proxyMiddleware(context, options))
129
+ })
130
+
131
+ // handle fallback for HTML5 history API
132
+ app.use(require('connect-history-api-fallback')())
133
+ // app.use(function (req, res, next) {
134
+ // res.header('Access-Control-Allow-Origin', '*')
135
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
136
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
137
+ // res.header('X-Powered-By', '3,2,1')
138
+ // res.header('Access-Control-Allow-Credentials', 'true')
139
+ // res.header('Content-Type', 'application/json;charset=utf-8')
140
+ // next()
141
+ // })
142
+
143
+ // serve webpack bundle output
144
+ app.use(devMiddleware)
145
+
146
+ // enable hot-reload and state-preserving
147
+ // compilation error display
148
+ app.use(hotMiddleware)
149
+
150
+ // serve pure static assets
151
+ app.use('/static', express.static('./static'))
152
+
153
+ // app.all('/rs/*', function (req, res) {
154
+ // proxy.web(req, res, {
155
+ // target: 'http://127.0.0.1:8081/reports'
156
+ // })
157
+ // })
158
+
159
+ // app.all('/rs/*', function (req, res) {
160
+ // proxy.web(req, res, {
161
+ // target: 'http://127.0.0.1:8081/ldap'
162
+ // })
163
+ // })
164
+ // app.all('/excel/*', function (req, res) {
165
+ // proxy.web(req, res, {
166
+ // target: 'http://127.0.0.1:8081/charge'
167
+ // })
168
+ // })
169
+
170
+ // app.all('/rs/*', function (req, res) {
171
+ // proxy.web(req, res, {
172
+ // target: 'http://127.0.0.1:82/charge'
173
+ // })
174
+ // })
175
+
176
+ // app.all('/*', function (req, res) {
177
+ // proxy.web(req, res, {
178
+ // target: 'http://127.0.0.1:82'
179
+ // })
180
+ // })
181
+ // app.all('/rs/user', function (req, res) {
182
+ // proxy.web(req, res, {
183
+ // target: 'http://127.0.0.1:82'
184
+ // })
185
+ // })
186
+
187
+ module.exports = app.listen(8079, function (err) {
188
+ if (err) {
189
+ console.log(err)
190
+ return
191
+ }
192
+ console.log('Listening at http://localhost:8079')
193
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.2.61-aode",
3
+ "version": "3.2.62-aode",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {