Blame view

src/views/ywbl/commonForm/clxxAddDialog.vue 2.3 KB
1
<!--
yuanbo committed
2
 * @Description:
3 4 5
 * @Autor: renchao
 * @LastEditTime: 2023-05-17 10:42:38
-->
田浩浩 committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<template>
  <dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit"
    :isFullscreen="false">
    <el-form :model="ruleForm" ref="ruleForm" label-width="70px">
      <el-row>
        <el-col :span="24">
          <el-form-item label="材料类型">
            <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>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="24">
22
          <el-form-item label="材料名称1">
田浩浩 committed
23 24 25
            <el-input v-model="ruleForm.clmc"></el-input>
          </el-form-item>
        </el-col>
26 27 28 29 30 31 32 33 34 35 36 37 38 39
        </el-row>
      <el-row :gutter="20">
        <el-col :span="8">
            <el-form-item
              label="是否公共材料"
            >
              <el-radio-group
                v-model="ruleForm.sfggcl"
              >
                <el-radio label="1"></el-radio>
                <el-radio label="0"></el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
田浩浩 committed
40 41 42 43 44 45
      </el-row>
    </el-form>
  </dialogBox>
</template>

<script>
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
  import { mapGetters } from "vuex";
  export default {
    props: {
      value: { type: Boolean, default: false },
    },
    data () {
      return {
        myValue: this.value,
        ruleForm: {
          cllx: "",
          clmc: "",
        },
      };
    },
    computed: {
      ...mapGetters(["dictData"]),
田浩浩 committed
62
    },
63 64 65 66
    watch: {
      value (val) {
        this.myValue = val;
      },
田浩浩 committed
67
    },
68
    methods: {
yuanbo committed
69 70 71 72
      /**
       * @description: closeDialog
       * @author: renchao
       */
73 74 75
      closeDialog () {
        this.$emit("input", false);
      },
yuanbo committed
76 77 78 79
      /**
       * @description: handleSubmit
       * @author: renchao
       */
80 81 82 83
      handleSubmit () {
        this.$parent.addSave(this.ruleForm);
        this.$emit("input", false);
      },
田浩浩 committed
84
    },
85
  };
田浩浩 committed
86 87
</script>
<style scoped lang="scss">
88 89 90 91 92 93
  .submit-button {
    text-align: center;
    height: 52px;
    padding-top: 10px;
    background-color: #fff;
  }
田浩浩 committed
94
</style>