<template>
  <a-modal
    title="流程图"
    :width="1200"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @cancel="handleCancel"
  >
    <div>
      <img style="width: 90%" :src="image1" />
    </div>
    <template slot="footer">
      <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">关闭</a-button>
    </template>
  </a-modal>
</template>

<script>
import { getShineProDefImage } from '@/api/activiti/activiti'

export default {
  name: 'ActImageDefModal',
  data () {
    return {
      confirmLoading: false,
      image1: '',
      visible: false,
      countNum: 0,
      image2: ''
    }
  },
  mounted () {
  },
  methods: {
    base (id) {
      this.visible = true
      this.confirmLoading = true
      getShineProDefImage(id)
        .then((res) => {
          this.image1 = 'data:image/png;base64,' + res.data
        }).catch(() => {
          this.confirmLoading = false
        })
    },
    handleCancel () {
      this.visible = false
      this.confirmLoading = false
    }
  }
}
</script>
