vue2-client 1.7.11 → 1.7.13
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/.eslintrc.js +82 -82
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/assets/img/querySlotDemo.svg +15 -15
- 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/PersonSetting/PersonSetting.vue +210 -210
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XFormTable/XFormTable.vue +66 -60
- package/src/base-client/components/common/XTable/XTable.vue +3 -1
- package/src/base-client/components/index.js +41 -41
- package/src/config/default/setting.config.js +1 -1
- package/src/services/api/restTools.js +24 -24
- package/src/utils/indexedDB.js +6 -4
- package/src/utils/request.js +311 -311
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import XForm from './common/XForm'
|
|
2
|
-
import XAddForm from './common/XAddForm'
|
|
3
|
-
import XAddNativeForm from './common/XAddNativeForm'
|
|
4
|
-
import XFormCol from './common/XFormCol'
|
|
5
|
-
import XTable from './common/XTable'
|
|
6
|
-
import XTreeOne from './common/XTreeOne'
|
|
7
|
-
import XImportExcel from './common/XImportExcel'
|
|
8
|
-
import XDataDrawer from './common/XDataDrawer'
|
|
9
|
-
import XCard from './common/XCard'
|
|
10
|
-
import XBadge from './common/XBadge'
|
|
11
|
-
import Upload from './common/Upload'
|
|
12
|
-
import JSONToTree from './common/JSONToTree'
|
|
13
|
-
import FormGroupEdit from './common/FormGroupEdit'
|
|
14
|
-
import FormGroupQuery from './common/FormGroupQuery'
|
|
15
|
-
import AddressSearchCombobox from './common/AddressSearchCombobox'
|
|
16
|
-
import AmapMarker from './common/AmapMarker'
|
|
17
|
-
import CreateQuery from './common/CreateQuery'
|
|
18
|
-
import CreateSimpleFormQuery from './common/CreateSimpleFormQuery'
|
|
19
|
-
import PersonSetting from './common/PersonSetting'
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
XForm,
|
|
23
|
-
XAddForm,
|
|
24
|
-
XAddNativeForm,
|
|
25
|
-
XFormCol,
|
|
26
|
-
XTable,
|
|
27
|
-
XTreeOne,
|
|
28
|
-
XImportExcel,
|
|
29
|
-
XDataDrawer,
|
|
30
|
-
XCard,
|
|
31
|
-
XBadge,
|
|
32
|
-
Upload,
|
|
33
|
-
JSONToTree,
|
|
34
|
-
FormGroupEdit,
|
|
35
|
-
FormGroupQuery,
|
|
36
|
-
AddressSearchCombobox,
|
|
37
|
-
AmapMarker,
|
|
38
|
-
CreateQuery,
|
|
39
|
-
CreateSimpleFormQuery,
|
|
40
|
-
PersonSetting
|
|
41
|
-
}
|
|
1
|
+
import XForm from './common/XForm'
|
|
2
|
+
import XAddForm from './common/XAddForm'
|
|
3
|
+
import XAddNativeForm from './common/XAddNativeForm'
|
|
4
|
+
import XFormCol from './common/XFormCol'
|
|
5
|
+
import XTable from './common/XTable'
|
|
6
|
+
import XTreeOne from './common/XTreeOne'
|
|
7
|
+
import XImportExcel from './common/XImportExcel'
|
|
8
|
+
import XDataDrawer from './common/XDataDrawer'
|
|
9
|
+
import XCard from './common/XCard'
|
|
10
|
+
import XBadge from './common/XBadge'
|
|
11
|
+
import Upload from './common/Upload'
|
|
12
|
+
import JSONToTree from './common/JSONToTree'
|
|
13
|
+
import FormGroupEdit from './common/FormGroupEdit'
|
|
14
|
+
import FormGroupQuery from './common/FormGroupQuery'
|
|
15
|
+
import AddressSearchCombobox from './common/AddressSearchCombobox'
|
|
16
|
+
import AmapMarker from './common/AmapMarker'
|
|
17
|
+
import CreateQuery from './common/CreateQuery'
|
|
18
|
+
import CreateSimpleFormQuery from './common/CreateSimpleFormQuery'
|
|
19
|
+
import PersonSetting from './common/PersonSetting'
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
XForm,
|
|
23
|
+
XAddForm,
|
|
24
|
+
XAddNativeForm,
|
|
25
|
+
XFormCol,
|
|
26
|
+
XTable,
|
|
27
|
+
XTreeOne,
|
|
28
|
+
XImportExcel,
|
|
29
|
+
XDataDrawer,
|
|
30
|
+
XCard,
|
|
31
|
+
XBadge,
|
|
32
|
+
Upload,
|
|
33
|
+
JSONToTree,
|
|
34
|
+
FormGroupEdit,
|
|
35
|
+
FormGroupQuery,
|
|
36
|
+
AddressSearchCombobox,
|
|
37
|
+
AmapMarker,
|
|
38
|
+
CreateQuery,
|
|
39
|
+
CreateSimpleFormQuery,
|
|
40
|
+
PersonSetting
|
|
41
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* GET请求
|
|
5
|
-
* @param url 请求地址
|
|
6
|
-
* @param parameter 路径参数
|
|
7
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
8
|
-
*/
|
|
9
|
-
function get (url, parameter) {
|
|
10
|
-
return request(url, METHOD.GET, parameter)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* POST请求
|
|
15
|
-
* @param url 请求地址
|
|
16
|
-
* @param parameter 请求参数
|
|
17
|
-
* @param config
|
|
18
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
19
|
-
*/
|
|
20
|
-
function post (url, parameter, config = {}) {
|
|
21
|
-
return request(url, METHOD.POST, parameter, config)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { get, post }
|
|
1
|
+
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GET请求
|
|
5
|
+
* @param url 请求地址
|
|
6
|
+
* @param parameter 路径参数
|
|
7
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
8
|
+
*/
|
|
9
|
+
function get (url, parameter) {
|
|
10
|
+
return request(url, METHOD.GET, parameter)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* POST请求
|
|
15
|
+
* @param url 请求地址
|
|
16
|
+
* @param parameter 请求参数
|
|
17
|
+
* @param config
|
|
18
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
19
|
+
*/
|
|
20
|
+
function post (url, parameter, config = {}) {
|
|
21
|
+
return request(url, METHOD.POST, parameter, config)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { get, post }
|
package/src/utils/indexedDB.js
CHANGED
|
@@ -92,7 +92,7 @@ export const indexedDB = {
|
|
|
92
92
|
}
|
|
93
93
|
})
|
|
94
94
|
},
|
|
95
|
-
getByWeb: function (key, url, params, callback,
|
|
95
|
+
getByWeb: function (key, url, params, callback, processFun) {
|
|
96
96
|
const self = this
|
|
97
97
|
self.openDB((res) => {
|
|
98
98
|
// 根据存储空间的键找到对应数据
|
|
@@ -105,10 +105,12 @@ export const indexedDB = {
|
|
|
105
105
|
const result = e.target.result
|
|
106
106
|
if (!result && url) {
|
|
107
107
|
post(url, params).then((res) => {
|
|
108
|
-
if (
|
|
109
|
-
res =
|
|
108
|
+
if (processFun) {
|
|
109
|
+
res = processFun(res)
|
|
110
|
+
}
|
|
111
|
+
if (process.env.NODE_ENV === 'production') {
|
|
112
|
+
self.add(key, res)
|
|
110
113
|
}
|
|
111
|
-
self.add(key, res)
|
|
112
114
|
callback(res)
|
|
113
115
|
})
|
|
114
116
|
} else {
|