vue2-client 1.2.55 → 1.2.56
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/.env +15 -15
- package/.eslintrc.js +82 -82
- package/CHANGELOG.md +148 -148
- package/package.json +1 -1
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +111 -111
- package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +770 -770
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +792 -752
- package/src/base-client/components/common/Upload/Upload.vue +141 -124
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +340 -331
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +316 -316
- package/src/base-client/components/common/XForm/XForm.vue +268 -268
- package/src/base-client/components/common/XForm/XFormItem.vue +358 -346
- package/src/base-client/components/common/XFormTable/XFormTable.vue +483 -482
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +647 -647
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +70 -70
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/config/CreateQueryConfig.js +301 -298
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/router/async/config.async.js +26 -26
- package/src/router/index.js +27 -27
- package/src/services/api/common.js +56 -47
- package/src/services/api/manage.js +16 -16
- package/src/services/api/restTools.js +24 -24
- package/src/theme/default/style.less +47 -47
- package/src/utils/map-utils.js +28 -28
- package/src/utils/request.js +198 -198
- package/src/utils/util.js +222 -222
- package/vue.config.js +148 -143
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { manageApi, post } from '@vue2-client/services/api'
|
|
2
|
-
import { handleTree } from '@vue2-client/utils/util'
|
|
3
|
-
const GetAppDataService = {
|
|
4
|
-
install (Vue) {
|
|
5
|
-
// 给vue增添对话框显示方法
|
|
6
|
-
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
7
|
-
},
|
|
8
|
-
async load () {
|
|
9
|
-
const params = {}
|
|
10
|
-
await post(manageApi.getDictionaryValue, {}).then((res) => {
|
|
11
|
-
Object.assign(params, res)
|
|
12
|
-
const badgeItemArray = {}
|
|
13
|
-
for (const key of Object.keys(params)) {
|
|
14
|
-
badgeItemArray[key] = {}
|
|
15
|
-
for (const item of params[key]) {
|
|
16
|
-
if (item.status) {
|
|
17
|
-
badgeItemArray[key][item.value] = {
|
|
18
|
-
status: item.status,
|
|
19
|
-
text: item.text
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
// 追加参数
|
|
25
|
-
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
26
|
-
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
27
|
-
})
|
|
28
|
-
// 获取省市区数据
|
|
29
|
-
await post(manageApi.getDivisionsOhChina, {}).then((res) => {
|
|
30
|
-
// 追加参数
|
|
31
|
-
localStorage.setItem(process.env.VUE_APP_DIVISIONSOHCHINA, JSON.stringify(res))
|
|
32
|
-
})
|
|
33
|
-
},
|
|
34
|
-
// 返回树形省市区
|
|
35
|
-
getDivisionsOhChinaForTree () {
|
|
36
|
-
const str = localStorage.getItem(process.env.VUE_APP_DIVISIONSOHCHINA)
|
|
37
|
-
return handleTree(JSON.parse(str), 'code', 'parentcode')
|
|
38
|
-
},
|
|
39
|
-
// 返回列表省市区
|
|
40
|
-
getDivisionsOhChinaForList () {
|
|
41
|
-
const str = localStorage.getItem(process.env.VUE_APP_DIVISIONSOHCHINA)
|
|
42
|
-
return JSON.parse(str)
|
|
43
|
-
},
|
|
44
|
-
getDictionaryList (key) {
|
|
45
|
-
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
46
|
-
const object = JSON.parse(str)
|
|
47
|
-
return object[key]
|
|
48
|
-
},
|
|
49
|
-
getParam (key, value) {
|
|
50
|
-
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
51
|
-
const object = JSON.parse(str)
|
|
52
|
-
const result = object[key]
|
|
53
|
-
if (result && result.hasOwnProperty(value)) {
|
|
54
|
-
return result[value]
|
|
55
|
-
} else {
|
|
56
|
-
return null
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
getParams () {
|
|
60
|
-
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
61
|
-
const object = JSON.parse(str)
|
|
62
|
-
return object
|
|
63
|
-
},
|
|
64
|
-
getSingleValues () {
|
|
65
|
-
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
66
|
-
const object = JSON.parse(str)
|
|
67
|
-
return object
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export default GetAppDataService
|
|
1
|
+
import { manageApi, post } from '@vue2-client/services/api'
|
|
2
|
+
import { handleTree } from '@vue2-client/utils/util'
|
|
3
|
+
const GetAppDataService = {
|
|
4
|
+
install (Vue) {
|
|
5
|
+
// 给vue增添对话框显示方法
|
|
6
|
+
Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
|
|
7
|
+
},
|
|
8
|
+
async load () {
|
|
9
|
+
const params = {}
|
|
10
|
+
await post(manageApi.getDictionaryValue, {}).then((res) => {
|
|
11
|
+
Object.assign(params, res)
|
|
12
|
+
const badgeItemArray = {}
|
|
13
|
+
for (const key of Object.keys(params)) {
|
|
14
|
+
badgeItemArray[key] = {}
|
|
15
|
+
for (const item of params[key]) {
|
|
16
|
+
if (item.status) {
|
|
17
|
+
badgeItemArray[key][item.value] = {
|
|
18
|
+
status: item.status,
|
|
19
|
+
text: item.text
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// 追加参数
|
|
25
|
+
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
26
|
+
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
27
|
+
})
|
|
28
|
+
// 获取省市区数据
|
|
29
|
+
await post(manageApi.getDivisionsOhChina, {}).then((res) => {
|
|
30
|
+
// 追加参数
|
|
31
|
+
localStorage.setItem(process.env.VUE_APP_DIVISIONSOHCHINA, JSON.stringify(res))
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
// 返回树形省市区
|
|
35
|
+
getDivisionsOhChinaForTree () {
|
|
36
|
+
const str = localStorage.getItem(process.env.VUE_APP_DIVISIONSOHCHINA)
|
|
37
|
+
return handleTree(JSON.parse(str), 'code', 'parentcode')
|
|
38
|
+
},
|
|
39
|
+
// 返回列表省市区
|
|
40
|
+
getDivisionsOhChinaForList () {
|
|
41
|
+
const str = localStorage.getItem(process.env.VUE_APP_DIVISIONSOHCHINA)
|
|
42
|
+
return JSON.parse(str)
|
|
43
|
+
},
|
|
44
|
+
getDictionaryList (key) {
|
|
45
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
46
|
+
const object = JSON.parse(str)
|
|
47
|
+
return object[key]
|
|
48
|
+
},
|
|
49
|
+
getParam (key, value) {
|
|
50
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
51
|
+
const object = JSON.parse(str)
|
|
52
|
+
const result = object[key]
|
|
53
|
+
if (result && result.hasOwnProperty(value)) {
|
|
54
|
+
return result[value]
|
|
55
|
+
} else {
|
|
56
|
+
return null
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
getParams () {
|
|
60
|
+
const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
|
|
61
|
+
const object = JSON.parse(str)
|
|
62
|
+
return object
|
|
63
|
+
},
|
|
64
|
+
getSingleValues () {
|
|
65
|
+
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
66
|
+
const object = JSON.parse(str)
|
|
67
|
+
return object
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export default GetAppDataService
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { get } from '@vue2-client/services/api'
|
|
2
|
-
import Vue from 'vue'
|
|
3
|
-
|
|
4
|
-
async function loginStart (name, password) {
|
|
5
|
-
const resource = await get(`/rs/user/${name}/${password}/智慧OA`, {})
|
|
6
|
-
console.log('登陆获取', resource)
|
|
7
|
-
Vue.$login.f = resource
|
|
8
|
-
await Promise.all([Vue.$appdata.load()])
|
|
9
|
-
const login = {
|
|
10
|
-
f: Vue.$login.f,
|
|
11
|
-
jwt: Vue.$login.f.id,
|
|
12
|
-
r: Vue.$login.r
|
|
13
|
-
}
|
|
14
|
-
Vue.$store.commit('account/setLogin', login)
|
|
15
|
-
return resource
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
loginStart
|
|
20
|
-
}
|
|
1
|
+
import { get } from '@vue2-client/services/api'
|
|
2
|
+
import Vue from 'vue'
|
|
3
|
+
|
|
4
|
+
async function loginStart (name, password) {
|
|
5
|
+
const resource = await get(`/rs/user/${name}/${password}/智慧OA`, {})
|
|
6
|
+
console.log('登陆获取', resource)
|
|
7
|
+
Vue.$login.f = resource
|
|
8
|
+
await Promise.all([Vue.$appdata.load()])
|
|
9
|
+
const login = {
|
|
10
|
+
f: Vue.$login.f,
|
|
11
|
+
jwt: Vue.$login.f.id,
|
|
12
|
+
r: Vue.$login.r
|
|
13
|
+
}
|
|
14
|
+
Vue.$store.commit('account/setLogin', login)
|
|
15
|
+
return resource
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
loginStart
|
|
20
|
+
}
|