vue2-client 1.15.61 → 1.15.63

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.
Files changed (134) hide show
  1. package/package.json +110 -110
  2. package/src/base-client/components/common/XButtons/XButtons.vue +3 -12
  3. package/src/base-client/components/his/XTextCard/XTextCard.vue +207 -207
  4. package/src/base-client/components/his/threeTestOrders/editor.vue +111 -111
  5. package/src/components/FileImageItem/FileItem.vue +321 -305
  6. package/src/pages/WorkflowDetail/WorkflowDetail.vue +391 -379
  7. package/src/pages/WorkflowDetail/WorkflowPageDetail/worklog.vue +97 -0
  8. package/.history/public/his/editor/editor_20250606134713.html +0 -51
  9. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527173925.vue +0 -509
  10. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174316.vue +0 -524
  11. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174419.vue +0 -524
  12. package/.history/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox_20250527174422.vue +0 -524
  13. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172825.vue +0 -207
  14. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172945.vue +0 -211
  15. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611172949.vue +0 -212
  16. package/.history/src/base-client/components/common/XAddReport/XAddReport_20250611173010.vue +0 -212
  17. package/.history/src/base-client/components/common/XForm/XFormItem_20250508134122.vue +0 -1320
  18. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171604.vue +0 -1332
  19. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171613.vue +0 -1331
  20. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171703.vue +0 -1331
  21. package/.history/src/base-client/components/common/XForm/XFormItem_20250527171720.vue +0 -1331
  22. package/.history/src/base-client/components/common/XForm/XFormItem_20250527174327.vue +0 -1339
  23. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612092804.vue +0 -731
  24. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612112546.vue +0 -748
  25. package/.history/src/base-client/components/common/XReportGrid/XReportTrGroup_20250612113808.vue +0 -748
  26. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115237.vue +0 -1071
  27. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115346.vue +0 -1078
  28. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115350.vue +0 -1077
  29. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115415.vue +0 -1077
  30. package/.history/src/base-client/components/common/XReportGrid/XReport_20250612115429.vue +0 -1077
  31. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611091619.vue +0 -442
  32. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092547.vue +0 -442
  33. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092552.vue +0 -442
  34. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092744.vue +0 -475
  35. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092955.vue +0 -475
  36. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611092957.vue +0 -475
  37. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095652.vue +0 -477
  38. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095701.vue +0 -477
  39. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611095704.vue +0 -477
  40. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100005.vue +0 -473
  41. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100011.vue +0 -473
  42. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100014.vue +0 -473
  43. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100833.vue +0 -473
  44. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100853.vue +0 -473
  45. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611100940.vue +0 -473
  46. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101011.vue +0 -473
  47. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101013.vue +0 -473
  48. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101014.vue +0 -473
  49. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101159.vue +0 -473
  50. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101238.vue +0 -474
  51. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101240.vue +0 -474
  52. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101242.vue +0 -474
  53. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101404.vue +0 -472
  54. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101410.vue +0 -472
  55. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101459.vue +0 -472
  56. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101500.vue +0 -472
  57. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101502.vue +0 -472
  58. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101504.vue +0 -472
  59. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101610.vue +0 -501
  60. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101700.vue +0 -501
  61. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101702.vue +0 -501
  62. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101741.vue +0 -504
  63. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101749.vue +0 -504
  64. package/.history/src/base-client/components/his/XHisEditor/XHisEditor_20250611101759.vue +0 -504
  65. package/.history/src/base-client/components/his/XHisEditor/dome_20250611091349.vue +0 -131
  66. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105854.vue +0 -160
  67. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105902.vue +0 -160
  68. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105924.vue +0 -160
  69. package/.history/src/base-client/components/his/XHisEditor/dome_20250611105932.vue +0 -158
  70. package/.history/src/base-client/components/his/XList/XList_20250609135848.vue +0 -173
  71. package/.history/src/base-client/components/his/XList/XList_20250609141026.vue +0 -222
  72. package/.history/src/base-client/components/his/XList/XList_20250609141035.vue +0 -229
  73. package/.history/src/base-client/components/his/XList/XList_20250609141103.vue +0 -229
  74. package/.history/src/base-client/components/his/XList/XList_20250609141105.vue +0 -229
  75. package/.history/src/base-client/components/his/XList/XList_20250609141334.vue +0 -241
  76. package/.history/src/base-client/components/his/XList/XList_20250609141404.vue +0 -241
  77. package/.history/src/base-client/components/his/XList/XList_20250609141406.vue +0 -241
  78. package/.history/src/base-client/components/his/XList/XList_20250609141801.vue +0 -245
  79. package/.history/src/base-client/components/his/XList/XList_20250609142033.vue +0 -245
  80. package/.history/src/base-client/components/his/XList/XList_20250609142038.vue +0 -245
  81. package/.history/src/base-client/components/his/XList/XList_20250609142435.vue +0 -255
  82. package/.history/src/base-client/components/his/XList/XList_20250609142503.vue +0 -255
  83. package/.history/src/base-client/components/his/XList/XList_20250609142504.vue +0 -255
  84. package/.history/src/base-client/components/his/XList/XList_20250609143012.vue +0 -270
  85. package/.history/src/base-client/components/his/XList/XList_20250609143044.vue +0 -270
  86. package/.history/src/base-client/components/his/XList/XList_20250609143046.vue +0 -270
  87. package/.history/src/base-client/components/his/XList/XList_20250609143210.vue +0 -270
  88. package/.history/src/base-client/components/his/XList/XList_20250609144339.vue +0 -294
  89. package/.history/src/base-client/components/his/XList/XList_20250609144410.vue +0 -294
  90. package/.history/src/base-client/components/his/XList/XList_20250609144412.vue +0 -294
  91. package/.history/src/base-client/components/his/XList/XList_20250609144647.vue +0 -303
  92. package/.history/src/base-client/components/his/XList/XList_20250609144716.vue +0 -303
  93. package/.history/src/base-client/components/his/XList/XList_20250609144729.vue +0 -303
  94. package/.history/src/base-client/components/his/XList/XList_20250609151232.vue +0 -288
  95. package/.history/src/base-client/components/his/XList/XList_20250609151247.vue +0 -288
  96. package/.history/src/base-client/components/his/XList/XList_20250609151252.vue +0 -288
  97. package/.history/src/base-client/components/his/XList/XList_20250609161220.vue +0 -317
  98. package/.history/src/base-client/components/his/XList/XList_20250609161258.vue +0 -306
  99. package/.history/src/base-client/components/his/XList/XList_20250609161319.vue +0 -306
  100. package/.history/src/base-client/components/his/XList/XList_20250609161320.vue +0 -306
  101. package/.history/src/base-client/components/his/XList/XList_20250704142024.vue +0 -495
  102. package/.history/src/base-client/components/his/XList/XList_20250704142033.vue +0 -495
  103. package/.history/src/base-client/components/his/XList/XList_20250704142040.vue +0 -494
  104. package/.history/src/base-client/components/his/XList/XList_20250704142211.vue +0 -494
  105. package/.history/src/base-client/components/his/XList/XList_20250704142214.vue +0 -494
  106. package/.history/src/base-client/components/his/XList/XList_20250704143010.vue +0 -495
  107. package/.history/src/base-client/components/his/XList/XList_20250704143203.vue +0 -495
  108. package/.history/src/base-client/components/his/XList/XList_20250707095101.vue +0 -492
  109. package/.history/src/base-client/components/his/XList/XList_20250707100152.vue +0 -492
  110. package/.history/src/base-client/components/his/XList/XList_20250707100200.vue +0 -485
  111. package/.history/src/base-client/components/his/XList/XList_20250707100208.vue +0 -485
  112. package/.history/src/base-client/components/his/XList/XList_20250707100259.vue +0 -488
  113. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +0 -222
  114. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +0 -183
  115. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +0 -183
  116. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +0 -183
  117. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +0 -206
  118. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +0 -209
  119. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095553.vue +0 -242
  120. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095610.vue +0 -242
  121. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613095612.vue +0 -242
  122. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100041.vue +0 -251
  123. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100047.vue +0 -251
  124. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100054.vue +0 -250
  125. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100105.vue +0 -250
  126. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100107.vue +0 -250
  127. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613100114.vue +0 -250
  128. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140844.vue +0 -238
  129. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140910.vue +0 -238
  130. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250613140912.vue +0 -238
  131. package/Users/objecrt/af-vue2-client/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +0 -36
  132. package/src/base-client/components/TreeList/TreeList.vue +0 -91
  133. package/src/base-client/components/TreeList/TreeNode.vue +0 -81
  134. package/src/base-client/components/common/XCardSet/XTiltle.vue +0 -191
