vue2-client 1.8.158 → 1.8.160
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/package.json
CHANGED
|
@@ -225,13 +225,13 @@
|
|
|
225
225
|
:style="'width:' + (cell.inputWidth ? cell.inputWidth : '100') + '%'"/>
|
|
226
226
|
</template>
|
|
227
227
|
<template v-else-if="cell.listType === 'value'">
|
|
228
|
-
{{cell.content[listIndex]}}
|
|
228
|
+
{{ cell.content[listIndex] }}
|
|
229
229
|
</template>
|
|
230
230
|
</template>
|
|
231
231
|
<template v-else-if="cell.type === 'images'">
|
|
232
232
|
<div>
|
|
233
233
|
<upload
|
|
234
|
-
:model="{type: 'image', accept: ['*'], resUploadStock: 1, pathKey: 'cs'}"
|
|
234
|
+
:model="{type: 'image', accept: ['*'], resUploadStock: 1, pathKey: 'cs', resUploadMode: 'oss'}"
|
|
235
235
|
service-name="af-system"
|
|
236
236
|
:images="configData.images[cell.dataIndex]"
|
|
237
237
|
:outer-container-index="cell.dataIndex"
|
|
@@ -374,7 +374,7 @@ export default {
|
|
|
374
374
|
}
|
|
375
375
|
},
|
|
376
376
|
methods: {
|
|
377
|
-
handleInputDeepChange (
|
|
377
|
+
handleInputDeepChange () {
|
|
378
378
|
this.$forceUpdate()
|
|
379
379
|
},
|
|
380
380
|
getDeepObject (obj, strPath) {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<!-- <XReport :config-name="'test_tableConfig'" :activated-slot-name="'test_tableConfig_slot'"/>-->
|
|
4
4
|
<!-- <XReport :config-name="'test_tableConfig'" :local-config="test_config_withoutSlot" :config-data="test_config_data"/>-->
|
|
5
|
-
<!-- <XReport :config-name="'test_tableConfig'" :local-config="test_yangchun_json" :config-data="test_yangchun_data" :dont-format="true"/>-->
|
|
6
|
-
<XReport :config-name="'test_tableConfig'" :local-config="test_yangchun_json" :config-data="test_yangchun_jsonData" :dont-format="true"
|
|
5
|
+
<!-- <XReport :config-name="'test_tableConfig'" :local-config="test_yangchun_json" :config-data="test_yangchun_data" :dont-format="true"/>-->
|
|
6
|
+
<!-- <XReport :config-name="'test_tableConfig'" :local-config="test_yangchun_json" :config-data="test_yangchun_jsonData" :dont-format="true"/>-->
|
|
7
|
+
<XReport :config-name="'test_tableConfig'" :local-config="test_upload" :dont-format="true"/>
|
|
7
8
|
<!-- <XReport :config-name="'test_table_config_forEditor'" :dont-format="true"/>-->
|
|
8
9
|
<!-- <XReport config-name="test_tableConfig" :local-config="test_config_json" :config-data="test_config_json_data"/>-->
|
|
9
10
|
</div>
|
|
@@ -1244,6 +1245,40 @@ export default {
|
|
|
1244
1245
|
],
|
|
1245
1246
|
id: 35917,
|
|
1246
1247
|
f_type: '改管维修'
|
|
1248
|
+
},
|
|
1249
|
+
test_upload: {
|
|
1250
|
+
slotsDefine: {},
|
|
1251
|
+
subTitle: [],
|
|
1252
|
+
slotsDeclare: [],
|
|
1253
|
+
data: {
|
|
1254
|
+
images: []
|
|
1255
|
+
},
|
|
1256
|
+
columns: [
|
|
1257
|
+
[
|
|
1258
|
+
{
|
|
1259
|
+
rowSpan: 1,
|
|
1260
|
+
colSpan: 12,
|
|
1261
|
+
text: '测试上传',
|
|
1262
|
+
originalRowIndex: 0,
|
|
1263
|
+
type: 'column',
|
|
1264
|
+
originalCellIndex: 0
|
|
1265
|
+
}
|
|
1266
|
+
],
|
|
1267
|
+
[
|
|
1268
|
+
{
|
|
1269
|
+
rowSpan: 1,
|
|
1270
|
+
colSpan: 12,
|
|
1271
|
+
dataIndex: 'imgs',
|
|
1272
|
+
originalRowIndex: 1,
|
|
1273
|
+
type: 'images',
|
|
1274
|
+
originalCellIndex: 0
|
|
1275
|
+
}
|
|
1276
|
+
]
|
|
1277
|
+
],
|
|
1278
|
+
width: 'auto',
|
|
1279
|
+
style: {},
|
|
1280
|
+
title: '',
|
|
1281
|
+
designMode: 'VisualTable'
|
|
1247
1282
|
}
|
|
1248
1283
|
}
|
|
1249
1284
|
},
|
package/src/router/guards.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hasAuthority } from '@vue2-client/utils/authority-utils'
|
|
2
2
|
import { loginIgnore } from '@vue2-client/router/index'
|
|
3
|
-
import { checkAuthorization } from '@vue2-client/utils/request'
|
|
3
|
+
import { checkAuthorization, METHOD, request } from '@vue2-client/utils/request'
|
|
4
4
|
import NProgress from 'nprogress'
|
|
5
5
|
import { logout } from '@vue2-client/services/user'
|
|
6
6
|
import {
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import AES from '@vue2-client/utils/EncryptUtil'
|
|
11
11
|
import Vue from 'vue'
|
|
12
12
|
import { funcToRouter, loadRoutes } from '@vue2-client/utils/routerUtil'
|
|
13
|
+
import { LOGIN } from '@vue2-client/services/apiService'
|
|
13
14
|
|
|
14
15
|
NProgress.configure({ showSpinner: false })
|
|
15
16
|
|
|
@@ -39,7 +40,11 @@ const loginGuard = (to, from, next, options) => {
|
|
|
39
40
|
window.microApp.dispatch({ type: '子应用发送给主应用的数据', to: to.path })
|
|
40
41
|
}
|
|
41
42
|
const urlParams = new URLSearchParams(window.location.search)
|
|
43
|
+
// 如果是需要我们自己登陆的项目
|
|
42
44
|
const token = urlParams.get('token')
|
|
45
|
+
// 如果是v2 的项目 资源管理和营收分开库的那种项目 传递用户信息进来
|
|
46
|
+
const tokenV2 = urlParams.get('tokenV2')
|
|
47
|
+
// 如果是 v4 的父项目,通过localStorage传递信息
|
|
43
48
|
const V4_LOGIN_DATA_KEY = localStorage.getItem('v4LoginData')
|
|
44
49
|
if (token) {
|
|
45
50
|
const { AESDecrypt } = AES
|
|
@@ -69,6 +74,34 @@ const loginGuard = (to, from, next, options) => {
|
|
|
69
74
|
next()
|
|
70
75
|
}
|
|
71
76
|
}
|
|
77
|
+
} else if (tokenV2) {
|
|
78
|
+
const { AESDecrypt } = AES
|
|
79
|
+
const info = AESDecrypt(tokenV2, '3KMKqvgwR8ULbR8Z')
|
|
80
|
+
request(`/rs/user/${info.name}/${info.password}/智慧燃气`, METHOD.GET).then(
|
|
81
|
+
res => {
|
|
82
|
+
const curUser = {
|
|
83
|
+
name: res.name,
|
|
84
|
+
username: res.name,
|
|
85
|
+
orgid: res.name,
|
|
86
|
+
avatar: '',
|
|
87
|
+
ename: res.ename,
|
|
88
|
+
id: res.id,
|
|
89
|
+
orgName: res.f_fengongsi,
|
|
90
|
+
contact: '',
|
|
91
|
+
phone: '',
|
|
92
|
+
orgs: res.orgs
|
|
93
|
+
}
|
|
94
|
+
Vue.$store.commit('account/setUser', Object.assign(curUser, res))
|
|
95
|
+
const login = {
|
|
96
|
+
f: res,
|
|
97
|
+
jwt: res.id,
|
|
98
|
+
r: res.roles
|
|
99
|
+
}
|
|
100
|
+
Vue.$store.commit('account/setLogin', login)
|
|
101
|
+
loadRoutes(funcToRouter(res.functions))
|
|
102
|
+
next()
|
|
103
|
+
}
|
|
104
|
+
)
|
|
72
105
|
} else if (V4_LOGIN_DATA_KEY) {
|
|
73
106
|
const v4LoginData = JSON.parse(localStorage.getItem('userInfo'))
|
|
74
107
|
const curUser = {
|
package/vue.config.js
CHANGED
|
@@ -14,6 +14,9 @@ const isProd = process.env.NODE_ENV === 'production'
|
|
|
14
14
|
const v3Server = 'http://121.36.106.17:8400'
|
|
15
15
|
const gateway = 'http://192.168.50.67:31467'
|
|
16
16
|
const testUpload = 'http://123.60.214.109:8406'
|
|
17
|
+
const OSSServerDev = 'http://192.168.50.67:30351'
|
|
18
|
+
// const OSSServerProd = 'http://192.168.50.67:31351'
|
|
19
|
+
// const testUploadLocal = 'http://127.0.0.1:9001'
|
|
17
20
|
// v3 铜川
|
|
18
21
|
// const v3Server = 'http://61.134.55.234:8405'
|
|
19
22
|
// const gateway = 'http://61.134.55.234:8456/webmeter'
|
|
@@ -34,6 +37,11 @@ module.exports = {
|
|
|
34
37
|
ws: false,
|
|
35
38
|
changeOrigin: true
|
|
36
39
|
},
|
|
40
|
+
// '/api/af-system/resource': {
|
|
41
|
+
// pathRewrite: { '^/api/af-system': '/' },
|
|
42
|
+
// target: testUpload,
|
|
43
|
+
// changeOrigin: true
|
|
44
|
+
// },
|
|
37
45
|
'/api': {
|
|
38
46
|
// v3用
|
|
39
47
|
// pathRewrite: { '^/api/af-system/': '/rs/', '^/api/af-iot/': '/rs/' },
|
|
@@ -50,6 +58,11 @@ module.exports = {
|
|
|
50
58
|
pathRewrite: { '^/ai': '/' },
|
|
51
59
|
changeOrigin: true
|
|
52
60
|
},
|
|
61
|
+
'/oss': {
|
|
62
|
+
target: OSSServerDev,
|
|
63
|
+
pathRewrite: { '^/oss': '/' },
|
|
64
|
+
changeOrigin: true
|
|
65
|
+
},
|
|
53
66
|
},
|
|
54
67
|
client: {
|
|
55
68
|
overlay: false
|
|
@@ -74,7 +87,8 @@ module.exports = {
|
|
|
74
87
|
config.resolve = {
|
|
75
88
|
extensions: ['.js', '.vue', '.json'],
|
|
76
89
|
alias: {
|
|
77
|
-
'@vue2-client': path.resolve('src')
|
|
90
|
+
'@vue2-client': path.resolve('src'),
|
|
91
|
+
'@': path.resolve('src')
|
|
78
92
|
}
|
|
79
93
|
}
|
|
80
94
|
config.entry.app = ['core-js/stable', 'regenerator-runtime/runtime', 'whatwg-fetch', './src/main.js']
|