@lambo-design/workflow-approve 1.0.0-beta.84 → 1.0.0-beta.86

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.84",
3
+ "version": "1.0.0-beta.86",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -13,7 +13,7 @@
13
13
  "axios": "^0.24.0",
14
14
  "axios-cache-plugin": "^0.1.0",
15
15
  "@lambo-design/core": "^4.7.1-beta.167",
16
- "@lambo-design/shared": "^1.0.0-beta.285"
16
+ "@lambo-design/shared": "^1.0.0-beta.292"
17
17
  },
18
18
  "dependencies": {
19
19
  "bpmn-js": "^7.3.1",
@@ -84,7 +84,7 @@
84
84
  <Col span="12" style="text-align: right">
85
85
  <Button v-if="item.fileList && item.fileList.length > 0" size="small" type="primary" ghost class="urging" @click="openModal(item)">查看附件</Button>
86
86
  <Button v-if="displayPushButton"
87
- size="small" type="primary" ghost class="urging"
87
+ size="small" type="primary" ghost class="urging" v-permission="'swf-work-hurry'"
88
88
  @click="pushHim(item,itemListItem,itemListIndex)">催一下
89
89
  </Button>
90
90
  </Col>
@@ -277,7 +277,7 @@
277
277
  <Col span="12" style="text-align: right">
278
278
  <Button v-if="item.fileList && item.fileList.length > 0" size="small" type="primary" ghost class="urging" @click="openModal(item)">查看附件</Button>
279
279
  <Button v-if="displayPushButton && !auditPassStatus.includes(item.auditResult) && item.auditResult !== '40'&&item.auditResult !== '50'&&item.auditResult !== '60'&&item.auditResult !== '62'&&item.auditResult!=='83'&&item.auditResult!=='90'"
280
- size="small" type="primary" ghost class="urging"
280
+ size="small" type="primary" ghost class="urging" v-permission="'swf-work-hurry'"
281
281
  @click="pushHim(item,itemListItem,itemListIndex)">催一下
282
282
  </Button>
283
283
  </Col>
@@ -365,7 +365,7 @@ export default {
365
365
  //横竖版样式不同
366
366
  portraitWidth: {
367
367
  type: Number,
368
- default: 0
368
+ default: 400
369
369
  },
370
370
  smartFlowServerContext: {
371
371
  type: String,
@@ -12,12 +12,12 @@
12
12
  <Input v-model="auditOpinion" type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" show-word-limit
13
13
  :maxlength="200" placeholder="处理意见" style="width: 100%"
14
14
  ></Input>
15
- <div>
16
- <div v-for="(item, index) in attachmentdata" :key="index" style="font-size: 14px">
17
- <span style="color:#2D8cF0 "> {{ item.fileName }}</span>
18
- <a @click="forRemoveAttachment(index)" style="font-size: 13px;"> &nbsp;.删除</a>
19
- </div>
20
- </div>
15
+ <div>
16
+ <div v-for="(item, index) in attachmentdata" :key="index" style="font-size: 14px">
17
+ <span style="color:#2D8cF0 "> {{ item.fileName }}</span>
18
+ <a @click="forRemoveAttachment(index)" style="font-size: 13px;"> &nbsp;.删除</a>
19
+ </div>
20
+ </div>
21
21
  <Modal v-model="customCommentListModal" title="常用意见" width="800px" footer-hide>
22
22
  <LamboPagingTable :requestSuccessCodes="requestSuccessCodes" ref="customCommentTable" :dataUrl="dataUrl"
23
23
  :columns="tableColumn">
@@ -281,9 +281,11 @@ export default {
281
281
  fileId: item.fileCode,
282
282
  });
283
283
  })
284
+ self.$emit('handle-file', self.attachmentdata)
284
285
  },
285
286
  forRemoveAttachment: function (index) {
286
287
  this.attachmentdata.splice(index, 1);
288
+ this.$emit('handle-file', this.attachmentdata)
287
289
  },
288
290
  },
