vue2-client 1.14.50 → 1.14.52
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/package.json +108 -109
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +12 -0
- package/src/base-client/components/common/XFormTable/XFormTable.vue +889 -895
- package/src/base-client/components/common/XFormTable/demo.vue +76 -86
- package/src/base-client/components/common/XTab/XTab.vue +22 -7
- package/src/base-client/components/common/XTable/XTable.vue +1412 -1553
- package/src/base-client/components/common/XUploadFilesView/index.vue +485 -0
- package/src/base-client/components/his/XCharge/XCharge.vue +4 -1
- package/src/pages/WorkflowDetail/WorkflowDetail.vue +51 -31
- package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +388 -122
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowBaseInformation.vue +15 -30
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +185 -136
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowTimeline.vue +275 -223
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkflowLog.vue +152 -37
- package/src/router/async/router.map.js +2 -2
- package/.env.message +0 -19
|
@@ -1,223 +1,275 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="timeline" ref="timelineContent" style="white-space: nowrap; overflow-x: auto">
|
|
3
|
-
<a-steps
|
|
4
|
-
:current="currentStepId"
|
|
5
|
-
:initial="1">
|
|
6
|
-
<template #progressDot="{index}">
|
|
7
|
-
<span v-if="!changeAble" class="step-label in-steps"><i :class="['step-icon', getStepIconColor(index)]"></i></span>
|
|
8
|
-
<span v-else :key="displayStepId" :class="['step-icon-filled digital', getStepIconColor(index)]">
|
|
9
|
-
<a-icon v-if="index < currentStepId || state" type="check-circle" theme="filled" :class="['step-icon-filled icon', getStepIconColor(index)]" />
|
|
10
|
-
<span v-else :class="['step-icon-filled digital', getStepIconColor(index)]">{{ index }}</span>
|
|
11
|
-
</span>
|
|
12
|
-
</template>
|
|
13
|
-
<a-step
|
|
14
|
-
v-for="item in steps"
|
|
15
|
-
:key="item.id"
|
|
16
|
-
class="step-item"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</p>
|
|
28
|
-
<p v-if="item.
|
|
29
|
-
<p v-if="item.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
import
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
this.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
this.
|
|
99
|
-
|
|
100
|
-
this
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
this
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="timeline" ref="timelineContent" style="white-space: nowrap; overflow-x: auto">
|
|
3
|
+
<a-steps
|
|
4
|
+
:current="currentStepId"
|
|
5
|
+
:initial="1">
|
|
6
|
+
<template #progressDot="{index}">
|
|
7
|
+
<span v-if="!changeAble" class="step-label in-steps"><i :class="['step-icon', getStepIconColor(index)]"></i></span>
|
|
8
|
+
<span v-else :key="displayStepId" :class="['step-icon-filled digital', getStepIconColor(index)]">
|
|
9
|
+
<a-icon v-if="index < currentStepId || state" type="check-circle" theme="filled" :class="['step-icon-filled icon', getStepIconColor(index)]" />
|
|
10
|
+
<span v-else :class="['step-icon-filled digital', getStepIconColor(index)]">{{ index }}</span>
|
|
11
|
+
</span>
|
|
12
|
+
</template>
|
|
13
|
+
<a-step
|
|
14
|
+
v-for="item in steps"
|
|
15
|
+
:key="item.id"
|
|
16
|
+
class="step-item"
|
|
17
|
+
@click.stop="onStepClick(item.id)"
|
|
18
|
+
>
|
|
19
|
+
<template #title>
|
|
20
|
+
<h3 v-if="item.name">{{ item.name }}</h3>
|
|
21
|
+
</template>
|
|
22
|
+
<template #description>
|
|
23
|
+
<div>
|
|
24
|
+
<p v-if="item.handler">负责人:
|
|
25
|
+
<trim-text-tail :text="item.handler" :length="14"/>
|
|
26
|
+
</p>
|
|
27
|
+
<p v-if="item.date">填报时间:{{ formatDate(item.date, 'yyyy-MM-dd hh:mm') }}</p>
|
|
28
|
+
<p v-if="item.deadline" :class="{ 'text-red': item.id === currentStepId && isOverdue }">截止时间:{{ formatDate(item.deadline, 'yyyy-MM-dd hh:mm') }}</p>
|
|
29
|
+
<p v-if="item.note">备注:
|
|
30
|
+
<trim-text-tail :text="item.note" :length="15"/>
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
</a-step>
|
|
35
|
+
</a-steps>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
import { formatDate } from '@vue2-client/utils/util'
|
|
41
|
+
import TrimTextTail from './TrimTextTail'
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
components: { TrimTextTail },
|
|
45
|
+
name: 'WorkFlowTimeline',
|
|
46
|
+
props: {
|
|
47
|
+
workflowId: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
currentStepId: {
|
|
52
|
+
type: Number,
|
|
53
|
+
required: false,
|
|
54
|
+
default: 1
|
|
55
|
+
},
|
|
56
|
+
activeStepId: {
|
|
57
|
+
type: Number,
|
|
58
|
+
required: false,
|
|
59
|
+
default: 1
|
|
60
|
+
},
|
|
61
|
+
state: {
|
|
62
|
+
type: [Boolean, Number],
|
|
63
|
+
required: false,
|
|
64
|
+
default: false
|
|
65
|
+
},
|
|
66
|
+
steps: {
|
|
67
|
+
type: Array,
|
|
68
|
+
required: true
|
|
69
|
+
},
|
|
70
|
+
changeAble: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
required: false,
|
|
73
|
+
default: false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
data () {
|
|
77
|
+
return {
|
|
78
|
+
// 当前显示的步骤 id
|
|
79
|
+
displayStepId: 1,
|
|
80
|
+
// 当前任务是否逾期
|
|
81
|
+
isOverdue: false
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
mounted () {
|
|
85
|
+
this.init()
|
|
86
|
+
const timelineContent = this.$refs.timelineContent
|
|
87
|
+
timelineContent.onmousewheel = function (e) {
|
|
88
|
+
timelineContent.scrollLeft -= e.wheelDelta
|
|
89
|
+
e.preventDefault()
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
beforeDestroy () {
|
|
93
|
+
this.$refs.timelineContent.onmousewheel = null
|
|
94
|
+
},
|
|
95
|
+
methods: {
|
|
96
|
+
init () {
|
|
97
|
+
this.displayStepId = this.activeStepId
|
|
98
|
+
const deadline = this.steps.find(step => step.id === this.currentStepId).deadline
|
|
99
|
+
this.isOverdue = !this.state && this.formatDate(new Date(), 'yyyy-MM-dd hh:mm') > deadline
|
|
100
|
+
this.$emit('activeStep', this.displayStepId)
|
|
101
|
+
},
|
|
102
|
+
// 判断id是否为流程中最后一个
|
|
103
|
+
isLastStep (stepId) {
|
|
104
|
+
return stepId >= this.steps.length
|
|
105
|
+
},
|
|
106
|
+
// 动态展示时间线节点颜色
|
|
107
|
+
getStepIconColor (stepId) {
|
|
108
|
+
if (this.changeAble && stepId === this.displayStepId) {
|
|
109
|
+
return 'yellow'
|
|
110
|
+
} else if (!this.changeAble && stepId === this.currentStepId) {
|
|
111
|
+
return this.state ? 'blue' : 'green'
|
|
112
|
+
}
|
|
113
|
+
if (stepId < this.currentStepId || this.state) {
|
|
114
|
+
return 'blue'
|
|
115
|
+
}
|
|
116
|
+
if (stepId === this.currentStepId) {
|
|
117
|
+
return this.isOverdue ? 'red' : 'blue'
|
|
118
|
+
}
|
|
119
|
+
return 'gray'
|
|
120
|
+
},
|
|
121
|
+
onStepClick (stepId) {
|
|
122
|
+
if (!this.changeAble || stepId === this.displayStepId) {
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
if (stepId > this.currentStepId) {
|
|
126
|
+
return this.$message.warn('请先完成当前步骤')
|
|
127
|
+
}
|
|
128
|
+
this.$emit('activeStep', stepId)
|
|
129
|
+
this.displayStepId = stepId
|
|
130
|
+
},
|
|
131
|
+
formatDate,
|
|
132
|
+
},
|
|
133
|
+
watch: {
|
|
134
|
+
activeStepId: function (newVal) {
|
|
135
|
+
this.displayStepId = newVal
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<style lang="less" scoped>
|
|
142
|
+
.timeline {
|
|
143
|
+
/deep/ .ant-steps-dot {
|
|
144
|
+
margin-bottom: 6px;
|
|
145
|
+
.ant-steps-item-tail {
|
|
146
|
+
top: 7px;
|
|
147
|
+
margin-left: 106px;
|
|
148
|
+
width: calc(100% - 23px);
|
|
149
|
+
}
|
|
150
|
+
.ant-steps-item-icon {
|
|
151
|
+
margin-left: 90px;
|
|
152
|
+
width: 8px;
|
|
153
|
+
height: 8px;
|
|
154
|
+
line-height: 8px;
|
|
155
|
+
}
|
|
156
|
+
.ant-steps-item-content {
|
|
157
|
+
min-width: 200px;
|
|
158
|
+
margin-top: 24px;
|
|
159
|
+
.ant-steps-item-description {
|
|
160
|
+
text-align: left;
|
|
161
|
+
margin: 6px 0 0 0;
|
|
162
|
+
background: #fff;
|
|
163
|
+
border-radius: 4px;
|
|
164
|
+
padding: 12px;
|
|
165
|
+
position: relative;
|
|
166
|
+
|
|
167
|
+
&::before {
|
|
168
|
+
content: '';
|
|
169
|
+
position: absolute;
|
|
170
|
+
top: 0;
|
|
171
|
+
left: 0;
|
|
172
|
+
right: 0;
|
|
173
|
+
height: 1px;
|
|
174
|
+
background: repeating-linear-gradient(
|
|
175
|
+
to right,
|
|
176
|
+
#e8e8e8 0px,
|
|
177
|
+
#e8e8e8 4px,
|
|
178
|
+
transparent 4px,
|
|
179
|
+
transparent 8px
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
p {
|
|
184
|
+
position: relative;
|
|
185
|
+
padding: 8px 0;
|
|
186
|
+
margin: 0;
|
|
187
|
+
font-size: 13px;
|
|
188
|
+
color: #595959;
|
|
189
|
+
line-height: 1.5;
|
|
190
|
+
white-space: nowrap;
|
|
191
|
+
overflow: visible;
|
|
192
|
+
|
|
193
|
+
&:not(:last-child) {
|
|
194
|
+
border-bottom: 1px dashed #f0f0f0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:last-child {
|
|
198
|
+
padding-bottom: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&:first-child {
|
|
202
|
+
padding-top: 0;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
&.ant-steps {
|
|
208
|
+
padding-top: 8px;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/deep/ .ant-steps-item-title {
|
|
212
|
+
font-size: 14px;
|
|
213
|
+
}
|
|
214
|
+
@red: rgb(255, 77, 79);
|
|
215
|
+
.step-icon-filled {
|
|
216
|
+
position: absolute;
|
|
217
|
+
top: -2px;
|
|
218
|
+
left: -6px;
|
|
219
|
+
@blue: rgb(24, 144, 255);
|
|
220
|
+
@yellow: rgb(255, 164, 39);
|
|
221
|
+
@gray: rgb(191, 191, 191);
|
|
222
|
+
&.digital {
|
|
223
|
+
width: 28px;
|
|
224
|
+
line-height: 28px;
|
|
225
|
+
border-radius: 50%;
|
|
226
|
+
color: #ffffff;
|
|
227
|
+
&.blue {
|
|
228
|
+
background: @blue;
|
|
229
|
+
}
|
|
230
|
+
&.yellow {
|
|
231
|
+
background: @yellow;
|
|
232
|
+
}
|
|
233
|
+
&.gray {
|
|
234
|
+
background: @gray;
|
|
235
|
+
}
|
|
236
|
+
&.red {
|
|
237
|
+
background: @red;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
&.icon {
|
|
241
|
+
font-size: 28px;
|
|
242
|
+
&.blue {
|
|
243
|
+
color: @blue;
|
|
244
|
+
}
|
|
245
|
+
&.yellow {
|
|
246
|
+
color: @yellow;
|
|
247
|
+
}
|
|
248
|
+
&.gray {
|
|
249
|
+
color: @gray;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
.step-item {
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
&:hover {
|
|
256
|
+
.ant-steps-item-description {
|
|
257
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
258
|
+
transform: translateY(-1px);
|
|
259
|
+
transition: all 0.3s ease;
|
|
260
|
+
}
|
|
261
|
+
p {
|
|
262
|
+
color: #262626;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
.text-red {
|
|
266
|
+
color: @red !important;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
.next-step-overdue {
|
|
270
|
+
/deep/ .ant-steps-item-tail::after {
|
|
271
|
+
background: @red;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
</style>
|