<template>
  <div class="app-container">
    <!-- <div class="nhgel"></div> -->
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px" class="nghfs">
     <p class="lqw" style="font-weight: 700;font-size: 15px;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 搜索条件</p>
     <el-row>
       <el-col :span="24">
         <el-col :span="7">
           <el-form-item label="联系人" prop="visitName">
                   <el-input
                     v-model="queryParams.visitName"
                     placeholder="请输入联系人"
                     clearable
                     @keyup.enter.native="handleQuery"
                   />
                 </el-form-item>
         </el-col>

         <el-col :span="7">
           <el-form-item label="联系方式" prop="visitPhone">
                   <el-input
                     v-model="queryParams.visitPhone"
                     placeholder="请输入联系方式"
                     clearable
                     @keyup.enter.native="handleQuery"
                   />
                 </el-form-item>
         </el-col>

         <el-col :span="7">
           <el-form-item label="出入日期" prop="endTime">
                   <el-date-picker style="width:220px;" clearable
                     v-model="queryParams.visitDate"
                     type="date"
                     value-format="yyyy-MM-dd"
                     placeholder="请选择出入日期">
                   </el-date-picker>
           </el-form-item>
         </el-col>
         <el-col :span="3">
           <el-button type="primary" style="background-color: #5974E0; border-color: #5974E0;" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         </el-col>
       </el-col>
       <el-col :span="24">
         <el-col :span="7">
           <el-form-item label="单位名称" prop="visitUnitName">
                   <el-input
                     v-model="queryParams.visitUnitName"
                     placeholder="请输入单位名称"
                     clearable
                     @keyup.enter.native="handleQuery"
                   />
                 </el-form-item>
         </el-col>
         <el-col :span="7">
           <el-form-item label="来访地点" prop="appointmentSite">
                   <el-select clearable v-model="queryParams.appointmentSite" placeholder="请选择来访地点" >
                     <el-option
					 
                       v-for="dict in dict.type.jluly"
                       :key="dict.value"
                       :label="dict.label"
                       :value="dict.value"
                     />
                   </el-select>
                 </el-form-item>
         </el-col>
         <el-col :span="7">
           <el-form-item label="来访人数" prop="visitNum">
                   <el-input
                     v-model="queryParams.visitNum"
                     placeholder="请输入来访人数"
                     clearable
                     @keyup.enter.native="handleQuery"
                   />
                 </el-form-item>
         </el-col>
         <el-col :span="3">
           <el-button style="background-color: #fff; border-color: #3464EB; color: #3464EB;" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
         </el-col>
       </el-col>
     </el-row>



<!--
      <el-form-item>


      </el-form-item> -->
    </el-form>
    <div class="ntgs">
    <el-row :gutter="10" class="mb8">
     <div class="iuer">
       
       <div style="display: flex;align-items: center;">
		    <p class="lqw" style="font-weight: 700;font-size: 15px; margin-bottom: 0;"> <img src="../../../assets/images/icon_yq_htgl_btzs.png" alt="" style="width:10px;height: 10px;margin-right: 10px;"> 预约列表</p>
         <el-button
           type="primary"
           plain
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:reservat:add']"
         >新增</el-button>
         <el-button
           type="danger"
           plain
           icon="el-icon-delete"
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:reservat:remove']"
         >取消</el-button>

        <!-- <el-button
           type="danger"
           plain
           icon="el-icon-delete"
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:reservat:remove']"
         >取消</el-button> -->
         <el-button
           type="warning"
           style="background-color: #5974E0; border-color: #5974E0;"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
          v-hasPermi="['system:reservat:export']"
         >导出</el-button>
       </div>
	   <div class="ite">
	     <p v-for="(item,index) in dict.type.youke" :key="index" :class="kje==index?'actt':''" @click="ilw(item,index)">{{item.label}}</p>
	   </div>
