detailDialog.vue 2.43 KB
<template>
  <!-- 编辑 -->
  <dialogBox title="详情" @closeDialog="closeDialog" @submitForm="handleSubmit" v-model="myValue">
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
      <el-row>
        <el-col :span="6">
          <el-form-item label="行政区代码" prop="xzqdm">
            <el-input v-model="ruleForm.xzqdm" placeholder="行政区代码"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="不动产单元号" prop="bdcdyh">
            <el-input v-model="ruleForm.bdcdyh" placeholder="不动产单元号"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="行政区名称" prop="xzqmc">
            <el-input v-model="ruleForm.xzqmc" placeholder="行政区名称"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="6">
          <el-form-item label="业务编码" prop="ywbm">
            <el-input v-model="ruleForm.ywbm" placeholder="业务编码"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="6">
          <el-form-item label="上报时间" prop="sbsj">
            <el-date-picker v-model="ruleForm.sbsj" class="width100" type="datetime" placeholder="操作时间">
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </dialogBox>
</template>

<script>
export default {
  props: {
    value: { type: Boolean, default: false },
  },
  data () {
    return {
      myValue: this.value,
      ruleForm: {
        xzqdm: '',
        xzqmc: '',
        bdcdyh: '',
        ywbm: '',
        sbsj: ''
      },
      rules: {
        xzqdm: [
          { required: true, message: '行政区代码', trigger: 'blur' }
        ],
        xzqmc: [
          { required: true, message: '行政区名称', trigger: 'blur' }
        ],
        bdcdyh: [
          { required: true, message: '不动产单元号', trigger: 'blur' }
        ],
        ywmc: [
          { required: true, message: '业务名称', trigger: 'blur' }
        ],
        sbsj: [
          { required: true, message: '上报时间', trigger: 'blur' }
        ]
      }
    }
  },
  watch: {
    value (val) {
      this.myValue = val
    }
  },
  methods: {
    closeDialog () {
      this.$emit('input', false)
    },
    handleSubmit () {
      this.$emit('input', false)
    }
  }
}
</script>