qllxDailog.vue 1.47 KB
<!--
 * @Description:
 * @Autor: renchao
 * @LastEditTime: 2023-05-09 09:20:10
-->
<template>
  <el-dialog
    :close-on-click-modal="false"
    title="选择权利类型"
    class="qllxdialog"
    :visible.sync="dialogVisible"
    custom-class="insetDialog"
    append-to-body
    width="60%"
  >
    <el-radio-group v-model="radio">
      <el-radio-button
        v-for="(value, key) in qllxlistdata"
        :key="key"
        :label="value"
      ></el-radio-button>
    </el-radio-group>
    <div class="btn">
      <el-button type="primary" @click="handleSubmit">确定</el-button>
      <el-button type="primary" @click="closeDialog">取消</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      dialogVisible: false,
      qllxlistdata: {},
      radio: "",
      qllx:""
    };
  },

  methods: {
    closeDialog() {
      this.dialogVisible = false;
    },
    handleSubmit() {
      for (const key in this.qllxlistdata) {
      if (this.qllxlistdata[key] === this.radio) {
         this.qllx= key;
       }
     }
      let qllxobj = {
        qllx:this.qllx,
        bsmQlxx:""
      };
      this.$parent.addRepairRecord(qllxobj)
    },
  },
};
</script>
<style scoped lang="scss">
.qllxdialog {
  margin-top: 200px;
  /deep/.el-dialog__body {
    margin-top: 10px;
    // height: 100px;
    padding: 30px;
  }
  .btn{
    margin:30px;
    text-align: center;
 .el-button {
    margin-top: 10px;
    margin-left: 20px;
  }
  }

}
</style>