af-mobile-client-vue3 1.0.94 → 1.0.96

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.
Files changed (113) hide show
  1. package/.env +6 -6
  2. package/.env.development +4 -4
  3. package/.env.envoiceShow +6 -6
  4. package/.env.production +6 -6
  5. package/.husky/commit-msg +1 -1
  6. package/.husky/pre-commit +1 -1
  7. package/.vscode/settings.json +61 -61
  8. package/build/vite/index.ts +91 -91
  9. package/eslint.config.js +9 -1
  10. package/mock/modules/user.mock.ts +152 -152
  11. package/package.json +1 -1
  12. package/public/favicon.svg +4 -4
  13. package/public/safari-pinned-tab.svg +32 -32
  14. package/scripts/verifyCommit.js +19 -19
  15. package/src/App.vue +43 -43
  16. package/src/api/user/index.ts +40 -40
  17. package/src/bootstrap.ts +18 -18
  18. package/src/components/core/App/MicroAppView.vue +3 -3
  19. package/src/components/core/NavBar/index.vue +12 -12
  20. package/src/components/core/SvgIcon/index.vue +1 -1
  21. package/src/components/core/Tabbar/index.vue +38 -38
  22. package/src/components/core/Uploader/index.vue +1 -1
  23. package/src/components/core/XGridDropOption/index.vue +151 -151
  24. package/src/components/core/XMultiSelect/index.vue +183 -183
  25. package/src/components/data/XCellDetail/index.vue +106 -106
  26. package/src/components/data/XCellList/XCellList.md +28 -28
  27. package/src/components/data/XCellList/index.vue +50 -11
  28. package/src/components/data/XCellListFilter/QrScanner/index.vue +1 -1
  29. package/src/components/data/XCellListFilter/VpnRecognition/index.vue +3 -3
  30. package/src/components/data/XCellListFilter/index.vue +160 -62
  31. package/src/components/data/XForm/index.vue +2 -2
  32. package/src/components/data/XFormGroup/index.vue +3 -3
  33. package/src/components/data/XFormItem/index.vue +25 -26
  34. package/src/components/data/XOlMap/demo.vue +209 -0
  35. package/src/components/data/XOlMap/index.vue +644 -0
  36. package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -220
  37. package/src/components/data/XReportForm/index.vue +1079 -1079
  38. package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +4 -7
  39. package/src/components/data/XReportGrid/XAddReport/index.md +3 -7
  40. package/src/components/data/XReportGrid/XAddReport/index.ts +2 -2
  41. package/src/components/data/XReportGrid/XReport.vue +25 -38
  42. package/src/components/data/XReportGrid/XReportDesign.vue +46 -46
  43. package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +3 -3
  44. package/src/components/data/XReportGrid/XReportDrawer/index.ts +2 -2
  45. package/src/components/data/XReportGrid/XReportJsonRender.vue +20 -7
  46. package/src/components/data/XReportGrid/XReportTrGroup.vue +4 -4
  47. package/src/components/data/XReportGrid/index.md +4 -6
  48. package/src/components/data/XSignature/index.vue +285 -285
  49. package/src/components/data/XTag/index.vue +10 -10
  50. package/src/components/layout/NormalDataLayout/index.vue +70 -70
  51. package/src/components/layout/TabBarLayout/index.vue +40 -40
  52. package/src/components.d.ts +53 -53
  53. package/src/env.d.ts +16 -16
  54. package/src/font-style/font.css +3 -3
  55. package/src/hooks/useCommon.ts +9 -9
  56. package/src/layout/GridView/index.vue +1 -1
  57. package/src/layout/PageLayout.vue +5 -5
  58. package/src/layout/SingleLayout.vue +3 -3
  59. package/src/locales/en-US.json +25 -25
  60. package/src/locales/zh-CN.json +25 -25
  61. package/src/plugins/AppData.ts +38 -38
  62. package/src/plugins/index.ts +1 -1
  63. package/src/router/guards.ts +59 -59
  64. package/src/router/index.ts +61 -60
  65. package/src/router/invoiceRoutes.ts +33 -33
  66. package/src/router/routes.ts +20 -14
  67. package/src/services/api/common.ts +109 -109
  68. package/src/services/api/manage.ts +8 -8
  69. package/src/services/restTools.ts +52 -52
  70. package/src/services/v3Api.ts +46 -35
  71. package/src/stores/modules/cachedView.ts +1 -1
  72. package/src/stores/modules/setting.ts +52 -52
  73. package/src/stores/modules/user.ts +5 -5
  74. package/src/stores/mutation-type.ts +7 -7
  75. package/src/styles/app.less +6 -1
  76. package/src/utils/Storage.ts +1 -1
  77. package/src/utils/authority-utils.ts +84 -84
  78. package/src/utils/crypto.ts +39 -39
  79. package/src/utils/http/index.ts +6 -6
  80. package/src/utils/i18n.ts +41 -41
  81. package/src/utils/indexedDB.ts +180 -180
  82. package/src/utils/mobileUtil.ts +26 -26
  83. package/src/utils/routerUtil.ts +271 -271
  84. package/src/utils/runEvalFunction.ts +13 -13
  85. package/src/utils/validate.ts +1 -1
  86. package/src/utils/wechatUtil.ts +9 -9
  87. package/src/views/chat/index.vue +1 -1
  88. package/src/views/common/LoadError.vue +64 -64
  89. package/src/views/common/NotFound.vue +68 -68
  90. package/src/views/component/EvaluateRecordView/index.vue +40 -40
  91. package/src/views/component/XCellDetailView/index.vue +217 -216
  92. package/src/views/component/XCellListView/index.vue +1 -1
  93. package/src/views/component/XFormAppraiseView/index.vue +4 -4
  94. package/src/views/component/XFormGroupView/index.vue +1 -1
  95. package/src/views/component/XFormView/index.vue +6 -7
  96. package/src/views/component/XReportFormIframeView/index.vue +47 -47
  97. package/src/views/component/XReportFormView/index.vue +13 -13
  98. package/src/views/component/XReportGridView/index.vue +2 -3
  99. package/src/views/component/XSignatureView/index.vue +50 -50
  100. package/src/views/component/index.vue +4 -4
  101. package/src/views/component/menu.vue +117 -117
  102. package/src/views/component/notice.vue +46 -46
  103. package/src/views/component/topNav.vue +36 -36
  104. package/src/views/invoiceShow/index.vue +61 -62
  105. package/src/views/user/login/ForgetPasswordForm.vue +94 -93
  106. package/src/views/user/login/LoginForm.vue +8 -7
  107. package/src/views/user/login/LoginTitle.vue +68 -68
  108. package/src/views/user/login/index.vue +22 -22
  109. package/src/views/user/my/index.vue +230 -230
  110. package/src/vue-router.d.ts +9 -9
  111. package/tsconfig.json +43 -43
  112. package/uno.config.ts +1 -1
  113. package/vite.config.ts +123 -123
