resend-dialog.vue 1.04 KB
<template>
  <!-- 重新发报 -->
  <dialogBox ref="resend" saveButton="确定" width="500px" divider @submitForm="handleResclose" multiple title="提示">
    <div class="confirmDialog">您确定重新发送报文吗?</div>
  </dialogBox>
</template>

<script>
  import journal from '@/api/journal.js'
  export default {
    props: {
      msgid: {
        type: String,
        default: ''
      }
    },
    data () {
      return {
      }
    },
    methods: {
      async handleResclose () {
        try {
          let res = await journal.sendXmlForPlat(this.msgid)
          if (res.code == 200) {
            this.$message({
              message: res.message,
              type: 'success'
            })
            this.$parent.featchData();
            this.$refs.resend.isHide()
          }
        } catch (error) {
          this.$message({
            showClose: true,
            message: '服务器出错,请稍后重试',
            type: 'error'
          })
          this.$refs.resend.isHide()
        }
      }
    }
  }
</script>