<template>

  <el-dialog
    :title="title"
    :visible.sync="dialogVisible"
    width="80%"
    :before-close="handleClose">
    <el-form ref="editForm" :model="editForm"  label-width="120px" size="mini">
      <el-form-item label="所属燃气公司" prop="enterpriseId">
        <el-input v-model="editForm.enterpriseId"></el-input>
      </el-form-item>
      <el-form-item label="名称" prop="deviceName">
        <el-input v-model="editForm.deviceName"></el-input>
      </el-form-item>
      <el-form-item label="地址" prop="deviceAddr">
        <el-input v-model="editForm.deviceAddr"></el-input>
      </el-form-item>
      <el-form-item label="所属管道" prop="pipeId">
        <el-input v-model="editForm.pipeId"></el-input>
      </el-form-item>
      <el-form-item label="联系人" prop="linkman">
        <el-input v-model="editForm.linkman"></el-input>
      </el-form-item>
      <el-form-item label="电话" prop="phone">
        <el-input v-model="editForm.phone"></el-input>
      </el-form-item>
      <el-form-item label="型号" prop="deviceModel">
        <el-input  v-model="editForm.deviceModel"></el-input>
      </el-form-item>
      <el-form-item label="经纬度" prop="deviceModel">
        <el-row>
          <el-col :span="6" style="margin-right: 10px">
            <el-input v-model="editForm.longitude"></el-input>
          </el-col>
          <el-col :span="6">
            <el-input v-model="editForm.latitude"></el-input>
          </el-col>
        </el-row>
      </el-form-item>
      <el-form-item label="安装日期" prop="installationTime">
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择日期" v-model="editForm.installationTime" style="width: 100%;"></el-date-picker>
        </el-col>
      </el-form-item>
      <el-form-item label="最后巡检日期" prop="inspectionTime">
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择日期" v-model="editForm.inspectionTime" style="width: 100%;"></el-date-picker>
        </el-col>
      </el-form-item>
      <el-form-item label="备注信息" prop="remarks">
        <el-input type="textarea" v-model="editForm.remarks"></el-input>
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
  export default {
    props: {
      title: { type: String }
    },
    data () {
      return {
       // isShow: false,
        editForm : {},
        dialogVisible : false
      }
    },
    methods: {
      show () {
        this.dialogVisible = true;
      },
      hide () {
        this.remove()
      },
      handleClose(done) {
        this.$confirm('确认关闭？')
          .then(_ => {
            this.remove();
            //done();
          })
          .catch(_ => {});
      }
    }
  }
</script>


