<template>
  <div class='releateEle' id='releateEle'>
    <el-dialog title="请选择" width="35%" :visible.sync="isDialogsVisible" :append-to-body="true"
          :close-on-click-modal="false" :close-on-press-escape="false" class="childDialog">
        <el-form>
          <!-- <el-form-item label="打开"> -->
            <el-radio-group v-model="radio">
              <el-radio :label="1">查看关联要素</el-radio>
              <el-radio :label="2">打开引用流程</el-radio>
            </el-radio-group>
          <!-- </el-form-item> -->
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button @click="isDialogsVisible = false">取 消</el-button>
          <el-button type="primary" @click="sure">确 定</el-button>
        </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'releateEle',
  data() {
    return {
      isDialogsVisible: false,
      radio: 1
    }
  },
  mounted() {
    this.isDialogsVisible = true
    console.log('releateElereleateElereleateEle')
  },
  methods: {
    sure() {
      console.log(this.radio)
      if (this.radio === 1) {
        window.viewRelatedEle()
      } else {
        window.openReferenceFlow()
      }
      this.isDialogsVisible = false
    }
  }
}
</script>