eoss-mobiles 0.2.5 → 0.2.7
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/lib/checkbox.js +6 -3
- package/lib/config/api.js +2 -1
- package/lib/eoss-mobile.common.js +514 -191
- package/lib/esign.js +11 -12
- package/lib/flow.js +490 -167
- package/lib/index.js +1 -1
- package/lib/picker.js +6 -3
- package/lib/radio.js +6 -3
- package/lib/selector.js +15 -11
- package/lib/table.js +4 -2
- package/lib/theme-chalk/flow.css +1 -1
- package/lib/theme-chalk/fonts/iconfont.scss +7 -3
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/selector.css +1 -1
- package/lib/utils/axios.js +4 -2
- package/package.json +1 -1
- package/packages/esign/src/main.vue +3 -3
- package/packages/flow/src/components/Handle.vue +68 -18
- package/packages/flow/src/components/Opinion.vue +103 -31
- package/packages/flow/src/components/Reject.vue +26 -10
- package/packages/flow/src/components/StartFlow.vue +38 -10
- package/packages/flow/src/components/taskUnionExamine.vue +44 -20
- package/packages/selector/src/selector-tree.vue +2 -1
- package/packages/theme-chalk/lib/flow.css +1 -1
- package/packages/theme-chalk/lib/fonts/iconfont.scss +7 -3
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/selector.css +1 -1
- package/packages/theme-chalk/src/flow.scss +71 -24
- package/packages/theme-chalk/src/fonts/iconfont.scss +7 -3
- package/src/config/api.js +2 -1
- package/src/index.js +1 -1
- package/src/utils/axios.js +9 -2
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<Opinion
|
|
17
17
|
:code="processObj.attachedCode"
|
|
18
18
|
:ownId="pendingId"
|
|
19
|
+
:esign="esign"
|
|
19
20
|
@onInputOpintion="onInputOpintion"
|
|
20
21
|
:isOpinionRequired="isOpinionRequired"
|
|
21
22
|
:disabled="isBanInputOpinion != 0"
|
|
@@ -117,7 +118,20 @@
|
|
|
117
118
|
class="item"
|
|
118
119
|
v-if="!isHiddenNextStepInfo && isChooseNextNode == 1"
|
|
119
120
|
>
|
|
120
|
-
|
|
121
|
+
<em-input
|
|
122
|
+
value="下步操作"
|
|
123
|
+
label="下步操作"
|
|
124
|
+
required
|
|
125
|
+
:disabled="true"
|
|
126
|
+
label-position="top"
|
|
127
|
+
>
|
|
128
|
+
<template slot="input">
|
|
129
|
+
<span class="em-flow-tag" :class="{'em-flow-tag-active':tagKey === item.key}" @click="changeNextOperate(item)" v-for="item in taskOperations" :key="item.key">
|
|
130
|
+
{{item.value}}
|
|
131
|
+
</span>
|
|
132
|
+
</template>
|
|
133
|
+
</em-input>
|
|
134
|
+
<!-- <em-picker
|
|
121
135
|
title="下步操作"
|
|
122
136
|
label="下步操作"
|
|
123
137
|
required
|
|
@@ -128,7 +142,7 @@
|
|
|
128
142
|
value-key="key"
|
|
129
143
|
label-key="value"
|
|
130
144
|
@confirm="changeNextOperate"
|
|
131
|
-
/>
|
|
145
|
+
/> -->
|
|
132
146
|
</div>
|
|
133
147
|
<!-- 下步节点 -->
|
|
134
148
|
<div
|
|
@@ -435,6 +449,10 @@ export default {
|
|
|
435
449
|
paddingTop: {
|
|
436
450
|
type: [String, Number],
|
|
437
451
|
default: 0
|
|
452
|
+
},
|
|
453
|
+
esign: {
|
|
454
|
+
type: Boolean,
|
|
455
|
+
default: false
|
|
438
456
|
}
|
|
439
457
|
},
|
|
440
458
|
data() {
|
|
@@ -457,6 +475,7 @@ export default {
|
|
|
457
475
|
isAddSignList: [{ name: '是', value: '1' }, { name: '否', value: '2' }],
|
|
458
476
|
form: {
|
|
459
477
|
opinion: undefined, // 审批意见
|
|
478
|
+
isImageOpinion: 0,
|
|
460
479
|
isAddSign: undefined, //是否加签
|
|
461
480
|
addSignUserId: undefined, //加签人员id
|
|
462
481
|
isRemoveSign: undefined, //是否减签
|
|
@@ -563,7 +582,9 @@ export default {
|
|
|
563
582
|
choiceDeptId: '',
|
|
564
583
|
taskExamineInfo: {},
|
|
565
584
|
nodeInfoMapInfo: {},
|
|
585
|
+
file: '',
|
|
566
586
|
isEndUserTask: '',
|
|
587
|
+
tagKey:'',
|
|
567
588
|
pOrgId: ''
|
|
568
589
|
};
|
|
569
590
|
},
|
|
@@ -665,6 +686,15 @@ export default {
|
|
|
665
686
|
opinion: this.form.opinion,
|
|
666
687
|
taskAction: 'complete'
|
|
667
688
|
};
|
|
689
|
+
let formData = new FormData();
|
|
690
|
+
if (this.form.isImageOpinion == 1) {
|
|
691
|
+
formData.append('file', this.file);
|
|
692
|
+
}
|
|
693
|
+
for (let key in params) {
|
|
694
|
+
if (params[key] !== '' && params[key] !== undefined) {
|
|
695
|
+
formData.append(key, params[key]);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
668
698
|
this.$toast.loading({
|
|
669
699
|
message: '加载中...',
|
|
670
700
|
forbidClick: true,
|
|
@@ -673,12 +703,12 @@ export default {
|
|
|
673
703
|
duration: 0
|
|
674
704
|
});
|
|
675
705
|
request({
|
|
676
|
-
url:this.baseUrl ? this.baseUrl + taskReadHtml : taskReadHtml,
|
|
706
|
+
url: this.baseUrl ? this.baseUrl + taskReadHtml : taskReadHtml,
|
|
677
707
|
headers: {
|
|
678
708
|
Accept: 'application/json,text/plain'
|
|
679
709
|
},
|
|
680
710
|
type: 'post',
|
|
681
|
-
params:
|
|
711
|
+
params: formData
|
|
682
712
|
})
|
|
683
713
|
.then(res => {
|
|
684
714
|
const { status, message } = res;
|
|
@@ -709,6 +739,19 @@ export default {
|
|
|
709
739
|
(i === this.nextUserSelectList.length - 1 ? '' : ',');
|
|
710
740
|
});
|
|
711
741
|
this.form.nextUserId = idStr;
|
|
742
|
+
if (
|
|
743
|
+
(!this.form.opinion &&
|
|
744
|
+
this.isOpinionRequired == 1 &&
|
|
745
|
+
!this.nodeDefaultSubmitOpinion &&
|
|
746
|
+
this.form.isImageOpinion == 0) ||
|
|
747
|
+
(!this.file &&
|
|
748
|
+
this.isOpinionRequired == 1 &&
|
|
749
|
+
!this.nodeDefaultSubmitOpinion &&
|
|
750
|
+
this.form.isImageOpinion == 1)
|
|
751
|
+
) {
|
|
752
|
+
this.$toast('请选择输入审批意见');
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
712
755
|
if (
|
|
713
756
|
this.isSpecial &&
|
|
714
757
|
this.isNextUser &&
|
|
@@ -730,14 +773,7 @@ export default {
|
|
|
730
773
|
this.$toast('请选择流程节点');
|
|
731
774
|
return;
|
|
732
775
|
}
|
|
733
|
-
|
|
734
|
-
!this.form.opinion &&
|
|
735
|
-
this.isOpinionRequired == 1 &&
|
|
736
|
-
!this.nodeDefaultSubmitOpinion
|
|
737
|
-
) {
|
|
738
|
-
this.$toast('请选择输入审批意见');
|
|
739
|
-
return;
|
|
740
|
-
}
|
|
776
|
+
|
|
741
777
|
let str = '';
|
|
742
778
|
if (this.form.opinion) {
|
|
743
779
|
str = this.form.opinion.replace(/\s+/g, '');
|
|
@@ -817,13 +853,20 @@ export default {
|
|
|
817
853
|
_that.form.nextOperate == 0 || _that.form.nextOperate == 1
|
|
818
854
|
? _that.form.nextNodeId || nodeInfoMapInfo.nodeExtAttr.defaultNextNode
|
|
819
855
|
: '';
|
|
856
|
+
let formData = new FormData();
|
|
857
|
+
if (_that.form.isImageOpinion == 1) {
|
|
858
|
+
formData.append('file', _that.file);
|
|
859
|
+
}
|
|
860
|
+
formData.append('pendingId', _that.pendingId);
|
|
861
|
+
for (let key in _that.form) {
|
|
862
|
+
if (_that.form[key] !== '' && _that.form[key] !== undefined) {
|
|
863
|
+
formData.append(key, _that.form[key]);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
820
866
|
request({
|
|
821
867
|
url: _that.baseUrl ? _that.baseUrl + taskHandleHtml : taskHandleHtml,
|
|
822
868
|
type: 'post',
|
|
823
|
-
params:
|
|
824
|
-
pendingId: _that.pendingId,
|
|
825
|
-
..._that.form
|
|
826
|
-
}
|
|
869
|
+
params: formData
|
|
827
870
|
}).then(res => {
|
|
828
871
|
this.$toast.clear();
|
|
829
872
|
if (res.status == 'success') {
|
|
@@ -870,6 +913,8 @@ export default {
|
|
|
870
913
|
},
|
|
871
914
|
// 切换下一步操作
|
|
872
915
|
changeNextOperate(val, isDef) {
|
|
916
|
+
if(!isDef && val.key === this.tagKey) return
|
|
917
|
+
this.tagKey = val.key
|
|
873
918
|
//恢复默认
|
|
874
919
|
this.isNextUser = false;
|
|
875
920
|
this.isShowNode = false;
|
|
@@ -962,7 +1007,10 @@ export default {
|
|
|
962
1007
|
},
|
|
963
1008
|
// 意见回调
|
|
964
1009
|
onInputOpintion(val) {
|
|
965
|
-
|
|
1010
|
+
const { opinion, isImageOpinion, file } = val;
|
|
1011
|
+
this.form.opinion = opinion;
|
|
1012
|
+
this.form.isImageOpinion = isImageOpinion;
|
|
1013
|
+
this.file = file;
|
|
966
1014
|
},
|
|
967
1015
|
// 办理人选择完回调
|
|
968
1016
|
disposeAppUser(res, type) {
|
|
@@ -1247,7 +1295,9 @@ export default {
|
|
|
1247
1295
|
},
|
|
1248
1296
|
getToStartTaskReadIndex() {
|
|
1249
1297
|
request({
|
|
1250
|
-
url:
|
|
1298
|
+
url: this.baseUrl
|
|
1299
|
+
? this.baseUrl + toStartTaskReadHtml
|
|
1300
|
+
: toStartTaskReadHtml,
|
|
1251
1301
|
params: { pendingId: this.pendingId }
|
|
1252
1302
|
})
|
|
1253
1303
|
.then(res => {
|
|
@@ -1,28 +1,75 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="opinton-content">
|
|
3
3
|
<div class="input-box" :type="isFile ? 'haveFile' : 'noHaveFile'">
|
|
4
|
-
<div
|
|
5
|
-
<em-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
<div v-if="esign">
|
|
5
|
+
<em-tabs v-model="isImageOpinion" @change="handleChange">
|
|
6
|
+
<em-tab
|
|
7
|
+
:title="item.text"
|
|
8
|
+
v-for="item in tabs"
|
|
9
|
+
:key="item.id"
|
|
10
|
+
:name="item.type"
|
|
11
|
+
>
|
|
12
|
+
<em-esign
|
|
13
|
+
style="padding:0px 10px"
|
|
14
|
+
v-show="isImageOpinion === 1"
|
|
15
|
+
@save="handleSave"
|
|
16
|
+
:file-path="esignPath"
|
|
17
|
+
/>
|
|
18
|
+
<div
|
|
19
|
+
v-show="isImageOpinion === 0"
|
|
20
|
+
class="item em-flow-opion-box"
|
|
21
|
+
style="padding-bottom:20px"
|
|
22
|
+
>
|
|
23
|
+
<em-input
|
|
24
|
+
:label="label"
|
|
25
|
+
:placeholder="placeholder"
|
|
26
|
+
v-model="opinion"
|
|
27
|
+
type="textarea"
|
|
28
|
+
rows="3"
|
|
29
|
+
@input="onInput"
|
|
30
|
+
:disabled="disabled || fixedDisabled"
|
|
31
|
+
:required="isOpinionRequired == 1 ? true : false"
|
|
32
|
+
/>
|
|
33
|
+
<span
|
|
34
|
+
class="em-flow-opion"
|
|
35
|
+
v-if="opinionList.length > 0 && isHiddenOftenOpinion"
|
|
36
|
+
@click="showPicker = true"
|
|
37
|
+
>常见意见 <i class="iconfont icon-youjiantou"
|
|
38
|
+
/></span>
|
|
39
|
+
</div>
|
|
40
|
+
</em-tab>
|
|
41
|
+
</em-tabs>
|
|
15
42
|
</div>
|
|
16
|
-
<div
|
|
17
|
-
<em-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
<div v-else>
|
|
44
|
+
<div class="item em-flow-opion-box" style="padding-bottom:20px">
|
|
45
|
+
<em-input
|
|
46
|
+
:label="label"
|
|
47
|
+
:placeholder="placeholder"
|
|
48
|
+
v-model="opinion"
|
|
49
|
+
type="textarea"
|
|
50
|
+
rows="3"
|
|
51
|
+
@input="onInput"
|
|
52
|
+
:disabled="disabled || fixedDisabled"
|
|
53
|
+
:required="isOpinionRequired == 1 ? true : false"
|
|
54
|
+
/>
|
|
55
|
+
<span
|
|
56
|
+
class="em-flow-opion"
|
|
57
|
+
v-if="opinionList.length > 0 && isHiddenOftenOpinion"
|
|
58
|
+
@click="showPicker = true"
|
|
59
|
+
>常见意见 <i class="iconfont icon-youjiantou"
|
|
60
|
+
/></span>
|
|
61
|
+
</div>
|
|
62
|
+
<!-- <div class="item" v-if="opinionList.length > 0 && isHiddenOftenOpinion">
|
|
63
|
+
<em-input
|
|
64
|
+
label-width="100%"
|
|
65
|
+
readonly
|
|
66
|
+
v-model="selectOpinion"
|
|
67
|
+
placeholder="请选择常用语"
|
|
68
|
+
label="请选择常用语"
|
|
69
|
+
@click="showPicker = true"
|
|
70
|
+
>
|
|
71
|
+
</em-input>
|
|
72
|
+
</div> -->
|
|
26
73
|
</div>
|
|
27
74
|
</div>
|
|
28
75
|
<div class="input-box input-box-file" v-if="isFile">
|
|
@@ -84,6 +131,10 @@ export default {
|
|
|
84
131
|
nodeFixedOpinionSelectList: {
|
|
85
132
|
type: Array,
|
|
86
133
|
default: () => []
|
|
134
|
+
},
|
|
135
|
+
esign: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: false
|
|
87
138
|
}
|
|
88
139
|
},
|
|
89
140
|
// components: {
|
|
@@ -92,9 +143,15 @@ export default {
|
|
|
92
143
|
data() {
|
|
93
144
|
return {
|
|
94
145
|
opinion: '',
|
|
95
|
-
selectOpinion: '',
|
|
96
146
|
fixedDisabled: false,
|
|
97
147
|
showPicker: false,
|
|
148
|
+
esignPath: '',
|
|
149
|
+
tabs: [
|
|
150
|
+
{ id: 0, text: '键盘签批', type: 0 },
|
|
151
|
+
{ id: 1, text: '手写签批', type: 1 }
|
|
152
|
+
],
|
|
153
|
+
isImageOpinion: 0,
|
|
154
|
+
file: '',
|
|
98
155
|
opinionList: [] //意见列表
|
|
99
156
|
};
|
|
100
157
|
},
|
|
@@ -107,6 +164,24 @@ export default {
|
|
|
107
164
|
}
|
|
108
165
|
},
|
|
109
166
|
methods: {
|
|
167
|
+
handleSave(info) {
|
|
168
|
+
const { isImageOpinion } = this;
|
|
169
|
+
this.esignPath = info.data;
|
|
170
|
+
this.file = info.file;
|
|
171
|
+
this.$emit('onInputOpintion', {
|
|
172
|
+
opinion: this.opinion,
|
|
173
|
+
isImageOpinion,
|
|
174
|
+
file:info.file
|
|
175
|
+
});
|
|
176
|
+
},
|
|
177
|
+
handleChange() {
|
|
178
|
+
const { isImageOpinion, file } = this;
|
|
179
|
+
this.$emit('onInputOpintion', {
|
|
180
|
+
opinion: this.opinion,
|
|
181
|
+
isImageOpinion,
|
|
182
|
+
file
|
|
183
|
+
});
|
|
184
|
+
},
|
|
110
185
|
handleClose() {
|
|
111
186
|
this.showPicker = false;
|
|
112
187
|
},
|
|
@@ -124,16 +199,13 @@ export default {
|
|
|
124
199
|
},
|
|
125
200
|
// 将input的值传递到父组件
|
|
126
201
|
onInput(val) {
|
|
202
|
+
const { isImageOpinion, file } = this;
|
|
127
203
|
this.opinion = typeof val === 'string' ? val : val.content;
|
|
128
|
-
|
|
129
|
-
this.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
this.$emit(
|
|
134
|
-
'onInputOpintion',
|
|
135
|
-
typeof val === 'string' ? val : val.content
|
|
136
|
-
);
|
|
204
|
+
this.$emit('onInputOpintion', {
|
|
205
|
+
opinion: this.opinion,
|
|
206
|
+
isImageOpinion,
|
|
207
|
+
file
|
|
208
|
+
});
|
|
137
209
|
this.showPicker = false;
|
|
138
210
|
}
|
|
139
211
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<Opinion
|
|
9
9
|
:code="processObj.attachedCode"
|
|
10
10
|
:ownId="$route.query.pendingId"
|
|
11
|
+
:esign="esign"
|
|
11
12
|
@onInputOpintion="onInputOpintion"
|
|
12
13
|
:isOpinionRequired="isBanInputOpinion"
|
|
13
14
|
:disabled="isBanInputOpinion != 0"
|
|
@@ -52,7 +53,11 @@ export default {
|
|
|
52
53
|
pendingId: String,
|
|
53
54
|
userId: String,
|
|
54
55
|
beforeSubmit: Function,
|
|
55
|
-
baseUrl: String
|
|
56
|
+
baseUrl: String,
|
|
57
|
+
esign: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false
|
|
60
|
+
}
|
|
56
61
|
},
|
|
57
62
|
data() {
|
|
58
63
|
return {
|
|
@@ -62,8 +67,10 @@ export default {
|
|
|
62
67
|
opinion: undefined, // 审批意见
|
|
63
68
|
notificationMsg: undefined, //系统消息
|
|
64
69
|
nextNodeId: undefined,
|
|
65
|
-
loginType: 2 //登录方式
|
|
70
|
+
loginType: 2, //登录方式
|
|
71
|
+
isImageOpinion:0,
|
|
66
72
|
},
|
|
73
|
+
file:'',
|
|
67
74
|
processObj: {
|
|
68
75
|
taskExamine: { nodeName: undefined },
|
|
69
76
|
nodeInfoMap: { nextUserList: [] }
|
|
@@ -93,7 +100,10 @@ export default {
|
|
|
93
100
|
},
|
|
94
101
|
// 意见回调
|
|
95
102
|
onInputOpintion(val) {
|
|
96
|
-
|
|
103
|
+
const { opinion, isImageOpinion, file } = val;
|
|
104
|
+
this.form.opinion = opinion;
|
|
105
|
+
this.form.isImageOpinion = isImageOpinion;
|
|
106
|
+
this.file = file;
|
|
97
107
|
},
|
|
98
108
|
goBack() {
|
|
99
109
|
this.$parent.$emit('close');
|
|
@@ -101,8 +111,8 @@ export default {
|
|
|
101
111
|
},
|
|
102
112
|
// 提交流程
|
|
103
113
|
onSubmit() {
|
|
104
|
-
if (!this.form.opinion && this.isBanInputOpinion == 0) {
|
|
105
|
-
this.$toast('
|
|
114
|
+
if ((!this.form.opinion && this.isBanInputOpinion == 0 && this.form.isImageOpinion == 0)|| (!this.file && this.isBanInputOpinion == 0 && this.form.isImageOpinion == 1)) {
|
|
115
|
+
this.$toast('请输入审批意见');
|
|
106
116
|
return;
|
|
107
117
|
}
|
|
108
118
|
let str = '';
|
|
@@ -116,6 +126,16 @@ export default {
|
|
|
116
126
|
this.beforeSubmit({ pendingId: this.pendingId, ...this.form });
|
|
117
127
|
return;
|
|
118
128
|
}
|
|
129
|
+
let formData = new FormData();
|
|
130
|
+
if (this.form.isImageOpinion == 1) {
|
|
131
|
+
formData.append('file', this.file);
|
|
132
|
+
}
|
|
133
|
+
formData.append('pendingId', this.pendingId);
|
|
134
|
+
for (let key in this.form) {
|
|
135
|
+
if (this.form[key] !== '' && this.form[key] !== undefined) {
|
|
136
|
+
formData.append(key, this.form[key]);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
119
139
|
this.$toast.loading({
|
|
120
140
|
message: '加载中...',
|
|
121
141
|
forbidClick: true,
|
|
@@ -127,11 +147,7 @@ export default {
|
|
|
127
147
|
request({
|
|
128
148
|
url: _that.baseUrl ? _that.baseUrl + taskRejectHtml : taskRejectHtml,
|
|
129
149
|
type: 'post',
|
|
130
|
-
params:
|
|
131
|
-
pendingId: _that.pendingId,
|
|
132
|
-
// nextNodeId: this.dataJson.taskExamine.nodeId,
|
|
133
|
-
...this.form
|
|
134
|
-
}
|
|
150
|
+
params: formData
|
|
135
151
|
}).then(res => {
|
|
136
152
|
if (res.status == 'success') {
|
|
137
153
|
this.$toast('操作成功');
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
v-if="showOpinion"
|
|
13
13
|
:code="processObj.attachedCode"
|
|
14
14
|
:ownId="businessId"
|
|
15
|
+
:esign="esign"
|
|
15
16
|
:isFile="false"
|
|
16
17
|
:baseUrl="baseUrl"
|
|
17
18
|
@onInputOpintion="onInputOpintion"
|
|
@@ -133,6 +134,10 @@ export default {
|
|
|
133
134
|
paddingTop: {
|
|
134
135
|
type: [String, Number],
|
|
135
136
|
default: 0
|
|
137
|
+
},
|
|
138
|
+
esign: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: false
|
|
136
141
|
}
|
|
137
142
|
},
|
|
138
143
|
data() {
|
|
@@ -147,8 +152,10 @@ export default {
|
|
|
147
152
|
opinion: undefined, // 审批意见
|
|
148
153
|
nodeId: undefined,
|
|
149
154
|
notificationMsg: undefined, //系统消息
|
|
150
|
-
notificationType: []
|
|
155
|
+
notificationType: [],
|
|
156
|
+
isImageOpinion: 0
|
|
151
157
|
},
|
|
158
|
+
file: '',
|
|
152
159
|
nextUserList: [],
|
|
153
160
|
isChooseNextNode: 0,
|
|
154
161
|
isOpinionRequired: 0, //办理意见是否必填
|
|
@@ -178,6 +185,8 @@ export default {
|
|
|
178
185
|
mounted() {
|
|
179
186
|
let obj = {
|
|
180
187
|
processDefinitionId: this.defId,
|
|
188
|
+
// isOnly: true,
|
|
189
|
+
// hideTempSave: true,
|
|
181
190
|
businessId: this.businessId
|
|
182
191
|
};
|
|
183
192
|
this.geAllData(obj);
|
|
@@ -225,10 +234,24 @@ export default {
|
|
|
225
234
|
},
|
|
226
235
|
// 意见回调
|
|
227
236
|
onInputOpintion(val) {
|
|
228
|
-
|
|
237
|
+
const { opinion, isImageOpinion, file } = val;
|
|
238
|
+
this.form.opinion = opinion;
|
|
239
|
+
this.form.isImageOpinion = isImageOpinion;
|
|
240
|
+
this.file = file;
|
|
229
241
|
},
|
|
230
242
|
// 提交流程
|
|
231
243
|
onSubmit() {
|
|
244
|
+
if (
|
|
245
|
+
(!this.form.opinion &&
|
|
246
|
+
this.isOpinionRequired == 1 &&
|
|
247
|
+
this.form.isImageOpinion == 0) ||
|
|
248
|
+
(!this.file &&
|
|
249
|
+
this.isOpinionRequired == 1 &&
|
|
250
|
+
this.form.isImageOpinion == 1)
|
|
251
|
+
) {
|
|
252
|
+
this.$toast('请选择输入审批意见');
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
232
255
|
if (!this.form.nextUserId) {
|
|
233
256
|
this.$toast('请选择办理人');
|
|
234
257
|
return;
|
|
@@ -237,10 +260,6 @@ export default {
|
|
|
237
260
|
this.$toast('请选择流程节点');
|
|
238
261
|
return;
|
|
239
262
|
}
|
|
240
|
-
if (!this.form.opinion && this.isOpinionRequired == 1) {
|
|
241
|
-
this.$toast('请选择输入审批意见');
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
263
|
// if (!this.form.notificationType) {
|
|
245
264
|
// this.$toast('请选择通知消息');
|
|
246
265
|
// return;
|
|
@@ -258,12 +277,23 @@ export default {
|
|
|
258
277
|
nodeId: this.form.nodeId,
|
|
259
278
|
userId: sessionStorage.getItem('userId'),
|
|
260
279
|
notificationMsg: this.form.notificationMsg,
|
|
261
|
-
loginType: 2 //登录方式
|
|
280
|
+
loginType: 2, //登录方式
|
|
281
|
+
isImageOpinion:this.form.isImageOpinion
|
|
262
282
|
};
|
|
263
283
|
if (this.beforeSubmit) {
|
|
264
284
|
this.beforeSubmit(info);
|
|
265
285
|
return;
|
|
266
286
|
}
|
|
287
|
+
let formData = new FormData();
|
|
288
|
+
if (this.form.isImageOpinion == 1) {
|
|
289
|
+
formData.append('file', this.file);
|
|
290
|
+
}
|
|
291
|
+
formData.append('pendingId', this.pendingId);
|
|
292
|
+
for (let key in info) {
|
|
293
|
+
if (info[key] !== '' && info[key] !== undefined) {
|
|
294
|
+
formData.append(key, info[key]);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
267
297
|
this.$toast.loading({
|
|
268
298
|
message: '加载中...',
|
|
269
299
|
forbidClick: true,
|
|
@@ -275,9 +305,7 @@ export default {
|
|
|
275
305
|
request({
|
|
276
306
|
url: _that.apiBaseUrl ? _that.apiBaseUrl + registerNew : registerNew,
|
|
277
307
|
type: 'post',
|
|
278
|
-
params:
|
|
279
|
-
...info
|
|
280
|
-
}
|
|
308
|
+
params: formData
|
|
281
309
|
}).then(res => {
|
|
282
310
|
this.$toast.clear();
|
|
283
311
|
if (res.rCode == 0) {
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
<div>{{ nodeName }}</div>
|
|
7
7
|
</div>
|
|
8
8
|
<Opinion
|
|
9
|
-
@onInputOpintion="
|
|
9
|
+
@onInputOpintion="onInputOpintion"
|
|
10
|
+
:esign="esign"
|
|
10
11
|
:baseUrl="baseUrl"
|
|
11
12
|
></Opinion>
|
|
12
13
|
<div class="input-box">
|
|
@@ -117,11 +118,17 @@ export default {
|
|
|
117
118
|
paddingTop: {
|
|
118
119
|
type: [String, Number],
|
|
119
120
|
default: 0
|
|
121
|
+
},
|
|
122
|
+
esign: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: false
|
|
120
125
|
}
|
|
121
126
|
},
|
|
122
127
|
data() {
|
|
123
128
|
return {
|
|
124
129
|
opinion: '', //办理意见
|
|
130
|
+
isImageOpinion:0,
|
|
131
|
+
file:'',
|
|
125
132
|
infoList: {
|
|
126
133
|
nextOtherOrgObj: [],
|
|
127
134
|
nextCurrentOrgObj: [],
|
|
@@ -184,6 +191,12 @@ export default {
|
|
|
184
191
|
}
|
|
185
192
|
},
|
|
186
193
|
methods: {
|
|
194
|
+
onInputOpintion(val) {
|
|
195
|
+
const { opinion, isImageOpinion, file } = val;
|
|
196
|
+
this.opinion = opinion;
|
|
197
|
+
this.isImageOpinion = isImageOpinion;
|
|
198
|
+
this.file = file;
|
|
199
|
+
},
|
|
187
200
|
getIsCanStartSubFlow() {
|
|
188
201
|
let params = {
|
|
189
202
|
url: isCanStartSubFlow,
|
|
@@ -401,6 +414,8 @@ export default {
|
|
|
401
414
|
noticeType,
|
|
402
415
|
noticeInfo
|
|
403
416
|
},
|
|
417
|
+
isImageOpinion,
|
|
418
|
+
file,
|
|
404
419
|
isOpinionRequired,
|
|
405
420
|
opinion,
|
|
406
421
|
type,
|
|
@@ -411,6 +426,9 @@ export default {
|
|
|
411
426
|
isSubFlow,
|
|
412
427
|
pendingId
|
|
413
428
|
} = this;
|
|
429
|
+
if ((isOpinionRequired == 1 && !opinion && isImageOpinion == 0) || (isOpinionRequired == 1 && isImageOpinion == 1 && !file) ) {
|
|
430
|
+
return this.$toast('当前步骤必须输入意见!');
|
|
431
|
+
}
|
|
414
432
|
if (
|
|
415
433
|
(type == 'takeAdvice' &&
|
|
416
434
|
(nextCurrentOrgObj == '' ||
|
|
@@ -425,9 +443,30 @@ export default {
|
|
|
425
443
|
) {
|
|
426
444
|
return this.$toast('请选择处理对象!');
|
|
427
445
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
446
|
+
let info = {
|
|
447
|
+
opinion,
|
|
448
|
+
pendingId,
|
|
449
|
+
nextOtherOrgObj: Array.isArray(nextOtherOrgObj)
|
|
450
|
+
? nextOtherOrgObj.join(',')
|
|
451
|
+
: nextOtherOrgObj,
|
|
452
|
+
nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
|
|
453
|
+
? nextCurrentOrgObj.join(',')
|
|
454
|
+
: nextCurrentOrgObj,
|
|
455
|
+
notificationMsg: noticeInfo,
|
|
456
|
+
notificationType: noticeType.join(','),
|
|
457
|
+
choiceDeptId,
|
|
458
|
+
isSubFlow,
|
|
459
|
+
choiceOrgId
|
|
460
|
+
}
|
|
461
|
+
let formData = new FormData();
|
|
462
|
+
if (isImageOpinion == 1) {
|
|
463
|
+
formData.append('file', file);
|
|
464
|
+
}
|
|
465
|
+
formData.append('pendingId', pendingId);
|
|
466
|
+
for (let key in info) {
|
|
467
|
+
if (info[key] !== '' && info[key] !== undefined) {
|
|
468
|
+
formData.append(key, info[key]);
|
|
469
|
+
}
|
|
431
470
|
}
|
|
432
471
|
// if (this.type != 'startDraf' && this.type != 'unionSeal' && this.type != 'twoOfficesDispatch')
|
|
433
472
|
// return this.$toast('暂未开放,敬请期待!');
|
|
@@ -442,21 +481,7 @@ export default {
|
|
|
442
481
|
: this.type == 'takeAdvice'
|
|
443
482
|
? taskTakeAdvice
|
|
444
483
|
: taskUnionExamine,
|
|
445
|
-
params:
|
|
446
|
-
opinion,
|
|
447
|
-
pendingId,
|
|
448
|
-
nextOtherOrgObj: Array.isArray(nextOtherOrgObj)
|
|
449
|
-
? nextOtherOrgObj.join(',')
|
|
450
|
-
: nextOtherOrgObj,
|
|
451
|
-
nextCurrentOrgObj: Array.isArray(nextCurrentOrgObj)
|
|
452
|
-
? nextCurrentOrgObj.join(',')
|
|
453
|
-
: nextCurrentOrgObj,
|
|
454
|
-
notificationMsg: noticeInfo,
|
|
455
|
-
notificationType: noticeType.join(','),
|
|
456
|
-
choiceDeptId,
|
|
457
|
-
isSubFlow,
|
|
458
|
-
choiceOrgId
|
|
459
|
-
},
|
|
484
|
+
params: formData,
|
|
460
485
|
headers: { Accept: 'application/json,text/plain' },
|
|
461
486
|
type: 'post'
|
|
462
487
|
};
|
|
@@ -508,7 +533,6 @@ export default {
|
|
|
508
533
|
pendingId: this.pendingId
|
|
509
534
|
}
|
|
510
535
|
}).then(res => {
|
|
511
|
-
console.log(res, 'res');
|
|
512
536
|
// const {
|
|
513
537
|
// status,
|
|
514
538
|
// message,
|