<template>
  <!-- 标讯pro -->
  <div >
	  <div class="content">
	  	<div class="content_item">
	  	    <div class="label">项目属地</div>
	  	    <div class="content_right">
				<div class="bxpro_region">
				  <div class="bxpro_province">
				    <span v-for="(item,index) in bxproProvince" :class="provinceStatus==index ? 'bxpro_province_selected' : ''" @click="clickProvince(index)">{{ item.name }}</span>
				  </div>
				  <div class="bxpro_city" v-if="projectTerritory.length > 0">
				    <div class="bxpro_city_fex">
				      <div>
				        <div class="bxpro_city_fex_nr" :style="'height:'+maxHeight">
				          <span @click="changeProjectTerritory">不限</span>
				          <template v-for="(item,index) in projectTerritory">
				            <span :class="{ color_text: changeClass(item.id) }" :key="index" @click="changeProjectTerritory(item)">{{ item.regionName }} <img src="@/assets/images/bxpro/bxporre.png"></span>
				          </template>
				        </div>
				        <div style="width: 1017px;border-top: 1px solid #efefef;padding: 10px 0 0;" v-if="projecTcounty.length > 0">
				          <template v-for="(item,index) in projecTcounty">
				            <span :class="{ color_text: changeClass(item.id) }" :key="index" @click="changeProjectTerritory(item)">{{ item.regionName }} <img src="@/assets/images/bxpro/bxporre.png"></span>
				          </template>
				      </div>
				      </div>
				      <div class="bxpro_city_fex_click" @click="changeDown(isHeight)">
				        <template v-if="isHeight">
				          展开<i class="el-icon-caret-bottom"></i>
				        </template>
				        <template v-else>
				          收起<i class="el-icon-caret-up"></i>
				        </template>
				      </div>
				    </div>
				  </div>
				</div>
	  	    </div>
	  	</div>
		
		<div class="content_item">
		    <div class="label">项目名称</div>
		    <div class="content_right content_right1">
		          <div class="include-keywords">
		            <span class="lefttltel" style="	border-radius: 1px 0px 0px 1px;">包含</span>
		            <el-input class="commonly-input" v-model="keyword" style="width: 660px;"placeholder="多个关键词用空格隔开，如：市政 园林" />
		            <span class="commonly" @click="cliclikeywoder()">推荐关键词</span>
		          </div>
				  
		          <div class="include-keywords">
		            <span class="lefttltel" style="	border-radius: 1px 0px 0px 1px;">排除</span>
		            <el-input style="width: 472px;" v-model="keywordNot" placeholder="多个关键词用空格隔开，如：市政 园林" />
		          </div>
		    </div>
		</div>
	
		
		<div class="content_item">
		    <div class="label">项目名称</div>
		    <div class="content_right">
		       <div class="select-popper">
		         <span :class="{ color_text: jskBidNewsDto.projectType.length }">
		           工程类型{{jskBidNewsDto.projectType.length? jskBidNewsDto.projectType.length + "项": ""}}
		           <i class="el-icon-caret-bottom"></i>
		         </span>
		         <el-select v-model="jskBidNewsDto.projectType" class="select-multiple" multiple placeholder="请选择">
		           <el-option v-for="(item, i) in projectTypeList" :key="i":label="item" :value="item">
		           </el-option>
		         </el-select>
		       </div>
			   <div class="select-popper">
			     <span :class="{ color_text: jskBidNewsDto.projectPurposes.length }">
			       工程类别{{jskBidNewsDto.projectPurposes.length? jskBidNewsDto.projectPurposes.length + "项": ""}}
			       <i class="el-icon-caret-bottom"></i>
			     </span>
			     <el-select v-model="jskBidNewsDto.projectPurposes" class="select-multiple" multiple placeholder="请选择">
			       <el-option v-for="(item, i) in projectPurposesList":key="i":label="item":value="item">
			       </el-option>
			     </el-select>
			   </div>
			   <div class="select-popper">
			     <span :class="{color_text: jskBidNewsDto.projectLevel.length}" >
			       项目级别{{jskBidNewsDto.projectLevel.length? jskBidNewsDto.projectLevel.length + "项" : ""}}
			       <i class="el-icon-caret-bottom"></i>
			     </span>
			     <el-select v-model="jskBidNewsDto.projectLevel" class="select-multiple"multiple placeholder="请选择" >
			       <el-option  v-for="(item, i) in projectLevelList" :key="i" :label="item":value="item">
			       </el-option>
			     </el-select>
			   </div>
			   <div class="select-popper">
			     <span :class="{ color_text: jskBidNewsDto.bidAssessmentWay.length }">
			       评标办法 {{jskBidNewsDto.bidAssessmentWay.length? jskBidNewsDto.bidAssessmentWay.length + "项" : ""}}
			       <i class="el-icon-caret-bottom"></i>
			     </span>
			     <el-select v-model="jskBidNewsDto.bidAssessmentWay"class="select-multiple"multiple placeholder="请选择">
			       <el-option v-for="(item, i) in bidAssessmentWayList":key="i":label="item" :value="item">
			       </el-option>
			     </el-select>
			   </div>
			   <div class="select-popper">
			     <span :class="{ color_text: jskBidNewsDto.projectEnsureAmountPayType.length }">
			       保证金缴纳{{ jskBidNewsDto.projectEnsureAmountPayType.length ? jskBidNewsDto.projectEnsureAmountPayType.length + "项"  : ""}}
			       <i class="el-icon-caret-bottom"></i>
			     </span>
			     <el-select v-model="jskBidNewsDto.projectEnsureAmountPayType"class="select-multiple"multiple placeholder="请选择">
			       <el-option v-for="(item, i) in projectEnsureAmountPayTypeList" :key="i":label="item":value="item">
			       </el-option>
			     </el-select>
			   </div>
			   <el-dropdown@command="punishDatehandleCommand"trigger="click"ref="punishDateShowPopper":hide-on-click="false" class="el-dropdown-land">
				   <span class="el-dropdown-link":class="punishDateValue ? 'color_text' : ''">
					 发布日期{{ punishDateValue ? " 1项" : ""}}<i class="el-icon-caret-bottom"></i>
				   </span>
			       <div>
					   <el-dropdown-menu slot="dropdown">
							 <el-dropdown-item v-for="(item, i) in punishDateOptions":class="punishDateValue && punishDateValue == item.value? 'color_text': ''":key="i":command="item.value">
							   <div @mouseenter="hidePoper">{{ item.label }}</div>
							 </el-dropdown-item>
							 <el-dropdown-item command="自定义"style="padding: 0; text-indent: 20px">
							   <div @mouseenter="mouseenter">
								   <span :class="punishDateValue == '自定义' ? 'color_text' : ''">
									 自定义<i class="el-icon-arrow-right"></i>
								   </span>
								 <el-date-picker v-if="punishDateShowPopper" @change="changepunishDate" class="land_date_picker" v-model="punishDate" ref="datePicker" value-format="yyyy-MM-dd" type="daterange"
								   range-separator="至"
								   start-placeholder="开始日期"
								   end-placeholder="结束日期"
								 >
								 </el-date-picker>
							   </div>
							 </el-dropdown-item>
			           </el-dropdown-menu>
			        </div>
			   </el-dropdown>
			   <el-dropdown @command="punishDatehandleCommand1" trigger="click"ref="bidOpeningDeadlineShowPopper":hide-on-click="false" class="el-dropdown-land">
						 <span class="el-dropdown-link":class="bidOpeningDeadlineValue ? 'color_text' : ''">
						   开标截止日期{{ bidOpeningDeadlineValue ? " 1项" : ""}}<i class="el-icon-caret-bottom"></i>
						 </span>
						 <div>
						   <el-dropdown-menu slot="dropdown">
							 <el-dropdown-item v-for="(item, i) in bidOpeningDeadlineOptions":class=" bidOpeningDeadlineValue && bidOpeningDeadlineValue == item.value ? 'color_text' : '' ":key="i" :command="item.value" >
							   <div @mouseenter="hidePoper1">{{ item.label }}</div>
							 </el-dropdown-item>
							 <el-dropdown-item command="自定义"style="padding: 0; text-indent: 20px" >
							   <div @mouseenter="mouseenter1">
								 <span :class="punishDateValue == '自定义' ? 'color_text' : ''" >
								   自定义<i class="el-icon-arrow-right"></i>
								 </span>
								 <el-date-picker
								   v-if="bidOpeningDeadlineShowPopper"
								   @change="changepunishDate1"
								   class="land_date_picker"
								   v-model="bidOpeningDeadline"
								   ref="datePicker1"
								   value-format="yyyy-MM-dd"
								   type="daterange"
								   range-separator="至"
								   start-placeholder="开始日期"
								   end-placeholder="结束日期"
								 >
								 </el-date-picker>
							   </div>
							 </el-dropdown-item>
						   </el-dropdown-menu>
						 </div>
			   </el-dropdown>
			   
		    </div>
		</div>
		<div class="content_item">
		    <div class="label">项目投资额</div>
		    <div class="content_right content_right1">
				<div class="land_content_wrap-flex">
					<!-- <div class="land_content_wrap_label" >
						
					 
					</div> -->
					 <el-input  class="other_ipt"  placeholder="输入最低金额" @change="changeMoney('start','startProjectAmount','endProjectAmount')" v-limit-num clearable
							   v-model="jskBidNewsDto.startProjectAmount"></el-input>
					 <span class="other_label_span">至</span>
					 <el-input  placeholder="输入最高金额" @change="changeMoney('end','startProjectAmount','endProjectAmount')" v-limit-num
							   v-model="jskBidNewsDto.endProjectAmount" clearable class="other_ipt other_ipt1">
					   <el-button slot="append" type="primary">万元</el-button>
					 </el-input>
				 </div>
				 
				 <div class="land_content_wrap-flex">
				   <div class="land_content_wrap_label" >合同估算价
				    
				   </div>
				   <el-input  class="other_ipt"  placeholder="输入最低金额" @change="changeMoney('start','startProjectContractAmount','endProjectContractAmount')" v-limit-num clearable
				             v-model="jskBidNewsDto.startProjectContractAmount"></el-input>
				   <span class="other_label_span">至</span>
				   <el-input  placeholder="输入最高金额" @change="changeMoney('end','startProjectContractAmount','endProjectContractAmount')" v-limit-num
				             v-model="jskBidNewsDto.endProjectContractAmount" clearable class="other_ipt other_ipt1">
				     <el-button slot="append" type="primary">万元</el-button>
				   </el-input>
				 </div>
				 
				 <div class="land_content_wrap-flex">
				   <div class="land_content_wrap_label" >投标保证金
				     
				   </div>
				   <el-input  class="other_ipt"  placeholder="输入最低金额" @change="changeMoney('start','startProjectEnsureAmount','endProjectEnsureAmount')" v-limit-num clearable
				             v-model="jskBidNewsDto.startProjectEnsureAmount"></el-input>
				   <span class="other_label_span">至</span>
				   <el-input  placeholder="输入最高金额" @change="changeMoney('end','startProjectEnsureAmount','endProjectEnsureAmount')" v-limit-num
				             v-model="jskBidNewsDto.endProjectEnsureAmount" clearable class="other_ipt other_ipt1">
				     <el-button slot="append" type="primary">万元</el-button>
				   </el-input>
				 </div>
				 
		    </div>
		</div>
		<div class="content_item">
		    <div class="label">建安费暂估</div>
		    <div class="content_right content_right1">
				<div class="land_content_wrap-flex">
				  <el-input  class="other_ipt"  placeholder="输入最低金额" @change="changeMoney('start','startProjectSafeAmount','endProjectSafeAmount')" v-limit-num clearable
				            v-model="jskBidNewsDto.startProjectSafeAmount"></el-input>
				  <span class="other_label_span">至</span>
				  <el-input  placeholder="输入最高金额" @change="changeMoney('end','startProjectSafeAmount','endProjectSafeAmount')" v-limit-num
				            v-model="jskBidNewsDto.endProjectSafeAmount" clearable class="other_ipt other_ipt1">
				    <el-button slot="append" type="primary">万元</el-button>
				  </el-input>
				</div>
				<div class="land_content_wrap-flex">
				  <div class="land_content_wrap_label" >勘察费暂估
				    
				  </div>
				  <el-input  class="other_ipt"  placeholder="输入最低金额" @change="changeMoney('start','startProjectSurveyAmount','endProjectSurveyAmount')" v-limit-num clearable
				            v-model="jskBidNewsDto.startProjectSurveyAmount"></el-input>
				  <span class="other_label_span">至</span>
				  <el-input  placeholder="输入最高金额" @change="changeMoney('end','startProjectSurveyAmount','endProjectSurveyAmount')" v-limit-num
				            v-model="jskBidNewsDto.endProjectSurveyAmount" clearable class="other_ipt other_ipt1">
				    <el-button slot="append" type="primary">万元</el-button>
				  </el-input>
				</div>
				<div class="land_content_wrap-flex">
				  <div class="land_content_wrap_label" >设计费暂估
				   
				  </div>
				  <el-input  class="other_ipt"  placeholder="输入最低金额" @change="changeMoney('start','startProjectDesignAmount','endProjectDesignAmount')" v-limit-num clearable
				            v-model="jskBidNewsDto.startProjectDesignAmount"></el-input>
				  <span class="other_label_span">至</span>
				  <el-input  placeholder="输入最高金额" @change="changeMoney('end','startProjectDesignAmount','endProjectDesignAmount')" v-limit-num
				            v-model="jskBidNewsDto.endProjectDesignAmount" clearable class="other_ipt other_ipt1">
				    <el-button slot="append" type="primary">万元</el-button>
				  </el-input>
				</div>
				 
		    </div>
		</div>
		
		<div class="content_item">
		    <div class="label">资质要求</div>
		    <div class="content_right">
		        <el-input class="ename_input" 
				placeholder="请输入关键词句，如：施工总承包三级" v-model="jskBidNewsDto.qualiLimit" ></el-input>
				<span class="land_content_wrap_label_tipspan">
				  <el-tooltip popper-class="explain_tooltip" content="根据输入的关键词全称进行匹配"
				              placement="bottom" effect="light">
				    <img class="tip_svg" src="@/assets/images/bxpro/tipf.png" >
				  </el-tooltip>
				</span>
		    </div>
		</div>
		<div class="content_item">
		    <div class="label">业绩要求</div>
		    <div class="content_right">
		        <el-input class="ename_input" 
				placeholder="请输入关键词句，如：建筑工程" v-model="jskBidNewsDto.projectLimit" ></el-input>
				<span class="land_content_wrap_label_tipspan">
				  <el-tooltip popper-class="explain_tooltip" content="根据输入的关键词全称进行匹配"
				              placement="bottom" effect="light">
				    <img class="tip_svg" src="@/assets/images/bxpro/tipf.png" >
				  </el-tooltip>
				</span>
		    </div>
		</div>
		<div class="content_item">
		    <div class="label">人员要求</div>
		    <div class="content_right">
		        <el-input class="ename_input" 
				placeholder="请输入关键词句，如：一级建造师" v-model="jskBidNewsDto.personLimit" ></el-input>
				<span class="land_content_wrap_label_tipspan">
				  <el-tooltip popper-class="explain_tooltip" content="根据输入的关键词全称进行匹配"
				              placement="bottom" effect="light">
				    <img class="tip_svg" src="@/assets/images/bxpro/tipf.png" >
				  </el-tooltip>
				</span>
		    </div>
		</div>
		<div class="content_item content_item_padding0">
		    <div class="geduan">
		       
		    </div>
		</div>
		<div class="content_item content_item_padding0">
		    <div class="label">招标人</div>
		    <div class="content_right content_right1">
		        <div class="content_right1-flex">
				  <el-input style="width: 520px;"  v-model="jskBidNewsDto.tenderee"clearable placeholder="请输入关键字"/>
		        </div>
				
				<div class="content_right1-flex" style="margin-left: 106px;">
				  <div class="label-zi" >
					  代理机构
				  </div>
				  <el-input style="width: 520px;" v-model="jskBidNewsDto.agency" clearable placeholder="请输入关键字"/>
				  
				</div>
		    </div>
		</div>
		<div class="content_item content_item_padding0">
		    <div class="geduan">
		       
		    </div>
		</div>
		<div class="content_item content_item_padding0">
			
			<div class="search-new">
				<span @click="search()">查询</span>
				<span @click="reset">重置</span>
			</div>
		</div>
		
		
		
	</div>
	<div class="bottomlist">
		<div class="bottomlist-title">
			<div></div>
			<div class="title-right">
				<p>共有{{total}}条</p>
				<p>
					<img src="@/assets/images/EXCEL.png" alt="">
					<el-popover
					    placement="top-end"
					    width="200"
					    trigger="hover"
					    content="功能正在开发中">
											  <span class="excel" slot="reference">导出EXCEL</span>
					  </el-popover>
				</p>
			</div>
			  
		</div>
		<div class="table-item-jf1" v-if="tableData.length==0">
			<img class="item-jf-img" src="@/assets/images/kong.png" alt="">
			<div class="item-jf-titel">抱歉，没找到相关数据！</div>
			<div class="item-jf-text">建议调整关键词或筛选条件，重新搜索！</div>
		</div>  
		
		<div class="table-item" v-if="tableData.length>0">
		  <el-table :data="tableData"  element-loading-text="Loading" border fit highlight-current-row>
				<el-table-column  label="序号" width="60">
				  <template slot-scope="scope">
					 <span>{{(page - 1) *20 + scope.$index + 1}}</span>
				  </template>
				</el-table-column>
				<el-table-column  label="发布日期" width="100" >
							  <template slot-scope="scope">
							   {{ scope.row.pubdate||'--'}}
							  </template>
				 </el-table-column>
				<el-table-column label="项目名称"   >
						<template slot-scope="scope">
							  <router-link  :to="'/radar/bxprozbgg/details/'+ scope.row.id" tag="a" class="list-titel-a"  v-html="scope.row.projectName"></router-link>
						</template>
							  
				</el-table-column>
				<el-table-column  label="工程用途" width="161" >
							  <template slot-scope="scope">
								 {{ scope.row.projectPurposes||'--'}}
								</template>
								
				</el-table-column>
				<el-table-column prop="zj" label="项目金额" width="161" >
							<template slot-scope="scope">
								<ul class="bxpro_list_money">
								  <template v-if="scope.row.projectInvestmentAmount ||
								  scope.row.projectContractAmount ||
								  scope.row.projectSafeAmount ||
								  scope.row.projectSurveyAmount ||
								  scope.row.projectDesignAmount">
								    <li v-if="scope.row.projectInvestmentAmount">
								      <span >
								        <span >投资额：{{ scope.row.projectInvestmentAmount }}万元</span>
								      </span>
								    </li>
								    <li v-if="scope.row.projectContractAmount">
								      <span >
								        <span >控制价：{{ scope.row.projectContractAmount }}万元</span>
								      </span>
								    </li>
								    <li v-if="scope.row.projectSafeAmount">
								      <span >
								        <span >建安费：{{ scope.row.projectSafeAmount }}万元</span>
								      </span>
								    </li>
								    <li v-if="scope.row.projectSurveyAmount">
								      <span >
								        <span >勘察费：{{ scope.row.projectSurveyAmount }}万元</span>
								      </span>
								    </li>
								    <li v-if="scope.row.projectDesignAmount">
								      <span >
								        <span >设计费：{{ scope.row.projectDesignAmount }}万元</span>
								      </span>
								    </li>
								  </template>
								  <li v-else>--</li>
								</ul>
							</template>
								
				 </el-table-column>
				 <el-table-column prop="zj" label="投标保证金（万元）" width="146" >
				 			<template slot-scope="scope">
				 				{{ scope.row.projectEnsureAmount||'--'}}
				 			</template>
				  </el-table-column>
				  <el-table-column prop="zj" label="评标办法" width="106" >
				  			<template slot-scope="scope">
				  				{{ scope.row.bidAssessmentWay||'--'}}
				  			</template>
				   </el-table-column>
				   <el-table-column prop="zj" label="评标委员会有无业主代表" width="176" >
				   			<template slot-scope="scope">
								<template v-if="scope.row.bidMettingHasProjectUnit==1">
									无
								</template>
								<template v-else-if="scope.row.bidMettingHasProjectUnit==2">
									有
								</template>
								<template v-else>
									--
								</template>
				   			</template>
				    </el-table-column>
					<el-table-column prop="zj" label="有无预付款" width="94" >
								<template slot-scope="scope">
									<template v-if="scope.row.hasAdvanceAmount==1">
										无
									</template>
									<template v-else-if="scope.row.hasAdvanceAmount==2">
										有
									</template>
									<template v-else>
										--
									</template>
								</template>
					 </el-table-column>
					 <el-table-column prop="zj" label="招标人" width="280" >
					 			<template slot-scope="scope">
									<span class="list-titel-a"   @click="getUipIdByCid(item.tendereeId)" v-html="item.tenderee">
									</span>
					 			
					 			</template>
					  </el-table-column>
		  </el-table>
		</div>
		
		
		
		
		
		<div class="pagination clearfix"  v-show="total>0">
			  <el-pagination
			    background
			    :page-size="pageSize"
			    :current-page="page"
			    @current-change="handleCurrentChange"
			    layout="prev, pager, next"
			    :total="total">
			  </el-pagination>
		</div>
		
	</div>
	
    <!-- 关键词弹窗  -->
    <Keyword ref="keyword" @keywordClick="keywordClick" />
 
  </div>