@@ -1,50 +1,50 @@
1
- <script setup lang="ts">
2
- import { ref } from 'vue'
3
- import { Image as VanImage, showToast } from 'vant'
4
- import XSignature from '@af-mobile-client-vue3/components/data/XSignature/index.vue'
5
- import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
6
-
7
- const signatureImage = ref('')
8
-
9
- function handleSave() {
10
- showToast('签名已保存')
11
- }
12
-
13
- function handleClear() {
14
- showToast('签名已清除')
15
- }
16
- </script>
17
-
18
- <template>
19
- <NormalDataLayout title="签名组件">
20
- <template #layout_content>
21
- 基础使用
22
- <div class="signature-demo">
23
- <XSignature v-model="signatureImage" @save="handleSave" @clear="handleClear" />
24
- <div v-if="signatureImage" class="preview">
25
- <h3>预览签名</h3>
26
- <VanImage v-if="signatureImage" :src="signatureImage" />
27
- </div>
28
- </div>
29
- </template>
30
- </NormalDataLayout>
31
- </template>
32
-
33
- <style scoped lang="less">
34
- .signature-demo {
35
- padding: 16px;
36
- .preview {
37
- margin-top: 20px;
38
- h3 {
39
- margin: 0 0 10px;
40
- font-size: 16px;
41
- color: #323233;
42
- }
43
- img {
44
- max-width: 100%;
45
- border: 1px solid #ebedf0;
46
- border-radius: 8px;
47
- }
48
- }
49
- }
50
- </style>
1
+ <script setup lang="ts">
2
+ import XSignature from '@af-mobile-client-vue3/components/data/XSignature/index.vue'
3
+ import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
4
+ import { showToast, Image as VanImage } from 'vant'
5
+ import { ref } from 'vue'
6
+
7
+ const signatureImage = ref('')
8
+
9
+ function handleSave() {
10
+ showToast('签名已保存')
11
+ }
12
+
13
+ function handleClear() {
14
+ showToast('签名已清除')
15
+ }
16
+ </script>
17
+
18
+ <template>
19
+ <NormalDataLayout title="签名组件">
20
+ <template #layout_content>
21
+ 基础使用
22
+ <div class="signature-demo">
23
+ <XSignature v-model="signatureImage" @save="handleSave" @clear="handleClear" />
24
+ <div v-if="signatureImage" class="preview">
25
+ <h3>预览签名</h3>
26
+ <VanImage v-if="signatureImage" :src="signatureImage" />
27
+ </div>
28
+ </div>
29
+ </template>
30
+ </NormalDataLayout>
31
+ </template>
32
+
33
+ <style scoped lang="less">
34
+ .signature-demo {
35
+ padding: 16px;
36
+ .preview {
37
+ margin-top: 20px;
38
+ h3 {
39
+ margin: 0 0 10px;
40
+ font-size: 16px;
41
+ color: #323233;
42
+ }
43
+ img {
44
+ max-width: 100%;
45
+ border: 1px solid #ebedf0;
46
+ border-radius: 8px;
47
+ }
48
+ }
49
+ }
50
+ </style>
@@ -1,12 +1,12 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue'
2
+ import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
3
+ import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
3
4
  import {
5
+ showToast,
4
6
  Cell as VanCell,
5
7
  List as VanList,
6
- showToast,
7
8
  } from 'vant'
