af-mobile-client-vue3 1.0.83 → 1.0.84-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/package.json +1 -1
- package/src/components/data/XCellList/XCellList.md +275 -275
- package/src/components/data/XFormItem/index.vue +0 -3
- package/src/components/data/XReportGrid/XAddReport/XAddReport.vue +208 -0
- package/src/components/data/XReportGrid/XAddReport/index.js +3 -0
- package/src/components/data/XReportGrid/XAddReport/index.md +56 -0
- package/src/components/data/XReportGrid/XAddReport/index.ts +10 -0
- package/src/components/data/XReportGrid/XReport.vue +972 -0
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -0
- package/src/components/data/XReportGrid/XReportDesign.vue +597 -0
- package/src/components/data/XReportGrid/XReportDrawer/XReportDrawer.vue +154 -0
- package/src/components/data/XReportGrid/XReportDrawer/index.js +3 -0
- package/src/components/data/XReportGrid/XReportDrawer/index.ts +10 -0
- package/src/components/data/XReportGrid/XReportJsonRender.vue +386 -0
- package/src/components/data/XReportGrid/XReportTrGroup.vue +589 -0
- package/src/components/data/XReportGrid/index.md +44 -0
- package/src/components/data/XReportGrid/index.ts +10 -0
- package/src/components/data/XReportGrid/print.js +184 -0
- package/src/router/routes.ts +13 -1
- package/src/views/component/XCellListView/index.vue +10 -18
- package/src/views/component/XFormGroupView/index.vue +6 -15
- package/src/views/component/XReportGridView/index.vue +14 -0
- package/src/views/component/index.vue +4 -0
- package/src/views/component/test/index.vue +52 -0
- package/tsconfig.json +43 -43
|
@@ -0,0 +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
|
+
}
|
package/src/router/routes.ts
CHANGED
|
@@ -12,7 +12,9 @@ import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
|
|
|
12
12
|
import SingleLayout from '@af-mobile-client-vue3/layout/SingleLayout.vue'
|
|
13
13
|
import XFormGroupView from '@af-mobile-client-vue3/views/component/XFormGroupView/index.vue'
|
|
14
14
|
import XSignatureView from '@af-mobile-client-vue3/views/component/XSignatureView/index.vue'
|
|
15
|
+
import XReportGridView from '@af-mobile-client-vue3/views/component/XReportGridView/index.vue'
|
|
15
16
|
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
|
|
17
|
+
import XReport from '@af-mobile-client-vue3/components/data/XReportGrid/XReport.vue'
|
|
16
18
|
|
|
17
19
|
const routes: Array<RouteRecordRaw> = [
|
|
18
20
|
{
|
|
@@ -62,7 +64,7 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
62
64
|
component: XCellDetailView,
|
|
63
65
|
},
|
|
64
66
|
{
|
|
65
|
-
path: '/Component/XFormGroupView
|
|
67
|
+
path: '/Component/XFormGroupView',
|
|
66
68
|
name: 'XFormGroupView',
|
|
67
69
|
component: XFormGroupView,
|
|
68
70
|
},
|
|
@@ -98,6 +100,16 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
98
100
|
name: 'XSignatureView',
|
|
99
101
|
component: XSignatureView,
|
|
100
102
|
},
|
|
103
|
+
{
|
|
104
|
+
path: '/Component/XReportGridView',
|
|
105
|
+
name: 'XReportGridView',
|
|
106
|
+
component: XReportGridView,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
path: '/Component/XReport',
|
|
110
|
+
name: 'XReport',
|
|
111
|
+
component: XReport,
|
|
112
|
+
},
|
|
101
113
|
],
|
|
102
114
|
},
|
|
103
115
|
{
|
|
@@ -12,10 +12,8 @@ const router = useRouter()
|
|
|
12
12
|
const idKey = ref('o_id')
|
|
13
13
|
|
|
14
14
|
// 简易crud表单测试
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const configName = ref('saleOrderAuditMobileCRUD')
|
|
18
|
-
const serviceName = ref('af-gaslink')
|
|
15
|
+
const configName = ref('crud_oper_log_manage')
|
|
16
|
+
const serviceName = ref('af-system')
|
|
19
17
|
|
|
20
18
|
// 资源权限测试
|
|
21
19
|
// const configName = ref('crud_sources_test')
|
|
@@ -51,12 +49,11 @@ const serviceName = ref('af-gaslink')
|
|
|
51
49
|
function toDetail(item) {
|
|
52
50
|
router.push({
|
|
53
51
|
name: 'XFormGroupView',
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
params: { id: item.u_id },
|
|
52
|
+
query: {
|
|
53
|
+
id: item[idKey.value],
|
|
54
|
+
// id: item.rr_id,
|
|
55
|
+
// o_id: item.o_id,
|
|
56
|
+
},
|
|
60
57
|
})
|
|
61
58
|
}
|
|
62
59
|
|
|
@@ -98,16 +95,11 @@ function deleteRow(result) {
|
|
|
98
95
|
<XCellList
|
|
99
96
|
:config-name="configName"
|
|
100
97
|
:service-name="serviceName"
|
|
98
|
+
:fix-query-form="{ o_f_oper_name: 'edu_test' }"
|
|
99
|
+
:id-key="idKey"
|
|
101
100
|
@to-detail="toDetail"
|
|
101
|
+
@delete-row="deleteRow"
|
|
102
102
|
/>
|
|
103
|
-
<!-- <XCellList-->
|
|
104
|
-
<!-- :config-name="configName"-->
|
|
105
|
-
<!-- :service-name="serviceName"-->
|
|
106
|
-
<!-- :fix-query-form="{ o_f_oper_name: 'edu_test' }"-->
|
|
107
|
-
<!-- :id-key="idKey"-->
|
|
108
|
-
<!-- @to-detail="toDetail"-->
|
|
109
|
-
<!-- @delete-row="deleteRow"-->
|
|
110
|
-
<!-- />-->
|
|
111
103
|
</template>
|
|
112
104
|
</NormalDataLayout>
|
|
113
105
|
</template>
|
|
@@ -4,13 +4,10 @@ import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDat
|
|
|
4
4
|
import { onBeforeMount, onMounted, ref } from 'vue'
|
|
5
5
|
import { showDialog } from 'vant'
|
|
6
6
|
import { useRoute } from 'vue-router'
|
|
7
|
-
import { runLogic } from '@af-mobile-client-vue3/services/api/common'
|
|
8
7
|
|
|
9
8
|
// 纯表单
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const configName = ref('salesOrderReviewFormGroup')
|
|
13
|
-
const serviceName = ref('af-gaslink')
|
|
9
|
+
const configName = ref('form_check_test')
|
|
10
|
+
const serviceName = ref('af-system')
|
|
14
11
|
|
|
15
12
|
// const configName = ref("计划下发Form")
|
|
16
13
|
// const serviceName = ref("af-linepatrol")
|
|
@@ -54,15 +51,10 @@ function submit(_result) {
|
|
|
54
51
|
// isInit.value = true
|
|
55
52
|
// })
|
|
56
53
|
// }
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
}
|
|
63
|
-
onBeforeMount(() => {
|
|
64
|
-
initComponents()
|
|
65
|
-
})
|
|
54
|
+
|
|
55
|
+
// onBeforeMount(() => {
|
|
56
|
+
// initComponents()
|
|
57
|
+
// })
|
|
66
58
|
</script>
|
|
67
59
|
|
|
68
60
|
<template>
|
|
@@ -70,7 +62,6 @@ onBeforeMount(() => {
|
|
|
70
62
|
<template #layout_content>
|
|
71
63
|
<!-- v-if="isInit" -->
|
|
72
64
|
<XFormGroup
|
|
73
|
-
v-if="isInit"
|
|
74
65
|
ref="formGroup"
|
|
75
66
|
:config-name="configName"
|
|
76
67
|
:service-name="serviceName"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import XReport from '@af-mobile-client-vue3/components/data/XReportGrid/XReport.vue'
|
|
4
|
+
|
|
5
|
+
// const configName = ref('detailsaddChargesCover')
|
|
6
|
+
const configName = ref('outpatientNurseCover')
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<XReport :config-name="configName" server-name="af-his" />
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style scoped lang="less">
|
|
14
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Tabs as VanTabs,
|
|
4
|
+
Tab as VanTab,
|
|
5
|
+
Row as VanRow,
|
|
6
|
+
Button as VanButton
|
|
7
|
+
} from 'vant'
|
|
8
|
+
import { defineProps, watchEffect, onBeforeMount, ref, onMounted, watch, defineEmits } from 'vue'
|
|
9
|
+
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
10
|
+
import XFormView from '@af-mobile-client-vue3/views/component/XFormView/index.vue'
|
|
11
|
+
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'
|
|
12
|
+
import { runLogic } from '@af-mobile-client-vue3/services/api/common'
|
|
13
|
+
import { useRoute } from 'vue-router'
|
|
14
|
+
import {getConfigByName, query} from '@af-mobile-client-vue3/services/api/common'
|
|
15
|
+
|
|
16
|
+
const router = useRoute()
|
|
17
|
+
const formData = ref({})
|
|
18
|
+
function initComponents () {
|
|
19
|
+
console.log('router.params=', router.params)
|
|
20
|
+
runLogic('getLngPurchaseOrderAuditGroupData', {id: router.params?.id}).then((res) => {
|
|
21
|
+
console.log('调用logic完成==',res)
|
|
22
|
+
formData.value = {...res}
|
|
23
|
+
console.log('赋值完成===', formData.value)
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
onBeforeMount(()=>{
|
|
27
|
+
initComponents()
|
|
28
|
+
})
|
|
29
|
+
const submit = (formData) => {
|
|
30
|
+
console.log('提交表单===', formData)
|
|
31
|
+
const param = {
|
|
32
|
+
type: formData.value.auditInfo.f_approval_status === '审核未通过' ? 0 : 1,
|
|
33
|
+
approval_date:'',
|
|
34
|
+
approval_remark:formData.value.auditInfo.f_approval_status,
|
|
35
|
+
approval_operator:useUserStore.getUserInfo?.name,
|
|
36
|
+
approval_operatorid: useUserStore.getUserInfo?.id,
|
|
37
|
+
record: {od_id:1}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
|
|
44
|
+
<NormalDataLayout id="XCellListView" title="采购审核">
|
|
45
|
+
<template #layout_content>
|
|
46
|
+
<XFormView :config-name="'lngPurchaseOrderFormGroup'" @submit="submit" :group-form-data="formData"/>
|
|
47
|
+
</template>
|
|
48
|
+
</NormalDataLayout>
|
|
49
|
+
</template>
|
|
50
|
+
<style scoped lang="less">
|
|
51
|
+
|
|
52
|
+
</style>
|
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
|
+
}
|