<template>
  <div class="dialog">
    <el-dialog
      :title="formData.JGMC"
      width="40%"
      :visible.sync="dialogVisible"
      :before-close="close"
      :modal-append-to-body="false"
      :close-on-click-modal="false"
    >
      <div class="content">
        <el-table
          ref="multipleTable"
          :data="fieldList"
          style="width: 100%"
          @selection-change="handleSelectionChange"
        >
          <el-table-column label="序号" width="70px">
            <template slot-scope="scope">{{ scope.$index + 1 }}</template>
          </el-table-column>
          <el-table-column prop="label" label="字段名"> </el-table-column>
          <el-table-column prop="name" label="中文名" show-overflow-tooltip>
          </el-table-column>
          <el-table-column label="是否可共享" width="150">
            <template #default="{ row }">
              <el-checkbox v-model="row.checked" @change="changeShare(row)">
                可共享
              </el-checkbox>
            </template></el-table-column
          >
        </el-table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submit">保存</el-button>
        <el-button type="primary" @click="close">关闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
      formData: {},
      fieldList: [{ label: "sc", name: "字段" }],
      dialogVisible: false,
    };
  },
  created() {},
  methods: {
    // 关闭弹窗
    close() {
      this.dialogVisible = false;
      this.$emit("close");
    },
    Init(rowdata) {
      this.formData = rowdata;
      this.dialogVisible = true;
    },
    async submit() {
      this.close();
    },
  },
};
</script>

<style lang="scss" scoped>
.dialog {
  .content {
    height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    color: #fff;
    .el-checkbox {
      color: #fff;
    }
  }
}
</style>
<style lang="scss" >
</style>
