|
|
@@ -674,22 +674,24 @@ export default {
|
|
|
const now = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace(/[-:T]/g, '')
|
|
|
const fileName = name + now
|
|
|
console.log(url, fileName)
|
|
|
- snapshoot({
|
|
|
- url,
|
|
|
- name: fileName,
|
|
|
- type: 'pdf'
|
|
|
- }).then(res => {
|
|
|
- if (!res.data || !res.data.id) {
|
|
|
- this.$message.error('生成快照失败!')
|
|
|
- }
|
|
|
- const fileId = res.data && res.data.id ? res.data.id : ''
|
|
|
- const fileParams = fileId ? { kuai_zhao_: fileId } : {}
|
|
|
- this.updateState(id, code, '', fileParams)
|
|
|
- }).catch(() => {
|
|
|
- // 生成快照接口调用失败时,也需要更新状态为已完成
|
|
|
- this.$message.error('提交快照生成失败!')
|
|
|
- // this.updateState(id, code, '1')
|
|
|
- })
|
|
|
+ setTimeout(() => {
|
|
|
+ snapshoot({
|
|
|
+ url,
|
|
|
+ name: fileName,
|
|
|
+ type: 'pdf'
|
|
|
+ }).then(res => {
|
|
|
+ if (!res.data || !res.data.id) {
|
|
|
+ this.$message.error('生成快照失败!')
|
|
|
+ }
|
|
|
+ const fileId = res.data && res.data.id ? res.data.id : ''
|
|
|
+ const fileParams = fileId ? { kuai_zhao_: fileId } : {}
|
|
|
+ this.updateState(id, code, '', fileParams)
|
|
|
+ }).catch(() => {
|
|
|
+ // 生成快照接口调用失败时,也需要更新状态为已完成
|
|
|
+ this.$message.error('提交快照生成失败!')
|
|
|
+ // this.updateState(id, code, '1')
|
|
|
+ })
|
|
|
+ }, 300)
|
|
|
})
|
|
|
},
|
|
|
// 判断流程是否结束
|