Blame view

src/views/workflow/components/clxxAddDialog.vue 1.57 KB
吴蕾 committed
1
<template>
任超 committed
2
  <dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit"
任超 committed
3
    :isFullscreen="false">
任超 committed
4
    <el-form :model="ruleForm" ref="ruleForm" label-width="70px">
吴蕾 committed
5 6 7
      <el-row>
        <el-col :span="24">
          <el-form-item label="材料类型">
任超 committed
8 9 10 11
            <el-select v-model="ruleForm.cllx" class="width100" placeholder="请选择">
              <el-option v-for="item in dictData['A40']" :key="item.dcode" :label="item.dname" :value="item.dcode">
              </el-option>
            </el-select>
吴蕾 committed
12 13 14 15 16 17 18 19 20 21 22
          </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
23 24 25 26
  </dialogBox>
</template>

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