af-mobile-client-vue3 1.0.95 → 1.0.97
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/build/vite/index.ts +91 -91
- package/eslint.config.js +9 -1
- package/mock/modules/user.mock.ts +152 -152
- package/package.json +2 -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/App/MicroAppView.vue +3 -3
- package/src/components/core/NavBar/index.vue +12 -12
- package/src/components/core/SvgIcon/index.vue +1 -1
- package/src/components/core/Tabbar/index.vue +38 -38
- package/src/components/core/Uploader/index.vue +1 -1
- 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/XCellList/XCellList.md +28 -28
- package/src/components/data/XCellList/index.vue +50 -11
- package/src/components/data/XCellListFilter/QrScanner/index.vue +1 -1
- package/src/components/data/XCellListFilter/VpnRecognition/index.vue +3 -3
- package/src/components/data/XCellListFilter/index.vue +160 -62
- package/src/components/data/XForm/index.vue +2 -2
- package/src/components/data/XFormGroup/index.vue +3 -3
- package/src/components/data/XFormItem/index.vue +25 -26
- package/src/components/data/XOlMap/demo.vue +209 -0
- package/src/components/data/XOlMap/index.vue +644 -0
- package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
- package/src/components/data/XReportForm/index.vue +1079 -1079
- package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +4 -7
- package/src/components/data/XReportGrid/XAddReport/index.md +3 -7
- package/src/components/data/XReportGrid/XAddReport/index.ts +2 -2
- package/src/components/data/XReportGrid/XReport.vue +25 -38
- package/src/components/data/XReportGrid/XReportDesign.vue +46 -46
- package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +3 -3
- package/src/components/data/XReportGrid/XReportDrawer/index.ts +2 -2
- package/src/components/data/XReportGrid/XReportJsonRender.vue +20 -7
- package/src/components/data/XReportGrid/XReportTrGroup.vue +4 -4
- package/src/components/data/XReportGrid/index.md +4 -6
- 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/GridView/index.vue +1 -1
- package/src/layout/PageLayout.vue +4 -4
- package/src/layout/SingleLayout.vue +2 -2
- 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/plugins/index.ts +1 -1
- package/src/router/guards.ts +59 -59
- package/src/router/index.ts +61 -60
- package/src/router/invoiceRoutes.ts +33 -33
- package/src/router/routes.ts +20 -14
- package/src/services/api/common.ts +109 -109
- package/src/services/api/manage.ts +8 -8
- package/src/services/restTools.ts +52 -52
- package/src/services/v3Api.ts +46 -35
- package/src/stores/modules/cachedView.ts +1 -1
- package/src/stores/modules/setting.ts +52 -52
- package/src/stores/modules/user.ts +5 -5
- package/src/stores/mutation-type.ts +7 -7
- package/src/styles/app.less +6 -1
- package/src/utils/Storage.ts +1 -1
- package/src/utils/authority-utils.ts +84 -84
- package/src/utils/crypto.ts +39 -39
- package/src/utils/http/index.ts +6 -6
- 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/validate.ts +1 -1
- package/src/utils/wechatUtil.ts +9 -9
- package/src/views/chat/index.vue +1 -1
- 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 -216
- package/src/views/component/XCellListView/index.vue +1 -1
- package/src/views/component/XFormAppraiseView/index.vue +4 -4
- package/src/views/component/XFormGroupView/index.vue +1 -1
- package/src/views/component/XFormView/index.vue +6 -7
- package/src/views/component/XReportFormIframeView/index.vue +47 -47
- package/src/views/component/XReportFormView/index.vue +13 -13
- package/src/views/component/XReportGridView/index.vue +2 -3
- package/src/views/component/XSignatureView/index.vue +50 -50
- package/src/views/component/index.vue +4 -4
- 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 -62
- package/src/views/user/login/ForgetPasswordForm.vue +94 -93
- package/src/views/user/login/LoginForm.vue +8 -7
- 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/uno.config.ts +1 -1
- package/vite.config.ts +123 -123
|
@@ -1,93 +1,94 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
label="
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
</
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { FormInstance } from 'vant'
|
|
3
|
+
import { LoginStateEnum, useFormRules, useLoginState } from '@af-mobile-client-vue3/hooks/useLogin'
|
|
4
|
+
import {
|
|
5
|
+
|
|
6
|
+
showFailToast,
|
|
7
|
+
Button as VanButton,
|
|
8
|
+
Field as VanField,
|
|
9
|
+
Form as VanForm,
|
|
10
|
+
} from 'vant'
|
|
11
|
+
import { computed, reactive, ref, unref } from 'vue'
|
|
12
|
+
|
|
13
|
+
const { handleBackLogin, getLoginState } = useLoginState()
|
|
14
|
+
const { getFormRules } = useFormRules()
|
|
15
|
+
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.RESET_PASSWORD)
|
|
16
|
+
|
|
17
|
+
const loading = ref(false)
|
|
18
|
+
const formRef = ref<FormInstance>()
|
|
19
|
+
const formData = reactive({
|
|
20
|
+
username: '',
|
|
21
|
+
mobile: '',
|
|
22
|
+
sms: '',
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
function handleReset() {
|
|
26
|
+
formRef.value
|
|
27
|
+
?.validate()
|
|
28
|
+
.then(async () => {
|
|
29
|
+
try {
|
|
30
|
+
loading.value = true
|
|
31
|
+
// do something
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
loading.value = false
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
.catch((e) => {
|
|
38
|
+
showFailToast('验证失败')
|
|
39
|
+
console.error(e)
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<div v-if="getShow" class="form forget_password_form">
|
|
46
|
+
<VanForm ref="formRef" @submit="handleReset">
|
|
47
|
+
<VanField
|
|
48
|
+
v-model="formData.username"
|
|
49
|
+
class="form_field"
|
|
50
|
+
name="username"
|
|
51
|
+
label="账号"
|
|
52
|
+
placeholder="请输入账号"
|
|
53
|
+
label-align="top"
|
|
54
|
+
:rules="getFormRules.username"
|
|
55
|
+
/>
|
|
56
|
+
<VanField
|
|
57
|
+
v-model="formData.mobile"
|
|
58
|
+
class="form_field"
|
|
59
|
+
name="password"
|
|
60
|
+
label="手机号码"
|
|
61
|
+
placeholder="请输入手机号码"
|
|
62
|
+
label-align="top"
|
|
63
|
+
:rules="getFormRules.mobile"
|
|
64
|
+
/>
|
|
65
|
+
|
|
66
|
+
<VanField
|
|
67
|
+
v-model="formData.sms"
|
|
68
|
+
class="form_field"
|
|
69
|
+
center
|
|
70
|
+
clearable
|
|
71
|
+
label-align="top"
|
|
72
|
+
label="短信验证码"
|
|
73
|
+
placeholder="请输入短信验证码"
|
|
74
|
+
:rules="getFormRules.sms"
|
|
75
|
+
>
|
|
76
|
+
<template #button>
|
|
77
|
+
<VanButton size="small" type="primary">
|
|
78
|
+
发送验证码
|
|
79
|
+
</VanButton>
|
|
80
|
+
</template>
|
|
81
|
+
</VanField>
|
|
82
|
+
<VanButton class="reset_btn btn" type="primary" block native-type="submit" :loading="loading">
|
|
83
|
+
重 置
|
|
84
|
+
</VanButton>
|
|
85
|
+
<VanButton class="back_btn btn" plain type="primary" block @click="handleBackLogin">
|
|
86
|
+
返 回
|
|
87
|
+
</VanButton>
|
|
88
|
+
</VanForm>
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<style scoped lang="less">
|
|
93
|
+
@import "@af-mobile-client-vue3/styles/login.less";
|
|
94
|
+
</style>
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import { Switch, Button as VanButton, Col as VanCol, Field as VanField, Form as VanForm, Icon as VanIcon, Loading as VanLoading, Row as VanRow, closeToast, showDialog, showFailToast } from 'vant'
|
|
2
|
+
import type { UserInfo } from '@af-mobile-client-vue3/stores/modules/user'
|
|
4
3
|
import type { FormInstance } from 'vant'
|
|
5
|
-
import 'vant/lib/switch/index.css'
|
|
6
|
-
import { useRoute, useRouter } from 'vue-router'
|
|
7
4
|
import { LoginStateEnum, useFormRules, useLoginState } from '@af-mobile-client-vue3/hooks/useLogin'
|
|
8
|
-
import { useSettingStore } from '@af-mobile-client-vue3/stores/modules/setting'
|
|
9
|
-
import { type UserInfo, useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
10
5
|
import GetAppDataService from '@af-mobile-client-vue3/plugins/AppData'
|
|
6
|
+
import { useSettingStore } from '@af-mobile-client-vue3/stores/modules/setting'
|
|
7
|
+
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
11
8
|
import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
|
|
12
9
|
import { funcToRouter, loadRoutes } from '@af-mobile-client-vue3/utils/routerUtil'
|
|
13
10
|
import { isWechat } from '@af-mobile-client-vue3/utils/wechatUtil'
|
|
11
|
+
import { closeToast, showDialog, showFailToast, Switch, Button as VanButton, Col as VanCol, Field as VanField, Form as VanForm, Icon as VanIcon, Loading as VanLoading, Row as VanRow } from 'vant'
|
|
12
|
+
import { computed, inject, onBeforeMount, onMounted, reactive, ref, unref } from 'vue'
|
|
13
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
14
|
+
import 'vant/lib/switch/index.css'
|
|
14
15
|
|
|
15
16
|
declare let WeixinJSBridge: any
|
|
16
17
|
const { setLoginState, getLoginState } = useLoginState()
|
|
@@ -74,7 +75,7 @@ onBeforeMount(async () => {
|
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
catch
|
|
78
|
+
catch {
|
|
78
79
|
await showDialog({ message: '当前用户无登录权限' })
|
|
79
80
|
closeWindows()
|
|
80
81
|
}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const Storage = createStorage({ storage: localStorage })
|
|
6
|
-
const webConfig = Storage.get(APP_WEB_CONFIG_KEY)
|
|
7
|
-
|
|
8
|
-
// 动态获取图片
|
|
9
|
-
function getAssetsImages(logo) {
|
|
10
|
-
return new URL(`/src/assets/img/user/login/${logo}`, import.meta.url).href
|
|
11
|
-
}
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<div class="login_title">
|
|
16
|
-
<div class="login_logo">
|
|
17
|
-
<img :src="getAssetsImages(webConfig?.setting?.systemLogo ?? 'logo.png')" alt="logo">
|
|
18
|
-
</div>
|
|
19
|
-
<div class="title_content">
|
|
20
|
-
<div class="login_title_value">
|
|
21
|
-
{{ webConfig?.setting?.systemName ?? '智慧燃气' }}
|
|
22
|
-
</div>
|
|
23
|
-
<div class="login_description">
|
|
24
|
-
欢迎使用
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<style scoped lang="less">
|
|
31
|
-
.login_title {
|
|
32
|
-
width: 100%;
|
|
33
|
-
background-image: url('@af-mobile-client-vue3/assets/img/user/login/background-shadow-1.svg');
|
|
34
|
-
background-repeat: no-repeat;
|
|
35
|
-
background-size: cover;
|
|
36
|
-
background-position: center center;
|
|
37
|
-
text-align: center;
|
|
38
|
-
.login_logo {
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
width: 100px;
|
|
43
|
-
height: 100px;
|
|
44
|
-
margin: 0 auto 62px auto;
|
|
45
|
-
border-radius: 23.04px;
|
|
46
|
-
box-shadow: 0 16px 32px 0 rgba(0, 0, 0, 0.09);
|
|
47
|
-
background: var(--van-background-2);
|
|
48
|
-
text-align: center;
|
|
49
|
-
img {
|
|
50
|
-
width: 82px;
|
|
51
|
-
height: 82px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
.title_content {
|
|
55
|
-
color: rgb(83, 88, 110);
|
|
56
|
-
font-size: 26px;
|
|
57
|
-
font-weight: 600;
|
|
58
|
-
line-height: 26px;
|
|
59
|
-
.login_description {
|
|
60
|
-
margin-top: 13px;
|
|
61
|
-
color: var(--van-text-color-3);
|
|
62
|
-
font-size: 16px;
|
|
63
|
-
font-weight: 400;
|
|
64
|
-
line-height: 16px;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
|
|
3
|
+
import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
|
|
4
|
+
|
|
5
|
+
const Storage = createStorage({ storage: localStorage })
|
|
6
|
+
const webConfig = Storage.get(APP_WEB_CONFIG_KEY)
|
|
7
|
+
|
|
8
|
+
// 动态获取图片
|
|
9
|
+
function getAssetsImages(logo) {
|
|
10
|
+
return new URL(`/src/assets/img/user/login/${logo}`, import.meta.url).href
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="login_title">
|
|
16
|
+
<div class="login_logo">
|
|
17
|
+
<img :src="getAssetsImages(webConfig?.setting?.systemLogo ?? 'logo.png')" alt="logo">
|
|
18
|
+
</div>
|
|
19
|
+
<div class="title_content">
|
|
20
|
+
<div class="login_title_value">
|
|
21
|
+
{{ webConfig?.setting?.systemName ?? '智慧燃气' }}
|
|
22
|
+
</div>
|
|
23
|
+
<div class="login_description">
|
|
24
|
+
欢迎使用
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style scoped lang="less">
|
|
31
|
+
.login_title {
|
|
32
|
+
width: 100%;
|
|
33
|
+
background-image: url('@af-mobile-client-vue3/assets/img/user/login/background-shadow-1.svg');
|
|
34
|
+
background-repeat: no-repeat;
|
|
35
|
+
background-size: cover;
|
|
36
|
+
background-position: center center;
|
|
37
|
+
text-align: center;
|
|
38
|
+
.login_logo {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
width: 100px;
|
|
43
|
+
height: 100px;
|
|
44
|
+
margin: 0 auto 62px auto;
|
|
45
|
+
border-radius: 23.04px;
|
|
46
|
+
box-shadow: 0 16px 32px 0 rgba(0, 0, 0, 0.09);
|
|
47
|
+
background: var(--van-background-2);
|
|
48
|
+
text-align: center;
|
|
49
|
+
img {
|
|
50
|
+
width: 82px;
|
|
51
|
+
height: 82px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
.title_content {
|
|
55
|
+
color: rgb(83, 88, 110);
|
|
56
|
+
font-size: 26px;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
line-height: 26px;
|
|
59
|
+
.login_description {
|
|
60
|
+
margin-top: 13px;
|
|
61
|
+
color: var(--van-text-color-3);
|
|
62
|
+
font-size: 16px;
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
line-height: 16px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import LoginForm from './LoginForm.vue'
|
|
4
|
-
import
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<div class="login_container">
|
|
9
|
-
<LoginTitle />
|
|
10
|
-
<LoginForm />
|
|
11
|
-
<ForgetPasswordForm />
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style scoped lang="less">
|
|
16
|
-
.login_container {
|
|
17
|
-
height: 100vh;
|
|
18
|
-
padding-top: 10px;
|
|
19
|
-
background: var(--van-background-2);
|
|
20
|
-
position: relative;
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ForgetPasswordForm from './ForgetPasswordForm.vue'
|
|
3
|
+
import LoginForm from './LoginForm.vue'
|
|
4
|
+
import LoginTitle from './LoginTitle.vue'
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="login_container">
|
|
9
|
+
<LoginTitle />
|
|
10
|
+
<LoginForm />
|
|
11
|
+
<ForgetPasswordForm />
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style scoped lang="less">
|
|
16
|
+
.login_container {
|
|
17
|
+
height: 100vh;
|
|
18
|
+
padding-top: 10px;
|
|
19
|
+
background: var(--van-background-2);
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
22
|
+
</style>
|