@lambo-design/workflow-approve 1.0.0-beta.3 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/components/history.vue +17 -147
- package/src/components/{attachment.vue → horizontal/attachment.vue} +0 -4
- package/src/components/horizontal/history.vue +4 -8
- package/src/components/opinion.vue +46 -133
- package/src/horizontal.vue +66 -87
- package/src/portrait.vue +65 -322
- package/src/styles/css/index.less +221 -0
- package/src/workflow-diagram.vue +1 -42
package/src/horizontal.vue
CHANGED
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
</a>
|
|
15
15
|
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
16
16
|
<div class="box" v-show="historyShow">
|
|
17
|
-
<Card class="
|
|
17
|
+
<Card class="process-history" dis-hover :bordered="false"
|
|
18
18
|
v-if="!handleButtons || handleButtons.includes('auditHistory')">
|
|
19
|
-
<processHistory :list="
|
|
20
|
-
:smart-flow-server-context="smartFlowServerContext" :oss-server-context="ossServerContext"></processHistory>
|
|
19
|
+
<processHistory :list="processHistory" :smart-flow-server-context="smartFlowServerContext"></processHistory>
|
|
21
20
|
</Card>
|
|
22
21
|
</div>
|
|
23
22
|
</transition>
|
|
@@ -61,11 +60,11 @@
|
|
|
61
60
|
</TabPane>
|
|
62
61
|
<TabPane label="流程跟踪图" :name="auditProcess" v-if="!handleButtons || handleButtons.includes('processTrace')">
|
|
63
62
|
<div>
|
|
64
|
-
<
|
|
63
|
+
<Workflow_Diagram ref="processTrace" :instanceId="process.instanceId" :applyId="process.applyId"
|
|
65
64
|
:procId="process.procId"
|
|
66
65
|
:tableData="process.tableData" :hisAudit="hisAudit"
|
|
67
66
|
:smart-flow-server-context="smartFlowServerContext">
|
|
68
|
-
</
|
|
67
|
+
</Workflow_Diagram>
|
|
69
68
|
</div>
|
|
70
69
|
</TabPane>
|
|
71
70
|
</Tabs>
|
|
@@ -82,7 +81,7 @@
|
|
|
82
81
|
</Title>
|
|
83
82
|
</a>
|
|
84
83
|
<transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
|
|
85
|
-
<div class="box" v-show="auditShow">
|
|
84
|
+
<div class="box horizontal-audit" v-show="auditShow">
|
|
86
85
|
<Form ref="auditOpinion" justify="center"
|
|
87
86
|
v-if="!handleButtons || handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile')"
|
|
88
87
|
style=" margin-top: 15px;margin-left: 100px;margin-right: 100px" :rules="ruleValidate">
|
|
@@ -92,12 +91,12 @@
|
|
|
92
91
|
v-if="!handleButtons || handleButtons.includes('auditOpinion')">
|
|
93
92
|
<AuditOpinion v-model="auditOpinion" :smart-flow-server-context="smartFlowServerContext"></AuditOpinion>
|
|
94
93
|
</FormItem>
|
|
95
|
-
<
|
|
96
|
-
|
|
94
|
+
<UploadFile style="margin-left: 120px" v-if="!handleButtons || handleButtons.includes('attachmentFile')"
|
|
95
|
+
@upload-result="uploadFile" :multiple="true"
|
|
96
|
+
:oss-server-context="smartFlowServerContext" :oss-file-put-url="ossFilePutUrl"></UploadFile>
|
|
97
97
|
</Col>
|
|
98
98
|
</Row>
|
|
99
99
|
</Form>
|
|
100
|
-
|
|
101
100
|
<Divider/>
|
|
102
101
|
<Row type="flex" justify="center" style="margin-top: 10px;margin-bottom: 10px;">
|
|
103
102
|
<Button style="margin-left: 10px;" v-if="isShowSave && businessFormSave" @click="saveBusinessForm">保存</Button>
|
|
@@ -138,8 +137,8 @@
|
|
|
138
137
|
<script>
|
|
139
138
|
import LamboPageContainer from '@lambo-design/page-container'
|
|
140
139
|
import LamboIndicatorCard from '@lambo-design/indicator-card'
|
|
141
|
-
import Attachment from './components/attachment';
|
|
142
|
-
import
|
|
140
|
+
import Attachment from './components/horizontal/attachment';
|
|
141
|
+
import Workflow_Diagram from './workflow-diagram'
|
|
143
142
|
import ajax from "@lambo-design/shared/utils/ajax";
|
|
144
143
|
import { operateBtn } from '@lambo-design/shared/utils/assist';
|
|
145
144
|
import bus from '@lambo-design/shared/utils/bus';
|
|
@@ -149,6 +148,7 @@ import assigneeBox from "./components/assignee-box";
|
|
|
149
148
|
import LamboPagingTable from "@lambo-design/paging-table";
|
|
150
149
|
import axios from "axios";
|
|
151
150
|
import AuditOpinion from "./components/horizontal/opinion";
|
|
151
|
+
import UploadFile from "@lambo-design/upload-file";
|
|
152
152
|
|
|
153
153
|
// 引入docx-preview插件
|
|
154
154
|
let docx = require('docx-preview');
|
|
@@ -192,10 +192,6 @@ export default {
|
|
|
192
192
|
type: String,
|
|
193
193
|
default: '/api/smart-flow-server',
|
|
194
194
|
},
|
|
195
|
-
ossServerContext: {
|
|
196
|
-
type: String,
|
|
197
|
-
default: '/api/oss-server',
|
|
198
|
-
},
|
|
199
195
|
upmsServerContext: {
|
|
200
196
|
type: String,
|
|
201
197
|
default: '/api/upms-server',
|
|
@@ -204,13 +200,14 @@ export default {
|
|
|
204
200
|
components: {
|
|
205
201
|
Title,
|
|
206
202
|
LamboPageContainer,
|
|
207
|
-
|
|
203
|
+
Workflow_Diagram,
|
|
208
204
|
Attachment,
|
|
209
205
|
processHistory,
|
|
210
206
|
assigneeBox,
|
|
211
207
|
LamboPagingTable,
|
|
212
208
|
AuditOpinion,
|
|
213
|
-
LamboIndicatorCard
|
|
209
|
+
LamboIndicatorCard,
|
|
210
|
+
UploadFile
|
|
214
211
|
},
|
|
215
212
|
data() {
|
|
216
213
|
return {
|
|
@@ -245,6 +242,7 @@ export default {
|
|
|
245
242
|
auditInfo:"auditInfo",
|
|
246
243
|
auditProcess:"auditProcess",
|
|
247
244
|
fileList: [],
|
|
245
|
+
ossFilePutUrl: '/manage/oss/file/put',
|
|
248
246
|
hisAudit: [],
|
|
249
247
|
datas: {
|
|
250
248
|
orgName: "",
|
|
@@ -500,7 +498,7 @@ export default {
|
|
|
500
498
|
procId: this.procId,
|
|
501
499
|
applyId: this.applyId
|
|
502
500
|
}
|
|
503
|
-
ajax.get(
|
|
501
|
+
ajax.get(self.smartFlowServerContext + '/manage/processDone/getAttachmentList', {params: param}).then(function (resp) {
|
|
504
502
|
self.tableData = resp.data.data.rows
|
|
505
503
|
self.attachListShow = true
|
|
506
504
|
}).catch(err => {
|
|
@@ -514,13 +512,13 @@ export default {
|
|
|
514
512
|
applyId: this.applyId,
|
|
515
513
|
taskNode:this.taskNode
|
|
516
514
|
}
|
|
517
|
-
ajax.get(
|
|
515
|
+
ajax.get(self.smartFlowServerContext + "/manage/processTodo/list", {params: param}).then(function (resp) {
|
|
518
516
|
if (resp.data.code === '200') {
|
|
519
517
|
self.taskId = resp.data.data.rows[0].taskId
|
|
520
518
|
self.instanceId = resp.data.data.rows[0].procInstanceId
|
|
521
519
|
self.processPrint()
|
|
522
520
|
}else {
|
|
523
|
-
|
|
521
|
+
self.$Message.error(resp.data.message)
|
|
524
522
|
}
|
|
525
523
|
}).catch((err)=>{
|
|
526
524
|
console.log(err)
|
|
@@ -532,11 +530,11 @@ export default {
|
|
|
532
530
|
procId: this.procId,
|
|
533
531
|
taskNode: this.taskNode
|
|
534
532
|
}
|
|
535
|
-
ajax.post(
|
|
533
|
+
ajax.post(self.smartFlowServerContext + '/manage/approvalCenter/getNodeData', param).then(function (resp) {
|
|
536
534
|
if (resp.data.code === '200') {
|
|
537
535
|
self.handleButtons = resp.data.data[0].handleButtons
|
|
538
536
|
}else {
|
|
539
|
-
|
|
537
|
+
self.$Message.error(resp.data.message)
|
|
540
538
|
}
|
|
541
539
|
}).catch((err)=>{
|
|
542
540
|
console.log(err)
|
|
@@ -557,7 +555,7 @@ export default {
|
|
|
557
555
|
const self = this;
|
|
558
556
|
if (self.auditResult == '82') {
|
|
559
557
|
self.assigneeBoxData = self.auditParams
|
|
560
|
-
|
|
558
|
+
self.$refs.assigneeHelpBox.toggleShowHelpBox();
|
|
561
559
|
} else if (self.auditResult == '80') {
|
|
562
560
|
self.getNodesBehind()
|
|
563
561
|
} else if (self.auditResult == '90') {
|
|
@@ -565,7 +563,7 @@ export default {
|
|
|
565
563
|
} else if (self.auditResult == '40') {
|
|
566
564
|
self.loading = true
|
|
567
565
|
self.disable = true
|
|
568
|
-
let url =
|
|
566
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/getPreNode'
|
|
569
567
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
570
568
|
let result = resp.data
|
|
571
569
|
if (result.code == '30010') {
|
|
@@ -574,7 +572,7 @@ export default {
|
|
|
574
572
|
content: result.message,
|
|
575
573
|
onOk: () => {
|
|
576
574
|
self.auditParams.auditResult = '70'
|
|
577
|
-
let url =
|
|
575
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
578
576
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
579
577
|
let result = resp.data
|
|
580
578
|
if (result.code == '200') {
|
|
@@ -601,7 +599,7 @@ export default {
|
|
|
601
599
|
} else {
|
|
602
600
|
self.loading = true
|
|
603
601
|
self.disable = true
|
|
604
|
-
let url =
|
|
602
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
605
603
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
606
604
|
let result = resp.data
|
|
607
605
|
if (result.code == '200') {
|
|
@@ -626,7 +624,7 @@ export default {
|
|
|
626
624
|
} else {
|
|
627
625
|
self.loading = true
|
|
628
626
|
self.disable = true
|
|
629
|
-
let url =
|
|
627
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
630
628
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
631
629
|
let result = resp.data
|
|
632
630
|
if (result.code == '200') {
|
|
@@ -668,24 +666,24 @@ export default {
|
|
|
668
666
|
self.submit()
|
|
669
667
|
},
|
|
670
668
|
getAttach(row) {
|
|
671
|
-
window.open(this.
|
|
669
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId, "_blank");
|
|
672
670
|
},
|
|
673
671
|
preViewAttach(row) {
|
|
674
672
|
let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
|
|
675
673
|
let regs = /\.(pdf)$/
|
|
676
674
|
if (reg.test(row.fileName)) {
|
|
677
|
-
let url = this.
|
|
675
|
+
let url = this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId;
|
|
678
676
|
this.imgPreview(url);
|
|
679
677
|
} else if (regs.test(row.fileName)) {
|
|
680
|
-
window.open(this.
|
|
678
|
+
window.open(this.smartFlowServerContext + "/manage/oss/file/getFileStream?fileId=" + row.fileId, "_blank");
|
|
681
679
|
} else {
|
|
682
|
-
this.modalDocx=true
|
|
680
|
+
this.modalDocx = true
|
|
683
681
|
axios({
|
|
684
682
|
method: 'get',
|
|
685
683
|
responseType: 'blob', // 因为是流文件,所以要指定blob类型
|
|
686
|
-
url: this.
|
|
684
|
+
url: this.smartFlowServerContext + "/manage/oss/file/get/" + row.fileId// 一个word下载文件的接口
|
|
687
685
|
}).then(({data}) => {
|
|
688
|
-
docx.renderAsync(data, this.$refs.file,null, {
|
|
686
|
+
docx.renderAsync(data, this.$refs.file, null, {
|
|
689
687
|
className: "docx", //默认和文档样式类的类名/前缀
|
|
690
688
|
inWrapper: true, //启用围绕文档内容呈现包装器
|
|
691
689
|
ignoreWidth: false, //禁用页面的渲染宽度
|
|
@@ -723,20 +721,19 @@ export default {
|
|
|
723
721
|
selectedUserId: self.selectedUserId,
|
|
724
722
|
}
|
|
725
723
|
if (self.auditResult == '' || self.auditResult == null) {
|
|
726
|
-
|
|
724
|
+
self.$Message.error("请选择审批结果!");
|
|
727
725
|
return;
|
|
728
726
|
}
|
|
729
727
|
if (self.auditOpinion == '' || self.auditOpinion == null) {
|
|
730
728
|
if (!self.handleButtons || self.handleButtons.includes('auditOpinion')) {
|
|
731
|
-
|
|
729
|
+
self.$Message.error("请输入审批意见!")
|
|
732
730
|
return;
|
|
733
731
|
} else {
|
|
734
732
|
self.auditParams.auditOpinion = self.handleButtonsNames[self.auditResult];
|
|
735
733
|
}
|
|
736
734
|
}
|
|
737
735
|
|
|
738
|
-
|
|
739
|
-
|
|
736
|
+
self.businessFormSave ? self.businessFormSave(self.handleSaveResult) : self.handleSaveResult(true)
|
|
740
737
|
},
|
|
741
738
|
|
|
742
739
|
//打印流程图信息
|
|
@@ -748,7 +745,7 @@ export default {
|
|
|
748
745
|
procId: self.procId,
|
|
749
746
|
taskId: self.taskId,
|
|
750
747
|
}
|
|
751
|
-
ajax.get(
|
|
748
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getPrintData', {params: params}).then(function (resp) {
|
|
752
749
|
let result = resp.data.data
|
|
753
750
|
if (resp.data.code === '200') {
|
|
754
751
|
let tableData = result
|
|
@@ -775,7 +772,7 @@ export default {
|
|
|
775
772
|
procId: self.procId,
|
|
776
773
|
taskId: self.taskId
|
|
777
774
|
}
|
|
778
|
-
ajax.get(
|
|
775
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getHisAudit', {params: params}).then(function (resp) {
|
|
779
776
|
if (resp.data.code === '200') {
|
|
780
777
|
self.hisAudit = resp.data.data
|
|
781
778
|
let uniqueDataMap = {};
|
|
@@ -796,7 +793,7 @@ export default {
|
|
|
796
793
|
procId: self.procId,
|
|
797
794
|
taskId: self.taskId
|
|
798
795
|
}
|
|
799
|
-
ajax.get(
|
|
796
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getProcessHis', {params: params}).then(function (resp) {
|
|
800
797
|
if (resp.data.code === '200') {
|
|
801
798
|
self.processHistory = resp.data.data
|
|
802
799
|
}
|
|
@@ -830,7 +827,7 @@ export default {
|
|
|
830
827
|
self.loading = true
|
|
831
828
|
self.disable = true
|
|
832
829
|
|
|
833
|
-
let url =
|
|
830
|
+
let url = self.smartFlowServerContext + '/manage/processTodo/audit'
|
|
834
831
|
ajax.post(url, self.auditParams).then(function (resp) {
|
|
835
832
|
let result = resp.data
|
|
836
833
|
if (result.code === '200') {
|
|
@@ -865,7 +862,7 @@ export default {
|
|
|
865
862
|
processDefId: self.procId,
|
|
866
863
|
taskId: self.taskId,
|
|
867
864
|
}
|
|
868
|
-
ajax.get(
|
|
865
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getAllPreNodes', {params: params}).then(function (resp) {
|
|
869
866
|
if (resp.data.code === '200') {
|
|
870
867
|
if (resp.data.data.length > 0){
|
|
871
868
|
self.allNode = resp.data.data
|
|
@@ -884,7 +881,7 @@ export default {
|
|
|
884
881
|
processDefId: self.procId,
|
|
885
882
|
taskId: self.taskId,
|
|
886
883
|
}
|
|
887
|
-
ajax.get(
|
|
884
|
+
ajax.get(self.smartFlowServerContext + '/manage/processTodo/getNodesBehind', {params: params}).then(function (resp) {
|
|
888
885
|
if (resp.data.code === '200') {
|
|
889
886
|
if (resp.data.data.length > 0){
|
|
890
887
|
self.allNode = resp.data.data
|
|
@@ -926,6 +923,15 @@ export default {
|
|
|
926
923
|
|
|
927
924
|
el.addEventListener('transitionend', done);
|
|
928
925
|
},
|
|
926
|
+
uploadFile(file){
|
|
927
|
+
const self = this;
|
|
928
|
+
file.forEach(item => {
|
|
929
|
+
self.fileList.push({
|
|
930
|
+
fileName: item.fileName,
|
|
931
|
+
fileId: item.fileCode,
|
|
932
|
+
});
|
|
933
|
+
})
|
|
934
|
+
},
|
|
929
935
|
},
|
|
930
936
|
watch: {
|
|
931
937
|
auditOpinionText(label) {
|
|
@@ -940,66 +946,28 @@ export default {
|
|
|
940
946
|
</script>
|
|
941
947
|
|
|
942
948
|
<style lang="less" scoped>
|
|
943
|
-
.header-text {
|
|
944
|
-
display: flex;
|
|
945
|
-
font-size: 18px;
|
|
946
|
-
font-weight: bold;
|
|
947
|
-
color: black;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
.cont {
|
|
951
|
-
display: flex;
|
|
952
|
-
width: 100%;
|
|
953
|
-
height: 100%;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
.contLeft {
|
|
957
|
-
flex: 0 0 20%;
|
|
958
|
-
margin-right: 5px
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
.contRight {
|
|
962
|
-
display: flex;
|
|
963
|
-
flex: 0 0 80%;
|
|
964
|
-
height: 100%;
|
|
965
|
-
flex-direction: column;
|
|
966
|
-
|
|
967
|
-
}
|
|
968
949
|
|
|
969
|
-
.
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
border-style: none;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
.fontType {
|
|
976
|
-
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
|
977
|
-
font-weight: bold;
|
|
978
|
-
color: #657180;
|
|
979
|
-
font-size: 14px
|
|
950
|
+
/deep/ .ivu-table-row-highlight td {
|
|
951
|
+
background-color: #50c1ff !important;
|
|
952
|
+
color: #fff !important;
|
|
980
953
|
}
|
|
981
954
|
|
|
982
|
-
.
|
|
955
|
+
.process-history {
|
|
983
956
|
height: 68vh;
|
|
984
957
|
width: 100%;
|
|
985
958
|
overflow-y: auto;
|
|
986
959
|
}
|
|
987
960
|
|
|
988
|
-
.
|
|
961
|
+
.process-history::-webkit-scrollbar {
|
|
989
962
|
width: 5px;
|
|
990
963
|
height: 5px;
|
|
991
964
|
}
|
|
992
965
|
|
|
993
|
-
.
|
|
966
|
+
.process-history::-webkit-scrollbar-thumb {
|
|
994
967
|
background: linear-gradient(to bottom right, #bbbbbb 0%, #bbbbbb 100%);
|
|
995
968
|
border-radius: 5px;
|
|
996
969
|
}
|
|
997
970
|
|
|
998
|
-
/deep/ .ivu-table-row-highlight td {
|
|
999
|
-
background-color: #50c1ff !important;
|
|
1000
|
-
color: #fff !important;
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
971
|
.box {
|
|
1004
972
|
overflow: hidden;
|
|
1005
973
|
transition: height 0.3s ease;
|
|
@@ -1009,7 +977,18 @@ export default {
|
|
|
1009
977
|
.draw-enter-active, .draw-leave-active {
|
|
1010
978
|
|
|
1011
979
|
}
|
|
980
|
+
.horizontal-audit{
|
|
981
|
+
overflow-y: auto;
|
|
982
|
+
}
|
|
983
|
+
.horizontal-audit::-webkit-scrollbar {
|
|
984
|
+
width: 5px;
|
|
985
|
+
height: 5px;
|
|
986
|
+
}
|
|
1012
987
|
|
|
988
|
+
.horizontal-audit::-webkit-scrollbar-thumb {
|
|
989
|
+
background: linear-gradient(to bottom right, #bbbbbb 0%, #bbbbbb 100%);
|
|
990
|
+
border-radius: 5px;
|
|
991
|
+
}
|
|
1013
992
|
.draw-enter, .draw-leave-to {
|
|
1014
993
|
height: 0;
|
|
1015
994
|
}
|