@lambo-design/workflow-approve 1.0.0-beta.96 → 1.0.0-beta.98

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/workflow-approve",
3
- "version": "1.0.0-beta.96",
3
+ "version": "1.0.0-beta.98",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -12,8 +12,8 @@
12
12
  "devDependencies": {
13
13
  "axios": "^0.24.0",
14
14
  "axios-cache-plugin": "^0.1.0",
15
- "@lambo-design/core": "^4.7.1-beta.169",
16
- "@lambo-design/shared": "^1.0.0-beta.298"
15
+ "@lambo-design/core": "^4.7.1-beta.170",
16
+ "@lambo-design/shared": "^1.0.0-beta.299"
17
17
  },
18
18
  "dependencies": {
19
19
  "bpmn-js": "^7.3.1",
@@ -11,7 +11,7 @@
11
11
  </div>
12
12
  </div>
13
13
  <div class="org-detil">
14
- <LamboPagingTable ref="selection" highlight-row :data="tableData" :dataUrl="dataUrl" :columns="tableColumn" :searchParams="tableSearchParams"
14
+ <LamboPagingTable :key="useTransferRangeUsers" ref="selection" highlight-row :data="tableData" :dataUrl="dataUrl" :columns="tableColumn" :searchParams="tableSearchParams" :height="tableHeight"
15
15
  @on-selection-change="onSelectionChange" @on-current-change="onCurrentChange" :page-disable="useTransferRangeUsers" :showTableOption="!useTransferRangeUsers">
16
16
  <div slot="search" v-if="!useTransferRangeUsers">
17
17
  <Form :label-width="60">
@@ -85,6 +85,12 @@ export default {
85
85
  type: String,
86
86
  default: '/api/upms-server',
87
87
  },
88
+ //是否展示操作按钮二次弹框
89
+ showConfirmBox: {
90
+ type: Boolean,
91
+ required: false,
92
+ default: false
93
+ },
88
94
  },
