apply-clients 3.3.109 → 3.3.110

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,128 +1,127 @@
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
- // var ldap = 'http://121.36.79.201:8400'
10
- // var applyinstall = 'http://121.36.79.201:8400'
11
- var ldap = 'http://192.168.20.28:8400'
12
- var applyinstall = 'http://192.168.20.28:8400'
13
- // var applyinstall = 'http://127.0.0.1:8081'
14
- var proxyTable = {
15
- '/wx': {
16
- target: ldap
17
- },
18
- '/rs/sql/filemanage_getUserfies/n': {
19
- target: ldap
20
- },
21
- '/rs/sql/filemanage_getUserfies': {
22
- target: ldap
23
- },
24
- '/rs/logic/saveInsInfo': {
25
- target: ldap
26
- },
27
- '/rs/logic/exportfile': {
28
- target: ldap
29
- },
30
- '/rs/logic/getBatchOperaPro': {
31
- target: ldap
32
- },
33
- '/rs/logic/updateApplyOrder': {
34
- target: ldap
35
- },
36
- '/rs/logic/getSaleInitData': {
37
- target: ldap
38
- },
39
- '/rs/workflow': {
40
- target: applyinstall
41
- },
42
- '/rs/vue': {
43
- target: ldap
44
- },
45
- // 查找资源服务数据
46
- '/rs/search': {
47
- target: ldap
48
- },
49
- // 用户登录服务地址
50
- '/rs/user': {
51
- target: ldap
52
- },
53
- '/rs/logic/getInitData': {
54
- target: ldap
55
- },
56
- '/rs/logic/getLogin': {
57
- target: ldap
58
- },
59
- '/rs/file': { // 文件上传
60
- target: applyinstall
61
- },
62
- '/project': { // 文件回显
63
- target: applyinstall
64
- },
65
- '/rs': {
66
- target: applyinstall
67
- },
68
- '/ws': {
69
- target: applyinstall,
70
- ws: true // 代理webSocket
71
- }
72
- }
73
-
74
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
75
- publicPath: config.output.publicPath,
76
- stats: {
77
- colors: true,
78
- chunks: false
79
- }
80
- })
81
-
82
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
83
- // force page reload when html-webpack-plugin template changes
84
- compiler.plugin('compilation', function (compilation) {
85
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
86
- hotMiddleware.publish({action: 'reload'})
87
- cb()
88
- })
89
- })
90
-
91
- // proxy api requests
92
- Object.keys(proxyTable).forEach(function (context) {
93
- var options = proxyTable[context]
94
- if (typeof options === 'string') {
95
- options = {target: options}
96
- }
97
- app.use(proxyMiddleware(context, options))
98
- })
99
-
100
- // handle fallback for HTML5 history API
101
- app.use(require('connect-history-api-fallback')())
102
- // app.use(function (req, res, next) {
103
- // res.header('Access-Control-Allow-Origin', '*')
104
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
105
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
106
- // res.header('X-Powered-By', '3,2,1')
107
- // res.header('Access-Control-Allow-Credentials', 'true')
108
- // res.header('Content-Type', 'application/json;charset=utf-8')
109
- // next()
110
- // })
111
-
112
- // serve webpack bundle output
113
- app.use(devMiddleware)
114
-
115
- // enable hot-reload and state-preserving
116
- // compilation error display
117
- app.use(hotMiddleware)
118
-
119
- // serve pure static assets
120
- app.use('/static', express.static('./static'))
121
-
122
- module.exports = app.listen(8600, function (err) {
123
- if (err) {
124
- console.log(err)
125
- return
126
- }
127
- console.log('Listening at http://localhost:8600')
128
- })
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
+ // var ldap = 'http://121.36.79.201:8400'
10
+ // var applyinstall = 'http://121.36.79.201:8400'
11
+ var ldap = 'http://192.168.20.27:8555'
12
+ var applyinstall = 'http://192.168.20.27:8555'
13
+ var proxyTable = {
14
+ '/wx': {
15
+ target: ldap
16
+ },
17
+ '/rs/sql/filemanage_getUserfies/n': {
18
+ target: ldap
19
+ },
20
+ '/rs/sql/filemanage_getUserfies': {
21
+ target: ldap
22
+ },
23
+ '/rs/logic/saveInsInfo': {
24
+ target: ldap
25
+ },
26
+ '/rs/logic/exportfile': {
27
+ target: ldap
28
+ },
29
+ '/rs/logic/getBatchOperaPro': {
30
+ target: ldap
31
+ },
32
+ '/rs/logic/updateApplyOrder': {
33
+ target: ldap
34
+ },
35
+ '/rs/logic/getSaleInitData': {
36
+ target: ldap
37
+ },
38
+ '/rs/workflow': {
39
+ target: applyinstall
40
+ },
41
+ '/rs/vue': {
42
+ target: ldap
43
+ },
44
+ // 查找资源服务数据
45
+ '/rs/search': {
46
+ target: ldap
47
+ },
48
+ // 用户登录服务地址
49
+ '/rs/user': {
50
+ target: ldap
51
+ },
52
+ '/rs/logic/getInitData': {
53
+ target: ldap
54
+ },
55
+ '/rs/logic/getLogin': {
56
+ target: ldap
57
+ },
58
+ '/rs/file': { // 文件上传
59
+ target: applyinstall
60
+ },
61
+ '/project': { // 文件回显
62
+ target: applyinstall
63
+ },
64
+ '/rs': {
65
+ target: applyinstall
66
+ },
67
+ '/ws': {
68
+ target: applyinstall,
69
+ ws: true // 代理webSocket
70
+ }
71
+ }
72
+
73
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
74
+ publicPath: config.output.publicPath,
75
+ stats: {
76
+ colors: true,
77
+ chunks: false
78
+ }
79
+ })
80
+
81
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
82
+ // force page reload when html-webpack-plugin template changes
83
+ compiler.plugin('compilation', function (compilation) {
84
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
85
+ hotMiddleware.publish({action: 'reload'})
86
+ cb()
87
+ })
88
+ })
89
+
90
+ // proxy api requests
91
+ Object.keys(proxyTable).forEach(function (context) {
92
+ var options = proxyTable[context]
93
+ if (typeof options === 'string') {
94
+ options = {target: options}
95
+ }
96
+ app.use(proxyMiddleware(context, options))
97
+ })
98
+
99
+ // handle fallback for HTML5 history API
100
+ app.use(require('connect-history-api-fallback')())
101
+ // app.use(function (req, res, next) {
102
+ // res.header('Access-Control-Allow-Origin', '*')
103
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
104
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
105
+ // res.header('X-Powered-By', '3,2,1')
106
+ // res.header('Access-Control-Allow-Credentials', 'true')
107
+ // res.header('Content-Type', 'application/json;charset=utf-8')
108
+ // next()
109
+ // })
110
+
111
+ // serve webpack bundle output
112
+ app.use(devMiddleware)
113
+
114
+ // enable hot-reload and state-preserving
115
+ // compilation error display
116
+ app.use(hotMiddleware)
117
+
118
+ // serve pure static assets
119
+ app.use('/static', express.static('./static'))
120
+
121
+ module.exports = app.listen(8300, function (err) {
122
+ if (err) {
123
+ console.log(err)
124
+ return
125
+ }
126
+ console.log('Listening at http://localhost:8300')
127
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.3.109",
3
+ "version": "3.3.110",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,152 +1,143 @@
1
- <template>
2
- <div class="panel">
3
- <div class="panel-body panel-self" style="background-color: #F8F8F8;">
4
- <div class="row form-group" style="height: 240px;overflow: scroll;">
5
- <img :src="f_sign_path" width="100%" height="100%" />
6
- </div>
7
- <div class="row text-right form-group">
8
- <button class="btn" style="background-color: #f1e404;border-radius: 5px;margin-right: 10px" @click="clean">清除</button>
9
- <button class="btn" style="background-color: #7dc1f4;border-radius: 5px;margin-right: 10px" @click="sign">签名</button>
10
- </div>
11
- </div>
12
- </div>
13
- </template>
14
- <script>
15
- import {getNowDate, guid, isEmpty} from '../Util'
16
- import {PagedList} from 'vue-client'
17
- import {HttpResetClass} from 'vue-client'
18
- import QRCode from 'qrcodejs2'
19
- import Vue from "vue";
20
-
21
- export default {
22
- title: '签字',
23
- props: ['filePath','blobid','type', 'defname'],
24
- data () {
25
- return {
26
- f_sign_path: null,
27
- fileName: null
28
- }
29
- },
30
- ready () {
31
- // this.f_sign_path = this.filePath
32
- this.getFiles()
33
- },
34
- methods: {
35
- clean () {
36
- this.f_sign_path = null
37
- this.fileName = null
38
- this.$emit('sign-clean')
39
- },
40
- sign () {
41
- debugger
42
- this.type='手机签字'
43
- console.log('==============签字打印this============',this)
44
- this.delAudioFile(this.f_sign_path)
45
- this.fileName = guid() + '.jpg'
46
- HostApp.__callback__ = this.signCallback
47
- HostApp.__this__ = this
48
- HostApp.getSignature({
49
- file: this.fileName,
50
- requestCode: 111,
51
- callback: 'javascript:HostApp.__callback__("f_sign_path", "%s");'
52
- })
53
- },
54
- // 签名回调
55
- signCallback (prop, signPath) {
56
- console.log('==============签字回调============')
57
- console.log(signPath)
58
- HostApp.__this__.$set(prop, signPath)
59
- console.log(HostApp.__this__.f_sign_path)
60
-
61
- HostApp.__this__.uploadFile()
62
-
63
- HostApp.__callback__ = null
64
- HostApp.__this__ = null
65
- },
66
- uploadFile () {
67
- console.log('===================签字文件上传==============')
68
- console.log('===================打印id==============',HostApp.__this__.blobid)
69
- let data = {
70
- defname:HostApp.__this__.defname,
71
- type:HostApp.__this__.type,
72
- blodid: HostApp.__this__.blobid,
73
- username: Vue.user.name,
74
- fremarks: '报装手机签字文件',
75
- fileName: HostApp.__this__.fileName,
76
- fileUrl: HostApp.__this__.f_sign_path
77
- }
78
-
79
- console.log('-----------bzLogic-----------------')
80
- console.log(JSON.stringify(data))
81
- let res = HostApp.bzLogic({
82
- 'logic': 'appFileUpload',
83
- 'data': data
84
- })
85
- console.log('===============上传回调=================')
86
- console.log(JSON.stringify(res))
87
- HostApp.__this__.getFiles(res.id)
88
- },
89
- async getFiles (fileid) {
90
- debugger
91
- console.log('=========进来===============')
92
- let http = new HttpResetClass()
93
- console.log('=========进来===============')
94
- let data = {
95
- tablename: 't_files',
96
- condition: `f_blobid = '${this.blobid}' `
97
- }
98
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
99
- // let res = await http.load('POST', `rs/sql/singleTable`, {data: data}, {
100
- warnMsg: null,
101
- resolveMsg: null
102
- })
103
-
104
- console.log('=========查询回调===============')
105
- let fileUrl = `${this.$androidUtil.getProxyUrl()}/${res.data[0].f_downloadpath.substring(res.data[0].f_downloadpath.lastIndexOf(":\\") + 2)}`
106
- console.log(fileUrl)
107
- // HostApp.__this__.$set('f_sign_path', fileUrl)
108
- // HostApp.__this__.f_sign_path = fileUrl
109
- this.f_sign_path = fileUrl
110
-
111
- this.$emit('sign-success', fileUrl)
112
- },
113
- delAudioFile (signPath) {
114
- if (!signPath) {
115
- return
116
- }
117
- HostApp.delfile(signPath)
118
- this.f_sign_path = null
119
- this.fileName = null
120
- }
121
- },
122
- events: {
123
- },
124
- computed: {
125
- },
126
- watch: {
127
- }
128
- }
129
- </script>
130
- <style scoped lang="less">
131
- .qrcode {
132
- display: inline-block !important;
133
- margin: 10px 0px;
134
- }
135
- .panel-self{
136
- border-radius: 10px;
137
- border:1px solid #499EDF;
138
- background-color: #F8F8F8;
139
- }
140
- .vertical-center {
141
- display: flex;
142
- align-items: center;
143
- text-align: center;
144
- }
145
- /*清除model中的浮动*/
146
- .clearfix:after,.clearfix:before{
147
- display: table;
148
- }
149
- .clearfix:after{
150
- clear: both;
151
- }
152
- </style>
1
+ <template>
2
+ <div class="panel">
3
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;">
4
+ <div class="row form-group" style="height: 240px;overflow: scroll;">
5
+ <img :src="f_sign_path" width="100%" height="100%" />
6
+ </div>
7
+ <div class="row text-right form-group">
8
+ <button class="btn" style="background-color: #f1e404;border-radius: 5px;margin-right: 10px" @click="clean">清除</button>
9
+ <button class="btn" style="background-color: #7dc1f4;border-radius: 5px;margin-right: 10px" @click="sign">签名</button>
10
+ </div>
11
+ </div>
12
+ </div>
13
+ </template>
14
+ <script>
15
+ import {getNowDate, guid, isEmpty} from '../Util'
16
+ import {PagedList} from 'vue-client'
17
+ import {HttpResetClass} from 'vue-client'
18
+ import QRCode from 'qrcodejs2'
19
+ import Vue from "vue";
20
+
21
+ export default {
22
+ title: '签字',
23
+ props: ['filePath'],
24
+ data () {
25
+ return {
26
+ f_sign_path: null,
27
+ fileName: null
28
+ }
29
+ },
30
+ ready () {
31
+ this.f_sign_path = this.filePath
32
+ },
33
+ methods: {
34
+ clean () {
35
+ this.f_sign_path = null
36
+ this.fileName = null
37
+ this.$emit('sign-clean')
38
+ },
39
+ sign () {
40
+ this.delAudioFile(this.f_sign_path)
41
+ this.fileName = guid() + '.jpg'
42
+ HostApp.__callback__ = this.signCallback
43
+ HostApp.__this__ = this
44
+ HostApp.getSignature({
45
+ file: this.fileName,
46
+ requestCode: 111,
47
+ callback: 'javascript:HostApp.__callback__("f_sign_path", "%s");'
48
+ })
49
+ },
50
+ // 签名回调
51
+ signCallback (prop, signPath) {
52
+ console.log('==============签字回调============')
53
+ console.log(signPath)
54
+ HostApp.__this__.$set(prop, signPath)
55
+ console.log(HostApp.__this__.f_sign_path)
56
+
57
+ HostApp.__this__.uploadFile()
58
+
59
+ HostApp.__callback__ = null
60
+ HostApp.__this__ = null
61
+ },
62
+ uploadFile () {
63
+ console.log('===================签字文件上传==============')
64
+ let data = {
65
+ blodid: HostApp.__this__.blobid,
66
+ username: Vue.user.name,
67
+ fremarks: '报装手机签字文件',
68
+ fileName: HostApp.__this__.fileName,
69
+ fileUrl: HostApp.__this__.f_sign_path
70
+ }
71
+
72
+ console.log('-----------bzLogic-----------------')
73
+ console.log(JSON.stringify(data))
74
+ let res = HostApp.bzLogic({
75
+ 'logic': 'appFileUpload',
76
+ 'data': data
77
+ })
78
+ console.log('===============上传回调=================')
79
+ console.log(JSON.stringify(res))
80
+ HostApp.__this__.getFiles(res.id)
81
+ },
82
+ async getFiles (fileid) {
83
+ let http = new HttpResetClass()
84
+
85
+ let data = {
86
+ tablename: 't_files',
87
+ condition: `id = '${fileid}'`
88
+ }
89
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
90
+ // let res = await http.load('POST', `rs/sql/singleTable`, {data: data}, {
91
+ warnMsg: null,
92
+ resolveMsg: null
93
+ })
94
+
95
+ console.log('=========查询回调===============')
96
+ let fileUrl = `${this.$androidUtil.getProxyUrl()}/${res.data[0].f_downloadpath.substring(res.data[0].f_downloadpath.lastIndexOf(":\\") + 2)}`
97
+ console.log(fileUrl)
98
+ // HostApp.__this__.$set('f_sign_path', fileUrl)
99
+ // HostApp.__this__.f_sign_path = fileUrl
100
+ this.f_sign_path = fileUrl
101
+
102
+ this.$emit('sign-success', fileUrl)
103
+ },
104
+ delAudioFile (signPath) {
105
+ if (!signPath) {
106
+ return
107
+ }
108
+ HostApp.delfile(signPath)
109
+ this.f_sign_path = null
110
+ this.fileName = null
111
+ }
112
+ },
113
+ events: {
114
+ },
115
+ computed: {
116
+ },
117
+ watch: {
118
+ }
119
+ }
120
+ </script>
121
+ <style scoped lang="less">
122
+ .qrcode {
123
+ display: inline-block !important;
124
+ margin: 10px 0px;
125
+ }
126
+ .panel-self{
127
+ border-radius: 10px;
128
+ border:1px solid #499EDF;
129
+ background-color: #F8F8F8;
130
+ }
131
+ .vertical-center {
132
+ display: flex;
133
+ align-items: center;
134
+ text-align: center;
135
+ }
136
+ /*清除model中的浮动*/
137
+ .clearfix:after,.clearfix:before{
138
+ display: table;
139
+ }
140
+ .clearfix:after{
141
+ clear: both;
142
+ }
143
+ </style>
@@ -1015,7 +1015,7 @@ export default {
1015
1015
  //判断是否推送 及推送的状态
1016
1016
  //查询是否存在, 以型号及厂家判断
1017
1017
  let bjqres = await this.$resetpost(
1018
- `rs/logic/getbjqsyncinfo`,
1018
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/getbjqsyncinfo`,
1019
1019
  bjqststedata
1020
1020
  )
1021
1021
  if (bjqres.data.bjqstate != "成功"){
@@ -1051,7 +1051,7 @@ export default {
1051
1051
  if (bjqres.data.bjqstate.length == 0){
1052
1052
  bjqststedata.bjqstate = "失败"
1053
1053
  let bjqres3 = await this.$resetpost(
1054
- `rs/logic/addbjqsyncinfo`,
1054
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/addbjqsyncinfo`,
1055
1055
  bjqststedata
1056
1056
  )
1057
1057
  }
@@ -1063,13 +1063,13 @@ export default {
1063
1063
  if (bjqres.data.bjqstate === "失败"){
1064
1064
  bjqststedata.bjqstate = "成功"
1065
1065
  let bjqres1 = await this.$resetpost(
1066
- `rs/logic/updatebjqsyncinfo`,
1066
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/updatebjqsyncinfo`,
1067
1067
  bjqststedata
1068
1068
  )
1069
1069
  }else{
1070
1070
  bjqststedata.bjqstate = "成功"
1071
1071
  let bjqres2 = await this.$resetpost(
1072
- `rs/logic/addbjqsyncinfo`,
1072
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/addbjqsyncinfo`,
1073
1073
  bjqststedata
1074
1074
  )
1075
1075
  }