detail.vue 943 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 { pushSjsbRecord } from "@/api/zhcx.js";
  export default {
    props: {
      formData: {
        type: Object,
        default: () => {
          return {}
        }
      }
    },
    methods: {
      pushRecord () {
        this.$startLoading()
        pushSjsbRecord(this.formData).then((res) => {
          this.$endLoading()
          if (res.code === 200) {
            this.$message.success("推送成功");
          } else {
            this.$message.warning(res.message);
          }
          this.$popupCacel()
        })
      }
    }
  }
</script>