apply-clients 3.5.5-4 → 3.5.5-41

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.
Files changed (57) hide show
  1. package/build/dev-server.js +2 -6
  2. package/package.json +6 -4
  3. package/src/components/QXClient.js +333 -0
  4. package/src/components/SignTools.js +65 -0
  5. package/src/components/android/AppTakePic.vue +182 -182
  6. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  7. package/src/components/product/Process/Processes/contractModel.vue +97 -118
  8. package/src/components/product/ServiceView.vue +1028 -1028
  9. package/src/filiale/fugou/android/AppAddMaterialScience.vue +444 -440
  10. package/src/filiale/fugou/android/AppDevicesManagement.vue +3 -1
  11. package/src/filiale/fugou/android/AppInstallationDetails.vue +542 -541
  12. package/src/filiale/fugou/android/AppServiceControl.vue +1836 -1836
  13. package/src/filiale/fugou/android/AppZhihuanManagement.vue +3 -1
  14. package/src/filiale/fugou/android/printCharge.vue +162 -162
  15. package/src/filiale/fugou/android.js +16 -16
  16. package/src/filiale/fugou/pc/ApplyChargeList.vue +484 -480
  17. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -525
  18. package/src/filiale/fugou/pc/ServiceControl.vue +1705 -1705
  19. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  20. package/src/filiale/fugou/pc/StopApplyList.vue +291 -0
  21. package/src/filiale/fugou/pc/SupervisoryServiceControl.vue +881 -0
  22. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +1 -1
  23. package/src/filiale/fugou/pc/chargeReport.vue +87 -15
  24. package/src/filiale/fugou/pc/devicesManagement.vue +1 -0
  25. package/src/filiale/fugou/pc/printChargepc.vue +148 -148
  26. package/src/filiale/fugou/pc.js +3 -1
  27. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  28. package/src/filiale/jinhuang/android/AppAddMaterialScience.vue +635 -0
  29. package/src/filiale/jinhuang/android.js +6 -0
  30. package/src/filiale/jinhuang/pc/ContractList.vue +220 -0
  31. package/src/filiale/jinhuang/pc/addMaterialScience.vue +638 -0
  32. package/src/filiale/jinhuang/pc/addressAndUserinfoManagement.vue +41 -1
  33. package/src/filiale/jinhuang/pc.js +2 -0
  34. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  35. package/src/filiale/qianneng/android/AppServiceView.vue +795 -795
  36. package/src/filiale/qianneng/android.js +15 -15
  37. package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +1 -1
  38. package/src/filiale/qianneng/pc/Applydetail.vue +1 -1
  39. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  40. package/src/filiale/qianneng/pc.js +29 -29
  41. package/src/filiale/ruihua/pc/ServiceControl.vue +1967 -1966
  42. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +520 -520
  43. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +645 -645
  44. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +52 -0
  45. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +30 -1
  46. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1703 -1703
  47. package/src/filiale/yangchunboneng/android/MaterIialOne.vue +21 -1
  48. package/src/filiale/yangchunboneng/pc/ApplyChargeList.vue +645 -617
  49. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +99 -48
  50. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2112 -2112
  51. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1007 -1007
  52. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +4 -1
  53. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +5 -1
  54. package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1 -1
  55. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1053 -1052
  56. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +574 -574
  57. package/src/main.js +1 -1
@@ -8,18 +8,14 @@ var compiler = webpack(config)
8
8
  // var proxy = httpProxy.createProxyServer()
9
9
  // var ldap = 'http://121.36.79.201:8400'
10
10
  // var applyinstall = 'http://121.36.79.201:8400'
11
- var ldap = 'http://192.168.50.93:31986/'
12
- var applyinstall = 'http://192.168.50.93:31986/'
11
+ var ldap = 'http://61.163.123.47:30785/'
12
+ var applyinstall = 'http://61.163.123.47:30785/'
13
13
 
