vue2-client 1.8.430 → 1.8.432
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.gaslink +19 -0
- package/package.json +2 -1
- package/src/base-client/components/common/XFormGroup/demo.vue +40 -40
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReportGrid/XReport.vue +9 -3
- package/src/base-client/components/common/XReportGrid/XReportDesign.vue +14 -1
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +6 -1
- package/src/pages/DynamicStatistics/FavoriteList.vue +51 -51
- package/src/pages/WorkflowDetail/WorkFlowDemo.vue +21 -0
- package/src/pages/WorkflowDetail/WorkflowDetail.vue +44 -119
- package/src/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue +28 -104
- package/src/pages/WorkflowDetail/WorkflowPageDetail/{ApplyBaseInformation.vue → WorkFlowBaseInformation.vue} +11 -11
- package/src/pages/WorkflowDetail/WorkflowPageDetail/{ApplyBaseInformationDetails.vue → WorkFlowBaseInformationDetails.vue} +8 -17
- package/src/pages/WorkflowDetail/WorkflowPageDetail/{ApplyHandle.vue → WorkFlowHandle.vue} +62 -416
- package/src/pages/WorkflowDetail/WorkflowPageDetail/{ApplyHandleReso.vue → WorkFlowHandleReso.vue} +37 -232
- package/src/pages/WorkflowDetail/WorkflowPageDetail/{ApplyTimeline.vue → WorkFlowTimeline.vue} +2 -2
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkOrderParentDetails.vue +43 -70
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkflowDetailResso.vue +42 -72
- package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkflowListResolution.vue +37 -113
- package/src/pages/WorkflowDetail/WorkflowPageDetail/{ApplyWorkflowLog.vue → WorkflowLog.vue} +6 -6
- package/src/router/async/router.map.js +2 -1
- package/src/services/api/common.js +3 -1
- package/src/services/api/entity.js +18 -18
- package/src/services/api/index.js +2 -2
- package/src/services/api/restTools.js +22 -1
- package/src/services/api/workFlow.js +63 -0
- package/src/utils/waterMark.js +31 -31
- package/vue.config.js +5 -0
- package/src/services/api/applyService/apiApply.js +0 -187
package/src/pages/WorkflowDetail/WorkflowPageDetail/{ApplyHandleReso.vue → WorkFlowHandleReso.vue}
RENAMED
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
<!-- 上方流程显示 -->
|
|
9
9
|
<a-card :bordered="false" :loading="loading" title="项目进度">
|
|
10
10
|
<!-- 项目进度流程 -->
|
|
11
|
-
<
|
|
11
|
+
<workflow-timeline
|
|
12
12
|
:current-step-id="currentStepId"
|
|
13
13
|
:active-step-id="activeStepId"
|
|
14
|
-
:
|
|
14
|
+
:workflow-id="workflowId"
|
|
15
15
|
:steps="stepsForChild"
|
|
16
|
-
:state="
|
|
16
|
+
:state="workflowState"
|
|
17
17
|
change-able
|
|
18
18
|
@activeStep="activeStep"/>
|
|
19
19
|
</a-card>
|
|
20
20
|
<!-- 如果不是当前步骤,显示历史记录 -->
|
|
21
21
|
<a-tabs default-active-key="1" @change="note = ''">
|
|
22
|
-
<a-tab-pane key="1" :tab="!beforeStepActive && !
|
|
22
|
+
<a-tab-pane key="1" :tab="!beforeStepActive && !workflowState ? '表单' : '进度详情'">
|
|
23
23
|
<a-card :bordered="false" :loading="loadingHistory">
|
|
24
|
-
<div v-if="beforeStepActive ||
|
|
24
|
+
<div v-if="beforeStepActive || workflowState">
|
|
25
25
|
<!-- 当前步骤无记录 -->
|
|
26
26
|
<div v-show="!formCompletedDataPreview" style="text-align: center">
|
|
27
27
|
<h1>该步骤暂无记录</h1>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
</div>
|
|
58
58
|
</div>
|
|
59
59
|
<!-- 如果是当前步骤,填写表单,控制流程等 -->
|
|
60
|
-
<div v-if="!beforeStepActive && !
|
|
60
|
+
<div v-if="!beforeStepActive && !workflowState">
|
|
61
61
|
<div v-if="canSubmit">
|
|
62
62
|
<!-- 退回提示 -->
|
|
63
63
|
<a-alert v-if="currentStep && currentStep.back" type="info" show-icon style="margin-bottom: 14px">
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
</a-card>
|
|
172
172
|
</a-tab-pane>
|
|
173
173
|
<!-- 退回 -->
|
|
174
|
-
<a-tab-pane v-if="canSubmit && !beforeStepActive && showPrevBtn && !
|
|
174
|
+
<a-tab-pane v-if="canSubmit && !beforeStepActive && showPrevBtn && !workflowState" key="2" tab="退回">
|
|
175
175
|
<a-form layout="vertical">
|
|
176
176
|
<a-form-item label="退回原因" :wrapper-col="{ span: 10 }" required>
|
|
177
177
|
<a-textarea
|
|
@@ -203,16 +203,13 @@
|
|
|
203
203
|
ref="xFormTable"
|
|
204
204
|
:queryParamsJson="currentStepSubTableDefine"
|
|
205
205
|
title="业务名称"
|
|
206
|
-
@removeItem="removeSubTable"
|
|
207
|
-
@tempTableEdit="editSubTable"
|
|
208
|
-
@tempTableModify="modifySubTable"
|
|
209
206
|
>
|
|
210
207
|
</x-form-table>
|
|
211
208
|
</a-card>
|
|
212
209
|
</a-tab-pane>
|
|
213
|
-
<a-tab-pane v-if="canSubmit && !beforeStepActive && showPrevBtn && !
|
|
210
|
+
<a-tab-pane v-if="canSubmit && !beforeStepActive && showPrevBtn && !workflowState" key="3" tab="工单拆分">
|
|
214
211
|
<!-- 分配工单 -->
|
|
215
|
-
<workflow-list-resolution :
|
|
212
|
+
<workflow-list-resolution :workflow-project-id="workflowId" :details="details"></workflow-list-resolution>
|
|
216
213
|
</a-tab-pane>
|
|
217
214
|
</a-tabs>
|
|
218
215
|
<!-- 文件预览 -->
|
|
@@ -226,14 +223,14 @@
|
|
|
226
223
|
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm'
|
|
227
224
|
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
228
225
|
import XAddForm from '@vue2-client/base-client/components/common/XAddForm/XAddForm'
|
|
229
|
-
import {
|
|
230
|
-
import {
|
|
226
|
+
import { postByServiceName } from '@vue2-client/services/api/restTools'
|
|
227
|
+
import { workFlowViewApi } from '@/services/api/workFlow'
|
|
231
228
|
import { formatDate } from '@vue2-client/utils/util'
|
|
232
|
-
import { commonApi } from 'vue2-client/
|
|
229
|
+
import { commonApi } from '@vue2-client/services/api/common'
|
|
233
230
|
import { mapState } from 'vuex'
|
|
234
231
|
import moment from 'moment'
|
|
235
232
|
import FilePreview from '@vue2-client/components/FilePreview'
|
|
236
|
-
import { FileItem, ImageItem } from 'vue2-client/
|
|
233
|
+
import { FileItem, ImageItem } from '@vue2-client/components/FileImageItem'
|
|
237
234
|
import WorkflowListResolution from './WorkflowListResolution'
|
|
238
235
|
|
|
239
236
|
export default {
|
|
@@ -363,14 +360,9 @@ export default {
|
|
|
363
360
|
async mounted () {
|
|
364
361
|
this.init()
|
|
365
362
|
this.checkDeadline()
|
|
366
|
-
post(applyDetailViewApi.getEmpTree, {}).then(res => {
|
|
367
|
-
this.empTree = res
|
|
368
|
-
})
|
|
369
|
-
console.log(this.workflowId)
|
|
370
|
-
console.log(this.applyId)
|
|
371
363
|
},
|
|
372
364
|
props: {
|
|
373
|
-
|
|
365
|
+
workflowId: {
|
|
374
366
|
type: String,
|
|
375
367
|
required: true
|
|
376
368
|
},
|
|
@@ -382,14 +374,10 @@ export default {
|
|
|
382
374
|
type: Array,
|
|
383
375
|
required: true
|
|
384
376
|
},
|
|
385
|
-
|
|
377
|
+
workflowState: {
|
|
386
378
|
type: [Boolean, Number],
|
|
387
379
|
required: true
|
|
388
380
|
},
|
|
389
|
-
workflowId: {
|
|
390
|
-
type: Number,
|
|
391
|
-
required: true
|
|
392
|
-
},
|
|
393
381
|
completeTime: {
|
|
394
382
|
type: String,
|
|
395
383
|
required: true
|
|
@@ -408,12 +396,6 @@ export default {
|
|
|
408
396
|
this.getCurrentStep()
|
|
409
397
|
},
|
|
410
398
|
onClose () {
|
|
411
|
-
if (this.subTableName.length > 0) {
|
|
412
|
-
post(applyDetailViewApi.deleteApplySubTempTable, { tableName: this.subTableName })
|
|
413
|
-
.then(res => {
|
|
414
|
-
console.log('临时表已手动删除')
|
|
415
|
-
})
|
|
416
|
-
}
|
|
417
399
|
this.activeStepId = this.currentStepId
|
|
418
400
|
this.checkedChargePerson = undefined
|
|
419
401
|
this.loadingHistory = true
|
|
@@ -435,139 +417,6 @@ export default {
|
|
|
435
417
|
this.formCompletedDataPreview = null
|
|
436
418
|
this.operationType = 'submit'
|
|
437
419
|
},
|
|
438
|
-
// 子表增加回调
|
|
439
|
-
modifySubTable (res) {
|
|
440
|
-
if (!res.valid) {
|
|
441
|
-
return
|
|
442
|
-
}
|
|
443
|
-
const currentStepName = this.getStepNameByStepId(this.currentStepId)
|
|
444
|
-
const applyId = this.applyId
|
|
445
|
-
const form = res.form
|
|
446
|
-
const formData = []
|
|
447
|
-
for (const key in form) {
|
|
448
|
-
const arr = key.split('_')
|
|
449
|
-
let newKey = ''
|
|
450
|
-
for (let i = 1; i < arr.length; i++) {
|
|
451
|
-
newKey += arr[i]
|
|
452
|
-
if (i !== arr.length - 1) {
|
|
453
|
-
newKey += '_'
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
form[newKey] = form[key]
|
|
457
|
-
delete form[key]
|
|
458
|
-
const item = {}
|
|
459
|
-
item.label = newKey
|
|
460
|
-
item.value = form[newKey]
|
|
461
|
-
formData.push(item)
|
|
462
|
-
}
|
|
463
|
-
post(applyDetailViewApi.applySubTableInsert, {
|
|
464
|
-
stepName: currentStepName,
|
|
465
|
-
applyId: applyId,
|
|
466
|
-
information: formData
|
|
467
|
-
})
|
|
468
|
-
.then(
|
|
469
|
-
res => {
|
|
470
|
-
this.$message.success('添加成功!')
|
|
471
|
-
this.$refs.xFormTable.modelVisible = false
|
|
472
|
-
this.$refs.xFormTable.$refs.xTable.refresh(true)
|
|
473
|
-
}
|
|
474
|
-
)
|
|
475
|
-
},
|
|
476
|
-
// 删除子表数据
|
|
477
|
-
removeSubTable (list) {
|
|
478
|
-
const tempTableData = {}
|
|
479
|
-
tempTableData.applyId = this.applyId
|
|
480
|
-
tempTableData.stepName = this.activeStepName
|
|
481
|
-
post(applyDetailViewApi.getApplySubTableData, {
|
|
482
|
-
tempTableData: tempTableData
|
|
483
|
-
})
|
|
484
|
-
.then(
|
|
485
|
-
res => {
|
|
486
|
-
const data = res
|
|
487
|
-
const targetIds = []
|
|
488
|
-
for (const key in data) {
|
|
489
|
-
const item = JSON.parse(data[key].itemsjson)
|
|
490
|
-
if (item[0].label === 'id') {
|
|
491
|
-
for (let i = 0; i < list.length; i++) {
|
|
492
|
-
if (list[i] === item[0].value) {
|
|
493
|
-
targetIds.push(data[key].id)
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
post(applyDetailViewApi.deleteSubTableData, {
|
|
499
|
-
ids: targetIds
|
|
500
|
-
})
|
|
501
|
-
.then(
|
|
502
|
-
res => {
|
|
503
|
-
this.$message.success('删除成功!')
|
|
504
|
-
this.$refs.xFormTable.$refs.xTable.refresh(true)
|
|
505
|
-
}
|
|
506
|
-
)
|
|
507
|
-
}
|
|
508
|
-
)
|
|
509
|
-
},
|
|
510
|
-
getSubTableDefineLocal (stepName) {
|
|
511
|
-
for (const step of this.stepsDefine) {
|
|
512
|
-
if (stepName === step.name) {
|
|
513
|
-
return step.properties.subTableDefine
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
},
|
|
517
|
-
// 已完成信息动态规定宽度
|
|
518
|
-
getFinishedInfoWidth (value) {
|
|
519
|
-
if (value.length > 20) {
|
|
520
|
-
return 3
|
|
521
|
-
} else if (value.length > 6) {
|
|
522
|
-
return 2
|
|
523
|
-
} else {
|
|
524
|
-
return 1
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
// 子表修改
|
|
528
|
-
editSubTable (params) {
|
|
529
|
-
const subTableDefine = this.getSubTableDefineLocal(this.currentStep.state).column
|
|
530
|
-
for (let i = 0; i < subTableDefine.length; i++) {
|
|
531
|
-
subTableDefine[i].name = subTableDefine[i].title
|
|
532
|
-
delete subTableDefine[i].title
|
|
533
|
-
subTableDefine[i].isOnlyAddOrEdit = true
|
|
534
|
-
subTableDefine[i].model = subTableDefine[i].key.split('.')[1]
|
|
535
|
-
delete subTableDefine[i].key
|
|
536
|
-
subTableDefine[i].addOrEdit = 'all'
|
|
537
|
-
subTableDefine[i].type = 'input'
|
|
538
|
-
}
|
|
539
|
-
this.xAddFormDefine = subTableDefine
|
|
540
|
-
// 将修改的数据回显至XAddForm
|
|
541
|
-
const tempTableData = {}
|
|
542
|
-
tempTableData.applyId = this.applyId
|
|
543
|
-
tempTableData.stepName = this.activeStepName
|
|
544
|
-
post(applyDetailViewApi.getApplySubTableData, {
|
|
545
|
-
tempTableData: tempTableData
|
|
546
|
-
})
|
|
547
|
-
.then(
|
|
548
|
-
res => {
|
|
549
|
-
const subTableData = res
|
|
550
|
-
const condition = params.conditionParams
|
|
551
|
-
const targetKey = Object.keys(condition)[0].split('_')[1]
|
|
552
|
-
const targeValue = Object.values(condition)[0]
|
|
553
|
-
const editData = {}
|
|
554
|
-
for (const key in subTableData) {
|
|
555
|
-
const item = JSON.parse(subTableData[key].itemsjson)
|
|
556
|
-
const editId = subTableData[key].id
|
|
557
|
-
for (let i = 0; i < item.length; i++) {
|
|
558
|
-
if (item[i].label === targetKey && item[i].value === targeValue) {
|
|
559
|
-
this.editSubTableId = editId
|
|
560
|
-
for (let j = 0; j < item.length; j++) {
|
|
561
|
-
editData[item[j].label] = item[j].value
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
this.xAddFormData = editData
|
|
567
|
-
this.xAddFormVisible = true
|
|
568
|
-
}
|
|
569
|
-
)
|
|
570
|
-
},
|
|
571
420
|
// 修改模态框,提交
|
|
572
421
|
xAddFormSubmit (source) {
|
|
573
422
|
if (source.valid) {
|
|
@@ -581,17 +430,6 @@ export default {
|
|
|
581
430
|
temp.value = values[i]
|
|
582
431
|
formatForm.push(temp)
|
|
583
432
|
}
|
|
584
|
-
return post(applyDetailViewApi.updateSubTableData, {
|
|
585
|
-
id: this.editSubTableId,
|
|
586
|
-
form: formatForm
|
|
587
|
-
})
|
|
588
|
-
.then(
|
|
589
|
-
res => {
|
|
590
|
-
this.xAddFormVisible = false
|
|
591
|
-
this.$message.success('数据已成功修改')
|
|
592
|
-
this.$refs.xFormTable.$refs.xTable.refresh(true)
|
|
593
|
-
}
|
|
594
|
-
)
|
|
595
433
|
}
|
|
596
434
|
},
|
|
597
435
|
// 获取单个步骤的定义
|
|
@@ -608,8 +446,8 @@ export default {
|
|
|
608
446
|
},
|
|
609
447
|
// 获取当前步骤
|
|
610
448
|
getCurrentStep () {
|
|
611
|
-
return
|
|
612
|
-
|
|
449
|
+
return postByServiceName(workFlowViewApi.getWorkFlowCurrentSubState, {
|
|
450
|
+
workflowId: this.workflowId
|
|
613
451
|
})
|
|
614
452
|
.then(res => {
|
|
615
453
|
res.state = this.stepsForChild[res.id - 1].name
|
|
@@ -628,8 +466,8 @@ export default {
|
|
|
628
466
|
async lastStepNextClick () {
|
|
629
467
|
await this.$refs.xAddForm.onSubmit()
|
|
630
468
|
if (this.formValid) {
|
|
631
|
-
return
|
|
632
|
-
|
|
469
|
+
return postByServiceName(workFlowViewApi.afterWorkFlowFinalStepSubmit, {
|
|
470
|
+
workflowId: this.workflowId
|
|
633
471
|
})
|
|
634
472
|
.then(
|
|
635
473
|
res => {
|
|
@@ -666,11 +504,7 @@ export default {
|
|
|
666
504
|
})
|
|
667
505
|
await this.$refs.xAddForm.onSubmit()
|
|
668
506
|
if (this.formValid) {
|
|
669
|
-
|
|
670
|
-
return post(applyDetailViewApi.updateApplySubState, {
|
|
671
|
-
stepId: this.nextBtnTo,
|
|
672
|
-
applyId: this.applyId
|
|
673
|
-
})
|
|
507
|
+
return postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
674
508
|
.then(
|
|
675
509
|
res => {
|
|
676
510
|
const extra = {
|
|
@@ -683,31 +517,6 @@ export default {
|
|
|
683
517
|
console.log(this.nextBtnTo)
|
|
684
518
|
this.saveWorkflowLog('提交', this.generateStepChangeText(this.currentStepId, this.nextBtnTo), extra)
|
|
685
519
|
this.$message.success('提交成功')
|
|
686
|
-
// 微信推送
|
|
687
|
-
post(applyDetailViewApi.saveWatchData, {
|
|
688
|
-
first: this.taskName,
|
|
689
|
-
workflowId: this.workflowId,
|
|
690
|
-
f_entry_name: this.details.f_entry_name,
|
|
691
|
-
f_workflow_define_name: this.details.f_workflow_define_name,
|
|
692
|
-
f_sub_state: this.details.f_sub_state,
|
|
693
|
-
f_complete_time: this.details.f_complete_time,
|
|
694
|
-
currUser: this.currUser.name,
|
|
695
|
-
taskName: this.taskName,
|
|
696
|
-
keyword1: this.workflowId + '(' + this.details.f_entry_name + ')',
|
|
697
|
-
keyword2: this.details.f_workflow_define_name + '-' + this.details.f_sub_state,
|
|
698
|
-
keyword3: '截至时间:' + this.details.f_complete_time + ',请尽快处理。',
|
|
699
|
-
keyword4: this.currUser.name + '推送,' + this.taskName,
|
|
700
|
-
remark: this.note.trim(),
|
|
701
|
-
name: this.checkedChargePerson.split('_')[0],
|
|
702
|
-
operator: this.currUser.name
|
|
703
|
-
}).then(res => {
|
|
704
|
-
this.information = res
|
|
705
|
-
if (this.information.code === 200) {
|
|
706
|
-
this.$message.success(this.information.msg)
|
|
707
|
-
} else {
|
|
708
|
-
this.$message.info(this.information.msg)
|
|
709
|
-
}
|
|
710
|
-
})
|
|
711
520
|
this.loading = true
|
|
712
521
|
this.loadingHistory = true
|
|
713
522
|
this.$emit('refresh')
|
|
@@ -728,9 +537,9 @@ export default {
|
|
|
728
537
|
this.$message.error('退回请在备注中填写理由')
|
|
729
538
|
return
|
|
730
539
|
}
|
|
731
|
-
return
|
|
540
|
+
return postByServiceName(workFlowViewApi.updateApplySubState, {
|
|
732
541
|
stepId: this.preBtnTo,
|
|
733
|
-
|
|
542
|
+
workflowId: this.workflowId
|
|
734
543
|
})
|
|
735
544
|
.then(
|
|
736
545
|
res => {
|
|
@@ -761,9 +570,9 @@ export default {
|
|
|
761
570
|
})
|
|
762
571
|
backName = dataPush[backNameId].handler
|
|
763
572
|
// 微信推送
|
|
764
|
-
|
|
573
|
+
postByServiceName(workFlowViewApi.saveWatchData, {
|
|
765
574
|
first: '工单退回',
|
|
766
|
-
keyword1: this.
|
|
575
|
+
keyword1: this.workflowId + '(' + this.details.f_entry_name + ')',
|
|
767
576
|
keyword2: this.details.f_workflow_define_name + '-' + this.details.f_sub_state,
|
|
768
577
|
keyword3: '',
|
|
769
578
|
keyword4: this.currUser.name + '工单退回给' + backName,
|
|
@@ -786,11 +595,7 @@ export default {
|
|
|
786
595
|
}
|
|
787
596
|
await this.$refs.xAddForm.onSubmit()
|
|
788
597
|
if (this.formValid) {
|
|
789
|
-
|
|
790
|
-
return post(applyDetailViewApi.updateApplySubState, {
|
|
791
|
-
stepId: this.stepNextBtnTo,
|
|
792
|
-
applyId: this.applyId
|
|
793
|
-
})
|
|
598
|
+
return postByServiceName(workFlowViewApi.submitToNextStep, extraData)
|
|
794
599
|
.then(
|
|
795
600
|
res => {
|
|
796
601
|
const extra = {
|
|
@@ -816,8 +621,8 @@ export default {
|
|
|
816
621
|
// 获取当前步骤节点,连通的节点
|
|
817
622
|
getDirection () {
|
|
818
623
|
// 获取流程定义
|
|
819
|
-
return
|
|
820
|
-
id: this.
|
|
624
|
+
return postByServiceName(workFlowViewApi.getApplyWorkflowDefine, {
|
|
625
|
+
id: this.workflowId
|
|
821
626
|
})
|
|
822
627
|
.then(res => {
|
|
823
628
|
console.log('res====', res)
|
|
@@ -870,8 +675,8 @@ export default {
|
|
|
870
675
|
this.formValid = true
|
|
871
676
|
const formData = obj.form
|
|
872
677
|
const time = this.format(new Date(), 'yyyy-MM-dd hh:mm:ss')
|
|
873
|
-
return
|
|
874
|
-
|
|
678
|
+
return postByServiceName(workFlowViewApi.saveApplyStepFormData, {
|
|
679
|
+
workflowId: this.workflowId,
|
|
875
680
|
stepId: this.currentStepId,
|
|
876
681
|
form: formData,
|
|
877
682
|
data: time,
|
|
@@ -895,7 +700,7 @@ export default {
|
|
|
895
700
|
// 打开填写表单,获取当前步骤定义内容,生成表单
|
|
896
701
|
openForm () {
|
|
897
702
|
const define = this.getSingleStepDefine(this.currentStep.state)
|
|
898
|
-
return
|
|
703
|
+
return postByServiceName(commonApi.getColumnsJson, { queryObject: define }).then(res => {
|
|
899
704
|
this.stepDefine = res.formJson
|
|
900
705
|
this.showForm = true
|
|
901
706
|
})
|
|
@@ -912,7 +717,7 @@ export default {
|
|
|
912
717
|
this.subTableName = define.tableName.split(' ')[0]
|
|
913
718
|
this.currentStepSubTableDefine = define
|
|
914
719
|
// 为配置参数添加当前报建ID和步骤名称
|
|
915
|
-
this.currentStepSubTableDefine.
|
|
720
|
+
this.currentStepSubTableDefine.workflowId = this.workflowId
|
|
916
721
|
this.currentStepSubTableDefine.stepName = this.activeStepName
|
|
917
722
|
}
|
|
918
723
|
}
|
|
@@ -970,7 +775,7 @@ export default {
|
|
|
970
775
|
// 将回显数据拷贝,避免引用传递
|
|
971
776
|
let formCompletedDataPreview = JSON.parse(JSON.stringify(this.formCompletedData))
|
|
972
777
|
// 判断激活的节点,是不是待完成节点
|
|
973
|
-
if (this.activeStepName !== this.currentStep.state || this.
|
|
778
|
+
if (this.activeStepName !== this.currentStep.state || this.workflowState) {
|
|
974
779
|
// 使用字段定义中内容,将回显数据的列名,替换为定义的中文名
|
|
975
780
|
const formData = formCompletedDataPreview.data
|
|
976
781
|
for (const key in formData) {
|
|
@@ -1016,8 +821,8 @@ export default {
|
|
|
1016
821
|
},
|
|
1017
822
|
// 获取已经完成步骤的数据
|
|
1018
823
|
getCompletedFormData (stepId) {
|
|
1019
|
-
return
|
|
1020
|
-
|
|
824
|
+
return postByServiceName(workFlowViewApi.getApplyCompletedStepData, {
|
|
825
|
+
workflowId: this.workflowId,
|
|
1021
826
|
stepId: stepId
|
|
1022
827
|
})
|
|
1023
828
|
.then(
|
|
@@ -1046,7 +851,7 @@ export default {
|
|
|
1046
851
|
return false
|
|
1047
852
|
}
|
|
1048
853
|
return {
|
|
1049
|
-
|
|
854
|
+
workflowId: this.workflowId,
|
|
1050
855
|
stepId,
|
|
1051
856
|
name: this.getStepNameByStepId(stepId),
|
|
1052
857
|
handler: stepHandler,
|
|
@@ -1067,8 +872,8 @@ export default {
|
|
|
1067
872
|
},
|
|
1068
873
|
// 保存工作流日志
|
|
1069
874
|
saveWorkflowLog (operation, desc, extra) {
|
|
1070
|
-
|
|
1071
|
-
|
|
875
|
+
postByServiceName(workFlowViewApi.saveApplyWorkflowLog, {
|
|
876
|
+
workflowId: this.workflowId,
|
|
1072
877
|
operation,
|
|
1073
878
|
desc,
|
|
1074
879
|
operator: this.currUser.name,
|
|
@@ -2,86 +2,56 @@
|
|
|
2
2
|
<!-- 抽屉 -->
|
|
3
3
|
<div>
|
|
4
4
|
<!-- 基础信息 -->
|
|
5
|
-
<
|
|
5
|
+
<workflow-base-information-details
|
|
6
6
|
v-if="details"
|
|
7
7
|
ref="baseInformation"
|
|
8
|
-
:
|
|
8
|
+
:workflow-id="workflowId"
|
|
9
9
|
:details="details"
|
|
10
10
|
:visible="visible"
|
|
11
11
|
/>
|
|
12
12
|
<div :style="{ height: screenHeight * 0.9 + 'px' }">
|
|
13
13
|
<a-card style="margin-top: 20px">
|
|
14
14
|
<a-tabs :activeKey="activeKey" @change="changeTab">
|
|
15
|
-
<!-- 暂时不需要 -->
|
|
16
|
-
<!-- 第一个标签页,显示基本信息和流程图 -->
|
|
17
|
-
<!-- <a-tab-pane key="1" tab="基础信息">
|
|
18
|
-
<div v-if="activeKey === '1'">
|
|
19
|
-
<apply-statistics :loading="!(details.f_sub_state && steps)" :chart-data="chartData"/>
|
|
20
|
-
<apply-process-view
|
|
21
|
-
:loading="!(details.f_sub_state && steps)"
|
|
22
|
-
>
|
|
23
|
-
<apply-timeline
|
|
24
|
-
:apply-id="applyId"
|
|
25
|
-
:steps="steps"
|
|
26
|
-
:current-step-id="details.f_step_id"
|
|
27
|
-
:state="details.f_state === 1"/>
|
|
28
|
-
</apply-process-view>
|
|
29
|
-
</div>
|
|
30
|
-
</a-tab-pane> -->
|
|
31
|
-
<!-- 第二个标签页,显示流程信息,根据当前节点显示历史记录、填写表单、控制流程按钮 -->
|
|
32
15
|
<a-tab-pane key="2" tab="查看 / 编辑进度">
|
|
33
|
-
<
|
|
16
|
+
<workflow-handle
|
|
34
17
|
v-if="
|
|
35
|
-
activeKey === '
|
|
18
|
+
activeKey === '1' &&
|
|
36
19
|
details.f_state !== undefined &&
|
|
37
20
|
steps !== undefined
|
|
38
21
|
"
|
|
39
|
-
ref="
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
:applyState="details.f_state === 1"
|
|
22
|
+
ref="workflowHandle"
|
|
23
|
+
:workflow-id="workflowId"
|
|
24
|
+
:workflowState="details.f_state === 1"
|
|
43
25
|
:complete-time="details.f_complete_time"
|
|
44
26
|
:stepsForChild="steps"
|
|
45
|
-
:visible="visible"
|
|
46
27
|
:taskName="details.f_task_name"
|
|
47
28
|
:details="details"
|
|
48
29
|
@refresh="stepChanged"
|
|
49
30
|
/>
|
|
50
31
|
</a-tab-pane>
|
|
51
|
-
<a-tab-pane key="
|
|
52
|
-
<
|
|
32
|
+
<a-tab-pane key="2" tab="任务流转记录">
|
|
33
|
+
<workflow-log v-if="activeKey === '2'" :workflow-id="workflowId"/>
|
|
53
34
|
</a-tab-pane>
|
|
54
|
-
<a-tab-pane key="
|
|
35
|
+
<a-tab-pane key="3">
|
|
55
36
|
<span slot="tab">
|
|
56
37
|
<span>任务留言</span>
|
|
57
|
-
<a-badge
|
|
38
|
+
<a-badge
|
|
39
|
+
:count="messageList.length"
|
|
40
|
+
:offset="[4, -4]"
|
|
41
|
+
:number-style="{ backgroundColor: '#b2b2b2' }"></a-badge>
|
|
58
42
|
</span>
|
|
59
43
|
<a-row>
|
|
60
44
|
<a-col :span="14">
|
|
61
|
-
<leave-message
|
|
45
|
+
<leave-message
|
|
46
|
+
:projectName="details.f_task_name"
|
|
47
|
+
:data="messageList"
|
|
48
|
+
:loading="messageLoading"
|
|
49
|
+
:submit-message="submitMessage"
|
|
50
|
+
@refresh="getMessage"
|
|
51
|
+
:workflow-id="workflowId"/>
|
|
62
52
|
</a-col>
|
|
63
53
|
</a-row>
|
|
64
54
|
</a-tab-pane>
|
|
65
|
-
<!-- 第三个标签页,显示用户表 -->
|
|
66
|
-
<!-- <a-tab-pane key="3" tab="用户">
|
|
67
|
-
<x-form-table
|
|
68
|
-
v-if="fixedAddForm && activeKey === '3'"
|
|
69
|
-
ref="xFormTableOne"
|
|
70
|
-
:fixed-add-form="fixedAddForm"
|
|
71
|
-
:fixed-query-form="fixedQueryForm"
|
|
72
|
-
queryParamsName="applyCustomerQueryParams"
|
|
73
|
-
/>
|
|
74
|
-
</a-tab-pane> -->
|
|
75
|
-
<!-- 第四个标签页,显示表具表 -->
|
|
76
|
-
<!-- <a-tab-pane key="4" tab="表具">
|
|
77
|
-
<x-form-table
|
|
78
|
-
v-if="fixedAddForm && activeKey === '4'"
|
|
79
|
-
ref="xFormTableTwo"
|
|
80
|
-
:fixed-add-form="fixedAddForm"
|
|
81
|
-
:fixed-query-form="fixedQueryForm"
|
|
82
|
-
queryParamsName="applyMetersQueryParams"
|
|
83
|
-
/>
|
|
84
|
-
</a-tab-pane> -->
|
|
85
55
|
</a-tabs>
|
|
86
56
|
</a-card>
|
|
87
57
|
</div>
|
|
@@ -90,22 +60,25 @@
|
|
|
90
60
|
|
|
91
61
|
<script>
|
|
92
62
|
import { mapState } from 'vuex'
|
|
93
|
-
import
|
|
94
|
-
import
|
|
63
|
+
import workflowBaseInformationDetails from './WorkFlowBaseInformationDetails.vue'
|
|
64
|
+
import workflowHandle from './WorkFlowHandle.vue'
|
|
95
65
|
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import ApplyWorkflowLog from './
|
|
66
|
+
import { postByServiceName } from '@vue2-client/services/api/restTools'
|
|
67
|
+
import { workFlowViewApi } from '@/services/api/workFlow'
|
|
68
|
+
import ApplyWorkflowLog from './WorkflowLog.vue'
|
|
69
|
+
import WorkflowLog from '@vue2-client/pages/WorkflowDetail/WorkflowPageDetail/WorkflowLog.vue'
|
|
70
|
+
import LeaveMessage from '@/pages/WorkflowDetail/WorkflowPageDetail/LeaveMessage.vue'
|
|
99
71
|
// import LeaveMessage from '@/components/LeaveMessage'
|
|
100
72
|
|
|
101
73
|
export default {
|
|
102
74
|
name: 'WorkOrderParentDetails',
|
|
103
75
|
components: {
|
|
104
|
-
|
|
105
|
-
|
|
76
|
+
LeaveMessage,
|
|
77
|
+
WorkflowLog,
|
|
78
|
+
workflowBaseInformationDetails,
|
|
79
|
+
workflowHandle,
|
|
106
80
|
XFormTable,
|
|
107
81
|
ApplyWorkflowLog
|
|
108
|
-
// LeaveMessage
|
|
109
82
|
},
|
|
110
83
|
data () {
|
|
111
84
|
return {
|
|
@@ -139,7 +112,7 @@ export default {
|
|
|
139
112
|
...mapState('setting', ['isMobile'])
|
|
140
113
|
},
|
|
141
114
|
props: {
|
|
142
|
-
|
|
115
|
+
workflowId: {
|
|
143
116
|
type: String,
|
|
144
117
|
required: true
|
|
145
118
|
},
|
|
@@ -155,8 +128,8 @@ export default {
|
|
|
155
128
|
},
|
|
156
129
|
// 获取所有步骤
|
|
157
130
|
getSteps () {
|
|
158
|
-
return
|
|
159
|
-
|
|
131
|
+
return postByServiceName(workFlowViewApi.getStepNoteAndHandler, {
|
|
132
|
+
workflowId: this.workflowId
|
|
160
133
|
})
|
|
161
134
|
.then(res => {
|
|
162
135
|
this.steps = res
|
|
@@ -168,8 +141,8 @@ export default {
|
|
|
168
141
|
// 获取基础信息
|
|
169
142
|
getBaseInfo () {
|
|
170
143
|
this.loading = true
|
|
171
|
-
return
|
|
172
|
-
|
|
144
|
+
return postByServiceName(workFlowViewApi.getApplyBasicInfo, {
|
|
145
|
+
workflowId: this.workflowId
|
|
173
146
|
})
|
|
174
147
|
.then(res => {
|
|
175
148
|
res.f_sub_state = this.steps[res.f_step_id - 1].name
|
|
@@ -187,8 +160,8 @@ export default {
|
|
|
187
160
|
this.getMessage()
|
|
188
161
|
await this.getSteps()
|
|
189
162
|
await this.getBaseInfo()
|
|
190
|
-
this.fixedQueryForm.
|
|
191
|
-
this.fixedAddForm.
|
|
163
|
+
this.fixedQueryForm.a_f_workflow_id = this.workflowId
|
|
164
|
+
this.fixedAddForm.a_f_workflow_id = this.workflowId
|
|
192
165
|
if (this.$refs.xFormTableOne !== undefined) {
|
|
193
166
|
this.$refs.xFormTableOne.$refs.xTable.refresh(true)
|
|
194
167
|
}
|
|
@@ -205,8 +178,8 @@ export default {
|
|
|
205
178
|
console.log('数据', this.details)
|
|
206
179
|
console.log('流程', this.steps)
|
|
207
180
|
this.messageLoading = true
|
|
208
|
-
|
|
209
|
-
|
|
181
|
+
postByServiceName(workFlowViewApi.getApplyLeaveMessage, {
|
|
182
|
+
workflowId: this.workflowId
|
|
210
183
|
}).then(res => {
|
|
211
184
|
this.messageList = res
|
|
212
185
|
this.messageLoading = false
|
|
@@ -214,8 +187,8 @@ export default {
|
|
|
214
187
|
},
|
|
215
188
|
// 提交留言
|
|
216
189
|
submitMessage (data) {
|
|
217
|
-
data.
|
|
218
|
-
return
|
|
190
|
+
data.f_workflow_id = this.workflowId
|
|
191
|
+
return postByServiceName('/entity/t_workflow_leave_message', data)
|
|
219
192
|
}
|
|
220
193
|
},
|
|
221
194
|
watch: {
|