af-mobile-client-vue3 1.4.65 → 1.4.68
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/__dummy__ +9 -9
- package/build/vite/optimize.ts +36 -36
- package/package.json +121 -120
- package/pnpm-lock.yaml +11070 -0
- package/public/favicon.svg +4 -4
- package/scripts/verifyCommit.js +19 -19
- package/src/components/common/MateChat/components/MateChatContent.vue +274 -274
- package/src/components/common/MateChat/components/MateChatHeader.vue +337 -337
- package/src/components/common/MateChat/index.vue +444 -444
- package/src/components/common/MateChat/types.ts +247 -247
- package/src/components/data/UserDetail/types.ts +1 -1
- package/src/components/data/XFormGroup/doc/DeviceForm.vue +1 -1
- package/src/components/data/XFormGroup/doc/UserForm.vue +1 -1
- package/src/components/data/XReportGrid/XAddReport/index.ts +1 -1
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/XReportDrawer/index.ts +1 -1
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/components/data/XTag/index.vue +10 -10
- package/src/components/layout/TabBarLayout/index.vue +40 -40
- package/src/hooks/useCommon.ts +9 -9
- package/src/plugins/AppData.ts +38 -38
- 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/stores/modules/user.ts +3 -0
- package/src/utils/authority-utils.ts +84 -84
- package/src/utils/crypto.ts +39 -39
- package/src/utils/runEvalFunction.ts +13 -13
- package/src/utils/timeUtil.ts +27 -27
- package/src/views/component/EvaluateRecordView/index.vue +40 -40
- package/src/views/component/MateChat/MateChatView.vue +10 -10
- package/src/views/component/XCellDetailView/index.vue +217 -217
- package/src/views/component/XFormView/index.vue +2 -2
- 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/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/LoginForm.vue +0 -1
- package/src/views/user/login/index.vue +22 -22
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
// print.js
|
|
2
|
-
|
|
3
|
-
export function printElement(elementToPrint) {
|
|
4
|
-
// 创建一个新的浏览器窗口
|
|
5
|
-
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
-
// 设置新窗口的文档内容
|
|
7
|
-
printWindow.document.write(`
|
|
8
|
-
<html>
|
|
9
|
-
<head>
|
|
10
|
-
<title>Print</title>
|
|
11
|
-
<style>
|
|
12
|
-
@page {
|
|
13
|
-
size: auto;
|
|
14
|
-
margin: 0mm;
|
|
15
|
-
}
|
|
16
|
-
html, body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
#print-container {
|
|
23
|
-
display: none
|
|
24
|
-
}
|
|
25
|
-
.img{
|
|
26
|
-
width: 95%;
|
|
27
|
-
height: 180px;
|
|
28
|
-
object-fit: cover;
|
|
29
|
-
}
|
|
30
|
-
.reportMain {
|
|
31
|
-
text-align: center;
|
|
32
|
-
margin: 0 auto;
|
|
33
|
-
font-size: 16px;
|
|
34
|
-
color: #000;
|
|
35
|
-
background-color: #fff;
|
|
36
|
-
border-radius: 8px;
|
|
37
|
-
|
|
38
|
-
.reportTitle {
|
|
39
|
-
font-weight: bold;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.subTitle {
|
|
43
|
-
display: flex;
|
|
44
|
-
justify-content: space-between;
|
|
45
|
-
margin-bottom: 1%;
|
|
46
|
-
|
|
47
|
-
.subTitleItems {
|
|
48
|
-
max-width: 30%;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.inputsDiv {
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: space-between;
|
|
55
|
-
.inputsDivItem {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
padding: 0 4px;
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
.inputsDivItemLabel {
|
|
61
|
-
padding: 0 4px;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.reportTable {
|
|
67
|
-
width: 100%;
|
|
68
|
-
border-collapse: collapse;
|
|
69
|
-
table-layout:fixed;
|
|
70
|
-
word-break:break-all;
|
|
71
|
-
text-align: center;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
.reportMainForDisplay {
|
|
75
|
-
text-align: center;
|
|
76
|
-
margin: 10% auto;
|
|
77
|
-
font-size: 16px;
|
|
78
|
-
color: #000;
|
|
79
|
-
background-color: #fff;
|
|
80
|
-
border-radius: 8px;
|
|
81
|
-
|
|
82
|
-
.reportTitle {
|
|
83
|
-
font-weight: bold;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.subTitle {
|
|
87
|
-
display: flex;
|
|
88
|
-
justify-content: space-between;
|
|
89
|
-
|
|
90
|
-
.subTitleItems {
|
|
91
|
-
max-width: 30%;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.inputsDiv {
|
|
96
|
-
display: flex;
|
|
97
|
-
justify-content: space-around;
|
|
98
|
-
.inputsDivItem {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
padding: 0 4px;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
.inputsDivItemLabel {
|
|
104
|
-
padding: 0 4px;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.reportTable {
|
|
110
|
-
width: 100%;
|
|
111
|
-
border-collapse: collapse;
|
|
112
|
-
table-layout:fixed;
|
|
113
|
-
word-break:break-all;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
.reportMainNoPadding {
|
|
117
|
-
text-align: center;
|
|
118
|
-
margin: 0 auto;
|
|
119
|
-
font-size: 16px;
|
|
120
|
-
color: #000;
|
|
121
|
-
background-color: #fff;
|
|
122
|
-
border-radius: 8px;
|
|
123
|
-
|
|
124
|
-
.reportTitle {
|
|
125
|
-
font-weight: bold;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.subTitle {
|
|
129
|
-
display: flex;
|
|
130
|
-
justify-content: space-between;
|
|
131
|
-
|
|
132
|
-
.subTitleItems {
|
|
133
|
-
max-width: 30%;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.inputsDiv {
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: space-between;
|
|
140
|
-
.inputsDivItem {
|
|
141
|
-
display: flex;
|
|
142
|
-
align-items: center;
|
|
143
|
-
padding: 0 4px;
|
|
144
|
-
white-space: nowrap;
|
|
145
|
-
.inputsDivItemLabel {
|
|
146
|
-
padding: 0 4px;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.reportTable {
|
|
152
|
-
width: 100%;
|
|
153
|
-
border-collapse: collapse;
|
|
154
|
-
table-layout:fixed;
|
|
155
|
-
word-break:break-all;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
.tools{
|
|
159
|
-
position: fixed;
|
|
160
|
-
right: 2%;
|
|
161
|
-
text-align: right;
|
|
162
|
-
width: 60%;
|
|
163
|
-
cursor: pointer;
|
|
164
|
-
.toolsItem{
|
|
165
|
-
width: 15%;
|
|
166
|
-
margin-right: 3%;
|
|
167
|
-
display: inline-block;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
</style>
|
|
171
|
-
</head>
|
|
172
|
-
<body>
|
|
173
|
-
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
174
|
-
${elementToPrint.innerHTML}
|
|
175
|
-
</body>
|
|
176
|
-
</html>
|
|
177
|
-
`)
|
|
178
|
-
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
179
|
-
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
180
|
-
setTimeout(() => {
|
|
181
|
-
printWindow.print() // 调用打印方法
|
|
182
|
-
printWindow.close()
|
|
183
|
-
}, 500) // 延迟500毫秒后执行打印
|
|
184
|
-
}
|
|
1
|
+
// print.js
|
|
2
|
+
|
|
3
|
+
export function printElement(elementToPrint) {
|
|
4
|
+
// 创建一个新的浏览器窗口
|
|
5
|
+
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
+
// 设置新窗口的文档内容
|
|
7
|
+
printWindow.document.write(`
|
|
8
|
+
<html>
|
|
9
|
+
<head>
|
|
10
|
+
<title>Print</title>
|
|
11
|
+
<style>
|
|
12
|
+
@page {
|
|
13
|
+
size: auto;
|
|
14
|
+
margin: 0mm;
|
|
15
|
+
}
|
|
16
|
+
html, body {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
#print-container {
|
|
23
|
+
display: none
|
|
24
|
+
}
|
|
25
|
+
.img{
|
|
26
|
+
width: 95%;
|
|
27
|
+
height: 180px;
|
|
28
|
+
object-fit: cover;
|
|
29
|
+
}
|
|
30
|
+
.reportMain {
|
|
31
|
+
text-align: center;
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
color: #000;
|
|
35
|
+
background-color: #fff;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
|
|
38
|
+
.reportTitle {
|
|
39
|
+
font-weight: bold;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.subTitle {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
margin-bottom: 1%;
|
|
46
|
+
|
|
47
|
+
.subTitleItems {
|
|
48
|
+
max-width: 30%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.inputsDiv {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
.inputsDivItem {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
padding: 0 4px;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
.inputsDivItemLabel {
|
|
61
|
+
padding: 0 4px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.reportTable {
|
|
67
|
+
width: 100%;
|
|
68
|
+
border-collapse: collapse;
|
|
69
|
+
table-layout:fixed;
|
|
70
|
+
word-break:break-all;
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.reportMainForDisplay {
|
|
75
|
+
text-align: center;
|
|
76
|
+
margin: 10% auto;
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
color: #000;
|
|
79
|
+
background-color: #fff;
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
|
|
82
|
+
.reportTitle {
|
|
83
|
+
font-weight: bold;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.subTitle {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
|
|
90
|
+
.subTitleItems {
|
|
91
|
+
max-width: 30%;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.inputsDiv {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: space-around;
|
|
98
|
+
.inputsDivItem {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
padding: 0 4px;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
.inputsDivItemLabel {
|
|
104
|
+
padding: 0 4px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.reportTable {
|
|
110
|
+
width: 100%;
|
|
111
|
+
border-collapse: collapse;
|
|
112
|
+
table-layout:fixed;
|
|
113
|
+
word-break:break-all;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.reportMainNoPadding {
|
|
117
|
+
text-align: center;
|
|
118
|
+
margin: 0 auto;
|
|
119
|
+
font-size: 16px;
|
|
120
|
+
color: #000;
|
|
121
|
+
background-color: #fff;
|
|
122
|
+
border-radius: 8px;
|
|
123
|
+
|
|
124
|
+
.reportTitle {
|
|
125
|
+
font-weight: bold;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.subTitle {
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: space-between;
|
|
131
|
+
|
|
132
|
+
.subTitleItems {
|
|
133
|
+
max-width: 30%;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.inputsDiv {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
.inputsDivItem {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
padding: 0 4px;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
.inputsDivItemLabel {
|
|
146
|
+
padding: 0 4px;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.reportTable {
|
|
152
|
+
width: 100%;
|
|
153
|
+
border-collapse: collapse;
|
|
154
|
+
table-layout:fixed;
|
|
155
|
+
word-break:break-all;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
.tools{
|
|
159
|
+
position: fixed;
|
|
160
|
+
right: 2%;
|
|
161
|
+
text-align: right;
|
|
162
|
+
width: 60%;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
.toolsItem{
|
|
165
|
+
width: 15%;
|
|
166
|
+
margin-right: 3%;
|
|
167
|
+
display: inline-block;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
171
|
+
</head>
|
|
172
|
+
<body>
|
|
173
|
+
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
174
|
+
${elementToPrint.innerHTML}
|
|
175
|
+
</body>
|
|
176
|
+
</html>
|
|
177
|
+
`)
|
|
178
|
+
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
179
|
+
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
180
|
+
setTimeout(() => {
|
|
181
|
+
printWindow.print() // 调用打印方法
|
|
182
|
+
printWindow.close()
|
|
183
|
+
}, 500) // 延迟500毫秒后执行打印
|
|
184
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<template>
|
|
5
|
-
<VanTag />
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<style scoped lang="less">
|
|
9
|
-
|
|
10
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<template>
|
|
5
|
+
<VanTag />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<style scoped lang="less">
|
|
9
|
+
|
|
10
|
+
</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/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
|
+
}
|
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
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import type { RouteRecordRaw } from 'vue-router'
|
|
2
|
-
import PageLayout from '@af-mobile-client-vue3/layout/PageLayout.vue'
|
|
3
|
-
import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
|
|
4
|
-
import invoiceShow from '@af-mobile-client-vue3/views/invoiceShow/index.vue'
|
|
5
|
-
|
|
6
|
-
const routes: Array<RouteRecordRaw> = [
|
|
7
|
-
{
|
|
8
|
-
path: '/',
|
|
9
|
-
name: 'root',
|
|
10
|
-
component: PageLayout,
|
|
11
|
-
redirect: { name: 'Component' },
|
|
12
|
-
children: [
|
|
13
|
-
{
|
|
14
|
-
path: '/invoiceShow',
|
|
15
|
-
name: 'invoiceShow',
|
|
16
|
-
component: invoiceShow,
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
path: '/404',
|
|
22
|
-
name: '404',
|
|
23
|
-
component: NotFound,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
path: '/:pathMatch(.*)',
|
|
27
|
-
redirect: {
|
|
28
|
-
name: '404',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
export default routes
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
2
|
+
import PageLayout from '@af-mobile-client-vue3/layout/PageLayout.vue'
|
|
3
|
+
import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
|
|
4
|
+
import invoiceShow from '@af-mobile-client-vue3/views/invoiceShow/index.vue'
|
|
5
|
+
|
|
6
|
+
const routes: Array<RouteRecordRaw> = [
|
|
7
|
+
{
|
|
8
|
+
path: '/',
|
|
9
|
+
name: 'root',
|
|
10
|
+
component: PageLayout,
|
|
11
|
+
redirect: { name: 'Component' },
|
|
12
|
+
children: [
|
|
13
|
+
{
|
|
14
|
+
path: '/invoiceShow',
|
|
15
|
+
name: 'invoiceShow',
|
|
16
|
+
component: invoiceShow,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
path: '/404',
|
|
22
|
+
name: '404',
|
|
23
|
+
component: NotFound,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
path: '/:pathMatch(.*)',
|
|
27
|
+
redirect: {
|
|
28
|
+
name: '404',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
export default routes
|