14
14
  var proxyTable = {
15
15
  '/api': {
16
16
  target: ldap,
17
17
  changeOrigin: true
18
18
  },
19
- '/af-apply': {
20
- target: ldap,
21
- changeOrigin: true
22
- },
23
19
  '/rs/logic/getSaleInitData': {
24
20
  target: ldap,
25
21
  changeOrigin: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.5.5-4",
3
+ "version": "3.5.5-41",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -41,6 +41,7 @@
41
41
  "sm-crypto": "^0.3.13"
42
42
  },
43
43
  "devDependencies": {
44
+ "axios": "^0.30.0",
44
45
  "crypto-js": "^4.1.1",
45
46
  "babel-core": "^6.0.0",
46
47
  "babel-loader": "^6.0.0",
@@ -95,10 +96,10 @@
95
96
  "sinon-chai": "^2.8.0",
96
97
  "style": "0.0.3",
97
98
  "style-loader": "^0.20.3",
98
- "system-clients": "3.2.86",
99
+ "system-clients": "4.0.13",
99
100
  "system-phone": "1.2.80-49",
100
101
  "url-loader": "^0.5.7",
101
- "vue-client": "1.24.124",
102
+ "vue-client": "1.25.33",
102
103
  "vue-hot-reload-api": "^1.2.0",
103
104
  "vue-html-loader": "^1.0.0",
104
105
  "vue-loader": "^8.2.1",
@@ -113,6 +114,7 @@
113
114
  "webpack-hot-middleware": "^2.6.0",
114
115
  "webpack-merge": "^0.8.3",
115
116
  "weixin-js-sdk": "^1.2.0",
116
- "telephone-clients": "3.0.2-21-63"
117
+ "telephone-clients": "3.0.2-21-63",
118
+ "address-client": "4.0.12"
117
119
  }
118
120
  }
