<template>
  <el-dialog
    :title="dialogTitle"
    :visible.sync="addRoleDialog"
    :before-close="handleClose"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    width="40%"
  >
    <div class="dialog_top"></div>
    <div class="main_container">
      <el-form :model="addForm" :rules="addFormRules" label-width="120px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="父级节点" prop="name">
                研磨棒（501）
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="层级全览" prop="other">
              硬质合金-自用合金-研磨棒（121-002-501）
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="节点编码" prop="order">
              <el-input
                placeholder="请输入"
                size="small"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="节点名称" prop="remark">
              <el-input
                placeholder="请输入"
                size="small"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="与下层分隔" prop="remark">
              <el-select size="small"  placeholder="请选择" style="width: 100%;">
                <el-option
                  v-for="item in options.fgf"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本层排序" prop="remark">
              <el-input
                v-model="addForm.remark"
                placeholder="请输入"
                size="small"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <div class="btns">
      <el-button type="primary" size="small" @click="submitAdd">保存</el-button>
      <el-button size="small" @click="handleClose">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    dialogTitle: {
      type: String,
      default: "节点信息",
    },
  },
  // components: { EquipmentDialog, SelectUpload , selectTree},
  watch: {},
  data() {
    return {
      addRoleDialog: false,
      addForm: {},
      addFormRules: {
        name: [{ required: true, message: "请输入角色名称", trigger: "blur" }],
        other: [{ required: true, message: "请输入角色别名", trigger: "blur" }],
      },
      options:{
        fgf:[
          {
            value: null,
            label: '无分隔符'
          },
          {
            value: '-',
            label: '-'
          },
          {
            value: '~',
            label: '~'
          },{
            value: '_',
            label: '_'
          },
        ]
      }
    };
  },
  created() {
    // this.getrecipientDep()
  },
  methods: {
    open(){
      this.addRoleDialog = true
    },
    handleClose() {
      this.addRoleDialog = false;
    },
    submitAdd() {},
  },
};
</script>

<style lang="scss" scoped>
.dialog_top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.btns {
  text-align: right;
  margin: 10px 0;
}
</style>
