af-mobile-client-vue3 1.2.59 → 1.3.2-2.1

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 (149) hide show
  1. package/.editorconfig +5 -34
  2. package/.env +1 -1
  3. package/.env.development +0 -3
  4. package/.env.production +1 -7
  5. package/CLAUDE.md +5 -0
  6. package/README.md +2 -1
  7. package/build/vite/index.ts +2 -12
  8. package/build/vite/optimize.ts +2 -2
  9. package/compress.js +36 -0
  10. package/package.json +37 -37
  11. package/postcss.config.ts +1 -1
  12. package/src/App.vue +4 -6
  13. package/src/assets/img/banner/appraise-banner-1.png +0 -0
  14. package/src/assets/img/banner/appraise-banner-2.png +0 -0
  15. package/src/components/core/BeautifulLoading/index.vue +1 -2
  16. package/src/components/core/ImageUploader/index.vue +3 -2
  17. package/src/components/core/NavBar/index.vue +24 -14
  18. package/src/components/core/Tabbar/index.vue +5 -3
  19. package/src/components/core/XGridDropOption/index.vue +7 -9
  20. package/src/components/core/XMultiSelect/index.vue +1 -1
  21. package/src/components/data/CardContainer/CardContainer.vue +118 -0
  22. package/src/components/data/CardContainer/CardHeader.vue +99 -0
  23. package/src/components/data/InfoDisplay/index.vue +132 -0
  24. package/src/components/data/UserDetail/api.ts +24 -0
  25. package/src/components/data/UserDetail/index.vue +620 -0
  26. package/src/components/data/UserDetail/recordEntries.ts +159 -0
  27. package/src/components/data/UserDetail/types.ts +26 -0
  28. package/src/components/data/XBadge/index.vue +2 -2
  29. package/src/components/data/XCellList/index.vue +76 -30
  30. package/src/components/data/XForm/index.vue +1 -1
  31. package/src/components/data/XFormGroup/doc/FormGroupDemo.vue +4 -4
  32. package/src/components/data/XFormGroup/doc/README.md +33 -20
  33. package/src/components/data/XFormGroup/index.vue +51 -35
  34. package/src/components/data/XFormItem/index.vue +13 -33
  35. package/src/components/data/XOlMap/README.md +61 -61
  36. package/src/components/data/XOlMap/XLocationPicker/index.vue +2 -1
  37. package/src/components/data/XReportForm/XReportFormJsonRender.vue +22 -22
  38. package/src/components/data/XReportForm/index.vue +23 -14
  39. package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +1 -2
  40. package/src/components/data/XReportGrid/XAddReport/index.md +17 -16
  41. package/src/components/data/XReportGrid/XReport.vue +3 -3
  42. package/src/components/data/XReportGrid/XReportDesign.vue +13 -13
  43. package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +1 -1
  44. package/src/components/data/XReportGrid/XReportJsonRender.vue +11 -11
  45. package/src/components/data/XReportGrid/XReportTrGroup.vue +3 -3
  46. package/src/components/data/XReportGrid/index.md +14 -10
  47. package/src/components/data/XSignature/index.vue +1 -2
  48. package/src/components/layout/NormalDataLayout/index.vue +2 -3
  49. package/src/config/routes.ts +6 -2
  50. package/src/constants/index.ts +2 -0
  51. package/src/font-style/font.css +1 -1
  52. package/src/hooks/useBoolean.ts +26 -0
  53. package/src/hooks/useLoading.ts +16 -0
  54. package/src/locales/en-US.json +52 -28
  55. package/src/locales/zh-CN.json +57 -33
  56. package/src/main.ts +0 -2
  57. package/src/plugins/collectIcons.ts +10 -0
  58. package/src/router/README.md +1 -1
  59. package/src/router/guards.ts +1 -1
  60. package/src/router/index.ts +1 -1
  61. package/src/router/routes.ts +176 -6
  62. package/src/router/types.ts +0 -2
  63. package/src/services/api/user.ts +17 -0
  64. package/src/stores/modules/setting.ts +2 -1
  65. package/src/styles/var.less +9 -0
  66. package/src/types/vue-router.d.ts +0 -2
  67. package/src/utils/mobileUtil.ts +2 -2
  68. package/src/utils/queryFormDefaultRangePicker.ts +57 -57
  69. package/src/utils/set-page-title.ts +3 -5
  70. package/src/views/common/LoadError.vue +1 -2
  71. package/src/views/common/NotFound.vue +2 -3
  72. package/src/views/component/IconifyView/index.vue +0 -3
  73. package/src/views/component/UserDetailView/UserDetailPage.vue +77 -0
  74. package/src/views/component/UserDetailView/index.vue +234 -0
  75. package/src/views/component/XCellListView/index.vue +24 -73
  76. package/src/views/component/XFormGroupView/index.vue +7 -11
  77. package/src/views/component/XFormView/index.vue +2 -2
  78. package/src/views/component/XOlMapView/testData.ts +1 -1
  79. package/src/views/component/index.vue +4 -0
  80. package/src/views/component/menu.vue +1 -1
  81. package/src/views/user/login/ForgetPasswordForm.vue +1 -1
  82. package/src/views/user/login/LoginForm.vue +4 -3
  83. package/src/views/user/login/LoginWave.vue +1 -1
  84. package/src/views/user/my/comm/ModifyPassword.vue +346 -0
  85. package/src/views/user/my/index.vue +440 -183
  86. package/src/views/user/register/index.vue +952 -0
  87. package/src/views/userRecords/AbnormalAlarmRecords.vue +21 -0
  88. package/src/views/userRecords/CardReplacementRecords.vue +21 -0
  89. package/src/views/userRecords/ChangeRecords.vue +19 -0
  90. package/src/views/userRecords/CommandViewRecords.vue +20 -0
  91. package/src/views/userRecords/GasCompensationRecords.vue +20 -0
  92. package/src/views/userRecords/InstrumentCollectionRecords.vue +21 -0
  93. package/src/views/userRecords/MeterRecords.vue +20 -0
  94. package/src/views/userRecords/OperateRecords.vue +51 -0
  95. package/src/views/userRecords/OtherChargeRecords.vue +19 -0
  96. package/src/views/userRecords/PaymentRecords.vue +28 -0
  97. package/src/views/userRecords/PriceAdjustmentRecords.vue +19 -0
  98. package/src/views/userRecords/ReplacementRecords.vue +19 -0
  99. package/src/views/userRecords/SafetyRecords.vue +19 -0
  100. package/src/views/userRecords/TransactionRecords.vue +21 -0
  101. package/src/views/userRecords/TransferRecords.vue +19 -0
  102. package/src/views/userRecords/operateRecordDetail/index.vue +316 -0
  103. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AddUserDetail.vue +124 -0
  104. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AdvanceDeliveryDetail.vue +88 -0
  105. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsCancelDetail.vue +205 -0
  106. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/AutoAccountsDetail.vue +192 -0
  107. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankDkDetail.vue +192 -0
  108. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BankPayDetail.vue +192 -0
  109. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/BlacklistDetail.vue +153 -0
  110. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CancellationDetail.vue +101 -0
  111. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterCancelDetail.vue +127 -0
  112. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardMeterCenterDetail.vue +153 -0
  113. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/CardOverUserDetail.vue +153 -0
  114. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterCancelDetail.vue +166 -0
  115. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ChangeMeterDetail.vue +205 -0
  116. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/DisableManageDetail.vue +127 -0
  117. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/EnableManageDetail.vue +114 -0
  118. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FaZheChangeDetail.vue +124 -0
  119. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/FeeDeductionDetail.vue +153 -0
  120. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/GasPriceChangeDetail.vue +126 -0
  121. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/InputtorChangeDetail.vue +126 -0
  122. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterCancelDetail.vue +114 -0
  123. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotMeterCenterDetail.vue +127 -0
  124. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/IotOpenDetail.vue +88 -0
  125. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineCardDetail.vue +101 -0
  126. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterCancelDetail.vue +218 -0
  127. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/MachineMeterCenterDetail.vue +153 -0
  128. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OffGasAddGasDetail.vue +140 -0
  129. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeCancelDetail.vue +127 -0
  130. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OtherChargeDetail.vue +114 -0
  131. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/OverUserChangeDetail.vue +127 -0
  132. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReBillDetail.vue +127 -0
  133. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/RefundDetail.vue +114 -0
  134. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageCancelDetail.vue +127 -0
  135. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/ReplaceCardManageDetail.vue +114 -0
  136. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/SaleCardGasDetail.vue +140 -0
  137. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageCancelDetail.vue +152 -0
  138. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/TransferManageDetail.vue +178 -0
  139. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/UserChangeDetail.vue +123 -0
  140. package/src/views/userRecords/operateRecordDetail/operateRecordDetails/WechatPayDetail.vue +192 -0
  141. package/src/views/userRecords/types.ts +66 -0
  142. package/tsconfig.json +5 -8
  143. package/uno.config.ts +36 -1
  144. package/vite.config.ts +10 -3
  145. package/.env.envoiceShow +0 -7
  146. package/src/components/core/App/MicroAppView.vue +0 -59
  147. package/src/components/core/SvgIcon/index.vue +0 -61
  148. package/src/utils/local-storage.ts +0 -9
  149. package/src/views/component/XFormGroupView/xformgroup222.vue +0 -97