<!--  -->
     </div>
      <!-- <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['investigate:table:add']"
        >新增</el-button>
      </el-col>

      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['investigate:table:remove']"
        >删除</el-button>
      </el-col> -->
     <!-- <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['investigate:table:export']"
        >导出</el-button>
      </el-col> -->
      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    </el-row>

    <el-table stripe :max-height="tableMaxHeight" v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
	  <el-table-column label="联系人" align="center" prop="visitName" width="120"  >
	   <template slot-scope="scope">
	  	  <el-tooltip class="item" effect="dark" :content="scope.row.visitName" placement="top">
	  	    <p style="white-space: nowrap;
	  text-overflow: ellipsis;
	  overflow: hidden;width:100%;">{{  scope.row.visitName}}</p>
	  	 </el-tooltip>
	    </template>
	    </el-table-column>
	  <el-table-column label="联系方式" align="center" prop="visitPhone" width="120"  >
	   <template slot-scope="scope">
			  <el-tooltip class="item" effect="dark" :content="scope.row.visitPhone " placement="top">
			  <p style="margin: 0; white-space: nowrap;
	  text-overflow: ellipsis;
	  overflow: hidden;width:100%;">{{scope.row.visitPhone}} </p>
	  </el-tooltip>
	    </template>
	    </el-table-column>
		 <el-table-column label="人数" align="center" prop="visitNum" />
	  <el-table-column label="出入日期" align="center" prop="" width="180" >
		  <template slot-scope="scope">
		  	  	  <div >
					 <p style="margin: 0;">{{scope.row.visitDate}}</p>
		  		 <p style="margin: 0;">{{scope.row.visitTime}}</p>
		  		  </div>
		   </template>
	 </el-table-column>
	 <el-table-column label="来访地点" align="center" prop="appointmentSite" >
		  <template slot-scope="scope">
			  <dict-tag :options="dict.type.jluly" :value="scope.row.appointmentSite"/>
		</template>
	</el-table-column>
  <el-table-column label="来访事由" align="center" prop="visitReason" >
  	  <template slot-scope="scope">
  		<el-tooltip class="item" effect="dark" :content="scope.row.visitReason" placement="top">
  			    <p style="white-space: nowrap;
  		text-overflow: ellipsis;
  		overflow: hidden;width:100%;">{{  scope.row.visitReason}}</p>
  			 </el-tooltip>
  	</template>
  </el-table-column>
  <el-table-column label="人脸图片" align="center" prop="humanFaceData" >
  	  <template slot-scope="scope">
  		  <image-preview :src="scope.row.humanFaceData" :width="50" :height="50"/>
  	</template>
  </el-table-column>
  <el-table-column label="审核状态" align="center" prop="visitType" >
  	  <template slot-scope="scope">
  		  <dict-tag :options="dict.type.youke" :value="scope.row.visitType"/>
  	</template>
  </el-table-column>
	
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            class="hyr"
            @click="getPass(scope.row)"
            v-if=" (scope.row.visitType == 1) "
            v-hasPermi="['system:reservat:sh']"
          >审核</el-button>
          <el-button
            size="mini"
            type="text"
            class="hyr"
            @click="infoBtn(scope.row)"
            v-if="scope.row.visitType == 1"
            v-hasPermi="['system:reservat:sh']"
          >拒绝</el-button>
          <!-- <el-button
            size="mini"
            type="text"
            class="hyr"
            @click="nhgeo(scope.row)"
            style="color: #00B034;"
            v-if="(scope.row.reservatType != 2) && scope.row.visitType == 1"
            v-hasPermi="['system:reservat:query']"
          >设置接待</el-button> -->
          <!-- <el-button
            type="text"
            size="mini"
            class="hyr"
            @click="handleDeletehx(scope.row)"
            v-hasPermi="['system:reservat:hx']"
            v-if="scope.row.visitStatus == 1"
          >核销</el-button> -->
		  <el-button
		    size="mini"
		    type="text"
		    class="hyr"
		    @click="handleDelete(scope.row)"
		    style="color: #FF0000;"
		    v-hasPermi="['system:reservat:remove']"
		  >删除</el-button>
          <el-button
            size="mini"
            type="text"
            class="hyr"
            @click="handleDeleteh(scope.row)"
            style="color: #00B034;"
            v-hasPermi="['system:reservat:query']"
          >查看</el-button>

		  <!-- <el-button
		    size="mini"
		    type="text"
		    icon="el-icon-edit"
		    @click="erw(scope.row)"
		    v-hasPermi="['investigate:table:edit']"
		  >二维码</el-button> -->
        </template>
      </el-table-column>
    </el-table>

    <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="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
		  <el-row>
			  <el-col :span="24">
			  		<el-form-item label="接待人员" prop="receptionId">
			  			<el-select  style="width:100%;" v-model="form.receptionId" placeholder="请选择">
			  			    <el-option
			  			      v-for="item in ksjegsg"
			  			      :key="item.receptionId"
			  			      :label="item.receptionName"
			  			      :value="item.receptionId"
                    @click.native="nhgwel(item)"
			  			      >
			  			    </el-option>
			  			  </el-select>
			  		</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>

    <el-dialog :title="titles" :visible.sync="opens" width="1000px" append-to-body>
      <el-form ref="forms" :model="forms" :rules="ruless" label-width="120px">
      <el-row>
          	  <el-col :span="8">
          	  		<el-form-item label="人数" prop="visitNum">
          	         <el-input type="number" v-model="forms.visitNum" placeholder="请输入人数" />
          	  		 </el-form-item>
          	  </el-col>
          	  <el-col :span="8">
          	  		<el-form-item label="联系人" prop="visitName">
          	  		          <el-input v-model="forms.visitName" placeholder="请输入联系人" />
          	  		        </el-form-item>
          	  </el-col>
          	  <el-col :span="8">
          	  		 <el-form-item label="联系方式" prop="visitPhone">
          	  		          <el-input v-model="forms.visitPhone" placeholder="请输入联系方式" />
          	  		        </el-form-item>
          	  </el-col>
          	  <el-col :span="8">
          	  		<el-form-item label="出入日期" prop="visitDate">
          	  		          <el-date-picker style="width:100%" clearable
          	  		            v-model="forms.visitDate"
          	  		            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="visitTime">
			  		  <el-time-picker  v-model="forms.visitTime" value-format="HH:mm:ss" format="HH:mm:ss"  style="width:100%" size="mini" placeholder="时间" />
			  		</el-form-item>
			  </el-col>
          	  <el-col :span="8">
          	  		<el-form-item label="来访地点" prop="appointmentSite">
          	        <el-select v-model="forms.appointmentSite" placeholder="请选择记录来源" >
          	          <el-option
          	            v-for="dict in dict.type.jluly"
          	            :key="dict.value"
          	            :label="dict.label"
          	            :value="dict.value"
          	          />
          	        </el-select>
          	  		 </el-form-item>
          	  </el-col>
			  <el-col :span="24">
				 <el-col :span="8">
				 		<el-form-item label="来访事由" prop="visitReason">
				 		          <el-input v-model="forms.visitReason" placeholder="请输入来访事由" />
				 		        </el-form-item>
				 </el-col>
				 <el-col :span="8">
				 		<el-form-item label="补充事由" prop="visitRemark">
				 		          <el-input v-model="forms.visitRemark" placeholder="请输入补充事由" />
				 		        </el-form-item>
				 </el-col>
				 
			  </el-col>
			  <el-col :span="24" class="enlad">
			  		<el-form-item label="人脸图片" prop="humanFaceData">
			  		    <image-upload :limit="1" v-model="forms.humanFaceData"/>
			  		</el-form-item>
			  				 
			  </el-col>
			  
      </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForms">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

	<el-dialog title="页面二维码" :visible.sync="opent" width="200px" style="padding: 0;" class="nhgrls" append-to-body>
	  <div v-show="opent" style="display: flex;justify-content: center;align-items: center;">
		  <!-- <span>{{'https://qszdh.qs163.cn/pages/index/index?id=' + this.bg}}</span> -->
			   <vue-qr   :text="'https://qszdh.qs163.cn/pages/index/index?id=' + this.bg" :size="200"></vue-qr>
	  </div>
	</el-dialog>
  </div>