</template>
<script>
   import jsk_data from '../../../../../public/jsk.json';
   import Keyword from "@/components/Keyword";
   import {encodeStr} from "@/assets/js/common.js"
   import api from '@/api/radar/radar.js';
  export default {
    name: "bxprozbgg",
    components: {
		Keyword
    },
    data(){
      return{
		  encodeStr,
        allDownloadList:[],
        province:[
          {
            "id": "500000",
            "regionName": "重庆",
            "regionLevel": "1",
            "parentId": "100000"
          },
          {
            "id": "510000",
            "regionName": "四川省",
            "regionLevel": "1",
            "parentId": "100000"
          },
        ],
        provinceValue:'',
        provinceName:'',
        showReport:true,
        activeIndex: 0,
        openVip: {
          open: false,
        },
        loginData: {
          loginShow: false
        },
        checkType: [
          {name: '含竞争对手', value: 'hasFile'},
          {name: '含项目简析', value: 'projectCharacteristics'},
          {name: '含成本分析', value: 'costAnalysis'},
          {name: '含报价策略与市场分析', value: 'marketAnalysis'}
        ],
        // checked: false,
        navList: [
          {
            value: '招标公告',
            url:'bxprozbgg',
            new:true,
          },
          {
            value: '中标候选人',
            url:'bxprozbhxr',
            new:true,
          }
        ],

        isHeight: true,
        maxHeight: '42px',

        keyword:'',
        keywordNot:'',
        //项目属地
        isProvinceId:500000,//判断直辖市
        provinceStatus:null,
        bxproProvince:[
          {
            id:500000,
            name: '重庆',
          },
          {
            id:510000,
            name: '四川',
          }
        ],
        projectTerritory:[],
        projecTcounty:[],
        projectTerritoryId:[],
        projectTerritorylist:[],
        projectTypeList: [
          "施工",
          "勘察设计",
          "勘察",
          "设计",
          "监理",
          "工程总承包",
          "测绘",
          "施工图审查",
          "造价咨询",
          "招标代理",
          "规划编制",
          "方案编制",
          "检测",
          "审计",
          "项目管理",
          "全过程工程咨询",
          "ppp",
          "其他"
        ],//工程类型
        projectPurposesList: [
          "居住建筑",
          "办公建筑",
          "商业建筑",
          "文化建筑",
          "体育建筑",
          "教育建筑",
          "科研建筑",
          "卫生建筑",
          "旅馆酒店建筑",
          "旅游建筑",
          "交通建筑",
          "广播电影电视建筑",
          "居民服务建筑",
          "人防建筑",
          "厂房",
          "仓库",
          "工业配套建筑",
          "构筑物工程",
          "建筑配套工程",
          "自来水厂工程",
          "净水厂工程",
          "输水管网工程",
          "污水处理站工程",
          "污水处理厂工程",
          "污水管网工程",
          "市政道路工程",
          "市政桥梁工程",
          "市政隧道工程",
          "动物生产建筑",
          "植物栽培建筑",
          "农产品存储建筑",
          "农副产品加工建筑",
          "农机具维修建筑",
          "农村能源建筑",
          "城市轨道交通工程",
          "综合管廊工程",
          "园林绿化工程",
          "垃圾处理工程",
          "保洁工程",
          "公共厕所工程",
          "楼宇照明工程",
          "道路照明工程",
          "景观照明工程",
          "燃气工程",
          "热力工程",
          "其它市政附属设施工程",
          "交通安全设施工程",
          "土石方工程",
          "地灾治理工程",
          "文物保护工程",
          "公路工程",
          "公路桥梁工程",
          "公路隧道工程",
          "水利枢纽工程",
          "水环境治理工程",
          "农田灌溉工程",
          "城镇供水工程",
          "水力发电工程",
          "供配电工程",
          "输变电工程",
          "发电工程",
          "机电工程",
          "铁路工程",
          "港口工程",
          "航道工程",
          "通信工程",
          "民航工程",
          "石油化工工程",
          "矿山工程",
          "冶金工程",
          "其他"
        ],//工程类别
        projectLevelList:[
          "省级",
          "市级",
          "区县级"
        ],//项目级别
        addressList: [],
        addressType: [],
        props: {
          multiple: true,
          expandTrigger: "hover",
          value: "id",
        },
        bidAssessmentWayList:[
          "综合评估法",
          "性价比法",
          "简易评标法",
          "最低投标价法",
          "最低评标价法",
          "组合低价评标法",
          "固定低价评标法",
          "设备运行年限评标法",
          "分步评审法",
          "技术评分最低标价法",
          "二合一评标法",
          "评定分离法",
          "合理低价法",
          "固定价随机抽取中标人法",
          "定性评审法"
        ],//评标办法
        projectEnsureAmountPayTypeList:[
          "电汇",
          "银行保函",
          "电子保函",
          "商业保函",
          "现金",
          "电子保险",
          "银行汇票",
          "银行转账"
        ],//保证金缴纳
        //发布日期
        punishDateValue: "",
        punishDateOptions: [
          {
            label: "不限",
            value: "",
          },
          {
            label: "近一天",
            value: "近一天",
          },
          {
            label: "近三天",
            value: "近三天",
          },
          {
            label: "近五天",
            value: "近五天",
          },
          {
            label: "近七天",
            value: "近七天",
          },
          {
            label: "近十天",
            value: "近十天",
          },
          {
            label: "近半月",
            value: "近半月",
          },
          {
            label: "近一月",
            value: "近一月",
          },
          {
            label: "近三月",
            value: "近三月",
          },
          // {
          //   label: "近半年",
          //   value: "近半年",
          // },
          // {
          //   label: "近1年",
          //   value: "近1年",
          // },
        ],
        punishDateShowPopper: false,
        punishDate: "",
        //开标截止日期
        bidOpeningDeadlineValue: "",
        bidOpeningDeadlineOptions: [
          {
            label: "不限",
            value: "",
          },
          {
            label: "近一天",
            value: "近一天",
          },
          {
            label: "近三天",
            value: "近三天",
          },
          {
            label: "近五天",
            value: "近五天",
          },
          {
            label: "近七天",
            value: "近七天",
          },
          {
            label: "近十天",
            value: "近十天",
          },
          {
            label: "近半月",
            value: "近半月",
          },
          {
            label: "近一月",
            value: "近一月",
          },
          {
            label: "近三月",
            value: "近三月",
          },
        ],
        bidOpeningDeadlineShowPopper: false,
        bidOpeningDeadline: "",

        conditionsArr: [],

        fieldshow: false,
        fieldText: '默认排序',
        field: '', //查询结果排序方式
        desc: '', //查询结果排序方式
        fieldOptions: [
          {
            key: "",
            value: "默认排序",
            status: true,
            desc: '',
          },
          {
            key: "pubdate",
            value: "发布时间从晚到早",
            status: false,
            desc: 'desc',
          },
          {
            key: "endTimeDate",
            value: "开标截至时间从晚到早",
            status: false,
            desc: 'desc',
          },
          {
            key: "endTimeDate",
            value: "开标截至时间从早到晚",
            status: false,
            desc: 'asc',
          },
        ],

        selectedHeight: 64,
        selectedHeights: false,

        pageFlag: true,
        showList:false,
        total: 0,
        limit:20,
        currentPage:1,
        jskBidNewsDto:{
          province: [],
          city: [],
          county: [],
          projectType: [],
          projectPurposes: [],
          bidAssessmentWay: [],
          projectEnsureAmountPayType: [],
          projectLevel: [],
        },

        id:"",
        companyName1:"",
        type:"",
		tableData: [{
			id: 0,
			name: '20重庆债14(2005938)',
			time: '2020-09-18',
			gm: '285.24',
			zj: '否',
		}],
		total:0,
		page:1,
		pageSize:20,

      }
    },
   
    computed: {
      checkjskBidNewsDto() {
        let arr = [];
        let flag = false;
        let data = {};
        let keyid, value, title;
        if (this.projectTerritorylist.length > 0) {
          data = {
            title: "项目属地:",
            value: this.projectTerritorylist.join(","),
          }
          arr.push(data)
          flag = true;
        }
        if (this.keyword) {
          data = {
            title: "项目名称包含:",
            value: this.keyword,
          }
          arr.push(data)
          flag = true;
        }
        if (this.keywordNot) {
          data = {
            title: "项目名称排除:",
            value: this.keywordNot,
          }
          arr.push(data)
          flag = true;
        }
        if(this.punishDateValue=="自定义"){
          data = {
            title: "发布日期:",
            value: this.jskBidNewsDto.startPubdate +"~" +this.jskBidNewsDto.endPubdate,
          }
          arr.push(data)
        }
        if(this.punishDateValue&&this.punishDateValue!="自定义"){
          data = {
            title: "发布日期:",
            value: this.punishDateValue,
          }
          arr.push(data)
        }
        if(this.bidOpeningDeadlineValue=="自定义"){
          data = {
            title: "开标截止日期:",
            value: this.jskBidNewsDto.startEndTimeDate +"~" +this.jskBidNewsDto.endEndTimeDate,
          }
          arr.push(data)
        }
        if(this.bidOpeningDeadlineValue&&this.bidOpeningDeadlineValue!="自定义"){
          data = {
            title: "开标截止日期:",
            value: this.bidOpeningDeadlineValue,
          }
          arr.push(data)
        }
        for (var i in this.jskBidNewsDto) {
          if (this.jskBidNewsDto[i]) {
            keyid = i;
            value = this.jskBidNewsDto[i];
            if (
              Object.prototype.toString.call(this.jskBidNewsDto[i]) ===
              "[object Array]"
            ) {
              if (this.jskBidNewsDto[i].length > 0) {
                flag = true;
                switch (i) {
                  case 'projectType':
                    title = "工程类型:";
                    break;
                  case 'projectPurposes':
                    title = "工程类别:";
                    break;
                  case 'projectLevel':
                    title = "项目级别:";
                    break;
                  case 'bidAssessmentWay':
                    title = "评标办法:";
                    break;
                  case 'projectEnsureAmountPayType':
                    title = "保证金缴纳:";
                    break;
                  default:
                    title = "";
                    break;
                }
              } else {
                title = ""
              }
            } else {
              title = ""
              flag = true;
            }
            if (title) {
              data = {
                keyid: keyid,
                value: value,
                title: title,
                key: value
              }
              arr.push(data)
            }
          }
        }
        this.conditionsArr = arr
        return flag;
      },
    },
    created() {
      this.searchDic();
      // this.clickProvince(0,1);
	  this.search();
	  this.changeDown(false)
    },
    mounted() {
    },
    methods:{
      refresh() {
        this.$router.go(0)
      },
      //省份切换
      clickProvince(index,type=0){
        if(this.provinceStatus != index || type == 1 ){
          this.provinceStatus = index
          let projectTerritory = []

            var id = this.bxproProvince[index].id
            var province = jsk_data.find(function(item) {
              return item.id === id && item.regionLevel === 1;
            });
            // 市区
            var city = jsk_data.filter(function(item) {
              return item.parentId === province.id && item.regionLevel === 2;
            });

            var district = []
            if(this.bxproProvince[this.provinceStatus].id == this.isProvinceId){
              // 区县
              district = jsk_data.filter(function(item) {
                return city.some(function(c) {
                  return c.id === item.parentId;
                }) && item.regionLevel === 3;
              });
            }
            projectTerritory = [...city, ...district]
            this.projectTerritory = projectTerritory
            this.deleteProjectTerritorylist()
          }
      },

      //下拉
      searchDic(){
		  api.searchDic().then(res=>{
		  	this.projectTypeList = res.data.bidAchievementType;
		  	this.projectPurposesList = res.data.bidProjectType;
		  	this.projectLevelList = res.data.bidProjectLevel;
		  	this.bidAssessmentWayList = res.data.bidAssessmentWay;
		  	this.projectEnsureAmountPayTypeList = res.data.bidAmountPayType;
		  }).catch(error=>{
		  	
		  });
      },

      // 关键词推荐
      cliclikeywoder() {
        this.$refs.keyword.show();
      },
      keywordClick(val) {
        this.keyword = val
      },

      //项目属地
      changeProjectTerritory(item){

        let name = item.regionName,id = item.id

        if(name && id){
          let isId = true
          for(var i=0;i<this.projectTerritoryId.length;i++){
            if(this.projectTerritoryId[i].id == id){
              this.projectTerritoryId.splice(i,1)
              this.projectTerritorylist.splice(i,1)
              isId = false
            }
          }
          if(isId){
            this.projectTerritorylist.push(name)
            this.projectTerritoryId.push({regionLevel:item.regionLevel,id:id})
          }

        }else{
          this.deleteProjectTerritorylist()
        }
      },
      deleteProjectTerritorylist(){
        this.projectTerritorylist = []
        this.projectTerritoryId = []
        this.projecTcounty = []
      },
      changeClass(id){
        for(var i=0;i<this.projectTerritoryId.length;i++){
          if(this.projectTerritoryId[i].id == id){
            return true
          }
        }
      },

      //金额
      changeMoney(text,Min,Max) {
        if (
          this.jskBidNewsDto[Min] &&
          this.jskBidNewsDto[Max] &&
          Number(this.jskBidNewsDto[Min]) >
          Number(this.jskBidNewsDto[Max])
        ) {
          this.$message.warning("最低金额不能大于最高金额！");
          text == "start" ?
            (this.jskBidNewsDto[Min] = "") :
            (this.jskBidNewsDto[Max] = "");
        }
      },
      //排序
      handsequencingList(index) {
        
        this.fieldshow = false;
        this.field = this.fieldOptions[index].key;
        this.desc = this.fieldOptions[index].desc;
        for (let i = 0; i < this.fieldOptions.length; i++) {
          this.fieldOptions[i].status = false;
        }
        this.fieldText = this.fieldOptions[index].value;
        this.fieldOptions[index].status = true;
        this.search();
      },
      //项目级别
      addressListfn() {
        var str = [];
        for (let x = 0; x < 3; x++) {
          for (let i = 0; i < jsk_data.length; i++) {
            if (jsk_data[i].regionLevel == x + 1 && x + 1 == 1) {
              str.push({
                id: jsk_data[i].id,
                label: jsk_data[i].regionName,
                short: jsk_data[i].short,
                value: jsk_data[i].parentId,
                children:jsk_data[i].id==900000?undefined:[],
              });
            } else if (jsk_data[i].regionLevel == x + 1 && x + 1 == 2&&str) {
              for (let j = 0; j < str.length; j++) {
                if (str[j].id == jsk_data[i].parentId) {
                  str[j].children.push({
                    id: jsk_data[i].id,
                    label: jsk_data[i].regionName,
                    short: jsk_data[i].short,
                    value: jsk_data[i].parentId,
                    children: [],
                  });
                }
              }
            } else if (jsk_data[i].regionLevel == x + 1 && x + 1 == 3) {
              for (let j = 0; j < str.length; j++) {
                if(str[j].children){
                  for (let k = 0; k < str[j].children.length; k++) {
                    if (str[j].children[k].id == jsk_data[i].parentId) {
                      str[j].children[k].children.push({
                        id: jsk_data[i].id,
                        label: jsk_data[i].regionName,
                        short: jsk_data[i].short,
                        value: jsk_data[i].parentId,
                      });
                    }
                  }
                }
              }
            }
          }
        }
        this.addressList = str;
      },
      deleteDomicile() {
        this.$refs.address.handleClear();
      },
      domicileChange() {
        let arr = this.$refs.address.getCheckedNodes();
        let province = [],
          city = [],
          county = [];
        this.domicile = [];
        for (var i in arr) {
          if (arr[i].parent) {
            if (!arr[i].parent.checked) {
              arr[i].hasChildren && city.push(arr[i].value);
              arr[i].hasChildren && this.domicile.push(arr[i].label);
              !arr[i].hasChildren && county.push(arr[i].value);
              !arr[i].hasChildren && this.domicile.push(arr[i].label);
            }
          } else {
            province.push(arr[i].value);
            this.domicile.push(arr[i].label);
          }
        }
        var obj = JSON.parse(JSON.stringify(this.jskBidNewsDto));
        obj.province = province;
        obj.city = city;
        obj.county = county;
        this.jskBidNewsDto = obj;
      },
      //发布日期
      punishDatehandleCommand(command) {
        var obj = JSON.parse(JSON.stringify(this.jskBidNewsDto));
        if (command && command != "自定义") {
          this.punishDateValue = command;
          this.$refs.punishDateShowPopper.hide();
          const datetime = new Date();
          var startTime, endTime, Year, Month, Day;
          Year = datetime.getFullYear();
          Month = datetime.getMonth() + 1;
          Day = datetime.getDate();
          switch (command) {
            case "近一天":
              startTime = Year + "-" + Month + "-" + Day;
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近三天":
              var newTime = datetime.getTime() - 3 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近五天":
              var newTime = datetime.getTime() - 5 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近七天":
              var newTime = datetime.getTime() - 7 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近十天":
              var newTime = datetime.getTime() - 10 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近半月":
              var newTime = datetime.getTime() - 15 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近一月":
              if (Month > 1) {
                startTime = Year + "-" + (Month - 1) + "-"+ Day;
              } else {
                startTime = Year - 1 + "-" + (12 + Month - 1) + "-"+ Day;
              }
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近三月":
              if (Month > 3) {
                startTime = (Year) + '-' + (Month - 3) + '-' + Day;
              } else {
                startTime = (Year - 1) + '-' + (12 + Month - 3) + '-' + Day;
              }
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近半年":
              if (Month > 6) {
                startTime = Year + "-" + (Month - 6) + "-"+ Day;
              } else {
                startTime = Year - 1 + "-" + (12 + Month - 6) + "-"+ Day;
              }
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近1年":
              startTime = Year - 1 + "-" + Month + "-" + Day;
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近3年":
              startTime = Year - 3 + "-" + Month + "-" + Day;
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "自定义":
              if (!this.punishDate) {
                this.punishDateValue = "";
              }
              break;
          }
          if(startTime){
            var start=startTime.split('-');
            startTime=start.map((item)=>{
              if(item.length==1){
                return '0'+item
              }else{
                return item
              }
            })
            startTime=startTime.join('-')
          }
          if(endTime){
            var end=endTime.split('-');
            endTime=end.map((item)=>{
              if(item.length==1){
                return '0'+item
              }else{
                return item
              }
            })
            endTime=endTime.join('-')
          }
          obj.startPubdate = startTime;
          obj.endPubdate = endTime;
        } else if (command == "自定义") {
          this.$refs.datePicker.pickerVisible = true;
        } else {
          this.$refs.punishDateShowPopper.hide();
          this.punishDateValue = "";
          this.punishDate = "";
          obj.startPubdate = "";
          obj.endPubdate = "";
        }
        this.jskBidNewsDto = obj;
      },
      clearContractSignTime() {
        this.punishDate = "";
        this.punishDateValue = "";
        var obj = JSON.parse(JSON.stringify(this.jskBidNewsDto));
        obj.startPubdate = "";
        obj.endPubdate = "";
        this.jskBidNewsDto = obj;
      },
      hidePoper() {
        if (this.$refs.datePicker) {
          this.$refs.datePicker.pickerVisible = false;
        }
      },
      mouseenter() {
        this.punishDateShowPopper = true;
        if(this.punishDateValue=='自定义'){
          this.$nextTick(() => {
            //this.$refs.datePicker.focus()
            this.$refs.datePicker.pickerVisible = true;
          });
        }
      },
      changepunishDate() {
        if (this.punishDate) {
          this.punishDateValue = "自定义";
          var obj = JSON.parse(JSON.stringify(this.jskBidNewsDto));
          obj.startPubdate = this.punishDate[0];
          obj.endPubdate = this.punishDate[1];
          this.jskBidNewsDto = obj;
        }
      },
      //开标截止日期
      punishDatehandleCommand1(command) {
        var obj = JSON.parse(JSON.stringify(this.jskBidNewsDto));
        if (command && command != "自定义") {
          this.bidOpeningDeadlineValue = command;
          this.$refs.bidOpeningDeadlineShowPopper.hide();
          const datetime = new Date();
          var startTime, endTime, Year, Month, Day;
          Year = datetime.getFullYear();
          Month = datetime.getMonth() + 1;
          Day = datetime.getDate();
          switch (command) {
            case "近一天":
              startTime = Year + "-" + Month + "-" + Day;
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近三天":
              var newTime = datetime.getTime() - 3 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近五天":
              var newTime = datetime.getTime() - 5 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近七天":
              var newTime = datetime.getTime() - 7 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近十天":
              var newTime = datetime.getTime() - 10 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近半月":
              var newTime = datetime.getTime() - 15 * 24 * 60 * 60 * 1000;
              startTime =
                new Date(newTime).getFullYear() +
                "-" +
                (new Date(newTime).getMonth() + 1) +
                "-" +
                new Date(newTime).getDate();
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近一月":
              if (Month > 1) {
                startTime = Year + "-" + (Month - 1) + "-" + Day;
              } else {
                startTime = Year - 1 + "-" + (12 + Month - 1) + "-" + Day;
              }
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近三月":
              if (Month > 3) {
                startTime = Year + "-" + (Month - 3) + "-" + Day;
              } else {
                startTime = Year - 1 + "-" + (12 + Month - 3) + "-" + Day;
              }
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近半年":
              if (Month > 6) {
                startTime = Year + "-" + (Month - 6) + "-" + Day;
              } else {
                startTime = Year - 1 + "-" + (12 + Month - 6) + "-" + Day;
              }
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近1年":
              startTime = Year - 1 + "-" + Month + "-" + Day;
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "近3年":
              startTime = Year - 3 + "-" + Month + "-" + Day;
              endTime = Year + "-" + Month + "-" + Day;
              break;
            case "自定义":
              if (!this.bidOpeningDeadline) {
                this.bidOpeningDeadlineValue = "";
              }
              break;
          }
          if(startTime){
            var start=startTime.split('-');
            startTime=start.map((item)=>{
              if(item.length==1){
                return '0'+item
              }else{
                return item
              }
            })
            startTime=startTime.join('-')
          }
          if(endTime){
            var end=endTime.split('-');
            endTime=end.map((item)=>{
              if(item.length==1){
                return '0'+item
              }else{
                return item
              }
            })
            endTime=endTime.join('-')
          }
          obj.startEndTimeDate = startTime;
          obj.endEndTimeDate = endTime;
        } else if (command == "自定义") {
          this.$refs.datePicker1.pickerVisible = true;
        } else {
          this.$refs.bidOpeningDeadlineShowPopper.hide();
          this.bidOpeningDeadlineValue = "";
          this.bidOpeningDeadline = "";
          obj.startEndTimeDate = "";
          obj.endEndTimeDate = "";
        }
        this.jskBidNewsDto = obj;
      },
      clearContractSignTime1() {
        this.bidOpeningDeadline = "";
        this.bidOpeningDeadlineValue = "";
        var obj = JSON.parse(JSON.stringify(this.jskBidNewsDto));
        obj.startEndTimeDate = "";
        obj.endEndTimeDate = "";
        this.jskBidNewsDto = obj;
      },
      hidePoper1() {
        if (this.$refs.datePicker1) {
          this.$refs.datePicker1.pickerVisible = false;
        }
      },
      mouseenter1() {
        this.bidOpeningDeadlineShowPopper = true;
        if(this.bidOpeningDeadlineValue=='自定义'){
          this.$nextTick(() => {
            this.$refs.datePicker1.pickerVisible = true;
          });
        }
      },
      changepunishDate1() {
        if (this.bidOpeningDeadline) {
          this.bidOpeningDeadlineValue = "自定义";
          var obj = JSON.parse(JSON.stringify(this.jskBidNewsDto));
          obj.startEndTimeDate = this.bidOpeningDeadline[0];
          obj.endEndTimeDate = this.bidOpeningDeadline[1];
          this.jskBidNewsDto = obj;
        }
      },

      selectedHeightfn() {
        if (this.selectedHeight == 64) {
          this.selectedHeight = 'auto'
        } else {
          this.selectedHeight = 64;
        }
      },
      selectedHeightfns() {
        this.selectedHeights = this.selectedHeights ? false : true
      },

      handleCurrentChange(e){
        this.page = e;
        this.jump1();
        this.search(e, this.limit);
      },
      handleSizeChange(e){
        this.limit = e;
        this.jump1();
        this.search(this.page, e);
      },
      jump1() {
        // 用 class="d_jump" 添加锚点

        var jump = document.querySelector('.el-table__body-wrapper')

        let total = jump.offsetTop - 98
        let distance = jump.scrollTop
        // 平滑滚动，时长500ms，每10ms一跳，共50跳
        let step = total / 50
        if (total > distance) {
          smoothDown()
        } else {
          let newTotal = distance - total
          step = newTotal / 50
          smoothUp()
        }

        function smoothDown() {

          if (distance < total) {
            distance += step
            jump.scrollTop = distance
            // jump.scrollTop = distance
            setTimeout(smoothDown, 10)
          } else {
            jump.scrollTop = total
            // jump.scrollTop = total
          }
        }

        function smoothUp() {
          if (distance > total) {
            distance -= step
            jump.scrollTop = distance
            // document.documentElement.scrollTop = distance
            setTimeout(smoothUp, 10)
          } else {
            jump.scrollTop = total
            // document.documentElement.scrollTop = total
          }
        }
      },

      reloadPage() {
        this.pageFlag = false;
        this.$nextTick(() => {
          this.pageFlag = true;
        });
      },

      lowerRateClick() {
        this.search();
      },

      search(page, limit,exportFlag){
        // return false;
        if (!page) {
          this.page = 1;
        }
        if (!limit) {
          this.limit = 20;
        }
        if (!page && !limit) {
          this.reloadPage();
        }
        var data = JSON.parse(JSON.stringify(this.jskBidNewsDto));
		console.log(data);

        if(this.projectTerritoryId.length >0){
          for (var i=0;i<this.projectTerritoryId.length;i++){
            if(this.projectTerritoryId[i].regionLevel == 2){
              data.city.push(this.projectTerritoryId[i].id)
            }
            if(this.projectTerritoryId[i].regionLevel == 3){
              data.county.push(this.projectTerritoryId[i].id)
            }
          }
        }
        data.province = '';
        if(data.county.length > 0){
          data.city = '';
        }else{
          data.city = data.city.join(",");
        }
        data.county = data.county.join(",");
        if (!data.city && !data.county){
          if(this.provinceStatus != null) {
            data.province = this.bxproProvince[this.provinceStatus].id;
          }
        }
        data.projectType = data.projectType.join(",");
        data.projectPurposes = data.projectPurposes.join(",");
        data.bidAssessmentWay = data.bidAssessmentWay.join(",");
        data.projectEnsureAmountPayType = data.projectEnsureAmountPayType.join(",");
        data.projectLevel = data.projectLevel.join(",");
        // data.hasFile = this.checked ? 'yes' : 'false';
       
        let params = {
          page: {
            page: this.page,
            limit: this.limit,
            field: this.field,
            order: this.desc,
          },
          jskBidNewsDto: data,
        };
        params.keyword = this.keyword;
        params.keywordNot = this.keywordNot;
        this.currentPage = params.page.page;
		api.jskBidNewsPage(params).then(res=>{
			if (res.code==200) {
				this.tableData=res.data.list;
				this.total=res.data.total;
			}
		}).catch(error=>{
			
		});
        
       
        
      },
      reset(){
        Object.assign(this.$data, this.$options.data.call(this)); //重置data
        // this.clickProvince(0,1);
        this.search();
      },
		changeDown(isHeight){
		  if(isHeight){
			this.isHeight = false
			this.maxHeight = 'auto'
		  }else{
			this.isHeight = true
			this.maxHeight = '36px'
		  }
		},
     
      provinceChange(e){
        let obj=''
        obj= this.province.find(function(i){
          return i.id ===e
        });
        this.provinceName=obj.regionName;
        //招中标文件按省份下载
        this.$axios.post(IndexURL.allDownload, {provinceId:this.provinceValue}, {
          headers: {
            "Content-Type": "application/json",
          },
        }).then((res) => {
          if (res.data.code == 200) {
            this.allDownloadList = res.data.data;
          }
        });
      },
	  getUipIdByCid(companyId){
	  	var params=[companyId]
	  	api.getUipIdByCid(params).then(res=>{
	  				if (res.code==200) {
	  						if(res.data&&res.data.length>0&&res.data[0].uipId){
	  							this.$router.push({path: '/enterprise/'+this.encodeStr(res.data[0].uipId)})
	  						}else{
	  							this.$router.push({path: '/company/'+this.encodeStr(res.data[0].companyId)})
	  						}
	  						
	  				}
	  	 }).catch(error=>{
	  	 	
	  	 });
	  },
      exportData(row,name) {
        let params={
          fromUrl:document.referrer,
          visitUrl:window.location.href,
          event:'下载',
          content:this.provinceName+'-'+name+'招中标数据',
          platform:'jsk'
        }
        this.$behaviorRecord(this,params)
        if (row) {
          if (row && row.indexOf('http://') > -1) {
            row = row.replace('http://', 'https://')
          }
          window.open(row, '_blank')
        }
      },
    }
  }
