vue2-client 1.8.310 → 1.8.311
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 +19 -19
- package/.eslintrc.js +90 -90
- package/CHANGELOG.md +824 -824
- package/Components.md +60 -60
- package/babel.config.js +21 -21
- package/docs/LowCode/lowcode.md +155 -155
- package/docs/LowCode/lowcodeForDeveloper.md +230 -230
- package/docs/index.md +30 -30
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.config.js +21 -21
- package/jest.setup.js +7 -7
- package/package.json +97 -97
- package/public/index.html +27 -27
- package/src/App.vue +188 -188
- package/src/ReportView.js +19 -19
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/assets/svg/badtwo.svg +1 -1
- package/src/assets/svg/goodtwo.svg +1 -1
- package/src/base-client/components/common/AMisRender/index.js +3 -3
- package/src/base-client/components/common/AMisRender/index.vue +263 -263
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +438 -416
- package/src/base-client/components/common/AddressSearchCombobox/demo.vue +36 -36
- package/src/base-client/components/common/AddressSearchCombobox/ic_map.svg +6 -6
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/CitySelect.vue +342 -342
- 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/CreateQuery.vue +669 -669
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1014 -1014
- package/src/base-client/components/common/CreateQuery/index.js +3 -3
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +452 -452
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +511 -511
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorModal.vue +108 -108
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorPanel.vue +350 -350
- package/src/base-client/components/common/LowCodeComponent/LowCodePageOrganization.vue +502 -502
- package/src/base-client/components/common/LowCodeComponent/LowCodeRender.vue +699 -699
- package/src/base-client/components/common/LowCodeComponent/LowCodeRenderEnter.vue +29 -29
- package/src/base-client/components/common/LowCodeComponent/LowCodeUIStore.vue +162 -162
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue +117 -117
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue +80 -80
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue +398 -398
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue +65 -65
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue +64 -64
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue +73 -73
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue +76 -76
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/Tree.vue +149 -149
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/Upload.vue +239 -239
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +105 -105
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +807 -807
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XAddNativeForm/lowcodeEditorRegister.js +16 -16
- package/src/base-client/components/common/XAddNativeFormOA/XAddNativeFormOA.vue +303 -303
- package/src/base-client/components/common/XAddNativeFormOA/index.js +3 -3
- package/src/base-client/components/common/XAddNativeFormOA/index.md +146 -146
- package/src/base-client/components/common/XBadge/XBadge.vue +78 -78
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +187 -187
- package/src/base-client/components/common/XDescriptions/XDescriptionsGroup.vue +306 -306
- package/src/base-client/components/common/XDescriptions/demo.vue +50 -50
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +83 -83
- package/src/base-client/components/common/XDescriptions/lowcodeEditorRegister.js +31 -31
- package/src/base-client/components/common/XDetailsView/XDetailsView.vue +214 -214
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XForm/XForm.vue +294 -294
- package/src/base-client/components/common/XForm/XFormItem.vue +911 -911
- package/src/base-client/components/common/XForm/XTreeSelect.vue +207 -207
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XFormCol/XFormCol.vue +36 -36
- package/src/base-client/components/common/XFormGroup/XFormGroup.vue +241 -241
- package/src/base-client/components/common/XFormGroup/demo.vue +40 -40
- package/src/base-client/components/common/XFormGroup/index.js +3 -3
- package/src/base-client/components/common/XFormGroup/index.md +38 -38
- package/src/base-client/components/common/XFormGroupDetails/XFormGroupDetails.vue +72 -72
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XFormTable/XFormTable.vue +539 -539
- package/src/base-client/components/common/XFormTable/demo.vue +72 -72
- package/src/base-client/components/common/XFormTable/index.md +98 -98
- package/src/base-client/components/common/XFormTable/lowcodeEditorRegister.js +30 -30
- package/src/base-client/components/common/XImportExcel/XImportExcel.vue +147 -147
- package/src/base-client/components/common/XReport/XReport.vue +858 -858
- package/src/base-client/components/common/XReport/XReportDemo.vue +266 -266
- package/src/base-client/components/common/XReport/XReportDesign.vue +509 -509
- package/src/base-client/components/common/XReport/XReportJsonRender.vue +295 -295
- package/src/base-client/components/common/XReport/XReportTrGroup.vue +801 -801
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReport/index.md +44 -44
- package/src/base-client/components/common/XReportSlot/XReportSlot.vue +110 -110
- package/src/base-client/components/common/XReportSlot/index.js +3 -3
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/XTable.vue +676 -676
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/common/XTree/XTree.vue +423 -423
- package/src/base-client/components/common/XTree/index.js +3 -3
- package/src/base-client/components/common/XTree/index.md +36 -36
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +114 -114
- package/src/base-client/components/common/XTreeOne/lowcodeEditorRegister.js +11 -11
- package/src/base-client/components/index.js +51 -51
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
- package/src/base-client/plugins/AppData.js +121 -121
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/GetLoginInfoService.js +183 -183
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/bootstrap.js +39 -39
- package/src/components/FilePreview/FilePreview.vue +166 -166
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/STable/index.js +361 -361
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/checkbox/ImgCheckbox.vue +163 -163
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/config/default/antd.config.js +89 -89
- package/src/config/default/setting.config.js +55 -55
- package/src/font-style/font.css +4 -4
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +138 -138
- package/src/layouts/header/AdminHeader.vue +132 -132
- package/src/layouts/header/HeaderNotice.vue +177 -177
- package/src/layouts/tabs/TabsHead.vue +189 -189
- package/src/layouts/tabs/TabsView.vue +387 -387
- package/src/lib.js +1 -1
- package/src/main.js +26 -26
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/AMisDemo/AMisDemo.vue +325 -325
- package/src/pages/AMisDemo/AMisDemo2.vue +74 -74
- package/src/pages/DynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/DynamicStatistics/DataTabs.vue +83 -83
- package/src/pages/DynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/DynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/DynamicStatistics/FavoriteList.vue +51 -51
- package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +591 -591
- package/src/pages/DynamicStatistics/SearchBar.vue +192 -192
- package/src/pages/DynamicStatistics/index.vue +282 -282
- package/src/pages/Example/index.vue +33 -33
- package/src/pages/ServiceReview/index.vue +284 -284
- package/src/pages/XReportView/index.vue +62 -62
- package/src/pages/login/Login.vue +378 -378
- package/src/pages/login/LoginV3.vue +389 -389
- package/src/pages/lowCode/lowCodeEditor.vue +1030 -1030
- package/src/pages/lowCode/lowCodeRenderPage.vue +43 -43
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/pages/system/settings/modifyPassword.vue +117 -117
- package/src/pages/system/ticket/index.vue +480 -480
- package/src/pages/system/ticket/submitTicketSuccess.vue +484 -484
- package/src/router/async/config.async.js +34 -34
- package/src/router/async/router.map.js +104 -104
- package/src/router/guards.js +223 -223
- package/src/router/index.js +27 -27
- package/src/router.js +19 -19
- package/src/services/api/TicketDetailsViewApi.js +46 -46
- package/src/services/api/cas.js +79 -79
- package/src/services/api/common.js +307 -307
- package/src/services/api/entity.js +18 -18
- package/src/services/api/index.js +17 -17
- package/src/services/api/restTools.js +46 -46
- package/src/services/apiService.js +14 -14
- package/src/services/user.js +71 -71
- package/src/services/v3Api.js +81 -81
- package/src/store/modules/index.js +5 -5
- package/src/store/modules/lowCode.js +33 -33
- package/src/store/modules/setting.js +119 -119
- package/src/theme/default/style.less +58 -58
- package/src/theme/global.less +139 -139
- package/src/utils/authority-utils.js +85 -85
- package/src/utils/errorCode.js +6 -6
- package/src/utils/formatter.js +80 -80
- package/src/utils/htmlToPDF.js +108 -108
- package/src/utils/htmlToPDFApi.js +5 -5
- package/src/utils/indexedDB.js +258 -258
- package/src/utils/login.js +188 -188
- package/src/utils/lowcode/lowcodeComponentMixin.js +120 -120
- package/src/utils/lowcode/lowcodeLog.js +29 -29
- package/src/utils/lowcode/lowcodeUtils.js +373 -373
- package/src/utils/lowcode/registerComponentForEditor.js +11 -11
- package/src/utils/lowcode/registerComponentForRender.js +11 -11
- package/src/utils/map-utils.js +47 -47
- package/src/utils/reg.js +95 -95
- package/src/utils/request.js +347 -347
- package/src/utils/routerUtil.js +435 -435
- package/src/utils/runEvalFunction.js +6 -6
- package/src/utils/util.js +241 -241
- package/src/utils/waterMark.js +31 -31
- package/test/Amis.spec.js +163 -163
- package/test/Tree.spec.js +167 -167
- package/test/myDialog.spec.js +46 -46
- package/vue.config.js +181 -181
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { commonApi, getConfig, query, addOrModify, remove } from '@vue2-client/services/api/common'
|
|
2
|
-
import { QueryParamsDetailsViewApi } from '@vue2-client/services/api/QueryParamsDetailsViewApi'
|
|
3
|
-
import { DictionaryDetailsViewApi } from '@vue2-client/services/api/DictionaryDetailsViewApi'
|
|
4
|
-
import { LogDetailsViewApi } from '@vue2-client/services/api/LogDetailsViewApi'
|
|
5
|
-
import { manageApi } from '@vue2-client/services/api/manage'
|
|
6
|
-
import { get, post } from '@vue2-client/services/api/restTools'
|
|
7
|
-
import { TicketDetailsViewApi } from '@vue2-client/services/api/TicketDetailsViewApi'
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
commonApi, getConfig, query, addOrModify, remove,
|
|
11
|
-
DictionaryDetailsViewApi,
|
|
12
|
-
LogDetailsViewApi,
|
|
13
|
-
manageApi,
|
|
14
|
-
QueryParamsDetailsViewApi,
|
|
15
|
-
get, post,
|
|
16
|
-
TicketDetailsViewApi
|
|
17
|
-
}
|
|
1
|
+
import { commonApi, getConfig, query, addOrModify, remove } from '@vue2-client/services/api/common'
|
|
2
|
+
import { QueryParamsDetailsViewApi } from '@vue2-client/services/api/QueryParamsDetailsViewApi'
|
|
3
|
+
import { DictionaryDetailsViewApi } from '@vue2-client/services/api/DictionaryDetailsViewApi'
|
|
4
|
+
import { LogDetailsViewApi } from '@vue2-client/services/api/LogDetailsViewApi'
|
|
5
|
+
import { manageApi } from '@vue2-client/services/api/manage'
|
|
6
|
+
import { get, post } from '@vue2-client/services/api/restTools'
|
|
7
|
+
import { TicketDetailsViewApi } from '@vue2-client/services/api/TicketDetailsViewApi'
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
commonApi, getConfig, query, addOrModify, remove,
|
|
11
|
+
DictionaryDetailsViewApi,
|
|
12
|
+
LogDetailsViewApi,
|
|
13
|
+
manageApi,
|
|
14
|
+
QueryParamsDetailsViewApi,
|
|
15
|
+
get, post,
|
|
16
|
+
TicketDetailsViewApi
|
|
17
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
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
|
-
/**
|
|
25
|
-
* DELETE请求
|
|
26
|
-
* @param url 请求地址
|
|
27
|
-
* @param parameter 请求参数
|
|
28
|
-
* @param config
|
|
29
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
30
|
-
*/
|
|
31
|
-
function del (url, parameter, config = {}) {
|
|
32
|
-
return request(url, METHOD.DELETE, parameter, config)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* PUT请求
|
|
37
|
-
* @param url 请求地址
|
|
38
|
-
* @param parameter 请求参数
|
|
39
|
-
* @param config
|
|
40
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
41
|
-
*/
|
|
42
|
-
function put (url, parameter, config = {}) {
|
|
43
|
-
return request(url, METHOD.PUT, parameter, config)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { get, post, del, put }
|
|
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
|
+
/**
|
|
25
|
+
* DELETE请求
|
|
26
|
+
* @param url 请求地址
|
|
27
|
+
* @param parameter 请求参数
|
|
28
|
+
* @param config
|
|
29
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
30
|
+
*/
|
|
31
|
+
function del (url, parameter, config = {}) {
|
|
32
|
+
return request(url, METHOD.DELETE, parameter, config)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* PUT请求
|
|
37
|
+
* @param url 请求地址
|
|
38
|
+
* @param parameter 请求参数
|
|
39
|
+
* @param config
|
|
40
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
41
|
+
*/
|
|
42
|
+
function put (url, parameter, config = {}) {
|
|
43
|
+
return request(url, METHOD.PUT, parameter, config)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { get, post, del, put }
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// 跨域代理前缀
|
|
2
|
-
// const API_PROXY_PREFIX='/api'
|
|
3
|
-
// const BASE_URL = process.env.NODE_ENV === 'production' ? process.env.VUE_APP_API_BASE_URL : API_PROXY_PREFIX
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
LOGIN: `/rs/logic/getLogin`,
|
|
7
|
-
MODIFY_PASSWORD: '/rs/user/modifypwd',
|
|
8
|
-
V4_LOGIN: '/api/af-auth/login',
|
|
9
|
-
V4_LOGOUT: '/api/af-auth/logout',
|
|
10
|
-
ROUTES: `/rs/user/userLogin`,
|
|
11
|
-
SEARCH: `/rs/search`,
|
|
12
|
-
GOODS: `/goods`,
|
|
13
|
-
GOODS_COLUMNS: `/columns`
|
|
14
|
-
}
|
|
1
|
+
// 跨域代理前缀
|
|
2
|
+
// const API_PROXY_PREFIX='/api'
|
|
3
|
+
// const BASE_URL = process.env.NODE_ENV === 'production' ? process.env.VUE_APP_API_BASE_URL : API_PROXY_PREFIX
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
LOGIN: `/rs/logic/getLogin`,
|
|
7
|
+
MODIFY_PASSWORD: '/rs/user/modifypwd',
|
|
8
|
+
V4_LOGIN: '/api/af-auth/login',
|
|
9
|
+
V4_LOGOUT: '/api/af-auth/logout',
|
|
10
|
+
ROUTES: `/rs/user/userLogin`,
|
|
11
|
+
SEARCH: `/rs/search`,
|
|
12
|
+
GOODS: `/goods`,
|
|
13
|
+
GOODS_COLUMNS: `/columns`
|
|
14
|
+
}
|
package/src/services/user.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { LOGIN, MODIFY_PASSWORD, ROUTES, V4_GET_INFO, V4_LOGIN, V4_LOGOUT } from '@vue2-client/services/apiService'
|
|
2
|
-
import { request, METHOD, removeAuthorization } from '@vue2-client/utils/request'
|
|
3
|
-
import EncryptUtil from '@vue2-client/utils/EncryptUtil'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 登录服务
|
|
7
|
-
* @param name 账户名
|
|
8
|
-
* @param password 账户密码
|
|
9
|
-
* @returns {Promise<AxiosResponse<T>>}
|
|
10
|
-
*/
|
|
11
|
-
export async function login (name, password) {
|
|
12
|
-
let data = {
|
|
13
|
-
name: name,
|
|
14
|
-
password: password
|
|
15
|
-
}
|
|
16
|
-
data = '$' + EncryptUtil.RSAEncrypt(JSON.stringify(data))
|
|
17
|
-
return request(LOGIN, METHOD.POST, data)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export async function modifyPassword (name, password, newPassword) {
|
|
21
|
-
return request(MODIFY_PASSWORD, METHOD.POST, {
|
|
22
|
-
data: {
|
|
23
|
-
ename: name,
|
|
24
|
-
password: password,
|
|
25
|
-
newpassword: newPassword,
|
|
26
|
-
affirmpassword: newPassword
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export async function V4Login (name, password, routeName) {
|
|
32
|
-
return request(V4_LOGIN, METHOD.POST, {
|
|
33
|
-
username: name,
|
|
34
|
-
password: password,
|
|
35
|
-
resourceName: routeName
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export async function V4GetInfo () {
|
|
40
|
-
return request(V4_GET_INFO, METHOD.POST, {})
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export async function getRoutesConfig (value, routeName = '智慧燃气') {
|
|
44
|
-
return request(ROUTES + '/' + routeName, METHOD.POST, value)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* 退出登录
|
|
49
|
-
*/
|
|
50
|
-
export function logout () {
|
|
51
|
-
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
52
|
-
window.microApp.dispatch({ type: 'logout' })
|
|
53
|
-
}
|
|
54
|
-
return new Promise((resolve, reject) => {
|
|
55
|
-
request(V4_LOGOUT, METHOD.DELETE, {}).then(() => {
|
|
56
|
-
resolve()
|
|
57
|
-
}).catch(error => {
|
|
58
|
-
reject(error)
|
|
59
|
-
}).finally(() => {
|
|
60
|
-
localStorage.removeItem(process.env.VUE_APP_ROUTES_KEY)
|
|
61
|
-
localStorage.removeItem(process.env.VUE_APP_PERMISSIONS_KEY)
|
|
62
|
-
localStorage.removeItem(process.env.VUE_APP_ROLES_KEY)
|
|
63
|
-
removeAuthorization()
|
|
64
|
-
})
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
export default {
|
|
68
|
-
login,
|
|
69
|
-
logout,
|
|
70
|
-
getRoutesConfig
|
|
71
|
-
}
|
|
1
|
+
import { LOGIN, MODIFY_PASSWORD, ROUTES, V4_GET_INFO, V4_LOGIN, V4_LOGOUT } from '@vue2-client/services/apiService'
|
|
2
|
+
import { request, METHOD, removeAuthorization } from '@vue2-client/utils/request'
|
|
3
|
+
import EncryptUtil from '@vue2-client/utils/EncryptUtil'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 登录服务
|
|
7
|
+
* @param name 账户名
|
|
8
|
+
* @param password 账户密码
|
|
9
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
10
|
+
*/
|
|
11
|
+
export async function login (name, password) {
|
|
12
|
+
let data = {
|
|
13
|
+
name: name,
|
|
14
|
+
password: password
|
|
15
|
+
}
|
|
16
|
+
data = '$' + EncryptUtil.RSAEncrypt(JSON.stringify(data))
|
|
17
|
+
return request(LOGIN, METHOD.POST, data)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export async function modifyPassword (name, password, newPassword) {
|
|
21
|
+
return request(MODIFY_PASSWORD, METHOD.POST, {
|
|
22
|
+
data: {
|
|
23
|
+
ename: name,
|
|
24
|
+
password: password,
|
|
25
|
+
newpassword: newPassword,
|
|
26
|
+
affirmpassword: newPassword
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function V4Login (name, password, routeName) {
|
|
32
|
+
return request(V4_LOGIN, METHOD.POST, {
|
|
33
|
+
username: name,
|
|
34
|
+
password: password,
|
|
35
|
+
resourceName: routeName
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function V4GetInfo () {
|
|
40
|
+
return request(V4_GET_INFO, METHOD.POST, {})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export async function getRoutesConfig (value, routeName = '智慧燃气') {
|
|
44
|
+
return request(ROUTES + '/' + routeName, METHOD.POST, value)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 退出登录
|
|
49
|
+
*/
|
|
50
|
+
export function logout () {
|
|
51
|
+
if (window.__MICRO_APP_ENVIRONMENT__) {
|
|
52
|
+
window.microApp.dispatch({ type: 'logout' })
|
|
53
|
+
}
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
request(V4_LOGOUT, METHOD.DELETE, {}).then(() => {
|
|
56
|
+
resolve()
|
|
57
|
+
}).catch(error => {
|
|
58
|
+
reject(error)
|
|
59
|
+
}).finally(() => {
|
|
60
|
+
localStorage.removeItem(process.env.VUE_APP_ROUTES_KEY)
|
|
61
|
+
localStorage.removeItem(process.env.VUE_APP_PERMISSIONS_KEY)
|
|
62
|
+
localStorage.removeItem(process.env.VUE_APP_ROLES_KEY)
|
|
63
|
+
removeAuthorization()
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
export default {
|
|
68
|
+
login,
|
|
69
|
+
logout,
|
|
70
|
+
getRoutesConfig
|
|
71
|
+
}
|
package/src/services/v3Api.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
-
import { runLogic } from '@vue2-client/services/api/common'
|
|
3
|
-
|
|
4
|
-
function getLeafNodes (nodes) {
|
|
5
|
-
let leaves = []
|
|
6
|
-
nodes.forEach(node => {
|
|
7
|
-
if (node.children && node.children.length) {
|
|
8
|
-
leaves = leaves.concat(getLeafNodes(node.children))
|
|
9
|
-
} else {
|
|
10
|
-
leaves.push(node)
|
|
11
|
-
}
|
|
12
|
-
})
|
|
13
|
-
return leaves
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function transformData (inputData) {
|
|
17
|
-
function transform (node) {
|
|
18
|
-
return {
|
|
19
|
-
label: node.name,
|
|
20
|
-
value: node.id,
|
|
21
|
-
f_organization_id: node.f_organization_id,
|
|
22
|
-
parentid: node.parentid,
|
|
23
|
-
orgid: node.orgid,
|
|
24
|
-
children: node.children ? node.children.map(transform) : []
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return inputData.map(transform)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function getResData (params, toCallback) {
|
|
32
|
-
const data = { userId: params.userid, roleName: params.roleName }
|
|
33
|
-
if (params.source === '获取分公司') {
|
|
34
|
-
runLogic('getOrgBySearch', data, 'af-system').then(res => toCallback(res))
|
|
35
|
-
} else if (params.source === '获取部门') {
|
|
36
|
-
runLogic('getDepBySearch', data, 'af-system').then(res => toCallback(res))
|
|
37
|
-
} else if (params.source === '获取人员') {
|
|
38
|
-
runLogic('getUserBySearch', data, 'af-system').then(res => toCallback(res))
|
|
39
|
-
} else if (params.source === '根据角色获取人员') {
|
|
40
|
-
runLogic('getUserBySearchRole', data, 'af-system').then(res => toCallback(res))
|
|
41
|
-
} else {
|
|
42
|
-
return search(params).then(res => toCallback(res))
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export async function searchToOption (params, callback) {
|
|
47
|
-
function toCallback (res) {
|
|
48
|
-
if (res.length) {
|
|
49
|
-
if (res[0].children) {
|
|
50
|
-
if (res[0].children.length) {
|
|
51
|
-
if (res[0].children[0].children) {
|
|
52
|
-
callback(transformData(res[0].children[0].children))
|
|
53
|
-
} else {
|
|
54
|
-
callback(transformData(res[0].children))
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
callback(res[0].children)
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
callback(res)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
await getResData(params, toCallback)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export async function searchToListOption (params, callback) {
|
|
69
|
-
function toCallback (res) {
|
|
70
|
-
const leafNodes = getLeafNodes(res)
|
|
71
|
-
callback(transformData(leafNodes))
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
await getResData(params, toCallback)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export async function search (params) {
|
|
78
|
-
return request('/rs/search', METHOD.POST, params)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export default { searchToOption, search }
|
|
1
|
+
import { METHOD, request } from '@vue2-client/utils/request'
|
|
2
|
+
import { runLogic } from '@vue2-client/services/api/common'
|
|
3
|
+
|
|
4
|
+
function getLeafNodes (nodes) {
|
|
5
|
+
let leaves = []
|
|
6
|
+
nodes.forEach(node => {
|
|
7
|
+
if (node.children && node.children.length) {
|
|
8
|
+
leaves = leaves.concat(getLeafNodes(node.children))
|
|
9
|
+
} else {
|
|
10
|
+
leaves.push(node)
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
return leaves
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function transformData (inputData) {
|
|
17
|
+
function transform (node) {
|
|
18
|
+
return {
|
|
19
|
+
label: node.name,
|
|
20
|
+
value: node.id,
|
|
21
|
+
f_organization_id: node.f_organization_id,
|
|
22
|
+
parentid: node.parentid,
|
|
23
|
+
orgid: node.orgid,
|
|
24
|
+
children: node.children ? node.children.map(transform) : []
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return inputData.map(transform)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function getResData (params, toCallback) {
|
|
32
|
+
const data = { userId: params.userid, roleName: params.roleName }
|
|
33
|
+
if (params.source === '获取分公司') {
|
|
34
|
+
runLogic('getOrgBySearch', data, 'af-system').then(res => toCallback(res))
|
|
35
|
+
} else if (params.source === '获取部门') {
|
|
36
|
+
runLogic('getDepBySearch', data, 'af-system').then(res => toCallback(res))
|
|
37
|
+
} else if (params.source === '获取人员') {
|
|
38
|
+
runLogic('getUserBySearch', data, 'af-system').then(res => toCallback(res))
|
|
39
|
+
} else if (params.source === '根据角色获取人员') {
|
|
40
|
+
runLogic('getUserBySearchRole', data, 'af-system').then(res => toCallback(res))
|
|
41
|
+
} else {
|
|
42
|
+
return search(params).then(res => toCallback(res))
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export async function searchToOption (params, callback) {
|
|
47
|
+
function toCallback (res) {
|
|
48
|
+
if (res.length) {
|
|
49
|
+
if (res[0].children) {
|
|
50
|
+
if (res[0].children.length) {
|
|
51
|
+
if (res[0].children[0].children) {
|
|
52
|
+
callback(transformData(res[0].children[0].children))
|
|
53
|
+
} else {
|
|
54
|
+
callback(transformData(res[0].children))
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
callback(res[0].children)
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
callback(res)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
await getResData(params, toCallback)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export async function searchToListOption (params, callback) {
|
|
69
|
+
function toCallback (res) {
|
|
70
|
+
const leafNodes = getLeafNodes(res)
|
|
71
|
+
callback(transformData(leafNodes))
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
await getResData(params, toCallback)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export async function search (params) {
|
|
78
|
+
return request('/rs/search', METHOD.POST, params)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default { searchToOption, search }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import account from './account'
|
|
2
|
-
import setting from './setting'
|
|
3
|
-
import lowCode from './lowCode'
|
|
4
|
-
|
|
5
|
-
export default { account, setting, lowCode }
|
|
1
|
+
import account from './account'
|
|
2
|
+
import setting from './setting'
|
|
3
|
+
import lowCode from './lowCode'
|
|
4
|
+
|
|
5
|
+
export default { account, setting, lowCode }
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
namespace: true,
|
|
3
|
-
state: {
|
|
4
|
-
// 页面配置
|
|
5
|
-
config: { page: [] },
|
|
6
|
-
// 事件编辑
|
|
7
|
-
eventEditorContent: {},
|
|
8
|
-
// 已选中的容器
|
|
9
|
-
targetContainer: undefined
|
|
10
|
-
},
|
|
11
|
-
getters: {
|
|
12
|
-
config: state => {
|
|
13
|
-
return state.config
|
|
14
|
-
},
|
|
15
|
-
eventEditorContent: state => {
|
|
16
|
-
return state.eventEditorContent
|
|
17
|
-
},
|
|
18
|
-
targetContainer: state => {
|
|
19
|
-
return state.targetContainer
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
mutations: {
|
|
23
|
-
setConfig (state, newConfig) {
|
|
24
|
-
state.config = newConfig
|
|
25
|
-
},
|
|
26
|
-
setEventEditorContent (state, newContent) {
|
|
27
|
-
state.eventEditorContent = newContent
|
|
28
|
-
},
|
|
29
|
-
setTargetContainer (state, newVal) {
|
|
30
|
-
state.targetContainer = newVal
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
namespace: true,
|
|
3
|
+
state: {
|
|
4
|
+
// 页面配置
|
|
5
|
+
config: { page: [] },
|
|
6
|
+
// 事件编辑
|
|
7
|
+
eventEditorContent: {},
|
|
8
|
+
// 已选中的容器
|
|
9
|
+
targetContainer: undefined
|
|
10
|
+
},
|
|
11
|
+
getters: {
|
|
12
|
+
config: state => {
|
|
13
|
+
return state.config
|
|
14
|
+
},
|
|
15
|
+
eventEditorContent: state => {
|
|
16
|
+
return state.eventEditorContent
|
|
17
|
+
},
|
|
18
|
+
targetContainer: state => {
|
|
19
|
+
return state.targetContainer
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
mutations: {
|
|
23
|
+
setConfig (state, newConfig) {
|
|
24
|
+
state.config = newConfig
|
|
25
|
+
},
|
|
26
|
+
setEventEditorContent (state, newContent) {
|
|
27
|
+
state.eventEditorContent = newContent
|
|
28
|
+
},
|
|
29
|
+
setTargetContainer (state, newVal) {
|
|
30
|
+
state.targetContainer = newVal
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|