<template>
  <div class="inline-16">
    <el-button type="primary" plain size="small" @click="releaseNotice">{{data.status === '新建'?'发 布':'取消发布'}}</el-button>
  </div>
</template>

<script>
export default {
  props:['data'],
  data () {
    return {}
  },
  methods:{
    async releaseNotice () {
      const res = await this.$api.requested({
       "id":"20221102093802",
        "content": {
          "sat_submiteditmodelid": this.data.sat_submiteditmodelid,
          "isrelease":this.data.status === '新建'?1:0
        }
      })
      this.tool.showMessage(res)
      res.code === 1?this.$emit('onSuccess'):''
    }
  },
  mounted() {
    console.log("发布数据")
    console.log(this.data)
  },
  created() {
    console.log("创建")
  }
}

</script>
<style>
</style>