vue2-client 1.16.27 → 1.16.29
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 +112 -112
- package/src/base-client/components/common/HIS/HForm/HForm.vue +1 -1
- package/src/base-client/components/common/Upload/Upload.vue +333 -333
- package/src/base-client/components/common/XForm/XFormItem.vue +1504 -1504
- package/src/base-client/components/common/XFormTable/demo.vue +16 -45
- package/src/base-client/components/common/XReport/print.js +186 -186
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +4 -1
- package/src/components/FileImageItem/FileItem.vue +320 -320
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +1766 -1766
- package/src/router/guards.js +7 -2
- package/src/services/api/common.js +4 -0
- package/src/utils/map-utils.js +47 -47
@@ -1,15 +1,15 @@
|
|
1
1
|
<template>
|
2
2
|
<a-card :bordered="false">
|
3
|
+
<x-add-native-form ref="nativeForm"/>
|
4
|
+
<hr>
|
5
|
+
<hr>
|
6
|
+
<hr>
|
3
7
|
<x-form-table
|
4
8
|
title="示例表单"
|
5
9
|
:queryParamsName="queryParamsName"
|
6
10
|
:fixedAddForm="fixedAddForm"
|
7
|
-
:x-tree-config-name="xTreeConfigName"
|
8
11
|
:externalSelectedRowKeys="selectedKeys"
|
9
|
-
|
10
|
-
@selectRow="selectRow"
|
11
|
-
@columnClick="columnClick"
|
12
|
-
serviceName="af-revenue"
|
12
|
+
serviceName="af-linepatrol"
|
13
13
|
ref="xFormTable">
|
14
14
|
</x-form-table>
|
15
15
|
</a-card>
|
@@ -17,19 +17,20 @@
|
|
17
17
|
|
18
18
|
<script>
|
19
19
|
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'
|
20
|
-
import
|
20
|
+
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
|
21
|
+
import { getConfigByName } from '@/services/api/common'
|
21
22
|
|
22
23
|
export default {
|
23
24
|
name: 'Demo',
|
24
25
|
components: {
|
25
|
-
XFormTable
|
26
|
+
XFormTable,
|
27
|
+
XAddNativeForm
|
26
28
|
},
|
27
29
|
data () {
|
28
30
|
return {
|
29
31
|
// 查询配置文件名
|
30
|
-
queryParamsName: '
|
31
|
-
//
|
32
|
-
xTreeConfigName: 'addressType',
|
32
|
+
queryParamsName: 'crud_device_base_manage',
|
33
|
+
// queryParamsName: 'crud_patroltask_manage',
|
33
34
|
// 新增表单固定值
|
34
35
|
fixedAddForm: {},
|
35
36
|
// 是否显示详情抽屉
|
@@ -44,42 +45,12 @@ export default {
|
|
44
45
|
}
|
45
46
|
}
|
46
47
|
},
|
48
|
+
mounted () {
|
49
|
+
getConfigByName('editAdjustableTableForm', 'af-revenue', (res) => {
|
50
|
+
this.$refs.nativeForm.init(res)
|
51
|
+
})
|
52
|
+
},
|
47
53
|
methods: {
|
48
|
-
test () {
|
49
|
-
this.$refs.xFormTable.setTableData([])
|
50
|
-
},
|
51
|
-
defaultF () {
|
52
|
-
this.$refs.xFormTable.setTableSize('default')
|
53
|
-
},
|
54
|
-
middleF () {
|
55
|
-
this.$refs.xFormTable.setTableSize('middle')
|
56
|
-
},
|
57
|
-
smallF () {
|
58
|
-
this.$refs.xFormTable.setTableSize('small')
|
59
|
-
},
|
60
|
-
columnClick (key, value, record) {
|
61
|
-
microDispatch({
|
62
|
-
type: 'v3route',
|
63
|
-
path: '/bingliguanli/dianzibingliluru',
|
64
|
-
props: { selected: arguments[0].his_f_admission_id }
|
65
|
-
})
|
66
|
-
},
|
67
|
-
action (record, id, actionType) {
|
68
|
-
this.detailVisible = true
|
69
|
-
console.log('触发了详情操作', record, id, actionType)
|
70
|
-
},
|
71
|
-
onClose () {
|
72
|
-
this.detailVisible = false
|
73
|
-
// 关闭详情之后重新查询表单
|
74
|
-
this.$refs.xFormTable.refreshTable(true)
|
75
|
-
},
|
76
|
-
selectRow (selectedRowKeys, selectedRows) {
|
77
|
-
this.selected = {
|
78
|
-
keys: selectedRowKeys,
|
79
|
-
rows: selectedRows
|
80
|
-
}
|
81
|
-
console.log('selectedDemo', this.selected)
|
82
|
-
},
|
83
54
|
},
|
84
55
|
computed: {},
|
85
56
|
}
|
@@ -1,186 +1,186 @@
|
|
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
|
-
padding: 15px;
|
37
|
-
border-radius: 8px;
|
38
|
-
|
39
|
-
.reportTitle {
|
40
|
-
font-weight: bold;
|
41
|
-
}
|
42
|
-
|
43
|
-
.subTitle {
|
44
|
-
display: flex;
|
45
|
-
justify-content: space-between;
|
46
|
-
margin-bottom: 1%;
|
47
|
-
|
48
|
-
.subTitleItems {
|
49
|
-
max-width: 30%;
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
.inputsDiv {
|
54
|
-
display: flex;
|
55
|
-
justify-content: space-between;
|
56
|
-
.inputsDivItem {
|
57
|
-
display: flex;
|
58
|
-
align-items: center;
|
59
|
-
padding: 0 4px;
|
60
|
-
white-space: nowrap;
|
61
|
-
.inputsDivItemLabel {
|
62
|
-
padding: 0 4px;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
.reportTable {
|
68
|
-
width: 100%;
|
69
|
-
border-collapse: collapse;
|
70
|
-
table-layout:fixed;
|
71
|
-
word-break:break-all;
|
72
|
-
text-align: center;
|
73
|
-
}
|
74
|
-
}
|
75
|
-
.reportMainForDisplay {
|
76
|
-
text-align: center;
|
77
|
-
margin: 10% auto;
|
78
|
-
font-size: 16px;
|
79
|
-
color: #000;
|
80
|
-
background-color: #fff;
|
81
|
-
padding: 15px;
|
82
|
-
border-radius: 8px;
|
83
|
-
|
84
|
-
.reportTitle {
|
85
|
-
font-weight: bold;
|
86
|
-
}
|
87
|
-
|
88
|
-
.subTitle {
|
89
|
-
display: flex;
|
90
|
-
justify-content: space-between;
|
91
|
-
|
92
|
-
.subTitleItems {
|
93
|
-
max-width: 30%;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
|
97
|
-
.inputsDiv {
|
98
|
-
display: flex;
|
99
|
-
justify-content: space-around;
|
100
|
-
.inputsDivItem {
|
101
|
-
display: flex;
|
102
|
-
align-items: center;
|
103
|
-
padding: 0 4px;
|
104
|
-
white-space: nowrap;
|
105
|
-
.inputsDivItemLabel {
|
106
|
-
padding: 0 4px;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
}
|
110
|
-
|
111
|
-
.reportTable {
|
112
|
-
width: 100%;
|
113
|
-
border-collapse: collapse;
|
114
|
-
table-layout:fixed;
|
115
|
-
word-break:break-all;
|
116
|
-
}
|
117
|
-
}
|
118
|
-
.reportMainNoPadding {
|
119
|
-
text-align: center;
|
120
|
-
margin: 0 auto;
|
121
|
-
font-size: 16px;
|
122
|
-
color: #000;
|
123
|
-
background-color: #fff;
|
124
|
-
border-radius: 8px;
|
125
|
-
|
126
|
-
.reportTitle {
|
127
|
-
font-weight: bold;
|
128
|
-
}
|
129
|
-
|
130
|
-
.subTitle {
|
131
|
-
display: flex;
|
132
|
-
justify-content: space-between;
|
133
|
-
|
134
|
-
.subTitleItems {
|
135
|
-
max-width: 30%;
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
.inputsDiv {
|
140
|
-
display: flex;
|
141
|
-
justify-content: space-between;
|
142
|
-
.inputsDivItem {
|
143
|
-
display: flex;
|
144
|
-
align-items: center;
|
145
|
-
padding: 0 4px;
|
146
|
-
white-space: nowrap;
|
147
|
-
.inputsDivItemLabel {
|
148
|
-
padding: 0 4px;
|
149
|
-
}
|
150
|
-
}
|
151
|
-
}
|
152
|
-
|
153
|
-
.reportTable {
|
154
|
-
width: 100%;
|
155
|
-
border-collapse: collapse;
|
156
|
-
table-layout:fixed;
|
157
|
-
word-break:break-all;
|
158
|
-
}
|
159
|
-
}
|
160
|
-
.tools{
|
161
|
-
position: fixed;
|
162
|
-
right: 2%;
|
163
|
-
text-align: right;
|
164
|
-
width: 60%;
|
165
|
-
cursor: pointer;
|
166
|
-
.toolsItem{
|
167
|
-
width: 15%;
|
168
|
-
margin-right: 3%;
|
169
|
-
display: inline-block;
|
170
|
-
}
|
171
|
-
}
|
172
|
-
</style>
|
173
|
-
</head>
|
174
|
-
<body>
|
175
|
-
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
176
|
-
${elementToPrint.innerHTML}
|
177
|
-
</body>
|
178
|
-
</html>
|
179
|
-
`)
|
180
|
-
// 延迟执行打印,以确保新窗口的内容已加载完成
|
181
|
-
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
182
|
-
setTimeout(() => {
|
183
|
-
printWindow.print() // 调用打印方法
|
184
|
-
printWindow.close()
|
185
|
-
}, 500) // 延迟500毫秒后执行打印
|
186
|
-
}
|
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
|
+
padding: 15px;
|
37
|
+
border-radius: 8px;
|
38
|
+
|
39
|
+
.reportTitle {
|
40
|
+
font-weight: bold;
|
41
|
+
}
|
42
|
+
|
43
|
+
.subTitle {
|
44
|
+
display: flex;
|
45
|
+
justify-content: space-between;
|
46
|
+
margin-bottom: 1%;
|
47
|
+
|
48
|
+
.subTitleItems {
|
49
|
+
max-width: 30%;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.inputsDiv {
|
54
|
+
display: flex;
|
55
|
+
justify-content: space-between;
|
56
|
+
.inputsDivItem {
|
57
|
+
display: flex;
|
58
|
+
align-items: center;
|
59
|
+
padding: 0 4px;
|
60
|
+
white-space: nowrap;
|
61
|
+
.inputsDivItemLabel {
|
62
|
+
padding: 0 4px;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
.reportTable {
|
68
|
+
width: 100%;
|
69
|
+
border-collapse: collapse;
|
70
|
+
table-layout:fixed;
|
71
|
+
word-break:break-all;
|
72
|
+
text-align: center;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
.reportMainForDisplay {
|
76
|
+
text-align: center;
|
77
|
+
margin: 10% auto;
|
78
|
+
font-size: 16px;
|
79
|
+
color: #000;
|
80
|
+
background-color: #fff;
|
81
|
+
padding: 15px;
|
82
|
+
border-radius: 8px;
|
83
|
+
|
84
|
+
.reportTitle {
|
85
|
+
font-weight: bold;
|
86
|
+
}
|
87
|
+
|
88
|
+
.subTitle {
|
89
|
+
display: flex;
|
90
|
+
justify-content: space-between;
|
91
|
+
|
92
|
+
.subTitleItems {
|
93
|
+
max-width: 30%;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
.inputsDiv {
|
98
|
+
display: flex;
|
99
|
+
justify-content: space-around;
|
100
|
+
.inputsDivItem {
|
101
|
+
display: flex;
|
102
|
+
align-items: center;
|
103
|
+
padding: 0 4px;
|
104
|
+
white-space: nowrap;
|
105
|
+
.inputsDivItemLabel {
|
106
|
+
padding: 0 4px;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
.reportTable {
|
112
|
+
width: 100%;
|
113
|
+
border-collapse: collapse;
|
114
|
+
table-layout:fixed;
|
115
|
+
word-break:break-all;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
.reportMainNoPadding {
|
119
|
+
text-align: center;
|
120
|
+
margin: 0 auto;
|
121
|
+
font-size: 16px;
|
122
|
+
color: #000;
|
123
|
+
background-color: #fff;
|
124
|
+
border-radius: 8px;
|
125
|
+
|
126
|
+
.reportTitle {
|
127
|
+
font-weight: bold;
|
128
|
+
}
|
129
|
+
|
130
|
+
.subTitle {
|
131
|
+
display: flex;
|
132
|
+
justify-content: space-between;
|
133
|
+
|
134
|
+
.subTitleItems {
|
135
|
+
max-width: 30%;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
.inputsDiv {
|
140
|
+
display: flex;
|
141
|
+
justify-content: space-between;
|
142
|
+
.inputsDivItem {
|
143
|
+
display: flex;
|
144
|
+
align-items: center;
|
145
|
+
padding: 0 4px;
|
146
|
+
white-space: nowrap;
|
147
|
+
.inputsDivItemLabel {
|
148
|
+
padding: 0 4px;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
.reportTable {
|
154
|
+
width: 100%;
|
155
|
+
border-collapse: collapse;
|
156
|
+
table-layout:fixed;
|
157
|
+
word-break:break-all;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
.tools{
|
161
|
+
position: fixed;
|
162
|
+
right: 2%;
|
163
|
+
text-align: right;
|
164
|
+
width: 60%;
|
165
|
+
cursor: pointer;
|
166
|
+
.toolsItem{
|
167
|
+
width: 15%;
|
168
|
+
margin-right: 3%;
|
169
|
+
display: inline-block;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
</style>
|
173
|
+
</head>
|
174
|
+
<body>
|
175
|
+
<!-- 将需要打印的元素内容复制到新窗口中 -->
|
176
|
+
${elementToPrint.innerHTML}
|
177
|
+
</body>
|
178
|
+
</html>
|
179
|
+
`)
|
180
|
+
// 延迟执行打印,以确保新窗口的内容已加载完成
|
181
|
+
printWindow.document.close() // 关闭文档流,确保内容完全加载
|
182
|
+
setTimeout(() => {
|
183
|
+
printWindow.print() // 调用打印方法
|
184
|
+
printWindow.close()
|
185
|
+
}, 500) // 延迟500毫秒后执行打印
|
186
|
+
}
|
@@ -420,7 +420,10 @@ export default {
|
|
420
420
|
}
|
421
421
|
if (cell.slotType === 'x-report') {
|
422
422
|
const param = { ...this.mixinData }
|
423
|
-
this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init(
|
423
|
+
this.$refs[`dynamicComponent_${cell.slotRef || cellIndex}`][0].init({
|
424
|
+
configName: cell.slotConfig,
|
425
|
+
configData: param
|
426
|
+
})
|
424
427
|
}
|
425
428
|
if (cell.slotType === 'x-conversation') {
|
426
429
|
getConfigByName(cell.slotConfig, cell.serviceName, (res) => {
|