</template>

<script>
import { listPost, getPost, delPost, addPost, updatePost,updateFs,updateGx } from "@/api/kaoch/renyuan";
import { listReservat, listReservatd, getReservat, delReservat, addReservat, updateReservat,setPass,delReservathx } from "@/api/tongj/reservat";
import vueQr from "vue-qr";
export default {
  name: "Post",
  dicts: ['sys_normal_disable','sys_yes_no','fange','jluly','youke'],
  components: {
      vueQr,
    },
  data() {
    return {
      // 遮罩层
      loading: true,
	  opent:false,
	  bg:null,
    titles:'',
    opens:false,
	  imageUrl:'@/assets/logo/logo.png',
	  printObj: {
	           id: "nhgrew", // 这里是要打印元素的ID
	           popTitle: "", // 打印的标题
	         },
	  pickerOptions:{
	            disabledDate (time) {
	              //disabledDate 文档上：设置禁用状态，参数为当前日期，要求返回 Boolean
	              // return time.getTime() > Date.now()//选当前时间之前的时间
	              return time.getTime() < Date.now()  - 8.64e7;//选当前时间之后的时间
	            }
	        },
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
	  checkedScoreDataDetails: [],
	  scoreDataDetailsList:[],
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 岗位表格数据
      postList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        postCode: undefined,
        postName: undefined,
        status: undefined,
        visitType:undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        receptionId: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],


      },
      ruless:{
        visitName: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        visitPhone: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        visitNum: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        visitDate: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        visitTime: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
		appointmentSite: [
		  { required: true, message: "不能为空", trigger: "blur" }
		],
		visitReason: [
		  { required: true, message: "不能为空", trigger: "blur" }
		],
		

      },
      forms:{},
			tableMaxHeight:'200',
      kje:0,
      ksjegsg:[]
    };
  },
  created() {
    this.getList();
    // this.getListh()
  window.onresize = () => {
  	      this.changeTableMaxHeight()
  	    }
  	    this.changeTableMaxHeight()
  },
  mounted() {
  	window.onresize = () => {
  	          this.changeTableMaxHeight()
  	        }
  	        this.changeTableMaxHeight()
  },
  methods: {
    /** 查询岗位列表 */
    getList() {
      this.loading = true;
      listReservat(this.queryParams).then(response => {
        this.postList = response.rows;
        // this.postList=[{'nsje':null,'visitPhone':null,'isReception':'Y'}]
        this.total = response.total;
        this.loading = false;
      });
    },
    getListh() {
      this.loading = true;
      listReservatd().then(response => {
        // this.postList = response.rows;
        this.ksjegsg= response.data
        // this.total = response.total;
        this.loading = false;
      });
    },

    ilw(row,val){
      this.kje = val
      // console.log(row)
      if(row.value == 0){
          this.queryParams.visitType = undefined
      }else{
        this.queryParams.visitType = row.value
      }
    console.log(this.kje)
      this.queryParams.pageNum  = 1
      this.getList()
    },
  nhgwel(item){
    this.form.receptionId = item.receptionId
    this.form.receptionName = item.receptionName
    this.form.receptionPhone = item.phonenumber

  },
    getPass(row) {
      const _this = this
      this.$confirm('是否审核通过', "提醒", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function() {
        return setPass({
        visitType: 3,
        reservatId: row.reservatId,
        // xmStatus:row.xmStatus
      })
      }).then(() => {
    	   _this.getList();
        _this.msgSuccess("提交成功");
      })
    },
    infoBtn(row) {
    	const _this = this
    	this.$confirm('是否拒绝', "提醒", {
    	  confirmButtonText: "确定",
    	  cancelButtonText: "取消",
    	  type: "warning"
    	}).then(function() {
    	  return setPass({
    	  visitType: 2,
    	   reservatId: row.reservatId,
    	  // xmStatus:row.xmStatus
    	})
    	}).then(() => {
    	  _this.getList();
    	  _this.msgSuccess("提交成功");
    	})

    },
    // 取消按钮
    cancel() {
      this.open = false;
	  this.opens = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
		    receptionId:undefined,
        receptionPhone:undefined,
		humanFaceData:undefined,
        // postSort: 0,
        // status: "0",
        receptionName: undefined
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.reservatId)
      this.single = selection.length!=1
      this.multiple = !selection.length
    },
    nhgeo(row){
      this.reset();
     this.open = true;
     this.title = "分配接待人员";
     this.form.reservatId = row.reservatId;
     this.form.reservatConfigTimeId=row.reservatConfigTimeId;
     this.form.visitDate=row.visitDate
    },
    handleDeleteh(row){
      this.$router.push({
        path: '/fangke/tongj/bjqs',
      		query: {
      			'id':row.reservatId,
      			'name':null,
      			'names':null,
      			'isxz':1
      		}
      })
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.forms = {
        visitType:'1'
      }

      this.opens = true;
      this.titles = "添加预约人员";
	  // this.scoreDataDetailsList = []
	  // this.$router.push({
	  //   path: '/system/bjq',
	  // })
	  // this.$router.push({
	  //   path: '/bjqs',
	  // 		query: {
	  // 			'id':null,
	  // 			'name':null,
	  // 			'names':null,
	  // 			'isxz':1
	  // 		}
	  // })
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
  //     const postId = row.investigateTableId || this.ids
  //     getPost(postId).then(response => {
  //       this.form = response.data;
		// this.scoreDataDetailsList = this.form.investigateUserList
  //       this.open = true;
  //       this.title = "修改考察配置";
  //     });
	  // if(this.isfge == true){
	  		  //下拉框点击
	  		  // this.$router.push({
	  		  //   path: '/kaochnr/bjq',
	  		  // 		query: {
	  				// 	'kcid':val.investigateTableId,
	  				// 	'isxz':2
	  		  // 		}
	  		  // })
	  // }else if(this.isfge == false){
	  		  // 单机点击
	  		  this.$router.push({
	  		    path: '/bjqs',
	  		  		query: {
	  					'kcid':row.investigateTableId,
	  					'isxz':2,
						'endTime':row.endTime,
	  		  		}
	  		  })

	  // }
    },
    /** 提交按钮 */
    submitForm: function() {
      this.$refs["form"].validate(valid => {
              if (valid) {
                // if (this.form.reservatId != null) {
                  updateReservat(this.form).then(response => {
                    this.$modal.msgSuccess("操作成功");
                    this.open = false;
                    this.getList();
                  });
                // } else {
                //   addReservat(this.form).then(response => {
                //     this.$modal.msgSuccess("新增成功");
                //     this.open = false;
                //     this.getList();
                //   });
                // }
              }
            });
    },
    submitForms: function() {
      this.$refs["forms"].validate(valid => {
              if (valid) {
                // if (this.form.reservatId != null) {
                  // updateReservat(this.forms).then(response => {
                  //   this.$modal.msgSuccess("操作成功");
                  //   this.open = false;
                  //   this.getList();
                  // });
                // } else {
                  this.forms.visitTime = this.forms.visitTime + '-' + this.forms.visitTime
                  addReservat(this.forms).then(response => {
                    this.$modal.msgSuccess("新增成功");
                    this.opens = false;
                    this.getList();
                  });
                // }
              }
            });
    },

	nglqw(val){
		this.opent = true
		this.bg = val.investigateTableId
	},


	iszheg(event){
	 console.log(event);


	 // 校验身份证：
	 console.log(reg.test(this.form.idCard),23741)
	 		if ( reg.test(this.form.idCard)|| _IDre15.test(this.form.idCard)) {
	 			// this.idea();
	 			this.go(this.form.idCard);
	 			// callback()
	 		} else {
	   if(ncjsle.test(this.form.idCard) || nhyeli.test(this.form.idCard)){
	      console.log(3)
	   }else{
	     if(gnse.test(this.form.idCard)  ){
	         console.log(4)
	     }else{
	       if(tw.test(this.form.idCard) || twe.test(this.form.idCard)){
	         console.log(5)
	       }else{
	         this.$message.error('证件格式不正确');
	       }
	     }

	   }
	 		}
	},
	erw(row){
		this.$router.push({
		  path: '/reny/ewm',
		  query:{
			   'tenantId':row.investigateTableId
			  }
		})
	},

	hussar_17Click(val) {
	        const _this = this
	        var url =process.env.VUE_APP_BASE_API + 'pages/index/index?id=' + val.investigateTableId;
			 console.log(url,this.$refs.canvas,6)
			this.opent = true
	        QRCode.toCanvas(
	                      canvas,
	                      url,//生成二维码的数据
	                      {width: 100, height:100, margin: 1.5},//margin调整二维码的白边大小
	                      function (error) {
	                        if (error) {
	                          console.log(error);
	                        }
	                      }
	                    );

	        // console.log(qrcode,987)
	      },
	/** 成绩_子添加按钮操作 */
	handleAddScoreDataDetails() {

	  let obj = {};
	  obj.duty = "";
	  obj.idCard = "";
	  obj.phonenumber = "";
	  obj.userName = "";
	  this.scoreDataDetailsList.push(obj);
	  console.log(this.scoreDataDetailsList)
	},
	/** 成绩_子删除按钮操作 */
	handleDeleteScoreDataDetails() {
	  if (this.checkedScoreDataDetails.length == 0) {
	    this.$modal.msgError("请先选择要删除的数据");
	  } else {
	    const scoreDataDetailsList = this.scoreDataDetailsList;
	    const checkedScoreDataDetails = this.checkedScoreDataDetails;
	    this.scoreDataDetailsList = scoreDataDetailsList.filter(function(item) {
	      return checkedScoreDataDetails.indexOf(item.index) == -1
	    });
	  }
	},
	/** 复选框选中数据 */
	handleScoreDataDetailsSelectionChange(selection) {
	  this.checkedScoreDataDetails = selection.map(item => item.index)
	},
	/** 成绩_子序号 */
	rowScoreDataDetailsIndex({ row, rowIndex }) {
	  row.index = rowIndex + 1;
	},
    /** 删除按钮操作 */
    handleDelete(row) {
      const postIds = row.reservatId || this.ids;
      delReservat(postIds).then(response => {
       this.$modal.msgSuccess("操作成功");
        this.getList();
      });

      // this.$modal.confirm('是否确认删除数据项？').then(function() {
      //   return delPost(postIds);
      // }).then(() => {
      //   this.getList();
      //   this.$modal.msgSuccess("删除成功");
      // }).catch(() => {});
    },
    handleDeletehx(row) {
      const postIds = row.reservatId || this.ids;
      let nhg={}
      nhg.reservatId = postIds
      delReservathx(nhg).then(response => {
       this.$modal.msgSuccess("操作成功");
        this.getList();
      });

      // this.$modal.confirm('是否确认删除数据项？').then(function() {
      //   return delPost(postIds);
      // }).then(() => {
      //   this.getList();
      //   this.$modal.msgSuccess("删除成功");
      // }).catch(() => {});
    },
	// 发送短信
	handleUpdatefas(row){
		updateFs(row).then(response => {
		 this.$modal.msgSuccess("发送成功");
		  // this.getList();
		});
	},
	handleDeletegx(row){
		updateGx(row).then(response => {
		  this.$modal.msgSuccess("发送成功");
		  // this.getList();
		});
	},
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/reservat/export', {
        ...this.queryParams
      }, `预约人员.xlsx`)
    },
		// 获取屏幕高度
		showFilterForm () {
		      this.filterActive = !this.filterActive
		      this.changeTableMaxHeight()
		    },

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

