<template>
  <div class="app-container">
    <div style="background-color: #fff;padding: 20px 20px;border-radius: 10px;">
      <p style="margin: 0; font-weight: 800;font-size: 16px;color: #343434;display: flex;align-items: center;margin-bottom: 20px;">
        <img src="../../../assets/images/icon_htgl_btzs.png" alt="" style="width: 16px;height: 20px;">
       <span style="margin-left: 10px;">巡更信息</span>
      </p>
      <div style="background: #F3F3F3;padding: 20px 15px; padding-bottom: 0;margin-bottom: 20px;">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
          <el-row>

            <el-col :span="24">
              <el-col :span="8">
                <el-form-item label="巡更类型" prop="checkType">
                        <el-select style="width:100%" v-model="queryParams.checkType" placeholder="请选择巡更类型" clearable>
                          <el-option
                            v-for="dict in dict.type.patrol_type"
                            :key="dict.value"
                            :label="dict.label"
                            :value="dict.value"
                          />
                        </el-select>
                      </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="巡更时间" prop="createTime">
                        <el-date-picker clearable
                        style="width:100%"
                          v-model="queryParams.createTime"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="请选择巡更时间">
                        </el-date-picker>
                 </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="巡更结果 " prop="checkResult">
        <el-select v-model="queryParams.checkResult" placeholder="请选择巡更结果 " clearable>
          <el-option
            v-for="dict in dict.type.patrol_type"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
              </el-col>
            </el-col>
            <el-col :span="24">
              <el-col :span="8">
                <el-form-item label="巡更路线" prop="checkAddress">
                  <el-input
                    v-model="queryParams.checkAddress"
                    placeholder="请输入巡更路线"
                    clearable
                    @keyup.enter.native="handleQuery"
                    style="width: 100%;"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item class="butt bnjle">
                  <el-button type="primary"   @click="handleQuery">搜索</el-button>
                  <el-button   @click="resetQuery">重置</el-button>
                </el-form-item>
              </el-col>

            </el-col>


          </el-row>

        </el-form>
      </div>


      <div class="casr">
        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
            <el-tab-pane label="已巡检" name="2">
              <el-row :gutter="10" class="mb8">

                <el-col :span="1.5">
                  <el-button
                    type="primary"
                    plain
                    size="mini"
                    @click="handleAdd"
                    v-hasPermi="['wuYe:checkPointRecord:add']"
                  >添加</el-button>
                </el-col>

                <el-col :span="1.5">
                  <el-button
                    type="warning"
                    plain
                    size="mini"
                    @click="handleExport"
                    v-hasPermi="['wuYe:checkPointRecord:export']"
                  >导出</el-button>
                </el-col>
                <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
              </el-row>
              <div class=" infinite-list" :style="dynamicStyle">
                <el-row :gutter="10" v-if="checkPointRecordList.length !=0" style="width: 100%;margin-left: 0;">
                  <el-col :span="6" v-for="(item,index) in checkPointRecordList" :key="index" >
                    <!-- @click="isac(item)" -->
                    <div v-if="isshoe"  :class=" item.isnum ==true ? 'ingwe' :'' " style="position: relative; background-color: #fff;box-shadow: 0px 0px 10px 0px #CDCDCD;border-radius: 4px;margin-bottom: 10px;">
                     <div class="carlist houselist">
                     	<div class="ctop flexc">
                         <el-tooltip class="item" effect="dark" :content="item.checkAddress == null? '暂无数据':item.checkAddress" placement="top-start">
                     		<div class="tit">{{item.checkAddress == null? '暂无数据':item.checkAddress}}</div>
                         </el-tooltip>
                     	</div>
                     	<div class="clists ihge">
                     		<div class="w50 ">
                     			<div class="clist"><div >巡检类型：</div><dict-tag :options="dict.type.patrol_type" :value="item.checkType"/></div>
                     		</div>
                         <div class="w50 ">
                         	<div class="clist"><div >巡检时间：</div>{{item.checkTime == null? '暂无数据':item.checkTime}}</div>
                         </div>

                     		<div class="w50 ">
                     			<div class="clist"><div >巡检路线：</div>{{item.checkAddress == null? '暂无数据':item.checkAddress}}</div>
                     			<div class="clist"><div >巡检人员：</div>{{item.checkUserName == null? '暂无数据':item.checkUserName}}</div>
                     		</div>
                     	</div>
                     </div>
                     <div style="padding: 0 10px;">
                       <div class="ingsek" style="background: #F5F9FF;border-radius: 4px;">
                         <el-carousel :interval="4000"  arrow="hover" height="150px;width:100%;" indicator-position="none" >
                             <el-carousel-item  v-for="(itemg,index) in item.imges" :key="index" v-if="item.imges.length !=0">
                         										<div style="position: relative;" @click="imge(itemg)">
                                               <!-- defaultSettings.urls+baseUrl +itemt.url -->
                         											<img :src="defaultSettings.urls+baseUrl +itemg" alt="" style="width: 100%;height: 150px;">
                         											<!-- <p style="position: absolute;bottom: 0;left: 0;font-weight: 500; height: 24px;background-color: rgba(0,0,0,.5);color: #fff;font-size: 14px;width: 100%;padding-left: 10px;line-height: 24px;margin: 0;">{{itemt.title}}</p> -->
                         										</div>
                             </el-carousel-item>
                             <el-carousel-item   v-if="item.imges.length ==0">
                                    <div style="position: relative;" >
                                               <!-- defaultSettings.urls+baseUrl +itemt.url -->
                                    <img src="../../../assets/images/zwshuj.png" alt="" style="width: 100%;height: 150px;">
                                              <!-- <p style="position: absolute;bottom: 0;left: 0;font-weight: 500; height: 24px;background-color: rgba(0,0,0,.5);color: #fff;font-size: 14px;width: 100%;padding-left: 10px;line-height: 24px;margin: 0;">{{itemt.title}}</p> -->
                                    </div>
                             </el-carousel-item>
                           </el-carousel>
                          <div style="padding: 0 10px; ">
                            <p style="font-weight: bold;font-size: 14px;color: #196CFF;">巡检详情</p>
                            <div class=" houselist">
                            	<div class="clists ihge" style="padding: 0;">
                            		<!-- <div class="w50 ">
                            			<div class="clist"><div >联系方式：</div><div>{{item.}}</div></div>
                            		</div> -->
                                <div class="w50 ">
                                	<div class="clist"><div >巡检时间：</div><div>{{item.checkResultTime == null? '暂无数据':item.checkResultTime}}</div></div>
                                </div>
                            		<div class="w50 ">
                            			<div class="clist" style="display: flex;align-items: center;"><div >巡检结果：</div><div><dict-tag :options="dict.type.check_result" :value="item.checkResult"/></div></div>
                            		</div>
                                <div class="w50 ">
                                   <div class="clist " >
                                    <div  >巡检详情：</div>
                                    <el-tooltip class="item" effect="dark" :content="item.checkResultDetails == null? '暂无数据':item.checkResultDetails" placement="top-start">
                                    <div class=" oksge" style="flex:1">{{item.checkResultDetails == null? '暂无数据':item.checkResultDetails}}</div>
                                   </el-tooltip>
                                   </div>
                                </div>
                            	</div>
                            </div>
                          </div>
                       </div>
                     </div>
                      <div class="bortt tongty" style="justify-content: center;">
                        <!-- <p style='cursor: pointer;'><span  v-hasPermi="['wuYe:checkPointRecord:edit']" @click="handleUpdate(item)">去巡检</span>  </p> -->
                        <p v-hasPermi="['wuYe:checkPointRecord:remove']" style="color:red;cursor: pointer;" @click="handleDelete(item)">删除</p>
                      </div>
                      <img v-if="item.isnum == true" src="../../../assets/images/icon_htgl_kp_gx.png" alt="" style="width: 35px;height: 35px;position: absolute;bottom: 0;right: 0;">
                    </div>
                  </el-col>
                </el-row>
                <div style="margin-top: 20px;display: flex;justify-content: center;align-items: center;" v-if="checkPointRecordList.length ==0">
                   <img   src="../../../assets/images/zwshjbig.png" alt="" style="">
                </div>
              </div>
            </el-tab-pane>
            <el-tab-pane label="未巡检" name="1">
             <el-row :gutter="10" class="mb8" >

              <el-col :span="1.5">
                 <el-button
                   type="primary"
                   plain
                   size="mini"
                   @click="handleAdd"
                   v-hasPermi="['wuYe:checkPointRecord:add']"
                 >添加</el-button>
               </el-col>

               <el-col :span="1.5">
                 <el-button
                   type="warning"
                   plain
                   size="mini"
                   @click="handleExport"
                   v-hasPermi="['wuYe:checkPointRecord:export']"
                 >导出</el-button>
               </el-col>
               <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
             </el-row>
             <div class=" infinite-list" :style="dynamicStyle">
               <el-row :gutter="10" v-if="checkPointRecordList.length !=0" style="width: 100%;margin-left: 0;">
                 <el-col :span="6" v-for="(item,index) in checkPointRecordList" :key="index" >
                   <!-- @click="isac(item)" -->
                   <div v-if="isshoe"  :class=" item.isnum ==true ? 'ingwe' :'' " style="position: relative; background-color: #fff;box-shadow: 0px 0px 10px 0px #CDCDCD;border-radius: 4px;margin-bottom: 10px;">
                    <div class="carlist houselist" >
                    	<div class="ctop flexc">
                        <el-tooltip class="item" effect="dark" :content="item.checkAddress == null? '暂无数据':item.checkAddress" placement="top-start">
                        <div class="tit">{{item.checkAddress == null? '暂无数据':item.checkAddress}}</div>
                         </el-tooltip>
                    	</div>
                    	<div class="clists ihge">
                    		<div class="w50 ">
                    			<div class="clist"><div >巡检类型：</div><dict-tag :options="dict.type.patrol_status" :value="item.checkStatus"/></div>
                    		</div>
                    	   <div class="w50 ">
                    	   	<div class="clist"><div >巡检时间：</div>{{item.checkResultTime == null? '暂无数据':item.checkResultTime}}</div>
                    	   </div>
                    		<div class="w50 ">
                    			<div class="clist"><div >巡检路线：</div>{{item.checkAddress == null? '暂无数据':item.checkAddress}}</div>
                    			<div class="clist"><div >巡检人员：</div>{{item.checkUserName == null? '暂无数据':item.checkUserName}}</div>
                    		</div>
                    	</div>
                    </div>
                     <div class="bortt tongty" style="justify-content: space-between;">
                       <p ><span  v-hasPermi="['wuYe:checkPointRecord:edit']" @click="handleUpdate(item)">去巡检</span>  </p>
                       <p v-hasPermi="['wuYe:checkPointRecord:remove']" style="color:red">删除</p>
                     </div>
                     <img v-if="item.isnum == true" src="../../../assets/images/icon_htgl_kp_gx.png" alt="" style="width: 35px;height: 35px;position: absolute;bottom: 0;right: 0;">
                   </div>
                 </el-col>
               </el-row>
               <div style="margin-top: 20px;display: flex;justify-content: center;align-items: center;" v-if="checkPointRecordList.length ==0">
                  <img   src="../../../assets/images/zwshjbig.png" alt="" style="">
               </div>
             </div>
            </el-tab-pane>
          </el-tabs>

      </div>


      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </div>

    <!-- 添加或修改岗位对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="640px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="巡检结果 " prop="checkResult">
                      <el-select v-model="form.checkResult" placeholder="请选择巡检结果">
                        <el-option
                          v-for="dict in dict.type.check_result"
                          :key="dict.value"
                          :label="dict.label"
                          :value="dict.value"
                        ></el-option>
                      </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="巡检时间 " prop="checkResultTime">
             <el-date-picker
             style="width: 100%;"
               v-model="form.checkResultTime"
               type="date"
               value-format="yyyy-MM-dd"
               placeholder="请选择巡检结果时间">
             </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="巡检结果详情" prop="checkResultDetails">
              <el-input v-model="form.checkResultDetails"  placeholder="请输入内容" />
            </el-form-item>
          </el-col>

          <el-col :span="24">
            <el-form-item label="巡检结果照片" prop="checkResultPhoto">
                <image-upload v-model="form.checkResultPhoto"/>
            </el-form-item>
          </el-col>
        </el-row>



      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listCheckPointRecord, getCheckPointRecord, delCheckPointRecord, addCheckPointRecord, updateCheckPointRecord  } from "@/api/wuguan/checkPointRecord";
