apply-clients 5.0.361 → 6.0.3
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.
- package/build/css-loaders.js +34 -0
- package/build/dev-android.js +101 -0
- package/build/dev-client.js +8 -0
- package/build/dev-server-app.js +76 -0
- package/build/dev-server.js +72 -0
- package/build/example-server.js +80 -0
- package/build/release.sh +28 -0
- package/build/utils.js +80 -0
- package/build/webpack.base.conf.js +83 -0
- package/build/webpack.baseandroid.conf.js +84 -0
- package/build/webpack.dev.conf.js +39 -0
- package/build/webpack.devandroid.conf.js +34 -0
- package/build/webpack.example.conf.js +49 -0
- package/build/webpack.prod.conf.js +60 -0
- package/build/webpack.prodandroid.conf.js +60 -0
- package/build/webpack.test.conf.js +31 -0
- package/dist-android/static/.gitkeep +0 -0
- package/dist-android/static/batchleft.png +0 -0
- package/dist-android/static/batchright.png +0 -0
- package/dist-android/static/bluemainbg.jpg +0 -0
- package/dist-android/static/huangtengbiaozhi.png +0 -0
- package/dist-android/static/login_bg.jpg +0 -0
- package/dist-android/static/login_title.png +0 -0
- package/dist-android/static/login_title1.png +0 -0
- package/dist-android/static/loginbg.jpg +0 -0
- package/dist-android/static/loginlogo.png +0 -0
- package/dist-android/static/main_logo.png +0 -0
- package/dist-android/static/mainbg.jpg +0 -0
- package/dist-android/static/menulogo.png +0 -0
- package/dist-android/static/newmainbg.jpg +0 -0
- package/dist-android/static/psicon.png +0 -0
- package/dist-android/static/singleleft.png +0 -0
- package/dist-android/static/singleright.png +0 -0
- package/dist-android/static/treeopen.png +0 -0
- package/dist-android/static/treeout.png +0 -0
- package/dist-android/static/treeset.png +0 -0
- package/dist-android/static/usericon.png +0 -0
- package/dist-android/static/xinxi.png +0 -0
- package/package.json +5 -10
- package/src/AndroidApp.vue +1 -1
- package/src/App.vue +0 -1
- package/src/apply.js +172 -104
- package/src/applyAndroid.js +0 -5
- package/src/assets/shipin1.mp4 +0 -0
- package/src/bootstrap/less/bootstrap.less +2 -1
- package/src/components/Hello.vue +39 -0
- package/src/components/Table.js +2 -2
- package/src/components/Test.vue +26 -0
- package/src/components/Util.js +6 -11
- package/src/components/app_apply/Acceptance.vue +2 -7
- package/src/components/app_apply/ApplyApp.vue +6 -16
- package/src/components/app_apply/ApplyInfo.vue +1 -1
- package/src/components/app_apply/ApplyListUpload.vue +3 -3
- package/src/components/app_apply/ApplyToDoList.vue +3 -3
- package/src/components/app_apply/ApplyUserInfo.vue +3 -2
- package/src/components/app_apply/FieldExploration.vue +1 -3
- package/src/components/app_apply/PlaceControler.vue +49 -38
- package/src/components/{product/VueUtils → apply/base}/rightview/InstallCardList2.vue +38 -29
- package/src/components/{product/VueUtils → apply/base}/rightview/carddetail/ReduceFeeDetail2.vue +77 -77
- package/src/components/{product/VueUtils → apply/base}/rightview/carddetail/StopApplyDetail2.vue +1 -1
- package/src/components/build/Install/ApplyChargeSearch.vue +210 -0
- package/src/components/build/Install/ExplorationSelect.vue +308 -0
- package/src/components/build/Install/ExplorationUser.vue +315 -0
- package/src/components/build/Install/InstallFee/AddContract.vue +257 -0
- package/src/components/build/Install/InstallFee/InstallFee.vue +929 -0
- package/src/components/build/Install/InstallFee/InstallFee2.vue +291 -0
- package/src/components/{product/Function/functions → build/Install/InstallFee}/InstallFeeInfo.vue +11 -42
- package/src/components/build/Install/InstallFee/InstallFunction.vue +242 -0
- package/src/components/build/Install/InstallFee/InstallInfoSelect.vue +232 -0
- package/src/components/{product/Process → build/Install}/ModifyUserFiles.vue +1 -1
- package/src/components/build/Install/Process/BuildJob.vue +242 -0
- package/src/components/build/Install/Process/ContratSigne.vue +283 -0
- package/src/components/build/Install/Process/CustomerEssentialInfo.vue +325 -0
- package/src/components/build/Install/Process/CustomerFile.vue +423 -0
- package/src/components/build/Install/Process/CustomerMaterialMessage.vue +414 -0
- package/src/components/build/Install/Process/CustomerRecordMessage.vue +749 -0
- package/src/components/build/Install/Process/DispatchingJob.vue +261 -0
- package/src/components/build/Install/Process/FeeNorme.vue +252 -0
- package/src/components/build/Install/Process/FeeNormeAndContratSigne.vue +376 -0
- package/src/components/build/Install/Process/FeeVerifier.vue +199 -0
- package/src/components/build/Install/Process/IgnitionVentilation.vue +232 -0
- package/src/components/build/Install/Process/MeterType.vue +379 -0
- package/src/components/build/Install/Process/PlaceControler.vue +304 -0
- package/src/components/build/Install/Process/ProjeterFigure.vue +211 -0
- package/src/components/build/Install/Process/ReceivingNote.vue +317 -0
- package/src/components/build/Install/Process/boneng/qbj_placecontroler.vue +370 -0
- package/src/components/build/Install/Process/zhongran/ZR_Construction.vue +388 -0
- package/src/components/build/Install/Process/zhongran/ZR_ContratSigne.vue +496 -0
- package/src/components/build/Install/Process/zhongran/ZR_CustomerEssentialInfo.vue +415 -0
- package/src/components/build/Install/Process/zhongran/ZR_DispatchingJob.vue +409 -0
- package/src/components/build/Install/Process/zhongran/ZR_FeeNorme.vue +342 -0
- package/src/components/build/Install/Process/zhongran/ZR_IgnitionVentilation.vue +253 -0
- package/src/components/build/Install/Process/zhongran/ZR_IgnitionVentilation_transfer.vue +198 -0
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlan.vue +259 -0
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlanExamine.vue +243 -0
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler.vue +426 -0
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler_print.vue +187 -0
- package/src/components/build/Install/Process/zhongran/ZR_ReceivingNote.vue +404 -0
- package/src/components/build/Install/Process/zhongran/ZR_ReceivingNote1.vue +301 -0
- package/src/components/build/Install/Process/zhongran/ZR_TestDesign.vue +441 -0
- package/src/components/build/Install/Process/zhongran/ZR_end.vue +20 -0
- package/src/components/build/Install/ProcessInfo/BasicInfo.vue +68 -0
- package/src/components/build/Install/ProcessInfo/BuildInfo.vue +110 -0
- package/src/components/build/Install/ProcessInfo/ContratProcessInfo.vue +116 -0
- package/src/components/build/Install/ProcessInfo/DispatchingInfo.vue +114 -0
- package/src/components/build/Install/ProcessInfo/FeeNormeInfo.vue +108 -0
- package/src/components/build/Install/ProcessInfo/FeeVerifierInfo.vue +102 -0
- package/src/components/build/Install/ProcessInfo/IgnitionInfo.vue +99 -0
- package/src/components/build/Install/ProcessInfo/MeterProcessInfo.vue +114 -0
- package/src/components/build/Install/ProcessInfo/PlaceProcessInfo.vue +115 -0
- package/src/components/build/Install/ProcessInfo/ProjeterProcessInfo.vue +107 -0
- package/src/components/build/Install/ProcessInfo/ReceivingInfo.vue +107 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_BasicInfo.vue +74 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_BuildInfo.vue +114 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_ContratProcessInfo.vue +114 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_DispatchingInfo.vue +119 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_FeeNormeInfo.vue +105 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_IgnitionInfo.vue +99 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_MaterialPlan_info.vue +104 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_PlaceProcessInfo.vue +109 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_ReceivingInfo.vue +102 -0
- package/src/components/build/Install/ProcessInfo/zhongran/ZR_ignition_transfer_info.vue +104 -0
- package/src/components/{product/Bill → build/Install/bill}/BillXSDMakeInfo.vue +1 -1
- package/src/components/build/Install/monitor/SupervisoryControl.vue +178 -0
- package/src/components/build/Install/monitor/SupervisoryList.vue +209 -0
- package/src/components/{product/Supervisory → build/Install/monitor}/SupervisoryhCart.vue +3 -29
- package/src/components/product/Process/Processes/Service/ServiceControl.vue +91 -1718
- package/src/main.js +2 -9
- package/src/stores/ApplyLoadParams.js +1 -1
- package/src/bootstrap/less/standard.less +0 -208
- package/src/components/app_apply/ServiceControl.vue +0 -442
- package/src/components/app_apply/ServiceView.vue +0 -356
- package/src/components/product/Common/ApplyValidateBill.vue +0 -55
- package/src/components/product/Common/PrintBill.vue +0 -120
- package/src/components/product/Function/InstallFunction.vue +0 -142
- package/src/components/product/Function/InstallInfoSelect.vue +0 -254
- package/src/components/product/Function/Service/FunctionServiceControl.vue +0 -328
- package/src/components/product/Function/functions/AddContract.vue +0 -301
- package/src/components/product/Function/functions/BuyerMessage.vue +0 -512
- package/src/components/product/Function/functions/InstallFee.vue +0 -919
- package/src/components/product/Function/functions/material_recording.vue +0 -237
- package/src/components/product/MaterialBatchList.vue +0 -109
- package/src/components/product/MaterialBatchManage.vue +0 -34
- package/src/components/product/Process/ExplorationSelect.vue +0 -636
- package/src/components/product/Process/ExplorationUser.vue +0 -131
- package/src/components/product/Process/MaterialUseList.vue +0 -159
- package/src/components/product/Process/ProcessInfo/history_control.vue +0 -134
- package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +0 -776
- package/src/components/product/Process/Processes/CustomerRecordMessage.vue +0 -910
- package/src/components/product/Process/Processes/ProjectSettlement.vue +0 -383
- package/src/components/product/Process/Processes/ReceiveBatch.vue +0 -957
- package/src/components/product/Process/Processes/SendOrder.vue +0 -47
- package/src/components/product/Process/Processes/Service/ApplyAcceptBill.vue +0 -89
- package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +0 -305
- package/src/components/product/Process/Processes/Service/GasStop.vue +0 -96
- package/src/components/product/Process/ShowBackReason.vue +0 -18
- package/src/components/product/ServiceView.vue +0 -800
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +0 -407
- package/src/components/product/Supervisory/SupervisoryControl.vue +0 -130
- package/src/components/product/Supervisory/SupervisoryList.vue +0 -349
- package/src/components/product/stopInfo/ApplyStopInfo.vue +0 -280
- package/src/plugins/commonService.js +0 -229
- package/yarn.lock +0 -8072
- /package/src/components/{product/VueUtils → apply/base}/ToolsPage.vue +0 -0
- /package/src/components/{product/VueUtils → apply/base}/rightview/carddetail/BuildFeeDetail2.vue +0 -0
- /package/src/components/{product/VueUtils → apply/base}/rightview/carddetail/ChangeFeeDetail2.vue +0 -0
- /package/src/components/{product/Function/functions → build/Install/InstallFee}/AllSelect.vue +0 -0
- /package/src/components/{product/Function → build/Install/InstallFee}/InstallInfoDown.vue +0 -0
- /package/src/components/{product/Function/functions → build/Install/InstallFee}/PreparationFee.vue +0 -0
- /package/src/components/{product/Function/functions → build/Install/InstallFee}/PrestoreFee.vue +0 -0
- /package/src/components/{product/Function/functions → build/Install/InstallFee}/ReduceFee.vue +0 -0
- /package/src/components/{product/Function/functions → build/Install/InstallFee}/StopInstall.vue +0 -0
- /package/src/components/{product/Function/functions → build/Install/InstallFee}/UpdateFee.vue +0 -0
- /package/src/components/{product/Process/Processes → build/Install/Process}/CustomerBuildingMessage.vue +0 -0
- /package/src/components/{product/Process/Processes → build/Install/Process}/CustomerEquipmentMessage.vue +0 -0
- /package/src/components/{product/Function/functions → build/Install/ProcessInfo}/ApplyRecordCancel.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillGZK.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillGZKMakeInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillGZKRecordInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillJLB.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillJLBMakeInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillJLBRecordInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillKTK.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillKTKMakeInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillKTKRecordInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillQRK.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillQRKMakeInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillQRKRecordInfo.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillSelect.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillXSD.vue +0 -0
- /package/src/components/{product/Bill → build/Install/bill}/BillXSDRecordInfo.vue +0 -0
- /package/src/components/{product/Supervisory → build/Install/monitor}/SupervisoryBaseInfo.vue +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
|
2
|
+
|
|
3
|
+
module.exports = function (options) {
|
|
4
|
+
// generate loader string to be used with extract text plugin
|
|
5
|
+
function generateLoaders (loaders) {
|
|
6
|
+
var sourceLoader = loaders.map(function (loader) {
|
|
7
|
+
var extraParamChar
|
|
8
|
+
if (/\?/.test (loader)) {
|
|
9
|
+
loader = loader.replace(/\?/, '-loader?')
|
|
10
|
+
extraParamChar = '&'
|
|
11
|
+
} else {
|
|
12
|
+
loader = loader + '-loader'
|
|
13
|
+
extraParamChar = '?'
|
|
14
|
+
}
|
|
15
|
+
return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
|
|
16
|
+
}).join('!')
|
|
17
|
+
|
|
18
|
+
if (options.extract) {
|
|
19
|
+
return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
|
|
20
|
+
} else {
|
|
21
|
+
return ['vue-style-loader', sourceLoader].join('!')
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// http://vuejs.github.io/vue-loader/configurations/extract-css.html
|
|
26
|
+
return {
|
|
27
|
+
css: generateLoaders(['css']),
|
|
28
|
+
less: generateLoaders(['css', 'less']),
|
|
29
|
+
sass: generateLoaders(['css', 'sass?indentedSyntax']),
|
|
30
|
+
scss: generateLoaders(['css', 'sass']),
|
|
31
|
+
stylus: generateLoaders(['css', 'stylus']),
|
|
32
|
+
styl: generateLoaders(['css', 'stylus'])
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var express = require('express')
|
|
2
|
+
var webpack = require('webpack')
|
|
3
|
+
var config = require('./webpack.devandroid.conf')
|
|
4
|
+
var proxyMiddleware = require('http-proxy-middleware')
|
|
5
|
+
var http = require('http')
|
|
6
|
+
// var httpProxy = require('http-proxy')
|
|
7
|
+
|
|
8
|
+
var app = express()
|
|
9
|
+
var compiler = webpack(config)
|
|
10
|
+
// var proxy = httpProxy.createProxyServer()
|
|
11
|
+
|
|
12
|
+
// Define HTTP proxies to your custom API backend
|
|
13
|
+
// https://github.com/chimurai/http-proxy-middleware
|
|
14
|
+
var proxyTable = {
|
|
15
|
+
// '/materials': {
|
|
16
|
+
// target: 'http://192.168.50.202:8081'
|
|
17
|
+
// },
|
|
18
|
+
// '/images': {
|
|
19
|
+
// // target: 'http://192.168.50.202:8081'
|
|
20
|
+
// target: 'http://192.168.50.202:8081'
|
|
21
|
+
// },
|
|
22
|
+
// '/rs/user': {
|
|
23
|
+
// target: 'http://192.168.50.202:8081'
|
|
24
|
+
// // target: 'http://127.0.0.1:82'
|
|
25
|
+
// },
|
|
26
|
+
// '/SaleRest/rs': {
|
|
27
|
+
// // target: 'http://127.0.0.1:8082'
|
|
28
|
+
// target: 'http://127.0.0.1:8081/'
|
|
29
|
+
// },
|
|
30
|
+
// '/rs/db': {
|
|
31
|
+
// // target: 'http://192.168.50.202:8081'
|
|
32
|
+
// target: 'http://192.168.50.202:8081'
|
|
33
|
+
// },
|
|
34
|
+
// '/excel': {
|
|
35
|
+
// // target: 'http://127.0.0.1:8082'
|
|
36
|
+
// target: 'http://127.0.0.1:8081/'
|
|
37
|
+
// },
|
|
38
|
+
'/rs': {
|
|
39
|
+
// target: 'http://127.0.0.1:8082'
|
|
40
|
+
target: 'http://127.0.0.1:8077'
|
|
41
|
+
},
|
|
42
|
+
'/AndroidRest/rs': {
|
|
43
|
+
// // target: 'http://127.0.0.1:8082'
|
|
44
|
+
target: 'http://127.0.0.1:8077'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
49
|
+
publicPath: config.output.publicPath,
|
|
50
|
+
stats: {
|
|
51
|
+
colors: true,
|
|
52
|
+
chunks: false
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
57
|
+
// force page reload when html-webpack-plugin template changes
|
|
58
|
+
compiler.plugin('compilation', function (compilation) {
|
|
59
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
60
|
+
hotMiddleware.publish({ action: 'reload' })
|
|
61
|
+
cb()
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
// handle fallback for HTML5 history API
|
|
66
|
+
app.use(require('connect-history-api-fallback')())
|
|
67
|
+
|
|
68
|
+
// serve webpack bundle output
|
|
69
|
+
app.use(devMiddleware)
|
|
70
|
+
|
|
71
|
+
// enable hot-reload and state-preserving
|
|
72
|
+
// compilation error display
|
|
73
|
+
app.use(hotMiddleware)
|
|
74
|
+
|
|
75
|
+
// serve pure static assets
|
|
76
|
+
app.use('/static', express.static('./static'))
|
|
77
|
+
|
|
78
|
+
// proxy api requests
|
|
79
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
80
|
+
var options = proxyTable[context]
|
|
81
|
+
if (typeof options === 'string') {
|
|
82
|
+
options = { target: options }
|
|
83
|
+
}
|
|
84
|
+
// 改变源实现跨域
|
|
85
|
+
//options.changeOrigin = true
|
|
86
|
+
Object.assign(options, {
|
|
87
|
+
onProxyRes(proxyRes, req, res) {
|
|
88
|
+
// res.header('Access-Control-Allow-Origin', '*')
|
|
89
|
+
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
app.use(proxyMiddleware(context, options))
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
app.listen(8082, function (err) {
|
|
96
|
+
if (err) {
|
|
97
|
+
console.log(err)
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
console.log('Listening at http://localhost:8082')
|
|
101
|
+
})
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
var app = express()
|
|
7
|
+
var compiler = webpack(config)
|
|
8
|
+
// var proxy = httpProxy.createProxyServer()
|
|
9
|
+
|
|
10
|
+
// Define HTTP proxies to your custom API backend
|
|
11
|
+
// https://github.com/chimurai/http-proxy-middleware
|
|
12
|
+
var proxyTable = {
|
|
13
|
+
'/rs': {
|
|
14
|
+
target: 'http://192.168.30.94:8555'
|
|
15
|
+
// target: 'http://192.168.30.86:8077'
|
|
16
|
+
},
|
|
17
|
+
'/AndroidRest/rs': {
|
|
18
|
+
target: 'http://192.168.30.94:8555'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
23
|
+
publicPath: config.output.publicPath,
|
|
24
|
+
stats: {
|
|
25
|
+
colors: true,
|
|
26
|
+
chunks: false
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
31
|
+
// force page reload when html-webpack-plugin template changes
|
|
32
|
+
compiler.plugin('compilation', function (compilation) {
|
|
33
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
34
|
+
hotMiddleware.publish({action: 'reload'})
|
|
35
|
+
cb()
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// proxy api requests
|
|
40
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
41
|
+
var options = proxyTable[context]
|
|
42
|
+
if (typeof options === 'string') {
|
|
43
|
+
options = {target: options}
|
|
44
|
+
}
|
|
45
|
+
app.use(proxyMiddleware(context, options))
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
// handle fallback for HTML5 history API
|
|
49
|
+
app.use(require('connect-history-api-fallback')())
|
|
50
|
+
// app.use(function (req, res, next) {
|
|
51
|
+
// res.header('Access-Control-Allow-Origin', '*')
|
|
52
|
+
// res.header('Access-Control-Allow-Headers', 'X-Requested-With')
|
|
53
|
+
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
54
|
+
// res.header('X-Powered-By', '3,2,1')
|
|
55
|
+
// res.header('Access-Control-Allow-Credentials', 'true')
|
|
56
|
+
// res.header('Content-Type', 'application/json;charset=utf-8')
|
|
57
|
+
// next()
|
|
58
|
+
// })
|
|
59
|
+
|
|
60
|
+
// serve webpack bundle output
|
|
61
|
+
app.use(devMiddleware)
|
|
62
|
+
|
|
63
|
+
// enable hot-reload and state-preserving
|
|
64
|
+
// compilation error display
|
|
65
|
+
app.use(hotMiddleware)
|
|
66
|
+
|
|
67
|
+
// serve pure static assets
|
|
68
|
+
app.use('/static', express.static('./static'))
|
|
69
|
+
|
|
70
|
+
module.exports = app.listen(8089, function (err) {
|
|
71
|
+
if (err) {
|
|
72
|
+
console.log(err)
|
|
73
|
+
return
|
|
74
|
+
}
|
|
75
|
+
console.log('Listening at http://localhost:8089')
|
|
76
|
+
})
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
var app = express()
|
|
7
|
+
var compiler = webpack(config)
|
|
8
|
+
// var proxy = httpProxy.createProxyServer()
|
|
9
|
+
|
|
10
|
+
// Define HTTP proxies to your custom API backend
|
|
11
|
+
// https://github.com/chimurai/http-proxy-middleware
|
|
12
|
+
var proxyTable = {
|
|
13
|
+
'/rs': {
|
|
14
|
+
target: 'http://218.93.226.210:7005'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
19
|
+
publicPath: config.output.publicPath,
|
|
20
|
+
stats: {
|
|
21
|
+
colors: true,
|
|
22
|
+
chunks: false
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
27
|
+
// force page reload when html-webpack-plugin template changes
|
|
28
|
+
compiler.plugin('compilation', function (compilation) {
|
|
29
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
30
|
+
hotMiddleware.publish({action: 'reload'})
|
|
31
|
+
cb()
|
|
32
|
+
})
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
// proxy api requests
|
|
36
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
37
|
+
var options = proxyTable[context]
|
|
38
|
+
if (typeof options === 'string') {
|
|
39
|
+
options = {target: options}
|
|
40
|
+
}
|
|
41
|
+
app.use(proxyMiddleware(context, options))
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
// handle fallback for HTML5 history API
|
|
45
|
+
app.use(require('connect-history-api-fallback')())
|
|
46
|
+
// app.use(function (req, res, next) {
|
|
47
|
+
// res.header('Access-Control-Allow-Origin', '*')
|
|
48
|
+
// res.header('Access-Control-Allow-Headers', 'X-Requested-With')
|
|
49
|
+
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
50
|
+
// res.header('X-Powered-By', '3,2,1')
|
|
51
|
+
// res.header('Access-Control-Allow-Credentials', 'true')
|
|
52
|
+
// res.header('Content-Type', 'application/json;charset=utf-8')
|
|
53
|
+
// next()
|
|
54
|
+
// })
|
|
55
|
+
|
|
56
|
+
// serve webpack bundle output
|
|
57
|
+
app.use(devMiddleware)
|
|
58
|
+
|
|
59
|
+
// enable hot-reload and state-preserving
|
|
60
|
+
// compilation error display
|
|
61
|
+
app.use(hotMiddleware)
|
|
62
|
+
|
|
63
|
+
// serve pure static assets
|
|
64
|
+
app.use('/static', express.static('./static'))
|
|
65
|
+
|
|
66
|
+
module.exports = app.listen(8004, function (err) {
|
|
67
|
+
if (err) {
|
|
68
|
+
console.log(err)
|
|
69
|
+
return
|
|
70
|
+
}
|
|
71
|
+
console.log('Listening at http://localhost:8004')
|
|
72
|
+
})
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var express = require('express')
|
|
2
|
+
var webpack = require('webpack')
|
|
3
|
+
var config = require('./webpack.example.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 proxyTable = {
|
|
14
|
+
// '/api': {
|
|
15
|
+
// target: 'http://jsonplaceholder.typicode.com',
|
|
16
|
+
// changeOrigin: true,
|
|
17
|
+
// pathRewrite: {
|
|
18
|
+
// '^/api': ''
|
|
19
|
+
// }
|
|
20
|
+
// }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
24
|
+
publicPath: config.output.publicPath,
|
|
25
|
+
stats: {
|
|
26
|
+
colors: true,
|
|
27
|
+
chunks: false
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
32
|
+
// force page reload when html-webpack-plugin template changes
|
|
33
|
+
compiler.plugin('compilation', function (compilation) {
|
|
34
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
35
|
+
hotMiddleware.publish({ action: 'reload' })
|
|
36
|
+
cb()
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
// proxy api requests
|
|
41
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
42
|
+
var options = proxyTable[context]
|
|
43
|
+
if (typeof options === 'string') {
|
|
44
|
+
options = { target: options }
|
|
45
|
+
}
|
|
46
|
+
app.use(proxyMiddleware(context, options))
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
// handle fallback for HTML5 history API
|
|
50
|
+
app.use(require('connect-history-api-fallback')())
|
|
51
|
+
|
|
52
|
+
// serve webpack bundle output
|
|
53
|
+
app.use(devMiddleware)
|
|
54
|
+
|
|
55
|
+
// enable hot-reload and state-preserving
|
|
56
|
+
// compilation error display
|
|
57
|
+
app.use(hotMiddleware)
|
|
58
|
+
|
|
59
|
+
// serve pure static assets
|
|
60
|
+
app.use('/static', express.static('./static'))
|
|
61
|
+
|
|
62
|
+
// app.all('/images/*', function (req, res) {
|
|
63
|
+
// proxy.web(req, res, {
|
|
64
|
+
// target: 'http://127.0.0.1:82'
|
|
65
|
+
// })
|
|
66
|
+
// })
|
|
67
|
+
//
|
|
68
|
+
// app.all('/*', function (req, res) {
|
|
69
|
+
// proxy.web(req, res, {
|
|
70
|
+
// target: 'http://127.0.0.1:8082'
|
|
71
|
+
// })
|
|
72
|
+
// })
|
|
73
|
+
|
|
74
|
+
module.exports = app.listen(8081, function (err) {
|
|
75
|
+
if (err) {
|
|
76
|
+
console.log(err)
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
console.log('Listening at http://localhost:8081')
|
|
80
|
+
})
|
package/build/release.sh
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
set -e
|
|
2
|
+
echo "Enter release version: "
|
|
3
|
+
read VERSION
|
|
4
|
+
|
|
5
|
+
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
|
|
6
|
+
echo # (optional) move to a new line
|
|
7
|
+
if [[ $REPLY =~ ^[Yy]$ ]]
|
|
8
|
+
then
|
|
9
|
+
echo "Releasing $VERSION ..."
|
|
10
|
+
|
|
11
|
+
# lint
|
|
12
|
+
npm run lint 2>/dev/null
|
|
13
|
+
|
|
14
|
+
# e2e
|
|
15
|
+
npm run e2e 2>/dev/null
|
|
16
|
+
|
|
17
|
+
#build
|
|
18
|
+
npm run build
|
|
19
|
+
|
|
20
|
+
# commit
|
|
21
|
+
git add -A
|
|
22
|
+
git commit -m "[build] $VERSION"
|
|
23
|
+
npm version $VERSION --message "[release] $VERSION"
|
|
24
|
+
|
|
25
|
+
# publish
|
|
26
|
+
git push origin refs/tags/v$VERSION
|
|
27
|
+
git push
|
|
28
|
+
fi
|
package/build/utils.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var path = require('path')
|
|
2
|
+
var config = require('../config')
|
|
3
|
+
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
|
4
|
+
|
|
5
|
+
exports.assetsPath = function (_path) {
|
|
6
|
+
var assetsSubDirectory = process.env.NODE_ENV === 'production'
|
|
7
|
+
? config.build.assetsSubDirectory
|
|
8
|
+
: config.dev.assetsSubDirectory
|
|
9
|
+
return path.posix.join(assetsSubDirectory, _path)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
exports.cssLoaders = function (options) {
|
|
13
|
+
options = options || {}
|
|
14
|
+
|
|
15
|
+
var cssLoader = {
|
|
16
|
+
loader: 'css-loader',
|
|
17
|
+
options: {
|
|
18
|
+
minimize: process.env.NODE_ENV === 'production',
|
|
19
|
+
sourceMap: options.sourceMap
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/* const px2remLoader = {
|
|
25
|
+
loader: 'px2rem-loader',
|
|
26
|
+
options: {
|
|
27
|
+
remUnit: 37.5
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
*/
|
|
31
|
+
// generate loader string to be used with extract text plugin
|
|
32
|
+
function generateLoaders (loader, loaderOptions) {
|
|
33
|
+
// const loaders = [cssLoader, px2remLoader]
|
|
34
|
+
var loaders = [cssLoader]
|
|
35
|
+
if (loader) {
|
|
36
|
+
loaders.push({
|
|
37
|
+
loader: loader + '-loader',
|
|
38
|
+
options: Object.assign({}, loaderOptions, {
|
|
39
|
+
sourceMap: options.sourceMap
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Extract CSS when that option is specified
|
|
45
|
+
// (which is the case during production build)
|
|
46
|
+
if (options.extract) {
|
|
47
|
+
return ExtractTextPlugin.extract({
|
|
48
|
+
use: loaders,
|
|
49
|
+
fallback: 'vue-style-loader'
|
|
50
|
+
})
|
|
51
|
+
} else {
|
|
52
|
+
return ['vue-style-loader'].concat(loaders)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
|
57
|
+
return {
|
|
58
|
+
css: generateLoaders(),
|
|
59
|
+
postcss: generateLoaders(),
|
|
60
|
+
less: generateLoaders('less'),
|
|
61
|
+
sass: generateLoaders('sass', { indentedSyntax: true }),
|
|
62
|
+
scss: generateLoaders('sass'),
|
|
63
|
+
stylus: generateLoaders('stylus'),
|
|
64
|
+
styl: generateLoaders('stylus')
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Generate loaders for standalone style files (outside of .vue)
|
|
69
|
+
exports.styleLoaders = function (options) {
|
|
70
|
+
var output = []
|
|
71
|
+
var loaders = exports.cssLoaders(options)
|
|
72
|
+
for (var extension in loaders) {
|
|
73
|
+
var loader = loaders[extension]
|
|
74
|
+
output.push({
|
|
75
|
+
test: new RegExp('\\.' + extension + '$'),
|
|
76
|
+
use: loader
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
return output
|
|
80
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var path = require('path')
|
|
2
|
+
var cssLoaders = require('./css-loaders')
|
|
3
|
+
var projectRoot = path.resolve(__dirname, '../')
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
entry: {
|
|
7
|
+
app: './src/main.js',
|
|
8
|
+
'android-app': './src/android.js'
|
|
9
|
+
},
|
|
10
|
+
output: {
|
|
11
|
+
path: path.resolve(__dirname, '../dist/static'),
|
|
12
|
+
publicPath: 'static/',
|
|
13
|
+
filename: '[name].js'
|
|
14
|
+
},
|
|
15
|
+
resolve: {
|
|
16
|
+
extensions: ['', '.js', '.vue'],
|
|
17
|
+
fallback: [path.join(__dirname, '../node_modules')],
|
|
18
|
+
alias: {
|
|
19
|
+
'src': path.resolve(__dirname, '../src')
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
resolveLoader: {
|
|
23
|
+
fallback: [path.join(__dirname, '../node_modules')]
|
|
24
|
+
},
|
|
25
|
+
module: {
|
|
26
|
+
loaders: [
|
|
27
|
+
{
|
|
28
|
+
test: /\.vue$/,
|
|
29
|
+
loader: 'vue'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
test: /\.js$/,
|
|
33
|
+
loader: 'babel',
|
|
34
|
+
include: [
|
|
35
|
+
`${projectRoot}\\src`,
|
|
36
|
+
`${projectRoot}\\build`,
|
|
37
|
+
`${projectRoot}\\examples`,
|
|
38
|
+
`${projectRoot}\\test`,
|
|
39
|
+
`${projectRoot}\\node_modules\\vue-client\\src`,
|
|
40
|
+
`${projectRoot}\\node_modules\\vue-strap\\src`,
|
|
41
|
+
`${projectRoot}\\node_modules\\sale-client\\src`,
|
|
42
|
+
`${projectRoot}\\node_modules\\ldap-clients\\src`,
|
|
43
|
+
`${projectRoot}\\node_modules\\system-clients\\src`,
|
|
44
|
+
`${projectRoot}\\node_modules\\system-phone\\src`
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
test: /\.json$/,
|
|
49
|
+
loader: 'json'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
test: /\.html$/,
|
|
53
|
+
loader: 'vue-html'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
test: /\.less$/,
|
|
57
|
+
loader: 'style!css!less'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
test: /\.(png|jpg|gif|svg|woff2?|eot|ttf)(\?.*)?$/,
|
|
61
|
+
loader: 'url',
|
|
62
|
+
query: {
|
|
63
|
+
limit: 10000,
|
|
64
|
+
name: '[name].[ext]?[hash:7]'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
test: /\.css/,
|
|
69
|
+
loader: 'style!css'
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
vue: {
|
|
74
|
+
loaders: cssLoaders({
|
|
75
|
+
sourceMap: false,
|
|
76
|
+
extract: false
|
|
77
|
+
})
|
|
78
|
+
},
|
|
79
|
+
plugins: [],
|
|
80
|
+
eslint: {
|
|
81
|
+
formatter: require('eslint-friendly-formatter')
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
//path is a built-in node.js module,
|
|
2
|
+
var path = require('path')
|
|
3
|
+
//css-loaders.js in the same directory
|
|
4
|
+
var cssLoaders = require('./css-loaders')
|
|
5
|
+
//__dirname The name of the directory that the currently executing script resides in.
|
|
6
|
+
var projectRoot = path.resolve(__dirname, '../')
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
//entry point
|
|
10
|
+
entry: {
|
|
11
|
+
app: './src/android.js'
|
|
12
|
+
},
|
|
13
|
+
//output
|
|
14
|
+
output: {
|
|
15
|
+
//build output absolute directory
|
|
16
|
+
path: path.resolve(__dirname, '../dist-android/static'),
|
|
17
|
+
//public URL address of the output files when referenced in a browser
|
|
18
|
+
publicPath: './static/',
|
|
19
|
+
filename: '[name].js'
|
|
20
|
+
},
|
|
21
|
+
//resolve modules and files path
|
|
22
|
+
resolve: {
|
|
23
|
+
extensions: ['', '.js', '.vue'],
|
|
24
|
+
fallback: [path.join(__dirname, '../node_modules')],
|
|
25
|
+
alias: {
|
|
26
|
+
'src': path.resolve(__dirname, '../src')
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
//resolve loaders path
|
|
30
|
+
resolveLoader: {
|
|
31
|
+
fallback: [path.join(__dirname, '../node_modules')]
|
|
32
|
+
},
|
|
33
|
+
module: {
|
|
34
|
+
loaders: [
|
|
35
|
+
{
|
|
36
|
+
test: /\.vue$/,
|
|
37
|
+
loader: 'vue'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
test: /\.js$/,
|
|
41
|
+
loader: 'babel',
|
|
42
|
+
include: [
|
|
43
|
+
`${projectRoot}\\src`,
|
|
44
|
+
`${projectRoot}\\build`,
|
|
45
|
+
`${projectRoot}\\examples`,
|
|
46
|
+
`${projectRoot}\\test`,
|
|
47
|
+
`${projectRoot}\\node_modules\\vue-client\\src`,
|
|
48
|
+
`${projectRoot}\\node_modules\\vue-strap\\src`,
|
|
49
|
+
`${projectRoot}\\node_modules\\system-phone\\src`
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
test: /\.json$/,
|
|
54
|
+
loader: 'json'
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
test: /\.html$/,
|
|
58
|
+
loader: 'vue-html'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
test: /\.less$/,
|
|
62
|
+
loader: 'style!css!less'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
test: /\.(png|jpg|gif|svg|woff2?|eot|ttf)(\?.*)?$/,
|
|
66
|
+
loader: 'url',
|
|
67
|
+
query: {
|
|
68
|
+
limit: 10000,
|
|
69
|
+
name: '[name].[ext]?[hash:7]'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
vue: {
|
|
75
|
+
loaders: cssLoaders({
|
|
76
|
+
sourceMap: false,
|
|
77
|
+
extract: false
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
plugins: [],
|
|
81
|
+
eslint: {
|
|
82
|
+
formatter: require('eslint-friendly-formatter')
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var webpack = require('webpack')
|
|
2
|
+
var merge = require('webpack-merge')
|
|
3
|
+
var baseConfig = require('./webpack.base.conf')
|
|
4
|
+
var HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
5
|
+
|
|
6
|
+
// add hot-reload related code to entry chunks
|
|
7
|
+
Object.keys(baseConfig.entry).forEach(function (name) {
|
|
8
|
+
baseConfig.entry[name] = ['./build/dev-client'].concat(baseConfig.entry[name])
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
module.exports = merge(baseConfig, {
|
|
12
|
+
// eval-source-map is faster for development
|
|
13
|
+
devtool: '#eval-source-map',
|
|
14
|
+
output: {
|
|
15
|
+
// necessary for the html plugin to work properly
|
|
16
|
+
// when serving the html from in-memory
|
|
17
|
+
publicPath: '/'
|
|
18
|
+
},
|
|
19
|
+
plugins: [
|
|
20
|
+
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
|
|
21
|
+
new webpack.optimize.OccurenceOrderPlugin(),
|
|
22
|
+
new webpack.HotModuleReplacementPlugin(),
|
|
23
|
+
new webpack.NoErrorsPlugin(),
|
|
24
|
+
// https://github.com/ampedandwired/html-webpack-plugin
|
|
25
|
+
new HtmlWebpackPlugin({
|
|
26
|
+
filename: 'index.html',
|
|
27
|
+
template: 'index.html',
|
|
28
|
+
inject: true,
|
|
29
|
+
chunks: ['app']
|
|
30
|
+
}),
|
|
31
|
+
// 安卓模拟页面
|
|
32
|
+
new HtmlWebpackPlugin({
|
|
33
|
+
filename: 'android.html',
|
|
34
|
+
template: 'android.html',
|
|
35
|
+
inject: true,
|
|
36
|
+
chunks: ['android-app']
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
})
|