cloud-web-corejs 1.0.281 → 1.1.0-dev.5

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 (161) hide show
  1. package/package.json +6 -2
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +44 -2
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +247 -209
  6. package/src/components/baseTabs/mixins.js +181 -181
  7. package/src/components/bizTab/BizBillActions.vue +129 -0
  8. package/src/components/bizTab/BizTabListPage.vue +391 -0
  9. package/src/components/bizTab/README.md +378 -0
  10. package/src/components/bizTab/billTableUtil.js +48 -0
  11. package/src/components/bizTab/billValidators.js +136 -0
  12. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  13. package/src/components/bizTab/index.js +24 -0
  14. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  15. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  16. package/src/components/excelExport/mixins.js +3 -3
  17. package/src/components/mobile/statusTag/mixins.js +1 -61
  18. package/src/components/mobile/wf/content.vue +1662 -1556
  19. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  20. package/src/components/table/config.js +78 -78
  21. package/src/components/table/index.js +1276 -1276
  22. package/src/components/table/plugins/cell-area/index.js +1055 -0
  23. package/src/components/table/plugins/cell-area/index.scss +77 -0
  24. package/src/components/table/plugins/cell-area/util.js +224 -0
  25. package/src/components/table/tableForm.vue +330 -330
  26. package/src/components/table/tableFormMixin.js +318 -318
  27. package/src/components/table/vxeFilter/index.js +163 -163
  28. package/src/components/table/vxeFilter/mixin.js +316 -316
  29. package/src/components/wf/content.vue +1188 -1188
  30. package/src/components/wf/wf.js +40 -20
  31. package/src/components/wf/wfActionDropdown.vue +1 -1
  32. package/src/components/wf/wfActionItems.js +1 -1
  33. package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
  34. package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
  35. package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
  36. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
  37. package/src/components/xform/form-designer/designer.js +15 -0
  38. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  39. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  40. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  41. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  42. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  43. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  44. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  45. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  46. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  47. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  48. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  49. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  50. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  51. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  52. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  53. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  54. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  55. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  56. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  57. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  58. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  59. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  60. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  61. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  62. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +19 -5
  63. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  64. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  65. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  66. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  67. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  68. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  69. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  70. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  71. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  72. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  73. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  74. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  75. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  76. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  77. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  78. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
  79. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +59 -3
  80. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  81. package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
  82. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  83. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  84. package/src/components/xform/form-render/container-item/list-h5-item.vue +1688 -1700
  85. package/src/components/xform/form-render/index.vue +153 -147
  86. package/src/components/xform/form-render/indexMixin.js +12 -0
  87. package/src/components/xform/lang/en-US.js +10 -0
  88. package/src/components/xform/lang/zh-CN.js +12 -0
  89. package/src/components/xform/mixins/defaultHandle.js +707 -707
  90. package/src/components/xform/styles/h5.scss +1992 -0
  91. package/src/components/xform/utils/textMaskUtil.js +182 -179
  92. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  93. package/src/components/xform/utils/util.js +56 -11
  94. package/src/index.js +9 -4
  95. package/src/layout/components/Sidebar/default.vue +1 -1
  96. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  97. package/src/router/index.js +21 -0
  98. package/src/router/modules/customer.js +71 -14
  99. package/src/store/modules/permission.js +17 -18
  100. package/src/utils/pdfUtil.js +429 -429
  101. package/src/utils/resolveViewComponent.js +142 -16
  102. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  103. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  104. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  105. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  106. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  107. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  108. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  109. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  110. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  111. package/src/views/bd/project/common/form_script/list.vue +16 -0
  112. package/src/views/bd/project/common/form_template/list.vue +15 -0
  113. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  114. package/src/views/bd/project/core/branchContext.js +100 -0
  115. package/src/views/bd/project/core/branchPage.js +78 -0
  116. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  117. package/src/views/bd/project/core/branchScope.js +44 -0
  118. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  119. package/src/views/bd/project/core/branchSelect.vue +85 -0
  120. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  121. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  122. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  123. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  124. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  125. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  126. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  127. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  128. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  129. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  130. package/src/views/demo/bizTab/bill/list.vue +288 -0
  131. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  132. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  133. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  134. package/src/views/demo/bizTab/simple/list.vue +217 -0
  135. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  136. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  137. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  138. package/src/views/demo/bizTab/wf/list.vue +242 -0
  139. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  140. package/src/views/support/form-dialog-demo/index.vue +537 -0
  141. package/src/views/user/file_view_ins/list.vue +3 -3
  142. package/src/views/user/home/default.vue +1 -1
  143. package/src/views/user/home/default2.vue +1 -1
  144. package/src/views/user/home/index.vue +8 -6
  145. package/src/views/user/home/wjl/content.vue +1569 -0
  146. package/src/views/user/notify_message/dialog.vue +7 -5
  147. package/src/views/user/outLink/cc_form_view.vue +188 -0
  148. package/src/views/user/outLink/form_view.vue +2 -2
  149. package/src/views/user/outLink/index.vue +4 -4
  150. package/src/views/user/outLink/view.vue +3 -3
  151. package/src/views/user/role/edit.vue +632 -632
  152. package/src/views/user/role/list.vue +260 -260
  153. package/src/views/user/wf/iframe/index.vue +3 -3
  154. package/src/views/user/wf/iframe/index2.vue +3 -3
  155. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  156. package/src/views/user/wf/wf_manage/list2.vue +9 -13
  157. package/src/views/user/wf/wf_manage/wfContentDialog.vue +8 -5
  158. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  159. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  160. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  161. package/src/utils/wf.js +0 -766