package/.editorconfig CHANGED
@@ -1,38 +1,9 @@
1
+ root=true
2
+
1
3
  [*]
2
4
  charset=utf-8
3
- end_of_line=lf
4
- insert_final_newline=false
5
- indent_style=space
6
- indent_size=2
7
-
8
- [{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
9
- indent_style=space
10
- indent_size=2
11
-
12
- [{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}]
13
- indent_style=space
14
- indent_size=2
15
-
16
- [{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
17
- indent_style=space
18
- indent_size=2
19
-
20
- [*.svg]
21
- indent_style=space
22
- indent_size=2
23
-
24
- [*.js.map]
25
- indent_style=space
26
- indent_size=2
27
-
28
- [*.less]
29
- indent_style=space
30
- indent_size=2
31
-
32
- [{*.vue,*.ts,*.tsx}]
33
- indent_style=space
34
- indent_size=2
35
-
36
- [{.analysis_options,*.yml,*.yaml}]
37
5
  indent_style=space
38
6
  indent_size=2
7
+ end_of_line=lf
8
+ insert_final_newline=true
9
+ trim_trailing_whitespace=true
package/.env CHANGED
@@ -1,7 +1,7 @@
1
1
  VITE_APP_PUBLIC_PATH=/vue-client-app
2
2
  VITE_APP_PREVIEW=true
3
3
  VITE_APP_API_BASE_URL=/api
4
- VITE_APP_OUT_DIR=dist
4
+ VITE_APP_OUT_DIR=dist_af-library-mobile-web
5
5
  VITE_APP_VCONSOLE=false
6
6
  # 自定义参数
7
7
  VITE_APP_WEB_CONFIG_KEY=admin.webconfig
package/.env.development CHANGED
@@ -1,4 +1 @@
1
1
  NODE_ENV=development
2
- VITE_APP_PUBLIC_PATH=/vue-client-app
3
- VITE_APP_PREVIEW=true
4
- VITE_APP_API_BASE_URL=/api
package/.env.production CHANGED
@@ -1,7 +1 @@
1
- VITE_APP_PUBLIC_PATH=/vue-client-app
2
- VITE_APP_PREVIEW=true
3
- VITE_APP_API_BASE_URL=/api
4
- VITE_APP_WEB_CONFIG_KEY=admin.webconfig
5
- VITE_APP_SYSTEM_NAME=af-system
6
- # 最低兼容性 V4(最新产品)V3(V3产品) OA(公司OA)
7
- VITE_APP_COMPATIBLE=V4
1
+ VITE_APP_PREVIEW=false
package/CLAUDE.md CHANGED
@@ -182,3 +182,8 @@ This is a main application for micro-frontend architecture:
182
182
  - **Vue TSC** for type checking
183
183
  - **Commitlint** for commit message standards
184
184
  - **Lint-staged** for pre-commit hooks
185
+
186
+ ## 注意事项
187
+
188
+ - 此项目作为组件库项目 所以没有开启自动引入 不能自动引入 vue 中的 ref/compute 等
189
+ - 此项目为了统一业务项目使用,所以 使用 @af-mobile-client-vue3/ 表示 src 而不是 @/
package/README.md CHANGED
@@ -13,6 +13,7 @@
13
13
  <p align="center">指南非常地详细,并非说明上手多么地复杂,只是更好地使用它做的说明而已</p>
14
14
 
15
15
  ## 需要注意的地方
16
+
16
17
  - 本项目作为微前端框架micro-app的主应用,虽然同样派生自example项目,但example项目主要用于子应用的快速建设,因此本项目在微前端接入代码方面和example表现不一致
17
18
 
18
19
  ## 特性
@@ -102,7 +103,7 @@ pnpm build
102
103
  支持现代浏览器
103
104
 
104
105
  | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
105
- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
106
+ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
106
107
  | not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
107
108
 
108
109
  ### 新增页面
@@ -1,4 +1,4 @@
1
- import path, { dirname, resolve } from 'node:path'
1
+ import { dirname, resolve } from 'node:path'
2
2
 
3
3
  import process from 'node:process'
4
4
  import { fileURLToPath } from 'node:url'
@@ -11,12 +11,10 @@ import viteCompression from 'vite-plugin-compression'
11
11
  import { mockDevServerPlugin } from 'vite-plugin-mock-dev-server'
12
12
  import { VitePWA } from 'vite-plugin-pwa'
13
13
  import Sitemap from 'vite-plugin-sitemap'
14
- import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
15
14
  import VueDevTools from 'vite-plugin-vue-devtools'
16
15
  import { createViteVConsole } from './vconsole'
17
16
 
18
17
  export function createVitePlugins(mode: string) {
19
- const root = process.cwd()
20
18
  const env = loadEnv(mode, process.cwd())
21
19
 
22
20
  return [
@@ -31,20 +29,12 @@ export function createVitePlugins(mode: string) {
31
29
 
32
30
  // https://github.com/jbaubree/vite-plugin-sitemap
33
31
  Sitemap({
34
- outDir: env.VITE_APP_OUT_DIR || 'dist',
32
+ outDir: `./dist/${env.VITE_APP_OUT_DIR}`,
35
33
  }),
36
34
 
37
35
  // https://github.com/pengzhanbo/vite-plugin-mock-dev-server
38
36
  mockDevServerPlugin(),
39
37
 
40
- // TODO 放到统一icons处理,移除该插件
41
- createSvgIconsPlugin({
42
- // 指定图标文件夹
43
- iconDirs: [path.resolve(root, 'src/icons/svg')],
44
- // 指定 symbolId 格式
45
- symbolId: 'icon-[dir]-[name]',
46
- }),
47
-
48
38
  // 生产环境 gzip 压缩资源
49
39
  viteCompression({
50
40
  algorithm: 'gzip',
@@ -20,10 +20,10 @@ const include = [
20
20
  'vant/es/notify/style/index',
21
21
  'vant/es/config-provider/style/index',
22
22
  'vant/es/nav-bar/style/index',
23
- 'vant/es/list/style/index',
24
- 'vant/es/text-ellipsis/style/index',
25
23
  'vant/es/tabbar/style/index',
26
24
  'vant/es/tabbar-item/style/index',
25
+ 'vant/es/list/style/index',
26
+ 'vant/es/text-ellipsis/style/index',
27
27
  ]
28
28
 
29
29
  const exclude = [
package/compress.js ADDED
@@ -0,0 +1,36 @@
1
+ import fs from 'node:fs'
2
+ import path from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
4
+ import * as tar from 'tar'
5
+
6
+ // 当前文件所在目录
7
+ const __filename = fileURLToPath(import.meta.url)
8
+ const __dirname = path.dirname(__filename)
9
+
10
+ // 压缩源目录名(即 build 后生成的目录名)
11
+ const outputName = `dist_af-library-mobile-web`
12
+
13
+ // 源目录路径
14
+ const cwd = path.join(__dirname, 'dist', outputName)
15
+
16
+ // 输出 tar.gz 文件路径
17
+ const outputPath = path.join(__dirname, 'dist', `${outputName}.tar.gz`)
18
+
19
+ if (!fs.existsSync(cwd)) {
20
+ console.error('❌ 目录不存在:', cwd)
21
+ // eslint-disable-next-line node/prefer-global/process
22
+ process.exit(1)
23
+ }
24
+
25
+ tar.c(
26
+ {
27
+ gzip: true,
28
+ file: outputPath,
29
+ cwd,
30
+ },
31
+ ['.'],
32
+ ).then(() => {
33
+ console.log(`✅ 压缩完成: ${outputPath}`)
34
+ }).catch((err) => {
35
+ console.error('❌ 压缩失败:', err)
36
+ })
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.2.59",
5
- "packageManager": "pnpm@10.12.3",
4
+ "version": "1.3.22.1",
5
+ "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
8
8
  "node": ">=20.19.0"
9
9
  },
10
10
  "scripts": {
11
11
  "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
12
- "build": "vue-tsc --noEmit && vite build",
13
- "build:dev": "vue-tsc --noEmit && vite build --mode=development",
12
+ "compress": "node ./compress.js",
13
+ "build:dev": "vue-tsc --noEmit && vite build --mode development && pnpm run compress",
14
+ "build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
14
15
  "preview": "vite preview",
15
- "lint": "eslint . && vue-tsc --noEmit",
16
+ "lint": "eslint .",
16
17
  "lint:fix": "eslint . --fix",
17
18
  "release": "bumpp --commit --push --tag",
18
19
  "typecheck": "vue-tsc --noEmit",
@@ -20,68 +21,69 @@
20
21
  "prepare": "simple-git-hooks"
21
22
  },
22
23
  "dependencies": {
23
- "@vant/area-data": "^2.0.0",
24
- "crypto-js": "^4.2.0",
25
- "dayjs": "^1.11.13",
26
- "ol": "^10.5.0",
27
- "vue3-hash-calendar": "^1.1.3",
28
24
  "@iconify/vue": "4.3.0",
29
- "@micro-zoe/micro-app": "1.0.0-rc.24",
30
- "@unhead/vue": "2.0.11",
25
+ "@micro-zoe/micro-app": "1.0.0-rc.26",
26
+ "@unhead/vue": "2.0.12",
27
+ "@vant/area-data": "^2.0.0",
31
28
  "@vant/touch-emulator": "^1.4.0",
32
29
  "@vant/use": "^1.6.0",
33
- "@vueuse/core": "^13.4.0",
30
+ "@vueuse/core": "^13.5.0",
34
31
  "axios": "^1.10.0",
32
+ "crypto-js": "^4.2.0",
33
+ "dayjs": "^1.11.13",
35
34
  "echarts": "^5.6.0",
36
35
  "lodash-es": "^4.17.21",
37
36
  "nprogress": "^0.2.0",
37
+ "ol": "^10.5.0",
38
38
  "pinia": "^3.0.3",
39
- "pinia-plugin-persistedstate": "^4.3.0",
39
+ "pinia-plugin-persistedstate": "^4.4.1",
40
40
  "resize-detector": "^0.3.0",
41
- "vant": "^4.9.20",
41
+ "vant": "^4.9.21",
42
42
  "vconsole": "^3.15.1",
43
43
  "vue": "^3.5.17",
44
- "vue-i18n": "^11.1.7",
45
- "vue-router": "^4.5.1"
44
+ "vue-i18n": "^11.1.10",
45
+ "vue-router": "^4.5.1",
46
+ "vue3-hash-calendar": "^1.1.3"
46
47
  },
47
48
  "devDependencies": {
48
- "vite-plugin-compression": "^0.5.1",
49
- "@iconify/json": "2.2.318",
50
- "@types/crypto-js": "^4.2.2",
51
- "@antfu/eslint-config": "4.16.1",
49
+ "@antfu/eslint-config": "4.17.0",
52
50
  "@commitlint/cli": "^19.8.1",
53
51
  "@commitlint/config-conventional": "^19.8.1",
54
52
  "@commitlint/types": "^19.8.1",
53
+ "@iconify/json": "2.2.318",
54
+ "@iconify/utils": "^2.3.0",
55
55
  "@intlify/unplugin-vue-i18n": "^6.0.8",
56
+ "@types/crypto-js": "^4.2.2",
56
57
  "@types/lodash-es": "^4.17.12",
57
- "@types/node": "^24.0.4",
58
+ "@types/node": "^24.0.14",
58
59
  "@types/nprogress": "^0.2.3",
59
- "@unocss/eslint-config": "66.2.3",
60
- "@vitejs/plugin-legacy": "^7.0.0",
60
+ "@unocss/eslint-config": "66.3.3",
61
+ "@vitejs/plugin-legacy": "^7.0.1",
61
62
  "@vitejs/plugin-vue": "^6.0.0",
62
63
  "autoprefixer": "^10.4.21",
63
64
  "bumpp": "^10.2.0",
64
65
  "consola": "^3.4.2",
65
66
  "cross-env": "^7.0.3",
66
- "eslint": "^9.29.0",
67
+ "eslint": "^9.31.0",
67
68
  "eslint-plugin-format": "^1.0.1",
68
- "less": "^4.3.0",
69
+ "less": "^4.4.0",
69
70
  "lint-staged": "^16.1.2",
70
71
  "mockjs": "^1.1.0",
71
72
  "postcss-mobile-forever": "^5.0.0",
72
- "rollup": "^4.44.0",
73
+ "rollup": "^4.45.1",
73
74
  "simple-git-hooks": "^2.13.0",
75
+ "tar": "^7.4.3",
74
76
  "terser": "^5.43.1",
75
77
  "typescript": "^5.8.3",
76
- "unocss": "66.2.3",
77
- "vite": "^7.0.0",
78
+ "unocss": "66.3.3",
79
+ "vite": "^7.0.5",
80
+ "vite-plugin-compression": "^0.5.1",
78
81
  "vite-plugin-mock-dev-server": "^1.9.1",
79
- "vite-plugin-pwa": "^1.0.0",
82
+ "vite-plugin-pwa": "^1.0.1",
80
83
  "vite-plugin-sitemap": "^0.8.2",
81
- "vite-plugin-svg-icons": "^2.0.1",
82
84
  "vite-plugin-vconsole": "^2.1.1",
83
85
  "vite-plugin-vue-devtools": "^7.7.7",
84
- "vue-tsc": "^2.2.10"
86
+ "vue-tsc": "^3.0.2"
85
87
  },
86
88
  "pnpm": {
87
89
  "allowedDeprecatedVersions": {
@@ -90,9 +92,7 @@
90
92
  "sourcemap-codec": "1.4.8"
91
93
  },
92
94
  "peerDependencyRules": {
93
- "allowedVersions": {
94
- "typescript": "5.8.3"
95
- }
95
+ "allowedVersions": {}
96
96
  },
97
97
  "onlyBuiltDependencies": [
98
98
  "core-js",
@@ -102,13 +102,13 @@
102
102
  ]
103
103
  },
104
104
  "resolutions": {
105
- "vite": "^7.0.0"
105
+ "vite": "^7.0.5"
106
106
  },
107
107
  "simple-git-hooks": {
108
108
  "pre-commit": "pnpm lint-staged",
109
109
  "commit-msg": "pnpm commitlint $1"
110
110
  },
111
111
  "lint-staged": {
112
- "*.{js,ts,vue}": "eslint --fix"
112
+ "*": "eslint --fix"
113
113
  }
114
114
  }
package/postcss.config.ts CHANGED
@@ -17,7 +17,7 @@ export default {
17
17
 
18
18
  // https://github.com/wswmsword/postcss-mobile-forever
19
19
  'postcss-mobile-forever': {
20
- appSelector: '#app',
20
+ appSelector: '#system-app',
21
21
  viewportWidth: 375,
22
22
  maxDisplayWidth: 800,
23
23
  border: true,
package/src/App.vue CHANGED
@@ -9,13 +9,14 @@ import {
9
9
  ConfigProvider as VanConfigProvider,
10
10
  } from 'vant/es'
11
11
  import { computed, reactive } from 'vue'
12
+ import { appDescription, appName } from './constants'
12
13
 
13
14
  useHead({
14
- title: '智慧燃气',
15
+ title: appName,
15
16
  meta: [
16
17
  {
17
18
  name: 'description',
18
- content: '智慧燃气手机端',
19
+ content: appDescription,
19
20
  },
20
21
  {
21
22
  name: 'theme-color',
@@ -52,7 +53,7 @@ const themeVars: ConfigProviderThemeVars = reactive({
52
53
  <router-view v-slot="{ Component }">
53
54
  <section class="app-wrapper">
54
55
  <keep-alive :include="keepAliveRouteNames">
55
- <component :is="Component" />
56
+ <component :is="Component" :key="$route.fullPath" />
56
57
  </keep-alive>
57
58
  </section>
58
59
  </router-view>
@@ -73,9 +74,6 @@ input[type='password']::-ms-clear {
73
74
  <style scoped>
74
75
  .app-wrapper {
75
76
  width: 100%;
76
- /**
77
- TODO 源框架问题:增加后动画无效
78
- */
79
77
  position: relative;
80
78
  }
81
79
  </style>
@@ -1,11 +1,10 @@
1
1
  <script setup>
2
- import SvgIcon from '@af-mobile-client-vue3/components/core/SvgIcon/index.vue'
3
2
  </script>
4
3
 
5
4
  <template>
6
5
  <div class="main">
7
6
  <div class="bird-container">
8
- <SvgIcon name="bird" class="bird" />
7
+ <div class="bird i-svg:bird" />
9
8
  </div>
10
9
  <div class="loading-text">
11
10
  加载中,请稍候...
@@ -14,6 +14,7 @@ const props = defineProps({
14
14
  authority: { default: 'user' },
15
15
  uploadMode: { default: 'server' },
16
16
  attr: { type: Object as () => { addOrEdit?: string, acceptCount?: number, uploadImage?: boolean }, default: () => ({}) },
17
+ mode: { default: '新增' }, // 预览
17
18
  })
18
19
  const emit = defineEmits(['updateFileList'])
19
20
 
@@ -170,7 +171,7 @@ function handleActionSelect(option: any) {
170
171
  <template>
171
172
  <div class="uploader-container">
172
173
  <div
173
- v-if="imageList.length < props.attr?.acceptCount && props.attr?.addOrEdit !== 'readonly'"
174
+ v-if="props.mode !== '预览' && (imageList.length < props.attr?.acceptCount && props.attr?.addOrEdit !== 'readonly')"
174
175
  class="custom-upload-area"
175
176
  @click="handleUploadAreaClick"
176
177
  >
@@ -186,7 +187,7 @@ function handleActionSelect(option: any) {
186
187
  ref="uploaderRef"
187
188
  v-model="imageList"
188
189
  :show-upload="false"
189
- :deletable="props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin'"
190
+ :deletable="(props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin') && props.mode !== '预览'"
190
191
  :multiple="props.authority === 'admin'"
191
192
  :preview-image="true"
192
193
  :before-delete="props.attr?.addOrEdit !== 'readonly' && props.authority === 'admin' ? deleteFileFunction : undefined"
@@ -1,4 +1,5 @@
1
1
  <script setup lang="ts">
2
+ import { rootRouteList } from '@af-mobile-client-vue3/config/routes'
2
3
  import { NavBar as VanNavBar } from 'vant/es'
3
4
  import { computed } from 'vue'
4
5
  import { useI18n } from 'vue-i18n'
@@ -6,36 +7,45 @@ import { useRoute, useRouter } from 'vue-router'
6
7
 
7
8
  const route = useRoute()
8
9
  const router = useRouter()
9
-
10
- // back
11
- function onBack() {
12
- if (window.history.state.back)
13
- history.back()
14
- else
15
- router.replace('/')
16
- }
17
-
18
10
  const { t } = useI18n()
19
11
 
12
+ const showNavBar = computed(() => route.meta.navBar)
13
+
14
+ /**
15
+ * Get page title
16
+ * Located in src/locales/json
17
+ */
20
18
  const title = computed(() => {
21
19
  if (!route.meta)
22
20
  return ''
23
21
 
24
- return route.meta.i18n ? t(route.meta.i18n) : (route.meta.title || '')
22
+ return route.meta.i18n ? t(route.meta.i18n as string) : (route.meta.title || '')
25
23
  })
26
24
 
27
- const showNavBar = computed(() => route.meta.navBar)
25
+ /**
26
+ * Show the left arrow
27
+ * If route name is in rootRouteList, hide left arrow
28
+ */
29
+ const showLeftArrow = computed(() => {
30
+ return !(route.name && rootRouteList.includes(route.name as string))
31
+ })
28
32
 
29
- const showLeftArrow = computed(() => route.name && route.name === 'ComponentView')
33
+ // back
34
+ function onBack() {
35
+ if (window.history.state.back)
36
+ history.back()
37
+ else
38
+ router.replace('/')
39
+ }
30
40
  </script>
31
41
 
32
42
  <template>
33
43
  <VanNavBar
34
44
  v-show="showNavBar"
35
- :title="title"
45
+ :title="title as string"
36
46
  :fixed="true"
37
47
  clickable placeholder
38
- :left-arrow="!showLeftArrow"
48
+ :left-arrow="showLeftArrow"
39
49
  @click-left="onBack"
40
50
  />
41
51
  </template>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { routeWhiteList } from '@af-mobile-client-vue3/config/routes'
2
+ import { rootRouteList } from '@af-mobile-client-vue3/config/routes'
3
3
  import { Tabbar as VanTabbar, TabbarItem as VanTabbarItem } from 'vant'
4
4
  import { computed, ref } from 'vue'
5
5
  import { useRoute } from 'vue-router'
@@ -9,11 +9,13 @@ import 'vant/lib/tabbar/index.css'
9
9
  const active = ref(0)
10
10
  const route = useRoute()
11
11
 
12
- const show = computed(() => route.name && routeWhiteList.includes(route.name as string))
12
+ const show = computed(() => {
13
+ return route.name && rootRouteList.includes(route.name as string)
14
+ })
13
15
  </script>
14
16
 
15
17
  <template>
16
- <VanTabbar v-if="show" v-model="active" route placeholder>
18
+ <VanTabbar v-if="show" v-model="active" placeholder route>
17
19
  <VanTabbarItem replace to="/Component/main">
18
20
  {{ '首页' }}
19
21
  <template #icon>
@@ -3,8 +3,6 @@ import {
3
3
  Button as VanButton,
4
4
  Checkbox as VanCheckbox,
5
5
  CheckboxGroup as VanCheckboxGroup,
6
- Grid as VanGrid,
7
- GridItem as VanGridItem,
8
6
  Radio as VanRadio,
9
7
  RadioGroup as VanRadioGroup,
10
8
  } from 'vant'
@@ -132,24 +130,24 @@ function valueChange(value: string | string[]) {
132
130
  display: none;
133
131
  }
134
132
 
135
- :deep(.van-checkbox) {
133
+ :deep(.van-checkbox) {
136
134
  width: 100%;
137
135
  }
138
- :deep(.van-radio__icon) {
136
+ :deep(.van-radio__icon) {
139
137
  display: none;
140
138
  }
141
- :deep(.van-radio) {
139
+ :deep(.van-radio) {
142
140
  width: 100%;
143
141
  }
144
- :deep(.van-button) {
142
+ :deep(.van-button) {
145
143
  width: 100%;
146
- background-color: rgb(247,248,250);
144
+ background-color: rgb(247, 248, 250);
147
145
  white-space: nowrap;
148
146
  }
149
- :deep(.van-checkbox__label) {
147
+ :deep(.van-checkbox__label) {
150
148
  width: 100%;
151
149
  }
152
- :deep(.van-radio__label) {
150
+ :deep(.van-radio__label) {
153
151
  width: 100%;
154
152
  }
155
153
  }
@@ -169,7 +169,7 @@ const resultLabel = computed(() => {
169
169
  .dh-field {
170
170
  width: 100%;
171
171
  padding: 0;
172
- background:#fff;
172
+ background: #fff;
173
173
  .dh-cell.van-cell {
174
174
  padding: 10px 0;
175
175
  }