af-mobile-client-vue3 1.2.59 → 1.3.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.
- package/.editorconfig +5 -34
- package/.env +1 -1
- package/.env.development +0 -3
- package/.env.production +1 -7
- package/build/vite/index.ts +2 -12
- package/build/vite/optimize.ts +2 -2
- package/compress.js +36 -0
- package/package.json +114 -114
- package/src/App.vue +3 -5
- package/src/assets/img/banner/appraise-banner-1.png +0 -0
- package/src/assets/img/banner/appraise-banner-2.png +0 -0
- package/src/components/core/BeautifulLoading/index.vue +1 -2
- package/src/components/core/ImageUploader/index.vue +3 -2
- package/src/components/core/NavBar/index.vue +23 -13
- package/src/components/core/Tabbar/index.vue +5 -3
- package/src/components/data/XBadge/index.vue +2 -2
- package/src/components/data/XCellList/index.vue +10 -10
- package/src/components/data/XFormGroup/doc/FormGroupDemo.vue +4 -4
- package/src/components/data/XFormGroup/index.vue +11 -1
- package/src/components/data/XFormItem/index.vue +2 -22
- package/src/components/data/XReportForm/XReportFormJsonRender.vue +22 -22
- package/src/components/data/XReportForm/index.vue +23 -14
- package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +1 -2
- package/src/components/data/XReportGrid/XReport.vue +3 -3
- package/src/components/data/XReportGrid/XReportDesign.vue +13 -13
- package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +1 -1
- package/src/components/data/XReportGrid/XReportJsonRender.vue +11 -11
- package/src/components/data/XReportGrid/XReportTrGroup.vue +3 -3
- package/src/components/layout/NormalDataLayout/index.vue +2 -3
- package/src/config/routes.ts +6 -2
- package/src/constants/index.ts +2 -0
- package/src/locales/en-US.json +52 -28
- package/src/locales/zh-CN.json +57 -33
- package/src/main.ts +0 -2
- package/src/router/routes.ts +0 -6
- package/src/router/types.ts +0 -2
- package/src/types/vue-router.d.ts +0 -2
- package/src/utils/mobileUtil.ts +2 -2
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/utils/set-page-title.ts +3 -5
- package/src/views/common/LoadError.vue +1 -2
- package/src/views/common/NotFound.vue +2 -3
- package/src/views/component/XCellListView/index.vue +23 -72
- package/src/views/component/XFormGroupView/index.vue +7 -11
- package/src/views/component/XFormView/index.vue +2 -2
- package/tsconfig.json +5 -8
- package/uno.config.ts +32 -1
- package/vite.config.ts +1 -1
- package/.env.envoiceShow +0 -7
- package/src/components/core/App/MicroAppView.vue +0 -59
- package/src/components/core/SvgIcon/index.vue +0 -61
- package/src/utils/local-storage.ts +0 -9
- 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
package/.env.development
CHANGED
package/.env.production
CHANGED
package/build/vite/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
|
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',
|
package/build/vite/optimize.ts
CHANGED
|
@@ -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,114 +1,114 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "af-mobile-client-vue3",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
6
|
-
"description": "Vue + Vite component lib",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=20.19.0"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
-
"
|
|
13
|
-
"build:dev": "vue-tsc --noEmit && vite build --mode
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"lint
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"pinia": "^3.0.3",
|
|
39
|
-
"pinia-plugin-persistedstate": "^4.
|
|
40
|
-
"resize-detector": "^0.3.0",
|
|
41
|
-
"vant": "^4.9.
|
|
42
|
-
"vconsole": "^3.15.1",
|
|
43
|
-
"vue": "^3.5.17",
|
|
44
|
-
"vue-i18n": "^11.1.
|
|
45
|
-
"vue-router": "^4.5.1"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@commitlint/
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
56
|
-
"@types/
|
|
57
|
-
"@types/
|
|
58
|
-
"@types/
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@vitejs/plugin-
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"eslint
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"vite
|
|
80
|
-
"vite-plugin-
|
|
81
|
-
"vite-plugin-
|
|
82
|
-
"vite-plugin-
|
|
83
|
-
"vite-plugin-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
"onlyBuiltDependencies": [
|
|
98
|
-
"core-js",
|
|
99
|
-
"esbuild",
|
|
100
|
-
"simple-git-hooks",
|
|
101
|
-
"unrs-resolver"
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
"resolutions": {
|
|
105
|
-
"vite": "^7.0.
|
|
106
|
-
},
|
|
107
|
-
"simple-git-hooks": {
|
|
108
|
-
"pre-commit": "pnpm lint-staged",
|
|
109
|
-
"commit-msg": "pnpm commitlint $1"
|
|
110
|
-
},
|
|
111
|
-
"lint-staged": {
|
|
112
|
-
"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "af-mobile-client-vue3",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.3.1",
|
|
5
|
+
"packageManager": "pnpm@10.13.1",
|
|
6
|
+
"description": "Vue + Vite component lib",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20.19.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
+
"compress": "node ./compress.js",
|
|
13
|
+
"build:dev": "vue-tsc --noEmit && vite build --mode development",
|
|
14
|
+
"build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
|
|
15
|
+
"preview": "vite preview",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"lint:fix": "eslint . --fix",
|
|
18
|
+
"release": "bumpp --commit --push --tag",
|
|
19
|
+
"typecheck": "vue-tsc --noEmit",
|
|
20
|
+
"commitlint": "commitlint --edit",
|
|
21
|
+
"prepare": "simple-git-hooks"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@iconify/vue": "4.3.0",
|
|
25
|
+
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
26
|
+
"@unhead/vue": "2.0.12",
|
|
27
|
+
"@vant/area-data": "^2.0.0",
|
|
28
|
+
"@vant/touch-emulator": "^1.4.0",
|
|
29
|
+
"@vant/use": "^1.6.0",
|
|
30
|
+
"@vueuse/core": "^13.5.0",
|
|
31
|
+
"axios": "^1.10.0",
|
|
32
|
+
"crypto-js": "^4.2.0",
|
|
33
|
+
"dayjs": "^1.11.13",
|
|
34
|
+
"echarts": "^5.6.0",
|
|
35
|
+
"lodash-es": "^4.17.21",
|
|
36
|
+
"nprogress": "^0.2.0",
|
|
37
|
+
"ol": "^10.5.0",
|
|
38
|
+
"pinia": "^3.0.3",
|
|
39
|
+
"pinia-plugin-persistedstate": "^4.4.1",
|
|
40
|
+
"resize-detector": "^0.3.0",
|
|
41
|
+
"vant": "^4.9.21",
|
|
42
|
+
"vconsole": "^3.15.1",
|
|
43
|
+
"vue": "^3.5.17",
|
|
44
|
+
"vue-i18n": "^11.1.10",
|
|
45
|
+
"vue-router": "^4.5.1",
|
|
46
|
+
"vue3-hash-calendar": "^1.1.3"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@antfu/eslint-config": "4.17.0",
|
|
50
|
+
"@commitlint/cli": "^19.8.1",
|
|
51
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
52
|
+
"@commitlint/types": "^19.8.1",
|
|
53
|
+
"@iconify/json": "2.2.318",
|
|
54
|
+
"@iconify/utils": "^2.3.0",
|
|
55
|
+
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
56
|
+
"@types/crypto-js": "^4.2.2",
|
|
57
|
+
"@types/lodash-es": "^4.17.12",
|
|
58
|
+
"@types/node": "^24.0.14",
|
|
59
|
+
"@types/nprogress": "^0.2.3",
|
|
60
|
+
"@unocss/eslint-config": "66.3.3",
|
|
61
|
+
"@vitejs/plugin-legacy": "^7.0.1",
|
|
62
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
63
|
+
"autoprefixer": "^10.4.21",
|
|
64
|
+
"bumpp": "^10.2.0",
|
|
65
|
+
"consola": "^3.4.2",
|
|
66
|
+
"cross-env": "^7.0.3",
|
|
67
|
+
"eslint": "^9.31.0",
|
|
68
|
+
"eslint-plugin-format": "^1.0.1",
|
|
69
|
+
"less": "^4.4.0",
|
|
70
|
+
"lint-staged": "^16.1.2",
|
|
71
|
+
"mockjs": "^1.1.0",
|
|
72
|
+
"postcss-mobile-forever": "^5.0.0",
|
|
73
|
+
"rollup": "^4.45.1",
|
|
74
|
+
"simple-git-hooks": "^2.13.0",
|
|
75
|
+
"tar": "^7.4.3",
|
|
76
|
+
"terser": "^5.43.1",
|
|
77
|
+
"typescript": "^5.8.3",
|
|
78
|
+
"unocss": "66.3.3",
|
|
79
|
+
"vite": "^7.0.5",
|
|
80
|
+
"vite-plugin-compression": "^0.5.1",
|
|
81
|
+
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
82
|
+
"vite-plugin-pwa": "^1.0.1",
|
|
83
|
+
"vite-plugin-sitemap": "^0.8.2",
|
|
84
|
+
"vite-plugin-vconsole": "^2.1.1",
|
|
85
|
+
"vite-plugin-vue-devtools": "^7.7.7",
|
|
86
|
+
"vue-tsc": "^3.0.2"
|
|
87
|
+
},
|
|
88
|
+
"pnpm": {
|
|
89
|
+
"allowedDeprecatedVersions": {
|
|
90
|
+
"glob": "7.2.3",
|
|
91
|
+
"inflight": "1.0.6",
|
|
92
|
+
"sourcemap-codec": "1.4.8"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencyRules": {
|
|
95
|
+
"allowedVersions": {}
|
|
96
|
+
},
|
|
97
|
+
"onlyBuiltDependencies": [
|
|
98
|
+
"core-js",
|
|
99
|
+
"esbuild",
|
|
100
|
+
"simple-git-hooks",
|
|
101
|
+
"unrs-resolver"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"resolutions": {
|
|
105
|
+
"vite": "^7.0.5"
|
|
106
|
+
},
|
|
107
|
+
"simple-git-hooks": {
|
|
108
|
+
"pre-commit": "pnpm lint-staged",
|
|
109
|
+
"commit-msg": "pnpm commitlint $1"
|
|
110
|
+
},
|
|
111
|
+
"lint-staged": {
|
|
112
|
+
"*": "eslint --fix"
|
|
113
|
+
}
|
|
114
|
+
}
|
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',
|
|
@@ -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>
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
-
<
|
|
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,27 +7,36 @@ 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
|
-
|
|
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
|
-
|
|
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>
|
|
@@ -35,7 +45,7 @@ const showLeftArrow = computed(() => route.name && route.name === 'ComponentView
|
|
|
35
45
|
:title="title"
|
|
36
46
|
:fixed="true"
|
|
37
47
|
clickable placeholder
|
|
38
|
-
:left-arrow="
|
|
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 {
|
|
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(() =>
|
|
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
|
|
18
|
+
<VanTabbar v-if="show" v-model="active" placeholder route>
|
|
17
19
|
<VanTabbarItem replace to="/Component/main">
|
|
18
20
|
{{ '首页' }}
|
|
19
21
|
<template #icon>
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { getDictItemByValue } from '@af-mobile-client-vue3/utils/dictUtil'
|
|
3
3
|
import { ref } from 'vue'
|
|
4
4
|
|
|
5
|
-
const { serviceName, dictName, dictValue } =
|
|
5
|
+
const { serviceName, dictName, dictValue } = defineProps<{
|
|
6
6
|
serviceName: string
|
|
7
7
|
dictName: string | null | undefined
|
|
8
8
|
dictValue: string | null | undefined
|
|
9
|
-
}>()
|
|
9
|
+
}>()
|
|
10
10
|
|
|
11
11
|
// 字面值
|
|
12
12
|
const label = ref('')
|
|
@@ -23,7 +23,15 @@ import {
|
|
|
23
23
|
import { computed, defineEmits, defineProps, getCurrentInstance, onBeforeMount, ref, useSlots, watch } from 'vue'
|
|
24
24
|
import { useRouter } from 'vue-router'
|
|
25
25
|
|
|
26
|
-
const {
|
|
26
|
+
const {
|
|
27
|
+
configName = '',
|
|
28
|
+
fixQueryForm = null,
|
|
29
|
+
idKey = 'o_id',
|
|
30
|
+
serviceName,
|
|
31
|
+
scanOptions,
|
|
32
|
+
customAdd = false,
|
|
33
|
+
customEdit = false,
|
|
34
|
+
} = defineProps<{
|
|
27
35
|
configName?: string
|
|
28
36
|
fixQueryForm?: object
|
|
29
37
|
idKey?: string
|
|
@@ -36,15 +44,7 @@ const { configName, serviceName, fixQueryForm, customAdd, customEdit } = withDef
|
|
|
36
44
|
// 是否自定义新增、编辑按钮
|
|
37
45
|
customAdd?: boolean
|
|
38
46
|
customEdit?: boolean
|
|
39
|
-
}>()
|
|
40
|
-
configName: '',
|
|
41
|
-
fixQueryForm: null,
|
|
42
|
-
idKey: 'o_id',
|
|
43
|
-
serviceName: undefined,
|
|
44
|
-
scanOptions: undefined,
|
|
45
|
-
customAdd: false,
|
|
46
|
-
customEdit: false,
|
|
47
|
-
})
|
|
47
|
+
}>()
|
|
48
48
|
|
|
49
49
|
const emit = defineEmits<{
|
|
50
50
|
(e: 'toDetail', item: any): void
|
|
@@ -33,21 +33,21 @@ function handleSubmit(result: any) {
|
|
|
33
33
|
@submit="handleSubmit"
|
|
34
34
|
>
|
|
35
35
|
<!-- 用户信息插槽 -->
|
|
36
|
-
<template #user="{ setRef, removeRef,
|
|
36
|
+
<template #user="{ setRef, removeRef, formData }">
|
|
37
37
|
<UserForm
|
|
38
38
|
:set-ref="setRef"
|
|
39
39
|
:remove-ref="removeRef"
|
|
40
40
|
form-group-name="userInfo"
|
|
41
|
-
:form-data="
|
|
41
|
+
:form-data="formData"
|
|
42
42
|
/>
|
|
43
43
|
</template>
|
|
44
44
|
<!-- 设备信息插槽 -->
|
|
45
|
-
<template #device="{ setRef, removeRef,
|
|
45
|
+
<template #device="{ setRef, removeRef, formData }">
|
|
46
46
|
<DeviceForm
|
|
47
47
|
:set-ref="setRef"
|
|
48
48
|
:remove-ref="removeRef"
|
|
49
49
|
form-group-name="deviceInfo"
|
|
50
|
-
:form-data="
|
|
50
|
+
:form-data="formData"
|
|
51
51
|
/>
|
|
52
52
|
</template>
|
|
53
53
|
</XFormGroup>
|