@@ -0,0 +1,333 @@
1
+
2
+ function http() {
3
+ 'use strict'
4
+
5
+ // 确保 window.jQuery 存在
6
+ if (!window.jQuery) {
7
+ throw new Error('QXClient requires jQuery to be available globally.')
8
+ }
9
+
10
+ const _a = window.jQuery;
11
+ const ajax = _a.ajax;
12
+ const extend = _a.extend // const support = _a.support (support 通常不需要直接访问)
13
+ const DEFAULT = {
14
+ port: '38088',
15
+ }
16
+
17
+ // 保留原始的 send 函数
18
+ function send(options) {
19
+ const biz = options.biz;
20
+ const data = options.data;
21
+ const successCallback = options.successCallback;
22
+ const errorCallback = options.errorCallback;
23
+ const port = options.port;
24
+ const method = options.method;
25
+ const dataType = options.dataType
26
+ const url = 'http://127.0.0.1:'.concat(port !== null && port !== void 0 ? port : DEFAULT.port, '/').concat(biz)
27
+ console.log('QXClient sending:', options)
28
+ const config = {
29
+ url: url,
30
+ data: JSON.stringify(data),
31
+ type: method !== null && method !== void 0 ? method : 'POST',
32
+ dataType: dataType !== null && dataType !== void 0 ? dataType : 'json',
33
+ }
34
+ if (typeof successCallback === 'function') {
35
+ config.success = function (res) {
36
+ // 保持原始的成功/失败判断逻辑
37
+ if (res && +res.code === 0) { // 添加 res 存在的检查
38
+ successCallback(res)
39
+ } else {
40
+ // 如果有错误回调,调用错误回调,否则可以考虑在控制台打印错误
41
+ if (typeof errorCallback === 'function') {
42
+ errorCallback(res)
43
+ } else {
44
+ console.error('QXClient Request Business Failed:', res)
45
+ }
46
+ }
47
+ }
48
+ }
49
+ // 确保错误回调总是被设置,以便捕获网络错误等
50
+ if (typeof errorCallback === 'function') {
51
+ config.error = errorCallback
52
+ } else {
53
+ // 提供一个默认的错误处理
54
+ config.error = function (jqXHR, textStatus, errorThrown) {
55
+ console.error('QXClient AJAX Error:', textStatus, errorThrown, jqXHR)
56
+ }
57
+ }
58
+ ajax(config)
59
+ }
60
+
61
+ // 返回包含所有方法的对象
62
+ return {
63
+ /**
64
+ * @description 打开屏幕监控,通过成功回调的 imgSrc 设置 img 标签的 src 参数
65
+ * @param {Object} options 选项参数
66
+ * @param {(data:{imgSrc:string}) => void} [options.successCallback] 成功回调
67
+ * @param {(data) => void} [options.errorCallback] 失败回调 (虽然此方法同步,但保持一致性)
68
+ */
69
+ monitorDevice: function monitorDevice(options = {}) {
70
+ try {
71
+ const imgSrc = 'http://127.0.0.1:38089/sign=stream&time=' + new Date().getTime()
72
+ if (typeof options.successCallback === 'function') {
73
+ options.successCallback({imgSrc: imgSrc})
74
+ } else {
75
+ console.log('Monitor device URL:', imgSrc)
76
+ }
77
+ } catch (error) {
78
+ console.error('Error in monitorDevice:', error)
79
+ if (typeof options.errorCallback === 'function') {
80
+ options.errorCallback(error)
81
+ }
82
+ }
83
+ },
84
+ stopMonitor: function stopMonitor(options = {}) {
85
+ const biz = 'closewebontablet'
86
+ // 使用 extend 合并对象
87
+ send(extend({biz: biz, port: '38089'}, options))
88
+ },
89
+ /**
90
+ * @description 打开签字窗口
91
+ * @param {Object} options 入参
92
+ * @param {Object} options.data 签字数据 { pos: { top, left, width, height } }
93
+ * @param {(data:{image:string}) => void} options.successCallback 成功回调
94
+ */
95
+ openSign: function openSign(options = {}) {
96
+ const biz = 'sign=start'
97
+ send(extend({biz: biz}, options))
98
+ },
99
+ /**
100
+ * @description 关闭签字窗口
101
+ * @param {(data)=>void} [options.successCallback] 成功回调
102
+ */
103
+ stopSign: function stopSign(options = {}) {
104
+ const biz = 'sign=stop'
105
+ send(extend({biz: biz}, options))
106
+ },
107
+ /**
108
+ * @description 打开指纹窗口, 持续返回指纹图像base64编码
109
+ * @param {object} options 入参
110
+ * @param {(data:{FigPic:string}) => void} options.successCallback 成功回调
111
+ */
112
+ openFinger: function openFinger(options = {}) {
113
+ const biz = 'finger=record'
114
+ send(extend({biz: biz}, options))
115
+ },
116
+ /**
117
+ * @description 取消指纹采集
118
+ */
119
+ stopFinger: function stopFinger(options = {}) {
120
+ const biz = 'finger=stop'
121
+ send(extend({biz: biz}, options))
122
+ },
123
+ /**
124
+ * @description 指纹比对
125
+ */
126
+ compareFinger: function compareFinger(options = {}) {
127
+ const biz = 'finger=compare'
128
+ send(extend({biz: biz}, options))
129
+ },
130
+ /**
131
+ * @description 获取摄像头信息
132
+ * @param {Object} options 入参
133
+ * @param {(data: { camera:Array<{ name:string, index:number, resolution:Array<{width:number, height:number}>}> }) =>void } options.successCallback 成功回调
134
+ */
135
+ getCamera: function getCamera(options = {}) {
136
+ const biz = 'camera=get'
137
+ send(extend({biz: biz}, options))
138
+ },
139
+ /**
140
+ * @param {object} options 根据获取的摄像头信息,传入摄像头编号以及分辨率
141
+ * @param {object} options.data { index: number, width?: number, height?: number }
142
+ * @param {(data:{imgSrc:string}) => void} options.successCallback 成功回调, imgSrc直接用于 img 标签的 src 属性持续提供图片流
143
+ */
144
+ openCamera: function openCamera(options = {}) {
145
+ try {
146
+ const {data = {}} = options
147
+ const biz = 'camera=stream'
148
+ let imgSrc = 'http://127.0.0.1:'.concat(DEFAULT.port, '/').concat(biz, '&index=').concat(data.index)
149
+ if (data.width) {
150
+ imgSrc += '&width='.concat(data.width)
151
+ }
152
+ if (data.height) {
153
+ imgSrc += '&height='.concat(data.height)
154
+ }
155
+ // 先尝试关闭之前的摄像头 (调用实例上的方法)
156
+ this.closeCamera({data: {index: data.index}}); // 使用 this 调用实例方法
157
+ // 直接调用成功回调
158
+ if (typeof options.successCallback === 'function') {
159
+ options.successCallback({imgSrc: imgSrc})
160
+ } else {
161
+ console.log('Camera stream URL:', imgSrc)
162
+ }
163
+ } catch (error) {
164
+ console.error('Error in openCamera:', error)
165
+ if (typeof options.errorCallback === 'function') {
166
+ options.errorCallback(error)
167
+ }
168
+ }
169
+ },
170
+ /**
171
+ * @description 传入已打开的摄像头编号,获取拍照图片
172
+ * @param {Object} options 入参
173
+ * @param {object} options.data { index: number } 摄像头编号
174
+ * @param {(data:{picture: string, imgSrc: string}) => void} options.successCallback 成功回调
175
+ */
176
+ takePhoto: function takePhoto(options = {}) {
177
+ const {data = {}} = options
178
+ const biz = 'camera=photo'
179
+ // 构造 URL,注意 index 是 query 参数
180
+ const url = 'http://127.0.0.1:'.concat(DEFAULT.port, '/').concat(biz, '&index=').concat(data.index)
181
+ const originalSuccess = options.successCallback
182
+
183
+ // 修改 options 传递给 send
184
+ const sendOptions = extend({}, options, {
185
+ // 传递完整的 URL 作为 biz,并指定 method 为 GET
186
+ biz: url,
187
+ method: 'GET',
188
+ data: undefined, // GET 请求不应有 body data
189
+ successCallback: function (res) {
190
+ // 添加图片 base64 前缀
191
+ if (res && res.picture) {
192
+ res.imgSrc = 'data:image/jpeg;base64,' + res.picture
193
+ }
194
+ // 调用原始的成功回调
195
+ if (typeof originalSuccess === 'function') {
196
+ originalSuccess(res)
197
+ }
198
+ },
199
+ // 原始回调已在 successCallback 中处理,无需再次传递
200
+ // successCallback: undefined // 可以保留以覆盖,或直接不传
201
+ })
202
+ console.log('QXClient takePhoto sending GET:', sendOptions.biz)
203
+ ajax({
204
+ url: sendOptions.biz,
205
+ type: 'GET',
206
+ dataType: sendOptions.dataType || 'json',
207
+ success: sendOptions.successCallback,
208
+ error: sendOptions.errorCallback || function (jqXHR, textStatus, errorThrown) {
209
+ console.error('QXClient AJAX Error (takePhoto):', textStatus, errorThrown, jqXHR)
210
+ }
211
+ })
212
+ // send(sendOptions) // 暂时注释掉,因为 send 可能不支持 GET
213
+ },
214
+ /**
215
+ * @description 传入已打开的摄像头编号,关闭摄像头
216
+ * @param {Object} options 参数
217
+ * @param {object} options.data { index: number } 摄像头编号
218
+ */
219
+ closeCamera: function closeCamera(options = {}) {
220
+ const biz = 'camera=close'
221
+ send(extend({biz: biz}, options))
222
+ },
223
+ /**
224
+ * @description 开始人证比对,返回照片base64和摄像头实时图像base64
225
+ */
226
+ openFaceVerify: function openFaceVerify(options = {}) {
227
+ const biz = 'method=startPersonVerify'
228
+ send(extend({biz: biz}, options))
229
+ },
230
+ /**
231
+ * @description 取消人证比对
232
+ */
233
+ stopFaceVerify: function stopFaceVerify(options = {}) {
234
+ const biz = 'method=cancelPersonVerify'
235
+ send(extend({biz: biz}, options))
236
+ },
237
+ /**
238
+ * @description 读取身份证
239
+ * @param {(data:{ retData: any, imgSrc: string }) => void} options.successCallback 成功回调
240
+ */
241
+ openReadIDCard: function openReadIDCard(options = {}) {
242
+ const biz = 'method=startReadChinaIdCard'
243
+ const originalSuccess = options.successCallback
244
+ const sendOptions = extend({}, options, {
245
+ biz: biz,
246
+ successCallback: function (res) {
247
+ if (res && res.retData && res.retData.pic) {
248
+ res.imgSrc = 'data:image/jpeg;base64,' + res.retData.pic
249
+ }
250
+ if (typeof originalSuccess === 'function') {
251
+ originalSuccess(res)
252
+ }
253
+ }
254
+ })
255
+ send(sendOptions)
256
+ },
257
+ /**
258
+ * @description 取消读取身份证
259
+ */
260
+ stopReadIDCard: function stopReadIDCard(options = {}) {
261
+ const biz = 'method=cancelReadChinaIdCard'
262
+ send(extend({biz: biz}, options))
263
+ },
264
+ /**
265
+ * @description 读取银行卡
266
+ */
267
+ openReadBankCard: function openReadBankCard(options = {}) {
268
+ const biz = 'method=startReadBankCard'
269
+ send(extend({biz: biz}, options))
270
+ },
271
+ /**
272
+ * @description 服务评价
273
+ */
274
+ evaluation: function evaluation(options = {}) {
275
+ const biz = 'evaluation'
276
+ send(extend({biz: biz}, options))
277
+ },
278
+ /**
279
+ * @description 开始签名
280
+ * @param {Object} options 参数
281
+ * @param {string} options.data.pdfdata pdf文件base64编码 签名内容
282
+ */
283
+ openPDFSign: function openPDFSign(options = {}) {
284
+ // 保持原始逻辑,对 data 进行 stringify
285
+ const sendOptions = extend({}, options, {
286
+ // 确保只有在 options.data 存在时才 stringify
287
+ data: options.data ? JSON.stringify(options.data) : undefined,
288
+ biz: 'pdfsign=start'
289
+ })
290
+ send(sendOptions)
291
+ },
292
+ stopPDFSign: function stopPDFSign(options = {}) {
293
+ const biz = 'pdfsign=stop'
294
+ send(extend({biz: biz}, options))
295
+ },
296
+ /**
297
+ * @description 打开网页
298
+ * @param {Object} options 参数
299
+ * @param {string} options.data.url 要打开的网页地址
300
+ */
301
+ openwebontablet: function openwebontablet(options = {}) {
302
+ const biz = 'openwebontablet'
303
+ // 使用 extend 合并
304
+ send(extend({biz: biz}, options))
305
+ },
306
+ /**
307
+ * @description 关闭网页
308
+ */
309
+ closewebontablet: function closewebontablet(options = {}) {
310
+ const biz = 'sign=closebrowser'
311
+ send(extend({biz: biz}, options))
312
+ },
313
+ /**
314
+ * 打开密码键盘
315
+ */
316
+ openKB: function openKB(options = {}) {
317
+ const biz = 'kb=open'
318
+ send(extend({biz: biz}, options))
319
+ },
320
+ /**
321
+ * 关闭密码键盘
322
+ */
323
+ closeKB: function closeKB(options = {}) {
324
+ const biz = 'kb=close'
325
+ send(extend({biz: biz}, options))
326
+ }
327
+ }
328
+ }
329
+
330
+ // 创建实例并导出
331
+ const QXClient = http();
332
+
333
+ export default QXClient;
@@ -0,0 +1,65 @@
1
+ import axios from 'axios'
2
+
3
+ /**
4
+ * 将URL转换为base64格式
5
+ * @param {string} url - 文件URL
6
+ * @returns {Promise<string>} - 返回base64字符串
7
+ */
8
+ export const urlToBase64 = async (url) => {
9
+ try {
10
+ const response = await fetch(url)
11
+ if (!response.ok) {
12
+ throw new Error(`HTTP错误!状态码: ${response.status}`)
13
+ }
14
+
15
+ const blob = await response.blob()
16
+ return new Promise((resolve, reject) => {
17
+ const reader = new FileReader()
18
+ reader.onloadend = () => {
19
+ try {
20
+ const base64data = reader.result
21
+ const base64Content = base64data.split(',')[1]
22
+ resolve(base64Content)
23
+ } catch (error) {
24
+ reject(new Error('base64转换失败: ' + error.message))
25
+ }
26
+ }
27
+ reader.onerror = () => reject(new Error('文件读取失败'))
28
+ reader.readAsDataURL(blob)
29
+ })
30
+ } catch (error) {
31
+ console.error('URL转base64失败:', error)
32
+ throw error
33
+ }
34
+ }
35
+
36
+ /**
37
+ * 打开PDF签字板
38
+ * @param {string} url - 请求地址
39
+ * @param {Object} params - 请求参数
40
+ * @returns {Promise<any>} - 返回请求结果
41
+ */
42
+ export const openPdfSignBoard = (url, params) => {
43
+ try {
44
+ return axios.post(url, params, {
45
+ contentType: 'application/json;charset=UTF-8',
46
+ withCredentials: true,
47
+ timeout: 0
48
+ })
49
+ } catch (error) {
50
+ console.error('打开PDF签字板失败:', error)
51
+ throw error
52
+ }
53
+ }
54
+
55
+ export const readIDCardInfo = (url, params) => {
56
+ try {
57
+ return axios.post(url, {}, {
58
+ withCredentials: true,
59
+ timeout: 0
60
+ })
61
+ } catch (error) {
62
+ console.error('读取身份证失败:', error)
63
+ throw error
64
+ }
65
+ }