af-mobile-client-vue3 1.0.54

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 (156) hide show
  1. package/.editorconfig +38 -0
  2. package/.env +7 -0
  3. package/.env.development +4 -0
  4. package/.env.envoiceShow +7 -0
  5. package/.env.production +7 -0
  6. package/.husky/commit-msg +1 -0
  7. package/.husky/pre-commit +1 -0
  8. package/.vscode/extensions.json +7 -0
  9. package/.vscode/settings.json +61 -0
  10. package/LICENSE +21 -0
  11. package/README.md +181 -0
  12. package/af-example-mobile-vue-web.iml +9 -0
  13. package/build/vite/index.ts +91 -0
  14. package/build/vite/vconsole.ts +44 -0
  15. package/eslint.config.js +7 -0
  16. package/index.html +17 -0
  17. package/mock/data.ts +20 -0
  18. package/mock/index.ts +5 -0
  19. package/mock/modules/prose.mock.ts +16 -0
  20. package/mock/modules/user.mock.ts +152 -0
  21. package/netlify.toml +12 -0
  22. package/package.json +107 -0
  23. package/public/favicon-dark.svg +4 -0
  24. package/public/favicon.ico +0 -0
  25. package/public/favicon.svg +4 -0
  26. package/public/pwa-192x192.png +0 -0
  27. package/public/pwa-512x512.png +0 -0
  28. package/public/safari-pinned-tab.svg +32 -0
  29. package/scripts/verifyCommit.js +19 -0
  30. package/src/App.vue +43 -0
  31. package/src/api/mock/index.ts +30 -0
  32. package/src/api/user/index.ts +40 -0
  33. package/src/assets/common/default-user-profile.png +0 -0
  34. package/src/assets/img/apps/apply-web.png +0 -0
  35. package/src/assets/img/apps/example-web.png +0 -0
  36. package/src/assets/img/apps/iot-web.png +0 -0
  37. package/src/assets/img/apps/linepatrol-web.png +0 -0
  38. package/src/assets/img/apps/monitor-web.png +0 -0
  39. package/src/assets/img/apps/oa-web.png +0 -0
  40. package/src/assets/img/apps/revenue-web.png +0 -0
  41. package/src/assets/img/apps/safe-check-web.png +0 -0
  42. package/src/assets/img/component/logo.png +0 -0
  43. package/src/assets/img/home/banner1.png +0 -0
  44. package/src/assets/img/home/banner2.png +0 -0
  45. package/src/assets/img/home/banner3.png +0 -0
  46. package/src/assets/img/home/banner4.png +0 -0
  47. package/src/assets/img/home/notice/icon.png +0 -0
  48. package/src/assets/img/user/login/background-shadow-1.svg +20 -0
  49. package/src/assets/img/user/login/logo-background.svg +20 -0
  50. package/src/assets/img/user/login/logo.png +0 -0
  51. package/src/assets/img/user/my/exit-login.png +0 -0
  52. package/src/assets/img/user/my/setting-arrow.png +0 -0
  53. package/src/assets/img/user/my/setting.png +0 -0
  54. package/src/bootstrap.ts +32 -0
  55. package/src/components/core/App/MicroAppView.vue +59 -0
  56. package/src/components/core/BeautifulLoading/index.vue +47 -0
  57. package/src/components/core/NavBar/index.vue +12 -0
  58. package/src/components/core/SvgIcon/index.vue +61 -0
  59. package/src/components/core/Tabbar/index.vue +38 -0
  60. package/src/components/core/Uploader/index.vue +104 -0
  61. package/src/components/core/XMultiSelect/index.vue +196 -0
  62. package/src/components/core/XSelect/index.vue +130 -0
  63. package/src/components/data/XBadge/index.vue +85 -0
  64. package/src/components/data/XCellDetail/index.vue +106 -0
  65. package/src/components/data/XCellList/index.vue +358 -0
  66. package/src/components/data/XCellListFilter/index.vue +392 -0
  67. package/src/components/data/XForm/index.vue +127 -0
  68. package/src/components/data/XFormItem/index.vue +472 -0
  69. package/src/components/data/XReportForm/XReportFormJsonRender.vue +220 -0
  70. package/src/components/data/XReportForm/index.vue +1058 -0
  71. package/src/components/layout/NormalDataLayout/index.vue +70 -0
  72. package/src/components/layout/TabBarLayout/index.vue +40 -0
  73. package/src/components.d.ts +53 -0
  74. package/src/enums/requestEnum.ts +25 -0
  75. package/src/env.d.ts +16 -0
  76. package/src/font-style/PingFangSC-Regular.woff2 +0 -0
  77. package/src/font-style/font.css +4 -0
  78. package/src/hooks/useCommon.ts +9 -0
  79. package/src/hooks/useLogin.ts +97 -0
  80. package/src/icons/svg/bird.svg +1 -0
  81. package/src/icons/svg/check-in.svg +33 -0
  82. package/src/icons/svg/dark.svg +5 -0
  83. package/src/icons/svg/github.svg +5 -0
  84. package/src/icons/svg/light.svg +5 -0
  85. package/src/icons/svg/link.svg +5 -0
  86. package/src/icons/svg/loadError.svg +1 -0
  87. package/src/icons/svg/notFound.svg +1 -0
  88. package/src/icons/svgo.yml +22 -0
  89. package/src/layout/PageLayout.vue +51 -0
  90. package/src/layout/SingleLayout.vue +35 -0
  91. package/src/locales/en-US.json +25 -0
  92. package/src/locales/zh-CN.json +25 -0
  93. package/src/main.ts +48 -0
  94. package/src/plugins/AppData.ts +38 -0
  95. package/src/plugins/GetLoginInfoService.ts +10 -0
  96. package/src/plugins/index.ts +11 -0
  97. package/src/router/README.md +8 -0
  98. package/src/router/guards.ts +60 -0
  99. package/src/router/index.ts +60 -0
  100. package/src/router/invoiceRoutes.ts +33 -0
  101. package/src/router/routes.ts +84 -0
  102. package/src/services/api/Login.ts +6 -0
  103. package/src/services/api/common.ts +98 -0
  104. package/src/services/api/index.ts +7 -0
  105. package/src/services/api/manage.ts +8 -0
  106. package/src/services/restTools.ts +37 -0
  107. package/src/settings.ts +1 -0
  108. package/src/stores/index.ts +7 -0
  109. package/src/stores/modules/cachedView.ts +31 -0
  110. package/src/stores/modules/counter.ts +19 -0
  111. package/src/stores/modules/routeTransitionName.ts +26 -0
  112. package/src/stores/modules/setting.ts +28 -0
  113. package/src/stores/modules/user.ts +180 -0
  114. package/src/stores/mutation-type.ts +7 -0
  115. package/src/styles/app.less +67 -0
  116. package/src/styles/login.less +81 -0
  117. package/src/typing.ts +3 -0
  118. package/src/utils/Storage.ts +124 -0
  119. package/src/utils/authority-utils.ts +87 -0
  120. package/src/utils/common.ts +41 -0
  121. package/src/utils/crypto.ts +39 -0
  122. package/src/utils/dataUtil.ts +42 -0
  123. package/src/utils/dictUtil.ts +51 -0
  124. package/src/utils/http/index.ts +158 -0
  125. package/src/utils/i18n.ts +41 -0
  126. package/src/utils/indexedDB.ts +180 -0
  127. package/src/utils/local-storage.ts +9 -0
  128. package/src/utils/mobileUtil.ts +26 -0
  129. package/src/utils/progress.ts +19 -0
  130. package/src/utils/routerUtil.ts +271 -0
  131. package/src/utils/set-page-title.ts +7 -0
  132. package/src/utils/validate.ts +6 -0
  133. package/src/views/chat/index.vue +153 -0
  134. package/src/views/common/LoadError.vue +64 -0
  135. package/src/views/common/NotFound.vue +68 -0
  136. package/src/views/component/EvaluateRecordView/index.vue +40 -0
  137. package/src/views/component/XCellDetailView/index.vue +216 -0
  138. package/src/views/component/XCellListView/index.vue +36 -0
  139. package/src/views/component/XFormView/index.vue +478 -0
  140. package/src/views/component/XReportFormIframeView/index.vue +45 -0
  141. package/src/views/component/XReportFormView/index.vue +295 -0
  142. package/src/views/component/index.vue +111 -0
  143. package/src/views/component/menu.vue +117 -0
  144. package/src/views/component/notice.vue +46 -0
  145. package/src/views/component/topNav.vue +36 -0
  146. package/src/views/invoiceShow/index.vue +62 -0
  147. package/src/views/user/login/ForgetPasswordForm.vue +93 -0
  148. package/src/views/user/login/LoginForm.vue +145 -0
  149. package/src/views/user/login/LoginTitle.vue +68 -0
  150. package/src/views/user/login/LoginWave.vue +109 -0
  151. package/src/views/user/login/index.vue +22 -0
  152. package/src/views/user/my/index.vue +230 -0
  153. package/src/vue-router.d.ts +9 -0
  154. package/tsconfig.json +43 -0
  155. package/uno.config.ts +32 -0
  156. package/vite.config.ts +110 -0
