af-mobile-client-vue3 1.1.8 โ 1.1.10
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 +6 -6
- package/.env.development +4 -4
- package/.env.envoiceShow +6 -6
- package/.env.production +6 -6
- package/.husky/commit-msg +1 -1
- package/.husky/pre-commit +1 -1
- package/.vscode/settings.json +61 -61
- package/mock/modules/user.mock.ts +152 -152
- package/package.json +1 -1
- package/public/favicon.svg +4 -4
- package/public/safari-pinned-tab.svg +32 -32
- package/scripts/verifyCommit.js +19 -19
- package/src/App.vue +43 -43
- package/src/api/user/index.ts +40 -40
- package/src/bootstrap.ts +18 -18
- package/src/components/core/NavBar/index.vue +12 -12
- package/src/components/core/Tabbar/index.vue +38 -38
- package/src/components/core/XGridDropOption/index.vue +151 -151
- package/src/components/core/XMultiSelect/index.vue +183 -183
- package/src/components/data/XCellDetail/index.vue +106 -106
- package/src/components/data/XFormItem/index.vue +105 -107
- package/src/components/data/XOlMap/XLocationPicker/index.vue +7 -9
- package/src/components/data/XOlMap/index.vue +103 -96
- package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
- package/src/components/data/XReportForm/index.vue +1079 -1079
- package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
- package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
- package/src/components/data/XSignature/index.vue +285 -285
- package/src/components/data/XTag/index.vue +10 -10
- package/src/components/layout/NormalDataLayout/index.vue +70 -70
- package/src/components/layout/TabBarLayout/index.vue +40 -40
- package/src/components.d.ts +53 -53
- package/src/env.d.ts +16 -16
- package/src/font-style/font.css +3 -3
- package/src/hooks/useCommon.ts +9 -9
- package/src/layout/PageLayout.vue +4 -5
- package/src/layout/SingleLayout.vue +4 -5
- package/src/locales/en-US.json +25 -25
- package/src/locales/zh-CN.json +25 -25
- package/src/plugins/AppData.ts +38 -38
- package/src/router/guards.ts +59 -59
- package/src/router/index.ts +61 -61
- package/src/router/invoiceRoutes.ts +33 -33
- package/src/services/api/common.ts +109 -109
- package/src/services/api/manage.ts +8 -8
- package/src/services/api/search.ts +16 -16
- package/src/services/restTools.ts +56 -56
- package/src/services/v3Api.ts +11 -11
- package/src/stores/modules/routeCache.ts +22 -0
- package/src/stores/modules/setting.ts +52 -52
- package/src/stores/mutation-type.ts +7 -7
- package/src/utils/authority-utils.ts +84 -84
- package/src/utils/crypto.ts +39 -39
- package/src/utils/i18n.ts +41 -41
- package/src/utils/indexedDB.ts +180 -180
- package/src/utils/mobileUtil.ts +26 -26
- package/src/utils/routerUtil.ts +271 -271
- package/src/utils/runEvalFunction.ts +13 -13
- package/src/utils/wechatUtil.ts +9 -9
- package/src/views/common/LoadError.vue +64 -64
- package/src/views/common/NotFound.vue +68 -68
- package/src/views/component/EvaluateRecordView/index.vue +40 -40
- package/src/views/component/XCellDetailView/index.vue +217 -217
- package/src/views/component/XCellListView/index.vue +2 -2
- package/src/views/component/XOlMapView/XLocationPicker/index.vue +0 -2
- package/src/views/component/XOlMapView/index.vue +3 -5
- package/src/views/component/XReportFormIframeView/index.vue +47 -47
- package/src/views/component/XReportFormView/index.vue +13 -13
- package/src/views/component/XSignatureView/index.vue +50 -50
- package/src/views/component/menu.vue +117 -117
- package/src/views/component/notice.vue +46 -46
- package/src/views/component/topNav.vue +36 -36
- package/src/views/invoiceShow/index.vue +61 -61
- package/src/views/user/login/ForgetPasswordForm.vue +94 -94
- package/src/views/user/login/LoginTitle.vue +68 -68
- package/src/views/user/login/index.vue +22 -22
- package/src/views/user/my/index.vue +230 -230
- package/src/vue-router.d.ts +9 -9
- package/tsconfig.json +43 -43
- package/src/stores/modules/cachedView.ts +0 -31
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
Col as VanCol,
|
|
4
|
-
Icon as VanIcon,
|
|
5
|
-
Row as VanRow,
|
|
6
|
-
} from 'vant'
|
|
7
|
-
|
|
8
|
-
const { title } = withDefaults(defineProps<{
|
|
9
|
-
// ๆ ้ข
|
|
10
|
-
title: string
|
|
11
|
-
}>(), {
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
// back
|
|
15
|
-
const onClickLeft = () => history.back()
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<!-- ๅธธ่งๆฐๆฎๅธๅฑ -->
|
|
20
|
-
<main class="layout_main">
|
|
21
|
-
<!-- ๅธๅฑๅคด้จ -->
|
|
22
|
-
<div class="layout_header">
|
|
23
|
-
<VanRow class="header_row" justify="space-between">
|
|
24
|
-
<VanCol class="header_row_left_col">
|
|
25
|
-
<VanIcon class="header_row_icon" name="arrow-left" @click="onClickLeft" />
|
|
26
|
-
<span class="header_row_title">{{ title }}</span>
|
|
27
|
-
</VanCol>
|
|
28
|
-
<VanCol class="header_row_right_col">
|
|
29
|
-
<!-- ๅณไพงๅบๅ -->
|
|
30
|
-
<slot name="layout_header_row_right_col" />
|
|
31
|
-
</VanCol>
|
|
32
|
-
</VanRow>
|
|
33
|
-
</div>
|
|
34
|
-
<!-- ๅธๅฑไธปไฝ -->
|
|
35
|
-
<div class="layout_content">
|
|
36
|
-
<slot name="layout_content" />
|
|
37
|
-
</div>
|
|
38
|
-
</main>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<style scoped lang="less">
|
|
42
|
-
.layout_main {
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-flow: column;
|
|
45
|
-
width: 100%;
|
|
46
|
-
height: 100vh;
|
|
47
|
-
.layout_header {
|
|
48
|
-
padding: var(--base-interval-1);
|
|
49
|
-
.header_row {
|
|
50
|
-
align-items: center;
|
|
51
|
-
.header_row_left_col {
|
|
52
|
-
flex-grow: 1;
|
|
53
|
-
.header_row_title {
|
|
54
|
-
margin-left: var(--van-padding-xs);
|
|
55
|
-
font-size: 20px;
|
|
56
|
-
font-weight: bold;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
.header_row_icon {
|
|
60
|
-
font-size: 18px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
.layout_content {
|
|
65
|
-
flex: 1;
|
|
66
|
-
margin-top: var(--van-padding-base);
|
|
67
|
-
height: 0;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Col as VanCol,
|
|
4
|
+
Icon as VanIcon,
|
|
5
|
+
Row as VanRow,
|
|
6
|
+
} from 'vant'
|
|
7
|
+
|
|
8
|
+
const { title } = withDefaults(defineProps<{
|
|
9
|
+
// ๆ ้ข
|
|
10
|
+
title: string
|
|
11
|
+
}>(), {
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
// back
|
|
15
|
+
const onClickLeft = () => history.back()
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<!-- ๅธธ่งๆฐๆฎๅธๅฑ -->
|
|
20
|
+
<main class="layout_main">
|
|
21
|
+
<!-- ๅธๅฑๅคด้จ -->
|
|
22
|
+
<div class="layout_header">
|
|
23
|
+
<VanRow class="header_row" justify="space-between">
|
|
24
|
+
<VanCol class="header_row_left_col">
|
|
25
|
+
<VanIcon class="header_row_icon" name="arrow-left" @click="onClickLeft" />
|
|
26
|
+
<span class="header_row_title">{{ title }}</span>
|
|
27
|
+
</VanCol>
|
|
28
|
+
<VanCol class="header_row_right_col">
|
|
29
|
+
<!-- ๅณไพงๅบๅ -->
|
|
30
|
+
<slot name="layout_header_row_right_col" />
|
|
31
|
+
</VanCol>
|
|
32
|
+
</VanRow>
|
|
33
|
+
</div>
|
|
34
|
+
<!-- ๅธๅฑไธปไฝ -->
|
|
35
|
+
<div class="layout_content">
|
|
36
|
+
<slot name="layout_content" />
|
|
37
|
+
</div>
|
|
38
|
+
</main>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<style scoped lang="less">
|
|
42
|
+
.layout_main {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-flow: column;
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100vh;
|
|
47
|
+
.layout_header {
|
|
48
|
+
padding: var(--base-interval-1);
|
|
49
|
+
.header_row {
|
|
50
|
+
align-items: center;
|
|
51
|
+
.header_row_left_col {
|
|
52
|
+
flex-grow: 1;
|
|
53
|
+
.header_row_title {
|
|
54
|
+
margin-left: var(--van-padding-xs);
|
|
55
|
+
font-size: 20px;
|
|
56
|
+
font-weight: bold;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.header_row_icon {
|
|
60
|
+
font-size: 18px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
.layout_content {
|
|
65
|
+
flex: 1;
|
|
66
|
+
margin-top: var(--van-padding-base);
|
|
67
|
+
height: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
Tabbar as VanTabbar,
|
|
4
|
-
TabbarItem as VanTabbarItem,
|
|
5
|
-
} from 'vant'
|
|
6
|
-
import { defineProps } from 'vue'
|
|
7
|
-
|
|
8
|
-
const { barList, callbacks } = defineProps<{
|
|
9
|
-
barList?: Array<{ icon: string, text: string, method: string }>
|
|
10
|
-
callbacks?: object
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
function handleClick(index) {
|
|
14
|
-
const methodName = (barList[index] as any).method
|
|
15
|
-
callbacks[methodName]()
|
|
16
|
-
}
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<template>
|
|
20
|
-
<VanTabbar class="van-bar">
|
|
21
|
-
<VanTabbarItem v-for="(item, index) in barList" :key="index" :icon="(item as any).icon" @click="handleClick(index)">
|
|
22
|
-
{{ (item as any).text }}
|
|
23
|
-
</VanTabbarItem>
|
|
24
|
-
</VanTabbar>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<style scoped lang="less">
|
|
28
|
-
.van-bar {
|
|
29
|
-
height: 8vh;
|
|
30
|
-
background-color: #f7f8fa;
|
|
31
|
-
color: black;
|
|
32
|
-
}
|
|
33
|
-
.van-tabbar-item:hover {
|
|
34
|
-
color: var(--van-text-color-2);
|
|
35
|
-
}
|
|
36
|
-
:deep(.van-tabbar-item--active) {
|
|
37
|
-
background-color: #f7f8fa;
|
|
38
|
-
color: black;
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Tabbar as VanTabbar,
|
|
4
|
+
TabbarItem as VanTabbarItem,
|
|
5
|
+
} from 'vant'
|
|
6
|
+
import { defineProps } from 'vue'
|
|
7
|
+
|
|
8
|
+
const { barList, callbacks } = defineProps<{
|
|
9
|
+
barList?: Array<{ icon: string, text: string, method: string }>
|
|
10
|
+
callbacks?: object
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
function handleClick(index) {
|
|
14
|
+
const methodName = (barList[index] as any).method
|
|
15
|
+
callbacks[methodName]()
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<VanTabbar class="van-bar">
|
|
21
|
+
<VanTabbarItem v-for="(item, index) in barList" :key="index" :icon="(item as any).icon" @click="handleClick(index)">
|
|
22
|
+
{{ (item as any).text }}
|
|
23
|
+
</VanTabbarItem>
|
|
24
|
+
</VanTabbar>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style scoped lang="less">
|
|
28
|
+
.van-bar {
|
|
29
|
+
height: 8vh;
|
|
30
|
+
background-color: #f7f8fa;
|
|
31
|
+
color: black;
|
|
32
|
+
}
|
|
33
|
+
.van-tabbar-item:hover {
|
|
34
|
+
color: var(--van-text-color-2);
|
|
35
|
+
}
|
|
36
|
+
:deep(.van-tabbar-item--active) {
|
|
37
|
+
background-color: #f7f8fa;
|
|
38
|
+
color: black;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
package/src/components.d.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* prettier-ignore */
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
// Generated by unplugin-vue-components
|
|
5
|
-
// Read more: https://github.com/vuejs/core/pull/3399
|
|
6
|
-
export {}
|
|
7
|
-
|
|
8
|
-
declare module 'vue' {
|
|
9
|
-
export interface GlobalComponents {
|
|
10
|
-
BeautifulLoading: typeof import('./components/core/BeautifulLoading/index.vue')['default']
|
|
11
|
-
MicroAppView: typeof import('./components/core/App/MicroAppView.vue')['default']
|
|
12
|
-
NavBar: typeof import('./components/core/NavBar/index.vue')['default']
|
|
13
|
-
NormalDataLayout: typeof import('./components/layout/NormalDataLayout/index.vue')['default']
|
|
14
|
-
RouterLink: typeof import('vue-router')['RouterLink']
|
|
15
|
-
RouterView: typeof import('vue-router')['RouterView']
|
|
16
|
-
SvgIcon: typeof import('./components/core/SvgIcon/index.vue')['default']
|
|
17
|
-
Tabbar: typeof import('./components/core/Tabbar/index.vue')['default']
|
|
18
|
-
TabBarLayout: typeof import('./components/layout/TabBarLayout/index.vue')['default']
|
|
19
|
-
Uploader: typeof import('./components/core/Uploader/index.vue')['default']
|
|
20
|
-
VanArea: typeof import('vant/es')['Area']
|
|
21
|
-
VanButton: typeof import('vant/es')['Button']
|
|
22
|
-
VanCalendar: typeof import('vant/es')['Calendar']
|
|
23
|
-
VanCell: typeof import('vant/es')['Cell']
|
|
24
|
-
VanCellGroup: typeof import('vant/es')['CellGroup']
|
|
25
|
-
VanCheckbox: typeof import('vant/es')['Checkbox']
|
|
26
|
-
VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
|
|
27
|
-
VanDatePicker: typeof import('vant/es')['DatePicker']
|
|
28
|
-
VanField: typeof import('vant/es')['Field']
|
|
29
|
-
VanForm: typeof import('vant/es')['Form']
|
|
30
|
-
VanLoading: typeof import('vant/es')['Loading']
|
|
31
|
-
VanNavBar: typeof import('vant/es')['NavBar']
|
|
32
|
-
VanPicker: typeof import('vant/es')['Picker']
|
|
33
|
-
VanPopup: typeof import('vant/es')['Popup']
|
|
34
|
-
VanRadio: typeof import('vant/es')['Radio']
|
|
35
|
-
VanRadioGroup: typeof import('vant/es')['RadioGroup']
|
|
36
|
-
VanRate: typeof import('vant/es')['Rate']
|
|
37
|
-
VanRow: typeof import('vant/es')['Row']
|
|
38
|
-
VanSlider: typeof import('vant/es')['Slider']
|
|
39
|
-
VanSpace: typeof import('vant/es')['Space']
|
|
40
|
-
VanStepper: typeof import('vant/es')['Stepper']
|
|
41
|
-
VanSwitch: typeof import('vant/es')['Switch']
|
|
42
|
-
VanTimePicker: typeof import('vant/es')['TimePicker']
|
|
43
|
-
XBadge: typeof import('./components/data/XBadge/index.vue')['default']
|
|
44
|
-
XCellDetail: typeof import('./components/data/XCellDetail/index.vue')['default']
|
|
45
|
-
XCellList: typeof import('./components/data/XCellList/index.vue')['default']
|
|
46
|
-
XForm: typeof import('./components/data/XForm/index.vue')['default']
|
|
47
|
-
XFormItem: typeof import('./components/data/XFormItem/index.vue')['default']
|
|
48
|
-
XMultiSelect: typeof import('./components/core/XMultiSelect/index.vue')['default']
|
|
49
|
-
XReportForm: typeof import('./components/data/XReportForm/index.vue')['default']
|
|
50
|
-
XReportFormJsonRender: typeof import('./components/data/XReportForm/XReportFormJsonRender.vue')['default']
|
|
51
|
-
XSelect: typeof import('./components/core/XSelect/index.vue')['default']
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// Generated by unplugin-vue-components
|
|
5
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
|
6
|
+
export {}
|
|
7
|
+
|
|
8
|
+
declare module 'vue' {
|
|
9
|
+
export interface GlobalComponents {
|
|
10
|
+
BeautifulLoading: typeof import('./components/core/BeautifulLoading/index.vue')['default']
|
|
11
|
+
MicroAppView: typeof import('./components/core/App/MicroAppView.vue')['default']
|
|
12
|
+
NavBar: typeof import('./components/core/NavBar/index.vue')['default']
|
|
13
|
+
NormalDataLayout: typeof import('./components/layout/NormalDataLayout/index.vue')['default']
|
|
14
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
|
15
|
+
RouterView: typeof import('vue-router')['RouterView']
|
|
16
|
+
SvgIcon: typeof import('./components/core/SvgIcon/index.vue')['default']
|
|
17
|
+
Tabbar: typeof import('./components/core/Tabbar/index.vue')['default']
|
|
18
|
+
TabBarLayout: typeof import('./components/layout/TabBarLayout/index.vue')['default']
|
|
19
|
+
Uploader: typeof import('./components/core/Uploader/index.vue')['default']
|
|
20
|
+
VanArea: typeof import('vant/es')['Area']
|
|
21
|
+
VanButton: typeof import('vant/es')['Button']
|
|
22
|
+
VanCalendar: typeof import('vant/es')['Calendar']
|
|
23
|
+
VanCell: typeof import('vant/es')['Cell']
|
|
24
|
+
VanCellGroup: typeof import('vant/es')['CellGroup']
|
|
25
|
+
VanCheckbox: typeof import('vant/es')['Checkbox']
|
|
26
|
+
VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
|
|
27
|
+
VanDatePicker: typeof import('vant/es')['DatePicker']
|
|
28
|
+
VanField: typeof import('vant/es')['Field']
|
|
29
|
+
VanForm: typeof import('vant/es')['Form']
|
|
30
|
+
VanLoading: typeof import('vant/es')['Loading']
|
|
31
|
+
VanNavBar: typeof import('vant/es')['NavBar']
|
|
32
|
+
VanPicker: typeof import('vant/es')['Picker']
|
|
33
|
+
VanPopup: typeof import('vant/es')['Popup']
|
|
34
|
+
VanRadio: typeof import('vant/es')['Radio']
|
|
35
|
+
VanRadioGroup: typeof import('vant/es')['RadioGroup']
|
|
36
|
+
VanRate: typeof import('vant/es')['Rate']
|
|
37
|
+
VanRow: typeof import('vant/es')['Row']
|
|
38
|
+
VanSlider: typeof import('vant/es')['Slider']
|
|
39
|
+
VanSpace: typeof import('vant/es')['Space']
|
|
40
|
+
VanStepper: typeof import('vant/es')['Stepper']
|
|
41
|
+
VanSwitch: typeof import('vant/es')['Switch']
|
|
42
|
+
VanTimePicker: typeof import('vant/es')['TimePicker']
|
|
43
|
+
XBadge: typeof import('./components/data/XBadge/index.vue')['default']
|
|
44
|
+
XCellDetail: typeof import('./components/data/XCellDetail/index.vue')['default']
|
|
45
|
+
XCellList: typeof import('./components/data/XCellList/index.vue')['default']
|
|
46
|
+
XForm: typeof import('./components/data/XForm/index.vue')['default']
|
|
47
|
+
XFormItem: typeof import('./components/data/XFormItem/index.vue')['default']
|
|
48
|
+
XMultiSelect: typeof import('./components/core/XMultiSelect/index.vue')['default']
|
|
49
|
+
XReportForm: typeof import('./components/data/XReportForm/index.vue')['default']
|
|
50
|
+
XReportFormJsonRender: typeof import('./components/data/XReportForm/XReportFormJsonRender.vue')['default']
|
|
51
|
+
XSelect: typeof import('./components/core/XSelect/index.vue')['default']
|
|
52
|
+
}
|
|
53
|
+
}
|
package/src/env.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
declare module '*.vue' {
|
|
4
|
-
import type { DefineComponent } from 'vue'
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line ts/no-empty-object-type
|
|
7
|
-
const component: DefineComponent<{}, {}, any>
|
|
8
|
-
export default component
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface Window {
|
|
12
|
-
mount: any
|
|
13
|
-
remount: any
|
|
14
|
-
unmount: any
|
|
15
|
-
readonly __MICRO_APP_ENVIRONMENT__: any
|
|
16
|
-
}
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import type { DefineComponent } from 'vue'
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line ts/no-empty-object-type
|
|
7
|
+
const component: DefineComponent<{}, {}, any>
|
|
8
|
+
export default component
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Window {
|
|
12
|
+
mount: any
|
|
13
|
+
remount: any
|
|
14
|
+
unmount: any
|
|
15
|
+
readonly __MICRO_APP_ENVIRONMENT__: any
|
|
16
|
+
}
|
package/src/font-style/font.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: 'PingFangSC-Regular-woff2';
|
|
3
|
-
src: url('./PingFangSC-Regular.woff2') format('woff2');
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'PingFangSC-Regular-woff2';
|
|
3
|
+
src: url('./PingFangSC-Regular.woff2') format('woff2');
|
|
4
4
|
}
|
package/src/hooks/useCommon.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export function formatDate(date) {
|
|
2
|
-
const year = date.getFullYear()
|
|
3
|
-
const month = (date.getMonth() + 1).toString().padStart(2, '0') // ๆไปฝๅ 1๏ผๅนถ่กฅ้ถ
|
|
4
|
-
const day = date.getDate().toString().padStart(2, '0') // ๆฅๆ่กฅ้ถ
|
|
5
|
-
const hours = date.getHours().toString().padStart(2, '0') // ๅฐๆถ่กฅ้ถ
|
|
6
|
-
const minutes = date.getMinutes().toString().padStart(2, '0') // ๅ้่กฅ้ถ
|
|
7
|
-
const seconds = date.getSeconds().toString().padStart(2, '0') // ็งๆฐ่กฅ้ถ
|
|
8
|
-
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
9
|
-
}
|
|
1
|
+
export function formatDate(date) {
|
|
2
|
+
const year = date.getFullYear()
|
|
3
|
+
const month = (date.getMonth() + 1).toString().padStart(2, '0') // ๆไปฝๅ 1๏ผๅนถ่กฅ้ถ
|
|
4
|
+
const day = date.getDate().toString().padStart(2, '0') // ๆฅๆ่กฅ้ถ
|
|
5
|
+
const hours = date.getHours().toString().padStart(2, '0') // ๅฐๆถ่กฅ้ถ
|
|
6
|
+
const minutes = date.getMinutes().toString().padStart(2, '0') // ๅ้่กฅ้ถ
|
|
7
|
+
const seconds = date.getSeconds().toString().padStart(2, '0') // ็งๆฐ่กฅ้ถ
|
|
8
|
+
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
|
|
9
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import Tabbar from '@af-mobile-client-vue3/components/core/Tabbar/index.vue'
|
|
3
|
-
import
|
|
3
|
+
import useRouteCache from '@af-mobile-client-vue3/stores/modules/routeCache'
|
|
4
4
|
import useRouteTransitionNameStore from '@af-mobile-client-vue3/stores/modules/routeTransitionName'
|
|
5
5
|
import { getFunction } from '@af-mobile-client-vue3/utils/common'
|
|
6
6
|
import { storeToRefs } from 'pinia'
|
|
7
7
|
import { computed } from 'vue'
|
|
8
8
|
import { useRoute } from 'vue-router'
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const keepAliveRouteNames = computed(() => {
|
|
11
|
+
return useRouteCache().routeCaches as string[]
|
|
12
12
|
})
|
|
13
|
-
|
|
14
13
|
const routeTransitionNameStore = useRouteTransitionNameStore()
|
|
15
14
|
const { routeTransitionName } = storeToRefs(routeTransitionNameStore)
|
|
16
15
|
|
|
@@ -32,7 +31,7 @@ const routeState = useRoute()
|
|
|
32
31
|
<!-- transition ๅ
่ฃน router-view ๆงๅถๅฐไผๆ่ญฆๅ๏ผrouter-viewๅจๅคๅฑไผๅฏผ่ดๅจ็ปๅผๅงๆถไผ้ช่ฟไธๅธงไธไธ็บง้กต้ขใๅ
ๅฟฝ็ฅ่ญฆๅ่ฟๆ ทๅ -->
|
|
33
32
|
<transition :name="routeTransitionName">
|
|
34
33
|
<router-view v-slot="{ Component, route }">
|
|
35
|
-
<keep-alive :include="
|
|
34
|
+
<keep-alive :include="keepAliveRouteNames">
|
|
36
35
|
<div :key="route.name" class="app-wrapper">
|
|
37
36
|
<component :is="Component" />
|
|
38
37
|
</div>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import useRouteCache from '@af-mobile-client-vue3/stores/modules/routeCache'
|
|
3
3
|
import useRouteTransitionNameStore from '@af-mobile-client-vue3/stores/modules/routeTransitionName'
|
|
4
4
|
import { storeToRefs } from 'pinia'
|
|
5
5
|
import { computed } from 'vue'
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
return
|
|
7
|
+
const keepAliveRouteNames = computed(() => {
|
|
8
|
+
return useRouteCache().routeCaches as string[]
|
|
9
9
|
})
|
|
10
|
-
|
|
11
10
|
const routeTransitionNameStore = useRouteTransitionNameStore()
|
|
12
11
|
const { routeTransitionName } = storeToRefs(routeTransitionNameStore)
|
|
13
12
|
</script>
|
|
@@ -16,7 +15,7 @@ const { routeTransitionName } = storeToRefs(routeTransitionNameStore)
|
|
|
16
15
|
<div class="pageLayout">
|
|
17
16
|
<router-view v-slot="{ Component, route }">
|
|
18
17
|
<transition :name="routeTransitionName">
|
|
19
|
-
<keep-alive :include="
|
|
18
|
+
<keep-alive :include="keepAliveRouteNames">
|
|
20
19
|
<div :key="route.name" class="app-wrapper">
|
|
21
20
|
<component :is="Component" />
|
|
22
21
|
</div>
|
package/src/locales/en-US.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"home": {
|
|
3
|
-
"darkMode": "๐ Dark Mode",
|
|
4
|
-
"mockGuide": "๐ฟ Mock Guide",
|
|
5
|
-
"language": "๐ Language",
|
|
6
|
-
"404Demo": "๐
Page 404 Demo",
|
|
7
|
-
"echartsDemo": "๐ Echarts Demo",
|
|
8
|
-
"persistPiniaState": "๐ Persistent Pinia state",
|
|
9
|
-
"unocssExample": "๐จ Unocss example"
|
|
10
|
-
},
|
|
11
|
-
"mock": {
|
|
12
|
-
"fromAsyncData": "Data from asynchronous requests",
|
|
13
|
-
"noData": "No data",
|
|
14
|
-
"pull": "Pull",
|
|
15
|
-
"reset": "Reset"
|
|
16
|
-
},
|
|
17
|
-
"charts": {
|
|
18
|
-
"January": "Jan",
|
|
19
|
-
"February": "Feb",
|
|
20
|
-
"March": "Mar",
|
|
21
|
-
"April": "Apr",
|
|
22
|
-
"May": "May",
|
|
23
|
-
"June": "Jun"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"home": {
|
|
3
|
+
"darkMode": "๐ Dark Mode",
|
|
4
|
+
"mockGuide": "๐ฟ Mock Guide",
|
|
5
|
+
"language": "๐ Language",
|
|
6
|
+
"404Demo": "๐
Page 404 Demo",
|
|
7
|
+
"echartsDemo": "๐ Echarts Demo",
|
|
8
|
+
"persistPiniaState": "๐ Persistent Pinia state",
|
|
9
|
+
"unocssExample": "๐จ Unocss example"
|
|
10
|
+
},
|
|
11
|
+
"mock": {
|
|
12
|
+
"fromAsyncData": "Data from asynchronous requests",
|
|
13
|
+
"noData": "No data",
|
|
14
|
+
"pull": "Pull",
|
|
15
|
+
"reset": "Reset"
|
|
16
|
+
},
|
|
17
|
+
"charts": {
|
|
18
|
+
"January": "Jan",
|
|
19
|
+
"February": "Feb",
|
|
20
|
+
"March": "Mar",
|
|
21
|
+
"April": "Apr",
|
|
22
|
+
"May": "May",
|
|
23
|
+
"June": "Jun"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/locales/zh-CN.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"home": {
|
|
3
|
-
"darkMode": "๐ ๆ้ปๆจกๅผ",
|
|
4
|
-
"mockGuide": "๐ฟ Mock ๆๅ",
|
|
5
|
-
"language": "๐ ่ฏญ่จ",
|
|
6
|
-
"echartsDemo": "๐ Echarts ๆผ็คบ",
|
|
7
|
-
"persistPiniaState": "๐ ๆไน
ๅ Pinia ็ถๆ",
|
|
8
|
-
"404Demo": "๐
404้กต ๆผ็คบ",
|
|
9
|
-
"unocssExample": "๐จ Unocss ็คบไพ"
|
|
10
|
-
},
|
|
11
|
-
"mock": {
|
|
12
|
-
"fromAsyncData": "ๆฅ่ชๅผๆญฅ่ฏทๆฑ็ๆฐๆฎ",
|
|
13
|
-
"pull": "่ฏทๆฑ",
|
|
14
|
-
"reset": "ๆธ
็ฉบ",
|
|
15
|
-
"noData": "ๆๆ ๆฐๆฎ"
|
|
16
|
-
},
|
|
17
|
-
"charts": {
|
|
18
|
-
"January": "1ๆ",
|
|
19
|
-
"February": "2ๆ",
|
|
20
|
-
"March": "3ๆ",
|
|
21
|
-
"April": "4ๆ",
|
|
22
|
-
"May": "5ๆ",
|
|
23
|
-
"June": "6ๆ"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"home": {
|
|
3
|
+
"darkMode": "๐ ๆ้ปๆจกๅผ",
|
|
4
|
+
"mockGuide": "๐ฟ Mock ๆๅ",
|
|
5
|
+
"language": "๐ ่ฏญ่จ",
|
|
6
|
+
"echartsDemo": "๐ Echarts ๆผ็คบ",
|
|
7
|
+
"persistPiniaState": "๐ ๆไน
ๅ Pinia ็ถๆ",
|
|
8
|
+
"404Demo": "๐
404้กต ๆผ็คบ",
|
|
9
|
+
"unocssExample": "๐จ Unocss ็คบไพ"
|
|
10
|
+
},
|
|
11
|
+
"mock": {
|
|
12
|
+
"fromAsyncData": "ๆฅ่ชๅผๆญฅ่ฏทๆฑ็ๆฐๆฎ",
|
|
13
|
+
"pull": "่ฏทๆฑ",
|
|
14
|
+
"reset": "ๆธ
็ฉบ",
|
|
15
|
+
"noData": "ๆๆ ๆฐๆฎ"
|
|
16
|
+
},
|
|
17
|
+
"charts": {
|
|
18
|
+
"January": "1ๆ",
|
|
19
|
+
"February": "2ๆ",
|
|
20
|
+
"March": "3ๆ",
|
|
21
|
+
"April": "4ๆ",
|
|
22
|
+
"May": "5ๆ",
|
|
23
|
+
"June": "6ๆ"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/plugins/AppData.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import type { App } from 'vue'
|
|
2
|
-
import { manageApi } from '@af-mobile-client-vue3/services/api/manage'
|
|
3
|
-
import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
|
|
4
|
-
import { handleTree } from '@af-mobile-client-vue3/utils/dataUtil'
|
|
5
|
-
import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
|
|
6
|
-
import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
|
|
7
|
-
|
|
8
|
-
const Storage = createStorage({ storage: localStorage })
|
|
9
|
-
|
|
10
|
-
export const GetAppDataService = {
|
|
11
|
-
install(app: App<Element>) {
|
|
12
|
-
app.provide('$appdata', GetAppDataService)
|
|
13
|
-
},
|
|
14
|
-
async load() {
|
|
15
|
-
},
|
|
16
|
-
// ่ฟๅๆ ๅฝข็ๅธๅบ
|
|
17
|
-
async getDivisionsOhChinaForTree() {
|
|
18
|
-
// ่ทๅ็ๅธๅบๆฐๆฎ
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
try {
|
|
21
|
-
indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, (res) => {
|
|
22
|
-
resolve(res)
|
|
23
|
-
}, (processRes) => {
|
|
24
|
-
return handleTree(processRes, 'code', 'parentcode', null)
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
catch (e) {
|
|
28
|
-
reject(e)
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
},
|
|
32
|
-
getWebConfigByKey(key: string) {
|
|
33
|
-
const object = Storage.get(APP_WEB_CONFIG_KEY)
|
|
34
|
-
return object[key]
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default GetAppDataService
|
|
1
|
+
import type { App } from 'vue'
|
|
2
|
+
import { manageApi } from '@af-mobile-client-vue3/services/api/manage'
|
|
3
|
+
import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
|
|
4
|
+
import { handleTree } from '@af-mobile-client-vue3/utils/dataUtil'
|
|
5
|
+
import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
|
|
6
|
+
import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
|
|
7
|
+
|
|
8
|
+
const Storage = createStorage({ storage: localStorage })
|
|
9
|
+
|
|
10
|
+
export const GetAppDataService = {
|
|
11
|
+
install(app: App<Element>) {
|
|
12
|
+
app.provide('$appdata', GetAppDataService)
|
|
13
|
+
},
|
|
14
|
+
async load() {
|
|
15
|
+
},
|
|
16
|
+
// ่ฟๅๆ ๅฝข็ๅธๅบ
|
|
17
|
+
async getDivisionsOhChinaForTree() {
|
|
18
|
+
// ่ทๅ็ๅธๅบๆฐๆฎ
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
try {
|
|
21
|
+
indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, (res) => {
|
|
22
|
+
resolve(res)
|
|
23
|
+
}, (processRes) => {
|
|
24
|
+
return handleTree(processRes, 'code', 'parentcode', null)
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
reject(e)
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
},
|
|
32
|
+
getWebConfigByKey(key: string) {
|
|
33
|
+
const object = Storage.get(APP_WEB_CONFIG_KEY)
|
|
34
|
+
return object[key]
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default GetAppDataService
|