detailDialog.vue 2.37 KB
<template>
  <!-- 编辑 -->
  <dialogBox :title="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="jrddm">
            <el-input v-model="ruleForm.jrddm" placeholder="接入点代码"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="接入点名称" prop="jrdmc">
            <el-input v-model="ruleForm.jrdmc" placeholder="接入点名称"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="队列名称" prop="dlmc">
            <el-input v-model="ruleForm.dlmc" placeholder="队列名称"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="ip地址" prop="ip">
            <el-input v-model="ruleForm.ip" placeholder="ip地址"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="6">
          <el-form-item label="负责人" prop="fzr">
            <el-input v-model="ruleForm.fzr" placeholder="负责人"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </dialogBox>
</template>

<script>
export default {
  props: {
    value: { type: Boolean, default: false },
    title: { type: String, default: '详情' }
  },
  data () {
    return {
      myValue: this.value,
      ruleForm: {
        jrddm: '',
        jrdmc: '',
        dlmc: '',
        ywmc: '',
        czsj: ''
      },
      rules: {
        jrddm: [
          { required: true, message: '接入点代码', trigger: 'blur' }
        ],
        jrdmc: [
          { required: true, message: '行政区名称', trigger: 'blur' }
        ],
        dlmc: [
          { required: true, message: '队列名称', trigger: 'blur' }
        ],
        ip: [
          { required: true, message: 'ip地址', trigger: 'blur' }
        ],
        fzr: [
          { required: true, message: '负责人', trigger: 'blur' }
        ],
      }
    }
  },
  watch: {
    value (val) {
      this.myValue = val
    }
  },
  methods: {
    closeDialog () {
      this.$emit('input', false)
    },
    handleSubmit () {
      this.$emit('input', false)
    }
  }
}
</script>