af-mobile-client-vue3 1.1.26 → 1.1.27
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/.env +1 -1
- package/.env.development +1 -1
- package/.env.production +1 -1
- package/package.json +111 -100
- package/src/components/data/XCellList/index.vue +7 -2
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/router/guards.ts +0 -3
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/component/XCellListView/index.vue +57 -19
- package/src/views/component/XFormGroupView/index.vue +7 -4
- package/tsconfig.json +43 -43
package/.env
CHANGED
package/.env.development
CHANGED
package/.env.production
CHANGED
package/package.json
CHANGED
|
@@ -1,100 +1,111 @@
|
|
|
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
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
"
|
|
54
|
-
"eslint": "^
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "af-mobile-client-vue3",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.1.27",
|
|
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.24",
|
|
23
|
+
"@vant/area-data": "^2.0.0",
|
|
24
|
+
"@unhead/vue": "^2.0.5",
|
|
25
|
+
"@vant/touch-emulator": "^1.4.0",
|
|
26
|
+
"@vant/use": "^1.6.0",
|
|
27
|
+
"@vueuse/core": "^13.1.0",
|
|
28
|
+
"@iconify/vue": "4.3.0",
|
|
29
|
+
"animate.css": "^4.1.1",
|
|
30
|
+
"axios": "^1.8.4",
|
|
31
|
+
"crypto-js": "^4.2.0",
|
|
32
|
+
"echarts": "^5.6.0",
|
|
33
|
+
"lodash-es": "^4.17.21",
|
|
34
|
+
"nprogress": "^0.2.0",
|
|
35
|
+
"ol": "^10.5.0",
|
|
36
|
+
"pinia": "^3.0.2",
|
|
37
|
+
"pinia-plugin-persistedstate": "^4.2.0",
|
|
38
|
+
"qs": "^6.14.0",
|
|
39
|
+
"resize-detector": "^0.3.0",
|
|
40
|
+
"store": "^2.0.12",
|
|
41
|
+
"vant": "^4.9.18",
|
|
42
|
+
"vconsole": "^3.15.1",
|
|
43
|
+
"vue": "^3.5.13",
|
|
44
|
+
"vue-router": "^4.5.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@antfu/eslint-config": "^4.12.0",
|
|
48
|
+
"@iconify/json": "2.2.318",
|
|
49
|
+
"@types/crypto-js": "^4.2.2",
|
|
50
|
+
"@types/lodash-es": "^4.17.12",
|
|
51
|
+
"@types/node": "^22.14.1",
|
|
52
|
+
"@types/nprogress": "^0.2.3",
|
|
53
|
+
"@types/store": "^2.0.5",
|
|
54
|
+
"@unocss/eslint-plugin": "^66.1.0-beta.11",
|
|
55
|
+
"@unocss/preset-rem-to-px": "66.1.0-beta.11",
|
|
56
|
+
"@vitejs/plugin-legacy": "^6.0.2",
|
|
57
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
58
|
+
"autoprefixer": "^10.4.21",
|
|
59
|
+
"bumpp": "^10.1.0",
|
|
60
|
+
"commitizen": "^4.3.1",
|
|
61
|
+
"consola": "^3.4.2",
|
|
62
|
+
"cross-env": "^7.0.3",
|
|
63
|
+
"cz-emoji-chinese": "^0.3.1",
|
|
64
|
+
"eslint": "^9.24.0",
|
|
65
|
+
"eslint-ts-patch": "^8.57.0-0",
|
|
66
|
+
"husky": "^9.1.7",
|
|
67
|
+
"less": "^4.3.0",
|
|
68
|
+
"mockjs": "^1.1.0",
|
|
69
|
+
"postcss-mobile-forever": "^5.0.0",
|
|
70
|
+
"rollup": "^4.40.0",
|
|
71
|
+
"terser": "^5.39.0",
|
|
72
|
+
"typescript": "^5.8.3",
|
|
73
|
+
"unocss": "^66.1.0-beta.11",
|
|
74
|
+
"unplugin-auto-import": "^19.1.2",
|
|
75
|
+
"unplugin-vue-components": "^28.4.1",
|
|
76
|
+
"unplugin-vue-router": "^0.12.0",
|
|
77
|
+
"vite": "^6.2.6",
|
|
78
|
+
"vite-plugin-compression": "^0.5.1",
|
|
79
|
+
"vite-plugin-mock-dev-server": "^1.8.5",
|
|
80
|
+
"vite-plugin-pwa": "^1.0.0",
|
|
81
|
+
"vite-plugin-sitemap": "^0.7.1",
|
|
82
|
+
"vite-plugin-svg-icons": "^2.0.1",
|
|
83
|
+
"vite-plugin-vconsole": "^2.1.1",
|
|
84
|
+
"vite-plugin-vue-devtools": "^7.7.2",
|
|
85
|
+
"vite-plugin-vue-layouts": "^0.11.0",
|
|
86
|
+
"vitest": "^3.1.1",
|
|
87
|
+
"vue-tsc": "^2.2.8"
|
|
88
|
+
},
|
|
89
|
+
"pnpm": {
|
|
90
|
+
"peerDependencyRules": {
|
|
91
|
+
"ignoreMissing": [
|
|
92
|
+
"postcss",
|
|
93
|
+
"esbuild"
|
|
94
|
+
],
|
|
95
|
+
"allowedVersions": {
|
|
96
|
+
"rollup": "^4.x"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"config": {
|
|
101
|
+
"commitizen": {
|
|
102
|
+
"path": "./node_modules/cz-emoji-chinese"
|
|
103
|
+
},
|
|
104
|
+
"cz-emoji-chinese": {
|
|
105
|
+
"skipQuestions": [
|
|
106
|
+
"body",
|
|
107
|
+
"scope"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -58,6 +58,9 @@ const sortordVal = ref(undefined)
|
|
|
58
58
|
// 配置内容
|
|
59
59
|
const configContent = ref({})
|
|
60
60
|
|
|
61
|
+
// 表单加载后是否立即执行查询
|
|
62
|
+
const isInitQuery = ref(false)
|
|
63
|
+
|
|
61
64
|
// 主列
|
|
62
65
|
const mainColumns = ref([])
|
|
63
66
|
|
|
@@ -144,6 +147,7 @@ function initComponent() {
|
|
|
144
147
|
getConfigByName(configName, (result) => {
|
|
145
148
|
groupFormItems.value = result
|
|
146
149
|
title.value = result?.title
|
|
150
|
+
// isInitQuery.value = result.createdQuery || false
|
|
147
151
|
for (let i = 0; i < result.columnJson.length; i++) {
|
|
148
152
|
const item = result.columnJson[i]
|
|
149
153
|
item.span = item.flexSpan
|
|
@@ -223,7 +227,9 @@ function initConditionParams(formItems) {
|
|
|
223
227
|
}
|
|
224
228
|
hasDefaults = true
|
|
225
229
|
}
|
|
230
|
+
hasDefaults = true
|
|
226
231
|
}
|
|
232
|
+
hasDefaults = true
|
|
227
233
|
})
|
|
228
234
|
|
|
229
235
|
// 如果有默认值,则设置到条件参数中并立即执行查询
|
|
@@ -253,8 +259,6 @@ function onRefresh() {
|
|
|
253
259
|
|
|
254
260
|
// 加载数据
|
|
255
261
|
function onLoad() {
|
|
256
|
-
if (!refreshing.value)
|
|
257
|
-
return
|
|
258
262
|
if (refreshing.value) {
|
|
259
263
|
list.value = []
|
|
260
264
|
pageNo.value = 1
|
|
@@ -551,6 +555,7 @@ defineExpose({
|
|
|
551
555
|
class="list_main"
|
|
552
556
|
:finished="finished"
|
|
553
557
|
finished-text="本来无一物,何处惹尘埃"
|
|
558
|
+
:immediate-check="isInitQuery"
|
|
554
559
|
@load="onLoad"
|
|
555
560
|
>
|
|
556
561
|
<div v-for="(item, index) in list" :key="`card_${index}`" class="card_item_main">
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onMounted, ref } from 'vue'
|
|
3
|
-
import XReport from './XReport.vue'
|
|
4
|
-
|
|
5
|
-
const mainRef = ref()
|
|
6
|
-
|
|
7
|
-
onMounted(() => {
|
|
8
|
-
// 初始化逻辑
|
|
9
|
-
})
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<div id="test">
|
|
14
|
-
<van-card :bordered="false">
|
|
15
|
-
<XReport
|
|
16
|
-
ref="mainRef"
|
|
17
|
-
:use-oss-for-img="false"
|
|
18
|
-
config-name="nurseWorkstationCover"
|
|
19
|
-
server-name="af-his"
|
|
20
|
-
:show-img-in-cell="true"
|
|
21
|
-
:display-only="true"
|
|
22
|
-
:edit-mode="false"
|
|
23
|
-
:show-save-button="false"
|
|
24
|
-
:no-padding="true"
|
|
25
|
-
:dont-format="true"
|
|
26
|
-
/>
|
|
27
|
-
</van-card>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<style scoped>
|
|
32
|
-
|
|
33
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted, ref } from 'vue'
|
|
3
|
+
import XReport from './XReport.vue'
|
|
4
|
+
|
|
5
|
+
const mainRef = ref()
|
|
6
|
+
|
|
7
|
+
onMounted(() => {
|
|
8
|
+
// 初始化逻辑
|
|
9
|
+
})
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div id="test">
|
|
14
|
+
<van-card :bordered="false">
|
|
15
|
+
<XReport
|
|
16
|
+
ref="mainRef"
|
|
17
|
+
:use-oss-for-img="false"
|
|
18
|
+
config-name="nurseWorkstationCover"
|
|
19
|
+
server-name="af-his"
|
|
20
|
+
:show-img-in-cell="true"
|
|
21
|
+
:display-only="true"
|
|
22
|
+
:edit-mode="false"
|
|
23
|
+
:show-save-button="false"
|
|
24
|
+
:no-padding="true"
|
|
25
|
+
:dont-format="true"
|
|
26
|
+
/>
|
|
27
|
+
</van-card>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<style scoped>
|
|
32
|
+
|
|
33
|
+
</style>
|
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
// print.js
|
|
2
|
-
|
|
3
|
-
export function printElement(elementToPrint) {
|
|
4
|
-
// 创建一个新的浏览器窗口
|
|
5
|
-
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
-
// 设置新窗口的文档内容
|
|
7
|
-
printWindow.document.write(`
|
|
8
|
-
<html>
|
|
9
|
-
<head>
|
|
10
|
-
<title>Print</title>
|
|
11
|
-
<style>
|
|
12
|
-
@page {
|
|
13
|
-
size: auto;
|
|
14
|
-
margin: 0mm;
|
|
15
|
-
}
|
|
16
|
-
html, body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
#print-container {
|
|
23
|
-
display: none
|
|
24
|
-
}
|
|
25
|
-
.img{
|
|
26
|
-
width: 95%;
|
|
27
|
-
height: 180px;
|
|
28
|
-
object-fit: cover;
|
|
29
|
-
}
|
|
30
|
-
.reportMain {
|
|
31
|
-
text-align: center;
|
|
32
|
-
margin: 0 auto;
|
|
33
|
-
font-size: 16px;
|
|
34
|
-
color: #000;
|
|
35
|
-
background-color: #fff;
|
|
36
|
-
border-radius: 8px;
|
|
37
|
-
|
|
38
|
-
.reportTitle {
|
|
39
|
-
font-weight: bold;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.subTitle {
|
|
43
|
-
display: flex;
|
|
44
|
-
justify-content: space-between;
|
|
45
|
-
margin-bottom: 1%;
|
|
46
|
-
|
|
47
|
-
.subTitleItems {
|
|
48
|
-
max-width: 30%;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.inputsDiv {
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: space-between;
|
|
55
|
-
.inputsDivItem {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
padding: 0 4px;
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
.inputsDivItemLabel {
|
|
61
|
-
padding: 0 4px;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.reportTable {
|
|
67
|
-
width: 100%;
|
|
68
|
-
border-collapse: collapse;
|
|
69
|
-
table-layout:fixed;
|
|
70
|
-
word-break:break-all;
|
|
71
|
-
text-align: center;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
.reportMainForDisplay {
|
|
75
|
-
text-align: center;
|
|
76
|
-
margin: 10% auto;
|
|
77
|
-
font-size: 16px;
|
|
78
|
-
color: #000;
|
|
79
|
-
background-color: #fff;
|
|
80
|
-
border-radius: 8px;
|
|
81
|
-
|
|
82
|
-
.reportTitle {
|
|
83
|
-
font-weight: bold;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.subTitle {
|
|
87
|
-
display: flex;
|
|
88
|
-
justify-content: space-between;
|
|
89
|
-
|
|
90
|
-
.subTitleItems {
|
|
91
|
-
max-width: 30%;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.inputsDiv {
|
|
96
|
-
display: flex;
|
|
97
|
-
justify-content: space-around;
|
|
98
|
-
.inputsDivItem {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
padding: 0 4px;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
.inputsDivItemLabel {
|
|
104
|
-
padding: 0 4px;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.reportTable {
|
|
110
|
-
width: 100%;
|
|
111
|
-
border-collapse: collapse;
|
|
112
|
-
table-layout:fixed;
|
|
113
|
-
word-break:break-all;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
.reportMainNoPadding {
|
|
117
|
-
text-align: center;
|
|
118
|
-
margin: 0 auto;
|
|
119
|
-
font-size: 16px;
|
|
120
|
-
color: #000;
|
|
121
|
-
background-color: #fff;
|
|
122
|
-
border-radius: 8px;
|
|
123
|
-
|
|
124
|
-
.reportTitle {
|
|
125
|
-
font-weight: bold;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.subTitle {
|
|
129
|
-
display: flex;
|
|
130
|
-
justify-content: space-between;
|
|
131
|
-
|
|
132
|
-
.subTitleItems {
|
|
133
|
-
max-width: 30%;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.inputsDiv {
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: space-between;
|
|
140
|
-
.inputsDivItem {
|
|
141
|
-
display: flex;
|
|
142
|
-
align-items: center;
|
|
143
|
-
padding: 0 4px;
|
|
144
|
-
white-space: nowrap;
|
|
145
|
-
.inputsDivItemLabel {
|
|
146
|
-
padding: 0 4px;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.reportTable {
|
|
152
|
-
width: 100%;
|
|
153
|
-
border-collapse: collapse;
|
|
154
|
-
table-layout:fixed;
|
|
155
|
-
word-break:break-all;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
.tools{
|
|
159
|
-
position: fixed;
|
|
160
|
-
right: 2%;
|
|
161
|
-
text-align: right;
|
|
162
|
-
width: 60%;
|
|
163
|
-
cursor: pointer;
|
|
164
|
-
.toolsItem{
|
|
165
|
-
width: 15%;
|
|
166
|
-
margin-right: 3%;
|
|
167
|
-
display: inline-block;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
</style>
|
|
171
|
-
</head>
|
|
172
|
-
<body>
|
|
173
|
-
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
174
|
-
${elementToPrint.innerHTML}
|
|
175
|
-
</body>
|
|
176
|
-
</html>
|
|
177
|
-
`)
|
|
178
|
-
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
179
|
-
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
180
|
-
setTimeout(() => {
|
|
181
|
-
printWindow.print() // 调用打印方法
|
|
182
|
-
printWindow.close()
|
|
183
|
-
}, 500) // 延迟500毫秒后执行打印
|
|
184
|
-
}
|
|
1
|
+
// print.js
|
|
2
|
+
|
|
3
|
+
export function printElement(elementToPrint) {
|
|
4
|
+
// 创建一个新的浏览器窗口
|
|
5
|
+
const printWindow = window.open('', '_blank', 'height=1024,width=768')
|
|
6
|
+
// 设置新窗口的文档内容
|
|
7
|
+
printWindow.document.write(`
|
|
8
|
+
<html>
|
|
9
|
+
<head>
|
|
10
|
+
<title>Print</title>
|
|
11
|
+
<style>
|
|
12
|
+
@page {
|
|
13
|
+
size: auto;
|
|
14
|
+
margin: 0mm;
|
|
15
|
+
}
|
|
16
|
+
html, body {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
#print-container {
|
|
23
|
+
display: none
|
|
24
|
+
}
|
|
25
|
+
.img{
|
|
26
|
+
width: 95%;
|
|
27
|
+
height: 180px;
|
|
28
|
+
object-fit: cover;
|
|
29
|
+
}
|
|
30
|
+
.reportMain {
|
|
31
|
+
text-align: center;
|
|
32
|
+
margin: 0 auto;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
color: #000;
|
|
35
|
+
background-color: #fff;
|
|
36
|
+
border-radius: 8px;
|
|
37
|
+
|
|
38
|
+
.reportTitle {
|
|
39
|
+
font-weight: bold;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.subTitle {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
margin-bottom: 1%;
|
|
46
|
+
|
|
47
|
+
.subTitleItems {
|
|
48
|
+
max-width: 30%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.inputsDiv {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
.inputsDivItem {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
padding: 0 4px;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
.inputsDivItemLabel {
|
|
61
|
+
padding: 0 4px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.reportTable {
|
|
67
|
+
width: 100%;
|
|
68
|
+
border-collapse: collapse;
|
|
69
|
+
table-layout:fixed;
|
|
70
|
+
word-break:break-all;
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
.reportMainForDisplay {
|
|
75
|
+
text-align: center;
|
|
76
|
+
margin: 10% auto;
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
color: #000;
|
|
79
|
+
background-color: #fff;
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
|
|
82
|
+
.reportTitle {
|
|
83
|
+
font-weight: bold;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.subTitle {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: space-between;
|
|
89
|
+
|
|
90
|
+
.subTitleItems {
|
|
91
|
+
max-width: 30%;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.inputsDiv {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: space-around;
|
|
98
|
+
.inputsDivItem {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
padding: 0 4px;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
.inputsDivItemLabel {
|
|
104
|
+
padding: 0 4px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.reportTable {
|
|
110
|
+
width: 100%;
|
|
111
|
+
border-collapse: collapse;
|
|
112
|
+
table-layout:fixed;
|
|
113
|
+
word-break:break-all;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.reportMainNoPadding {
|
|
117
|
+
text-align: center;
|
|
118
|
+
margin: 0 auto;
|
|
119
|
+
font-size: 16px;
|
|
120
|
+
color: #000;
|
|
121
|
+
background-color: #fff;
|
|
122
|
+
border-radius: 8px;
|
|
123
|
+
|
|
124
|
+
.reportTitle {
|
|
125
|
+
font-weight: bold;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.subTitle {
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: space-between;
|
|
131
|
+
|
|
132
|
+
.subTitleItems {
|
|
133
|
+
max-width: 30%;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.inputsDiv {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
.inputsDivItem {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
padding: 0 4px;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
.inputsDivItemLabel {
|
|
146
|
+
padding: 0 4px;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.reportTable {
|
|
152
|
+
width: 100%;
|
|
153
|
+
border-collapse: collapse;
|
|
154
|
+
table-layout:fixed;
|
|
155
|
+
word-break:break-all;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
.tools{
|
|
159
|
+
position: fixed;
|
|
160
|
+
right: 2%;
|
|
161
|
+
text-align: right;
|
|
162
|
+
width: 60%;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
.toolsItem{
|
|
165
|
+
width: 15%;
|
|
166
|
+
margin-right: 3%;
|
|
167
|
+
display: inline-block;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
</style>
|
|
171
|
+
</head>
|
|
172
|
+
<body>
|
|
173
|
+
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
|
174
|
+
${elementToPrint.innerHTML}
|
|
175
|
+
</body>
|
|
176
|
+
</html>
|
|
177
|
+
`)
|
|
178
|
+
// 延迟执行打印,以确保新窗口的内容已加载完成
|
|
179
|
+
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
|
180
|
+
setTimeout(() => {
|
|
181
|
+
printWindow.print() // 调用打印方法
|
|
182
|
+
printWindow.close()
|
|
183
|
+
}, 500) // 延迟500毫秒后执行打印
|
|
184
|
+
}
|
package/src/router/guards.ts
CHANGED
|
@@ -22,8 +22,6 @@ const loginIgnore = {
|
|
|
22
22
|
* @param next
|
|
23
23
|
*/
|
|
24
24
|
function loginGuard(to, from, next?) {
|
|
25
|
-
console.log('登录守卫==to', to)
|
|
26
|
-
console.log('登录守卫==from', from)
|
|
27
25
|
if (!loginIgnore.includes(to) && !useUserStore().getToken()) {
|
|
28
26
|
showToast({
|
|
29
27
|
message: '登录状态已失效,请重新登录!',
|
|
@@ -32,7 +30,6 @@ function loginGuard(to, from, next?) {
|
|
|
32
30
|
next({ path: '/login' })
|
|
33
31
|
}
|
|
34
32
|
else {
|
|
35
|
-
console.log('跳过了', useUserStore().getToken())
|
|
36
33
|
if (to.path === '/login' && useUserStore().getToken())
|
|
37
34
|
next({ path: '/' })
|
|
38
35
|
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 根据类型获取日期区间字符串
|
|
3
|
-
* @param type '当年' | 'curMonth' | '当日'
|
|
4
|
-
* @param show 区分实际值还是显示值, true为实际值, false为显示值
|
|
5
|
-
* @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
|
|
6
|
-
*/
|
|
7
|
-
export function getRangeByType(type: string, show: boolean): [string, string] {
|
|
8
|
-
const now = new Date()
|
|
9
|
-
const year = now.getFullYear()
|
|
10
|
-
const month = (now.getMonth() + 1).toString().padStart(2, '0')
|
|
11
|
-
const day = now.getDate().toString().padStart(2, '0')
|
|
12
|
-
|
|
13
|
-
if (!show) {
|
|
14
|
-
if (type === 'curYear') {
|
|
15
|
-
return [
|
|
16
|
-
`${year}-01-01 00:00:00`,
|
|
17
|
-
`${year}-12-31 23:59:59`,
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
if (type === 'curMonth') {
|
|
21
|
-
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
22
|
-
return [
|
|
23
|
-
`${year}-${month}-01 00:00:00`,
|
|
24
|
-
`${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
if (type === 'curDay') {
|
|
28
|
-
return [
|
|
29
|
-
`${year}-${month}-${day} 00:00:00`,
|
|
30
|
-
`${year}-${month}-${day} 23:59:59`,
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (show) {
|
|
35
|
-
if (type === 'curYear') {
|
|
36
|
-
return [
|
|
37
|
-
`${year}-01-01`,
|
|
38
|
-
`${year}-12-31`,
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
if (type === 'curMonth') {
|
|
42
|
-
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
43
|
-
return [
|
|
44
|
-
`${year}-${month}-01`,
|
|
45
|
-
`${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
if (type === 'curDay') {
|
|
49
|
-
return [
|
|
50
|
-
`${year}-${month}-${day}`,
|
|
51
|
-
`${year}-${month}-${day}`,
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// 兜底返回空字符串数组
|
|
56
|
-
return ['', '']
|
|
57
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 根据类型获取日期区间字符串
|
|
3
|
+
* @param type '当年' | 'curMonth' | '当日'
|
|
4
|
+
* @param show 区分实际值还是显示值, true为实际值, false为显示值
|
|
5
|
+
* @returns [start, end] 例:['2024-01-01 00:00:00', '2024-12-31 23:59:59']
|
|
6
|
+
*/
|
|
7
|
+
export function getRangeByType(type: string, show: boolean): [string, string] {
|
|
8
|
+
const now = new Date()
|
|
9
|
+
const year = now.getFullYear()
|
|
10
|
+
const month = (now.getMonth() + 1).toString().padStart(2, '0')
|
|
11
|
+
const day = now.getDate().toString().padStart(2, '0')
|
|
12
|
+
|
|
13
|
+
if (!show) {
|
|
14
|
+
if (type === 'curYear') {
|
|
15
|
+
return [
|
|
16
|
+
`${year}-01-01 00:00:00`,
|
|
17
|
+
`${year}-12-31 23:59:59`,
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
if (type === 'curMonth') {
|
|
21
|
+
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
22
|
+
return [
|
|
23
|
+
`${year}-${month}-01 00:00:00`,
|
|
24
|
+
`${year}-${month}-${lastDay.toString().padStart(2, '0')} 23:59:59`,
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
if (type === 'curDay') {
|
|
28
|
+
return [
|
|
29
|
+
`${year}-${month}-${day} 00:00:00`,
|
|
30
|
+
`${year}-${month}-${day} 23:59:59`,
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (show) {
|
|
35
|
+
if (type === 'curYear') {
|
|
36
|
+
return [
|
|
37
|
+
`${year}-01-01`,
|
|
38
|
+
`${year}-12-31`,
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
if (type === 'curMonth') {
|
|
42
|
+
const lastDay = new Date(year, now.getMonth() + 1, 0).getDate()
|
|
43
|
+
return [
|
|
44
|
+
`${year}-${month}-01`,
|
|
45
|
+
`${year}-${month}-${lastDay.toString().padStart(2, '0')}`,
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
if (type === 'curDay') {
|
|
49
|
+
return [
|
|
50
|
+
`${year}-${month}-${day}`,
|
|
51
|
+
`${year}-${month}-${day}`,
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// 兜底返回空字符串数组
|
|
56
|
+
return ['', '']
|
|
57
|
+
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import XCellList from '@af-mobile-client-vue3/components/data/XCellList/index.vue'
|
|
3
3
|
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
4
|
+
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
4
5
|
import { defineEmits, ref } from 'vue'
|
|
5
6
|
import { useRouter } from 'vue-router'
|
|
6
7
|
|
|
7
8
|
// 定义事件
|
|
8
9
|
const emit = defineEmits(['deleteRow'])
|
|
10
|
+
const userInfo = useUserStore().getUserInfo()
|
|
9
11
|
// 访问路由
|
|
10
12
|
const router = useRouter()
|
|
11
13
|
// 获取默认值
|
|
12
14
|
const idKey = ref('o_id')
|
|
13
15
|
|
|
14
16
|
// 简易crud表单测试
|
|
15
|
-
const configName = ref('
|
|
16
|
-
const serviceName = ref('af-
|
|
17
|
+
// const configName = ref('orderCarInMobileCRUD')
|
|
18
|
+
// const serviceName = ref('af-gaslink')
|
|
19
|
+
// const configName = ref('lngPriceManageMobileCRUD')
|
|
20
|
+
const configName = ref('测试')
|
|
21
|
+
const serviceName = ref('af-gaslink')
|
|
17
22
|
|
|
18
23
|
// 资源权限测试
|
|
19
24
|
// const configName = ref('crud_sources_test')
|
|
@@ -49,11 +54,11 @@ const serviceName = ref('af-system')
|
|
|
49
54
|
function toDetail(item) {
|
|
50
55
|
router.push({
|
|
51
56
|
name: 'XFormGroupView',
|
|
52
|
-
query: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
+
// query: {
|
|
58
|
+
// id: item[idKey.value],
|
|
59
|
+
// id: item.rr_id,
|
|
60
|
+
// o_id: item.o_id,
|
|
61
|
+
// },
|
|
57
62
|
})
|
|
58
63
|
}
|
|
59
64
|
|
|
@@ -69,19 +74,40 @@ function toDetail(item) {
|
|
|
69
74
|
// },
|
|
70
75
|
// })
|
|
71
76
|
// }
|
|
77
|
+
function addOption(callback) {
|
|
78
|
+
router.push({
|
|
79
|
+
name: 'XFormGroupView',
|
|
80
|
+
// params: { id: totalCount.value },
|
|
81
|
+
// query: {
|
|
82
|
+
// configName: configName.value,
|
|
83
|
+
// serviceName: serviceName.value,
|
|
84
|
+
// mode: '新增',
|
|
85
|
+
// },
|
|
86
|
+
})
|
|
87
|
+
// 如果存在回调函数,调用它并传递true表示已处理
|
|
88
|
+
if (typeof callback === 'function') {
|
|
89
|
+
callback(true)
|
|
90
|
+
}
|
|
91
|
+
}
|
|
72
92
|
|
|
73
93
|
// 修改功能
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
//
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
|
|
94
|
+
function updateRow(result, callback) {
|
|
95
|
+
console.log('用户----', userInfo)
|
|
96
|
+
router.push({
|
|
97
|
+
name: 'XFormGroupView',
|
|
98
|
+
// params: { id: result.o_id, openid: result.o_id },
|
|
99
|
+
// query: {
|
|
100
|
+
// configName: configName.value,
|
|
101
|
+
// serviceName: serviceName.value,
|
|
102
|
+
// mode: '修改',
|
|
103
|
+
// },
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
// 如果存在回调函数,调用它并传递true表示已处理
|
|
107
|
+
if (typeof callback === 'function') {
|
|
108
|
+
callback(true)
|
|
109
|
+
}
|
|
110
|
+
}
|
|
85
111
|
|
|
86
112
|
// 删除功能
|
|
87
113
|
function deleteRow(result) {
|
|
@@ -95,11 +121,23 @@ function deleteRow(result) {
|
|
|
95
121
|
<XCellList
|
|
96
122
|
:config-name="configName"
|
|
97
123
|
:service-name="serviceName"
|
|
98
|
-
:fix-query-form="{ o_f_oper_name: 'edu_test' }"
|
|
99
124
|
:id-key="idKey"
|
|
100
125
|
@to-detail="toDetail"
|
|
101
126
|
@delete-row="deleteRow"
|
|
127
|
+
@update="updateRow"
|
|
128
|
+
@add="addOption"
|
|
102
129
|
/>
|
|
130
|
+
|
|
131
|
+
<!-- :fix-query-form="{ u_f_price_state: ['生效', '待生效'] }" -->
|
|
132
|
+
|
|
133
|
+
<!-- <XCellList -->
|
|
134
|
+
<!-- :config-name="configName" -->
|
|
135
|
+
<!-- :service-name="serviceName" -->
|
|
136
|
+
<!-- :fix-query-form="{ o_f_oper_name: 'edu_test' }" -->
|
|
137
|
+
<!-- :id-key="idKey" -->
|
|
138
|
+
<!-- @to-detail="toDetail" -->
|
|
139
|
+
<!-- @delete-row="deleteRow" -->
|
|
140
|
+
<!-- /> -->
|
|
103
141
|
</template>
|
|
104
142
|
</NormalDataLayout>
|
|
105
143
|
</template>
|
|
@@ -5,16 +5,19 @@ import { showDialog } from 'vant'
|
|
|
5
5
|
import { ref } from 'vue'
|
|
6
6
|
import { useRoute } from 'vue-router'
|
|
7
7
|
|
|
8
|
+
// const configName = ref('reviewFormGroup')
|
|
9
|
+
// const serviceName = ref('af-revenue')
|
|
10
|
+
|
|
8
11
|
// 纯表单
|
|
9
|
-
const configName = ref('form_check_test')
|
|
10
|
-
const serviceName = ref('af-system')
|
|
12
|
+
// const configName = ref('form_check_test')
|
|
13
|
+
// const serviceName = ref('af-system')
|
|
11
14
|
|
|
12
15
|
// const configName = ref("计划下发Form")
|
|
13
16
|
// const serviceName = ref("af-linepatrol")
|
|
14
17
|
|
|
15
18
|
// 表单组
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
const configName = ref('lngChargeAuditMobileFormGroup')
|
|
20
|
+
const serviceName = ref('af-gaslink')
|
|
18
21
|
|
|
19
22
|
const formData = ref({})
|
|
20
23
|
const formGroup = ref(null)
|
package/tsconfig.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"jsx": "preserve",
|
|
5
|
-
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
|
|
6
|
-
"experimentalDecorators": true,
|
|
7
|
-
"baseUrl": ".",
|
|
8
|
-
"module": "esnext",
|
|
9
|
-
"moduleResolution": "Bundler",
|
|
10
|
-
"paths": {
|
|
11
|
-
"@af-mobile-client-vue3/*": ["src/*"]
|
|
12
|
-
},
|
|
13
|
-
"types": [
|
|
14
|
-
"node",
|
|
15
|
-
"unplugin-vue-router/client",
|
|
16
|
-
"vite-plugin-vue-layouts/client",
|
|
17
|
-
"vite-plugin-pwa/client"
|
|
18
|
-
],
|
|
19
|
-
"allowJs": true,
|
|
20
|
-
"strictNullChecks": false,
|
|
21
|
-
"noImplicitAny": false,
|
|
22
|
-
"noUnusedLocals": false,
|
|
23
|
-
"noUnusedParameters": false,
|
|
24
|
-
"importHelpers": true,
|
|
25
|
-
"sourceMap": true,
|
|
26
|
-
"allowSyntheticDefaultImports": true,
|
|
27
|
-
"esModuleInterop": true,
|
|
28
|
-
"verbatimModuleSyntax": true,
|
|
29
|
-
"skipLibCheck": true
|
|
30
|
-
},
|
|
31
|
-
"include": [
|
|
32
|
-
"src/App.vue",
|
|
33
|
-
"src/**/*.ts",
|
|
34
|
-
"src/**/*.tsx",
|
|
35
|
-
"src/**/*.vue",
|
|
36
|
-
"tests/**/*.ts",
|
|
37
|
-
"tests/**/*.tsx",
|
|
38
|
-
"src/components.d.ts",
|
|
39
|
-
"src/auto-imports.d.ts",
|
|
40
|
-
"src/typed-router.d.ts",
|
|
41
|
-
"tests/*.ts"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"jsx": "preserve",
|
|
5
|
+
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
|
|
6
|
+
"experimentalDecorators": true,
|
|
7
|
+
"baseUrl": ".",
|
|
8
|
+
"module": "esnext",
|
|
9
|
+
"moduleResolution": "Bundler",
|
|
10
|
+
"paths": {
|
|
11
|
+
"@af-mobile-client-vue3/*": ["src/*"]
|
|
12
|
+
},
|
|
13
|
+
"types": [
|
|
14
|
+
"node",
|
|
15
|
+
"unplugin-vue-router/client",
|
|
16
|
+
"vite-plugin-vue-layouts/client",
|
|
17
|
+
"vite-plugin-pwa/client"
|
|
18
|
+
],
|
|
19
|
+
"allowJs": true,
|
|
20
|
+
"strictNullChecks": false,
|
|
21
|
+
"noImplicitAny": false,
|
|
22
|
+
"noUnusedLocals": false,
|
|
23
|
+
"noUnusedParameters": false,
|
|
24
|
+
"importHelpers": true,
|
|
25
|
+
"sourceMap": true,
|
|
26
|
+
"allowSyntheticDefaultImports": true,
|
|
27
|
+
"esModuleInterop": true,
|
|
28
|
+
"verbatimModuleSyntax": true,
|
|
29
|
+
"skipLibCheck": true
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"src/App.vue",
|
|
33
|
+
"src/**/*.ts",
|
|
34
|
+
"src/**/*.tsx",
|
|
35
|
+
"src/**/*.vue",
|
|
36
|
+
"tests/**/*.ts",
|
|
37
|
+
"tests/**/*.tsx",
|
|
38
|
+
"src/components.d.ts",
|
|
39
|
+
"src/auto-imports.d.ts",
|
|
40
|
+
"src/typed-router.d.ts",
|
|
41
|
+
"tests/*.ts"
|
|
42
|
+
]
|
|
43
|
+
}
|