89
95
  data() {
90
96
  return {
@@ -135,7 +141,9 @@ export default {
135
141
  this.getSystemConfig()
136
142
  },
137
143
  computed: {
138
-
144
+ tableHeight(){
145
+ return this.useTransferRangeUsers ? 600 : 0
146
+ },
139
147
  tableColumn () {
140
148
  let columns = []
141
149
  let self = this
@@ -162,7 +170,7 @@ export default {
162
170
  sortable: 'custom'
163
171
  })
164
172
 
165
- if (self.useTransferRangeUsers){
173
+ if (self.useTransferRangeUsers && self.ucAdapterType == 'x1'){
166
174
  columns.push({
167
175
  title: '联系电话',
168
176
  key: 'tel',
@@ -176,30 +184,33 @@ export default {
176
184
  sortField: 'organ_name',
177
185
  sortable: 'custom'
178
186
  })
179
- if (self.useTransferRangeUsers){
187
+ if (self.useTransferRangeUsers && self.ucAdapterType == 'x1'){
180
188
  columns.push({
181
189
  title: '公司名称',
182
190
  key: 'comName',
183
191
  sortField: 'com_name',
184
192
  sortable: 'custom'
185
193
  })
186
- } else {
187
- columns.push({
188
- title: '状态',
189
- key: 'status',
190
- sortable: 'custom',
191
- align: 'center',
192
- width: 100,
193
- render: function (h, param) {
194
- let state = param.row.status
195
- if (state === '00') {
196
- state = '正常'
197
- } else {
198
- state = '锁定'
194
+ }
195
+ if (!self.useTransferRangeUsers){
196
+ {
197
+ columns.push({
198
+ title: '状态',
199
+ key: 'status',
200
+ sortable: 'custom',
201
+ align: 'center',
202
+ width: 100,
203
+ render: function (h, param) {
204
+ let state = param.row.status
205
+ if (state === '00') {
206
+ state = '正常'
207
+ } else {
208
+ state = '锁定'
209
+ }
210
+ return h('span', state)
199
211
  }
200
- return h('span', state)
201
- }
202
- })
212
+ })
213
+ }
203
214
  }
204
215
 
205
216
  return columns
@@ -309,23 +320,19 @@ export default {
309
320
  code: self.data.auditResult,
310
321
  name: self.data.auditResultName,
311
322
  }
312
- self.data.selectedUserId=idSelectedArr[0];
313
- let url = this.smartFlowServerContext + '/manage/processTodo/audit'
314
- ajax.post(url, self.data).then(function (resp) {
315
- let result = resp.data
316
- if (result.code == '200') {
317
- self.loading = false
318
- self.$Message.success(result.message);
319
- if (self.executionCompleted) {
320
- self.executionCompleted(true, self.data.instanceId, self.data.taskId, auditResult, self.data.taskId);
321
- }
322
- self.toBeDoneListDoSearch();
323
- } else {
323
+ if (!self.showConfirmBox){
324
+ self.execute(auditResult)
325
+ return;
326
+ }
327
+ self.$Modal.confirm({
328
+ title: '提示',
329
+ content: '确定要' + auditResult.name + '吗?',
330
+ onOk: () => {
331
+ self.execute(auditResult)
332
+ },
333
+ onCancel: () => {
324
334
  self.loading = false
325
- self.$Message.error(result.message)
326
- if (self.executionCompleted) {
327
- self.executionCompleted(false, null, null, auditResult, self.data.taskId);
328
- }
335
+ self.disable = false
329
336
  }
330
337
  })
331
338
  } else if (self.helpBoxType === 'delegateTask'){
@@ -337,7 +344,28 @@ export default {
337
344
  }
338
345
  this.modalBoxShow = false;
339
346
  },
340
-
347
+ execute(auditResult){
348
+ const self = this
349
+ self.data.selectedUserId=idSelectedArr[0];
350
+ let url = this.smartFlowServerContext + '/manage/processTodo/audit'
351
+ ajax.post(url, self.data).then(function (resp) {
352
+ let result = resp.data
353
+ if (result.code == '200') {
354
+ self.loading = false
355
+ self.$Message.success(result.message);
356
+ if (self.executionCompleted) {
357
+ self.executionCompleted(true, self.data.instanceId, self.data.taskId, auditResult, self.data.taskId);
358
+ }
359
+ self.toBeDoneListDoSearch();
360
+ } else {
361
+ self.loading = false
362
+ self.$Message.error(result.message)
363
+ if (self.executionCompleted) {
364
+ self.executionCompleted(false, null, null, auditResult, self.data.taskId);
365
+ }
366
+ }
367
+ })
368
+ },
341
369
  doSearch: function () {
342
370
  this.tableSearchParams = Object.assign({}, this.form)
343
371
  },
@@ -381,7 +381,7 @@ export default {
381
381
  allGroupKeys: [],
382
382
  displayedList: [],
383
383
  arrowShow: true, // 控制加载更多按钮的显示
384
- activeName: 'panel0',
384
+ activeName: '',
385
385
  modalDocx: false,
386
386
  setModals: {
387
387
  modals: []
@@ -513,6 +513,7 @@ export default {
513
513
 
514
514
  return groupedRecords;
515
515
  } else {
516
+ this.activeName = ''
516
517
  // 按节点分组:保持原有的节点分组结构
517
518
  return this.itemList;
518
519
  }
@@ -1,224 +1,224 @@
1
- <template>
2
- <div>
3
- <Row>
4
- <Row>
5
- <span v-for="(item, index) in attachmentdata" :key="index" style="font-size: 14px">
6
- <span v-if="index>0">、</span>
7
- <span style="color:#2D8cF0 "> {{ item.fileName }}</span>
8
- <a @click="forRemoveAttachment(index)" style="font-size: 13px;">.删除</a>
9
- </span>
10
- <div>
11
- <div slot="buttons">
12
- <Upload :action="actionUrl" :on-error="handleError" :before-upload="handleUpload" :show-upload-list="false"
13
- multiple
14
- :on-success="handleSuccess" :on-progress="handleProgress"
15
- :on-format-error="handleFormatError"
16
- :format="['xlsx', 'xls','txt','rar','zip','doc','docx','jpg','pdf','gif','png']">
17
- <Button :loading="loading" icon="ios-arrow-round-up" type="primary"
18
- style="color: #808080;border-color:#e0e0e0;" ghost>添加附件
19
- </Button>
20
- </Upload>
21
- </div>
22
- </div>
23
- </Row>
24
- <Row style="margin-top: 10px">
25
- <span style="color: red;font-size: 14px">* 支持扩展名: .rar .zip .doc .docx .pdf .jpg...</span>
26
- </Row>
27
- </Row>
28
- </div>
29
- </template>
30
-
31
- <script>
32
-
33
-
34
- export default {
35
- name: "attachment",
36
- components: {},
37
- props: {
38
- actionUrl: {
39
- default: "/api/oss-server/file/put",
40
- },
41
- attachmentdata: {
42
- type: Array,
43
- default: function () {
44
- return []
45
- }
46
- },
47
- attachmentColumn: {
48
- default: function () {
49
- let column = [
50
- {title: "序号", type: 'index', width: 80, align: "center"},
51
- {
52
- title: "相关附件", key: "fileName", minWidth: 200, align: 'left', tooltip: true,
53
- render: (h, {row}) => {
54
- return h("a", {
55
- on: {
56
- 'click': () => {
57
- let reg = /\.(gif|jpg|jpeg|bmp|png)$/
58
- let regs = /\.pdf$/
59
- if (reg.test(row.fileName)) {
60
- let imgs = [];
61
- let url = this.ossServerContext + "/file/get/" + row.fileId;
62
- this.imgPreview(url);
63
- } else if (regs.test(row.fileName)) {
64
- window.open(this.ossServerContext + "/file/getFileStream?fileId=" + row.fileId, "_blank");
65
- } else {
66
- window.open(this.ossServerContext + "/file/get/" + row.fileId, "_blank");
67
- }
68
- }
69
- }
70
- }, row.fileName);
71
- }
72
- },
73
- {
74
- title: "操作", width: 80, align: "center",
75
- render: (h, {index}) => {
76
- return h('div', [
77
- h('Button', {
78
- props: {
79
- type: 'warning',
80
- size: 'small',
81
- ghost: true
82
- },
83
- on: {
84
- click: () => {
85
- this.forRemoveAttachment(index)
86
- }
87
- }
88
- }, '删除')
89
- ]);
90
- }
91
- }
92
- ];
93
- return column
94
- }
95
- },
96
- },
97
- data() {
98
- return {
99
- loading: false,
100
- modalImg: false,
101
- image: "",
102
- tempFileArr: [],
103
- percentage: null,
104
- file_name: '',
105
- fileList: [],
106
- }
107
- },
108
- methods: {
109
- openAttachment(item) {
110
- let reg = /\.(gif|jpg|jpeg|bmp|png)$/;
111
- let regs = /\.pdf$/;
112
-
113
- if (reg.test(item.fileName)) {
114
- let imgs = [];
115
- let url = this.ossServerContext + "/file/get/" + item.fileId;
116
- this.imgPreview(url);
117
- } else if (regs.test(item.fileName)) {
118
- window.open(this.ossServerContext + "/file/getFileStream?fileId=" + item.fileId, "_blank");
119
- } else {
120
- window.open(this.ossServerContext + "/file/get/" + item.fileId, "_blank");
121
- }
122
- },
123
- handleSuccess: function (response, file, fileList) {
124
- let self = this;
125
- let tempArr = JSON.parse(JSON.stringify(this.tempFileArr))
126
-
127
- tempArr.forEach(function (value, index, array) {
128
- if (value == file.name) {
129
- self.tempFileArr.splice(index, 1)
130
- }
131
- });
132
-
133
- if (response.code == 1 && self.tempFileArr && self.tempFileArr.length < 1) {
134
- self.loading = false;
135
- self.$Message.success("上传成功");
136
- }
137
-
138
- if (response.code == 1) {
139
- if (response.data != undefined && response.data != null && response.data.length > 0) {
140
- let tempData = [].concat(response.data);
141
- this.attachmentdata.push({
142
- fileName: tempData[0].originalName,
143
- fileId: tempData[0].fileName,
144
- });
145
- }
146
-
147
- this.fileList = fileList
148
-
149
- } else {
150
- self.loading = false;
151
- this.$Message.error({
152
- content: file.name + '上传失败!',
153
- });
154
- //this.$Message.error("上传失败!");
155
-
156
- let j = 0;
157
- for (let i = 0; i < fileList.length; i++) {
158
- if (fileList[i].canceled) {
159
- continue;
160
- }
161
- if (fileList[i].name === file.name && fileList[i].timestamp === file.timestamp) {
162
- j = i;
163
- }
164
- }
165
-
166
- //console.log(fileList)
167
- fileList.splice(j, 1);
168
-
169
- }
170
-
171
- },
172
- handleError: function (error, file, fileList) {
173
- this.loading = false
174
- this.$Message.error({
175
- content: fileList.name + ' 上传失败!',
176
- });
177
- },
178
- handleUpload: function (file) {
179
- if (!file.canceled) {
180
- this.tempFileArr.push(file.name)
181
- }
182
- },
183
- forRemoveAttachment: function (index) {
184
- this.attachmentdata.splice(index, 1);
185
- this.$refs.attachmentTable.tableRefresh()
186
- },
187
- //查看附件
188
- imgPreview: function (img) {
189
- this.modalImg = true
190
- this.image = img;
191
- },
192
- //查看附件
193
- cancelUpload: function (item, fileList) {
194
- item.showProgress = false;
195
- item.canceled = true;
196
- },
197
- handleProgress(event, file, fileList) {
198
- this.loading = true
199
-
200
-
201
- },
202
- handleFormatError(file) {
203
- this.loading = false
204
- this.$Notice.warning({
205
- title: "文件格式不正确",
206
- desc: "文件 " + file.name + " 格式不支持,请上传其他格式的文件。",
207
- });
208
- },
209
-
210
- }
211
- }
212
- </script>
213
-
214
- <style scoped>
215
- .demo-spin-icon-load {
216
- animation: ani-demo-spin 1s linear infinite;
217
- }
218
-
219
- /deep/ .ivu-icon {
220
- zoom: 130%;
221
- color: #808080;
222
- margin-right: -1px;
223
- }
224
- </style>
1
+ <template>
2
+ <div>
3
+ <Row>
4
+ <Row>
5
+ <span v-for="(item, index) in attachmentdata" :key="index" style="font-size: 14px">
6
+ <span v-if="index>0">、</span>
7
+ <span style="color:#2D8cF0 "> {{ item.fileName }}</span>
8
+ <a @click="forRemoveAttachment(index)" style="font-size: 13px;">.删除</a>
9
+ </span>
10
+ <div>
11
+ <div slot="buttons">
12
+ <Upload :action="actionUrl" :on-error="handleError" :before-upload="handleUpload" :show-upload-list="false"
13
+ multiple
14
+ :on-success="handleSuccess" :on-progress="handleProgress"
15
+ :on-format-error="handleFormatError"
16
+ :format="['xlsx', 'xls','txt','rar','zip','doc','docx','jpg','pdf','gif','png']">
17
+ <Button :loading="loading" icon="ios-arrow-round-up" type="primary"
18
+ style="color: #808080;border-color:#e0e0e0;" ghost>添加附件
19
+ </Button>
20
+ </Upload>
21
+ </div>
22
+ </div>
23
+ </Row>
24
+ <Row style="margin-top: 10px">
25
+ <span style="color: red;font-size: 14px">* 支持扩展名: .rar .zip .doc .docx .pdf .jpg...</span>
26
+ </Row>
27
+ </Row>
28
+ </div>
29
+ </template>
30
+
31
+ <script>
32
+
33
+
34
+ export default {
35
+ name: "attachment",
36
+ components: {},
37
+ props: {
38
+ actionUrl: {
39
+ default: "/api/oss-server/file/put",
40
+ },
41
+ attachmentdata: {
42
+ type: Array,
43
+ default: function () {
44
+ return []
45
+ }
46
+ },
47
+ attachmentColumn: {
48
+ default: function () {
49
+ let column = [
50
+ {title: "序号", type: 'index', width: 80, align: "center"},
51
+ {
52
+ title: "相关附件", key: "fileName", minWidth: 200, align: 'left', tooltip: true,
53
+ render: (h, {row}) => {
54
+ return h("a", {
55
+ on: {
56
+ 'click': () => {
57
+ let reg = /\.(gif|jpg|jpeg|bmp|png)$/
58
+ let regs = /\.pdf$/
59
+ if (reg.test(row.fileName)) {
60
+ let imgs = [];
61
+ let url = this.ossServerContext + "/file/get/" + row.fileId;
62
+ this.imgPreview(url);
63
+ } else if (regs.test(row.fileName)) {
64
+ window.open(this.ossServerContext + "/file/getFileStream?fileId=" + row.fileId, "_blank");
65
+ } else {
66
+ window.open(this.ossServerContext + "/file/get/" + row.fileId, "_blank");
67
+ }
68
+ }
69
+ }
70
+ }, row.fileName);
71
+ }
72
+ },
73
+ {
74
+ title: "操作", width: 80, align: "center",
75
+ render: (h, {index}) => {
76
+ return h('div', [
77
+ h('Button', {
78
+ props: {
79
+ type: 'warning',
80
+ size: 'small',
81
+ ghost: true
82
+ },
83
+ on: {
84
+ click: () => {
85
+ this.forRemoveAttachment(index)
86
+ }
87
+ }
88
+ }, '删除')
89
+ ]);
90
+ }
91
+ }
92
+ ];
93
+ return column
94
+ }
95
+ },
96
+ },
97
+ data() {
98
+ return {
99
+ loading: false,
100
+ modalImg: false,
101
+ image: "",
102
+ tempFileArr: [],
103
+ percentage: null,
104
+ file_name: '',
105
+ fileList: [],
106
+ }
107
+ },
108
+ methods: {
109
+ openAttachment(item) {
110
+ let reg = /\.(gif|jpg|jpeg|bmp|png)$/;
111
+ let regs = /\.pdf$/;
112
+
113
+ if (reg.test(item.fileName)) {
114
+ let imgs = [];
115
+ let url = this.ossServerContext + "/file/get/" + item.fileId;
116
+ this.imgPreview(url);
117
+ } else if (regs.test(item.fileName)) {
118
+ window.open(this.ossServerContext + "/file/getFileStream?fileId=" + item.fileId, "_blank");
119
+ } else {
120
+ window.open(this.ossServerContext + "/file/get/" + item.fileId, "_blank");
121
+ }
122
+ },
123
+ handleSuccess: function (response, file, fileList) {
124
+ let self = this;
125
+ let tempArr = JSON.parse(JSON.stringify(this.tempFileArr))
126
+
127
+ tempArr.forEach(function (value, index, array) {
128
+ if (value == file.name) {
129
+ self.tempFileArr.splice(index, 1)
130
+ }
131
+ });
132
+
133
+ if (response.code == 1 && self.tempFileArr && self.tempFileArr.length < 1) {
134
+ self.loading = false;
135
+ self.$Message.success("上传成功");
136
+ }
137
+
138
+ if (response.code == 1) {
139
+ if (response.data != undefined && response.data != null && response.data.length > 0) {
140
+ let tempData = [].concat(response.data);
141
+ this.attachmentdata.push({
142
+ fileName: tempData[0].originalName,
143
+ fileId: tempData[0].fileName,
144
+ });
145
+ }
146
+
147
+ this.fileList = fileList
148
+
149
+ } else {
150
+ self.loading = false;
151
+ this.$Message.error({
152
+ content: file.name + '上传失败!',
153
+ });
154
+ //this.$Message.error("上传失败!");
155
+
156
+ let j = 0;
157
+ for (let i = 0; i < fileList.length; i++) {
158
+ if (fileList[i].canceled) {
159
+ continue;
160
+ }
161
+ if (fileList[i].name === file.name && fileList[i].timestamp === file.timestamp) {
162
+ j = i;
163
+ }
164
+ }
165
+
166
+ //console.log(fileList)
167
+ fileList.splice(j, 1);
168
+
169
+ }
170
+
171
+ },
172
+ handleError: function (error, file, fileList) {
173
+ this.loading = false
174
+ this.$Message.error({
175
+ content: fileList.name + ' 上传失败!',
176
+ });
177
+ },
178
+ handleUpload: function (file) {
179
+ if (!file.canceled) {
180
+ this.tempFileArr.push(file.name)
181
+ }
182
+ },
183
+ forRemoveAttachment: function (index) {
184
+ this.attachmentdata.splice(index, 1);
185
+ this.$refs.attachmentTable.tableRefresh()
186
+ },
187
+ //查看附件
188
+ imgPreview: function (img) {
189
+ this.modalImg = true
190
+ this.image = img;
191
+ },
192
+ //查看附件
193
+ cancelUpload: function (item, fileList) {
194
+ item.showProgress = false;
195
+ item.canceled = true;
196
+ },
197
+ handleProgress(event, file, fileList) {
198
+ this.loading = true
199
+
200
+
201
+ },
202
+ handleFormatError(file) {
203
+ this.loading = false
204
+ this.$Notice.warning({
205
+ title: "文件格式不正确",
206
+ desc: "文件 " + file.name + " 格式不支持,请上传其他格式的文件。",
207
+ });
208
+ },
209
+
210
+ }
211
+ }
212
+ </script>
213
+
214
+ <style scoped>
215
+ .demo-spin-icon-load {
216
+ animation: ani-demo-spin 1s linear infinite;
217
+ }
218
+
219
+ /deep/ .ivu-icon {
220
+ zoom: 130%;
221
+ color: #808080;
222
+ margin-right: -1px;
223
+ }
224
+ </style>