@@ -1,379 +1,391 @@
1
- <template>
2
- <!-- 抽屉 -->
3
- <a-drawer
4
- :visible="visible"
5
- width="95vw"
6
- title="流程详情"
7
- @close="onClose"
8
- class="modern-workflow-drawer"
9
- :bodyStyle="{ padding: '0', background: '#f5f7fa', flex: 1 }"
10
- :headerStyle="{ borderBottom: '1px solid #eaedf2', padding: '16px 24px' }"
11
- >
12
- <div class="workflow-container">
13
- <!-- 基础信息卡片 -->
14
- <div class="info-section">
15
- <workflow-base-information
16
- v-if="details"
17
- ref="baseInformation"
18
- :workflow-id="workflowId"
19
- :details="details"
20
- :visible="visible"
21
- class="base-info-card"
22
- />
23
- </div>
24
-
25
- <!-- 内容区域 -->
26
- <div class="content-section">
27
- <a-card class="content-card" :bordered="false">
28
- <a-tabs
29
- :activeKey="activeKey"
30
- @change="changeTab"
31
- class="modern-tabs"
32
- :tabBarStyle="{ marginBottom: '5px', borderBottom: '1px solid #eaedf2' }"
33
- >
34
- <!-- 查看/编辑进度标签页 -->
35
- <a-tab-pane key="1" tab="开始工作">
36
- <WorkFlowHandle
37
- v-if="isWorkflowDataReady"
38
- ref="workflowHandle"
39
- :workflow-id="workflowId"
40
- :workflowState="details.f_state === 1"
41
- :complete-time="details.f_complete_time"
42
- :stepsForChild="steps"
43
- :visible="visible"
44
- :taskName="details.f_task_name"
45
- :details="details"
46
- :renderCurrentNode="renderCurrentNode"
47
- :initStepId="initStepId"
48
- @refresh="stepChanged"
49
- @success="success"
50
- @nextClick="nextClick"
51
- @x-form-item-emit-func="handleFormItemEvent"
52
- class="handle-content"
53
- />
54
- <div v-else-if="activeKey === '1'" class="loading-placeholder">
55
- <a-spin size="large" tip="正在加载工作流数据..."/>
56
- </div>
57
- </a-tab-pane>
58
-
59
- <!-- 任务流转记录标签页 -->
60
- <a-tab-pane key="2" tab="流转记录">
61
- <workflow-log
62
- v-if="activeKey === '2'"
63
- :workflow-id="workflowId"
64
- class="log-content"
65
- />
66
- </a-tab-pane>
67
-
68
- <!-- 任务留言标签页 -->
69
- <a-tab-pane key="4">
70
- <span slot="tab" class="message-tab">
71
- <span>任务留言</span>
72
- <a-badge
73
- :count="messageList.length"
74
- :offset="[8, -4]"
75
- :numberStyle="{ backgroundColor: '#5B6B8F', fontSize: '12px', padding: '0 6px', height: '18px', lineHeight: '18px', borderRadius: '9px' }"
76
- />
77
- </span>
78
- <div class="message-content">
79
- <template v-if="activeKey === '4' && details">
80
- <leave-message
81
- :workflowId="workflowId"
82
- :projectName="details.f_task_name"
83
- :data="messageList"
84
- :loading="messageLoading"
85
- @success="success"
86
- class="leave-message-component"
87
- />
88
- </template>
89
- </div>
90
- </a-tab-pane>
91
-
92
- <!-- 查看附件标签页 -->
93
- <a-tab-pane key="5" tab="查看附件">
94
- <template v-if="activeKey === '5' && details">
95
- <file-item-group @search="getWorkFlowFiles"/>
96
- </template>
97
- </a-tab-pane>
98
- </a-tabs>
99
- </a-card>
100
- </div>
101
- </div>
102
- </a-drawer>
103
- </template>
104
-
105
- <script>
106
- import { mapState } from 'vuex'
107
- import workflowBaseInformation from './WorkflowPageDetail/WorkFlowBaseInformation.vue'
108
- import WorkFlowHandle from './WorkflowPageDetail/WorkFlowHandle.vue'
109
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
110
- import { postByServiceName } from '@vue2-client/services/api/restTools'
111
- import { workFlowViewApi } from '@vue2-client/services/api/workFlow'
112
- import WorkflowLog from './WorkflowPageDetail/WorkflowLog.vue'
113
- import LeaveMessage from './WorkflowPageDetail/LeaveMessage'
114
- import XUploadFilesView from '@vue2-client/base-client/components/common/XUploadFilesView/index.vue'
115
- import FileItemGroup from '@vue2-client/components/FileImageItem/FileItemGroup.vue'
116
-
117
- export default {
118
- name: 'WorkflowDetail',
119
- components: {
120
- FileItemGroup,
121
- workflowBaseInformation,
122
- WorkFlowHandle,
123
- XFormTable,
124
- WorkflowLog,
125
- LeaveMessage,
126
- XUploadFilesView
127
- },
128
- props: {},
129
- data () {
130
- return {
131
- // 页面宽度
132
- screenWidth: document.documentElement.clientWidth,
133
- // 页面高度
134
- screenHeight: document.documentElement.clientHeight,
135
- // 控制当前标签页
136
- activeKey: '1',
137
- // 保存流程和留言信息
138
- steps: undefined,
139
- // 基础信息
140
- details: undefined,
141
- // 给XFormTable增加额外查询条件
142
- fixedAddForm: {},
143
- fixedQueryForm: {},
144
- // 留言数据
145
- messageList: [],
146
- messageLoading: true,
147
- workflowId: '',
148
- initStepId: null,
149
- visible: false,
150
- // 控制流程是否可操作
151
- renderCurrentNode: true
152
- }
153
- },
154
- expose: ['setFormValue'],
155
- computed: {
156
- ...mapState('account', { currUser: 'user' }),
157
- ...mapState('setting', ['isMobile']),
158
- // 检查 WorkFlowHandle 组件渲染所需的数据是否都已准备好
159
- isWorkflowDataReady () {
160
- return this.activeKey === '1' &&
161
- this.details &&
162
- this.details.f_state !== undefined &&
163
- this.steps !== undefined
164
- }
165
- },
166
- mounted () {
167
- // this.init()
168
- },
169
- methods: {
170
- // 内部组件更新了当前步骤后的回调
171
- stepChanged () {
172
- this.initStepId = null
173
- this.loading = true
174
- this.reload()
175
- },
176
- // 获取所有步骤
177
- getSteps () {
178
- return postByServiceName(workFlowViewApi.getStepNoteAndHandler, {
179
- workflowId: this.workflowId
180
- })
181
- .then(res => {
182
- this.steps = res
183
- }, err => {
184
- console.log(err)
185
- })
186
- },
187
- // 关闭抽屉的回调
188
- onClose () {
189
- if (this.$refs.workflowHandle !== undefined) {
190
- this.$refs.workflowHandle.onClose()
191
- }
192
- this.visible = false
193
- this.activeKey = '1'
194
- this.details = undefined
195
- this.fixedAddForm = {}
196
- this.fixedQueryForm = {}
197
- this.steps = undefined
198
- this.messageList = []
199
- this.currStepId = null
200
- },
201
- // 获取基础信息
202
- getBaseInfo () {
203
- this.loading = true
204
- return postByServiceName(workFlowViewApi.getWorkFlowBasicInfo, {
205
- workflowId: this.workflowId
206
- })
207
- .then(res => {
208
- // 主动传入得优先级较高
209
- if (this.currStepId) {
210
- res.f_sub_state = this.steps.find(item => item.id === this.currStepId)?.name
211
- } else {
212
- res.f_sub_state = this.steps.find(item => item.id === res.f_step_id)?.name
213
- }
214
- this.details = res
215
- }, err => {
216
- console.log(err)
217
- })
218
- },
219
- // 获取附件列表
220
- getWorkFlowFiles (date, callback, errorCallback) {
221
- postByServiceName(workFlowViewApi.getWorkFlowAttachments, {
222
- workflowId: this.workflowId,
223
- uploadDate: date
224
- })
225
- .then(res => callback(res))
226
- .catch((e) => errorCallback(e))
227
- },
228
- async reload () {
229
- await this.getSteps()
230
- await this.getBaseInfo()
231
- this.fixedQueryForm.a_f_workflow_id = this.workflowId
232
- this.fixedAddForm.a_f_workflow_id = this.workflowId
233
- },
234
- // 初始化两张固定表
235
- async init ({ workflowId, stepId, renderCurrentNode = true, visible = true }) {
236
- this.workflowId = workflowId
237
- if (stepId) {
238
- this.initStepId = stepId
239
- }
240
- this.visible = visible
241
- this.renderCurrentNode = renderCurrentNode
242
- await this.reload()
243
- },
244
- // 切换标签页
245
- changeTab (id) {
246
- this.activeKey = id
247
- },
248
- // 提交完成后事件
249
- success (res) {
250
- this.visible = false
251
- this.$emit('success', res)
252
- },
253
- // 提交完成后事件
254
- nextClick (res) {
255
- this.$emit('nextClick', res)
256
- },
257
- handleFormItemEvent (func, data, value) {
258
- this.$emit('x-form-item-emit-func', func, data, value)
259
- },
260
- // 给地址选择表单项赋值
261
- setFormValue (record) {
262
- this.$refs.workflowHandle.$refs.xAddForm.setForm(record)
263
- }
264
- }
265
- }
266
- </script>
267
-
268
- <style lang="less" scoped>
269
- .workflow-container {
270
- height: 100%;
271
- display: flex;
272
- flex-direction: column;
273
-
274
- .info-section {
275
- padding: 16px 24px;
276
- background-color: #fff;
277
- border-bottom: 1px solid #eaedf2;
278
- }
279
-
280
- .content-section {
281
- flex: 1;
282
- padding: 16px 24px;
283
-
284
- .content-card {
285
- border-radius: 8px;
286
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
287
- min-height: 100%;
288
-
289
- /deep/ .ant-card-body {
290
- padding: 12px 24px 24px;
291
- }
292
- }
293
- }
294
- }
295
-
296
- .modern-tabs {
297
- /deep/ .ant-tabs-nav {
298
- margin-bottom: 0;
299
- }
300
-
301
- /deep/ .ant-tabs-tab {
302
- padding: 12px 0;
303
- margin-right: 48px;
304
- font-size: 15px;
305
- }
306
-
307
- /deep/ .ant-tabs-tab-active {
308
- font-weight: 500;
309
- }
310
-
311
- /deep/ .ant-tabs-ink-bar {
312
- height: 3px;
313
- border-radius: 3px 3px 0 0;
314
- }
315
- }
316
-
317
- .message-tab {
318
- display: flex;
319
- align-items: center;
320
- gap: 6px;
321
- }
322
-
323
- .message-content {
324
-
325
- .leave-message-component {
326
- width: 100%;
327
- }
328
- }
329
-
330
- .log-content {
331
- margin-top: 16px;
332
- }
333
-
334
- /deep/ .step-label {
335
- &:not(:first-child) {
336
- margin-left: 16px;
337
- }
338
-
339
- .step-icon {
340
- position: relative;
341
- top: 1px;
342
- display: inline-block;
343
- width: 12px;
344
- height: 12px;
345
- background: #ffffff;
346
- border-radius: 50%;
347
- margin-right: 8px;
348
-
349
- &.blue {
350
- border: 3px solid #5B6B8F;
351
- }
352
-
353
- &.green {
354
- border: 3px solid #4CAF50;
355
- }
356
-
357
- &.gray {
358
- border: 3px solid #cfd8e3;
359
- }
360
- }
361
- }
362
-
363
- :deep(.ant-drawer-wrapper-body) {
364
- display: flex;
365
- flex-direction: column;
366
- }
367
-
368
- .loading-placeholder {
369
- display: flex;
370
- justify-content: center;
371
- align-items: center;
372
- height: 300px;
373
-
374
- /deep/ .ant-spin-text {
375
- color: #666;
376
- margin-top: 16px;
377
- }
378
- }
379
- </style>
1
+ <template>
2
+ <!-- 抽屉 -->
3
+ <a-drawer
4
+ :visible="visible"
5
+ width="95vw"
6
+ title="流程详情"
7
+ @close="onClose"
8
+ class="modern-workflow-drawer"
9
+ :bodyStyle="{ padding: '0', background: '#f5f7fa', flex: 1 }"
10
+ :headerStyle="{ borderBottom: '1px solid #eaedf2', padding: '16px 24px' }"
11
+ >
12
+ <div class="workflow-container">
13
+ <!-- 基础信息卡片 -->
14
+ <div class="info-section">
15
+ <workflow-base-information
16
+ v-if="details"
17
+ ref="baseInformation"
18
+ :workflow-id="workflowId"
19
+ :details="details"
20
+ :visible="visible"
21
+ class="base-info-card"
22
+ />
23
+ </div>
24
+
25
+ <!-- 内容区域 -->
26
+ <div class="content-section">
27
+ <a-card class="content-card" :bordered="false">
28
+ <a-tabs
29
+ :activeKey="activeKey"
30
+ @change="changeTab"
31
+ class="modern-tabs"
32
+ :tabBarStyle="{ marginBottom: '5px', borderBottom: '1px solid #eaedf2' }"
33
+ >
34
+ <!-- 查看/编辑进度标签页 -->
35
+ <a-tab-pane key="1" tab="开始工作">
36
+ <WorkFlowHandle
37
+ v-if="isWorkflowDataReady"
38
+ ref="workflowHandle"
39
+ :workflow-id="workflowId"
40
+ :workflowState="details.f_state === 1"
41
+ :complete-time="details.f_complete_time"
42
+ :stepsForChild="steps"
43
+ :visible="visible"
44
+ :taskName="details.f_task_name"
45
+ :details="details"
46
+ :renderCurrentNode="renderCurrentNode"
47
+ :initStepId="initStepId"
48
+ @refresh="stepChanged"
49
+ @success="success"
50
+ @nextClick="nextClick"
51
+ @x-form-item-emit-func="handleFormItemEvent"
52
+ class="handle-content"
53
+ />
54
+ <div v-else-if="activeKey === '1'" class="loading-placeholder">
55
+ <a-spin size="large" tip="正在加载工作流数据..."/>
56
+ </div>
57
+ </a-tab-pane>
58
+
59
+ <!-- 任务流转记录标签页 -->
60
+ <a-tab-pane key="2" tab="流转记录">
61
+ <workflow-log
62
+ v-if="activeKey === '2'"
63
+ :workflow-id="workflowId"
64
+ class="log-content"
65
+ />
66
+ </a-tab-pane>
67
+
68
+ <!-- 任务留言标签页 -->
69
+ <a-tab-pane key="4">
70
+ <span slot="tab" class="message-tab">
71
+ <span>任务留言</span>
72
+ <a-badge
73
+ :count="messageList.length"
74
+ :offset="[8, -4]"
75
+ :numberStyle="{ backgroundColor: '#5B6B8F', fontSize: '12px', padding: '0 6px', height: '18px', lineHeight: '18px', borderRadius: '9px' }"
76
+ />
77
+ </span>
78
+ <div class="message-content">
79
+ <template v-if="activeKey === '4' && details">
80
+ <leave-message
81
+ :workflowId="workflowId"
82
+ :projectName="details.f_task_name"
83
+ :data="messageList"
84
+ :loading="messageLoading"
85
+ @success="success"
86
+ class="leave-message-component"
87
+ />
88
+ </template>
89
+ </div>
90
+ </a-tab-pane>
91
+
92
+ <!-- 查看附件标签页 -->
93
+ <a-tab-pane key="5" tab="查看附件">
94
+ <template v-if="activeKey === '5' && details">
95
+ <file-item-group @search="getWorkFlowFiles"/>
96
+ </template>
97
+ </a-tab-pane>
98
+
99
+ <!-- 任务流转记录标签页 -->
100
+ <a-tab-pane key="6" tab="工作日志">
101
+ <worklog
102
+ v-if="activeKey === '6'"
103
+ :workflow-id="workflowId"
104
+ :details="details"
105
+ class="log-content"
106
+ />
107
+ </a-tab-pane>
108
+ </a-tabs>
109
+ </a-card>
110
+ </div>
111
+ </div>
112
+ </a-drawer>
113
+ </template>
114
+
115
+ <script>
116
+ import { mapState } from 'vuex'
117
+ import workflowBaseInformation from './WorkflowPageDetail/WorkFlowBaseInformation.vue'
118
+ import WorkFlowHandle from './WorkflowPageDetail/WorkFlowHandle.vue'
119
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
120
+ import { postByServiceName } from '@vue2-client/services/api/restTools'
121
+ import { workFlowViewApi } from '@vue2-client/services/api/workFlow'
122
+ import WorkflowLog from './WorkflowPageDetail/WorkflowLog.vue'
123
+ import LeaveMessage from './WorkflowPageDetail/LeaveMessage'
124
+ import XUploadFilesView from '@vue2-client/base-client/components/common/XUploadFilesView/index.vue'
125
+ import FileItemGroup from '@vue2-client/components/FileImageItem/FileItemGroup.vue'
126
+ import worklog from './WorkflowPageDetail/worklog.vue'
127
+
128
+ export default {
129
+ name: 'WorkflowDetail',
130
+ components: {
131
+ FileItemGroup,
132
+ workflowBaseInformation,
133
+ WorkFlowHandle,
134
+ XFormTable,
135
+ WorkflowLog,
136
+ LeaveMessage,
137
+ XUploadFilesView,
138
+ worklog
139
+ },
140
+ props: {},
141
+ data () {
142
+ return {
143
+ // 页面宽度
144
+ screenWidth: document.documentElement.clientWidth,
145
+ // 页面高度
146
+ screenHeight: document.documentElement.clientHeight,
147
+ // 控制当前标签页
148
+ activeKey: '1',
149
+ // 保存流程和留言信息
150
+ steps: undefined,
151
+ // 基础信息
152
+ details: undefined,
153
+ // 给XFormTable增加额外查询条件
154
+ fixedAddForm: {},
155
+ fixedQueryForm: {},
156
+ // 留言数据
157
+ messageList: [],
158
+ messageLoading: true,
159
+ workflowId: '',
160
+ initStepId: null,
161
+ visible: false,
162
+ // 控制流程是否可操作
163
+ renderCurrentNode: true
164
+ }
165
+ },
166
+ expose: ['setFormValue'],
167
+ computed: {
168
+ ...mapState('account', { currUser: 'user' }),
169
+ ...mapState('setting', ['isMobile']),
170
+ // 检查 WorkFlowHandle 组件渲染所需的数据是否都已准备好
171
+ isWorkflowDataReady () {
172
+ return this.activeKey === '1' &&
173
+ this.details &&
174
+ this.details.f_state !== undefined &&
175
+ this.steps !== undefined
176
+ }
177
+ },
178
+ mounted () {
179
+ // this.init()
180
+ },
181
+ methods: {
182
+ // 内部组件更新了当前步骤后的回调
183
+ stepChanged () {
184
+ this.initStepId = null
185
+ this.loading = true
186
+ this.reload()
187
+ },
188
+ // 获取所有步骤
189
+ getSteps () {
190
+ return postByServiceName(workFlowViewApi.getStepNoteAndHandler, {
191
+ workflowId: this.workflowId
192
+ })
193
+ .then(res => {
194
+ this.steps = res
195
+ }, err => {
196
+ console.log(err)
197
+ })
198
+ },
199
+ // 关闭抽屉的回调
200
+ onClose () {
201
+ if (this.$refs.workflowHandle !== undefined) {
202
+ this.$refs.workflowHandle.onClose()
203
+ }
204
+ this.visible = false
205
+ this.activeKey = '1'
206
+ this.details = undefined
207
+ this.fixedAddForm = {}
208
+ this.fixedQueryForm = {}
209
+ this.steps = undefined
210
+ this.messageList = []
211
+ this.currStepId = null
212
+ },
213
+ // 获取基础信息
214
+ getBaseInfo () {
215
+ this.loading = true
216
+ return postByServiceName(workFlowViewApi.getWorkFlowBasicInfo, {
217
+ workflowId: this.workflowId
218
+ })
219
+ .then(res => {
220
+ // 主动传入得优先级较高
221
+ if (this.currStepId) {
222
+ res.f_sub_state = this.steps.find(item => item.id === this.currStepId)?.name
223
+ } else {
224
+ res.f_sub_state = this.steps.find(item => item.id === res.f_step_id)?.name
225
+ }
226
+ this.details = res
227
+ }, err => {
228
+ console.log(err)
229
+ })
230
+ },
231
+ // 获取附件列表
232
+ getWorkFlowFiles (date, callback, errorCallback) {
233
+ postByServiceName(workFlowViewApi.getWorkFlowAttachments, {
234
+ workflowId: this.workflowId,
235
+ uploadDate: date
236
+ })
237
+ .then(res => callback(res))
238
+ .catch((e) => errorCallback(e))
239
+ },
240
+ async reload () {
241
+ await this.getSteps()
242
+ await this.getBaseInfo()
243
+ this.fixedQueryForm.a_f_workflow_id = this.workflowId
244
+ this.fixedAddForm.a_f_workflow_id = this.workflowId
245
+ },
246
+ // 初始化两张固定表
247
+ async init ({ workflowId, stepId, renderCurrentNode = true, visible = true }) {
248
+ this.workflowId = workflowId
249
+ if (stepId) {
250
+ this.initStepId = stepId
251
+ }
252
+ this.visible = visible
253
+ this.renderCurrentNode = renderCurrentNode
254
+ await this.reload()
255
+ },
256
+ // 切换标签页
257
+ changeTab (id) {
258
+ this.activeKey = id
259
+ },
260
+ // 提交完成后事件
261
+ success (res) {
262
+ this.visible = false
263
+ this.$emit('success', res)
264
+ },
265
+ // 提交完成后事件
266
+ nextClick (res) {
267
+ this.$emit('nextClick', res)
268
+ },
269
+ handleFormItemEvent (func, data, value) {
270
+ this.$emit('x-form-item-emit-func', func, data, value)
271
+ },
272
+ // 给地址选择表单项赋值
273
+ setFormValue (record) {
274
+ this.$refs.workflowHandle.$refs.xAddForm.setForm(record)
275
+ }
276
+ }
277
+ }
278
+ </script>
279
+
280
+ <style lang="less" scoped>
281
+ .workflow-container {
282
+ height: 100%;
283
+ display: flex;
284
+ flex-direction: column;
285
+
286
+ .info-section {
287
+ padding: 16px 24px;
288
+ background-color: #fff;
289
+ border-bottom: 1px solid #eaedf2;
290
+ }
291
+
292
+ .content-section {
293
+ flex: 1;
294
+ padding: 16px 24px;
295
+
296
+ .content-card {
297
+ border-radius: 8px;
298
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
299
+ min-height: 100%;
300
+
301
+ /deep/ .ant-card-body {
302
+ padding: 12px 24px 24px;
303
+ }
304
+ }
305
+ }
306
+ }
307
+
308
+ .modern-tabs {
309
+ /deep/ .ant-tabs-nav {
310
+ margin-bottom: 0;
311
+ }
312
+
313
+ /deep/ .ant-tabs-tab {
314
+ padding: 12px 0;
315
+ margin-right: 48px;
316
+ font-size: 15px;
317
+ }
318
+
319
+ /deep/ .ant-tabs-tab-active {
320
+ font-weight: 500;
321
+ }
322
+
323
+ /deep/ .ant-tabs-ink-bar {
324
+ height: 3px;
325
+ border-radius: 3px 3px 0 0;
326
+ }
327
+ }
328
+
329
+ .message-tab {
330
+ display: flex;
331
+ align-items: center;
332
+ gap: 6px;
333
+ }
334
+
335
+ .message-content {
336
+
337
+ .leave-message-component {
338
+ width: 100%;
339
+ }
340
+ }
341
+
342
+ .log-content {
343
+ margin-top: 16px;
344
+ }
345
+
346
+ /deep/ .step-label {
347
+ &:not(:first-child) {
348
+ margin-left: 16px;
349
+ }
350
+
351
+ .step-icon {
352
+ position: relative;
353
+ top: 1px;
354
+ display: inline-block;
355
+ width: 12px;
356
+ height: 12px;
357
+ background: #ffffff;
358
+ border-radius: 50%;
359
+ margin-right: 8px;
360
+
361
+ &.blue {
362
+ border: 3px solid #5B6B8F;
363
+ }
364
+
365
+ &.green {
366
+ border: 3px solid #4CAF50;
367
+ }
368
+
369
+ &.gray {
370
+ border: 3px solid #cfd8e3;
371
+ }
372
+ }
373
+ }
374
+
375
+ :deep(.ant-drawer-wrapper-body) {
376
+ display: flex;
377
+ flex-direction: column;
378
+ }
379
+
380
+ .loading-placeholder {
381
+ display: flex;
382
+ justify-content: center;
383
+ align-items: center;
384
+ height: 300px;
385
+
386
+ /deep/ .ant-spin-text {
387
+ color: #666;
388
+ margin-top: 16px;
389
+ }
390
+ }
391
+ </style>