@@ -1,1556 +1,1662 @@
1
- <template>
2
- <h5-card-pane label="流程信息">
3
- <template #default>
4
- <div class="flowPath-box">
5
- <div class="t"><span>任务情况</span></div>
6
- <div class="c">
7
- <div class="name">
8
- {{ (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name }}
9
- <el-tag :type="getWfStatusType()" size="mini">{{ getWfStatusLabel() }}</el-tag>
10
- </div>
11
- </div>
12
- <div class="m2">
13
- <div class="t"><span>流程图</span></div>
14
- <div class="c">
15
- <el-button icon="" class="btn" @click="showPreviewDialog=true" icon="el-icon-view">查看流程图</el-button>
16
- </div>
17
- </div>
18
- <div class="m2">
19
- <div class="t"><span>任务情况</span></div>
20
- <div class="c">
21
- <el-button icon="" class="btn" @click="showRenwuDialog=true" icon="iconfont icon-preview">查看任务情况
22
- </el-button>
23
- </div>
24
- </div>
25
-
26
- </div>
27
- <div class="flowPath-btns">
28
- <el-button type="success" plain class="btn" @click="openAgreeDialog" v-show="wfInfo.toSubmit"
29
- icon="iconfont icon-tongguo">{{ $t2('通过', 'components.wf.agree') }}
30
- </el-button>
31
- <el-button type="warning" plain class="btn" @click="openManualDialog" v-show="wfInfo.toInterrupt"
32
- icon="iconfont icon-caozuozhongduan">{{ $t2('中断', 'components.wf.manual') }}
33
- </el-button>
34
- <el-button type="danger" plain class="btn" @click="rejectWfTask" v-show="wfInfo.toReject"
35
- icon="iconfont icon-a-bohui1">{{ $t2('驳回', 'components.wf.reject') }}
36
- </el-button>
37
- <el-button type="primary" plain class="btn" @click="openChangeWfForm"
38
- v-show="(wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer"
39
- icon="iconfont icon-zhuanban">{{ $t2('转办', 'components.wf.transfer') }}
40
- </el-button>
41
- <el-button type="primary" plain class="btn" @click="openUrgingDialog" v-show="wfInfo.toInterrupt"
42
- icon="iconfont icon-cuiban">{{ $t2('催办', 'components.wf.urging') }}
43
- </el-button>
44
- <el-button type="primary" plain class="btn" @click="openAddIncreaseSign" v-show="wfInfo.toAddIncreaseSign"
45
- icon="el-icon-plus">{{ $t2('加签', 'components.wf.addIncreaseSign') }}
46
- </el-button>
47
- <el-button type="primary" plain class="btn" @click="openDeleteTaskUserDialog"
48
- v-show="wfInfo.toDeleteIncreaseSign"
49
- icon="el-icon-delete">{{ $t2('减签', 'components.wf.deleteIncreaseSign') }}
50
- </el-button>
51
- <el-button type="primary" plain class="btn" @click="openTalkDialog()"
52
- icon="el-icon-chat-dot-square" v-if="toTalk && wfInfo.toLinkup">
53
- {{ $t2('沟通', 'components.wf.talk') }}
54
- </el-button>
55
- <el-button type="primary" plain class="btn" @click="openSetCandidateDialog(null)"
56
- v-show="wfInfo.toSetCandidate"
57
- icon="el-icon-user">{{ $t2('修改候选人', 'components.wf.setCandidate') }}
58
- </el-button>
59
- <el-button type="danger" plain class="btn" @click="openRevokeDialog(null)"
60
- v-show="wfInfo.toRevoke"
61
- icon="el-icon-document-delete">{{ $t2('撤回', 'components.wf.revoke') }}
62
- </el-button>
63
- </div>
64
- <div class="pop-box" v-if="showPreviewDialog">
65
- <div>
66
- <div class="header-box">
67
- <i class="back el-icon-close" @click="showPreviewDialog=false"></i>流程图预览
68
- </div>
69
- <div class="flex" style="height:calc(100vh - 38px)">
70
- <el-form label-position="top" class="form-box">
71
- <div class="tit"><span>{{
72
- (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name
73
- }}</span></div>
74
- <iframe style="width: 100%;flex:1" :src="wfImage"></iframe>
75
- </el-form>
76
- </div>
77
- <div class="fixed-bottom-btns">
78
- <el-button type="primary" plain class="btn" @click="showPreviewDialog=false" icon="el-icon-close">取 消
79
- </el-button>
80
- <el-button type="primary" class="btn" icon="el-icon-check" @click="showPreviewDialog=false">确 定
81
- </el-button>
82
- </div>
83
- </div>
84
- </div>
85
-
86
- <div class="pop-box" v-if="showRenwuDialog">
87
- <div>
88
- <div class="header-box">
89
- <i class="back el-icon-close" @click="showRenwuDialog=false"></i>任务情况预览
90
- </div>
91
- <div class="flex" style="height:calc(100vh - 38px);overflow:auto">
92
- <div class="h5-process-info">
93
- <div class="item" v-for="wftaskLineData in wftaskData" :key="wftaskLineData.id">
94
- <div class="time">
95
- {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(0, 10) : '' }}
96
- <br/>
97
- {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(11) : '' }}
98
- </div>
99
- <div class="status"
100
- :class="taskStatuses[wftaskLineData.type]?taskStatuses[wftaskLineData.type].class:''">
101
- {{ taskStatuses[wftaskLineData.type] ? taskStatuses[wftaskLineData.type].value : null }}
102
- </div>
103
- <i class="circle"></i>
104
- <div class="info">
105
- <p>
106
- <span class="name">{{ wftaskLineData.taskName }}</span>
107
- <span>{{ $t2('执行人', 'components.wf.approverName') }}:{{ wftaskLineData.approverName }}</span>
108
- <span>
109
- {{ $t2('候选人', 'components.wf.candidateName') }}:
110
- <span class="">{{ wftaskLineData.candidateNames }}</span>
111
- </span>
112
- </p>
113
- <p class="t"><span class="t1">{{ $t2('备注/意见', 'components.wf.opinion') }}:</span><span>{{
114
- wftaskLineData.opinion
115
- }}</span></p>
116
- </div>
117
- </div>
118
- </div>
119
- </div>
120
- <div class="fixed-bottom-btns">
121
- <el-button type="primary" plain class="btn" @click="showRenwuDialog=false" icon="el-icon-close">取 消
122
- </el-button>
123
- <el-button type="primary" class="btn" icon="el-icon-check" @click="showRenwuDialog=false">确 定
124
- </el-button>
125
- </div>
126
- </div>
127
- </div>
128
-
129
- <div class="pop-tipsBox" style="display: block;" v-if="showWfManualDialog">
130
- <div>
131
- <i class="icon"></i>
132
- <div class="cont">
133
- <p class="name">
134
- {{ $t2('流程中断', 'components.wf.wfManual') }}<span>—</span><b
135
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
136
- wfInfo.taskName
137
- }}</b>
138
- </p>
139
- <p class="txt">{{ $t2('您确定要中断流程吗?', 'components.wf.manualTip') }}</p>
140
- </div>
141
- <div class="btns">
142
- <el-button type="primary" class="btn" plain icon="el-icon-close" @click="showWfManualDialog = false">{{
143
- $t2('取 消', 'system.button.cancel2')
144
- }}
145
- </el-button>
146
- <el-button type="primary" class="btn" icon="el-icon-check" @click="manualEndWf()">{{
147
- $t2('确 定', 'system.button.confirm2')
148
- }}
149
- </el-button>
150
- </div>
151
- </div>
152
- </div>
153
- <div class="pop-tipsBox" style="display: block;" v-if="rejectDialogVisible">
154
- <div>
155
- <i class="icon"></i>
156
- <div class="cont">
157
- <p class="name">{{ $t2('流程驳回', 'components.wf.wfReject') }}<span
158
- >—</span><b
159
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
160
- wfInfo.taskName
161
- }}</b></p>
162
- <el-form label-position="top" class="form-box">
163
- <el-form-item label="驳回节点" field="nodeId">
164
- <el-select v-model="rejectForm.nodeId"
165
- :placeholder="$t2('请选择驳回节点', 'components.wf.rejectNodePlaceholder')">
166
- <el-option v-for="(rejectNode,index) in rejectNodes" :label="rejectNode.nodeName"
167
- :value="rejectNode.nodeId" :key="index"></el-option>
168
- </el-select>
169
- </el-form-item>
170
- <el-form-item label="驳回意见" field="opinion">
171
- <el-input type="textarea" :rows="8"
172
- :placeholder="$t2('请输入内容', 'components.wf.rejectOpinionPlaceholder')"
173
- v-model="rejectForm.opinion" class="txt"></el-input>
174
- </el-form-item>
175
- </el-form>
176
- </div>
177
- <div class="btns">
178
- <el-button type="primary" class="btn" plain icon="el-icon-close" @click="rejectDialogVisible = false">{{
179
- $t2('取 消', 'system.button.cancel2')
180
- }}
181
- </el-button>
182
- <el-button type="primary" class="btn" icon="el-icon-check" @click="subRejectForm()">{{
183
- $t2('确 定', 'system.button.confirm2')
184
- }}
185
- </el-button>
186
- </div>
187
- </div>
188
- </div>
189
- <div class="pop-tipsBox" style="display: block;" v-if="agreeDialogVisible">
190
- <div>
191
- <i class="icon"></i>
192
- <div class="cont">
193
- <p class="name">{{ $t2('流程通过', 'components.wf.wfAgree') }}<span
194
- >—</span><b
195
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
196
- wfInfo.taskName
197
- }}</b></p>
198
- <el-form label-position="top" class="form-box">
199
- <el-form-item label="通过节点" field="nodeId">
200
- <el-select v-model="agreeForm.nodeId"
201
- :placeholder="$t2('请选择通过节点', 'components.wf.agreeNodePlaceholder')">
202
- <el-option v-for="(node,index) in agreeNodes" :label="node.nodeName"
203
- :value="node.nodeId" :key="index"></el-option>
204
- </el-select>
205
- </el-form-item>
206
- <el-form-item label="通过意见" field="opinion">
207
- <el-input type="textarea" :rows="8" :placeholder="$t2(`请填写您的意见~
208
- 注:
209
- 通过默认意见为“同意”
210
- `, 'components.wf.agreeOpinionPlaceholder')" v-model="agreeForm.opinion"></el-input>
211
- </el-form-item>
212
- </el-form>
213
- </div>
214
- <div class="btns">
215
- <el-button type="primary" class="btn" plain icon="el-icon-close" @click="agreeDialogVisible = false">{{
216
- $t2('取 消', 'system.button.cancel2')
217
- }}
218
- </el-button>
219
- <el-button type="primary" class="btn" icon="el-icon-check" @click="subAgreeForm()">{{
220
- $t2('确 定', 'system.button.confirm2')
221
- }}
222
- </el-button>
223
- </div>
224
- </div>
225
- </div>
226
- <div class="pop-tipsBox" style="display: block;" v-if="changeWfDialogVisible">
227
- <div>
228
- <i class="icon"></i>
229
- <div class="cont">
230
- <p class="name">{{ $t2('流程转办', 'components.wf.wfTransfer') }}<span>—</span><b
231
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
232
- wfInfo.taskName
233
- }}</b></p>
234
- <el-form label-position="top" class="form-box">
235
- <el-form-item label="转办人" field="nodeId">
236
- <el-input
237
- class="search-input"
238
- max="200"
239
- v-model="changeWfForm.userNickNames"
240
- @clear="
241
- changeWfForm.userIds = '';
242
- changeUserRows = [];
243
- $forceUpdate();
244
- "
245
- v-el-readonly
246
- clearable
247
- >
248
- <i slot="suffix" class="el-input__icon el-icon-search" @click="showUserDialog = true"></i>
249
- </el-input>
250
- </el-form-item>
251
- <el-form-item label="转办意见" field="opinion">
252
- <el-input type="textarea" :rows="8"
253
- :placeholder="$t2('请输入内容', 'components.wf.transferOpinionPlaceholder')"
254
- v-model="changeWfForm.opinion"></el-input>
255
- </el-form-item>
256
- </el-form>
257
- </div>
258
- <div class="btns">
259
- <el-button type="primary" class="btn" plain @click="changeWfDialogVisible = false">{{
260
- $t2('取 消', 'system.button.cancel2')
261
- }}
262
- </el-button>
263
- <el-button type="primary" class="btn" @click="subChangeWfForm()">
264
- {{ $t2('确认转办', 'components.wf.confirmTransfer') }}
265
- </el-button>
266
- </div>
267
- </div>
268
- </div>
269
- <div class="pop-tipsBox" style="display: block;" v-if="showAddIncreaseSignDialog">
270
- <div>
271
- <i class="icon"></i>
272
- <div class="cont">
273
- <p class="name">
274
- {{ $t2('流程加签', 'components.wf.wfAddIncreaseSign') }}<span>—</span><b
275
- class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
276
- wfInfo.taskName
277
- }}</b>
278
- </p>
279
- <el-form label-position="top" class="form-box">
280
- <el-form-item label="候选人">
281
- <el-input
282
- class="search-input"
283
- max="200"
284
- v-model="addIncreaseSignForm.userNickNames"
285
- @clear="
286
- addIncreaseSignUsers = [];
287
- $forceUpdate();
288
- "
289
- :placeholder="$t2('候选人', 'components.wf.addIncreaseSignUser')"
290
- v-el-readonly
291
- clearable
292
- >
293
- <i slot="suffix" class="el-input__icon el-icon-search"
294
- @click="showAddTaskUserDialog = true"></i>
295
- </el-input>
296
- </el-form-item>
297
- <el-form-item label="加签意见" field="opinion">
298
- <el-input type="textarea" :rows="8"
299
- :placeholder="$t2('请输入内容', 'components.wf.addIncreaseSignOpinionPlaceholder')"
300
- v-model="addIncreaseSignForm.opinion"></el-input>
301
- </el-form-item>
302
- </el-form>
303
- </div>
304
- <div class="btns">
305
- <el-button type="primary" class="btn" plain @click="showAddIncreaseSignDialog = false">{{
306
- $t2('取 消', 'system.button.cancel2')
307
- }}
308
- </el-button>
309
- <el-button type="primary" class="btn" @click="submitAddTaskUserForm(0)">
310
- {{ $t2('确认加签', 'components.wf.confirmAddIncreaseSign') }}
311
- </el-button>
312
- </div>
313
- </div>
314
- </div>
315
-
316
- <user-dialog v-if="showUserDialog" :visiable.sync="showUserDialog" @close="showUserDialog = false"
317
- @confirm="userConfirm" multi="true" :param.sync="wfUserParamForTransfer"
318
- :rows="changeUserRows"></user-dialog>
319
- <urgingDialog v-if="urgingDialogVisible" :visiable.sync="urgingDialogVisible" :wfInfo="wfInfo"
320
- :current_prefix="current_prefix"
321
- @confirm="reloadContent" multi="true"></urgingDialog>
322
- <deleteTaskUserDialog v-if="showDeleteTaskUserDialog" :visiable.sync="showDeleteTaskUserDialog" :wfInfo="wfInfo"
323
- :current_prefix="current_prefix"
324
- @confirm="reloadContent" multi="true"></deleteTaskUserDialog>
325
-
326
- <addTaskUserdialog v-if="showAddTaskUserDialog" :visiable.sync="showAddTaskUserDialog" :wfInfo="wfInfo"
327
- :current_prefix="current_prefix" :rows.sync="addIncreaseSignUsers"
328
- @confirm="confirmAddTaskUser" multi="true"
329
- :param.sync="wfUserParamForAddSign"></addTaskUserdialog>
330
- <user-dialog v-if="showTalkUserDialog" :visiable.sync="showTalkUserDialog" @close="showTalkUserDialog = false"
331
- @confirm="confirmTalkUserDialog" multi="false" :param.sync="wfUserParamForTalk"></user-dialog>
332
- <setCandidateDialog v-if="showSetCandidateDialog" :visiable.sync="showSetCandidateDialog"
333
- @close="closeSetCandidateDialog"
334
- :wfInfo="wfInfo"
335
- :current_prefix="current_prefix"></setCandidateDialog>
336
- </template>
337
- </h5-card-pane>
338
- </template>
339
- <script>
340
- import Vue from "vue";
341
-
342
- import settingConfig from "@/settings";
343
- import commonMixin from "../../../mixins/mobile/common/index";
344
- import {getToken} from "../../../utils/auth";
345
-
346
- let configUtil = {
347
- baseUrl: process.env.VUE_APP_BASE_API,
348
- getToken,
349
- settingConfig,
350
- Vue,
351
- requireView: (url) => {
352
- return require("../../../views" + url).default;
353
- },
354
- };
355
-
356
- function appendPrevChildDom(parentDom, newDom) {
357
- if (parentDom.hasChildNodes()) {
358
- let currentDom = parentDom.children[0];
359
- parentDom.insertBefore(newDom, currentDom);
360
- } else {
361
- parentDom.append(newDom);
362
- }
363
- }
364
-
365
- function getTarget(t) {
366
- return t.parentVue;
367
- }
368
-
369
- export default {
370
- mixins: [commonMixin],
371
- props: {
372
- _wfInfo: Object,
373
- _taskParam: Object,
374
- wfOption: Object,
375
- defaultShowWfContent: Boolean,
376
- },
377
- components: {
378
- UserDialog: () => import('../../../views/mobile/user/user/dialog.vue'),
379
- urgingDialog: () => import('./urgingDialog'),
380
- deleteTaskUserDialog: () => import('./deleteTaskUserDialog'),
381
- addTaskUserdialog: () => import('./addTaskUserdialog'),
382
- setCandidateDialog: () => import('./setCandidateDialog')
383
- },
384
- computed: {
385
- current_prefix() {
386
- return this.serviceId ? "/" + this.serviceId : "";
387
- },
388
- viewTarget() {
389
- return getTarget(this);
390
- },
391
- isHideWf() {
392
- let that = this.viewTarget;
393
- let _hideWf = that._hideWf || that.$attrs._hideWf;
394
- return _hideWf === true || _hideWf === 'true';
395
- }
396
- },
397
- data() {
398
- let showWfFold =
399
- settingConfig.showWfFold != null && settingConfig.showWfFold != undefined
400
- ? settingConfig.showWfFold
401
- : false;
402
- let showWfContent =
403
- showWfFold &&
404
- settingConfig.defaultShowWfContent != null &&
405
- settingConfig.defaultShowWfContent != undefined
406
- ? settingConfig.defaultShowWfContent
407
- : true;
408
- if (
409
- this.defaultShowWfContent != null &&
410
- this.defaultShowWfContent != undefined
411
- ) {
412
- showWfContent = this.defaultShowWfContent;
413
- }
414
-
415
- return {
416
- showRenwuDialog: false,
417
- showDomContent: false,
418
- showPreviewDialog: false,
419
- objId: null,
420
- wfCode: null,
421
- serviceId: null,
422
- parentVue: null,
423
- wfConfig: null,
424
-
425
- fileInfos: [],
426
- showUserDialog: false,
427
- showContent: true,
428
- objTypeCode: "",
429
- // objId: '',
430
- wfInfo: {},
431
- // currentTask: {},
432
- taskParam: {},
433
- wfImage: "",
434
- wfStartBtn: false,
435
- wfManualendBtn: false,
436
- wfSubmitBtn: false,
437
- wfRejectBtn: false,
438
- changeHandlerBtn: false,
439
- wftaskData: [],
440
- allWfTaskOpinions: [],
441
- vxeOption: {},
442
- rejectNodes: [],
443
- rejectDialogVisible: false,
444
- rejectForm: {
445
- rejectSubmitModel: null,
446
- nodeId: null,
447
- opinion: null,
448
- },
449
- formLabelWidth: "120px",
450
- agreeDialogVisible: false,
451
- agreeForm: {
452
- opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
453
- nodeId: null,
454
- },
455
- changeWfDialogVisible: false,
456
- changeWfForm: {},
457
- changeUserRows: [],
458
- taskStatuses: {
459
- start: {
460
- class: "blue",
461
- value: this.$t2('开始', 'components.wf.startStatus'),
462
- },
463
- approve: {
464
- class: "orgn",
465
- value: this.$t2('待审批', 'components.wf.approveStatus'),
466
- },
467
- submit: {
468
- class: "green",
469
- value: this.$t2('同意', 'components.wf.submitStatus'),
470
- },
471
- reject: {
472
- class: "red",
473
- value: this.$t2('驳回', 'components.wf.rejectStatus'),
474
- },
475
- transfer: {
476
- class: "green",
477
- value: this.$t2('转办', 'components.wf.transferStatus'),
478
- },
479
- addIncreaseSign: {
480
- class: "green",
481
- value: this.$t2('加签', 'components.wf.addIncreaseSignStatus'),
482
- },
483
- revoke: {
484
- class: "red",
485
- value: this.$t2('撤回', 'components.wf.revokeStatus'),
486
- },
487
- end: {
488
- class: "gray",
489
- value: this.$t2('结束', 'components.wf.endStatus'),
490
- },
491
- },
492
- opinion: "",
493
- showWfFold: showWfFold,
494
- showWfContent: showWfContent,
495
-
496
- urgingForm: {},
497
- urgingDialogVisible: false,
498
- urgingUserIds: [],
499
- urgingUsers: [],
500
- agreeNodes: [],
501
- showWfManualDialog: false,
502
-
503
- showDeleteTaskUserDialog: false,
504
- showAddTaskUserDialog: false,
505
- wfUserParam: {},
506
- wfUserParamForTransfer: {},//转办
507
- wfUserParamForAddSign: {},//加签
508
- wfUserParamForTalk: {},//沟通
509
- tabIndex: "1",
510
- linkupOption: {},
511
- talkForm: {
512
- receiverName: null,
513
- content: null,
514
- attachmentDTOs: [],
515
- replyId: null
516
- },
517
- showTalkUserDialog: false,
518
- showTalkDialog: false,
519
- showFlowImg: true,
520
- operateType: null,
521
- addIncreaseSignUsers: [],
522
- addIncreaseSignForm: {
523
- userNickNames: null,
524
- opinion: null
525
- },
526
- showAddIncreaseSignDialog: false,
527
- showOpeaImg: true,
528
- showSetCandidateDialog: false,
529
- toTalk: false,
530
- showAllWfOpinon: false,
531
-
532
- revokeDialogVisible: false,
533
- revokeForm: {opinion: null},
534
- wfStatusMap: {
535
- 1: {label: "审核中", type: "warning"},
536
- 3: {label: "已驳回", type: "danger"},
537
- 2: {label: "已完成", type: "success"}
538
- }
539
- };
540
- },
541
- provide() {
542
- return {
543
- getParentVue: () => {
544
- return this.parentVue;
545
- }
546
- };
547
- },
548
- created() {
549
- // this.wfInfo = this._wfInfo;
550
- this.showFlowImg = settingConfig.expandWfImage === false ? false : true;
551
- this.showAllWfOpinon = settingConfig.showAllWfOpinon === true;
552
- },
553
- mounted() {
554
- this.init();
555
- },
556
- methods: {
557
- getWfStatusLabel() {
558
- return this.wfStatusMap[this.wfInfo.stat]?.label;
559
- },
560
- getWfStatusType() {
561
- return this.wfStatusMap[this.wfInfo.stat]?.type;
562
- },
563
- init() {
564
- let opt = this.wfOption;
565
- this.objId = opt.objId;
566
- this.wfCode = opt.wfCode;
567
- this.serviceId = opt.serviceId;
568
- this.parentVue = opt.parentVue;
569
- this.wfConfig = this.wfOption;
570
-
571
- let wfConfig = this.wfOption;
572
- let that = getTarget(this);
573
- let hasWf = false;
574
- let wfInfo, currentTask, taskParam;
575
- let option = {
576
- objId: this.objId,
577
- wfCode: this.wfCode
578
- }
579
- let current_prefix = this.current_prefix;
580
-
581
- let initButton = () => {
582
- /*return
583
- this.$nextTick(() => {
584
- that.$refs.wfButtonGroup.init({
585
- taskParam,
586
- wfInfo,
587
- hasWf,
588
- current_prefix,
589
- wfConfig
590
- });
591
- });*/
592
- }
593
-
594
- this.initWfInfo(option, {
595
- success: res => {
596
- if (res.objx && res.objx.procInstId) {
597
- hasWf = true;
598
- wfInfo = res.objx;
599
- this.wfInfo = wfInfo;
600
- // this.showDomContent = true;
601
-
602
- if (wfInfo.taskId) {
603
- this.getTaskParams(wfInfo.taskId, {
604
- success: res2 => {
605
- taskParam = res2.objx || {};
606
- taskParam.objId = option.objId;
607
- this.taskParam = taskParam;
608
-
609
- initButton();
610
- }
611
- });
612
- } else {
613
- initButton();
614
- }
615
- this.initOperateType();
616
- this.initForAll();
617
- } else {
618
- initButton();
619
- }
620
- }
621
- });
622
- },
623
- initWfInfo(option, httpConfig) {
624
-
625
- let that = getTarget(this);
626
- let id = option.objId;
627
- let code = option.wfCode;
628
- return that.$http({
629
- url: this.current_prefix + '/wf/getWfInfo',
630
- method: `post`,
631
- data: {
632
- objTypeCode: code,
633
- objId: id
634
- },
635
- isLoading: true,
636
- modalStrictly: true,
637
- ...httpConfig
638
- });
639
- },
640
- getTaskParams(taskId, httpConfig) {
641
- let that = getTarget(this);
642
- return that.$http({
643
- url: this.current_prefix + '/wf/getTaskVariables',
644
- method: `post`,
645
- data: {
646
- stringOne: taskId
647
- },
648
- isLoading: true,
649
- modalStrictly: true,
650
- ...httpConfig
651
- });
652
- },
653
-
654
-
655
- initOperateType() {
656
- if (this.operateType) {
657
- let wfInfo = this.wfInfo;
658
- if (wfInfo.toSubmit) {
659
- this.openAgreeDialog('submit');
660
- } else if (wfInfo.toReject) {
661
- this.rejectWfTask('reject');
662
- } else if (wfInfo.toAddIncreaseSign) {
663
- this.openAddIncreaseSign('addIncreaseSign')
664
- } else if (wfInfo.toRevoke) {
665
- this.openRevokeDialog('revoke')
666
- } else if (wfInfo.toLinkup) {
667
- this.openTalkDialog(null, null, 'talk');
668
- } else {
669
- this.operateType = null;
670
- }
671
- }
672
- },
673
- initForAll() {
674
- let that = getTarget(this);
675
- this.initWf(() => {
676
- if (this.wfInfo.procInstId) {
677
- this.initCurrentTask(this.wfInfo.procInstId, () => {
678
- this.initWftask(this.wfInfo.procInstId);
679
- this.getAllWfTaskOpinions();
680
- });
681
- this.initWfUserParam();
682
- this.initTabIndex();
683
- }
684
- });
685
- },
686
- initTabIndex() {
687
- let that = getTarget(this);
688
- that.$http({
689
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
690
- method: `post`,
691
- data: {attributeKey: "param7"},
692
- isLoading: true,
693
- success: (res) => {
694
- let val = res !== null ? res.objx === true : false;
695
- this.toTalk = val;
696
- let flag = false;
697
- if (val) {
698
- let flag1 = that.$attrs._isNotifyMessage == true || that.$attrs._isNotifyMessage == "true";
699
- if (flag1) {
700
- this.tabIndex = "2";
701
- }
702
- if (settingConfig.autoOpenWfLinkup) {
703
- flag = true;
704
- let flag2 = that.$attrs._wfNotifyType == "wfLinkup";
705
- let flag3 = flag1 && flag2;
706
- if (flag3) {
707
- this.$nextTick(() => {
708
- let wfTabPane = this.$refs.wfTabPane;
709
- if (!wfTabPane.showContent) {
710
- wfTabPane.handleFold();
711
- }
712
- });
713
- }
714
- }
715
- }
716
- this.initLinkup(flag);
717
- }
718
- });
719
-
720
- },
721
- initWf(done) {
722
- var data = this.wfInfo;
723
- if (data && data.procInstId) {
724
- /** 流程状态:0未启动,1审核中,2已完成,3驳回,4中断 */
725
- var statuses = {
726
- 1: '<span class="tag">' + this.$t2('审核中', 'components.wf.wfStatus1') + '</span>',
727
- 3: '<span class="tag red">' + this.$t2('已驳回', 'components.wf.wfStatus2') + '</span>',
728
- 2: '<span class="tag green">' + this.$t2('已完成', 'components.wf.wfStatus3') + '</span>',
729
- };
730
- var statusStr = "";
731
- if (data.stat != null) {
732
- statusStr = statuses[data.stat] || "";
733
- }
734
- data.statusStr = statusStr;
735
- this.wfInfo = data;
736
-
737
- this.wfStartBtn = false;
738
- if (data.status != 2 && data.starterId) {
739
- this.wfManualendBtn = true;
740
- }
741
- this.wfSubmitBtn = false;
742
- this.wfRejectBtn = false;
743
-
744
- var url =
745
- this.current_prefix +
746
- "/wf/flowImage?procInstId=" +
747
- data.procInstId +
748
- "&_r=" +
749
- Math.random() +
750
- "&access_token=" +
751
- configUtil.getToken();
752
- this.wfImage = configUtil.baseUrl + url;
753
- done();
754
- }
755
- },
756
- initCurrentTask(procInstId, done) {
757
- if (this.wfInfo.taskId) {
758
- this.wfSubmitBtn = true;
759
- this.wfRejectBtn = true;
760
- this.changeHandlerBtn = true;
761
- }
762
- done();
763
- },
764
- initWftask(procInstId) {
765
- let that = getTarget(this);
766
- that.$http({
767
- url: this.current_prefix + "/wf/getWfTaskOpinionMerge",
768
- data: {
769
- stringOne: procInstId,
770
- },
771
- method: "post",
772
- isLoading: true,
773
- modalStrictly: true,
774
- success: (resultmsg) => {
775
- var datas = resultmsg.objx || [];
776
- this.wftaskData = datas;
777
- },
778
- });
779
- },
780
- getAllWfTaskOpinions() {
781
- if (!this.showAllWfOpinon) {
782
- return;
783
- }
784
- let that = getTarget(this);
785
- let wfInfo = this.wfInfo;
786
- that.$http({
787
- url: this.current_prefix + "/wf/getAllWfTaskOpinions",
788
- data: {
789
- objId: wfInfo.objId,
790
- objTypeCode: wfInfo.objTypeCode
791
- },
792
- method: "post",
793
- isLoading: true,
794
- modalStrictly: true,
795
- success: (resultmsg) => {
796
- var datas = resultmsg.objx || [];
797
- this.allWfTaskOpinions = datas;
798
- },
799
- });
800
- },
801
- openManualDialog(operateType) {
802
- this.operateType = operateType;
803
- this.showWfManualDialog = true;
804
- },
805
- manualEndWf() {
806
- this.showWfManualDialog = false;
807
- let that = getTarget(this);
808
- var procInstId = this.wfInfo.procInstId;
809
- var taskId = this.wfInfo.taskId ? this.wfInfo.taskId : "";
810
- var data = JSON.stringify({
811
- uuid: this.wfInfo.uuid,
812
- });
813
- that.$http({
814
- url: this.current_prefix + "/wf/interrupt",
815
- data: data,
816
- method: "post",
817
- headers: {
818
- "Content-Type": "application/json;charset=utf-8",
819
- },
820
- isLoading: true,
821
- success: (resultMsg) => {
822
- that.$message({
823
- message: resultMsg.content,
824
- type: "success",
825
- duration: 500,
826
- onClose: (t) => {
827
- this.reloadContent();
828
- this.closeWinOnCheck(3);
829
- },
830
- });
831
- },
832
- });
833
- },
834
- async rejectWfTask(operateType) {
835
- let that = getTarget(this);
836
- var procInstId = this.wfInfo.procInstId;
837
- var taskId = this.wfInfo.taskId;
838
- var destinations = [];
839
-
840
- await that.$http({
841
- url: this.current_prefix + "/wf/getPreIncomeNodes",
842
- data: {
843
- stringOne: taskId,
844
- },
845
- method: "post",
846
- //contentType: 'application/json;charset=utf-8',
847
- isLoading: true,
848
- success: (resultMsg) => {
849
- destinations = (resultMsg.objx || []).reverse();
850
- },
851
- });
852
-
853
- if (destinations == null) {
854
- return false;
855
- }
856
- if (destinations.length == 0) {
857
- that.$message({
858
- message: this.$t2('无法驳回,没有目标节点', 'components.wf.rejectWarnMsg1'),
859
- type: "error",
860
- duration: 2 * 1000,
861
- });
862
- return false;
863
- }
864
- this.operateType = operateType;
865
-
866
- this.rejectForm.rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null
867
- this.rejectForm.nodeId = destinations[0].nodeId;
868
- this.rejectForm.opinion = "";
869
- this.rejectNodes = destinations;
870
- this.rejectDialogVisible = true;
871
- },
872
- subRejectForm() {
873
- let that = getTarget(this);
874
- var procInstId = this.wfInfo.procInstId;
875
- var taskId = this.wfInfo.taskId;
876
-
877
- if (!this.rejectForm.nodeId) {
878
- that.$message({
879
- message: this.$t2('请选择驳回节点', 'components.wf.rejectWarnMsg2'),
880
- type: "error",
881
- duration: 2 * 1000,
882
- });
883
- return false;
884
- }
885
-
886
- if (!this.rejectForm.opinion) {
887
- that.$message({
888
- message: this.$t2('请输入驳回意见', 'components.wf.rejectWarnMsg3'),
889
- type: "error",
890
- duration: 2 * 1000,
891
- });
892
- return false;
893
- }
894
-
895
- var data = JSON.stringify({
896
- taskId: taskId,
897
- uuid: this.wfInfo.uuid,
898
- nodeId: this.rejectForm.nodeId,
899
- suggestion: this.rejectForm.opinion,
900
- rejectSubmitModel: this.rejectForm.rejectSubmitModel
901
- });
902
- this.rejectDialogVisible = false;
903
- that.$http({
904
- url: this.current_prefix + "/wf/reject",
905
- data: data,
906
- method: "post",
907
- headers: {
908
- "Content-Type": "application/json;charset=utf-8",
909
- },
910
- isLoading: true,
911
- success: (resultMsg) => {
912
- that.$message({
913
- message: resultMsg.content,
914
- type: "success",
915
- duration: 500,
916
- onClose: (t) => {
917
- this.reloadContent();
918
- this.closeWinOnCheck(2);
919
- },
920
- });
921
- },
922
- });
923
- },
924
- openAgreeDialog(operateType) {
925
- this.operateType = operateType;
926
- let that = getTarget(this);
927
- this.agreeForm = {
928
- opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
929
- nodeId: null,
930
- };
931
- this.agreeNodes = [];
932
- that.$http({
933
- url: this.current_prefix + "/wf/getNextOutgoingNodes",
934
- data: {
935
- stringOne: this.wfInfo.taskId,
936
- },
937
- method: "post",
938
- isLoading: true,
939
- success: (res) => {
940
- let nodes = res.objx || [];
941
- /*if (tq == true) {
942
- nodes.reverse();
943
- }*/
944
- if (nodes.length) {
945
- this.agreeForm.nodeId = nodes[0].nodeId;
946
- }
947
- this.agreeNodes = nodes;
948
- this.agreeDialogVisible = true;
949
- },
950
- });
951
- },
952
- subAgreeForm() {
953
- let wfConfig = this.wfConfig;
954
- let done = () => {
955
- this.subAgreeHandle();
956
- }
957
- if (wfConfig.onBeforeAgree) {
958
- wfConfig.onBeforeAgree(done)
959
- } else {
960
- done();
961
- }
962
- },
963
- subAgreeHandle() {
964
- let that = getTarget(this);
965
- let nodeId = null;
966
- if (this.agreeNodes.length) {
967
- if (!this.agreeForm.nodeId) {
968
- that.$message({
969
- message: this.$t2('请选择节点', 'components.wf.agreeWarnMsg1'),
970
- type: "error",
971
- duration: 2 * 1000,
972
- });
973
- return;
974
- }
975
- nodeId = this.agreeForm.nodeId;
976
- }
977
-
978
- var procInstId = this.wfInfo.procInstId;
979
- var taskId = this.wfInfo.taskId;
980
- var memo = this.agreeForm.opinion || this.$t2('同意', 'components.wf.defaultAgreeOption');
981
- var data = JSON.stringify({
982
- taskId: taskId,
983
- uuid: this.wfInfo.uuid,
984
- suggestion: memo,
985
- nodeId: nodeId,
986
- });
987
- this.agreeDialogVisible = false;
988
- that.$http({
989
- url: this.current_prefix + "/wf/submit",
990
- data: data,
991
- method: "post",
992
- headers: {
993
- "Content-Type": "application/json;charset=utf-8",
994
- },
995
- isLoading: true,
996
- success: (resultMsg) => {
997
- if (resultMsg.objx && resultMsg.objx.code == "999999") {
998
- this.errorSubmit({
999
- taskId: taskId,
1000
- uuid: this.wfInfo.uuid,
1001
- suggestion: memo,
1002
- errorMsg: resultMsg.objx.errorMsg
1003
- });
1004
- } else {
1005
- that.$message({
1006
- message: resultMsg.content,
1007
- type: "success",
1008
- duration: 500,
1009
- onClose: (t) => {
1010
- this.reloadContent();
1011
- this.closeWinOnCheck(1);
1012
- },
1013
- });
1014
- }
1015
- },
1016
- });
1017
- },
1018
- errorSubmit(data) {
1019
- let that = getTarget(this);
1020
- that.$http({
1021
- url: this.current_prefix + "/wf/errorSubmit",
1022
- data: data,
1023
- method: "post",
1024
- isLoading: true,
1025
- success: (resultMsg) => {
1026
- that.$message({
1027
- message: resultMsg.content,
1028
- type: "success",
1029
- duration: 500,
1030
- onClose: (t) => {
1031
- this.reloadContent();
1032
- this.closeWinOnCheck(1);
1033
- },
1034
- });
1035
- },
1036
- });
1037
- },
1038
- openChangeWfForm(operateType) {
1039
- this.operateType = operateType;
1040
- this.changeWfDialogVisible = true;
1041
- this.changeUserRows = [];
1042
- this.changeWfForm = {
1043
- userIds: [],
1044
- userNickNames: null,
1045
- opinion: null,
1046
- };
1047
- },
1048
- subChangeWfForm() {
1049
- let that = getTarget(this);
1050
- var procInstId = this.wfInfo.procInstId;
1051
- var taskId = this.wfInfo.taskId;
1052
-
1053
- var userIds = this.changeWfForm.userIds || [];
1054
- var opinion = this.changeWfForm.opinion || null;
1055
-
1056
- if (!userIds.length) {
1057
- that.$message({
1058
- message: this.$t2('请选择转办人', 'components.wf.transferWarnMsg1'),
1059
- type: "error",
1060
- duration: 2000,
1061
- onClose: (t) => {
1062
- },
1063
- });
1064
- return false;
1065
- }
1066
-
1067
- var data = JSON.stringify({
1068
- taskId: taskId,
1069
- uuid: this.wfInfo.uuid,
1070
- transferTo: userIds,
1071
- suggestion: opinion,
1072
- });
1073
- this.changeWfDialogVisible = false;
1074
- that.$http({
1075
- url: this.current_prefix + "/wf/transfer",
1076
- data: data,
1077
- method: "post",
1078
- headers: {
1079
- "Content-Type": "application/json;charset=utf-8",
1080
- },
1081
- isLoading: true,
1082
- success: (resultMsg) => {
1083
- that.$message({
1084
- message: resultMsg.content,
1085
- type: "success",
1086
- duration: 500,
1087
- onClose: (t) => {
1088
- this.reloadContent();
1089
- this.closeWinOnCheck(4);
1090
- },
1091
- });
1092
- },
1093
- });
1094
- },
1095
- userConfirm(rows) {
1096
- if (rows.length > 0) {
1097
- let changeUserRows = this.changeUserRows;
1098
- let ids = changeUserRows.map((changeUserRow) => changeUserRow.id);
1099
- let addRows = rows.filter((row) => !ids.includes(row.id));
1100
- changeUserRows.push(...addRows);
1101
-
1102
- let row = rows[0];
1103
- this.changeWfForm.userIds = changeUserRows.map(
1104
- (changeUserRow) => changeUserRow.id
1105
- );
1106
- this.changeWfForm.userNickNames = changeUserRows
1107
- .map((changeUserRow) => changeUserRow.nickName)
1108
- .join(",");
1109
- }
1110
- },
1111
- reloadContent() {
1112
- let that = getTarget(this);
1113
- that.$baseReload();
1114
- },
1115
- closeWinOnCheck(flag) {
1116
- //_closeWindowOnCheck=true, 1提交,2驳回,3中断,4转办时,5沟通 关闭窗口
1117
- let that = getTarget(this);
1118
- let _closeWindowOnCheck = that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
1119
- if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
1120
- window.close && window.close();
1121
- }
1122
- let _handleCallback = that.$attrs._handleCallback || that._handleCallback;
1123
- _handleCallback && _handleCallback(flag);
1124
- },
1125
- manualCallback() {
1126
- this.$emit("manualCallback");
1127
- },
1128
- openUrgingDialog(operateType) {
1129
- this.operateType = operateType;
1130
- this.urgingDialogVisible = true;
1131
- },
1132
- openDeleteTaskUserDialog(operateType) {
1133
- this.operateType = operateType;
1134
- this.showDeleteTaskUserDialog = true;
1135
- },
1136
- openAddTaskUserDialog(operateType) {
1137
- this.operateType = operateType;
1138
- this.showAddTaskUserDialog = true;
1139
- },
1140
- openAddIncreaseSign(operateType) {
1141
- this.operateType = operateType;
1142
- this.addIncreaseSignUsers = [];
1143
- this.addIncreaseSignForm = {userNickNames: null};
1144
- this.showAddIncreaseSignDialog = true;
1145
- },
1146
- initWfUserParam(callback) {
1147
- this.initTransferUserParam();//转办
1148
- this.initAddSignUserParam();//加签
1149
- this.initTalkUserParam();//沟通
1150
- },
1151
- //
1152
- initTransferUserParam(callback) {
1153
- //初始化转办用户参数
1154
- let that = getTarget(this);
1155
- return that.$http({
1156
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
1157
- method: `post`,
1158
- data: {attributeKey: "param1"},
1159
- isLoading: true,
1160
- modalStrictly: true,
1161
- success: (res) => {
1162
- this.wfUserParamForTransfer = res.objx || {};
1163
- callback && callback();
1164
- },
1165
- });
1166
- },
1167
- initAddSignUserParam(callback) {
1168
- //初始化加签用户参数
1169
- let that = getTarget(this);
1170
- return that.$http({
1171
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
1172
- method: `post`,
1173
- data: {attributeKey: "param2"},
1174
- isLoading: true,
1175
- modalStrictly: true,
1176
- success: (res) => {
1177
- this.wfUserParamForAddSign = res.objx || {};
1178
- callback && callback();
1179
- },
1180
- });
1181
- },
1182
- initTalkUserParam(callback) {
1183
- //初始化沟通用户参数
1184
- let that = getTarget(this);
1185
- return that.$http({
1186
- url: USER_PREFIX + "/wf_diy_attribute/getValue",
1187
- method: `post`,
1188
- data: {attributeKey: "param3"},
1189
- isLoading: true,
1190
- modalStrictly: true,
1191
- success: (res) => {
1192
- this.wfUserParamForTalk = res.objx || {};
1193
- callback && callback();
1194
- },
1195
- });
1196
- },
1197
- //
1198
- resetLinkup() {
1199
- this.formData = {};
1200
- this.$refs["table-linkup"].commitProxy("reload");
1201
- },
1202
- searchLinkup() {
1203
- this.$refs["table-linkup"].commitProxy("reload");
1204
- },
1205
- initLinkup(flag) {
1206
- return
1207
- let h = this.$createElement;
1208
- let statusMap = {
1209
- 0: this.$t2('未完成', 'components.wf.talkStatus0'),
1210
- 1: this.$t2('已完成', 'components.wf.talkStatus1'),
1211
- 2: this.$t2('已取消', 'components.wf.talkStatus2')
1212
- };
1213
- let tableOption = {
1214
- vue: this,
1215
- tableRef: "table-linkup",
1216
- tableName: "wf_table-linkup",
1217
- path: this.current_prefix + "/wf_linkup/listPage",
1218
- param: () => {
1219
- return {
1220
- uuid: this.wfInfo.uuid,
1221
- };
1222
- },
1223
- config: {
1224
- height: 350
1225
- },
1226
- columns: [
1227
- {type: "checkbox", width: 48, resizable: false, fixed: "left"},
1228
- {
1229
- title: this.$t2('任务名称', 'components.wf.taskName'),
1230
- field: "taskName",
1231
- width: 150,
1232
- fixed: "left",
1233
- },
1234
- {
1235
- title: this.$t2('发送人', 'components.wf.senderName'),
1236
- field: "senderName",
1237
- width: 150,
1238
- slots: {
1239
- default: "sender",
1240
- },
1241
- },
1242
- {
1243
- title: this.$t2('接收人', 'components.wf.receiverName'),
1244
- field: "receiverName",
1245
- width: 150,
1246
- slots: {
1247
- default: "receiver",
1248
- },
1249
- },
1250
- {
1251
- title: this.$t2('沟通内容', 'components.wf.talkContent'),
1252
- field: "content",
1253
- width: 250,
1254
- showOverflow: false,
1255
- slots: {
1256
- default: ({row, rowIndex}) => {
1257
- return row.replyId ? ("[" + this.$t2('回复', 'components.wf.reply') + "]" + row.content) : row.content;
1258
- },
1259
- },
1260
- },
1261
- {
1262
- width: 150,
1263
- title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1264
- field: "attachmentImage",
1265
- sortable: false,
1266
- slots: {
1267
- default: ({row, rowIndex}) => {
1268
- let option = {
1269
- title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1270
- edit: false,
1271
- rows: (done) => {
1272
- done(row.attachmentDTOs);
1273
- },
1274
- };
1275
- return [
1276
- h("base-attachment", {
1277
- props: {
1278
- option: option,
1279
- },
1280
- }),
1281
- ];
1282
- },
1283
- },
1284
- },
1285
-
1286
- {
1287
- title: this.$t2('状态', 'components.wf.status'),
1288
- field: "status",
1289
- width: 150,
1290
- slots: {
1291
- default: ({row, rowIndex}) => {
1292
- return statusMap[row.status] || "";
1293
- },
1294
- },
1295
- },
1296
- {
1297
- title: this.$t2('创建时间', 'system.label.createDate'),
1298
- field: "createDate",
1299
- width: 150,
1300
- },
1301
- {
1302
- width: 80,
1303
- fixed: "right",
1304
- title: "",
1305
- sortable: false,
1306
- slots: {
1307
- default: "operate"
1308
- }
1309
- },
1310
- ],
1311
- callback: (rows) => {
1312
- if (rows.length && flag) {
1313
- let row = rows[0];
1314
- if (row.replyToSender) {
1315
- this.$nextTick(() => {
1316
- this.tabIndex = "2";
1317
- this.openTalkDialog(row.sender, row.senderName, 'talk', 1, row.id)
1318
- });
1319
- }
1320
- }
1321
- }
1322
- };
1323
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
1324
- this.linkupOption = opts;
1325
- });
1326
- },
1327
- cancelTalk(row) {
1328
- let that = getTarget(this);
1329
- that.$baseConfirm(this.$t2('您确定要取消沟通记录吗?', 'components.wf.cancelTalkTip')).then(() => {
1330
- that.$http({
1331
- url: this.current_prefix + "/wf_linkup/cancel",
1332
- data: {id: row.id},
1333
- method: "post",
1334
- loadingTarget: document.body,
1335
- isLoading: true,
1336
- success: (resultMsg) => {
1337
- that.$message({
1338
- message: resultMsg.content,
1339
- type: "success",
1340
- duration: 500,
1341
- onClose: (t) => {
1342
- this.reloadContent();
1343
- },
1344
- });
1345
- },
1346
- });
1347
- });
1348
- },
1349
- openTalkDialog(receiver, receiverName, operateType, flag, replyId) {
1350
- this.operateType = operateType;
1351
- /*this.talkForm.receiver = receiver || null;
1352
- this.talkForm.receiverName = receiverName || null;
1353
- this.talkForm.replyId = replyId || null;
1354
- this.talkForm.content = null;
1355
- this.talkForm.attachmentDTOs = [];*/
1356
- this.initTalkForm(receiver, receiverName, replyId)
1357
- this.showTalkDialog = true;
1358
- if (flag == 1) {
1359
- let opeaBtnDom = this.$refs.opeaBtn;
1360
- opeaBtnDom && opeaBtnDom.scrollIntoView();
1361
- }
1362
- },
1363
- initTalkForm(receiver, receiverName, replyId) {
1364
- this.talkForm.receiver = receiver || null;
1365
- this.talkForm.receiverName = receiverName || null;
1366
- this.talkForm.replyId = replyId || null;
1367
- this.talkForm.content = null;
1368
- this.talkForm.attachmentDTOs = [];
1369
- },
1370
- submitTalkForm() {
1371
- let that = getTarget(this);
1372
- var procInstId = this.wfInfo.procInstId;
1373
- var taskId = this.wfInfo.taskId;
1374
-
1375
- if (!this.talkForm.receiver) {
1376
- that.$message({
1377
- message: this.$t2('请选择接收人', 'components.wf.talkWarnMsg1'),
1378
- type: "error",
1379
- duration: 2 * 1000,
1380
- });
1381
- return false;
1382
- }
1383
- if (!this.talkForm.content) {
1384
- that.$message({
1385
- message: this.$t2('请输入沟通内容', 'components.wf.talkWarnMsg2'),
1386
- type: "error",
1387
- duration: 2 * 1000,
1388
- });
1389
- return false;
1390
- }
1391
-
1392
- var data = {
1393
- taskId: taskId,
1394
- uuid: this.wfInfo.uuid,
1395
- receiver: this.talkForm.receiver,
1396
- receiverName: this.talkForm.receiverName,
1397
- replyId: this.talkForm.replyId,
1398
- content: this.talkForm.content,
1399
- attachmentDTOs: this.talkForm.attachmentDTOs,
1400
- notifyType: "wfLinkup",
1401
- };
1402
- this.showTalkDialog = false;
1403
- that.$http({
1404
- url: this.current_prefix + "/wf_linkup/save",
1405
- data: data,
1406
- method: "post",
1407
- isLoading: true,
1408
- success: (resultMsg) => {
1409
- that.$message({
1410
- message: resultMsg.content,
1411
- type: "success",
1412
- duration: 500,
1413
- onClose: (t) => {
1414
- this.reloadContent();
1415
- this.closeWinOnCheck(5);
1416
- },
1417
- });
1418
- },
1419
- });
1420
- },
1421
- openTalkUserDialog() {
1422
- this.showTalkUserDialog = true;
1423
- },
1424
- confirmTalkUserDialog(rows) {
1425
- if (rows.length > 0) {
1426
- let row = rows[0];
1427
- if (this.talkForm.receiver != row.id) {
1428
- this.talkForm.replyId = null;
1429
- }
1430
- this.talkForm.receiver = row.id;
1431
- this.talkForm.receiverName = row.nickName;
1432
- }
1433
- },
1434
- confirmUrging() {
1435
- this.reloadContent();
1436
- },
1437
- confirmDeleteTaskUser() {
1438
- this.reloadContent();
1439
- },
1440
- confirmAddTaskUser(rows) {
1441
- this.addIncreaseSignUsers = rows;
1442
- this.addIncreaseSignForm.userNickNames = rows.map(row => row.nickName).join(',');
1443
- // this.reloadContent();
1444
- },
1445
- submitAddTaskUserForm(flag) {
1446
- let that = getTarget(this);
1447
- let userIds = this.addIncreaseSignUsers.map((checkRow) => checkRow.id);
1448
- if (userIds.length == 0) {
1449
- that.$message({
1450
- message: this.$t2('请选择候选人', 'components.wf.addIncreaseSignWarnMsg1'),
1451
- type: "error",
1452
- duration: 2000,
1453
- onClose: (t) => {
1454
- },
1455
- });
1456
- return false;
1457
- }
1458
- let toDo = () => {
1459
- var data = JSON.stringify({
1460
- uuid: this.wfInfo.uuid,
1461
- taskId: this.wfInfo.taskId,
1462
- userIds: userIds,
1463
- suggestion: this.addIncreaseSignForm.opinion
1464
-
1465
- });
1466
- this.agreeDialogVisible = false;
1467
- that.$http({
1468
- url: this.current_prefix + "/wf/addIncreaseSign",
1469
- data: data,
1470
- method: "post",
1471
- loadingTarget: document.body,
1472
- headers: {
1473
- "Content-Type": "application/json;charset=utf-8",
1474
- },
1475
- isLoading: true,
1476
- success: (resultMsg) => {
1477
- that.$message({
1478
- message: resultMsg.content,
1479
- type: "success",
1480
- duration: 500,
1481
- onClose: (t) => {
1482
- this.reloadContent();
1483
- },
1484
- });
1485
- },
1486
- });
1487
- }
1488
- if (flag === 0) {
1489
- toDo();
1490
- } else {
1491
- that.$baseConfirm(this.$t2('您确定要加签吗?', 'components.wf.addIncreaseSignConfirmTip')).then(() => {
1492
- toDo();
1493
- });
1494
- }
1495
- },
1496
- openSetCandidateDialog(operateType) {
1497
- this.operateType = operateType;
1498
- this.showSetCandidateDialog = true;
1499
- },
1500
- closeSetCandidateDialog() {
1501
- this.showSetCandidateDialog = false;
1502
- this.reloadContent();
1503
- },
1504
- openRevokeDialog(operateType) {
1505
- this.operateType = operateType;
1506
- this.revokeForm = {opinion: null}
1507
- this.revokeDialogVisible = true;
1508
- },
1509
- subRevokeForm(flag) {
1510
- //撤回
1511
- let that = getTarget(this);
1512
- let toDo = () => {
1513
- var data = JSON.stringify({
1514
- uuid: this.wfInfo.uuid,
1515
- taskId: this.wfInfo.taskId,
1516
- suggestion: this.revokeForm.opinion,
1517
- });
1518
- this.revokeDialogVisible = false;
1519
- that.$http({
1520
- url: this.current_prefix + "/wf/revoke",
1521
- data: data,
1522
- method: "post",
1523
- loadingTarget: document.body,
1524
- headers: {
1525
- "Content-Type": "application/json;charset=utf-8",
1526
- },
1527
- isLoading: true,
1528
- success: (resultMsg) => {
1529
- that.$message({
1530
- message: resultMsg.content,
1531
- type: "success",
1532
- duration: 500,
1533
- onClose: (t) => {
1534
- this.reloadContent();
1535
- },
1536
- });
1537
- },
1538
- });
1539
- }
1540
- if (flag === 0) {
1541
- toDo();
1542
- } else {
1543
- that.$baseConfirm(this.$t2('您确定要撤回吗?', 'components.wf.revokeConfirmTip')).then(() => {
1544
- toDo();
1545
- });
1546
- }
1547
- }
1548
- }
1549
- }
1550
- </script>
1551
-
1552
- <style scoped>
1553
- ::v-deep .form-box.el-form .el-form-item .el-form-item__label {
1554
- width: 70px
1555
- }
1556
- </style>
1
+ <template>
2
+ <div>
3
+ <h5-card-pane label="流程信息">
4
+ <template #default>
5
+ <div class="flowPath-box">
6
+ <!-- 这一行的值是 wfInfo.name(流程主题),标签原先误写成「任务情况」——
7
+ 与下面第三行「查看任务情况」重名。PC content.vue 同一个值的标签就是
8
+ 「流程主题」(components.wf.theme)。 -->
9
+ <div class="t"><span>{{ $t2('流程主题', 'components.wf.theme') }}</span></div>
10
+ <div class="c">
11
+ <div class="name">
12
+ {{ (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name }}
13
+ <el-tag :type="getWfStatusType()" size="mini">{{ getWfStatusLabel() }}</el-tag>
14
+ </div>
15
+ </div>
16
+ <div class="m2">
17
+ <div class="t"><span>{{ $t2('流程图', 'components.wf.wfImage') }}</span></div>
18
+ <div class="c">
19
+ <el-button icon="" class="btn" @click="showPreviewDialog=true" icon="el-icon-view">查看流程图</el-button>
20
+ </div>
21
+ </div>
22
+ <div class="m2">
23
+ <div class="t"><span>{{ $t2('任务情况', 'components.wf.taskInfo') }}</span></div>
24
+ <div class="c">
25
+ <el-button icon="" class="btn" @click="showRenwuDialog=true" icon="iconfont icon-preview">查看任务情况
26
+ </el-button>
27
+ </div>
28
+ </div>
29
+
30
+ </div>
31
+ <!-- hideActions:宿主已经把审批动作提到别处(如 xform H5 的底部动作栏)时,
32
+ 这一排整条藏掉,避免一个动作出现两份。与 PC content.vue
33
+ headerActionsMounted 同意图,这里做成 prop 是为了没有时序问题。 -->
34
+ <div class="flowPath-btns" v-show="!hideActions">
35
+ <el-button type="success" plain class="btn" @click="openAgreeDialog" v-show="wfInfo.toSubmit"
36
+ icon="iconfont icon-tongguo">{{ $t2('通过', 'components.wf.agree') }}
37
+ </el-button>
38
+ <el-button type="warning" plain class="btn" @click="openManualDialog" v-show="wfInfo.toInterrupt"
39
+ icon="iconfont icon-caozuozhongduan">{{ $t2('中断', 'components.wf.manual') }}
40
+ </el-button>
41
+ <el-button type="danger" plain class="btn" @click="rejectWfTask" v-show="wfInfo.toReject"
42
+ icon="iconfont icon-a-bohui1">{{ $t2('驳回', 'components.wf.reject') }}
43
+ </el-button>
44
+ <el-button type="primary" plain class="btn" @click="openChangeWfForm"
45
+ v-show="(wfInfo.toTransfer===null || wfInfo.toTransfer===undefined) ? wfInfo.toSubmit: wfInfo.toTransfer"
46
+ icon="iconfont icon-zhuanban">{{ $t2('转办', 'components.wf.transfer') }}
47
+ </el-button>
48
+ <el-button type="primary" plain class="btn" @click="openUrgingDialog" v-show="wfInfo.toInterrupt"
49
+ icon="iconfont icon-cuiban">{{ $t2('催办', 'components.wf.urging') }}
50
+ </el-button>
51
+ <el-button type="primary" plain class="btn" @click="openAddIncreaseSign" v-show="wfInfo.toAddIncreaseSign"
52
+ icon="el-icon-plus">{{ $t2('加签', 'components.wf.addIncreaseSign') }}
53
+ </el-button>
54
+ <el-button type="primary" plain class="btn" @click="openDeleteTaskUserDialog"
55
+ v-show="wfInfo.toDeleteIncreaseSign"
56
+ icon="el-icon-delete">{{ $t2('减签', 'components.wf.deleteIncreaseSign') }}
57
+ </el-button>
58
+ <el-button type="primary" plain class="btn" @click="openTalkDialog()"
59
+ icon="el-icon-chat-dot-square" v-if="toTalk && wfInfo.toLinkup">
60
+ {{ $t2('沟通', 'components.wf.talk') }}
61
+ </el-button>
62
+ <el-button type="primary" plain class="btn" @click="openSetCandidateDialog(null)"
63
+ v-show="wfInfo.toSetCandidate"
64
+ icon="el-icon-user">{{ $t2('修改候选人', 'components.wf.setCandidate') }}
65
+ </el-button>
66
+ <el-button type="danger" plain class="btn" @click="openRevokeDialog(null)"
67
+ v-show="wfInfo.toRevoke"
68
+ icon="el-icon-document-delete">{{ $t2('撤回', 'components.wf.revoke') }}
69
+ </el-button>
70
+ </div>
71
+ </template>
72
+ </h5-card-pane>
73
+
74
+ <!-- 流程相关的弹框必须放在卡片外面。h5CardPane 折叠时会给 .cont 加
75
+ display:none,放在插槽里的弹框会被一起隐藏 —— 表现为「流程信息收起后,
76
+ 通过/驳回/转办这些弹框点了没反应」(祖先 display:none 无法被后代覆盖)。 -->
77
+ <div class="pop-box" v-if="showPreviewDialog">
78
+ <div>
79
+ <div class="header-box">
80
+ <i class="back el-icon-close" @click="showPreviewDialog=false"></i>流程图预览
81
+ </div>
82
+ <div class="flex" style="height:calc(100vh - 38px)">
83
+ <el-form label-position="top" class="form-box">
84
+ <div class="tit"><span>{{
85
+ (wfInfo.createDate ? wfInfo.createDate.substring(0, 10) : '') + wfInfo.name
86
+ }}</span></div>
87
+ <iframe style="width: 100%;flex:1" :src="wfImage"></iframe>
88
+ </el-form>
89
+ </div>
90
+ <!-- 只读预览,没有「确定」要提交的东西:原先取消/确定两个按钮点了都是关掉,
91
+ 合成一个「关 闭」。.btn 上的 flex:1 会让它自动铺满一行(见 styles/h5.scss)。 -->
92
+ <div class="fixed-bottom-btns">
93
+ <el-button type="primary" plain class="btn" @click="showPreviewDialog=false" icon="el-icon-close">{{
94
+ $t2('关 闭', 'system.button.close2')
95
+ }}
96
+ </el-button>
97
+ </div>
98
+ </div>
99
+ </div>
100
+
101
+ <div class="pop-box" v-if="showRenwuDialog">
102
+ <div>
103
+ <div class="header-box">
104
+ <i class="back el-icon-close" @click="showRenwuDialog=false"></i>任务情况预览
105
+ </div>
106
+ <div class="flex" style="height:calc(100vh - 38px);overflow:auto">
107
+ <div class="h5-process-info">
108
+ <div class="item" v-for="wftaskLineData in wftaskData" :key="wftaskLineData.id">
109
+ <div class="time">
110
+ {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(0, 10) : '' }}
111
+ <br/>
112
+ {{ wftaskLineData.approveTime ? wftaskLineData.approveTime.substring(11) : '' }}
113
+ </div>
114
+ <div class="status"
115
+ :class="taskStatuses[wftaskLineData.type]?taskStatuses[wftaskLineData.type].class:''">
116
+ {{ taskStatuses[wftaskLineData.type] ? taskStatuses[wftaskLineData.type].value : null }}
117
+ </div>
118
+ <i class="circle"></i>
119
+ <div class="info">
120
+ <p>
121
+ <span class="name">{{ wftaskLineData.taskName }}</span>
122
+ <span>{{ $t2('执行人', 'components.wf.approverName') }}:{{ wftaskLineData.approverName }}</span>
123
+ <span>
124
+ {{ $t2('候选人', 'components.wf.candidateName') }}:
125
+ <span class="">{{ wftaskLineData.candidateNames }}</span>
126
+ </span>
127
+ </p>
128
+ <p class="t"><span class="t1">{{ $t2('备注/意见', 'components.wf.opinion') }}:</span><span>{{
129
+ wftaskLineData.opinion
130
+ }}</span></p>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+ <!-- 同上:只读预览,合成一个「关 闭」 -->
136
+ <div class="fixed-bottom-btns">
137
+ <el-button type="primary" plain class="btn" @click="showRenwuDialog=false" icon="el-icon-close">{{
138
+ $t2('关 闭', 'system.button.close2')
139
+ }}
140
+ </el-button>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <div class="pop-tipsBox" style="display: block;" v-if="showWfManualDialog">
146
+ <div>
147
+ <i class="icon"></i>
148
+ <div class="cont">
149
+ <p class="name">
150
+ {{ $t2('流程中断', 'components.wf.wfManual') }}<span>—</span><b
151
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
152
+ wfInfo.taskName
153
+ }}</b>
154
+ </p>
155
+ <p class="txt">{{ $t2('您确定要中断流程吗?', 'components.wf.manualTip') }}</p>
156
+ </div>
157
+ <div class="btns">
158
+ <el-button type="primary" class="btn" plain icon="el-icon-close" @click="showWfManualDialog = false">{{
159
+ $t2('取 消', 'system.button.cancel2')
160
+ }}
161
+ </el-button>
162
+ <el-button type="primary" class="btn" icon="el-icon-check" @click="manualEndWf()">{{
163
+ $t2('确 定', 'system.button.confirm2')
164
+ }}
165
+ </el-button>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ <div class="pop-tipsBox" style="display: block;" v-if="rejectDialogVisible">
170
+ <div>
171
+ <i class="icon"></i>
172
+ <div class="cont">
173
+ <p class="name">{{ $t2('流程驳回', 'components.wf.wfReject') }}<span
174
+ >—</span><b
175
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
176
+ wfInfo.taskName
177
+ }}</b></p>
178
+ <el-form label-position="top" class="form-box">
179
+ <el-form-item label="驳回节点" field="nodeId">
180
+ <el-select v-model="rejectForm.nodeId"
181
+ :placeholder="$t2('请选择驳回节点', 'components.wf.rejectNodePlaceholder')">
182
+ <el-option v-for="(rejectNode,index) in rejectNodes" :label="rejectNode.nodeName"
183
+ :value="rejectNode.nodeId" :key="index"></el-option>
184
+ </el-select>
185
+ </el-form-item>
186
+ <el-form-item label="驳回意见" field="opinion">
187
+ <el-input type="textarea" :rows="8"
188
+ :placeholder="$t2('请输入内容', 'components.wf.rejectOpinionPlaceholder')"
189
+ v-model="rejectForm.opinion" class="txt"></el-input>
190
+ </el-form-item>
191
+ </el-form>
192
+ </div>
193
+ <div class="btns">
194
+ <el-button type="primary" class="btn" plain icon="el-icon-close" @click="rejectDialogVisible = false">{{
195
+ $t2('取 消', 'system.button.cancel2')
196
+ }}
197
+ </el-button>
198
+ <el-button type="primary" class="btn" icon="el-icon-check" @click="subRejectForm()">{{
199
+ $t2('确 定', 'system.button.confirm2')
200
+ }}
201
+ </el-button>
202
+ </div>
203
+ </div>
204
+ </div>
205
+ <div class="pop-tipsBox" style="display: block;" v-if="agreeDialogVisible">
206
+ <div>
207
+ <i class="icon"></i>
208
+ <div class="cont">
209
+ <p class="name">{{ $t2('流程通过', 'components.wf.wfAgree') }}<span
210
+ >—</span><b
211
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
212
+ wfInfo.taskName
213
+ }}</b></p>
214
+ <el-form label-position="top" class="form-box">
215
+ <!-- 只有分支网关这类多出口节点,getNextOutgoingNodes 才会返回候选节点;
216
+ 单出口节点返回空数组,这一项必须整条不渲染,否则会露出一个没有任何
217
+ 选项的空下拉(提交时 nodeId 本就传 null,不需要选)。
218
+ 与 PC content.vue 的 <tr v-if="agreeNodes.length > 0"> 同口径。 -->
219
+ <el-form-item v-if="agreeNodes.length > 0"
220
+ :label="$t2('通过节点', 'components.wf.agreeNode')" field="nodeId">
221
+ <el-select v-model="agreeForm.nodeId"
222
+ :placeholder="$t2('请选择通过节点', 'components.wf.agreeNodePlaceholder')">
223
+ <el-option v-for="(node,index) in agreeNodes" :label="node.nodeName"
224
+ :value="node.nodeId" :key="index"></el-option>
225
+ </el-select>
226
+ </el-form-item>
227
+ <el-form-item :label="$t2('通过意见', 'components.wf.agreeOpinion')" field="opinion">
228
+ <el-input type="textarea" :rows="8" :placeholder="$t2(`请填写您的意见~
229
+ 注:
230
+ 通过默认意见为“同意”
231
+ `, 'components.wf.agreeOpinionPlaceholder')" v-model="agreeForm.opinion"></el-input>
232
+ </el-form-item>
233
+ </el-form>
234
+ </div>
235
+ <div class="btns">
236
+ <el-button type="primary" class="btn" plain icon="el-icon-close" @click="agreeDialogVisible = false">{{
237
+ $t2('取 消', 'system.button.cancel2')
238
+ }}
239
+ </el-button>
240
+ <el-button type="primary" class="btn" icon="el-icon-check" @click="subAgreeForm()">{{
241
+ $t2('确 定', 'system.button.confirm2')
242
+ }}
243
+ </el-button>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ <div class="pop-tipsBox" style="display: block;" v-if="changeWfDialogVisible">
248
+ <div>
249
+ <i class="icon"></i>
250
+ <div class="cont">
251
+ <p class="name">{{ $t2('流程转办', 'components.wf.wfTransfer') }}<span>—</span><b
252
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
253
+ wfInfo.taskName
254
+ }}</b></p>
255
+ <el-form label-position="top" class="form-box">
256
+ <el-form-item label="转办人" field="nodeId">
257
+ <el-input
258
+ class="search-input"
259
+ max="200"
260
+ v-model="changeWfForm.userNickNames"
261
+ @clear="
262
+ changeWfForm.userIds = '';
263
+ changeUserRows = [];
264
+ $forceUpdate();
265
+ "
266
+ v-el-readonly
267
+ clearable
268
+ >
269
+ <i slot="suffix" class="el-input__icon el-icon-search" @click="showUserDialog = true"></i>
270
+ </el-input>
271
+ </el-form-item>
272
+ <el-form-item label="转办意见" field="opinion">
273
+ <el-input type="textarea" :rows="8"
274
+ :placeholder="$t2('请输入内容', 'components.wf.transferOpinionPlaceholder')"
275
+ v-model="changeWfForm.opinion"></el-input>
276
+ </el-form-item>
277
+ </el-form>
278
+ </div>
279
+ <div class="btns">
280
+ <el-button type="primary" class="btn" plain @click="changeWfDialogVisible = false">{{
281
+ $t2('取 消', 'system.button.cancel2')
282
+ }}
283
+ </el-button>
284
+ <el-button type="primary" class="btn" @click="subChangeWfForm()">
285
+ {{ $t2('确认转办', 'components.wf.confirmTransfer') }}
286
+ </el-button>
287
+ </div>
288
+ </div>
289
+ </div>
290
+ <div class="pop-tipsBox" style="display: block;" v-if="showAddIncreaseSignDialog">
291
+ <div>
292
+ <i class="icon"></i>
293
+ <div class="cont">
294
+ <p class="name">
295
+ {{ $t2('流程加签', 'components.wf.wfAddIncreaseSign') }}<span>—</span><b
296
+ class="f-red">{{ $t2('节点', 'components.wf.node') }}:{{
297
+ wfInfo.taskName
298
+ }}</b>
299
+ </p>
300
+ <el-form label-position="top" class="form-box">
301
+ <el-form-item label="候选人">
302
+ <el-input
303
+ class="search-input"
304
+ max="200"
305
+ v-model="addIncreaseSignForm.userNickNames"
306
+ @clear="
307
+ addIncreaseSignUsers = [];
308
+ $forceUpdate();
309
+ "
310
+ :placeholder="$t2('候选人', 'components.wf.addIncreaseSignUser')"
311
+ v-el-readonly
312
+ clearable
313
+ >
314
+ <i slot="suffix" class="el-input__icon el-icon-search"
315
+ @click="showAddTaskUserDialog = true"></i>
316
+ </el-input>
317
+ </el-form-item>
318
+ <el-form-item label="加签意见" field="opinion">
319
+ <el-input type="textarea" :rows="8"
320
+ :placeholder="$t2('请输入内容', 'components.wf.addIncreaseSignOpinionPlaceholder')"
321
+ v-model="addIncreaseSignForm.opinion"></el-input>
322
+ </el-form-item>
323
+ </el-form>
324
+ </div>
325
+ <div class="btns">
326
+ <el-button type="primary" class="btn" plain @click="showAddIncreaseSignDialog = false">{{
327
+ $t2('取 消', 'system.button.cancel2')
328
+ }}
329
+ </el-button>
330
+ <el-button type="primary" class="btn" @click="submitAddTaskUserForm(0)">
331
+ {{ $t2('确认加签', 'components.wf.confirmAddIncreaseSign') }}
332
+ </el-button>
333
+ </div>
334
+ </div>
335
+ </div>
336
+
337
+ <user-dialog v-if="showUserDialog" :visiable.sync="showUserDialog" @close="showUserDialog = false"
338
+ @confirm="userConfirm" multi="true" :param.sync="wfUserParamForTransfer"
339
+ :rows="changeUserRows"></user-dialog>
340
+ <urgingDialog v-if="urgingDialogVisible" :visiable.sync="urgingDialogVisible" :wfInfo="wfInfo"
341
+ :current_prefix="current_prefix"
342
+ @confirm="reloadContent" multi="true"></urgingDialog>
343
+ <deleteTaskUserDialog v-if="showDeleteTaskUserDialog" :visiable.sync="showDeleteTaskUserDialog" :wfInfo="wfInfo"
344
+ :current_prefix="current_prefix"
345
+ @confirm="reloadContent" multi="true"></deleteTaskUserDialog>
346
+
347
+ <addTaskUserdialog v-if="showAddTaskUserDialog" :visiable.sync="showAddTaskUserDialog" :wfInfo="wfInfo"
348
+ :current_prefix="current_prefix" :rows.sync="addIncreaseSignUsers"
349
+ @confirm="confirmAddTaskUser" multi="true"
350
+ :param.sync="wfUserParamForAddSign"></addTaskUserdialog>
351
+ <user-dialog v-if="showTalkUserDialog" :visiable.sync="showTalkUserDialog" @close="showTalkUserDialog = false"
352
+ @confirm="confirmTalkUserDialog" multi="false" :param.sync="wfUserParamForTalk"></user-dialog>
353
+ <setCandidateDialog v-if="showSetCandidateDialog" :visiable.sync="showSetCandidateDialog"
354
+ @close="closeSetCandidateDialog"
355
+ :wfInfo="wfInfo"
356
+ :current_prefix="current_prefix"></setCandidateDialog>
357
+ </div>
358
+ </template>
359
+ <script>
360
+ import Vue from "vue";
361
+
362
+ import settingConfig from "@/settings";
363
+ import commonMixin from "../../../mixins/mobile/common/index";
364
+ import {getToken} from "../../../utils/auth";
365
+
366
+ let configUtil = {
367
+ baseUrl: process.env.VUE_APP_BASE_API,
368
+ getToken,
369
+ settingConfig,
370
+ Vue,
371
+ };
372
+
373
+ function appendPrevChildDom(parentDom, newDom) {
374
+ if (parentDom.hasChildNodes()) {
375
+ let currentDom = parentDom.children[0];
376
+ parentDom.insertBefore(newDom, currentDom);
377
+ } else {
378
+ parentDom.append(newDom);
379
+ }
380
+ }
381
+
382
+ function getTarget(t) {
383
+ return t.parentVue;
384
+ }
385
+
386
+ export default {
387
+ mixins: [commonMixin],
388
+ props: {
389
+ _wfInfo: Object,
390
+ _taskParam: Object,
391
+ wfOption: Object,
392
+ defaultShowWfContent: Boolean,
393
+ // 见模板里 .flowPath-btns 的注释:宿主接管审批动作时藏掉面板内那一排
394
+ hideActions: Boolean,
395
+ },
396
+ components: {
397
+ /* 本组件根节点就是 <h5-card-pane>,但此前没在这里注册——手写移动页是靠
398
+ mixins/mobile/common 在**宿主**上局部注册才碰巧能渲染。Vue 2 解析组件只查
399
+ 自身 components 与全局注册、不查父组件的局部注册,所以被别处(如 xform
400
+ detail-h5-item)引用时会渲染不出来。补上自己的依赖声明。 */
401
+ h5CardPane: () => import('../h5Card/h5CardPane.vue'),
402
+ UserDialog: () => import('../../../views/mobile/user/user/dialog.vue'),
403
+ urgingDialog: () => import('./urgingDialog'),
404
+ deleteTaskUserDialog: () => import('./deleteTaskUserDialog'),
405
+ addTaskUserdialog: () => import('./addTaskUserdialog'),
406
+ setCandidateDialog: () => import('./setCandidateDialog')
407
+ },
408
+ computed: {
409
+ current_prefix() {
410
+ return this.serviceId ? "/" + this.serviceId : "";
411
+ },
412
+ viewTarget() {
413
+ return getTarget(this);
414
+ },
415
+ isHideWf() {
416
+ let that = this.viewTarget;
417
+ let _hideWf = that._hideWf || that.$attrs._hideWf;
418
+ return _hideWf === true || _hideWf === 'true';
419
+ }
420
+ },
421
+ data() {
422
+ let showWfFold =
423
+ settingConfig.showWfFold != null && settingConfig.showWfFold != undefined
424
+ ? settingConfig.showWfFold
425
+ : false;
426
+ let showWfContent =
427
+ showWfFold &&
428
+ settingConfig.defaultShowWfContent != null &&
429
+ settingConfig.defaultShowWfContent != undefined
430
+ ? settingConfig.defaultShowWfContent
431
+ : true;
432
+ if (
433
+ this.defaultShowWfContent != null &&
434
+ this.defaultShowWfContent != undefined
435
+ ) {
436
+ showWfContent = this.defaultShowWfContent;
437
+ }
438
+
439
+ return {
440
+ showRenwuDialog: false,
441
+ showDomContent: false,
442
+ showPreviewDialog: false,
443
+ objId: null,
444
+ wfCode: null,
445
+ serviceId: null,
446
+ parentVue: null,
447
+ wfConfig: null,
448
+
449
+ fileInfos: [],
450
+ showUserDialog: false,
451
+ showContent: true,
452
+ objTypeCode: "",
453
+ // objId: '',
454
+ wfInfo: {},
455
+ // currentTask: {},
456
+ taskParam: {},
457
+ wfImage: "",
458
+ wfStartBtn: false,
459
+ wfManualendBtn: false,
460
+ wfSubmitBtn: false,
461
+ wfRejectBtn: false,
462
+ changeHandlerBtn: false,
463
+ wftaskData: [],
464
+ allWfTaskOpinions: [],
465
+ vxeOption: {},
466
+ rejectNodes: [],
467
+ rejectDialogVisible: false,
468
+ rejectForm: {
469
+ rejectSubmitModel: null,
470
+ nodeId: null,
471
+ opinion: null,
472
+ },
473
+ formLabelWidth: "120px",
474
+ agreeDialogVisible: false,
475
+ agreeForm: {
476
+ opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
477
+ nodeId: null,
478
+ },
479
+ changeWfDialogVisible: false,
480
+ changeWfForm: {},
481
+ changeUserRows: [],
482
+ taskStatuses: {
483
+ start: {
484
+ class: "blue",
485
+ value: this.$t2('开始', 'components.wf.startStatus'),
486
+ },
487
+ approve: {
488
+ class: "orgn",
489
+ value: this.$t2('待审批', 'components.wf.approveStatus'),
490
+ },
491
+ submit: {
492
+ class: "green",
493
+ value: this.$t2('同意', 'components.wf.submitStatus'),
494
+ },
495
+ reject: {
496
+ class: "red",
497
+ value: this.$t2('驳回', 'components.wf.rejectStatus'),
498
+ },
499
+ transfer: {
500
+ class: "green",
501
+ value: this.$t2('转办', 'components.wf.transferStatus'),
502
+ },
503
+ addIncreaseSign: {
504
+ class: "green",
505
+ value: this.$t2('加签', 'components.wf.addIncreaseSignStatus'),
506
+ },
507
+ revoke: {
508
+ class: "red",
509
+ value: this.$t2('撤回', 'components.wf.revokeStatus'),
510
+ },
511
+ end: {
512
+ class: "gray",
513
+ value: this.$t2('结束', 'components.wf.endStatus'),
514
+ },
515
+ },
516
+ opinion: "",
517
+ showWfFold: showWfFold,
518
+ showWfContent: showWfContent,
519
+
520
+ urgingForm: {},
521
+ urgingDialogVisible: false,
522
+ urgingUserIds: [],
523
+ urgingUsers: [],
524
+ agreeNodes: [],
525
+ showWfManualDialog: false,
526
+
527
+ showDeleteTaskUserDialog: false,
528
+ showAddTaskUserDialog: false,
529
+ wfUserParam: {},
530
+ wfUserParamForTransfer: {},//转办
531
+ wfUserParamForAddSign: {},//加签
532
+ wfUserParamForTalk: {},//沟通
533
+ tabIndex: "1",
534
+ linkupOption: {},
535
+ talkForm: {
536
+ receiverName: null,
537
+ content: null,
538
+ attachmentDTOs: [],
539
+ replyId: null
540
+ },
541
+ showTalkUserDialog: false,
542
+ showTalkDialog: false,
543
+ showFlowImg: true,
544
+ operateType: null,
545
+ addIncreaseSignUsers: [],
546
+ addIncreaseSignForm: {
547
+ userNickNames: null,
548
+ opinion: null
549
+ },
550
+ showAddIncreaseSignDialog: false,
551
+ showOpeaImg: true,
552
+ showSetCandidateDialog: false,
553
+ toTalk: false,
554
+ showAllWfOpinon: false,
555
+
556
+ revokeDialogVisible: false,
557
+ revokeForm: {opinion: null},
558
+ wfStatusMap: {
559
+ 1: {label: "审核中", type: "warning"},
560
+ 3: {label: "已驳回", type: "danger"},
561
+ 2: {label: "已完成", type: "success"}
562
+ }
563
+ };
564
+ },
565
+ provide() {
566
+ return {
567
+ getParentVue: () => {
568
+ return this.parentVue;
569
+ }
570
+ };
571
+ },
572
+ created() {
573
+ // this.wfInfo = this._wfInfo;
574
+ this.showFlowImg = settingConfig.expandWfImage === false ? false : true;
575
+ this.showAllWfOpinon = settingConfig.showAllWfOpinon === true;
576
+ },
577
+ mounted() {
578
+ this.init();
579
+ },
580
+ methods: {
581
+ getWfStatusLabel() {
582
+ return this.wfStatusMap[this.wfInfo.stat]?.label;
583
+ },
584
+ getWfStatusType() {
585
+ return this.wfStatusMap[this.wfInfo.stat]?.type;
586
+ },
587
+ init() {
588
+ let opt = this.wfOption;
589
+ this.objId = opt.objId;
590
+ this.wfCode = opt.wfCode;
591
+ this.serviceId = opt.serviceId;
592
+ this.parentVue = opt.parentVue;
593
+ this.wfConfig = this.wfOption;
594
+
595
+ let wfConfig = this.wfOption;
596
+ let that = getTarget(this);
597
+ let hasWf = false;
598
+ let wfInfo, currentTask, taskParam;
599
+ let option = {
600
+ objId: this.objId,
601
+ wfCode: this.wfCode
602
+ }
603
+ let current_prefix = this.current_prefix;
604
+
605
+ let initButton = () => {
606
+ /*return
607
+ this.$nextTick(() => {
608
+ that.$refs.wfButtonGroup.init({
609
+ taskParam,
610
+ wfInfo,
611
+ hasWf,
612
+ current_prefix,
613
+ wfConfig
614
+ });
615
+ });*/
616
+ }
617
+
618
+ this.initWfInfo(option, {
619
+ success: res => {
620
+ if (res.objx && res.objx.procInstId) {
621
+ hasWf = true;
622
+ wfInfo = res.objx;
623
+ this.wfInfo = wfInfo;
624
+ // this.showDomContent = true;
625
+
626
+ if (wfInfo.taskId) {
627
+ this.getTaskParams(wfInfo.taskId, {
628
+ success: res2 => {
629
+ taskParam = res2.objx || {};
630
+ taskParam.objId = option.objId;
631
+ this.taskParam = taskParam;
632
+
633
+ initButton();
634
+ }
635
+ });
636
+ } else {
637
+ initButton();
638
+ }
639
+ this.initOperateType();
640
+ this.initForAll();
641
+ } else {
642
+ initButton();
643
+ }
644
+ }
645
+ });
646
+ },
647
+ initWfInfo(option, httpConfig) {
648
+
649
+ let that = getTarget(this);
650
+ let id = option.objId;
651
+ let code = option.wfCode;
652
+ return that.$http({
653
+ url: this.current_prefix + '/wf/getWfInfo',
654
+ method: `post`,
655
+ data: {
656
+ objTypeCode: code,
657
+ objId: id
658
+ },
659
+ isLoading: true,
660
+ modalStrictly: true,
661
+ ...httpConfig
662
+ });
663
+ },
664
+ getTaskParams(taskId, httpConfig) {
665
+ let that = getTarget(this);
666
+ return that.$http({
667
+ url: this.current_prefix + '/wf/getTaskVariables',
668
+ method: `post`,
669
+ data: {
670
+ stringOne: taskId
671
+ },
672
+ isLoading: true,
673
+ modalStrictly: true,
674
+ ...httpConfig
675
+ });
676
+ },
677
+
678
+
679
+ initOperateType() {
680
+ if (this.operateType) {
681
+ let wfInfo = this.wfInfo;
682
+ if (wfInfo.toSubmit) {
683
+ this.openAgreeDialog('submit');
684
+ } else if (wfInfo.toReject) {
685
+ this.rejectWfTask('reject');
686
+ } else if (wfInfo.toAddIncreaseSign) {
687
+ this.openAddIncreaseSign('addIncreaseSign')
688
+ } else if (wfInfo.toRevoke) {
689
+ this.openRevokeDialog('revoke')
690
+ } else if (wfInfo.toLinkup) {
691
+ this.openTalkDialog(null, null, 'talk');
692
+ } else {
693
+ this.operateType = null;
694
+ }
695
+ }
696
+ },
697
+ initForAll() {
698
+ let that = getTarget(this);
699
+ this.initWf(() => {
700
+ if (this.wfInfo.procInstId) {
701
+ this.initCurrentTask(this.wfInfo.procInstId, () => {
702
+ this.initWftask(this.wfInfo.procInstId);
703
+ this.getAllWfTaskOpinions();
704
+ });
705
+ this.initWfUserParam();
706
+ this.initTabIndex();
707
+ }
708
+ });
709
+ },
710
+ initTabIndex() {
711
+ let that = getTarget(this);
712
+ that.$http({
713
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
714
+ method: `post`,
715
+ data: {attributeKey: "param7"},
716
+ isLoading: true,
717
+ success: (res) => {
718
+ let val = res !== null ? res.objx === true : false;
719
+ this.toTalk = val;
720
+ let flag = false;
721
+ if (val) {
722
+ let flag1 = that.$attrs._isNotifyMessage == true || that.$attrs._isNotifyMessage == "true";
723
+ if (flag1) {
724
+ this.tabIndex = "2";
725
+ }
726
+ if (settingConfig.autoOpenWfLinkup) {
727
+ flag = true;
728
+ let flag2 = that.$attrs._wfNotifyType == "wfLinkup";
729
+ let flag3 = flag1 && flag2;
730
+ if (flag3) {
731
+ this.$nextTick(() => {
732
+ let wfTabPane = this.$refs.wfTabPane;
733
+ if (!wfTabPane.showContent) {
734
+ wfTabPane.handleFold();
735
+ }
736
+ });
737
+ }
738
+ }
739
+ }
740
+ this.initLinkup(flag);
741
+ }
742
+ });
743
+
744
+ },
745
+ initWf(done) {
746
+ var data = this.wfInfo;
747
+ if (data && data.procInstId) {
748
+ /** 流程状态:0未启动,1审核中,2已完成,3驳回,4中断 */
749
+ var statuses = {
750
+ 1: '<span class="tag">' + this.$t2('审核中', 'components.wf.wfStatus1') + '</span>',
751
+ 3: '<span class="tag red">' + this.$t2('已驳回', 'components.wf.wfStatus2') + '</span>',
752
+ 2: '<span class="tag green">' + this.$t2('已完成', 'components.wf.wfStatus3') + '</span>',
753
+ };
754
+ var statusStr = "";
755
+ if (data.stat != null) {
756
+ statusStr = statuses[data.stat] || "";
757
+ }
758
+ data.statusStr = statusStr;
759
+ this.wfInfo = data;
760
+
761
+ this.wfStartBtn = false;
762
+ if (data.status != 2 && data.starterId) {
763
+ this.wfManualendBtn = true;
764
+ }
765
+ this.wfSubmitBtn = false;
766
+ this.wfRejectBtn = false;
767
+
768
+ var url =
769
+ this.current_prefix +
770
+ "/wf/flowImage?procInstId=" +
771
+ data.procInstId +
772
+ "&_r=" +
773
+ Math.random() +
774
+ "&access_token=" +
775
+ configUtil.getToken();
776
+ this.wfImage = configUtil.baseUrl + url;
777
+ done();
778
+ }
779
+ },
780
+ initCurrentTask(procInstId, done) {
781
+ if (this.wfInfo.taskId) {
782
+ this.wfSubmitBtn = true;
783
+ this.wfRejectBtn = true;
784
+ this.changeHandlerBtn = true;
785
+ }
786
+ done();
787
+ },
788
+ initWftask(procInstId) {
789
+ let that = getTarget(this);
790
+ that.$http({
791
+ url: this.current_prefix + "/wf/getWfTaskOpinionMerge",
792
+ data: {
793
+ stringOne: procInstId,
794
+ },
795
+ method: "post",
796
+ isLoading: true,
797
+ modalStrictly: true,
798
+ success: (resultmsg) => {
799
+ var datas = resultmsg.objx || [];
800
+ this.wftaskData = datas;
801
+ },
802
+ });
803
+ },
804
+ getAllWfTaskOpinions() {
805
+ if (!this.showAllWfOpinon) {
806
+ return;
807
+ }
808
+ let that = getTarget(this);
809
+ let wfInfo = this.wfInfo;
810
+ that.$http({
811
+ url: this.current_prefix + "/wf/getAllWfTaskOpinions",
812
+ data: {
813
+ objId: wfInfo.objId,
814
+ objTypeCode: wfInfo.objTypeCode
815
+ },
816
+ method: "post",
817
+ isLoading: true,
818
+ modalStrictly: true,
819
+ success: (resultmsg) => {
820
+ var datas = resultmsg.objx || [];
821
+ this.allWfTaskOpinions = datas;
822
+ },
823
+ });
824
+ },
825
+ openManualDialog(operateType) {
826
+ this.operateType = operateType;
827
+ this.showWfManualDialog = true;
828
+ },
829
+ manualEndWf() {
830
+ this.showWfManualDialog = false;
831
+ let that = getTarget(this);
832
+ var procInstId = this.wfInfo.procInstId;
833
+ var taskId = this.wfInfo.taskId ? this.wfInfo.taskId : "";
834
+ var data = JSON.stringify({
835
+ uuid: this.wfInfo.uuid,
836
+ });
837
+ that.$http({
838
+ url: this.current_prefix + "/wf/interrupt",
839
+ data: data,
840
+ method: "post",
841
+ headers: {
842
+ "Content-Type": "application/json;charset=utf-8",
843
+ },
844
+ isLoading: true,
845
+ success: (resultMsg) => {
846
+ that.$message({
847
+ message: resultMsg.content,
848
+ type: "success",
849
+ duration: 500,
850
+ onClose: (t) => {
851
+ this.reloadContent();
852
+ this.closeWinOnCheck(3);
853
+ },
854
+ });
855
+ },
856
+ });
857
+ },
858
+ async rejectWfTask(operateType) {
859
+ // 与 PC wf.js 的 rejectWfTask 同结构:驳回也要先过一遍「驳回提醒」
860
+ this.handleReminderContent("rejectReminder", async () => {
861
+ let that = getTarget(this);
862
+ var procInstId = this.wfInfo.procInstId;
863
+ var taskId = this.wfInfo.taskId;
864
+ var destinations = [];
865
+
866
+ await that.$http({
867
+ url: this.current_prefix + "/wf/getPreIncomeNodes",
868
+ data: {
869
+ stringOne: taskId,
870
+ },
871
+ method: "post",
872
+ //contentType: 'application/json;charset=utf-8',
873
+ isLoading: true,
874
+ success: (resultMsg) => {
875
+ destinations = (resultMsg.objx || []).reverse();
876
+ },
877
+ });
878
+
879
+ if (destinations == null) {
880
+ return false;
881
+ }
882
+ if (destinations.length == 0) {
883
+ that.$message({
884
+ message: this.$t2('无法驳回,没有目标节点', 'components.wf.rejectWarnMsg1'),
885
+ type: "error",
886
+ duration: 2 * 1000,
887
+ });
888
+ return false;
889
+ }
890
+ this.operateType = operateType;
891
+
892
+ /* 驳回后提交模式,取自流程对象配置(wf_obj_config「驳回后提交模式」三选一):
893
+ toNextNode === 1 → 顺延下一步提交 → 1
894
+ toRejectNode false → 直接提交到驳回节点 → 2
895
+ toRejectNode true → 由提交人确定节点提交 → null(提交时自己选)
896
+ 三个分支不能省成两个:选了「顺延下一步」时后台把 toRejectNode 置为 null,
897
+ null == false 在 JS 里是 false,会落到 null 分支上,配置被静默丢掉。
898
+ PC wf.js 的 rejectWfTask 同口径。 */
899
+ let rejectSubmitModel = null;
900
+ if (this.wfInfo.toNextNode === 1) {
901
+ rejectSubmitModel = this.wfInfo.toNextNode
902
+ } else {
903
+ rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null
904
+ }
905
+ this.rejectForm.rejectSubmitModel = rejectSubmitModel;
906
+ this.rejectForm.nodeId = destinations[0].nodeId;
907
+ this.rejectForm.opinion = "";
908
+ this.rejectNodes = destinations;
909
+ this.rejectDialogVisible = true;
910
+ })
911
+ },
912
+ subRejectForm() {
913
+ let that = getTarget(this);
914
+ var procInstId = this.wfInfo.procInstId;
915
+ var taskId = this.wfInfo.taskId;
916
+
917
+ if (!this.rejectForm.nodeId) {
918
+ that.$message({
919
+ message: this.$t2('请选择驳回节点', 'components.wf.rejectWarnMsg2'),
920
+ type: "error",
921
+ duration: 2 * 1000,
922
+ });
923
+ return false;
924
+ }
925
+
926
+ if (!this.rejectForm.opinion) {
927
+ that.$message({
928
+ message: this.$t2('请输入驳回意见', 'components.wf.rejectWarnMsg3'),
929
+ type: "error",
930
+ duration: 2 * 1000,
931
+ });
932
+ return false;
933
+ }
934
+
935
+ var data = JSON.stringify({
936
+ taskId: taskId,
937
+ uuid: this.wfInfo.uuid,
938
+ nodeId: this.rejectForm.nodeId,
939
+ suggestion: this.rejectForm.opinion,
940
+ rejectSubmitModel: this.rejectForm.rejectSubmitModel
941
+ });
942
+ this.rejectDialogVisible = false;
943
+ that.$http({
944
+ url: this.current_prefix + "/wf/reject",
945
+ data: data,
946
+ method: "post",
947
+ headers: {
948
+ "Content-Type": "application/json;charset=utf-8",
949
+ },
950
+ isLoading: true,
951
+ success: (resultMsg) => {
952
+ that.$message({
953
+ message: resultMsg.content,
954
+ type: "success",
955
+ duration: 500,
956
+ onClose: (t) => {
957
+ this.reloadContent();
958
+ this.closeWinOnCheck(2);
959
+ },
960
+ });
961
+ },
962
+ });
963
+ },
964
+ /**
965
+ * 提交/驳回前的「提醒内容」:后台按 scriptType 跑脚本,返回文案就先弹确认框,
966
+ * 用户点确定才继续;没有文案(或接口 404,即后端未部署该能力)直接放行。
967
+ * 与 PC wf.js 的同名方法保持一致。
968
+ *
969
+ * 提醒只是主流程前面的一道增强,不能让它把主流程带崩或卡死,所以:
970
+ * - 放行只允许一次(go 自带闸门),成功/异常各分支共用一个出口;
971
+ * - 确认框点取消 = 放弃本次操作,什么都不做,但 MessageBox 的 reject 必须吃掉,
972
+ * 否则是一条 unhandled rejection;
973
+ * - error 分支绝不能抛异常。request.js 是先调 config.error(e) 再 removeModel(config)
974
+ * (见 utils/request.js 的响应错误拦截),这里一抛,isLoading 的全屏遮罩就永远
975
+ * 关不掉、整页被锁死。而网络失败/超时时 e.response 本就是 undefined,
976
+ * 老写法 e.response.status 必崩 —— 故 status 取值全程判空。
977
+ */
978
+ handleReminderContent(scriptType, callback) {
979
+ let that = getTarget(this);
980
+ let called = false;
981
+ const go = () => {
982
+ if (called) return
983
+ called = true;
984
+ callback && callback();
985
+ };
986
+ that.$http({
987
+ url: this.current_prefix + "/wf/getReminderContent",
988
+ data: {
989
+ scriptType,
990
+ taskId: this.wfInfo.taskId,
991
+ uuid: this.wfInfo.uuid,
992
+ },
993
+ method: "post",
994
+ isLoading: true,
995
+ errorMsg: false,
996
+ success: (res) => {
997
+ if (res && res.objx) {
998
+ that.$baseConfirm(res.objx).then(go).catch(() => {});
999
+ } else {
1000
+ go();
1001
+ }
1002
+ },
1003
+ error: (e) => {
1004
+ let status = e && e.response ? e.response.status : null;
1005
+ if (status === 404) {
1006
+ // 后端没部署这个接口,等同于「没有提醒」,静默放行
1007
+ go();
1008
+ return
1009
+ }
1010
+ /* 其余错误只提示不放行:提醒内容可能是必须让人看到的业务警告,
1011
+ 接口挂了就悄悄跳过等于把它吞掉。用户重试即可。 */
1012
+ that.$errorMsg({
1013
+ content: (e && e.message) || this.$t2('获取提醒内容失败', 'components.wf.reminderError'),
1014
+ type: 'error',
1015
+ }).catch(() => {});
1016
+ },
1017
+ });
1018
+ },
1019
+ openAgreeDialog(operateType) {
1020
+ const done = () => {
1021
+ this.handleReminderContent("submitReminder", () => {
1022
+ this.operateType = operateType;
1023
+ let that = getTarget(this);
1024
+ this.agreeForm = {
1025
+ opinion: this.$t2('同意', 'components.wf.defaultAgreeOption'),
1026
+ nodeId: null,
1027
+ };
1028
+ this.agreeNodes = [];
1029
+ that.$http({
1030
+ url: this.current_prefix + "/wf/getNextOutgoingNodes",
1031
+ data: {
1032
+ stringOne: this.wfInfo.taskId,
1033
+ },
1034
+ method: "post",
1035
+ isLoading: true,
1036
+ success: (res) => {
1037
+ let nodes = res.objx || [];
1038
+ /*if (tq == true) {
1039
+ nodes.reverse();
1040
+ }*/
1041
+ if (nodes.length) {
1042
+ this.agreeForm.nodeId = nodes[0].nodeId;
1043
+ }
1044
+ this.agreeNodes = nodes;
1045
+ this.agreeDialogVisible = true;
1046
+ },
1047
+ });
1048
+ })
1049
+ }
1050
+ // wfConfig init() 里才赋值(初值 null),这里兜一层空对象
1051
+ let wfConfig = this.wfConfig || {};
1052
+ if (wfConfig.onClickAgree) {
1053
+ wfConfig.onClickAgree(done)
1054
+ } else {
1055
+ done();
1056
+ }
1057
+ },
1058
+ subAgreeForm() {
1059
+ let wfConfig = this.wfConfig;
1060
+ let done = () => {
1061
+ this.subAgreeHandle();
1062
+ }
1063
+ if (wfConfig.onBeforeAgree) {
1064
+ wfConfig.onBeforeAgree(done)
1065
+ } else {
1066
+ done();
1067
+ }
1068
+ },
1069
+ subAgreeHandle() {
1070
+ let that = getTarget(this);
1071
+ let nodeId = null;
1072
+ if (this.agreeNodes.length) {
1073
+ if (!this.agreeForm.nodeId) {
1074
+ that.$message({
1075
+ message: this.$t2('请选择节点', 'components.wf.agreeWarnMsg1'),
1076
+ type: "error",
1077
+ duration: 2 * 1000,
1078
+ });
1079
+ return;
1080
+ }
1081
+ nodeId = this.agreeForm.nodeId;
1082
+ }
1083
+
1084
+ var procInstId = this.wfInfo.procInstId;
1085
+ var taskId = this.wfInfo.taskId;
1086
+ var memo = this.agreeForm.opinion || this.$t2('同意', 'components.wf.defaultAgreeOption');
1087
+ var data = JSON.stringify({
1088
+ taskId: taskId,
1089
+ uuid: this.wfInfo.uuid,
1090
+ suggestion: memo,
1091
+ nodeId: nodeId,
1092
+ });
1093
+ this.agreeDialogVisible = false;
1094
+ that.$http({
1095
+ url: this.current_prefix + "/wf/submit",
1096
+ data: data,
1097
+ method: "post",
1098
+ headers: {
1099
+ "Content-Type": "application/json;charset=utf-8",
1100
+ },
1101
+ isLoading: true,
1102
+ success: (resultMsg) => {
1103
+ if (resultMsg.objx && resultMsg.objx.code == "999999") {
1104
+ this.errorSubmit({
1105
+ taskId: taskId,
1106
+ uuid: this.wfInfo.uuid,
1107
+ suggestion: memo,
1108
+ errorMsg: resultMsg.objx.errorMsg
1109
+ });
1110
+ } else {
1111
+ that.$message({
1112
+ message: resultMsg.content,
1113
+ type: "success",
1114
+ duration: 500,
1115
+ onClose: (t) => {
1116
+ this.reloadContent();
1117
+ this.closeWinOnCheck(1);
1118
+ },
1119
+ });
1120
+ }
1121
+ },
1122
+ });
1123
+ },
1124
+ errorSubmit(data) {
1125
+ let that = getTarget(this);
1126
+ that.$http({
1127
+ url: this.current_prefix + "/wf/errorSubmit",
1128
+ data: data,
1129
+ method: "post",
1130
+ isLoading: true,
1131
+ success: (resultMsg) => {
1132
+ that.$message({
1133
+ message: resultMsg.content,
1134
+ type: "success",
1135
+ duration: 500,
1136
+ onClose: (t) => {
1137
+ this.reloadContent();
1138
+ this.closeWinOnCheck(1);
1139
+ },
1140
+ });
1141
+ },
1142
+ });
1143
+ },
1144
+ openChangeWfForm(operateType) {
1145
+ this.operateType = operateType;
1146
+ this.changeWfDialogVisible = true;
1147
+ this.changeUserRows = [];
1148
+ this.changeWfForm = {
1149
+ userIds: [],
1150
+ userNickNames: null,
1151
+ opinion: null,
1152
+ };
1153
+ },
1154
+ subChangeWfForm() {
1155
+ let that = getTarget(this);
1156
+ var procInstId = this.wfInfo.procInstId;
1157
+ var taskId = this.wfInfo.taskId;
1158
+
1159
+ var userIds = this.changeWfForm.userIds || [];
1160
+ var opinion = this.changeWfForm.opinion || null;
1161
+
1162
+ if (!userIds.length) {
1163
+ that.$message({
1164
+ message: this.$t2('请选择转办人', 'components.wf.transferWarnMsg1'),
1165
+ type: "error",
1166
+ duration: 2000,
1167
+ onClose: (t) => {
1168
+ },
1169
+ });
1170
+ return false;
1171
+ }
1172
+
1173
+ var data = JSON.stringify({
1174
+ taskId: taskId,
1175
+ uuid: this.wfInfo.uuid,
1176
+ transferTo: userIds,
1177
+ suggestion: opinion,
1178
+ });
1179
+ this.changeWfDialogVisible = false;
1180
+ that.$http({
1181
+ url: this.current_prefix + "/wf/transfer",
1182
+ data: data,
1183
+ method: "post",
1184
+ headers: {
1185
+ "Content-Type": "application/json;charset=utf-8",
1186
+ },
1187
+ isLoading: true,
1188
+ success: (resultMsg) => {
1189
+ that.$message({
1190
+ message: resultMsg.content,
1191
+ type: "success",
1192
+ duration: 500,
1193
+ onClose: (t) => {
1194
+ this.reloadContent();
1195
+ this.closeWinOnCheck(4);
1196
+ },
1197
+ });
1198
+ },
1199
+ });
1200
+ },
1201
+ userConfirm(rows) {
1202
+ if (rows.length > 0) {
1203
+ let changeUserRows = this.changeUserRows;
1204
+ let ids = changeUserRows.map((changeUserRow) => changeUserRow.id);
1205
+ let addRows = rows.filter((row) => !ids.includes(row.id));
1206
+ changeUserRows.push(...addRows);
1207
+
1208
+ let row = rows[0];
1209
+ this.changeWfForm.userIds = changeUserRows.map(
1210
+ (changeUserRow) => changeUserRow.id
1211
+ );
1212
+ this.changeWfForm.userNickNames = changeUserRows
1213
+ .map((changeUserRow) => changeUserRow.nickName)
1214
+ .join(",");
1215
+ }
1216
+ },
1217
+ reloadContent() {
1218
+ let that = getTarget(this);
1219
+ that.$baseReload();
1220
+ },
1221
+ closeWinOnCheck(flag) {
1222
+ //_closeWindowOnCheck=true, 1提交,2驳回,3中断,4转办时,5沟通 关闭窗口
1223
+ let that = getTarget(this);
1224
+ let _closeWindowOnCheck = that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
1225
+ if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
1226
+ window.close && window.close();
1227
+ }
1228
+ let _handleCallback = that.$attrs._handleCallback || that._handleCallback;
1229
+ _handleCallback && _handleCallback(flag);
1230
+ },
1231
+ manualCallback() {
1232
+ this.$emit("manualCallback");
1233
+ },
1234
+ openUrgingDialog(operateType) {
1235
+ this.operateType = operateType;
1236
+ this.urgingDialogVisible = true;
1237
+ },
1238
+ openDeleteTaskUserDialog(operateType) {
1239
+ this.operateType = operateType;
1240
+ this.showDeleteTaskUserDialog = true;
1241
+ },
1242
+ openAddTaskUserDialog(operateType) {
1243
+ this.operateType = operateType;
1244
+ this.showAddTaskUserDialog = true;
1245
+ },
1246
+ openAddIncreaseSign(operateType) {
1247
+ this.operateType = operateType;
1248
+ this.addIncreaseSignUsers = [];
1249
+ this.addIncreaseSignForm = {userNickNames: null};
1250
+ this.showAddIncreaseSignDialog = true;
1251
+ },
1252
+ initWfUserParam(callback) {
1253
+ this.initTransferUserParam();//转办
1254
+ this.initAddSignUserParam();//加签
1255
+ this.initTalkUserParam();//沟通
1256
+ },
1257
+ //
1258
+ initTransferUserParam(callback) {
1259
+ //初始化转办用户参数
1260
+ let that = getTarget(this);
1261
+ return that.$http({
1262
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
1263
+ method: `post`,
1264
+ data: {attributeKey: "param1"},
1265
+ isLoading: true,
1266
+ modalStrictly: true,
1267
+ success: (res) => {
1268
+ this.wfUserParamForTransfer = res.objx || {};
1269
+ callback && callback();
1270
+ },
1271
+ });
1272
+ },
1273
+ initAddSignUserParam(callback) {
1274
+ //初始化加签用户参数
1275
+ let that = getTarget(this);
1276
+ return that.$http({
1277
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
1278
+ method: `post`,
1279
+ data: {attributeKey: "param2"},
1280
+ isLoading: true,
1281
+ modalStrictly: true,
1282
+ success: (res) => {
1283
+ this.wfUserParamForAddSign = res.objx || {};
1284
+ callback && callback();
1285
+ },
1286
+ });
1287
+ },
1288
+ initTalkUserParam(callback) {
1289
+ //初始化沟通用户参数
1290
+ let that = getTarget(this);
1291
+ return that.$http({
1292
+ url: USER_PREFIX + "/wf_diy_attribute/getValue",
1293
+ method: `post`,
1294
+ data: {attributeKey: "param3"},
1295
+ isLoading: true,
1296
+ modalStrictly: true,
1297
+ success: (res) => {
1298
+ this.wfUserParamForTalk = res.objx || {};
1299
+ callback && callback();
1300
+ },
1301
+ });
1302
+ },
1303
+ //
1304
+ resetLinkup() {
1305
+ this.formData = {};
1306
+ this.$refs["table-linkup"].commitProxy("reload");
1307
+ },
1308
+ searchLinkup() {
1309
+ this.$refs["table-linkup"].commitProxy("reload");
1310
+ },
1311
+ initLinkup(flag) {
1312
+ return
1313
+ let h = this.$createElement;
1314
+ let statusMap = {
1315
+ 0: this.$t2('未完成', 'components.wf.talkStatus0'),
1316
+ 1: this.$t2('已完成', 'components.wf.talkStatus1'),
1317
+ 2: this.$t2('已取消', 'components.wf.talkStatus2')
1318
+ };
1319
+ let tableOption = {
1320
+ vue: this,
1321
+ tableRef: "table-linkup",
1322
+ tableName: "wf_table-linkup",
1323
+ path: this.current_prefix + "/wf_linkup/listPage",
1324
+ param: () => {
1325
+ return {
1326
+ uuid: this.wfInfo.uuid,
1327
+ };
1328
+ },
1329
+ config: {
1330
+ height: 350
1331
+ },
1332
+ columns: [
1333
+ {type: "checkbox", width: 48, resizable: false, fixed: "left"},
1334
+ {
1335
+ title: this.$t2('任务名称', 'components.wf.taskName'),
1336
+ field: "taskName",
1337
+ width: 150,
1338
+ fixed: "left",
1339
+ },
1340
+ {
1341
+ title: this.$t2('发送人', 'components.wf.senderName'),
1342
+ field: "senderName",
1343
+ width: 150,
1344
+ slots: {
1345
+ default: "sender",
1346
+ },
1347
+ },
1348
+ {
1349
+ title: this.$t2('接收人', 'components.wf.receiverName'),
1350
+ field: "receiverName",
1351
+ width: 150,
1352
+ slots: {
1353
+ default: "receiver",
1354
+ },
1355
+ },
1356
+ {
1357
+ title: this.$t2('沟通内容', 'components.wf.talkContent'),
1358
+ field: "content",
1359
+ width: 250,
1360
+ showOverflow: false,
1361
+ slots: {
1362
+ default: ({row, rowIndex}) => {
1363
+ return row.replyId ? ("[" + this.$t2('回复', 'components.wf.reply') + "]" + row.content) : row.content;
1364
+ },
1365
+ },
1366
+ },
1367
+ {
1368
+ width: 150,
1369
+ title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1370
+ field: "attachmentImage",
1371
+ sortable: false,
1372
+ slots: {
1373
+ default: ({row, rowIndex}) => {
1374
+ let option = {
1375
+ title: this.$t2('沟通资料', 'components.wf.talkAttachment'),
1376
+ edit: false,
1377
+ rows: (done) => {
1378
+ done(row.attachmentDTOs);
1379
+ },
1380
+ };
1381
+ return [
1382
+ h("base-attachment", {
1383
+ props: {
1384
+ option: option,
1385
+ },
1386
+ }),
1387
+ ];
1388
+ },
1389
+ },
1390
+ },
1391
+
1392
+ {
1393
+ title: this.$t2('状态', 'components.wf.status'),
1394
+ field: "status",
1395
+ width: 150,
1396
+ slots: {
1397
+ default: ({row, rowIndex}) => {
1398
+ return statusMap[row.status] || "";
1399
+ },
1400
+ },
1401
+ },
1402
+ {
1403
+ title: this.$t2('创建时间', 'system.label.createDate'),
1404
+ field: "createDate",
1405
+ width: 150,
1406
+ },
1407
+ {
1408
+ width: 80,
1409
+ fixed: "right",
1410
+ title: "",
1411
+ sortable: false,
1412
+ slots: {
1413
+ default: "operate"
1414
+ }
1415
+ },
1416
+ ],
1417
+ callback: (rows) => {
1418
+ if (rows.length && flag) {
1419
+ let row = rows[0];
1420
+ if (row.replyToSender) {
1421
+ this.$nextTick(() => {
1422
+ this.tabIndex = "2";
1423
+ this.openTalkDialog(row.sender, row.senderName, 'talk', 1, row.id)
1424
+ });
1425
+ }
1426
+ }
1427
+ }
1428
+ };
1429
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
1430
+ this.linkupOption = opts;
1431
+ });
1432
+ },
1433
+ cancelTalk(row) {
1434
+ let that = getTarget(this);
1435
+ that.$baseConfirm(this.$t2('您确定要取消沟通记录吗?', 'components.wf.cancelTalkTip')).then(() => {
1436
+ that.$http({
1437
+ url: this.current_prefix + "/wf_linkup/cancel",
1438
+ data: {id: row.id},
1439
+ method: "post",
1440
+ loadingTarget: document.body,
1441
+ isLoading: true,
1442
+ success: (resultMsg) => {
1443
+ that.$message({
1444
+ message: resultMsg.content,
1445
+ type: "success",
1446
+ duration: 500,
1447
+ onClose: (t) => {
1448
+ this.reloadContent();
1449
+ },
1450
+ });
1451
+ },
1452
+ });
1453
+ });
1454
+ },
1455
+ openTalkDialog(receiver, receiverName, operateType, flag, replyId) {
1456
+ this.operateType = operateType;
1457
+ /*this.talkForm.receiver = receiver || null;
1458
+ this.talkForm.receiverName = receiverName || null;
1459
+ this.talkForm.replyId = replyId || null;
1460
+ this.talkForm.content = null;
1461
+ this.talkForm.attachmentDTOs = [];*/
1462
+ this.initTalkForm(receiver, receiverName, replyId)
1463
+ this.showTalkDialog = true;
1464
+ if (flag == 1) {
1465
+ let opeaBtnDom = this.$refs.opeaBtn;
1466
+ opeaBtnDom && opeaBtnDom.scrollIntoView();
1467
+ }
1468
+ },
1469
+ initTalkForm(receiver, receiverName, replyId) {
1470
+ this.talkForm.receiver = receiver || null;
1471
+ this.talkForm.receiverName = receiverName || null;
1472
+ this.talkForm.replyId = replyId || null;
1473
+ this.talkForm.content = null;
1474
+ this.talkForm.attachmentDTOs = [];
1475
+ },
1476
+ submitTalkForm() {
1477
+ let that = getTarget(this);
1478
+ var procInstId = this.wfInfo.procInstId;
1479
+ var taskId = this.wfInfo.taskId;
1480
+
1481
+ if (!this.talkForm.receiver) {
1482
+ that.$message({
1483
+ message: this.$t2('请选择接收人', 'components.wf.talkWarnMsg1'),
1484
+ type: "error",
1485
+ duration: 2 * 1000,
1486
+ });
1487
+ return false;
1488
+ }
1489
+ if (!this.talkForm.content) {
1490
+ that.$message({
1491
+ message: this.$t2('请输入沟通内容', 'components.wf.talkWarnMsg2'),
1492
+ type: "error",
1493
+ duration: 2 * 1000,
1494
+ });
1495
+ return false;
1496
+ }
1497
+
1498
+ var data = {
1499
+ taskId: taskId,
1500
+ uuid: this.wfInfo.uuid,
1501
+ receiver: this.talkForm.receiver,
1502
+ receiverName: this.talkForm.receiverName,
1503
+ replyId: this.talkForm.replyId,
1504
+ content: this.talkForm.content,
1505
+ attachmentDTOs: this.talkForm.attachmentDTOs,
1506
+ notifyType: "wfLinkup",
1507
+ };
1508
+ this.showTalkDialog = false;
1509
+ that.$http({
1510
+ url: this.current_prefix + "/wf_linkup/save",
1511
+ data: data,
1512
+ method: "post",
1513
+ isLoading: true,
1514
+ success: (resultMsg) => {
1515
+ that.$message({
1516
+ message: resultMsg.content,
1517
+ type: "success",
1518
+ duration: 500,
1519
+ onClose: (t) => {
1520
+ this.reloadContent();
1521
+ this.closeWinOnCheck(5);
1522
+ },
1523
+ });
1524
+ },
1525
+ });
1526
+ },
1527
+ openTalkUserDialog() {
1528
+ this.showTalkUserDialog = true;
1529
+ },
1530
+ confirmTalkUserDialog(rows) {
1531
+ if (rows.length > 0) {
1532
+ let row = rows[0];
1533
+ if (this.talkForm.receiver != row.id) {
1534
+ this.talkForm.replyId = null;
1535
+ }
1536
+ this.talkForm.receiver = row.id;
1537
+ this.talkForm.receiverName = row.nickName;
1538
+ }
1539
+ },
1540
+ confirmUrging() {
1541
+ this.reloadContent();
1542
+ },
1543
+ confirmDeleteTaskUser() {
1544
+ this.reloadContent();
1545
+ },
1546
+ confirmAddTaskUser(rows) {
1547
+ this.addIncreaseSignUsers = rows;
1548
+ this.addIncreaseSignForm.userNickNames = rows.map(row => row.nickName).join(',');
1549
+ // this.reloadContent();
1550
+ },
1551
+ submitAddTaskUserForm(flag) {
1552
+ let that = getTarget(this);
1553
+ let userIds = this.addIncreaseSignUsers.map((checkRow) => checkRow.id);
1554
+ if (userIds.length == 0) {
1555
+ that.$message({
1556
+ message: this.$t2('请选择候选人', 'components.wf.addIncreaseSignWarnMsg1'),
1557
+ type: "error",
1558
+ duration: 2000,
1559
+ onClose: (t) => {
1560
+ },
1561
+ });
1562
+ return false;
1563
+ }
1564
+ let toDo = () => {
1565
+ var data = JSON.stringify({
1566
+ uuid: this.wfInfo.uuid,
1567
+ taskId: this.wfInfo.taskId,
1568
+ userIds: userIds,
1569
+ suggestion: this.addIncreaseSignForm.opinion
1570
+
1571
+ });
1572
+ this.agreeDialogVisible = false;
1573
+ that.$http({
1574
+ url: this.current_prefix + "/wf/addIncreaseSign",
1575
+ data: data,
1576
+ method: "post",
1577
+ loadingTarget: document.body,
1578
+ headers: {
1579
+ "Content-Type": "application/json;charset=utf-8",
1580
+ },
1581
+ isLoading: true,
1582
+ success: (resultMsg) => {
1583
+ that.$message({
1584
+ message: resultMsg.content,
1585
+ type: "success",
1586
+ duration: 500,
1587
+ onClose: (t) => {
1588
+ this.reloadContent();
1589
+ },
1590
+ });
1591
+ },
1592
+ });
1593
+ }
1594
+ if (flag === 0) {
1595
+ toDo();
1596
+ } else {
1597
+ that.$baseConfirm(this.$t2('您确定要加签吗?', 'components.wf.addIncreaseSignConfirmTip')).then(() => {
1598
+ toDo();
1599
+ });
1600
+ }
1601
+ },
1602
+ openSetCandidateDialog(operateType) {
1603
+ this.operateType = operateType;
1604
+ this.showSetCandidateDialog = true;
1605
+ },
1606
+ closeSetCandidateDialog() {
1607
+ this.showSetCandidateDialog = false;
1608
+ this.reloadContent();
1609
+ },
1610
+ openRevokeDialog(operateType) {
1611
+ this.operateType = operateType;
1612
+ this.revokeForm = {opinion: null}
1613
+ this.revokeDialogVisible = true;
1614
+ },
1615
+ subRevokeForm(flag) {
1616
+ //撤回
1617
+ let that = getTarget(this);
1618
+ let toDo = () => {
1619
+ var data = JSON.stringify({
1620
+ uuid: this.wfInfo.uuid,
1621
+ taskId: this.wfInfo.taskId,
1622
+ suggestion: this.revokeForm.opinion,
1623
+ });
1624
+ this.revokeDialogVisible = false;
1625
+ that.$http({
1626
+ url: this.current_prefix + "/wf/revoke",
1627
+ data: data,
1628
+ method: "post",
1629
+ loadingTarget: document.body,
1630
+ headers: {
1631
+ "Content-Type": "application/json;charset=utf-8",
1632
+ },
1633
+ isLoading: true,
1634
+ success: (resultMsg) => {
1635
+ that.$message({
1636
+ message: resultMsg.content,
1637
+ type: "success",
1638
+ duration: 500,
1639
+ onClose: (t) => {
1640
+ this.reloadContent();
1641
+ },
1642
+ });
1643
+ },
1644
+ });
1645
+ }
1646
+ if (flag === 0) {
1647
+ toDo();
1648
+ } else {
1649
+ that.$baseConfirm(this.$t2('您确定要撤回吗?', 'components.wf.revokeConfirmTip')).then(() => {
1650
+ toDo();
1651
+ });
1652
+ }
1653
+ }
1654
+ }
1655
+ }
1656
+ </script>
1657
+
1658
+ <style scoped>
1659
+ ::v-deep .form-box.el-form .el-form-item .el-form-item__label {
1660
+ width: 70px
1661
+ }
1662
+ </style>