eoss-ui 0.8.35 → 0.8.37

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.
@@ -1,312 +1,323 @@
1
- <template>
2
- <div
3
- v-loading="loading"
4
- class="es-flow-form"
5
- element-loading-text="加载中..."
6
- element-loading-spinner="el-icon-loading"
7
- element-loading-background="rgba(255, 255,255, 0.8)"
8
- >
9
- <el-form
10
- ref="nextNode"
11
- :model="nextNode"
12
- class="demo-dynamic"
13
- label-width="100px"
14
- label-align="left"
15
- >
16
- <div :style="`max-height: 290px; overflow-y: ${hideBtn?'unset' : 'auto'}; margin-bottom: 10px`">
17
- <el-form-item prop="nodeName" label="当前节点`">
18
- <el-input v-model="nodeName" disabled />
19
- </el-form-item>
20
- <el-form-item
21
- prop="nextNodeId"
22
- label="驳回对象"
23
- :rules="[
24
- { required: true, message: `请选择驳回对象`, trigger: 'blur' }
25
- ]"
26
- >
27
- <el-radio-group
28
- v-model="nextNode.nextNodeId"
29
- v-if="rejectObj.length != 0"
30
- >
31
- <el-radio v-for="item of rejectObj" :key="item.id" :label="item.id">
32
- {{ item.name }}
33
- </el-radio>
34
- </el-radio-group>
35
- <span v-else>暂无可驳回节点及对象</span>
36
- </el-form-item>
37
- <!-- :rules="[
38
- { required: false, message: `请选择通知方式`, trigger: 'blur' }
39
- ]" -->
40
- <el-form-item
41
- prop="noticeType"
42
- label="通知方式"
43
- v-show="nextNode.noticeList.length != 0 && rejectObj.length != 0 && !hideMessage"
44
- >
45
- <el-checkbox-group v-model="nextNode.noticeType">
46
- <el-checkbox
47
- v-for="item of nextNode.noticeList"
48
- :key="item.cciValue"
49
- :label="item.cciValue"
50
- :disabled="
51
- readOnlyNotificationType
52
- ? readOnlyNotificationType.indexOf(item.cciValue) != -1
53
- : false
54
- "
55
- >
56
- {{ item.shortName }}
57
- </el-checkbox>
58
- </el-checkbox-group>
59
- </el-form-item>
60
- <el-form-item
61
- v-show="nextNode.noticeType.length != 0"
62
- prop="nextNode"
63
- label="通知消息"
64
- >
65
- <!-- <span>{{ newsInfo }}</span> -->
66
- <es-input
67
- type="textarea"
68
- :rows="4"
69
- placeholder="请输入内容"
70
- v-model="newsInformation"
71
- :readonly="notificationMessageReadOnly"
72
- >
73
- </es-input>
74
- </el-form-item>
75
- </div>
76
- <!-- size="small" -->
77
- <el-form-item v-if="!hideBtn">
78
- <div style="text-align: right">
79
- <el-button
80
- :type="rejectObj.length == 0 ? '' : 'primary'"
81
- @click="subProcess('nextNode', rejectObj.length == 0)"
82
- >
83
- {{ rejectObj.length == 0 ? '取消' : '提交' }}
84
- </el-button>
85
- </div>
86
- </el-form-item>
87
- </el-form>
88
- <!-- <el-dialog title="下步处理对象" :visible.sync="show" width="60%">
89
- <div>123</div>
90
- </el-dialog> -->
91
- </div>
92
- </template>
93
-
94
- <script>
95
- import {
96
- findSysCodes,
97
- taskRejectHtml,
98
- findCodeValues,
99
- toTaskRejectHtml
100
- } from 'eoss-ui/src/config/api';
101
- import util from 'eoss-ui/src/utils/util';
102
- export default {
103
- name: 'ProcessReject',
104
- props: {
105
- pendingId: { type: String, default: '' },
106
- newsInfo: { type: String, default: '' },
107
- showReject: { type: Boolean },
108
- option: { type: String, default: '' },
109
- hideBtn: { type: Boolean, default: false },
110
- simpleTips: { type: Boolean, default: true },
111
- hideMessage: { type: Boolean, default: false },
112
- },
113
- data() {
114
- return {
115
- loading: false,
116
- notificationMessageReadOnly: false,
117
- readOnlyNotificationType: '',
118
- nextNode: {
119
- noticeType: [],
120
- opinion: undefined, // 审批意见
121
- notificationMsg: undefined, // 系统消息
122
- nextNodeId: undefined,
123
- noticeList: []
124
- },
125
- showMsg: false, // 判断是否显示系统消息
126
- showOpinion: false, // 常用意见弹框
127
- nodeName: '',
128
- isOpinionRequired: 0, // 意见是否必填
129
- rejectObj: [], //
130
- isHiddenOftenOpinion: undefined, // 是否隐藏常用意见
131
- nodeDefaultRejectOpinion: undefined, // 默认提交意见
132
- checked: true, // 系统消息是否选中
133
- defaultNotificationType: undefined, // /默认选中通知类型
134
- newsInformation: '' //系统消息
135
- };
136
- },
137
- watch: {
138
- showReject(val) {
139
- if (val) {
140
- this.getProcessReject();
141
- }
142
- }
143
- },
144
- mounted() {
145
- this.newsInformation = this.newsInfo;
146
- this.getNodeType();
147
- this.getProcessReject();
148
- },
149
- methods: {
150
- getNodeType() {
151
- util
152
- .ajax({
153
- url: findCodeValues,
154
- params: {
155
- ccCode: 'notification_type',
156
- userId: util.getStorage('userId'),
157
- pendingId: this.pendingId
158
- }
159
- })
160
- .then((res) => {
161
- const { status, data } = res;
162
- if (status === 'success') {
163
- this.nextNode.noticeList = data;
164
- }
165
- this.getFind();
166
- })
167
- .catch((err) => {
168
- this.loading = false;
169
- if (err.message && err.message !== 'canceled') {
170
- this.$message.error(err.message);
171
- }
172
- });
173
- },
174
- // 提交表单
175
- subProcess(formName, isNoObj) {
176
- if (isNoObj) {
177
- this.quit(false);
178
- return;
179
- }
180
- this.saveProcess(formName);
181
- },
182
- saveProcess(formName) {
183
- this.$refs[formName].validate((valid) => {
184
- if (valid) {
185
- if (!this.option && this.isOpinionRequired === 1) {
186
- this.$message.warning('请选择输入审批意见');
187
- return;
188
- }
189
- this.loading = true;
190
- let noticeType = this.nextNode.noticeType.join(',');
191
- let params = {
192
- pendingId: this.pendingId,
193
- opinion: this.option, // 审批意见
194
- notificationMsg: this.newsInformation, // 系统消息
195
- notificationType: noticeType,
196
- userId: util.getStorage('userId'),
197
- nextNodeId: this.nextNode.nextNodeId
198
- };
199
- util
200
- .ajax({ url: taskRejectHtml, method: 'post', data: params })
201
- .then((res) => {
202
- const { status, message } = res;
203
- this.loading = false;
204
- if (status === 'success') {
205
- this.quit(true);
206
- this.simpleTips && this.$message.success('操作成功');
207
- } else {
208
- this.$message.error(message || '系统错误,请联系管理员!');
209
- this.quit(false);
210
- }
211
- })
212
- .catch((err) => {
213
- this.loading = false;
214
- if (err.message && err.message !== 'canceled') {
215
- this.$message.error(err.message);
216
- }
217
- });
218
- } else {
219
- return false;
220
- }
221
- });
222
- },
223
- // 取消
224
- quit(val) {
225
- this.$emit('cancel', val);
226
- },
227
- getFind() {
228
- util
229
- .ajax({
230
- url: findSysCodes
231
- })
232
- .then((res) => {
233
- const { status, message } = res;
234
- if (status === 'success') {
235
- if(this.hideMessage) return;
236
- this.nextNode.noticeType = message.split(',');
237
- let arr = [];
238
- this.nextNode.noticeList.map((item) => {
239
- this.nextNode.noticeType.map((x) => {
240
- if (x == item.cciValue) {
241
- arr.push(x);
242
- }
243
- });
244
- });
245
- this.nextNode.noticeType = arr;
246
- }
247
- })
248
- .catch((err) => {
249
- this.loading = false;
250
- if (err.message && err.message !== 'canceled') {
251
- this.$message.error(err.message);
252
- }
253
- });
254
- },
255
- getProcessReject() {
256
- this.loading = true;
257
- let params = {
258
- pendingId: this.pendingId,
259
- isSinglePage: false,
260
- opinion: this.option
261
- };
262
- util
263
- .ajax({ url: toTaskRejectHtml, params })
264
- .then((res) => {
265
- this.loading = false;
266
- if (res.status === 'success') {
267
- const {
268
- data: {
269
- rejectTaskNodes,
270
- taskExamine,
271
- nodeInfoMap,
272
- notificationMessageReadOnly,
273
- readOnlyNotificationType
274
- }
275
- } = res;
276
- this.isOpinionRequired = nodeInfoMap.nodeExtAttr.isOpinionRequired;
277
- this.readOnlyNotificationType = readOnlyNotificationType;
278
- this.notificationMessageReadOnly =
279
- notificationMessageReadOnly == 'true';
280
- if (!this.isOpinionRequired) {
281
- this.isOpinionRequired = 0;
282
- }
283
- let list = [];
284
- if (rejectTaskNodes) {
285
- for (let i in rejectTaskNodes) {
286
- let obj = {
287
- id: i,
288
- name: rejectTaskNodes[i]
289
- };
290
- list.push(obj);
291
- }
292
- this.nodeName = taskExamine.nodeName;
293
- this.rejectObj = list;
294
- this.rejectObj.length != 0 &&
295
- (this.nextNode.nextNodeId = this.rejectObj[0].id);
296
- }
297
- } else {
298
- this.$message.error(res.message || '系统错误,请联系管理员!');
299
- this.quit(false);
300
- }
301
- })
302
- .catch((err) => {
303
- this.loading = false;
304
- if (err.message && err.message !== 'canceled') {
305
- this.$message.error(err.message);
306
- }
307
- });
308
-
309
- }
310
- }
311
- };
312
- </script>
1
+ <template>
2
+ <div
3
+ v-loading="loading"
4
+ class="es-flow-form"
5
+ element-loading-text="加载中..."
6
+ element-loading-spinner="el-icon-loading"
7
+ element-loading-background="rgba(255, 255,255, 0.8)"
8
+ >
9
+ <el-form
10
+ ref="nextNode"
11
+ :model="nextNode"
12
+ class="demo-dynamic"
13
+ label-width="100px"
14
+ label-align="left"
15
+ >
16
+ <div :style="`max-height: 290px; overflow-y: ${hideBtn?'unset' : 'auto'}; margin-bottom: 10px`">
17
+ <el-form-item prop="nodeName" label="当前节点`">
18
+ <el-input v-model="nodeName" disabled />
19
+ </el-form-item>
20
+ <el-form-item
21
+ prop="nextNodeId"
22
+ label="驳回对象"
23
+ :rules="[
24
+ { required: true, message: `请选择驳回对象`, trigger: 'blur' }
25
+ ]"
26
+ >
27
+ <el-radio-group
28
+ v-model="nextNode.nextNodeId"
29
+ v-if="rejectObj.length != 0"
30
+ >
31
+ <el-radio v-for="item of rejectObj" :key="item.id" :label="item.id">
32
+ {{ item.name }}
33
+ </el-radio>
34
+ </el-radio-group>
35
+ <span v-else>暂无可驳回节点及对象</span>
36
+ </el-form-item>
37
+ <!-- :rules="[
38
+ { required: false, message: `请选择通知方式`, trigger: 'blur' }
39
+ ]" -->
40
+ <el-form-item
41
+ prop="noticeType"
42
+ label="通知方式"
43
+ v-show="nextNode.noticeList.length != 0 && rejectObj.length != 0 && !hideMessage"
44
+ >
45
+ <el-checkbox-group v-model="nextNode.noticeType">
46
+ <el-checkbox
47
+ v-for="item of nextNode.noticeList"
48
+ :key="item.cciValue"
49
+ :label="item.cciValue"
50
+ :disabled="
51
+ readOnlyNotificationType
52
+ ? readOnlyNotificationType.indexOf(item.cciValue) != -1
53
+ : false
54
+ "
55
+ >
56
+ {{ item.shortName }}
57
+ </el-checkbox>
58
+ </el-checkbox-group>
59
+ </el-form-item>
60
+ <el-form-item
61
+ v-show="nextNode.noticeType.length != 0"
62
+ prop="nextNode"
63
+ label="通知消息"
64
+ >
65
+ <!-- <span>{{ newsInfo }}</span> -->
66
+ <es-input
67
+ type="textarea"
68
+ :rows="4"
69
+ placeholder="请输入内容"
70
+ v-model="newsInformation"
71
+ :readonly="notificationMessageReadOnly"
72
+ >
73
+ </es-input>
74
+ </el-form-item>
75
+ </div>
76
+ <!-- size="small" -->
77
+ <el-form-item v-if="!hideBtn">
78
+ <div style="text-align: right">
79
+ <el-button
80
+ :type="rejectObj.length == 0 ? '' : 'primary'"
81
+ @click="subProcess('nextNode', rejectObj.length == 0)"
82
+ >
83
+ {{ rejectObj.length == 0 ? '取消' : '提交' }}
84
+ </el-button>
85
+ </div>
86
+ </el-form-item>
87
+ </el-form>
88
+ <!-- <el-dialog title="下步处理对象" :visible.sync="show" width="60%">
89
+ <div>123</div>
90
+ </el-dialog> -->
91
+ </div>
92
+ </template>
93
+
94
+ <script>
95
+ import {
96
+ findSysCodes,
97
+ taskRejectHtml,
98
+ findCodeValues,
99
+ toTaskRejectHtml
100
+ } from 'eoss-ui/src/config/api';
101
+ import util from 'eoss-ui/src/utils/util';
102
+ export default {
103
+ name: 'ProcessReject',
104
+ props: {
105
+ pendingId: { type: String, default: '' },
106
+ newsInfo: { type: String, default: '' },
107
+ showReject: { type: Boolean },
108
+ option: { type: String, default: '' },
109
+ hideBtn: { type: Boolean, default: false },
110
+ simpleTips: { type: Boolean, default: true },
111
+ hideMessage: { type: Boolean, default: false },
112
+ isCancelSecondConfirmationType: { type: Boolean, default: false }
113
+ },
114
+ data() {
115
+ return {
116
+ loading: false,
117
+ notificationMessageReadOnly: false,
118
+ readOnlyNotificationType: '',
119
+ nextNode: {
120
+ noticeType: [],
121
+ opinion: undefined, // 审批意见
122
+ notificationMsg: undefined, // 系统消息
123
+ nextNodeId: undefined,
124
+ noticeList: []
125
+ },
126
+ showMsg: false, // 判断是否显示系统消息
127
+ showOpinion: false, // 常用意见弹框
128
+ nodeName: '',
129
+ isOpinionRequired: 0, // 意见是否必填
130
+ rejectObj: [], //
131
+ isHiddenOftenOpinion: undefined, // 是否隐藏常用意见
132
+ nodeDefaultRejectOpinion: undefined, // 默认提交意见
133
+ checked: true, // 系统消息是否选中
134
+ defaultNotificationType: undefined, // /默认选中通知类型
135
+ newsInformation: '' //系统消息
136
+ };
137
+ },
138
+ watch: {
139
+ showReject(val) {
140
+ if (val) {
141
+ this.getProcessReject();
142
+ }
143
+ }
144
+ },
145
+ mounted() {
146
+ this.newsInformation = this.newsInfo;
147
+ this.getNodeType();
148
+ this.getProcessReject();
149
+ },
150
+ methods: {
151
+ getNodeType() {
152
+ util
153
+ .ajax({
154
+ url: findCodeValues,
155
+ params: {
156
+ ccCode: 'notification_type',
157
+ userId: util.getStorage('userId'),
158
+ pendingId: this.pendingId
159
+ }
160
+ })
161
+ .then((res) => {
162
+ const { status, data } = res;
163
+ if (status === 'success') {
164
+ this.nextNode.noticeList = data;
165
+ }
166
+ this.getFind();
167
+ })
168
+ .catch((err) => {
169
+ this.loading = false;
170
+ if (err.message && err.message !== 'canceled') {
171
+ this.$message.error(err.message);
172
+ }
173
+ });
174
+ },
175
+ // 提交表单
176
+ subProcess(formName, isNoObj) {
177
+ if (isNoObj) {
178
+ this.quit(false);
179
+ return;
180
+ }
181
+ if (this.isCancelSecondConfirmationType) {
182
+ this.$confirm('确认提交吗?', '提示', {
183
+ confirmButtonText: '确定',
184
+ cancelButtonText: '取消',
185
+ type: 'warning'
186
+ }).then(() => {
187
+ this.saveProcess(formName);
188
+ }).catch(() => {})
189
+ }else{
190
+ this.saveProcess(formName);
191
+ }
192
+ },
193
+ saveProcess(formName) {
194
+ this.$refs[formName].validate((valid) => {
195
+ if (valid) {
196
+ if (!this.option && this.isOpinionRequired === 1) {
197
+ this.$message.warning('请选择输入审批意见');
198
+ return;
199
+ }
200
+ this.loading = true;
201
+ let noticeType = this.nextNode.noticeType.join(',');
202
+ let params = {
203
+ pendingId: this.pendingId,
204
+ opinion: this.option, // 审批意见
205
+ notificationMsg: this.newsInformation, // 系统消息
206
+ notificationType: noticeType,
207
+ userId: util.getStorage('userId'),
208
+ nextNodeId: this.nextNode.nextNodeId
209
+ };
210
+ util
211
+ .ajax({ url: taskRejectHtml, method: 'post', data: params })
212
+ .then((res) => {
213
+ const { status, message } = res;
214
+ this.loading = false;
215
+ if (status === 'success') {
216
+ this.quit(true);
217
+ this.simpleTips && this.$message.success('操作成功');
218
+ } else {
219
+ this.$message.error(message || '系统错误,请联系管理员!');
220
+ this.quit(false);
221
+ }
222
+ })
223
+ .catch((err) => {
224
+ this.loading = false;
225
+ if (err.message && err.message !== 'canceled') {
226
+ this.$message.error(err.message);
227
+ }
228
+ });
229
+ } else {
230
+ return false;
231
+ }
232
+ });
233
+ },
234
+ // 取消
235
+ quit(val) {
236
+ this.$emit('cancel', val);
237
+ },
238
+ getFind() {
239
+ util
240
+ .ajax({
241
+ url: findSysCodes
242
+ })
243
+ .then((res) => {
244
+ const { status, message } = res;
245
+ if (status === 'success') {
246
+ if(this.hideMessage) return;
247
+ this.nextNode.noticeType = message.split(',');
248
+ let arr = [];
249
+ this.nextNode.noticeList.map((item) => {
250
+ this.nextNode.noticeType.map((x) => {
251
+ if (x == item.cciValue) {
252
+ arr.push(x);
253
+ }
254
+ });
255
+ });
256
+ this.nextNode.noticeType = arr;
257
+ }
258
+ })
259
+ .catch((err) => {
260
+ this.loading = false;
261
+ if (err.message && err.message !== 'canceled') {
262
+ this.$message.error(err.message);
263
+ }
264
+ });
265
+ },
266
+ getProcessReject() {
267
+ this.loading = true;
268
+ let params = {
269
+ pendingId: this.pendingId,
270
+ isSinglePage: false,
271
+ opinion: this.option
272
+ };
273
+ util
274
+ .ajax({ url: toTaskRejectHtml, params })
275
+ .then((res) => {
276
+ this.loading = false;
277
+ if (res.status === 'success') {
278
+ const {
279
+ data: {
280
+ rejectTaskNodes,
281
+ taskExamine,
282
+ nodeInfoMap,
283
+ notificationMessageReadOnly,
284
+ readOnlyNotificationType
285
+ }
286
+ } = res;
287
+ this.isOpinionRequired = nodeInfoMap.nodeExtAttr.isOpinionRequired;
288
+ this.readOnlyNotificationType = readOnlyNotificationType;
289
+ this.notificationMessageReadOnly =
290
+ notificationMessageReadOnly == 'true';
291
+ if (!this.isOpinionRequired) {
292
+ this.isOpinionRequired = 0;
293
+ }
294
+ let list = [];
295
+ if (rejectTaskNodes) {
296
+ for (let i in rejectTaskNodes) {
297
+ let obj = {
298
+ id: i,
299
+ name: rejectTaskNodes[i]
300
+ };
301
+ list.push(obj);
302
+ }
303
+ this.nodeName = taskExamine.nodeName;
304
+ this.rejectObj = list;
305
+ this.rejectObj.length != 0 &&
306
+ (this.nextNode.nextNodeId = this.rejectObj[0].id);
307
+ }
308
+ } else {
309
+ this.$message.error(res.message || '系统错误,请联系管理员!');
310
+ this.quit(false);
311
+ }
312
+ })
313
+ .catch((err) => {
314
+ this.loading = false;
315
+ if (err.message && err.message !== 'canceled') {
316
+ this.$message.error(err.message);
317
+ }
318
+ });
319
+
320
+ }
321
+ }
322
+ };
323
+ </script>
@@ -68,6 +68,7 @@
68
68
  :types="types"
69
69
  :tabs="tabs"
70
70
  :title="title"
71
+ :showFilterListDep="false"
71
72
  reset
72
73
  :classify="classify"
73
74
  :collapse-tags="selectorTags"
@@ -287,7 +288,7 @@ export default {
287
288
  this.classify =
288
289
  util.getStorage('classify') != undefined
289
290
  ? util.getStorage('classify')
290
- : true;
291
+ : false;
291
292
  },
292
293
 
293
294
  methods: {