8
- import { indexedDB } from '@af-mobile-client-vue3/utils/indexedDB'
9
- import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
9
+ import { ref } from 'vue'
10
10
 
11
11
  // 列表详情页的路由 '/Component/XCellDetailView/:id'
12
12
  const list = ref([
@@ -1,117 +1,117 @@
1
- <script setup lang="ts">
2
- import { getImageUrl } from '@af-mobile-client-vue3/utils/common'
3
- import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
4
- import {
5
- Grid as VanGrid,
6
- GridItem as VanGridItem,
7
- Swipe as VanSwipe,
8
- SwipeItem as VanSwipeItem,
9
- } from 'vant/es'
10
-
11
- const apps = {
12
- 测试图标1: {
13
- remark: '测试图标1',
14
- icon: 'assets/img/apps/safe-check-web.png',
15
- },
16
- 测试图标2: {
17
- remark: '报装',
18
- icon: 'assets/img/apps/apply-web.png',
19
- },
20
- 测试图标3: {
21
- remark: '营收',
22
- icon: 'assets/img/apps/revenue-web.png',
23
- },
24
- 测试图标4: {
25
- remark: '物联网表',
26
- icon: 'assets/img/apps/iot-web.png',
27
- },
28
- }
29
-
30
- const images = [
31
- '../assets/img/home/banner1.png',
32
- '../assets/img/home/banner2.png',
33
- '../assets/img/home/banner3.png',
34
- '../assets/img/home/banner4.png',
35
- ]
36
-
37
- interface Func {
38
- link: string
39
- navigate?: string
40
- module: any
41
- name: string
42
- children?: Array<Func>
43
- }
44
-
45
- interface App {
46
- module: Func
47
- icon: string
48
- }
49
-
50
- function initAppMenu(func: Array<Func> | undefined) {
51
- const functions = []
52
- if (func && func.length > 0) {
53
- for (let index = 0; index < func.length; index++) {
54
- const module = func[index]
55
- const app = apps[module.link]
56
- if (app) {
57
- functions.push({
58
- module,
59
- icon: app.icon,
60
- })
61
- }
62
- }
63
- return functions
64
- }
65
- return []
66
- }
67
-
68
- const appList: Array<App> = initAppMenu(useUserStore().getUserInfo().functions)
69
- console.warn(appList)
70
- </script>
71
-
72
- <template>
73
- <div class="menu_main">
74
- <VanSwipe class="my-swipe" :autoplay="3000" lazy-render>
75
- <VanSwipeItem v-for="image in images" :key="image">
76
- <img :src="getImageUrl(image)" width="100%" height="100%">
77
- </VanSwipeItem>
78
- </VanSwipe>
79
- <VanGrid :border="false">
80
- <VanGridItem v-for="app in appList" :key="app.module.link" :to="`app/${app.module.link}`">
81
- <img class="app_icon" :src="getImageUrl(app.icon, '../')">
82
- <span class="app_title">{{ app.module.name }}</span>
83
- </VanGridItem>
84
- </VanGrid>
85
- </div>
86
- </template>
87
-
88
- <style scoped lang="less">
89
- .menu_main {
90
- margin-bottom: var(--base-interval-2)
91
- }
92
-
93
- .my-swipe {
94
- margin-bottom: 4px;
95
-
96
- img {
97
- border-radius: 4px;
98
- }
99
- }
100
-
101
- :deep(.van-swipe__indicator--active) {
102
- width: 16px;
103
- background: #fff;
104
- border-radius: 16px;
105
- }
106
-
107
- .app_icon {
108
- width: 42px;
109
- height: 42px;
110
- margin-bottom: 6px;
111
- }
112
-
113
- .app_title {
114
- font-size: 12px;
115
- color: #000;
116
- }
117
- </style>
1
+ <script setup lang="ts">
2
+ import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
3
+ import { getImageUrl } from '@af-mobile-client-vue3/utils/common'
4
+ import {
5
+ Grid as VanGrid,
6
+ GridItem as VanGridItem,
7
+ Swipe as VanSwipe,
8
+ SwipeItem as VanSwipeItem,
9
+ } from 'vant/es'
10
+
11
+ const apps = {
12
+ 测试图标1: {
13
+ remark: '测试图标1',
14
+ icon: 'assets/img/apps/safe-check-web.png',
15
+ },
16
+ 测试图标2: {
17
+ remark: '报装',
18
+ icon: 'assets/img/apps/apply-web.png',
19
+ },
20
+ 测试图标3: {
21
+ remark: '营收',
22
+ icon: 'assets/img/apps/revenue-web.png',
23
+ },
24
+ 测试图标4: {
25
+ remark: '物联网表',
26
+ icon: 'assets/img/apps/iot-web.png',
27
+ },
28
+ }
29
+
30
+ const images = [
31
+ '../assets/img/home/banner1.png',
32
+ '../assets/img/home/banner2.png',
33
+ '../assets/img/home/banner3.png',
34
+ '../assets/img/home/banner4.png',
35
+ ]
36
+
37
+ interface Func {
38
+ link: string
39
+ navigate?: string
40
+ module: any
41
+ name: string
42
+ children?: Array<Func>
43
+ }
44
+
45
+ interface App {
46
+ module: Func
47
+ icon: string
48
+ }
49
+
50
+ function initAppMenu(func: Array<Func> | undefined) {
51
+ const functions = []
52
+ if (func && func.length > 0) {
53
+ for (let index = 0; index < func.length; index++) {
54
+ const module = func[index]
55
+ const app = apps[module.link]
56
+ if (app) {
57
+ functions.push({
58
+ module,
59
+ icon: app.icon,
60
+ })
61
+ }
62
+ }
63
+ return functions
64
+ }
65
+ return []
66
+ }
67
+
68
+ const appList: Array<App> = initAppMenu(useUserStore().getUserInfo().functions)
69
+ console.warn(appList)
70
+ </script>
71
+
72
+ <template>
73
+ <div class="menu_main">
74
+ <VanSwipe class="my-swipe" :autoplay="3000" lazy-render>
75
+ <VanSwipeItem v-for="image in images" :key="image">
76
+ <img :src="getImageUrl(image)" width="100%" height="100%">
77
+ </VanSwipeItem>
78
+ </VanSwipe>
79
+ <VanGrid :border="false">
80
+ <VanGridItem v-for="app in appList" :key="app.module.link" :to="`app/${app.module.link}`">
81
+ <img class="app_icon" :src="getImageUrl(app.icon, '../')">
82
+ <span class="app_title">{{ app.module.name }}</span>
83
+ </VanGridItem>
84
+ </VanGrid>
85
+ </div>
86
+ </template>
87
+
88
+ <style scoped lang="less">
89
+ .menu_main {
90
+ margin-bottom: var(--base-interval-2)
91
+ }
92
+
93
+ .my-swipe {
94
+ margin-bottom: 4px;
95
+
96
+ img {
97
+ border-radius: 4px;
98
+ }
99
+ }
100
+
101
+ :deep(.van-swipe__indicator--active) {
102
+ width: 16px;
103
+ background: #fff;
104
+ border-radius: 16px;
105
+ }
106
+
107
+ .app_icon {
108
+ width: 42px;
109
+ height: 42px;
110
+ margin-bottom: 6px;
111
+ }
112
+
113
+ .app_title {
114
+ font-size: 12px;
115
+ color: #000;
116
+ }
117
+ </style>
@@ -1,46 +1,46 @@
1
- <script setup lang="ts">
2
- import { getImageUrl } from '@af-mobile-client-vue3/utils/common'
3
- import {
4
- Divider as VanDivider,
5
- NoticeBar as VanNoticeBar,
6
- } from 'vant/es'
7
- </script>
8
-
9
- <template>
10
- <div>
11
- <VanNoticeBar class="notice" color="#1989fa" background="#ebf2fb" mode="link">
12
- <img class="notice_icon" :src="getImageUrl('../assets/img/home/notice/icon.png')">
13
- <span class="notice_title">
14
- 消息中心<VanDivider vertical :style="{ borderColor: '#1989fa' }" />
15
- </span>
16
- <span class="notice_content">
17
- 您有0条未读消息
18
- </span>
19
- </VanNoticeBar>
20
- </div>
21
- </template>
22
-
23
- <style scoped lang="less">
24
- .notice {
25
- font-size: 14px;
26
- margin-bottom: var(--base-interval-1);
27
- .notice_icon {
28
- width: 30px;
29
- height: 30px;
30
- vertical-align: middle;
31
- position: relative;
32
- bottom: 2px;
33
- }
34
- .notice_title {
35
- padding-left: 4px;
36
- line-height: 50px;
37
- }
38
- .notice_content {
39
- color: #000;
40
- }
41
- }
42
- :deep(.van-notice-bar) {
43
- height: 50px;
44
- padding: 0 8px;
45
- }
46
- </style>
1
+ <script setup lang="ts">
2
+ import { getImageUrl } from '@af-mobile-client-vue3/utils/common'
3
+ import {
4
+ Divider as VanDivider,
5
+ NoticeBar as VanNoticeBar,
6
+ } from 'vant/es'
7
+ </script>
8
+
9
+ <template>
10
+ <div>
11
+ <VanNoticeBar class="notice" color="#1989fa" background="#ebf2fb" mode="link">
12
+ <img class="notice_icon" :src="getImageUrl('../assets/img/home/notice/icon.png')">
13
+ <span class="notice_title">
14
+ 消息中心<VanDivider vertical :style="{ borderColor: '#1989fa' }" />
15
+ </span>
16
+ <span class="notice_content">
17
+ 您有0条未读消息
18
+ </span>
19
+ </VanNoticeBar>
20
+ </div>
21
+ </template>
22
+
23
+ <style scoped lang="less">
24
+ .notice {
25
+ font-size: 14px;
26
+ margin-bottom: var(--base-interval-1);
27
+ .notice_icon {
28
+ width: 30px;
29
+ height: 30px;
30
+ vertical-align: middle;
31
+ position: relative;
32
+ bottom: 2px;
33
+ }
34
+ .notice_title {
35
+ padding-left: 4px;
36
+ line-height: 50px;
37
+ }
38
+ .notice_content {
39
+ color: #000;
40
+ }
41
+ }
42
+ :deep(.van-notice-bar) {
43
+ height: 50px;
44
+ padding: 0 8px;
45
+ }
46
+ </style>
@@ -1,36 +1,36 @@
1
- <script setup lang="ts">
2
- import { ref } from 'vue'
3
- import {
4
- Col as VanCol,
5
- Row as VanRow,
6
- Search as VanSearch,
7
- } from 'vant/es'
8
-
9
- const value = ref('')
10
- </script>
11
-
12
- <template>
13
- <div class="top_nav_main">
14
- <VanRow gutter="54" align="center">
15
- <VanCol span="2">
16
- <img alt="default-user-profile" class="default_user_profile" src="../../assets/common/default-user-profile.png">
17
- </VanCol>
18
- <VanCol span="22">
19
- <VanSearch v-model="value" placeholder="请输入搜索关键词" />
20
- </VanCol>
21
- </VanRow>
22
- </div>
23
- </template>
24
-
25
- <style scoped lang="less">
26
- .top_nav_main {
27
- padding-bottom: var(--base-interval-1);
28
- }
29
- .default_user_profile {
30
- border-radius: 50%;
31
- width: 33px;
32
- height: 33px;
33
- position: relative;
34
- top: 2px;
35
- }
36
- </style>
1
+ <script setup lang="ts">
2
+ import {
3
+ Col as VanCol,
4
+ Row as VanRow,
5
+ Search as VanSearch,
6
+ } from 'vant/es'
7
+ import { ref } from 'vue'
8
+
9
+ const value = ref('')
10
+ </script>
11
+
12
+ <template>
13
+ <div class="top_nav_main">
14
+ <VanRow gutter="54" align="center">
15
+ <VanCol span="2">
16
+ <img alt="default-user-profile" class="default_user_profile" src="../../assets/common/default-user-profile.png">
17
+ </VanCol>
18
+ <VanCol span="22">
19
+ <VanSearch v-model="value" placeholder="请输入搜索关键词" />
20
+ </VanCol>
21
+ </VanRow>
22
+ </div>
23
+ </template>
24
+
25
+ <style scoped lang="less">
26
+ .top_nav_main {
27
+ padding-bottom: var(--base-interval-1);
28
+ }
29
+ .default_user_profile {
30
+ border-radius: 50%;
31
+ width: 33px;
32
+ height: 33px;
33
+ position: relative;
34
+ top: 2px;
35
+ }
36
+ </style>
@@ -1,62 +1,61 @@
1
- <script setup lang="ts">
2
- import { Loading as VanLoading, showDialog } from 'vant'
3
- import { useRoute } from 'vue-router'
4
- import { onMounted, ref } from 'vue'
5
- import { http } from '@af-mobile-client-vue3/utils/http'
6
-
7
- // 获取url中的sellid参数
8
- const route = useRoute()
9
- const sellid = route.query.sellid
10
- const showLoading = ref(true)
11
-
12
- onMounted(async () => {
13
- if (sellid) {
14
- http.request({
15
- url: '/invoice/rs/logic/getInvoiceBySellId',
16
- method: 'post',
17
- data: {
18
- sellid,
19
- }
20
- ,
21
- }).then((_res: any) => {
22
- showLoading.value = false
23
- if (_res.type === 'success') {
24
- if (_res.url)
25
- window.open(_res.url)
26
- }
27
- else {
28
- showDialog({
29
- message: _res.msg,
30
- theme: 'round-button',
31
- showConfirmButton: false,
32
- }).then(() => {
33
- // on close
34
- })
35
- }
36
- })
37
- }
38
- })
39
- </script>
40
-
41
- <template>
42
- <div class="invoiceShow">
43
- <VanLoading v-if="showLoading" type="spinner" color="#1989fa" vertical>
44
- 正在努力获取发票信息,请稍后。。。
45
- </VanLoading>
46
- </div>
47
- </template>
48
-
49
- <style scoped lang="less">
50
- .invoiceShow {
51
- width: 100vw !important;
52
- height: 100vh !important;
53
- overflow-y: hidden;
54
- display: flex;
55
- justify-content: center;
56
- align-items: center;
57
- }
58
-
59
- .invoiceShow > * {
60
- transform: scale(1.5);
61
- }
62
- </style>
1
+ <script setup lang="ts">
2
+ import { http } from '@af-mobile-client-vue3/utils/http'
3
+ import { showDialog, Loading as VanLoading } from 'vant'
4
+ import { onMounted, ref } from 'vue'
5
+ import { useRoute } from 'vue-router'
6
+
7
+ // 获取url中的sellid参数
8
+ const route = useRoute()
9
+ const sellid = route.query.sellid
10
+ const showLoading = ref(true)
11
+
12
+ onMounted(async () => {
13
+ if (sellid) {
14
+ http.request({
15
+ url: '/invoice/rs/logic/getInvoiceBySellId',
16
+ method: 'post',
17
+ data: {
18
+ sellid,
19
+ },
20
+ }).then((_res: any) => {
21
+ showLoading.value = false
22
+ if (_res.type === 'success') {
23
+ if (_res.url)
24
+ window.open(_res.url)
25
+ }
26
+ else {
27
+ showDialog({
28
+ message: _res.msg,
29
+ theme: 'round-button',
30
+ showConfirmButton: false,
31
+ }).then(() => {
32
+ // on close
33
+ })
34
+ }
35
+ })
36
+ }
37
+ })
38
+ </script>
39
+
40
+ <template>
41
+ <div class="invoiceShow">
42
+ <VanLoading v-if="showLoading" type="spinner" color="#1989fa" vertical>
43
+ 正在努力获取发票信息,请稍后。。。
44
+ </VanLoading>
45
+ </div>
46
+ </template>
47
+
48
+ <style scoped lang="less">
49
+ .invoiceShow {
50
+ width: 100vw !important;
51
+ height: 100vh !important;
52
+ overflow-y: hidden;
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+ }
57
+
58
+ .invoiceShow > * {
59
+ transform: scale(1.5);
60
+ }
61
+ </style>