289
291
  mounted() {
@@ -0,0 +1,533 @@
1
+ <template>
2
+ <div class="process-info-content">
3
+ <a v-if="!isDetail" @click="auditShow = !auditShow">
4
+ <Title
5
+ v-if="handleButtons && (handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile'))">
6
+ <a style="color: #989898">
7
+ <Icon v-if="auditShow" type="ios-arrow-down"/>
8
+ <Icon v-if="!auditShow" type="ios-arrow-up"/>
9
+ {{ handleName }}信息
10
+ </a>
11
+ </Title>
12
+ </a>
13
+ <transition v-if="!isDetail" name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave"
14
+ @leave="leave">
15
+ <div class="box" v-show="auditShow">
16
+ <Form ref="auditOpinion" justify="center" :label-width="100" :model="form"
17
+ v-if="handleButtons && handleButtons.includes('auditOpinion')"
18
+ style="margin: 10px 0 0 10px;" :rules="ruleValidate">
19
+ <FormItem :label="auditOpinionTitle" prop="auditOpinion">
20
+ <AuditOpinion v-model="form.auditOpinion" :attachment-file="handleButtons.includes('attachmentFile')"
21
+ :attachmentdata="fileList" :default-audit-opinion="defaultAuditOpinion"
22
+ :smart-flow-server-context="smartFlowServerContext" @handle-file="handleFile"></AuditOpinion>
23
+ </FormItem>
24
+ </Form>
25
+ <Form ref="auditOpinion" justify="center" :label-width="100"
26
+ v-if="handleButtons && !handleButtons.includes('auditOpinion') && handleButtons.includes('attachmentFile')"
27
+ style="margin: 10px 0 0 10px;">
28
+ <FormItem style="min-height: 70px">
29
+ <Tooltip placement="bottom" max-width="200">
30
+ <div style="font-size: smaller" slot="content">支持扩展名:.pdf .doc .docx .txt .xls .xlsx .jpg .jpeg
31
+ .png .gif
32
+ </div>
33
+ <UploadFile @upload-result="uploadFile" :multiple="true"
34
+ :oss-server-context="smartFlowServerContext"
35
+ :oss-file-put-url="ossFilePutUrl"></UploadFile>
36
+ </Tooltip>
37
+ </FormItem>
38
+ </Form>
39
+ </div>
40
+ </transition>
41
+ <a v-if="taskNode && isDetail && hisAuditOpinion[0].auditOpinion" @click="auditShow = !auditShow">
42
+ <Title
43
+ v-if="handleButtons && (handleButtons.includes('auditOpinion') || handleButtons.includes('attachmentFile'))">
44
+ <a style="color: #989898">
45
+ <Icon v-if="auditShow" type="ios-arrow-down"/>
46
+ <Icon v-if="!auditShow" type="ios-arrow-up"/>
47
+ {{ handleName }}信息
48
+ </a>
49
+ </Title>
50
+ </a>
51
+ <transition v-if="taskNode && isDetail && hisAuditOpinion[0].auditOpinion" name="draw"
52
+ @before-enter="beforeEnter"
53
+ @enter="enter" @before-leave="beforeLeave" @leave="leave">
54
+ <div class="box" v-show="auditShow">
55
+ <Form ref="auditOpinion" justify="center" :model="form"
56
+ v-if="handleButtons && handleButtons.includes('auditOpinion')"
57
+ style="margin: 10px 0 0 10px;" :rules="ruleValidate">
58
+ <FormItem style="margin-left: -60px">
59
+ <Card v-for="(item, index) in hisAuditOpinion" :key="index">
60
+ <Row style="display: flex">
61
+ <Col span="24">
62
+ <div style="word-wrap: break-word;">
63
+ <span>{{ item.auditOpinion }}</span>
64
+ <div style="position: absolute; right: 0;bottom: -18px;color: grey">{{ item.auditTime }}</div>
65
+ </div>
66
+ </Col>
67
+ </Row>
68
+ </Card>
69
+ </FormItem>
70
+ </Form>
71
+ </div>
72
+ </transition>
73
+ <a @click="historyShow = !historyShow">
74
+ <Title v-if="handleButtons && handleButtons.includes('auditHistory')">
75
+ <a style="color: #989898">
76
+ <Icon v-if="historyShow" type="ios-arrow-down"/>
77
+ <Icon v-if="!historyShow" type="ios-arrow-up"/>
78
+ {{ handleName }}记录
79
+ </a>
80
+ </Title>
81
+ </a>
82
+ <transition name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
83
+ <div class="box" v-show="historyShow">
84
+ <Card class="process-history" :style="processHistoryHeight" dis-hover :bordered="false"
85
+ v-if="handleButtons && handleButtons.includes('auditHistory')">
86
+ <processHistory :portrait-width="processInfoWidth" :list="processHistory" :done-page="isDetail"
87
+ :push-button="pushButton"
88
+ :smart-flow-server-context="smartFlowServerContext"></processHistory>
89
+ </Card>
90
+ </div>
91
+ </transition>
92
+ <a @click="attachListShow = !attachListShow">
93
+ <Title v-if="handleButtons && handleButtons.includes('attachmentFile') && attachmentList.length > 0 && attachListShow">
94
+ <a style="color: #989898">
95
+ <Icon v-if="attachListShow" type="ios-arrow-down"/>
96
+ <Icon v-if="!attachListShow" type="ios-arrow-up"/>
97
+ 查看附件
98
+ </a>
99
+ </Title>
100
+ </a>
101
+ <transition v-if="handleButtons && handleButtons.includes('attachmentFile') && attachmentList.length > 0 && attachListShow" name="draw" @before-enter="beforeEnter" @enter="enter" @before-leave="beforeLeave" @leave="leave">
102
+ <div class="box" v-if="!inHorizontal">
103
+ <div v-for="(item, index) in attachmentList" :key="index">
104
+ <Card dis-hover class="attach-card">
105
+ <List item-layout="vertical">
106
+ <ListItem style="margin-top: -8px">
107
+ <Row style="display: flex; align-items: center;">
108
+ <!-- 左边:图片 -->
109
+ <Col span="4" style="margin-top: -25px">
110
+ <avatar v-if="item.fileType === 'image'" icon="ios-image-outline" class="attach-avatar"
111
+ style="background-color: #005aff"
112
+ :style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
113
+ :size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
114
+ <avatar v-else-if="item.fileType === 'doc'" icon="ios-document-outline" class="attach-avatar"
115
+ style="background-color: #005aff"
116
+ :style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
117
+ :size="portraitWidth >= 600 ? 'middle' : 'small'">
118
+ </avatar>
119
+ <avatar v-else-if="item.fileType === 'xlsx'" icon="ios-document-outline" class="attach-avatar"
120
+ style="background-color: #19be6b"
121
+ :style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
122
+ :size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
123
+ <avatar v-else-if="item.fileType === 'pdf'" icon="ios-document-outline" class="attach-avatar"
124
+ style="background-color: #ed4014"
125
+ :style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
126
+ :size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
127
+ <avatar v-else icon="ios-document-outline" class="attach-avatar"
128
+ :style="portraitWidth >= 600 ? 'margin-left: 10px' : ''"
129
+ :size="portraitWidth >= 600 ? 'middle' : 'small'"></avatar>
130
+ </Col>
131
+ <!-- 右边:附件信息 -->
132
+ <Col span="20">
133
+ <Row>
134
+ <tooltip>
135
+ <span class="attach-name-style"> {{ item.attachName }}</span>
136
+ <div slot="content" style="white-space: normal"> {{ item.attachName }}</div>
137
+ </tooltip>
138
+ </Row>
139
+ <Row style="margin-top: 3px">
140
+ <span style="color: #005aff; font-size: 13px;">{{ item.uploadUserName }}</span>
141
+ <Divider style="background-color:#808695;height: 1em;margin: 4px 9px 0 6px;"
142
+ type="vertical"/>
143
+ <span style="color: #808695;font-size: 13px"
144
+ >{{ showTaskNode(item.taskId) }}</span>
145
+ </Row>
146
+ <Row style="margin-bottom: -10px; margin-top: 10px">
147
+ <template>
148
+ <Button @click="getAttach(item)" size="small">下载</Button>
149
+ <Button v-if="item.showPreview" ghost type="primary" @click="preViewAttach(item)"
150
+ style="margin-left: 10px" size="small">预览
151
+ </Button>
152
+ </template>
153
+ </Row>
154
+ </Col>
155
+ </Row>
156
+
157
+ </ListItem>
158
+ </List>
159
+ </Card>
160
+ </div>
161
+ </div>
162
+ <div class="box" v-else style="margin: 20px">
163
+ <LamboPagingTable :requestSuccessCodes="requestSuccessCodes" :pageDisable="true" ref="table" :dataUrl="dataUrl" :columns="tableColumn"></LamboPagingTable>
164
+ </div>
165
+ </transition>
166
+ <Modal title="查看附件" v-model="modalVisible" fullscreen scrollable :mask="false">
167
+ <img :src="imageUrl" v-if="modalVisible" alt="" style="width: 100%">
168
+ <div slot="footer">
169
+ <Button type="primary" @click="modalVisible = false">关闭</Button>
170
+ </div>
171
+ </Modal>
172
+ <Modal title="查看附件" v-model="modalDocx" fullscreen scrollable :mask="false">
173
+ <div ref="file"></div>
174
+ </Modal>
175
+ </div>
176
+ </template>
177
+
178
+ <script>
179
+ import ajax from "@lambo-design/shared/utils/ajax";
180
+ import axios from "axios";
181
+ import Title from './title'
182
+ import processHistory from './history'
183
+ import AuditOpinion from './opinion'
184
+ import UploadFile from '@lambo-design/upload-file'
185
+ import {operateBtn} from "@lambo-design/shared/utils/assist";
186
+ import LamboPagingTable from '@lambo-design/paging-table'
187
+
188
+ // 引入docx-preview插件
189
+ let docx = require('docx-preview')
190
+
191
+ export default {
192
+ name: "process-info",
193
+ components: {
194
+ Title,
195
+ processHistory,
196
+ AuditOpinion,
197
+ UploadFile,
198
+ LamboPagingTable,
199
+ },
200
+ props: {
201
+ isDetail: {
202
+ type: Boolean,
203
+ required: false,
204
+ default: false
205
+ },
206
+ procId: {
207
+ type: String,
208
+ required: true,
209
+ },
210
+ taskNode: {
211
+ type: String,
212
+ required: true,
213
+ },
214
+ applyId: {
215
+ type: String,
216
+ required: true,
217
+ },
218
+ taskId: {
219
+ type: String,
220
+ required: false,
221
+ default: '',
222
+ },
223
+ defaultAuditOpinion: {
224
+ type: String,
225
+ required: false,
226
+ default: '',
227
+ },
228
+ //详情页催办按钮
229
+ pushButton: {
230
+ type: Boolean,
231
+ required: false,
232
+ default: true,
233
+ },
234
+ //组件宽度
235
+ portraitWidth: {
236
+ type: Number,
237
+ default: 0
238
+ },
239
+ //是否显示竖向布局
240
+ inHorizontal: {
241
+ type: Boolean,
242
+ default: false
243
+ },
244
+ //审批名称
245
+ handleName: {
246
+ type: String,
247
+ default: '审批',
248
+ },
249
+ //操作按钮
250
+ handleButtons: {
251
+ type: [Array, String],
252
+ default: () => ([])
253
+ },
254
+ //审批历史
255
+ processHistory: {
256
+ type: Array,
257
+ default: () => ([])
258
+ },
259
+ smartFlowServerContext: {
260
+ type: String,
261
+ default: '/api/smart-flow-server',
262
+ },
263
+ },
264
+ data(){
265
+ return{
266
+ auditShow: true,
267
+ historyShow: true,
268
+ attachListShow: true,
269
+ modalVisible: false,
270
+ modalDocx: false,
271
+ imageUrl: '',
272
+ processInfoWidth: 400,
273
+ auditOpinionTitle: this.handleName + '意见',
274
+ fileList: [],
275
+ attachmentList: [],
276
+ requestSuccessCodes: [200, "200"],
277
+ dataUrl: this.smartFlowServerContext + '/manage/processDone/getAttachmentList?procId='+this.procId + '&applyId=' + this.applyId,
278
+ form: {
279
+ auditOpinion: '',
280
+ },
281
+ hisAuditOpinion: [{
282
+ auditOpinion: '',
283
+ auditTime: '',
284
+ }],
285
+ ossFilePutUrl: '/manage/oss/file/put',
286
+ ruleValidate: {
287
+ auditOpinion: [{ required: true, trigger: 'blur', message: '意见不能为空' }],
288
+ assignee: [{ required: true, trigger: 'blur', message: '办理人不能为空' }],
289
+ candidateGroups: [{ required: true, trigger: 'blur', message: '候选人不能为空' }],
290
+ },
291
+ }
292
+ },
293
+ computed: {
294
+ processHistoryHeight() {
295
+ if (this.inHorizontal) return ''
296
+ let str = ''
297
+ const hasAuditOpinion = this.taskNode && this.handleButtons && this.handleButtons.includes('auditOpinion')
298
+ const hasAttachmentFile = this.handleButtons && this.handleButtons.includes('auditHistory') && this.attachmentList.length > 0
299
+ const isDetail = this.isDetail && !this.hisAuditOpinion[0].auditOpinion.length > 0
300
+ if (hasAuditOpinion && !hasAttachmentFile && !isDetail) {
301
+ str += 'height: 43vh'
302
+ } else if (hasAuditOpinion && hasAttachmentFile && !isDetail) {
303
+ str += 'height: 40vh'
304
+ } else {
305
+ str += 'height: 67vh'
306
+ }
307
+ return str
308
+ },
309
+ tableColumn() {
310
+ let column = [];
311
+ let self = this;
312
+ column.push({
313
+ title: '序号',
314
+ type: 'index',
315
+ width: 70,
316
+ align: 'center',
317
+ });
318
+ column.push({
319
+ title: '附件名称', key: 'fileName', minWidth: 150, align: 'center',
320
+ render(h, {row}) {
321
+ const index= row.fileName.lastIndexOf(".");
322
+ const fileName=row.fileName.substr(0,index)
323
+ return h("span",fileName)
324
+
325
+ }
326
+ });
327
+ column.push({
328
+ title: '附件类型', width: 100, align: 'center',
329
+ render:(h,{row})=>{
330
+ const index= row.fileName.lastIndexOf(".");
331
+ const fileType=row.fileName.substr(index+1)
332
+ return h("span",fileType)
333
+ }
334
+ });
335
+
336
+ column.push({
337
+ title: "上传人姓名",
338
+ key: "uploadUserName",
339
+ width: 170,
340
+ align: "center",
341
+ });
342
+
343
+ column.push({
344
+ title: "节点名称",
345
+ key: "taskName",
346
+ width: 170,
347
+ align: "center",
348
+ });
349
+
350
+ column.push({
351
+ title: "操作", width: 160, align: 'center', tooltip: true,
352
+ render: (h, {row}) => {
353
+ const index= row.fileName.lastIndexOf(".");
354
+ const fileType=row.fileName.substr(index+1).toLowerCase()
355
+ // const typeList=['jpg','pdf','gif','png','docx']
356
+ //由于pdf预览显示乱码 暂时不提供pdf预览功能
357
+ const typeList=['jpg','gif','png','docx']
358
+ if (typeList.indexOf(fileType)!==-1){
359
+ return h("div", [
360
+ operateBtn(this, h, row, "下载", () => {
361
+ this.getAttach(row);
362
+ }, "primary"),
363
+ operateBtn(this, h, row, "预览", () => {
364
+ this.preViewAttach(row);
365
+ }, "primary")
366
+ ]);
367
+ }else {
368
+ return h("div", [
369
+ operateBtn(this, h, row, "下载", () => {
370
+ this.getAttach(row);
371
+ }, "primary")
372
+ ]);
373
+ }
374
+
375
+ }
376
+
377
+ });
378
+
379
+ return column;
380
+ },
381
+ },
382
+ methods: {
383
+
384
+ imgPreview(url) {
385
+ this.imageUrl = url
386
+ this.modalVisible = true
387
+ },
388
+ preViewAttach(row) {
389
+ let reg = /\.(gif|jpg|jpeg|bmp|png|PNG)$/
390
+ let regs = /\.(pdf)$/
391
+ if (reg.test(row.fileName)) {
392
+ let url = this.smartFlowServerContext + '/manage/oss/file/get/' + row.fileId
393
+ this.imgPreview(url)
394
+ } else if (regs.test(row.fileName)) {
395
+ window.open(this.smartFlowServerContext + '/manage/oss/file/getFileStream?fileId=' + row.fileId, '_blank')
396
+ } else {
397
+ this.modalDocx = true
398
+ axios({
399
+ method: 'get',
400
+ responseType: 'blob', // 因为是流文件,所以要指定blob类型
401
+ url: this.smartFlowServerContext + '/manage/oss/file/get/' + row.fileId// 一个word下载文件的接口
402
+ }).then(({ data }) => {
403
+ docx.renderAsync(data, this.$refs.file, null, {
404
+ className: 'docx', //默认和文档样式类的类名/前缀
405
+ inWrapper: true, //启用围绕文档内容呈现包装器
406
+ ignoreWidth: false, //禁用页面的渲染宽度
407
+ ignoreHeight: false, //禁用页面的渲染高度
408
+ ignoreFonts: false, //禁用字体渲染
409
+ breakPages: true, //在分页符上启用分页
410
+ ignoreLastRenderedPageBreak: true, //在lastRenderedPageBreak元素上禁用分页
411
+ experimental: false, //启用实验功能(制表符停止计算)
412
+ trimXmlDeclaration: true, //如果为true,则在解析之前将从xml文档中删除xml声明
413
+ useBase64URL: false, //如果为true,图像、字体等将转换为base 64 URL,否则使用URL.createObjectURL
414
+ useMathMLPolyfill: false, //包括用于铬、边等的MathML多填充。
415
+ showChanges: false, //启用文档更改的实验渲染(插入/删除)
416
+ debug: false, //启用额外的日志记录
417
+ })
418
+ }
419
+ )
420
+ }
421
+ },
422
+ getAttach(row) {
423
+ window.open(this.smartFlowServerContext + '/manage/oss/file/get/' + row.fileId, '_blank')
424
+ },
425
+ showTaskNode(taskId) {
426
+ if (this.processHistory.length > 0) {
427
+ let task = null
428
+ this.processHistory.some(itemList => {
429
+ task = itemList.find(item => item.taskId === taskId)
430
+ return task !== undefined
431
+ })
432
+ return task ? task.taskName : ''
433
+ }
434
+ return ''
435
+ },
436
+ getAttachList(taskId) {
437
+ const self = this
438
+ const param = {
439
+ taskId: taskId,
440
+ procId: this.procId,
441
+ applyId: this.applyId
442
+ }
443
+ ajax.get(self.smartFlowServerContext + '/manage/processDone/getAttachmentList', { params: param }).then(function (resp) {
444
+ self.attachmentList = resp.data.data.rows
445
+ self.attachmentList.forEach(item => {
446
+ const index = item.fileName.lastIndexOf('.')
447
+ const fileType = item.fileName.substr(index + 1).toLowerCase()
448
+ const imageList = ['jpg', 'gif', 'png', 'svg']
449
+ const docList = ['doc', 'docx']
450
+ const zipList = ['rar', 'zip']
451
+ const typeList = ['jpg', 'gif', 'png', 'docx']
452
+ item.fileType = imageList.indexOf(fileType) !== -1 ? 'image' : docList.indexOf(fileType) !== -1 ? 'doc' : zipList.indexOf(fileType) !== -1 ? 'zip' : fileType
453
+ item.showPreview = typeList.indexOf(fileType) !== -1
454
+ })
455
+ }).catch(err => {
456
+ console.log(err)
457
+ })
458
+ },
459
+ uploadFile(file) {
460
+ const self = this
461
+ self.fileList = []
462
+ file.forEach(item => {
463
+ self.fileList.push({
464
+ fileName: item.fileName,
465
+ fileId: item.fileCode,
466
+ })
467
+ })
468
+ this.$emit('upload-file', self.fileList)
469
+ },
470
+ handleFile(file){
471
+ this.$emit('upload-file', file)
472
+ },
473
+
474
+ //折叠动画效果
475
+ beforeEnter(el) {
476
+ el.style.height = '0'
477
+ },
478
+ enter(el, done) {
479
+ setTimeout(() => {
480
+ el.style.height = el.scrollHeight + 'px'
481
+ }, 0)
482
+
483
+ el.addEventListener('transitionend', done)
484
+ },
485
+ beforeLeave(el) {
486
+ el.style.height = el.scrollHeight + 'px'
487
+ },
488
+ leave(el, done) {
489
+ setTimeout(() => {
490
+ el.style.height = '0'
491
+ }, 0)
492
+
493
+ el.addEventListener('transitionend', done)
494
+ },
495
+
496
+ beforeFlowInfoEnter(el) {
497
+ el.style.transform = 'translateX(100%)'
498
+ },
499
+ flowInfoEnter(el, done) {
500
+ const transitionDuration = 0.5
501
+ el.style.transition = `transform ${transitionDuration}s`
502
+ el.style.transform = 'translateX(0)'
503
+ el.addEventListener('transitionend', done)
504
+ },
505
+ beforeFlowInfoLeave(el) {
506
+ el.style.transform = 'translateX(0)'
507
+ },
508
+ flowInfoLeave(el, done) {
509
+ const transitionDuration = 0.5
510
+ el.style.transition = `transform ${transitionDuration}s`
511
+ el.style.transform = 'translateX(100%)'
512
+ el.addEventListener('transitionend', done)
513
+ },
514
+ },
515
+ mounted() {
516
+ this.getAttachList(this.taskId)
517
+ this.processInfoWidth = this.inHorizontal ? 1000 : this.portraitWidth
518
+ },
519
+ watch: {
520
+ 'form.auditOpinion'(val) {
521
+ this.$emit('input', val)
522
+ },
523
+ defaultAuditOpinion(val) {
524
+ this.auditOpinion = this.defaultAuditOpinion
525
+ this.$emit('input', val)
526
+ }
527
+ }
528
+ }
529
+ </script>
530
+
531
+ <style scoped>
532
+
533
+ </style>