<style lang="scss">
	.enlad{
		.el-upload--picture-card{
			height: 80px;
			width: 80px;
			line-height: 80px;
		}
		.el-upload-list--picture-card .el-upload-list__item{
			height: 80px;
			width: 80px;
		}
	}
	.nhgrls{
		.el-dialog__body{
			padding: 0;
		}
	}
  .hyr{
    span{
      text-decoration:underline;
    }
  }
</style>
<style scoped lang="scss">
  .iuer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    .ite{
      display: flex;
      justify-content: space-between;
      align-items: center;
      p{
        cursor:pointer;
        margin: 0;
        font-size: 15px;
        font-family: PingFang SC;
        font-weight: 500;
        color:#666666;
        padding: 4px 12px;
        background: #Fff;
        border-radius: 4px;
        margin-right: 20px;
		position: relative;
      }
      .actt{
        background: #fff;
        // border-bottom: 3px solid #5974E0;
        // border-radius: 0;
		// border-bottom-right-radius: 4px;
        color: #5974E0;
      }
	  .actt{
		    &::after {
		          content: "";
		          width: 40%;
		          height: 5px;
				  border-radius: 3px;
		          transform: translate(-50%);
		          background-color: #5974E0;
		          position: absolute;
		          left: 50%;
		          bottom:-3px;
		        }

	  }

    }
  }
  .lqw{
    padding: 0 10px;
    margin: 0;
    margin-bottom: 20px;
  }
.nhgel{
  height: 170px;
  background-color: #313b61;
  width: 100%;
  position: absolute;
  top:0;
  left:0;
  z-index: 0;
}
	.app-container{
		background-color: #f3f4f6;
		padding-top: 10px;
	   
	}
	.ntgs{
    position: relative;
		background-color: #fff;
		padding: 5px;
		// border-radius: 5px;
		padding-top: 10px;
         padding: 10px 20px;
		 padding-left: 10px;
		.pagination-container{
			height: 50px;
		}
	}
	.nghfs{
    position: relative;
		background-color: #fff;
		padding-top: 18px !important;
		padding: 5px;
		// border-radius: 5px;
		// margin-bottom: 20px;
	}
	.ksf{
		img{
			width:100%;
			height: 100%;
		}
	}

</style>
