<template>
    <div id="main-contain">
      <div class="position">
        <bread-crumb :crumbs='crumbs'></bread-crumb>
      </div>
      <div class="app-container">
          <div style="float: left; margin-bottom: 10px;">
            <el-date-picker
              v-model="startvalue"
              type="date"
              placeholder="选择日期"
              style="width: 150px;">
            </el-date-picker>
            <span>-</span>
            <el-date-picker
              v-model="endvalue"
              type="date"
              placeholder="选择日期"
              style="width: 150px;">
            </el-date-picker>
            <el-button type="primary" style="margin-left: 10px;">搜索</el-button>
          </div>
          <div style="float:right;margin-bottom:10px;">
            <el-button type="primary" @click="dialogFormVisible = true">打印</el-button>
            <el-button type="primary" @click="dialogFormVisible = true">新增</el-button>
              
          </div>
          <div class="tab_air">
            <el-table  :data="tableData" :fit="true" stripe>
                <el-table-column prop="year" label="名称" width="150" align="center">
                    <el-table-column prop="year" label="消毒时间" align="center" width="150">
                        <el-table-column prop="year" label="日期" align="center" width="150"></el-table-column>
                    </el-table-column>
                </el-table-column>
                <el-table-column prop="fenopda" label="透析室" align="center" min-width="60"></el-table-column>
                <el-table-column prop="dwaiod" label="累计时间" align="center" min-width="60"></el-table-column>
                <el-table-column prop="date" label="责任人" align="center" min-width="60"></el-table-column>

                <el-table-column prop="name" label="治疗室" align="center" min-width="60"></el-table-column>
                <el-table-column prop="province" label="累计时间" align="center" min-width="60"></el-table-column>
                <el-table-column prop="city" label="负责人" align="center" min-width="60"></el-table-column>

                <el-table-column prop="name" label="水处理、库房" align="center" min-width="60"></el-table-column>
                <el-table-column prop="province" label="累计时间" align="center" min-width="60"></el-table-column>
                <el-table-column prop="city" label="负责人" align="center" min-width="60"></el-table-column>

                <el-table-column prop="name" label="通风" align="center" min-width="60"></el-table-column>
                <el-table-column prop="province" label="负责人" align="center" min-width="60"></el-table-column>
                <el-table-column prop="city" label="操作" align="center" min-width="100">
                    <template slot-scope="scope">
                        <el-button
                        size="mini"
                        type="primary"
                        @click="handleEdit(scope.row.id)">编辑</el-button>
                        <el-button
                        size="mini"
                        type="danger"
                        @click="handleDelete(scope.row.id)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination
              :page-sizes="[10, 20, 50, 100]"
              :page-size="10"
              background
              style="margin-top:20px;float: right"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total"
          >
          <!-- @size-change="handleSizeChange"
              @current-change="handleCurrentChange" -->
          </el-pagination>
         </div>
           
            <!-- 新增 -->
          <el-dialog
          class="centerDialog"
          width="1000px"
          title="新增空气消毒表"
          :visible.sync="dialogFormVisible">
              <el-form :model="form" ref="form" class="airForm" :rules="airRules">
                  <div style="width: 100%;">
                    <el-form-item label="创建日期" label-width="110px" required prop="created_time">
                        <el-date-picker
                        value-format="yyyy-MM-dd"
                        v-model="form.created_time"
                        type="date"
                        placeholder="选择日期时间">
                        </el-date-picker>
                    </el-form-item>
                  </div>
                  <div class="form_title"><span >透析室</span></div>
                  <el-form-item label="消毒液" label-width="110px">
                      <el-input v-model="form.disinfection_fluid"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒方式" label-width="110px">
                      <el-input v-model="form.disinfection_methods"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒时间" label-width="110px">
                      <el-input v-model="form.disinfection_methods " ></el-input>
                  </el-form-item>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px" required prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px" required prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px" required prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  <div class="form_title"><span >治疗室</span></div>
                  <el-form-item label="消毒液" label-width="110px">
                      <el-input v-model="form.disinfection_fluid"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒方式" label-width="110px">
                      <el-input v-model="form.disinfection_methods"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒时间" label-width="110px">
                      <el-input v-model="form.disinfection_methods " ></el-input>
                  </el-form-item>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px" required prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px" required prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px" required prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  <div class="form_title"><span >水处理、库房</span></div>
                  <el-form-item label="消毒液" label-width="110px">
                      <el-input v-model="form.disinfection_fluid"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒方式" label-width="110px">
                      <el-input v-model="form.disinfection_methods"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒时间" label-width="110px">
                      <el-input v-model="form.disinfection_methods " ></el-input>
                  </el-form-item>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px" required prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px" required prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px" required prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  <div class="form_title"><span >通风</span></div>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px"  prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px"  prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px"  prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  
              </el-form>
              <div slot="footer" class="dialog-footer">
                  <el-button @click="dialogFormVisible = false">取 消</el-button>
                  <el-button type="primary" @click="saveAirDisinfect('form')">保 存</el-button>
              </div>
          </el-dialog>
          
          <!-- 编辑 -->
          <el-dialog
          class="centerDialog"
          width="1000px"
          title="编辑空气消毒表"
          :visible.sync="editDialogFormVisible">
              <el-form :model="form" ref="form" class="airForm" :rules="airRules">
                  <div style="width: 100%;">
                    <el-form-item label="创建日期" label-width="110px" required prop="created_time">
                        <el-date-picker
                        value-format="yyyy-MM-dd"
                        v-model="form.created_time"
                        type="date"
                        placeholder="选择日期时间">
                        </el-date-picker>
                    </el-form-item>
                  </div>
                  <div class="form_title"><span >透析室</span></div>
                  <el-form-item label="消毒液" label-width="110px">
                      <el-input v-model="form.disinfection_fluid"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒方式" label-width="110px">
                      <el-input v-model="form.disinfection_methods"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒时间" label-width="110px">
                      <el-input v-model="form.disinfection_methods " ></el-input>
                  </el-form-item>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px" required prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px" required prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px" required prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  <div class="form_title"><span >治疗室</span></div>
                  <el-form-item label="消毒液" label-width="110px">
                      <el-input v-model="form.disinfection_fluid"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒方式" label-width="110px">
                      <el-input v-model="form.disinfection_methods"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒时间" label-width="110px">
                      <el-input v-model="form.disinfection_methods " ></el-input>
                  </el-form-item>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px" required prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px" required prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px" required prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  <div class="form_title"><span >水处理、库房</span></div>
                  <el-form-item label="消毒液" label-width="110px">
                      <el-input v-model="form.disinfection_fluid"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒方式" label-width="110px">
                      <el-input v-model="form.disinfection_methods"></el-input>
                  </el-form-item>
                  <el-form-item label="消毒时间" label-width="110px">
                      <el-input v-model="form.disinfection_methods " ></el-input>
                  </el-form-item>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px" required prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px" required prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px" required prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  <div class="form_title"><span >通风</span></div>
                  <el-form-item label="开始时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.start_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="结束时间" required label-width="110px">
                    <el-time-picker
                        v-model="form.end_time"
                        :picker-options="{
                        selectableRange: '18:30:00 - 20:30:00'
                        }"
                        placeholder="任意时间点">
                    </el-time-picker>
                  </el-form-item>
                  <el-form-item label="累计时间" label-width="110px">
                      <el-input v-model= "form.disinfection_methods"  ></el-input>
                  </el-form-item>
                  <el-form-item label="检测合格" label-width="110px" required prop="check_out">
                      <div>
                          <el-radio v-model="form.check_out" label="1">是</el-radio>
                          <el-radio v-model="form.check_out" label="2">否</el-radio>
                      </div>
                  </el-form-item>
                  <el-form-item label="修改标志" label-width="110px" required prop="modifications">
                      <el-select v-model="form.modifications" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in options"
                          :key="index"
                          :label="item.name"
                          :value="item.id">
                          </el-option>
                      </el-select>
                  </el-form-item> 
                  <el-form-item label="责任人" label-width="110px" required prop="creator">
                      <el-select v-model="form.creator" placeholder="请选择">
                          <el-option
                          v-for="(item,index) in docList"
                          :key="index"
                          :label="item.user_name"
                          :value="item.admin_user_id">
                          </el-option>
                      </el-select>
                  </el-form-item>
                  
              </el-form>
              <div slot="footer" class="dialog-footer">
                  <el-button @click="editDialogFormVisible = false">取 消</el-button>
                  <el-button type="primary" @click="saveAirDisinfect('form')">保 存</el-button>
              </div>
          </el-dialog>
      </div>
    </div>
  </template>
  
  <script>
    import BreadCrumb from '@/xt_pages/components/bread-crumb'
    import { getAllDoctorList,
        saveAirDisinfect,
        getAirList, 
        getAirDisinfectDetail,
        updateAirDisinfect,
        deleteAirDisinfect 
    } from "@/api/device"
    import { uParseTime } from '@/utils/tools'
    const moment = require('moment')
    export default {
      name: 'airDisinfect',
      components: {
        BreadCrumb
      },
      data() {
        return {
          crumbs: [
            { path: false, name: '院感管理' },
            { path: false, name: '透析室空气消毒记录表' }
          ],
  
          dialogFormVisible:false,
          editDialogFormVisible:false,
          startvalue:'',
          endvalue:'',
          form: {
            id:0,
            created_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
            class:"",
            disinfection_methods:"",
            disinfection_fluid:"",
            sort:"1",
            creator:"",
            detection_time:"",
            detection_result:"",
            upload_time:"",
            check_out:"1",
            modifications:"",  
            start_time:new Date(2016, 9, 10, 18, 40),
            end_time:new Date(2016, 9, 10, 18, 40),
          },
        //   value1:'',
          docList:[],
          options:[
            {id:1,name:"正常"},
            {id:2,name:"撤销"}  
          ],
         airRules: {
          created_time:[{required:true,message:"请选择创建时间",trigger:"blur"}],
          start_time:[{required:true,message:"请选择开始时间",trigger:"blur"}],
        //   detection_time:[{required:true,message:"请选择检测时间",trigger:"blur"}],
        //   check_out:[{required:true,message:"请选择检验合格",trigger:"blur"}],
        //   modifications:[{required:true,message:"请选择修改标志",trigger:"blur"}],
        //   creator:[{required:true,message:"请选择创建人",trigger:"blur"}],
          end_time:[{required:true,message:"请选择结束时间",trigger:"blur"}]
         },
         limit:20,
         page:1,
         total:0,
         
         tableData: [{
                 date: '2016-05-03',
                 name: '王小虎',
                 province: '上海',
                 city: '普陀区',
                 address: '上海市普陀区金沙江路',
                 zip: 200333,
                 dwaiod:"154",
                 fenopda:"89",
                 year:"12178"
             }]
        }
      },
      created(){
        // this.getlist()
        // this.getAirList()
      },
      methods: {
    //       getlist(){
    //         getAllDoctorList().then(response=>{
    //           if(response.data.state == 1){
    //              var list = response.data.data.list
    //              console.log("list222222",list)
    //              this.docList = list
    //           }
    //         })  
    //       },
    //       saveAirDisinfect(formName){
    //          this.$refs[formName].validate(valid=>{
    //            if(valid){
    //                var params = {
    //                  start_time:this.form.start_time,
    //                  class:parseInt(this.form.class),
    //                  created_time:this.form.created_time,
    //                  disinfection_methods:this.form.disinfection_methods,
    //                  disinfection_fluid:this.form.disinfection_fluid,
    //                  sort:this.form.sort,
    //                  creator:this.form.creator,
    //                  detection_time:this.form.detection_time,
    //                  detection_result:this.form.detection_result,
    //                  upload_time:this.form.upload_time,
    //                  check_out:parseInt(this.form.check_out),
    //                  modifications:parseInt(this.form.modifications),
    //                }
    //               //  console.log("params",params)
                  
    //              saveAirDisinfect(params).then(response=>{
    //                 if(response.data.state == 1){
    //                    var list = response.data.data.list
    //                    console.log("list",list)
    //                    this.$message.success("保存成功!")
    //                    this.dialogFormVisible = false
    //                    this.getAirList()
    //                    this.form.class = ""
    //                    this.form.start_time = ""
    //                    this.form.created_ime = ""
    //                    this.form.disinfection_fluid = ""
    //                    this.form.disinfection_methods = ""
    //                    this.form.sort = ""
    //                    this.form.creator = ""
    //                    this.form.detection_time = ""
    //                    this.form.detection_result = ""
    //                    this.form.upload_time = ""
    //                 }
    //              })
    //            }
    //          })  
    //       },
  
    //       getAirList(){
    //           var params = {
    //              limit:this.limit,
    //              page:this.page,
    //           }
    //         getAirList(params).then(response=>{
    //            if(response.data.state == 1){
    //              var list = response.data.data.list
    //              var total = response.data.data.total
    //              this.tableData = list
    //              this.total = total
    //              console.log("list222",list)
    //              console.log("total",total)
    //            }
    //         })
    //       },
    //     getTime(val) {
    //        if(val == ""){
    //         return ""
    //        }else {
    //         return uParseTime(val, '{y}-{m}-{d}')
    //        }
    //     },
    //     getName(id){
    //       var name = ""
    //       for(let i=0;i<this.docList.length;i++){
    //          if(id == this.docList[i].admin_user_id){
    //              name = this.docList[i].user_name
    //          }
    //       }
    //       return name
    //     },
    //    handleCurrentChange(val) {
    //      this.page = val
    //      this.getAirList()
    //    },
    //    handleSizeChange(val){
    //       this.limit =val
    //       this.getAirList()
    //    },
       
       handleEdit(id){
        
         this.editDialogFormVisible = true
        //   getAirDisinfectDetail(id).then(response=>{
        //       if(response.data.state ==1){
        //          var detail =  response.data.data.detail
        //          console.log("detail",detail.created_time)
        //          this.form.id = detail.id
        //         //  this.form.start_time = this.getTime(detail.start_time)
        //          this.form.class = detail.class.toString()
        //          this.form.created_time = this.getTime(detail.created_time)
        //          this.form.disinfection_methods = detail.disinfection_methods
        //          this.form.disinfection_fluid = detail.disinfection_fluid
        //          this.form.sort = detail.sort
        //          this.form.creator = detail.creator
        //          this.form.detection_time = this.getTime(detail.detection_time)
        //          this.form.detection_result = detail.detection_result
        //          this.form.upload_time = this.getTime(detail.upload_time)
        //          this.form.check_out = detail.check_out.toString()
        //          this.form.modifications = detail.modifications
  
        //       }
        //   })
        },
  
    //     updateAirDisinfect(formName){
            
    //       this.$refs[formName].validate(valid=>{
    //         if(valid){
    //               var params = {
    //                  id:this.form.id,
    //                  start_time:this.form.start_time,
    //                  class:parseInt(this.form.class),
    //                  created_time:this.form.created_time,
    //                  disinfection_methods:this.form.disinfection_methods,
    //                  disinfection_fluid:this.form.disinfection_fluid,
    //                  sort:this.form.sort,
    //                  creator:this.form.creator,
    //                  detection_time:this.form.detection_time,
    //                  detection_result:this.form.detection_result,
    //                  upload_time:this.form.upload_time,
    //                  check_out:parseInt(this.form.check_out),
    //                  modifications:parseInt(this.form.modifications),
    //                }
    //              console.log("params",params)
    //             updateAirDisinfect(params).then(response=>{
    //                 if(response.data.state ==1){
    //                   var detection = response.data.data.detection
    //                   this.editDialogFormVisible = false
    //                   this.$message.success("修改成功!")
    //                   this.getAirList()
    //                 }
    //             })
    //           }
    //       })
    //     },
  
    //      handleDelete(id,index) {
    //       this.$confirm('确认删除这条记录?', '删除记录', {
    //         confirmButtonText: '确定',
    //         cancelButtonText: '取消',
    //         type: 'warning'
    //       })
    //         .then(() => {
    //           deleteAirDisinfect(id).then(response => {
    //             if (response.data.state == 0) {
    //               this.$message.error(response.data.msg)
    //               return false
    //             } else {
    //               this.tableData.splice(index, 1)
    //               this.$message.success('厂家已经删除')
    //             }
    //           })
    //         })
    //         .catch(() => {
    //         })
    //     },
      }
    }
  </script>

  <style lang="scss" scoped>
  .airForm{
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      .el-form-item{
          width:33%;
      }
      .el-date-editor.el-input, .el-date-editor.el-input__inner{
          width: 200px;
      }
      .el-input{
          width: 200px;
      }
      .el-select{
          width: 200px;
      }
      .form_title{
        width: 100%;
        margin-bottom: 10px;
        span{
            font-size: 20px;
            font-weight: bold; 
        }
      }
  }
  </style>

  <style lang="scss">
   #main-contain{
    .app-container{
        // display: flex;
        // justify-content: space-between;
        // flex-wrap: wrap;
        .tab_air{
        // 斜杠表格
        .el-table{
            th{
                padding: 0px !important;  
            }
            tr:first-of-type th:first-of-type div.cell {
                text-align: right;/*上边文字靠右*/
            }
            tr:last-of-type th:first-of-type div.cell {
                text-align: left;/*下边文字靠左*/
            }
            tr:first-of-type th:first-of-type:before {
                content: "";
                position: absolute;
                width: 1px;
                height: 100px;/*斜线的长度*/
                top: 0;
                left: 75px;
                background-color: rgb(172, 171, 171);
                opacity: 1.2;
                display: block;
                transform: rotate(-47deg);/*调整斜线的角度*/
                -webkit-transform-origin: top;
                transform-origin: top;
            }
            tr:nth-of-type(2) th:nth-of-type(1):before{
                content: "";
                position: absolute;
                width: 1px;
                height: 80px;/*斜线的长度*/
                top: 0;
                left: 100px;
                background-color: rgb(172, 171, 171);
                opacity: 1.2;
                display: block;
                transform: rotate(-47deg);/*调整斜线的角度*/
                -webkit-transform-origin: top;
                transform-origin: top;
            }
            tr:last-of-type th:first-of-type:before {
                content: "";
                position: absolute;
                width: 1px;
                height: 80px;/*斜线的长度*/
                top: 0;
                left: 125px;
                background-color: rgb(172, 171, 171);
                opacity: 1.2;
                display: block;
                transform: rotate(-48deg);/*调整斜线的角度*/
                -webkit-transform-origin: top;
                transform-origin: top;
            }
            tr:nth-of-type(2) th:nth-of-type(1):after{
                content: "";
                position: absolute;
                width: 1px;
                height: 80px;/*斜线的长度*/
                top: 8px;
                left: 0px;
                background-color: rgb(172, 171, 171);
                opacity: 1.2;
                display: block;
                transform: rotate(-76deg);/*调整斜线的角度*/
                -webkit-transform-origin: top;
                transform-origin: top;
            }
            tr:last-of-type th:first-of-type:after {
                content: "";
                position: absolute;
                width: 1px;
                height: 92px;/*斜线的长度*/
                top: 0;
                left: 59px;
                background-color: rgb(172, 171, 171);
                opacity: 1.2;
                display: block;
                transform: rotate(-76deg);/*调整斜线的角度*/
                -webkit-transform-origin: top;
                transform-origin: top;
            }
        }
        .el-table--border th, .el-table__fixed-right-patch {
            border-bottom: none !important;
        }
        .el-table td .cell, .el-table th .cell {
            padding: 0 5px !important;
        }
        // .el-table--medium td, .el-table--medium th {
        //     padding: 0px 0px !important;
        // }
     }
    }
   
     
   }
  ::-webkit-scrollbar{
    height: 15px;
  }

  </style>
  