detail.vue 1011 Bytes
<!--
 * @Description:
 * @Autor: renchao
 * @LastEditTime: 2023-05-26 15:40:23
-->
<template>
  <div class="loadingtext">
    <el-input
      type="textarea"
      :rows="8"
      v-model="formData.json">
    </el-input>
    <div class="text-center pt-10">
      <el-button type="primary" @click="pushRecord">推送</el-button>
    </div>
  </div>
</template>
<script>
  import { push } from "@/api/sysPushRecord.js";
  export default {
    props: {
      formData: {
        type: Object,
        default: () => {
          return {}
        }
      }
    },
    methods: {
      /**
       * @description: pushRecord
       * @author: renchao
       */
      pushRecord () {
        this.$startLoading()
        push(this.formData).then((res) => {
          this.$endLoading()
          if (res.code === 200) {
            this.$message.success("推送成功");
          } else {
            this.$message.warning(res.message);
          }
          this.$popupCacel()
        })
      }
    }
  }
</script>