Blame view

src/views/ywbl/fqsq/components/clxxAddDialog.vue 1.3 KB
吴蕾 committed
1
<template>
任超 committed
2 3
  <dialogBox title="新建材料信息" width="40%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit"
    :isFullscreen="false">
吴蕾 committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
    <el-form :model="ruleForm" ref="ruleForm" label-width="120px">
      <el-row>
        <el-col :span="24">
          <el-form-item label="材料类型">
            <el-input v-model="ruleForm.cllx"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="材料名称">
            <el-input v-model="ruleForm.clmc"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
吴蕾 committed
20 21 22 23
  </dialogBox>
</template>

<script>
吴蕾 committed
24

吴蕾 committed
25 26
export default {
  props: {
吴蕾 committed
27
    value: { type: Boolean, default: false },
吴蕾 committed
28
  },
任超 committed
29
  data () {
吴蕾 committed
30 31 32 33 34 35 36
    return {
      myValue: this.value,
      ruleForm: {
        cllx: "",
        clmc: "",
      },
    };
吴蕾 committed
37
  },
吴蕾 committed
38
  watch: {
任超 committed
39
    value (val) {
吴蕾 committed
40 41 42 43
      this.myValue = val;
    },
  },
  methods: {
任超 committed
44
    closeDialog () {
吴蕾 committed
45 46
      this.$emit("input", false);
    },
任超 committed
47
    handleSubmit () {
吴蕾 committed
48 49 50 51 52
      this.$parent.addSave(this.ruleForm);
      this.$emit("input", false);
    },
  },
};
吴蕾 committed
53 54
</script>
<style scoped lang="scss">
吴蕾 committed
55 56 57 58 59 60
.submit-button {
  text-align: center;
  height: 52px;
  padding-top: 10px;
  background-color: #fff;
}
吴蕾 committed
61
</style>