import 'videojs-flash'
const defaultSettings = require("@/settings.js");
export default {
  name: "CheckPointRecord",
  dicts: ['sys_normal_disable','patrol_type','patrol_status','check_result'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 巡检点记录表格数据
      checkPointRecordList: [],
      baseUrl: process.env.VUE_APP_BASE_API,
      defaultSettings:defaultSettings,
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        checkPointManageId: null,
        dateTimeNum: null,
        checkType: null,
        checkTime: null,
        checkAddress: null,
        userName: null,
        useId: null,
        checkUserName: null,
        checkUseId: null,
        checkResult: null,
        checkResultDetails: null,
        checkResultPhoto: null,
        checkResultTime: null,
        checkStatus:2,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {

      },
      activeName:'2',
      videoState: false, // 视频播放状态
      poster:true,
      controls:true,
      videoData:{},
       player: null,
       isshoe:true,
       imges:[],
       systemTime:'',
       tableMaxHeight:'200',
    };
  },
  computed: {
    dynamicStyle() {
      return {
        overflowY:'auto',
        height: this.tableMaxHeight+ 'px',
         paddingTop:'10px'
      }
    }
    },
  created() {
    this.getList();
 window.onresize = () => {
 	      this.changeTableMaxHeight()
 	    }
 	    this.changeTableMaxHeight()
 },
 mounted() {
 	window.onresize = () => {
 	          this.changeTableMaxHeight()
 	        }
 	        this.changeTableMaxHeight()
 },
  beforeDestroy() {
      if (this.player) {
        this.player.dispose()
      }
    },
  methods: {
    /** 查询岗位列表 */
    getList() {
      this.loading = true;

      listCheckPointRecord(this.queryParams).then(response => {
        this.checkPointRecordList  = response.rows;
        this.checkPointRecordList .filter(rou=>{
          rou.imges = []
          if(rou.checkResultPhoto != null && rou.checkResultPhoto != ''){
            rou.imges = rou.checkResultPhoto.split(',')
          }
          rou.isnum = false
        })
        // this.getge(this.checkPointRecordList)
        this.total = response.total;
        this.loading = false;
      });
    },

    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 获取当前时间
    gettime(){
      let nowDate = new Date()
      				  let date = {
      				    year: nowDate.getFullYear(),
      				    month: nowDate.getMonth() + 1,
      				    date: nowDate.getDate()
      				  }

      				   if (parseInt(date.date) < 10) {
      				      date.date = '0' + date.date
      				    }
                  let nghe = date.year + '-' + date.month + '-' + date.date
      				  return nghe

    },
    // 表单重置
    reset() {
      this.form = {
              checkPointRecordId: null,
              checkPointManageId: null,
              dateTimeNum: null,
              checkType: null,
              checkTime: this.gettime(),
              checkAddress: null,
              userName: null,
              useId: null,
              checkUserName: null,
              checkUseId: null,
              checkResult: null,
              checkResultDetails: null,
              checkResultPhoto: null,
              checkResultTime: null,
              createBy: null,
              createTime: null,
              updateBy: null,
              updateTime: null,
              remark: null
            };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.checkPointRecordId)
      this.single = selection.length!=1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      // this.gettime()
      this.open = true;
      this.title = "巡检点记录";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      // this.gettime()
      const checkPointRecordId = row.checkPointRecordId || this.ids
            getCheckPointRecord(checkPointRecordId).then(response => {
              this.form = response.data;
              this.open = true;
              this.title = "巡检点记录";
            });
    },
    /** 提交按钮 */
    submitForm: function() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.checkPointRecordId != null) {
            this.form.checkStatus = 2
            updateCheckPointRecord(this.form).then(response => {
                          this.$modal.msgSuccess("操作成功");
                          this.open = false;
                          this.getList();
                        });
          } else {
            addCheckPointRecord(this.form).then(response => {
                          this.$modal.msgSuccess("操作成功");
                          this.open = false;
                          this.getList();
                        });
          }
        }
      });
    },
    /** 删除按钮操作 */
        handleDelete(row) {
          const checkPointRecordIds = row.checkPointRecordId || this.ids;
          this.$modal.confirm('是否确认删除巡检点记录编号为"' + checkPointRecordIds + '"的数据项？').then(function() {
            return delCheckPointRecord(checkPointRecordIds);
          }).then(() => {
            this.getList();
            this.$modal.msgSuccess("删除成功");
          }).catch(() => {});
        },
    /** 导出按钮操作 */
    handleExport() {
      this.download('wuYe/checkPointRecord/export', {
              ...this.queryParams
            }, `checkPointRecord_${new Date().getTime()}.xlsx`)
    },

      handleClick(tab, event){
        this.queryParams.checkStatus = tab.name
        // this.form.manualType = this.activeName
        this.queryParams.pageNum = 1;
        // this.ids = []
        this.getList()
         // console.log(tab.name, event,this.activeName);
      },
    isac(val){
      console.log(5,val)
      val.isnum = !val.isnum
      this.isshoe = false
      this.isshoe = true
    },
    // 获取屏幕高度
    showFilterForm () {
          this.filterActive = !this.filterActive
          this.changeTableMaxHeight()
        },

        changeTableMaxHeight () {
          let height = document.body.offsetHeight // 网页可视区域高度
          // if (this.filterActive) {
          //   this.tableMaxHeight = height - 320
          // } else {
            this.tableMaxHeight = height - 150
          // }
          console.log(height)
        }

  }
};
</script>
<style  lang="scss">
  .ingsek{
   .el-carousel__container{
  	 height: 150px;
   }
   .el-carousel--horizontal{
     width: 100%;
   }
  }
  .unimg{
    .el-upload--picture-card{
      width:102px;
      height: 102px;
      line-height: 102px;
    }
  }

  .bnjle{
    margin-left: 20px;
  }
  .butt{
    .el-button--small{
      padding: 9px 23px !important;
      font-size: 14px;
    }
  }
  .casr{
    .el-tabs__item.is-active{
      color: #196CFF;
    }
    .el-tabs--card > .el-tabs__header .el-tabs__item{
      padding: 0  30px !important;
    }
  }
  .el-table .el-table__header-wrapper th{
    background-color:#F5F6F8;
    color:#343434;
  }
  .el-table{
    color:#343434;
  }
