<template>
    <div class="examination">
     <el-dialog @close="closeDialog" :visible.sync="dialogTableVisible" customClass="customWidth_certifi3">
        <div slot="title" class="titleBox">
        <i :class="tableType === 0? 'el-icon-document':'el-icon-edit-outline'" style="font-size: 20px"></i>
        <!-- <img style="width: 25px; height: 25px" src='../../../../assets/img/imgScreen/more.png' /> -->
        <span style="margin-left:10px;font-size:18px">{{tableTypeDsc}}</span>
        </div>
          <el-form ref="baseData" label-width="80px" :rules="ruleValidate" :model="baseData">
         <el-row>
          <el-col :span="10">
            <el-form-item prop="pointName" label="作业点">
              <el-input v-model="baseData.pointName" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="10">
            <el-form-item prop="envDate" label="记录日期">
              <el-date-picker v-model="baseData.envDate" type="date" placeholder="选择日期" size="small"></el-date-picker>
            </el-form-item>
          </el-col>
         </el-row>
         <el-row>
          <el-col :span="10">
            <el-form-item prop="tempNow" label="当前温度">
              <el-input v-model="baseData.tempNow" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="10">
            <el-form-item prop="tempRule" label="规定温度">
               <el-input v-model="baseData.tempRule" size="small"></el-input>
            </el-form-item>
          </el-col>
         </el-row>
         <el-row>
            <el-col :span="10">
            <el-form-item prop="moisNow" label="当前湿度">
               <el-input v-model="baseData.moisNow" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="10">
            <el-form-item prop="moisRule" label="规定湿度">
              <el-input v-model="baseData.moisRule" size="small"></el-input>
            </el-form-item>
          </el-col>
         </el-row>
          <el-row>
          <el-col :span="20">
             <el-form-item prop="weather" label="天气描述">
               <el-input v-model="baseData.weather" size="small"></el-input>
            </el-form-item>
          </el-col>
         </el-row>
          <el-row>
          <el-col :span="20">
             <el-form-item prop="memo" label="备注">
              <el-input v-model="baseData.memo" size="small"></el-input>
            </el-form-item>
          </el-col>
           </el-row>
       </el-form>
        <span slot="footer" class="dialog-footer">
        <el-button type="goon" size="mini" icon="el-icon-check" @click="tableType === 0 ? addData():modifyData()">确定</el-button>
        <el-button size="mini" type="goon" icon="el-icon-remove-outline" @click="cancel">取消</el-button>
      </span>
    </el-dialog>
    </div>
</template>
<script>
import {
  getCookie,
  formatDate
} from '@/utils/util.js';
import {
  cookieUserId,
  cookieUserName
} from '@/config/config.js';
let userName = getCookie(cookieUserName);
let userId = getCookie(cookieUserId);
export default {
  props: ['showFlag', 'Params'],
    data () {
        return {
             dialogTableVisible: false,
             tableTypeDsc: '环境记录',
             tableData: [],
             baseData: {
               pointName: '',
               envDate: '',
               tempNow: '',
               tempRule: '',
               moisNow: '',
               moisRule: '',
               weather: '',
               memo: '',
             },
        }
    },
    methods: {
    },
    watch: {
      showFlag (arg) {
           let _this = this;
           _this.dialogTableVisible = true;
      }
    }
}
</script>
<style lang="less">
.customWidth_certifi3{
  width: 600px !important
}
</style>