vue2-client 1.13.28 → 1.13.30
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 +107 -107
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +174 -174
- package/src/base-client/components/common/XDescriptions/XDescriptionsGroup.vue +314 -314
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +5 -0
- package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +166 -166
- package/src/base-client/components/common/XTable/XTable.vue +2 -2
- package/src/base-client/components/common/XTable/XTableWrapper.vue +1 -0
- package/src/base-client/components/his/XHDescriptions/XHDescriptions.vue +9 -5
- package/src/base-client/components/his/XSidebar/XSidebar.vue +3 -3
- package/src/base-client/components/layout/XPageView/XPageView.vue +155 -155
- package/src/config/CreateQueryConfig.js +325 -325
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +875 -875
- package/src/pages/XTreeOneProExample/index.vue +67 -67
- package/src/router/async/router.map.js +2 -2
- package/src/utils/request.js +1 -1
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<a-row type="flex" justfy="space-around">
|
|
4
|
-
<template v-for="(item, index) in config">
|
|
5
|
-
<!-- 展示项 -->
|
|
6
|
-
<a-col :key="'col' + index" :span="Math.floor(24 / config.length)">
|
|
7
|
-
<div class="item">
|
|
8
|
-
<!-- 标题 -->
|
|
9
|
-
<p class="label">{{ item.label }}</p>
|
|
10
|
-
<!-- 内容 - 进度条 -->
|
|
11
|
-
<template v-if="item.type === 'percent'">
|
|
12
|
-
<p class="value" :style="'color: ' + determineColor(data[item.key])">{{ data[item.key] }}%</p>
|
|
13
|
-
</template>
|
|
14
|
-
<!-- 内容 - 非进度条 -->
|
|
15
|
-
<template v-else>
|
|
16
|
-
<p class="value" :style="item.style ? item.style : ''">{{ data[item.key] }}</p>
|
|
17
|
-
</template>
|
|
18
|
-
</div>
|
|
19
|
-
</a-col>
|
|
20
|
-
<!-- 分割线 -->
|
|
21
|
-
<a-col :key="'col' + index + 'after'" :span="1" v-if="index !== config.length - 1" class="divider-col">
|
|
22
|
-
<a-divider type="vertical" class="divider"/>
|
|
23
|
-
</a-col>
|
|
24
|
-
</template>
|
|
25
|
-
</a-row>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
|
|
31
|
-
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
name: 'XSimpleDescriptions',
|
|
35
|
-
props: {
|
|
36
|
-
// 配置
|
|
37
|
-
dataConfig: {
|
|
38
|
-
type: Array,
|
|
39
|
-
default: undefined
|
|
40
|
-
},
|
|
41
|
-
// 数据
|
|
42
|
-
dataContent: {
|
|
43
|
-
type: Object,
|
|
44
|
-
default: undefined
|
|
45
|
-
},
|
|
46
|
-
// 配置名
|
|
47
|
-
dataConfigName: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: undefined
|
|
50
|
-
},
|
|
51
|
-
// 服务名
|
|
52
|
-
serviceName: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: process.env.VUE_APP_SYSTEM_NAME
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
data () {
|
|
58
|
-
return {
|
|
59
|
-
// 配置
|
|
60
|
-
config: [],
|
|
61
|
-
// 数据
|
|
62
|
-
data: {},
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
mounted () {
|
|
66
|
-
// 初始化配置
|
|
67
|
-
if (this.dataConfig) {
|
|
68
|
-
this.config = this.dataConfig
|
|
69
|
-
} else if (this.dataConfigName) {
|
|
70
|
-
getConfigByName(this.dataConfigName, this.serviceName, (res) => {
|
|
71
|
-
this.config = res.config
|
|
72
|
-
})
|
|
73
|
-
} else {
|
|
74
|
-
this.config = [
|
|
75
|
-
{
|
|
76
|
-
label: '未能正确获取配置',
|
|
77
|
-
key: 'totalUser'
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
label: '未能正确获取配置',
|
|
81
|
-
key: 'totalResidentArea'
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
label: '未能正确获取配置',
|
|
85
|
-
key: 'doneNum'
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
label: '未能正确获取配置',
|
|
89
|
-
key: 'todoNum'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: '未能正确获取配置',
|
|
93
|
-
key: 'ratio',
|
|
94
|
-
type: 'percent'
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// 初始化数据
|
|
100
|
-
if (this.dataContent) {
|
|
101
|
-
this.data = this.dataContent
|
|
102
|
-
} else {
|
|
103
|
-
this.data = {
|
|
104
|
-
totalUser: 0,
|
|
105
|
-
totalResidentArea: 0,
|
|
106
|
-
doneNum: 0,
|
|
107
|
-
todoNum: 0,
|
|
108
|
-
ratio: 20
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
methods: {
|
|
113
|
-
// 根据完成率决定颜色
|
|
114
|
-
determineColor (ratio) {
|
|
115
|
-
let result
|
|
116
|
-
if (ratio >= 90) {
|
|
117
|
-
result = 'rgb( 1,245, 38 )'
|
|
118
|
-
} else if (ratio >= 75) {
|
|
119
|
-
result = 'rgb( 139,245, 0)'
|
|
120
|
-
} else if (ratio >= 40) {
|
|
121
|
-
result = 'rgb(245,163, 0)'
|
|
122
|
-
} else if (ratio >= 20) {
|
|
123
|
-
result = 'rgb(244, 96, 0)'
|
|
124
|
-
} else {
|
|
125
|
-
result = 'rgb(255, 0, 0)'
|
|
126
|
-
}
|
|
127
|
-
return result
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
watch: {
|
|
131
|
-
dataContent: {
|
|
132
|
-
handler (newValue) {
|
|
133
|
-
this.data = newValue
|
|
134
|
-
},
|
|
135
|
-
deep: true
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
</script>
|
|
140
|
-
|
|
141
|
-
<style lang="less" scoped>
|
|
142
|
-
.item {
|
|
143
|
-
padding: 5%;
|
|
144
|
-
|
|
145
|
-
.label {
|
|
146
|
-
color: rgba(117, 117, 117, 0.8);
|
|
147
|
-
text-align: center;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.value {
|
|
151
|
-
color: rgb( 51,157,255 );
|
|
152
|
-
font-size: 1.6em;
|
|
153
|
-
text-align: center;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.divider-col {
|
|
158
|
-
display: flex;
|
|
159
|
-
justify-content: center;
|
|
160
|
-
|
|
161
|
-
.divider {
|
|
162
|
-
margin-top: 35%;
|
|
163
|
-
height: 40px;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a-row type="flex" justfy="space-around">
|
|
4
|
+
<template v-for="(item, index) in config">
|
|
5
|
+
<!-- 展示项 -->
|
|
6
|
+
<a-col :key="'col' + index" :span="Math.floor(24 / config.length)">
|
|
7
|
+
<div class="item">
|
|
8
|
+
<!-- 标题 -->
|
|
9
|
+
<p class="label">{{ item.label }}</p>
|
|
10
|
+
<!-- 内容 - 进度条 -->
|
|
11
|
+
<template v-if="item.type === 'percent'">
|
|
12
|
+
<p class="value" :style="'color: ' + determineColor(data[item.key])">{{ data[item.key] }}%</p>
|
|
13
|
+
</template>
|
|
14
|
+
<!-- 内容 - 非进度条 -->
|
|
15
|
+
<template v-else>
|
|
16
|
+
<p class="value" :style="item.style ? item.style : ''">{{ data[item.key] }}</p>
|
|
17
|
+
</template>
|
|
18
|
+
</div>
|
|
19
|
+
</a-col>
|
|
20
|
+
<!-- 分割线 -->
|
|
21
|
+
<a-col :key="'col' + index + 'after'" :span="1" v-if="index !== config.length - 1" class="divider-col">
|
|
22
|
+
<a-divider type="vertical" class="divider"/>
|
|
23
|
+
</a-col>
|
|
24
|
+
</template>
|
|
25
|
+
</a-row>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
|
|
31
|
+
import { getConfigByName } from '@vue2-client/services/api/common'
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'XSimpleDescriptions',
|
|
35
|
+
props: {
|
|
36
|
+
// 配置
|
|
37
|
+
dataConfig: {
|
|
38
|
+
type: Array,
|
|
39
|
+
default: undefined
|
|
40
|
+
},
|
|
41
|
+
// 数据
|
|
42
|
+
dataContent: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: undefined
|
|
45
|
+
},
|
|
46
|
+
// 配置名
|
|
47
|
+
dataConfigName: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: undefined
|
|
50
|
+
},
|
|
51
|
+
// 服务名
|
|
52
|
+
serviceName: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: process.env.VUE_APP_SYSTEM_NAME
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
data () {
|
|
58
|
+
return {
|
|
59
|
+
// 配置
|
|
60
|
+
config: [],
|
|
61
|
+
// 数据
|
|
62
|
+
data: {},
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
mounted () {
|
|
66
|
+
// 初始化配置
|
|
67
|
+
if (this.dataConfig) {
|
|
68
|
+
this.config = this.dataConfig
|
|
69
|
+
} else if (this.dataConfigName) {
|
|
70
|
+
getConfigByName(this.dataConfigName, this.serviceName, (res) => {
|
|
71
|
+
this.config = res.config
|
|
72
|
+
})
|
|
73
|
+
} else {
|
|
74
|
+
this.config = [
|
|
75
|
+
{
|
|
76
|
+
label: '未能正确获取配置',
|
|
77
|
+
key: 'totalUser'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: '未能正确获取配置',
|
|
81
|
+
key: 'totalResidentArea'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: '未能正确获取配置',
|
|
85
|
+
key: 'doneNum'
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: '未能正确获取配置',
|
|
89
|
+
key: 'todoNum'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: '未能正确获取配置',
|
|
93
|
+
key: 'ratio',
|
|
94
|
+
type: 'percent'
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 初始化数据
|
|
100
|
+
if (this.dataContent) {
|
|
101
|
+
this.data = this.dataContent
|
|
102
|
+
} else {
|
|
103
|
+
this.data = {
|
|
104
|
+
totalUser: 0,
|
|
105
|
+
totalResidentArea: 0,
|
|
106
|
+
doneNum: 0,
|
|
107
|
+
todoNum: 0,
|
|
108
|
+
ratio: 20
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
methods: {
|
|
113
|
+
// 根据完成率决定颜色
|
|
114
|
+
determineColor (ratio) {
|
|
115
|
+
let result
|
|
116
|
+
if (ratio >= 90) {
|
|
117
|
+
result = 'rgb( 1,245, 38 )'
|
|
118
|
+
} else if (ratio >= 75) {
|
|
119
|
+
result = 'rgb( 139,245, 0)'
|
|
120
|
+
} else if (ratio >= 40) {
|
|
121
|
+
result = 'rgb(245,163, 0)'
|
|
122
|
+
} else if (ratio >= 20) {
|
|
123
|
+
result = 'rgb(244, 96, 0)'
|
|
124
|
+
} else {
|
|
125
|
+
result = 'rgb(255, 0, 0)'
|
|
126
|
+
}
|
|
127
|
+
return result
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
watch: {
|
|
131
|
+
dataContent: {
|
|
132
|
+
handler (newValue) {
|
|
133
|
+
this.data = newValue
|
|
134
|
+
},
|
|
135
|
+
deep: true
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<style lang="less" scoped>
|
|
142
|
+
.item {
|
|
143
|
+
padding: 5%;
|
|
144
|
+
|
|
145
|
+
.label {
|
|
146
|
+
color: rgba(117, 117, 117, 0.8);
|
|
147
|
+
text-align: center;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.value {
|
|
151
|
+
color: rgb( 51,157,255 );
|
|
152
|
+
font-size: 1.6em;
|
|
153
|
+
text-align: center;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.divider-col {
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
|
|
161
|
+
.divider {
|
|
162
|
+
margin-top: 35%;
|
|
163
|
+
height: 40px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
</style>
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</a-row>
|
|
150
150
|
<!-- 如果当前是表格模式 -->
|
|
151
151
|
<template v-if="isTableMode">
|
|
152
|
-
<x-table-wrapper ref="table">
|
|
152
|
+
<x-table-wrapper ref="table" @rowClick="handleRowClick">
|
|
153
153
|
<template slot="expandedRowRender">
|
|
154
154
|
<!-- 列扩展栅格 -->
|
|
155
155
|
<x-report
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
ref="exportExcel"
|
|
251
251
|
/>
|
|
252
252
|
<a-modal @cancel="$refs.table.refresh()" v-model="selectedRowModalVisible" width="80vw" title="已选中数据" :footer="null">
|
|
253
|
-
<x-table-wrapper ref="selectedDataTable" :load-selected-data="true"></x-table-wrapper>
|
|
253
|
+
<x-table-wrapper ref="selectedDataTable" :load-selected-data="true" @rowClick="handleRowClick"></x-table-wrapper>
|
|
254
254
|
</a-modal>
|
|
255
255
|
</div>
|
|
256
256
|
</template>
|
|
@@ -293,22 +293,23 @@ export default {
|
|
|
293
293
|
:deep(.ant-descriptions-row) {
|
|
294
294
|
display: flex;
|
|
295
295
|
flex-direction: row;
|
|
296
|
-
align-items:
|
|
296
|
+
align-items: flex-start;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
:deep(.ant-descriptions-item) {
|
|
300
300
|
padding: 0 !important;
|
|
301
301
|
display: flex !important;
|
|
302
|
-
align-items:
|
|
302
|
+
align-items: flex-start !important;
|
|
303
303
|
flex-direction: row !important;
|
|
304
304
|
margin-right: 24px;
|
|
305
305
|
width: fit-content !important;
|
|
306
|
+
margin-bottom: 16px;
|
|
306
307
|
}
|
|
307
308
|
|
|
308
309
|
:deep(.ant-descriptions-item-container) {
|
|
309
310
|
display: flex !important;
|
|
310
311
|
flex-direction: row !important;
|
|
311
|
-
align-items:
|
|
312
|
+
align-items: flex-start !important;
|
|
312
313
|
position: relative;
|
|
313
314
|
gap: 0 !important;
|
|
314
315
|
width: 100% !important;
|
|
@@ -318,14 +319,17 @@ export default {
|
|
|
318
319
|
color: rgba(0, 0, 0, 0.65);
|
|
319
320
|
padding: 0 !important;
|
|
320
321
|
margin: 0 !important;
|
|
321
|
-
font-size: v-bind('config?.style?.fontSize');
|
|
322
|
+
font-size: v-bind('config?.style?.fontSize || "14px"');
|
|
322
323
|
display: inline-flex !important;
|
|
323
324
|
align-items: center !important;
|
|
324
325
|
white-space: nowrap !important;
|
|
326
|
+
min-width: v-bind('config?.style?.labelWidth || "80px"');
|
|
327
|
+
justify-content: flex-start;
|
|
328
|
+
padding-right: 8px !important;
|
|
325
329
|
}
|
|
326
330
|
|
|
327
331
|
:deep(.ant-descriptions-item-content) {
|
|
328
|
-
font-size: v-bind('config?.style?.fontSize');
|
|
332
|
+
font-size: v-bind('config?.style?.fontSize || "14px"');
|
|
329
333
|
display: inline-flex !important;
|
|
330
334
|
align-items: center !important;
|
|
331
335
|
padding: 0 !important;
|
|
@@ -132,14 +132,14 @@ export default {
|
|
|
132
132
|
currentCol = currentCol.parentNode
|
|
133
133
|
}
|
|
134
134
|
if (currentCol) {
|
|
135
|
-
//
|
|
135
|
+
// 更新当前列的宽度
|
|
136
136
|
const drawerWidth = isOpen ? 33.3 : 2
|
|
137
137
|
// 强制更新样式
|
|
138
138
|
currentCol.style.cssText = `
|
|
139
139
|
flex: 0 0 ${drawerWidth}% !important;
|
|
140
140
|
max-width: ${drawerWidth}% !important;
|
|
141
141
|
transition: all 0.3s;`
|
|
142
|
-
//
|
|
142
|
+
// 触发XTab组件重新计算宽度
|
|
143
143
|
this.$nextTick(() => {
|
|
144
144
|
const tabComponent = this.$el.querySelector('.ant-tabs')
|
|
145
145
|
if (tabComponent) {
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
147
147
|
window.dispatchEvent(new Event('resize'))
|
|
148
148
|
}
|
|
149
149
|
})
|
|
150
|
-
//
|
|
150
|
+
// 更新其他列宽度
|
|
151
151
|
otherCols.forEach((col, index) => {
|
|
152
152
|
if (index < this.mainWithData.length) {
|
|
153
153
|
const widthValue = isOpen ? this.mainWithData[index].min : this.mainWithData[index].max
|