af-mobile-client-vue3 1.1.41 → 1.1.43
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/index.html +0 -1
- package/package.json +115 -112
- package/src/components/data/XCellList/index.vue +6 -4
- package/src/components/data/XCellListFilter/index.vue +2 -2
- package/src/components/data/XForm/index.vue +5 -3
- package/src/components/data/XFormItem/index.vue +10 -6
- package/src/main.ts +2 -3
- package/src/styles/fontawesome-icons.ts +7 -0
- package/src/views/component/XCellListView/index.vue +12 -95
- package/src/views/component/XFormView/index.vue +6 -3
- package/vite.config.ts +11 -11
package/index.html
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
<body>
|
|
10
10
|
<div id="system-app"></div>
|
|
11
11
|
<script type="module" src="/src/main.ts"></script>
|
|
12
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
13
12
|
<noscript>
|
|
14
13
|
This website requires JavaScript to function properly.
|
|
15
14
|
Please enable JavaScript to continue.
|
package/package.json
CHANGED
|
@@ -1,112 +1,115 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "af-mobile-client-vue3",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
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
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@types/
|
|
54
|
-
"@types/
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"vite
|
|
82
|
-
"vite-plugin-
|
|
83
|
-
"vite-plugin-
|
|
84
|
-
"vite-plugin-
|
|
85
|
-
"vite-plugin-
|
|
86
|
-
"vite-plugin-
|
|
87
|
-
"
|
|
88
|
-
"vue-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "af-mobile-client-vue3",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.1.43",
|
|
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
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
23
|
+
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
24
|
+
"@fortawesome/vue-fontawesome": "^3.0.8",
|
|
25
|
+
"@iconify/vue": "4.3.0",
|
|
26
|
+
"@micro-zoe/micro-app": "1.0.0-rc.24",
|
|
27
|
+
"@unhead/vue": "^2.0.5",
|
|
28
|
+
"@vant/area-data": "^2.0.0",
|
|
29
|
+
"@vant/touch-emulator": "^1.4.0",
|
|
30
|
+
"@vant/use": "^1.6.0",
|
|
31
|
+
"@vueuse/core": "^13.1.0",
|
|
32
|
+
"animate.css": "^4.1.1",
|
|
33
|
+
"axios": "^1.8.4",
|
|
34
|
+
"crypto-js": "^4.2.0",
|
|
35
|
+
"echarts": "^5.6.0",
|
|
36
|
+
"lodash-es": "^4.17.21",
|
|
37
|
+
"nprogress": "^0.2.0",
|
|
38
|
+
"ol": "^10.5.0",
|
|
39
|
+
"pinia": "^3.0.2",
|
|
40
|
+
"pinia-plugin-persistedstate": "^4.2.0",
|
|
41
|
+
"qs": "^6.14.0",
|
|
42
|
+
"resize-detector": "^0.3.0",
|
|
43
|
+
"store": "^2.0.12",
|
|
44
|
+
"vant": "^4.9.18",
|
|
45
|
+
"vconsole": "^3.15.1",
|
|
46
|
+
"vue": "^3.5.13",
|
|
47
|
+
"vue-router": "^4.5.0",
|
|
48
|
+
"vue3-hash-calendar": "^1.1.3"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@antfu/eslint-config": "^4.12.0",
|
|
52
|
+
"@iconify/json": "2.2.318",
|
|
53
|
+
"@types/crypto-js": "^4.2.2",
|
|
54
|
+
"@types/lodash-es": "^4.17.12",
|
|
55
|
+
"@types/node": "^22.14.1",
|
|
56
|
+
"@types/nprogress": "^0.2.3",
|
|
57
|
+
"@types/store": "^2.0.5",
|
|
58
|
+
"@unocss/eslint-plugin": "^66.1.0-beta.11",
|
|
59
|
+
"@unocss/preset-rem-to-px": "66.1.0-beta.11",
|
|
60
|
+
"@vitejs/plugin-legacy": "^6.0.2",
|
|
61
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
62
|
+
"autoprefixer": "^10.4.21",
|
|
63
|
+
"bumpp": "^10.1.0",
|
|
64
|
+
"commitizen": "^4.3.1",
|
|
65
|
+
"consola": "^3.4.2",
|
|
66
|
+
"cross-env": "^7.0.3",
|
|
67
|
+
"cz-emoji-chinese": "^0.3.1",
|
|
68
|
+
"eslint": "^9.24.0",
|
|
69
|
+
"eslint-ts-patch": "^8.57.0-0",
|
|
70
|
+
"husky": "^9.1.7",
|
|
71
|
+
"less": "^4.3.0",
|
|
72
|
+
"mockjs": "^1.1.0",
|
|
73
|
+
"postcss-mobile-forever": "^5.0.0",
|
|
74
|
+
"rollup": "^4.40.0",
|
|
75
|
+
"terser": "^5.39.0",
|
|
76
|
+
"typescript": "^5.8.3",
|
|
77
|
+
"unocss": "^66.1.0-beta.11",
|
|
78
|
+
"unplugin-auto-import": "^19.1.2",
|
|
79
|
+
"unplugin-vue-components": "^28.4.1",
|
|
80
|
+
"unplugin-vue-router": "^0.12.0",
|
|
81
|
+
"vite": "^6.2.6",
|
|
82
|
+
"vite-plugin-compression": "^0.5.1",
|
|
83
|
+
"vite-plugin-mock-dev-server": "^1.8.5",
|
|
84
|
+
"vite-plugin-pwa": "^1.0.0",
|
|
85
|
+
"vite-plugin-sitemap": "^0.7.1",
|
|
86
|
+
"vite-plugin-svg-icons": "^2.0.1",
|
|
87
|
+
"vite-plugin-vconsole": "^2.1.1",
|
|
88
|
+
"vite-plugin-vue-devtools": "^7.7.2",
|
|
89
|
+
"vite-plugin-vue-layouts": "^0.11.0",
|
|
90
|
+
"vitest": "^3.1.1",
|
|
91
|
+
"vue-tsc": "^2.2.8"
|
|
92
|
+
},
|
|
93
|
+
"pnpm": {
|
|
94
|
+
"peerDependencyRules": {
|
|
95
|
+
"ignoreMissing": [
|
|
96
|
+
"postcss",
|
|
97
|
+
"esbuild"
|
|
98
|
+
],
|
|
99
|
+
"allowedVersions": {
|
|
100
|
+
"rollup": "^4.x"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"config": {
|
|
105
|
+
"commitizen": {
|
|
106
|
+
"path": "./node_modules/cz-emoji-chinese"
|
|
107
|
+
},
|
|
108
|
+
"cz-emoji-chinese": {
|
|
109
|
+
"skipQuestions": [
|
|
110
|
+
"body",
|
|
111
|
+
"scope"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -586,7 +586,7 @@ defineExpose({
|
|
|
586
586
|
@load="onLoad"
|
|
587
587
|
>
|
|
588
588
|
<div v-for="(item, index) in list" :key="`card_${index}`" class="card_item_main">
|
|
589
|
-
<VanRow gutter="20" class="card_item_header" align="center">
|
|
589
|
+
<VanRow gutter="20" class="card_item_header" align="center" @click="emit('toDetail', item)">
|
|
590
590
|
<VanCol :span="24">
|
|
591
591
|
<div class="title-row">
|
|
592
592
|
<div v-for="(column) in mainColumns" :key="`main_${column.dataIndex}`" class="main-title">
|
|
@@ -622,7 +622,7 @@ defineExpose({
|
|
|
622
622
|
</div>
|
|
623
623
|
</VanCol>
|
|
624
624
|
</VanRow>
|
|
625
|
-
<VanRow gutter="20" class="card_item_details">
|
|
625
|
+
<VanRow gutter="20" class="card_item_details" @click="emit('toDetail', item)">
|
|
626
626
|
<VanCol v-for="column of detailColumns" :key="`details_${column.dataIndex}`" :span="column.span">
|
|
627
627
|
<p>
|
|
628
628
|
{{ `${column.title}: ` }}
|
|
@@ -634,7 +634,7 @@ defineExpose({
|
|
|
634
634
|
</p>
|
|
635
635
|
</VanCol>
|
|
636
636
|
</VanRow>
|
|
637
|
-
<VanRow v-if="tagList.length > 0" gutter="20" class="tag-row">
|
|
637
|
+
<VanRow v-if="tagList.length > 0" gutter="20" class="tag-row" @click="emit('toDetail', item)">
|
|
638
638
|
<VanCol :span="24">
|
|
639
639
|
<div class="tag-container">
|
|
640
640
|
<div class="tag-wrapper">
|
|
@@ -670,6 +670,7 @@ defineExpose({
|
|
|
670
670
|
v-if="footColumns && footColumns.length > 0"
|
|
671
671
|
gutter="20"
|
|
672
672
|
class="card_item_footer"
|
|
673
|
+
@click="emit('toDetail', item)"
|
|
673
674
|
>
|
|
674
675
|
<VanCol v-for="column of footColumns" :key="`foot_${column.dataIndex}`" :span="12">
|
|
675
676
|
<p>
|
|
@@ -733,7 +734,7 @@ defineExpose({
|
|
|
733
734
|
|
|
734
735
|
<style scoped lang="less">
|
|
735
736
|
#XCellList {
|
|
736
|
-
height: calc(100vh - var(--van-nav-bar-height) -
|
|
737
|
+
height: calc(100vh - var(--van-nav-bar-height) - 20px);
|
|
737
738
|
display: flex;
|
|
738
739
|
flex-direction: column;
|
|
739
740
|
--van-search-padding: 3px;
|
|
@@ -952,6 +953,7 @@ defineExpose({
|
|
|
952
953
|
|
|
953
954
|
.action-btn {
|
|
954
955
|
min-width: 76px;
|
|
956
|
+
height: 40px;
|
|
955
957
|
border-radius: 10px;
|
|
956
958
|
font-size: 1rem;
|
|
957
959
|
transition: all 0.2s ease;
|
|
@@ -284,7 +284,7 @@ function handleCloseScanButton() {
|
|
|
284
284
|
<VanDropdownItem v-if="showScanButton" v-model="scanMenuShow" @change="handleScanMenuChange">
|
|
285
285
|
<template #title>
|
|
286
286
|
<div class="filter-icon-box">
|
|
287
|
-
<
|
|
287
|
+
<font-awesome-icon :icon="['fas', 'fa-qrcode']" />
|
|
288
288
|
</div>
|
|
289
289
|
</template>
|
|
290
290
|
|
|
@@ -334,7 +334,7 @@ function handleCloseScanButton() {
|
|
|
334
334
|
<VanDropdownItem v-if="!props.buttonState || props.buttonState.filter !== false" v-model="filterMenuShow" @change="handleFilterMenuChange">
|
|
335
335
|
<template #title>
|
|
336
336
|
<div class="filter-icon-box">
|
|
337
|
-
<
|
|
337
|
+
<font-awesome-icon :icon="['fas', 'fa-filter']" />
|
|
338
338
|
</div>
|
|
339
339
|
</template>
|
|
340
340
|
<div class="dropdown-title">
|
|
@@ -218,7 +218,7 @@ defineExpose({ init, form, formGroupName, validate })
|
|
|
218
218
|
</VanCellGroup>
|
|
219
219
|
</div>
|
|
220
220
|
<div v-if="resolvedSubmitButton && props.mode !== '预览'" class="form-footer-fixed">
|
|
221
|
-
<VanButton round block type="primary" native-type="submit">
|
|
221
|
+
<VanButton class="action-btn" round block type="primary" native-type="submit">
|
|
222
222
|
{{ props.groupFormItems?.btnName ? props.groupFormItems.btnName : '提交' }}
|
|
223
223
|
</VanButton>
|
|
224
224
|
<slot />
|
|
@@ -228,7 +228,7 @@ defineExpose({ init, form, formGroupName, validate })
|
|
|
228
228
|
|
|
229
229
|
<style scoped>
|
|
230
230
|
.x-form-container {
|
|
231
|
-
height: calc(100vh - var(--van-nav-bar-height) -
|
|
231
|
+
height: calc(100vh - var(--van-nav-bar-height) - 20px);
|
|
232
232
|
display: flex;
|
|
233
233
|
flex-direction: column;
|
|
234
234
|
max-height: 100vh;
|
|
@@ -239,11 +239,13 @@ defineExpose({ init, form, formGroupName, validate })
|
|
|
239
239
|
flex: 1;
|
|
240
240
|
overflow-y: auto;
|
|
241
241
|
min-height: 0;
|
|
242
|
-
padding: 0 16px;
|
|
243
242
|
}
|
|
244
243
|
|
|
245
244
|
.form-footer-fixed {
|
|
246
245
|
margin: 16px;
|
|
247
246
|
flex-shrink: 0;
|
|
247
|
+
.action-btn {
|
|
248
|
+
border-radius: 10px;
|
|
249
|
+
}
|
|
248
250
|
}
|
|
249
251
|
</style>
|
|
@@ -837,7 +837,7 @@ function handleAddressConfirm(location) {
|
|
|
837
837
|
:rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
|
|
838
838
|
@click="readonly ? null : showPicker = true"
|
|
839
839
|
/>
|
|
840
|
-
<VanPopup v-model:show="showPicker" round position="bottom" teleport="body">
|
|
840
|
+
<VanPopup v-model:show="showPicker" round position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
841
841
|
<VanPicker
|
|
842
842
|
v-model="(localValue as Numeric[])"
|
|
843
843
|
:title="attr.name"
|
|
@@ -870,6 +870,7 @@ function handleAddressConfirm(location) {
|
|
|
870
870
|
switch-mode="year-month"
|
|
871
871
|
type="range"
|
|
872
872
|
teleport="body"
|
|
873
|
+
overlay-class="date-picker-overlay"
|
|
873
874
|
:show-confirm="attr.showConfirm"
|
|
874
875
|
@confirm="onCalendarConfirm"
|
|
875
876
|
/>
|
|
@@ -888,7 +889,7 @@ function handleAddressConfirm(location) {
|
|
|
888
889
|
:rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
|
|
889
890
|
@click="readonly ? null : showDataTimePicker()"
|
|
890
891
|
/>
|
|
891
|
-
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body">
|
|
892
|
+
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
892
893
|
<VanPickerGroup
|
|
893
894
|
:title="attr.name"
|
|
894
895
|
:tabs="['选择日期', '选择时间']"
|
|
@@ -925,7 +926,7 @@ function handleAddressConfirm(location) {
|
|
|
925
926
|
:rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
|
|
926
927
|
@click="showDatePicker = true"
|
|
927
928
|
/>
|
|
928
|
-
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body">
|
|
929
|
+
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
929
930
|
<VanPickerGroup
|
|
930
931
|
:title="attr.name"
|
|
931
932
|
:tabs="['选择日期', '选择时间']"
|
|
@@ -962,7 +963,7 @@ function handleAddressConfirm(location) {
|
|
|
962
963
|
:rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
|
|
963
964
|
@click="showTimePicker = true"
|
|
964
965
|
/>
|
|
965
|
-
<VanPopup v-model:show="showTimePicker" position="bottom" teleport="body">
|
|
966
|
+
<VanPopup v-model:show="showTimePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
966
967
|
<VanTimePicker
|
|
967
968
|
v-model="localValue as string[]"
|
|
968
969
|
:title="attr.name"
|
|
@@ -989,7 +990,7 @@ function handleAddressConfirm(location) {
|
|
|
989
990
|
:rules="[{ required: attr.rule.required === 'true', message: '请选择' }]"
|
|
990
991
|
@click="readonly ? null : showArea = true"
|
|
991
992
|
/>
|
|
992
|
-
<VanPopup v-model:show="showArea" position="bottom" teleport="body">
|
|
993
|
+
<VanPopup v-model:show="showArea" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
993
994
|
<VanArea
|
|
994
995
|
v-model="localValue as string" :title="attr.name" :area-list="areaList"
|
|
995
996
|
@confirm="onAreaConfirm"
|
|
@@ -1063,6 +1064,7 @@ function handleAddressConfirm(location) {
|
|
|
1063
1064
|
position="bottom"
|
|
1064
1065
|
:style="{ height: '80vh' }"
|
|
1065
1066
|
teleport="body"
|
|
1067
|
+
overlay-class="date-picker-overlay"
|
|
1066
1068
|
>
|
|
1067
1069
|
<XLocationPicker
|
|
1068
1070
|
:default-center="defaultMapCenter"
|
|
@@ -1073,5 +1075,7 @@ function handleAddressConfirm(location) {
|
|
|
1073
1075
|
</template>
|
|
1074
1076
|
|
|
1075
1077
|
<style scoped>
|
|
1076
|
-
|
|
1078
|
+
.date-picker-overlay {
|
|
1079
|
+
background-color: rgba(0, 0, 0, 0.2); /* 设置为半透明的黑色 */
|
|
1080
|
+
}
|
|
1077
1081
|
</style>
|
package/src/main.ts
CHANGED
|
@@ -3,18 +3,16 @@ import bootstrap from '@af-mobile-client-vue3/bootstrap'
|
|
|
3
3
|
import Plugins from '@af-mobile-client-vue3/plugins'
|
|
4
4
|
import router from '@af-mobile-client-vue3/router'
|
|
5
5
|
import pinia from '@af-mobile-client-vue3/stores'
|
|
6
|
+
import FontAwesomeIcon from '@af-mobile-client-vue3/styles/fontawesome-icons'
|
|
6
7
|
import { createHead } from '@unhead/vue/client'
|
|
7
8
|
import { createApp } from 'vue'
|
|
8
9
|
import 'virtual:uno.css'
|
|
9
10
|
import '@af-mobile-client-vue3/styles/app.less'
|
|
10
11
|
import 'vant/lib/index.css'
|
|
11
12
|
import 'vant/lib/tabbar/index.css'
|
|
12
|
-
|
|
13
13
|
import 'vant/lib/tabbar-item/index.css'
|
|
14
|
-
|
|
15
14
|
// svg icon
|
|
16
15
|
import 'virtual:svg-icons-register'
|
|
17
|
-
|
|
18
16
|
// Vant 桌面端适配
|
|
19
17
|
import '@vant/touch-emulator'
|
|
20
18
|
/* --------------------------------
|
|
@@ -30,6 +28,7 @@ import 'vant/es/image-preview/style'
|
|
|
30
28
|
|
|
31
29
|
(async () => {
|
|
32
30
|
const app = createApp(App)
|
|
31
|
+
.component('font-awesome-icon', FontAwesomeIcon)
|
|
33
32
|
const head = createHead()
|
|
34
33
|
|
|
35
34
|
app.use(head)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
2
|
+
import { faFilter, faFlag, faPhone, faQrcode, faUser } from '@fortawesome/free-solid-svg-icons'
|
|
3
|
+
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
4
|
+
|
|
5
|
+
library.add(faPhone, faUser, faFlag, faFilter, faQrcode)
|
|
6
|
+
|
|
7
|
+
export default FontAwesomeIcon
|
|
@@ -1,107 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
|
-
import
|
|
4
|
-
import { defineEmits, ref } from 'vue'
|
|
3
|
+
import { ref } from 'vue'
|
|
5
4
|
import { useRouter } from 'vue-router'
|
|
6
5
|
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// 获取默认值
|
|
12
|
-
const idKey = ref('o_id')
|
|
6
|
+
// 巡检计划
|
|
7
|
+
defineOptions({
|
|
8
|
+
name: 'PatrolPlan',
|
|
9
|
+
})
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
const router = useRouter()
|
|
15
12
|
const configName = ref('crud_patroltask_managePhoneCRUD')
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
// 资源权限测试
|
|
19
|
-
// const configName = ref('crud_sources_test')
|
|
20
|
-
// const serviceName = ref('af-system')
|
|
21
|
-
|
|
22
|
-
// 实际业务测试
|
|
23
|
-
// const configName = ref('lngChargeAuditMobileCRUD')
|
|
24
|
-
// const serviceName = ref('af-gaslink')
|
|
25
|
-
|
|
26
|
-
// 跳转到详情页面
|
|
27
|
-
// function toDetail(item) {
|
|
28
|
-
// router.push({
|
|
29
|
-
// name: 'XCellDetailView',
|
|
30
|
-
// params: { id: item[idKey.value] }, // 如果使用命名路由,推荐使用路由参数而不是直接构建 URL
|
|
31
|
-
// query: {
|
|
32
|
-
// operName: item[operNameKey.value],
|
|
33
|
-
// method:item[methodKey.value],
|
|
34
|
-
// requestMethod:item[requestMethodKey.value],
|
|
35
|
-
// operatorType:item[operatorTypeKey.value],
|
|
36
|
-
// operUrl:item[operUrlKey.value],
|
|
37
|
-
// operIp:item[operIpKey.value],
|
|
38
|
-
// costTime:item[costTimeKey.value],
|
|
39
|
-
// operTime:item[operTimeKey.value],
|
|
40
|
-
//
|
|
41
|
-
// title: item[titleKey.value],
|
|
42
|
-
// businessType: item[businessTypeKey.value],
|
|
43
|
-
// status:item[statusKey.value]
|
|
44
|
-
// }
|
|
45
|
-
// })
|
|
46
|
-
// }
|
|
47
|
-
|
|
48
|
-
// 跳转到表单——以表单组来渲染纯表单
|
|
49
|
-
function toDetail(item) {
|
|
50
|
-
router.push({
|
|
51
|
-
name: 'XFormGroupView',
|
|
52
|
-
query: {
|
|
53
|
-
id: item[idKey.value],
|
|
54
|
-
// id: item.rr_id,
|
|
55
|
-
// o_id: item.o_id,
|
|
56
|
-
},
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// 新增功能
|
|
61
|
-
// function addOption(totalCount) {
|
|
62
|
-
// router.push({
|
|
63
|
-
// name: 'XFormView',
|
|
64
|
-
// params: { id: totalCount, openid: totalCount },
|
|
65
|
-
// query: {
|
|
66
|
-
// configName: configName.value,
|
|
67
|
-
// serviceName: serviceName.value,
|
|
68
|
-
// mode: '新增',
|
|
69
|
-
// },
|
|
70
|
-
// })
|
|
71
|
-
// }
|
|
72
|
-
|
|
73
|
-
// 修改功能
|
|
74
|
-
// function updateRow(result) {
|
|
75
|
-
// router.push({
|
|
76
|
-
// name: 'XFormView',
|
|
77
|
-
// params: { id: result.o_id, openid: result.o_id },
|
|
78
|
-
// query: {
|
|
79
|
-
// configName: configName.value,
|
|
80
|
-
// serviceName: serviceName.value,
|
|
81
|
-
// mode: '修改',
|
|
82
|
-
// },
|
|
83
|
-
// })
|
|
84
|
-
// }
|
|
85
|
-
|
|
86
|
-
// 删除功能
|
|
87
|
-
function deleteRow(result) {
|
|
88
|
-
emit('deleteRow', result.o_id)
|
|
89
|
-
}
|
|
13
|
+
const xCellListRefPatrolPlan = ref()
|
|
90
14
|
</script>
|
|
91
15
|
|
|
92
16
|
<template>
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
:fix-query-form="{ o_f_oper_name: 'edu_test' }"
|
|
99
|
-
:id-key="idKey"
|
|
100
|
-
@to-detail="toDetail"
|
|
101
|
-
@delete-row="deleteRow"
|
|
102
|
-
/>
|
|
103
|
-
</template>
|
|
104
|
-
</NormalDataLayout>
|
|
17
|
+
<XCellList
|
|
18
|
+
ref="xCellListRefPatrolPlan"
|
|
19
|
+
service-name="af-linepatrol"
|
|
20
|
+
:config-name="configName"
|
|
21
|
+
/>
|
|
105
22
|
</template>
|
|
106
23
|
|
|
107
24
|
<style scoped lang="less">
|
|
@@ -12,16 +12,19 @@ const formGroupAddConstruction = ref(null)
|
|
|
12
12
|
<template>
|
|
13
13
|
<NormalDataLayout id="XFormGroupView" title="纯表单">
|
|
14
14
|
<template #layout_content>
|
|
15
|
-
<XForm
|
|
15
|
+
<div class="form"> <XForm
|
|
16
16
|
ref="formGroupAddConstruction"
|
|
17
17
|
mode="新增"
|
|
18
18
|
:config-name="configName"
|
|
19
19
|
:service-name="serviceName"
|
|
20
|
-
|
|
20
|
+
/></div>
|
|
21
|
+
|
|
21
22
|
</template>
|
|
22
23
|
</NormalDataLayout>
|
|
23
24
|
</template>
|
|
24
25
|
|
|
25
26
|
<style scoped lang="less">
|
|
26
|
-
|
|
27
|
+
.form {
|
|
28
|
+
margin-top: 2px;
|
|
29
|
+
}
|
|
27
30
|
</style>
|
package/vite.config.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ConfigEnv, UserConfig } from 'vite'
|
|
2
2
|
import path from 'node:path'
|
|
3
3
|
import process from 'node:process'
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import autoprefixer from 'autoprefixer'
|
|
5
|
+
import viewport from 'postcss-mobile-forever'
|
|
6
6
|
import { loadEnv } from 'vite'
|
|
7
7
|
import { createVitePlugins } from './build/vite'
|
|
8
8
|
|
|
@@ -95,15 +95,15 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|
|
95
95
|
postcss: {
|
|
96
96
|
plugins: [
|
|
97
97
|
// 自动获取浏览器的流行度和能够支持的属性,并为 CSS 规则添加前缀
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
autoprefixer(),
|
|
99
|
+
viewport({
|
|
100
|
+
appSelector: '#system-app',
|
|
101
|
+
viewportWidth: 375,
|
|
102
|
+
maxDisplayWidth: 800,
|
|
103
|
+
appContainingBlock: 'auto',
|
|
104
|
+
necessarySelectorWhenAuto: '.app-wrapper',
|
|
105
|
+
rootContainingBlockSelectorList: ['van-tabbar', 'van-popup'],
|
|
106
|
+
}),
|
|
107
107
|
],
|
|
108
108
|
},
|
|
109
109
|
},
|