</style>
<style scoped lang="scss">
  .flexc{
    display: flex;
    justify-content: space-between;
  }
  	.carlist{background: #FFFFFF;border-radius: 10px;margin-bottom: 14px;}
  		.ctop{padding:13px 12px;
  			.imgs{width: 20px;height: 21px;margin-right: 15px;}
  			.tit{font-size: 16px;color: #272727;font-weight: bold;margin-right: 7px;overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;}
  			.txt{font-weight: 500;font-size: 14px;
  				&.ca{color: #3565ED;}
  				&.cb{color: #FE5A0E;}
  				&.cc{color: #28C529;}
  			}
  			.txta{font-weight: 500;font-size: 14px;color: #AAAAAA;}
  			.num{font-size: 14px;color: #AAAAAA;}
  		}
  		.btn{height: 17px;border-radius: 9px;display: flex;align-items: center;justify-content: center;padding: 0 5px;font-size:12px;margin-right: 12px;
  			&.btna{border: 1px solid #06C770;color: #06C770;}
  			&.btnb{border: 1px solid #3565ED;color: #3565ED;}
  			&.btnc{border: 1px solid #FE5A0E;color: #FE5A0E;}
  			&.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 18px;}
  			&.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 18px;}
  			&.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 18px;}
  		}
  		.clists{padding: 12px 12px 4px;
  			.clist{font-weight: 500;margin-bottom: 8px;
  	font-size: 13px;color: #272727;display: flex;line-height: 17px;
  				.tit{font-size: 14px;color: #272727;flex: 0 0 auto;margin-right: 8px;text-align-last: justify;}
  				.imgas{display: flex;align-items: center;flex-wrap: wrap;
  					image{width: 71px;height: 71px;margin-right: 15px;margin-top:4px;}
  				}
  			}
  			.w50{
  				.clist{width: 50%;}
  			}
  		}

  	.houselist{
  		.clists{padding-bottom: 1px !important;}
  		.clist{margin-bottom: 11px !important;}
  	}
  .goe{
    p{
      margin: 0;
      font-weight: 800;
      font-size: 16px;
      color: #161616;
      margin-top: 10px;
      margin-bottom: 3px;
      padding: 0 10px;
      overflow: hidden;
      text-overflow: ellipsis;
      display:-webkit-box; //作为弹性伸缩盒子模型显示。
      -webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
      -webkit-line-clamp:1; //显示的行
    }
    p:nth-child(2){

    }
  }
  .ingwe{
    border: 2px solid #196CFF;
  }
  .renyuangs{
    p{
      font-weight: 500;
      font-size: 14px;
      color: #161616;
      padding: 0;
    }
  }
  .tongty{
    display: flex;
    align-items: center;
  }
  .bortt{
    border-top: 1px solid #DADADA;
    margin-top: 15px;

    p{
      margin: 0;
      font-weight: bold;
      font-size: 14px;
      color: #5F8BF4;
      width:50%;
      padding: 10px;
      text-align: center;
    }
  }
  .ihge{
    .clist{
      width:100% !important;
    }
  }
  .oksge{
    overflow: hidden;
    text-overflow: ellipsis;
    display:-webkit-box; //作为弹性伸缩盒子模型显示。
    -webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
    -webkit-line-clamp:2; //显示的行
  }
  </style>