</script>
<style lang="scss" scoped>
	.content{
	  padding: 0px 16px;
	  border-radius: 4px 4px 4px 4px;
	   background: #FFFFFF;
	   .content_item{
		   padding-top: 12px;
		   display: flex;
		   align-items: center;
	       .label{
	           width: 84px;
			   font-size: 14px;
			   font-weight: 400;
			   color: rgba(35,35,35,0.8);
	       }
	       .content_right{
			   
			   .bxpro_region{
			     width: 1220px;
			     border: 1px solid #EFEFEF;
			     .bxpro_province{
			       height: 32px;
			       line-height: 32px;
			       background: #F8F8F8;
			       color: #666666;
			       //padding: 0 28px;
			       span{
			         display: inline-block;
			         width: 96px;
			         text-align: center;
			         cursor:pointer;
			       }
			       .bxpro_province_selected{
			         color:#333333;
			         background: #FFFFFF;
			       }
			     }
			     .bxpro_city{
			       padding: 16px 16px 0;
			       .bxpro_city_fex{
			         display: inline-flex;
			         .bxpro_city_fex_nr{
			           width: 1138px;
			           overflow: hidden;
			         }
			         .bxpro_city_fex_click{
			           cursor:pointer;
			           color: #0081ff;
			         }
			       }
			       span{
			         display: inline-block;
			         margin:0 16px 16px 0;
			         color: #333333;
			         padding: 5px 12px;
			         background: #F6F7FC;
			         border-radius: 2px 2px 2px 2px;
			         line-height: 16px;
			         cursor:pointer;
			         position: relative;
			       }
			       img{
			         display: none;
			         position: absolute;
			         bottom: 0;
			         right: 0;
			       }
			       .color_text{
			         background: #EAF4FF;
			         color: #0081FF;
			         img{
			           display:block;
			         }
			       }
			     }
			   }
			   
			   .include-keywords {
			     display: flex;
			     align-items: center;
			     position: relative;
			   
			     .lefttltel {
			       display: inline-block;
			       background: #F3F4F5;
			       color: #333;
			       border: 1px solid #F3F4F5;
			       border-right: none;
			       opacity: 1;
			       width: 44px;
			       height: 34px;
			       text-align: center;
			       line-height: 34px;
			     }
			   
			     .el-input {
			       line-height: 34px;
			       border-radius: 0;
			   
			       ::v-deep .el-input__inner {
			         height: 34px;
			         line-height:34px;
			         border-radius: 0;
			       }
			     }
			   
			     .commonly-input {
			       ::v-deep .el-input__inner {
			         padding-right: 100px;
			       }
			     }
			   
			     .commonly {
			       position: absolute;
			       top: 8px;
			       right: 16px;
			       font-size: 14px;
			       font-weight: 400;
			       color: #0081ff;
			       cursor: pointer;
			     }
			   }
	           
	           .ename_input{
	               width: 640px;
	               margin-right: 20px;
	           }
			   .land_ipt_470 {
			   	width: 640px;
			   }
			   .land_content_wrap-flex{
			     display: flex;
			     line-height: 28px;
				 margin-right: 102px;
			   }
			   .land_content_wrap-flex:last-child{
			     margin-right: 0;
			   }
			   .land_content_wrap_label{
			    font-size: 14px;
			    font-weight: 400;
			    color: rgba(35,35,35,0.8);
				margin-right:8px;
			   }
			   
			   .other_ipt {
			     width: 104px;
			     height: 28px;
				 line-height: 28px;
			     ::v-deep .el-input__inner {
			       height: 28px;
			       line-height: 28px;
			       padding: 0 8px;
			     }
			    
			   }
			   .other_ipt1 {
			     width: 153px;
			     position:relative;
			     top:2px;
			     ::v-deep .el-input-group__append {
			       span{
			         color: #333333;
			       }
				   .el-button{
					  height: 26px;
					  line-height: 26px; 
				   }
			       width: 49px;
				   height: 26px;
				   line-height: 26px; 
			       padding: 0 8px;
			     }
			   }
			   
			   .other_label_span{
			     margin:0 8px;
				 font-size: 14px;
				 font-weight: 400;
				 color: #232323;
			   }
			   .land_content_wrap_label_tipspan{
			     display: inline-block;
			     line-height: 34px;
			     position: relative;
			     .tip_svg{
			       width: 16px;
			       height: 16px;
			       margin-left: 4px;
			     }
			   }
			   
	       }
		.content_right1{
			display: flex;
			.content_right1-flex{
				align-items: center;
				display: flex;
				.label-zi{
					font-size: 14px;
					font-weight: 400;
					color: rgba(35, 35, 35, 0.8);
					margin-right:24px ;
				}
			}
		}
		   
		 .item_ckquery_list {
			display: flex;
		
		}
		
		 .item_ckquery_list .el-input__icon {
			position: relative;
			top: 1px;
		}
		.ckquery_list_right {
			width: 640px;
		}
		.register_count_ipt{
			margin-left: 0px;
			
		}
		.register_count_ipt .el-input__inner{
			width: 174px;
		}
		::v-deep .el-input-group__prepend{
			padding: 0 8px;
		}
		.content-projecttype{
			display: flex;
			align-items: center;
			justify-content: center;
			.projecttype{
				font-weight: 400;
				color: #232323;
				padding: 1px 5px;
				margin-right: 4px;
				cursor: pointer;
				border-radius: 3px 3px 3px 3px;
				font-size: 14px;
			}
			.projecttype:first-child{
				padding-left: 0px;
			}
			.projecttype:hover{
				background: #F3F4F5;
				padding: 1px 5px;
			}
			.activetype{
				background: #F3F4F5;
				padding: 1px 5px !important;
			}
		}
		
		
	   
	   }
	   .content_item_padding0{
		   padding: 0;
	   }
		
	}
	.bottomlist{
		width: 100%;
		background-color: #FFFFFF;
		
	     border-radius: 4px 4px 4px 4px;
		.bottomlist-title{
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 12px;
			padding: 16px ;
			 
			.title-right{
				display: flex;
				align-items: center;
				p:first-child{
					font-size: 12px;
					font-weight: 400;
					color: #3D3D3D;
					margin-right: 10px;
				}
				p:last-child{
					display: flex;
					align-items: center;
					font-size: 14px;
					font-weight: 400;
					color: rgba(35,35,35,0.8);
				}
				img{
					width: 18px;
					height: 18px;
				}
				.excel{
					cursor: pointer;
				}
			}
			
		}
		.table-item{
			padding:0px 16px;
			.list-titel-a{
				color:#0081FF;
				cursor: pointer;
			}
			.bxpro_list_money{
			  li{
			    margin-bottom: 8px;
			    line-height: 18px;
			    display: flex;
			    &:last-child{
			      margin-bottom: 0;
			    }
			  }
			}
			
		}
		.bottomlist-content{
			
			padding-bottom: 0px;
		}
		
		.pagination{
			padding: 14px ;
		   .el-pagination{
			   float: right;
			  margin-right:-8px;
			
		   }
		}
	}
</style>
