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,152 @@
1
+ // https://github.com/pengzhanbo/vite-plugin-mock-dev-server
2
+ import { defineMock } from 'vite-plugin-mock-dev-server'
3
+
4
+ export default defineMock([{
5
+ url: '/rs/logic/getLogin',
6
+ delay: 300,
7
+ body: () => {
8
+ return {
9
+ jwt: '60436',
10
+ states: '登陆成功',
11
+ }
12
+ },
13
+ }, {
14
+ url: '/af-auth/login',
15
+ delay: 300,
16
+ body: () => {
17
+ return {
18
+ code: 200,
19
+ error: false,
20
+ success: true,
21
+ msg: null,
22
+ data: {
23
+ access_token: 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2tleSI6IjFjZWQ4YTFmLWQ0NTctNDkxYi1iNDUzLTZiNTkyZWVlMWEyNSIsImZfdXNlcm5hbWUiOiJhZG1pbjIiLCJpZCI6MTIyMTM4fQ.AvIlpXKyf2wJ1acjpiorSHsSaKoCwx4bgPFkVk-qN7iZFFxldEC2qi9IKhu-5Xgz_WAf8VjFdaUWZlvVtefIDA',
24
+ expires_in: 720,
25
+ resources: {
26
+ code: 200,
27
+ data: {
28
+ accesstime: '1706695089844',
29
+ deleted: 'false',
30
+ depids: '45500',
31
+ deps: '滨河营业厅',
32
+ deptype: '营业厅',
33
+ dir: 'standard_windows',
34
+ ename: 'admin2',
35
+ entitytype: 't_user',
36
+ f_age: '',
37
+ f_create_date: '2022-11-22 11:50:52',
38
+ f_department_name: '滨河营业厅',
39
+ f_description: '',
40
+ f_dir: 'standard_windows',
41
+ f_extend1: 'null',
42
+ f_extend2: 'null',
43
+ f_icon: 'tree_user',
44
+ f_idnumber: '',
45
+ f_last_modification_time: '2023-07-03 11:39:40',
46
+ f_ldap_version: 5154,
47
+ f_mac_adress: 'null',
48
+ f_old_userid: 'null',
49
+ f_role_name: '安检员 客服中心管理员 营业员 收费员 客服中心管理员(气价设置) 呼叫员 乌达区派单员 测试营业员 海勃湾区派单员 安检管理员 维修员 系统管理 管理员 ',
50
+ f_sex: '男',
51
+ f_show_department_name: 'null',
52
+ f_show_rolestr: 'null',
53
+ f_update_date: '2024-01-16 15:00:11',
54
+ f_user_macip: 'null',
55
+ f_user_telephone: '',
56
+ forceoutstate: '1',
57
+ fullids: '37710.45500.122138.',
58
+ fullnames: ' 安康逸华天然气有限公司.滨河营业厅.管理员',
59
+ haslicense: 'false',
60
+ id: '122138',
61
+ imgid: 'null',
62
+ initpassword: '000000',
63
+ login_address: 'XX XX',
64
+ logindate: '2024-02-01 10:41:22',
65
+ loginid: '15',
66
+ loginip: '61.150.12.251',
67
+ loginnum: 1,
68
+ loginnumber: 'null',
69
+ name: '管理员',
70
+ number: '',
71
+ orgid: '37710',
72
+ orgs: ' 安康逸华天然气有限公司',
73
+ parentid: '45500',
74
+ parentname: '滨河营业厅',
75
+ position: '18',
76
+ qrcode: '/rs/user/getQRcode?QRCODE=1d91-1669088967031-19905',
77
+ resourcetype: 'user',
78
+ roles: '63342,202099,185540,190376,201979,226308,244916,63336,276279,169595,63132,63192,278593,278597',
79
+ rolesnames: '系统管理员,维修员,派单员,维修员,派单员,管理员,需要定位人员,用户管理员,班组长 ,安检员,安检员,抄表员,维修员,派单员',
80
+ rolestr: '系统管理员,维修员,派单员,维修员,派单员,管理员,需要定位人员,用户管理员,班组长 ,安检员,安检员,抄表员,维修员,派单员',
81
+ selfid: '122139',
82
+ state: '在职',
83
+ tablename: 't_user',
84
+ templatename: 'useredit',
85
+ token: '122138',
86
+ ticket: null,
87
+ url: null,
88
+ userid: '31f7-1631780331801-89562',
89
+ function: [],
90
+ },
91
+ msg: '操作成功',
92
+ },
93
+ },
94
+ }
95
+ },
96
+ }, {
97
+ url: '/rs/logic/getLogin/智慧燃气',
98
+ delay: 300,
99
+ body: () => {
100
+ return {
101
+ accesstime: '1706694963867',
102
+ deleted: 'false',
103
+ depids: '108646',
104
+ deps: '客户服务热线班组',
105
+ deptype: '部门',
106
+ dir: 'tctrq',
107
+ ename: 'cs',
108
+ entitytype: 't_user',
109
+ f_create_date: null,
110
+ f_department_name: '客户服务热线班组',
111
+ f_icon: 'tree_user',
112
+ f_mac_adress: null,
113
+ f_old_userid: null,
114
+ f_role_name: '系统管理员 维修员 派单员 维修员 派单员 管理员 需要定位人员 用户管理员 班组长 安检员 安检员 抄表员 维修员 派单员 ',
115
+ f_sex: '男',
116
+ f_update_date: '2023-05-31 14:12:16',
117
+ f_user_macip: null,
118
+ forceoutstate: '0',
119
+ fullids: '46997.108646.60436.',
120
+ fullnames: '铜川市天然气.客户服务热线班组.测试',
121
+ haslicense: 'true',
122
+ id: '60436',
123
+ imgid: null,
124
+ initpassword: '1',
125
+ logindate: '09 27 2022 10:11AM',
126
+ loginid: '15',
127
+ loginip: '192.168.17.106',
128
+ loginnum: '0',
129
+ loginnumber: null,
130
+ name: '测试',
131
+ number: '1007',
132
+ orgid: '46997',
133
+ orgs: '铜川市天然气',
134
+ parentid: '108646',
135
+ parentname: '客户服务热线班组',
136
+ position: '2',
137
+ qrcode: '/rs/user/getQRcode?QRCODE=31f7-1631780331801-89562',
138
+ resourcetype: 'user',
139
+ roles: '63342,202099,185540,190376,201979,226308,244916,63336,276279,169595,63132,63192,278593,278597',
140
+ rolesnames: '系统管理员,维修员,派单员,维修员,派单员,管理员,需要定位人员,用户管理员,班组长 ,安检员,安检员,抄表员,维修员,派单员',
141
+ rolestr: '系统管理员,维修员,派单员,维修员,派单员,管理员,需要定位人员,用户管理员,班组长 ,安检员,安检员,抄表员,维修员,派单员',
142
+ selfid: '60437',
143
+ state: '在职',
144
+ tablename: 't_user',
145
+ templatename: 'useredit',
146
+ ticket: null,
147
+ url: null,
148
+ userid: '31f7-1631780331801-89562',
149
+ functions: [],
150
+ }
151
+ },
152
+ }])
package/netlify.toml ADDED
@@ -0,0 +1,12 @@
1
+ [build]
2
+ base = "/"
3
+ publish = "dist"
4
+ command = "pnpm run build"
5
+
6
+ [build.environment]
7
+ NODE_VERSION = "18"
8
+
9
+ [[redirects]]
10
+ from = "/*"
11
+ to = "/index.html"
12
+ status = 200
package/package.json ADDED
@@ -0,0 +1,107 @@
1
+ {
2
+ "name": "af-mobile-client-vue3",
3
+ "type": "module",
4
+ "version": "1.0.54",
5
+ "description": "Vue + Vite component lib",
6
+ "license": "MIT",
7
+ "engines": {
8
+ "node": ">=18.12.0",
9
+ "pnpm": ">=8.15.0"
10
+ },
11
+ "scripts": {
12
+ "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
13
+ "build": "vue-tsc --noEmit && vite build",
14
+ "build:dev": "vue-tsc --noEmit && vite build --mode=development",
15
+ "preview": "vite preview",
16
+ "lint": "eslint . && vue-tsc --noEmit",
17
+ "lint:fix": "eslint . --fix",
18
+ "test": "vitest",
19
+ "release": "bumpp --commit --push --tag"
20
+ },
21
+ "dependencies": {
22
+ "@micro-zoe/micro-app": "1.0.0-rc.4",
23
+ "@unhead/vue": "^1.8.11",
24
+ "@vant/touch-emulator": "^1.4.0",
25
+ "@vant/use": "^1.6.0",
26
+ "@vueuse/core": "^10.9.0",
27
+ "animate.css": "^4.1.1",
28
+ "axios": "^1.6.7",
29
+ "crypto-js": "^4.2.0",
30
+ "echarts": "^5.5.0",
31
+ "lodash-es": "^4.17.21",
32
+ "nprogress": "^0.2.0",
33
+ "pinia": "^2.1.7",
34
+ "pinia-plugin-persistedstate": "^3.2.1",
35
+ "qs": "^6.11.2",
36
+ "resize-detector": "^0.3.0",
37
+ "store": "^2.0.12",
38
+ "vant": "^4.9.0",
39
+ "vconsole": "^3.15.1",
40
+ "vue": "^3.4.21",
41
+ "vue-router": "^4.3.0",
42
+ "@vant/area-data": "^1.5.1"
43
+ },
44
+ "devDependencies": {
45
+ "@antfu/eslint-config": "2.8.0",
46
+ "@types/crypto-js": "^4.2.2",
47
+ "@types/lodash-es": "^4.17.12",
48
+ "@types/node": "^20.11.25",
49
+ "@types/nprogress": "^0.2.3",
50
+ "@types/store": "^2.0.5",
51
+ "@unocss/eslint-plugin": "^0.58.5",
52
+ "@unocss/preset-rem-to-px": "^0.58.5",
53
+ "@vitejs/plugin-legacy": "^5.3.1",
54
+ "@vitejs/plugin-vue": "^5.0.4",
55
+ "autoprefixer": "^10.4.18",
56
+ "bumpp": "^9.4.0",
57
+ "commitizen": "^4.3.0",
58
+ "consola": "^3.2.3",
59
+ "cross-env": "^7.0.3",
60
+ "cz-emoji-chinese": "^0.3.1",
61
+ "eslint": "npm:eslint-ts-patch@8.57.0-0",
62
+ "eslint-ts-patch": "8.57.0-0",
63
+ "husky": "^9.0.11",
64
+ "less": "^4.2.0",
65
+ "mockjs": "^1.1.0",
66
+ "postcss-mobile-forever": "^4.1.1",
67
+ "rollup": "^4.12.1",
68
+ "terser": "^5.29.1",
69
+ "typescript": "^5.4.2",
70
+ "unocss": "^0.58.5",
71
+ "unplugin-auto-import": "^0.17.5",
72
+ "unplugin-vue-components": "^0.26.0",
73
+ "unplugin-vue-router": "^0.8.4",
74
+ "vite": "^5.1.5",
75
+ "vite-plugin-compression": "^0.5.1",
76
+ "vite-plugin-mock-dev-server": "^1.4.7",
77
+ "vite-plugin-pwa": "^0.19.2",
78
+ "vite-plugin-sitemap": "^0.5.3",
79
+ "vite-plugin-svg-icons": "^2.0.1",
80
+ "vite-plugin-vconsole": "^2.1.1",
81
+ "vite-plugin-vue-layouts": "^0.11.0",
82
+ "vitest": "^1.3.1",
83
+ "vue-tsc": "^2.0.6"
84
+ },
85
+ "pnpm": {
86
+ "peerDependencyRules": {
87
+ "ignoreMissing": [
88
+ "postcss",
89
+ "esbuild"
90
+ ],
91
+ "allowedVersions": {
92
+ "rollup": "^4.x"
93
+ }
94
+ }
95
+ },
96
+ "config": {
97
+ "commitizen": {
98
+ "path": "./node_modules/cz-emoji-chinese"
99
+ },
100
+ "cz-emoji-chinese": {
101
+ "skipQuestions": [
102
+ "body",
103
+ "scope"
104
+ ]
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,4 @@
1
+ <svg t="1709866807903" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4913" width="32" height="32">
2
+ <path d="M512 598.528a111.232 111.232 0 0 0-111.232 111.2064V870.4h222.464v-160.6656c0-61.44-49.792-111.232-111.232-111.232z m0 58.0608c-30.72 0-55.6032 24.9088-55.6032 55.6288v105.0368h111.2064v-105.0368c0-30.72-24.8832-55.6288-55.6032-55.6288z" fill="#FB4D31" p-id="4914"></path>
3
+ <path d="M542.08 270.208l45.2608-78.5408a24.5248 24.5248 0 0 0 0-25.6A26.4448 26.4448 0 0 0 564.1472 153.6a26.3424 26.3424 0 0 0-22.5792 13.44L512 217.6256l-29.5424-50.5344c-4.5824-8.192-13.184-13.312-22.5536-13.4912a26.4448 26.4448 0 0 0-23.2448 12.4928 24.5248 24.5248 0 0 0 0 25.6l45.2352 78.5152L156.928 832.768a24.4736 24.4736 0 0 0 0.3328 25.088c4.8384 7.8336 13.3888 12.544 22.5792 12.5184h664.3456c9.3184 0 17.92-4.7616 22.6304-12.4672a24.4736 24.4736 0 0 0 0.3072-25.088l-325.0176-562.688v0.0512zM619.52 816.64h-33.3568c-12.3648 0-9.6768 0.1024-65.0496 0H512c-55.3728 0.1024-24.704 0-61.7984 0H225.28L512 322.1248 798.72 816.64h-179.2z" fill="#ffffff" p-id="4915"></path>
4
+ </svg>
Binary file
@@ -0,0 +1,4 @@
1
+ <svg t="1709866807903" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4913" width="32" height="32">
2
+ <path d="M512 598.528a111.232 111.232 0 0 0-111.232 111.2064V870.4h222.464v-160.6656c0-61.44-49.792-111.232-111.232-111.232z m0 58.0608c-30.72 0-55.6032 24.9088-55.6032 55.6288v105.0368h111.2064v-105.0368c0-30.72-24.8832-55.6288-55.6032-55.6288z" fill="#FB4D31" p-id="4914"></path>
3
+ <path d="M542.08 270.208l45.2608-78.5408a24.5248 24.5248 0 0 0 0-25.6A26.4448 26.4448 0 0 0 564.1472 153.6a26.3424 26.3424 0 0 0-22.5792 13.44L512 217.6256l-29.5424-50.5344c-4.5824-8.192-13.184-13.312-22.5536-13.4912a26.4448 26.4448 0 0 0-23.2448 12.4928 24.5248 24.5248 0 0 0 0 25.6l45.2352 78.5152L156.928 832.768a24.4736 24.4736 0 0 0 0.3328 25.088c4.8384 7.8336 13.3888 12.544 22.5792 12.5184h664.3456c9.3184 0 17.92-4.7616 22.6304-12.4672a24.4736 24.4736 0 0 0 0.3072-25.088l-325.0176-562.688v0.0512zM619.52 816.64h-33.3568c-12.3648 0-9.6768 0.1024-65.0496 0H512c-55.3728 0.1024-24.704 0-61.7984 0H225.28L512 322.1248 798.72 816.64h-179.2z" fill="#000000" p-id="4915"></path>
4
+ </svg>
Binary file
Binary file
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+ <metadata>
8
+ Created by potrace 1.14, written by Peter Selinger 2001-2017
9
+ </metadata>
10
+ <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
11
+ fill="#000000" stroke="none">
12
+ <path d="M2232 4334 c-45 -23 -67 -67 -63 -130 0 -11 55 -113 121 -227 l120
13
+ -207 -186 -322 c-103 -178 -229 -397 -282 -488 -53 -91 -110 -190 -127 -220
14
+ -17 -30 -168 -291 -335 -580 -167 -289 -310 -536 -317 -550 -8 -14 -25 -43
15
+ -38 -65 -13 -22 -32 -56 -43 -75 -19 -35 -203 -354 -269 -465 -63 -106 -53
16
+ -178 30 -222 29 -15 171 -16 1717 -16 1855 0 1719 -5 1769 59 37 47 28 87 -50
17
+ 224 -39 69 -80 141 -91 160 -26 45 -236 409 -465 805 -99 171 -191 330 -205
18
+ 355 -14 25 -76 133 -138 240 -96 165 -210 363 -280 485 -10 17 -93 161 -185
19
+ 320 -92 160 -176 305 -186 323 l-19 32 109 188 c140 242 133 229 133 273 -1
20
+ 69 -58 119 -136 119 -58 0 -88 -30 -172 -174 -43 -75 -82 -136 -85 -136 -4 0
21
+ -13 12 -20 28 -46 90 -146 246 -166 259 -35 23 -102 27 -141 7z m388 -926 c30
22
+ -51 64 -111 76 -133 12 -22 68 -119 124 -215 56 -96 112 -193 125 -215 12 -22
23
+ 55 -96 95 -165 40 -69 91 -156 113 -195 22 -38 126 -218 232 -400 105 -181
24
+ 203 -350 217 -375 14 -25 74 -128 133 -230 60 -102 116 -198 125 -215 62 -107
25
+ 123 -211 130 -220 6 -7 -140 -10 -433 -9 l-441 1 -1 314 c-1 273 -4 321 -19
26
+ 369 -46 138 -98 215 -202 292 -63 47 -139 87 -171 89 -2 1 -25 6 -51 14 -95
27
+ 25 -271 2 -362 -47 -153 -82 -263 -228 -296 -390 -4 -18 -7 -170 -8 -337 l-1
28
+ -304 -442 -1 c-293 -1 -439 2 -433 9 7 9 77 127 135 230 13 22 128 220 255
29
+ 440 128 220 241 416 252 435 74 129 221 382 274 473 35 59 64 109 64 111 0 3
30
+ 22 40 49 84 27 44 50 84 52 89 10 26 344 593 349 593 3 0 30 -42 60 -92z"/>
31
+ </g>
32
+ </svg>
@@ -0,0 +1,19 @@
1
+ import fs from 'node:fs'
2
+
3
+ // import process from 'node:process'
4
+
5
+ const msg = fs.readFileSync('.git/COMMIT_EDITMSG', 'utf-8').trim()
6
+
7
+ const commitRE = /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip|release)(\(.+\))?: .{1,50}/
8
+ // const mergeRe = /^(Merge pull request|Merge branch)/
9
+
10
+ if (!commitRE.test(msg)) {
11
+ // if (!mergeRe.test(msg)) {
12
+ // console.log('git commit unpass')
13
+ // console.error('git commit error, needs title(scope): desc')
14
+ // process.exit(1)
15
+ // }
16
+ }
17
+ else {
18
+ console.log('git commit pass')
19
+ }
package/src/App.vue ADDED
@@ -0,0 +1,43 @@
1
+ <script setup lang="ts">
2
+ import type { ConfigProviderThemeVars } from 'vant'
3
+ import { useHead } from '@unhead/vue'
4
+ import { reactive } from 'vue'
5
+ import {
6
+ ConfigProvider as VanConfigProvider,
7
+ } from 'vant/es'
8
+
9
+ useHead({
10
+ title: '智慧燃气',
11
+ meta: [
12
+ {
13
+ name: 'description',
14
+ content: '智慧燃气手机端',
15
+ },
16
+ {
17
+ name: 'theme-color',
18
+ content: () => '#ffffff',
19
+ },
20
+ ],
21
+ })
22
+ const themeVars: ConfigProviderThemeVars = reactive({
23
+ baseFont: 'PingFangSC-Regular-woff2, serif',
24
+ })
25
+ </script>
26
+
27
+ <template>
28
+ <VanConfigProvider theme="light" :theme-vars="themeVars" theme-vars-scope="global">
29
+ <router-view v-slot="{ Component }">
30
+ <component :is="Component" />
31
+ </router-view>
32
+ </VanConfigProvider>
33
+ </template>
34
+
35
+ <style>
36
+ @import "./font-style/font.css";
37
+ input[type="password"]::-ms-reveal{
38
+ display: none;
39
+ }
40
+ input[type="password"]::-ms-clear{
41
+ display: none;
42
+ }
43
+ </style>
@@ -0,0 +1,30 @@
1
+ import { http } from '@af-mobile-client-vue3/utils/http'
2
+
3
+ interface ListResult {
4
+ code: number
5
+ message: string
6
+ list: Array<any>
7
+ }
8
+
9
+ export function getListApi(params?: object): Promise<ListResult> {
10
+ return http.request({
11
+ url: '/list/get',
12
+ method: 'get',
13
+ params,
14
+ })
15
+ }
16
+
17
+ export function getListApiError(data?: object): Promise<ListResult> {
18
+ return http.request({
19
+ url: '/list/error',
20
+ method: 'post',
21
+ data,
22
+ })
23
+ }
24
+
25
+ export async function queryProse(): Promise<any> {
26
+ return http.request({
27
+ url: '/project/prose',
28
+ method: 'post',
29
+ })
30
+ }
@@ -0,0 +1,40 @@
1
+ import { http } from '@af-mobile-client-vue3/utils/http'
2
+
3
+ import { loginApi } from '@af-mobile-client-vue3/services/api/Login'
4
+ import { get, post } from '@af-mobile-client-vue3/services/restTools'
5
+
6
+ export interface BasicResponseModel<T = any> {
7
+ code: number
8
+ msg: string
9
+ data: T
10
+ }
11
+
12
+ export function login(data: any) {
13
+ return post(
14
+ loginApi.Login,
15
+ data,
16
+ )
17
+ }
18
+
19
+ export function OALogin(data: any) {
20
+ return get(`/af-system/user/${data.username}/${data.password}/智慧OA`)
21
+ }
22
+
23
+ /**
24
+ * @description: 获取用户信息
25
+ */
26
+ export function getUserInfo() {
27
+ return get(
28
+ '/getUserInfo',
29
+ )
30
+ }
31
+
32
+ /**
33
+ * @description: 用户登出
34
+ */
35
+ export function doLogout() {
36
+ return http.request({
37
+ url: loginApi.Logout,
38
+ method: 'DELETE',
39
+ })
40
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,20 @@
1
+ <svg width="444.233154" height="203.122437" viewBox="0 0 444.233 203.122" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <desc>
3
+ Created with Pixso.
4
+ </desc>
5
+ <defs>
6
+ <filter id="filter_37_876_dd" x="0.529297" y="0.516296" width="443.178467" height="202.089844" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
7
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
8
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
9
+ <feOffset dx="0" dy="-28"/>
10
+ <feGaussianBlur stdDeviation="11.3333"/>
11
+ <feComposite in2="hardAlpha" operator="out" k2="-1" k3="1"/>
12
+ <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.039 0"/>
13
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect_dropShadow_1"/>
14
+ <feBlend mode="normal" in="SourceGraphic" in2="effect_dropShadow_1" result="shape"/>
15
+ </filter>
16
+ </defs>
17
+ <g filter="url(#filter_37_876_dd)">
18
+ <path id="Path 2" d="M34.6331 62.5163C159.633 62.5163 156.204 115.98 222.133 115.98C288.062 115.98 290.281 62.5163 409.633 62.5163C409.801 62.5163 409.633 196.606 409.633 196.606L34.6331 196.606C34.6331 196.606 34.3997 62.5163 34.6331 62.5163Z" fill-rule="evenodd" fill="#FFFFFF"/>
19
+ </g>
20
+ </svg>
@@ -0,0 +1,20 @@
1
+ <svg width="164.000000" height="164.000000" viewBox="0 0 164 164" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <desc>
3
+ Created with Pixso.
4
+ </desc>
5
+ <defs>
6
+ <filter id="filter_68_88_dd" x="0.000000" y="0.000000" width="164.000000" height="164.000000" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
7
+ <feFlood flood-opacity="0" result="BackgroundImageFix"/>
8
+ <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
9
+ <feOffset dx="0" dy="16"/>
10
+ <feGaussianBlur stdDeviation="10.6667"/>
11
+ <feComposite in2="hardAlpha" operator="out" k2="-1" k3="1"/>
12
+ <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.09 0"/>
13
+ <feBlend mode="normal" in2="BackgroundImageFix" result="effect_dropShadow_1"/>
14
+ <feBlend mode="normal" in="SourceGraphic" in2="effect_dropShadow_1" result="shape"/>
15
+ </filter>
16
+ </defs>
17
+ <g filter="url(#filter_68_88_dd)">
18
+ <rect id="LOGO背景" x="32.000000" y="16.000000" rx="23.039997" width="100.000000" height="100.000000" fill="#FFFFFF"/>
19
+ </g>
20
+ </svg>
@@ -0,0 +1,32 @@
1
+ import { getConfigByName } from '@af-mobile-client-vue3/services/api/common'
2
+ import useSettingStore, { type WebConfig } from '@af-mobile-client-vue3/stores/modules/setting'
3
+ import { createStorage } from '@af-mobile-client-vue3/utils/Storage'
4
+ import { APP_WEB_CONFIG_KEY } from '@af-mobile-client-vue3/stores/mutation-type'
5
+ import { loadGuards, loadRoutes } from '@af-mobile-client-vue3/utils/routerUtil'
6
+ import guards from '@af-mobile-client-vue3/router/guards'
7
+ import type { Router } from 'vue-router'
8
+
9
+ type GuardFunction = (to: any, from: any, next?: any) => void
10
+ interface Guards {
11
+ beforeEach?: GuardFunction[]
12
+ afterEach?: GuardFunction[]
13
+ }
14
+
15
+ const Storage = createStorage({ storage: localStorage })
16
+
17
+ async function bootstrap(router: Router, customGuard: Guards = {}) {
18
+ // 获取琉璃配置中心的 webConfig 配置并保存
19
+ const store = useSettingStore()
20
+ await getConfigByName('webMobileConfig', (res) => {
21
+ Storage.set(APP_WEB_CONFIG_KEY, res)
22
+ const setting: WebConfig = res.setting
23
+ if (setting)
24
+ store.setSetting(setting)
25
+ })
26
+ // 加载路由
27
+ loadRoutes()
28
+ // 加载路由守卫
29
+ loadGuards({ ...guards, ...customGuard }, router)
30
+ }
31
+
32
+ export default bootstrap
@@ -0,0 +1,59 @@
1
+ <script setup lang="ts">
2
+ import { useRoute } from 'vue-router'
3
+ import { ref } from 'vue'
4
+ import { getAppStatus } from '@micro-zoe/micro-app'
5
+ import router from '@af-mobile-client-vue3/router'
6
+
7
+ const origin = window.location.origin
8
+
9
+ const route = useRoute()
10
+
11
+ const href = `${origin}/${route.params.module}`
12
+
13
+ const state = ref('beforeLoad')
14
+
15
+ function created() {
16
+ const appStatus = getAppStatus(route.params.module as string)
17
+ console.warn('created')
18
+ console.warn(appStatus)
19
+ // afterhidden代表已经通过keep-alive缓存了,直接显示
20
+ if (appStatus === 'afterhidden')
21
+ state.value = 'ready'
22
+ else if (appStatus === 'unmount' || appStatus === 'error')
23
+ router.replace('/404')
24
+ }
25
+
26
+ function error() {
27
+ router.replace('/404')
28
+ console.warn('error')
29
+ state.value = 'error'
30
+ }
31
+
32
+ function mounted() {
33
+ console.warn('mounted')
34
+ state.value = 'ready'
35
+ }
36
+ </script>
37
+
38
+ <template>
39
+ <div class="app-wrapper">
40
+ <div v-show="state === 'beforeLoad'">
41
+ <BeautifulLoading />
42
+ </div>
43
+ <div v-show="state === 'ready'">
44
+ <micro-app
45
+ :name="route.params.module" :url="href" iframe keep-alive @created="created"
46
+ @mounted="mounted"
47
+ @error="error"
48
+ />
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <style lang="less" scoped>
54
+ .app-wrapper {
55
+ position: relative;
56
+ height: 100%;
57
+ width: 100%;
58
+ }
59
+ </style>