<template>
  <div>
    <el-popconfirm
      title="确定取消吗？"
      @confirm="delete_appauth()">
      <el-button slot="reference" type="text" size="small">取消隐藏字段</el-button>
    </el-popconfirm>
  </div>
</template>

<script>
export default {
  props:['data'],
  methods:{
    delete_appauth () {
      this.$api.requested({
      "classname": "webmanage.role.role",
      "method": "delete_appauth",
      "content": {
        "roleid":this.data.roleid,
        "systemapps": [
          {
            "systemappid": this.data.row.systemappid,
            "optionids": [],
            "hiddenfields":[this.data.row.hiddenfieldid]
          }
        ]
      }}).then(res=>{
        if (res.code === 1) {
          this.$notify({
            title: '成功',
            message: '取消成功',
            type: 'success'
          });
          this.$emit('onSuccess')
        } else {
          this.$notify({
            title: '失败',
            message: res.data,
            type: 'error'
          });
        }
      })
    }
  }
}

</script>
<style>
</style>