@@ -0,0 +1,216 @@
1
+ <script setup lang="ts">
2
+ import { useRoute } from 'vue-router'
3
+ import { onMounted, ref } from 'vue'
4
+ import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
5
+ import XCellDetail from '@af-mobile-client-vue3/components/data/XCellDetail/index.vue'
6
+ import {
7
+ Cell as VanCell,
8
+ CellGroup as VanCellGroup,
9
+ Dialog as VanDialog,
10
+ Field as VanField,
11
+ Form as VanForm,
12
+ Grid as VanGrid,
13
+ GridItem as VanGridItem,
14
+ Popup as VanPopup,
15
+ showConfirmDialog,
16
+ showFailToast,
17
+ showSuccessToast,
18
+ } from 'vant'
19
+ import TabBarLayout from '@af-mobile-client-vue3/components/layout/TabBarLayout/index.vue'
20
+ import { remove } from '@af-mobile-client-vue3/services/api/common'
21
+
22
+ const options = ref([
23
+ { text: '微信', icon: 'wechat' },
24
+ { text: '微博', icon: 'weibo' },
25
+ { text: '微信', icon: 'wechat' },
26
+ { text: '微博', icon: 'weibo' },
27
+ { text: '微信', icon: 'wechat' },
28
+ { text: '微博', icon: 'weibo' },
29
+ { text: '微信', icon: 'wechat' },
30
+ { text: '微博', icon: 'weibo' },
31
+ ])
32
+
33
+ const barList = ref([
34
+ { icon: 'edit', text: '编辑', method: 'editElement' },
35
+ { icon: 'delete-o', text: '删除', method: 'delElement' },
36
+ { icon: 'ellipsis', text: '更多', method: 'getMore' },
37
+ ])
38
+
39
+ const serviceName = ref('af-system')
40
+
41
+ const queryParamsName = ref('crud_oper_log_manage')
42
+
43
+ const route = useRoute()
44
+
45
+ const id = ref(-1)
46
+
47
+ const showMore = ref(false)
48
+
49
+ const showEdit = ref(false)
50
+
51
+ const msg = ref({
52
+ info1: '',
53
+ info2: '',
54
+ })
55
+
56
+ const loading = ref(true)
57
+
58
+ const detailContent = ref({
59
+ 编号: '测试编号3.1415926...',
60
+ 姓名: '测试人员',
61
+ 部门: '测试部门',
62
+ 完成日期: '测试时间 2024/4/16 16:59:12',
63
+ 请求方式: '测试方法 POST',
64
+ 请求ip: '测试ip 127.0.0.1',
65
+ })
66
+
67
+ const callbacks = {
68
+ editElement,
69
+ delElement,
70
+ getMore,
71
+ }
72
+
73
+ function editElement() {
74
+ showEdit.value = true
75
+ }
76
+
77
+ function doEdit() {
78
+ showEdit.value = false
79
+ }
80
+ function delElement() {
81
+ showConfirmDialog({
82
+ title: '提示',
83
+ message:
84
+ `确认删除---${id.value}---?`,
85
+ closeOnClickOverlay: true,
86
+ })
87
+ .then(() => {
88
+ const params = {
89
+ queryParamsName: queryParamsName.value,
90
+ idList: [id.value],
91
+ }
92
+ remove(params, serviceName)
93
+ .then((_res) => {
94
+ showSuccessToast('删除成功')
95
+ history.back()
96
+ }).catch((_err) => {
97
+ showFailToast('删除失败')
98
+ })
99
+ })
100
+ .catch((err) => {
101
+ console.warn(err)
102
+ })
103
+ }
104
+
105
+ function getMore() {
106
+ showMore.value = true
107
+ }
108
+
109
+ onMounted(() => {
110
+ id.value = route.params.id as unknown as number
111
+ setTimeout(() => {
112
+ loading.value = false
113
+ }, 1000)
114
+ })
115
+ </script>
116
+
117
+ <template>
118
+ <div id="XCellDetailView">
119
+ <NormalDataLayout title="详情" class="normal-body">
120
+ <template #layout_content>
121
+ <XCellDetail
122
+ title="测试标题"
123
+ describe="测试描述信息"
124
+ extra="12345"
125
+ :loading="loading"
126
+ :status-bar="{ icon: 'success', color: 'green' }"
127
+ >
128
+ <template #detailContent>
129
+ <div v-for="(value, key) in detailContent" :key="key" class="detail-content">
130
+ <div class="detail-content-title">
131
+ {{ key }}
132
+ </div>
133
+ <div class="detail-content-msg">
134
+ {{ value }}
135
+ </div>
136
+ </div>
137
+ </template>
138
+ </XCellDetail>
139
+ </template>
140
+ </NormalDataLayout>
141
+ <TabBarLayout :bar-list="barList" :callbacks="callbacks" />
142
+ <VanPopup
143
+ v-model:show="showMore"
144
+ class="pop-box"
145
+ :overlay-style="{ height: '92.5vh', top: '7.5vh' }"
146
+ round
147
+ position="bottom"
148
+ >
149
+ <div class="grid-box">
150
+ <VanGrid :gutter="10">
151
+ <VanGridItem v-for="(item, index) in options" :key="index" :icon="(item as any).icon" :text="(item as any).text" />
152
+ </VanGrid>
153
+ </div>
154
+ <VanCell class="cell" title="取消" @click="showMore = false" />
155
+ </VanPopup>
156
+ <VanDialog :show="showEdit" title="编辑信息" :close-on-click-overlay="true" @confirm="doEdit">
157
+ <VanForm>
158
+ <VanCellGroup class="cell-group">
159
+ <VanField
160
+ v-model="msg.info1"
161
+ name="信息一"
162
+ label="信息一"
163
+ placeholder="请填写信息一"
164
+ :rules="[{ required: true, message: '信息一不得为空' }]"
165
+ />
166
+ <VanField
167
+ v-model="msg.info2"
168
+ name="信息二"
169
+ label="信息二"
170
+ placeholder="请填写信息二"
171
+ :rules="[{ required: true, message: '信息二不得为空' }]"
172
+ />
173
+ </VanCellGroup>
174
+ </VanForm>
175
+ </VanDialog>
176
+ </div>
177
+ </template>
178
+
179
+ <style scoped lang="less">
180
+ #XCellDetailView {
181
+ .normal-body {
182
+ height: 92vh;
183
+ }
184
+ .grid-box {
185
+ background-color: #f7f8fa;
186
+ margin-top: 2vh;
187
+ :deep(.van-grid-item__content) {
188
+ background-color: #f7f8fa;
189
+ }
190
+ :deep(.van-grid-item__content:hover) {
191
+ background-color: white;
192
+ }
193
+ }
194
+ .pop-box {
195
+ height: 28vh;
196
+ background-color: #f7f8fa;
197
+ }
198
+ .cell {
199
+ margin-top: 1vh;
200
+ text-align: center;
201
+ }
202
+ .cell-group {
203
+ margin-top: 2vh;
204
+ margin-bottom: 2vh;
205
+ }
206
+ .detail-content {
207
+ margin: 5px 0 0 0;
208
+ font-size: 15px;
209
+ .detail-content-title {
210
+ font-size: 13px;
211
+ margin-bottom: 5px;
212
+ color: var(--van-text-color-2);
213
+ }
214
+ }
215
+ }
216
+ </style>
@@ -0,0 +1,36 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
4
+ import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
5
+ import { useRouter } from 'vue-router'
6
+
7
+ const router = useRouter()
8
+
9
+ const idKey = ref('o_id')
10
+ // const idKey = ref('t_id')
11
+
12
+ // const configName = ref('测试crud-移动端')
13
+ const configName = ref('workPlanQueryParams_new')
14
+
15
+ function toDetail(item) {
16
+ router.push({
17
+ name: 'XCellDetailView',
18
+ params: { id: item[idKey.value] }, // 如果使用命名路由,推荐使用路由参数而不是直接构建 URL
19
+ })
20
+ }
21
+ </script>
22
+
23
+ <template>
24
+ <NormalDataLayout id="XCellListView" title="工作计划">
25
+ <template #layout_content>
26
+ <XCellList
27
+ :config-name="configName"
28
+ :id-key="idKey"
29
+ @to-detail="toDetail"
30
+ />
31
+ </template>
32
+ </NormalDataLayout>
33
+ </template>
34
+
35
+ <style scoped lang="less">
36
+ </style>