123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="utf-8" />
- <meta http-equv="X-UA-Compatible" content="IE=edge" />
- <!-- <meta name="viewport" content="width=device-width, initial-scale=1" /> -->
- <meta name="format-detection" content="telephone=no" />
- <title>搜索</title>
- <meta name="keywords" content="">
- <meta name="description" content="">
- <script type="text/javascript" src="./static/js/vue.js"></script>
- <script type="text/javascript" src="./static/js/index.js"></script>
- <script type="text/javascript" src="./static/js/jquery.min.js"></script>
- <script type="text/javascript" src="./static/js/custom.js"></script>
- <link rel="stylesheet" href="static/css/theme-chalk/index.css">
- <link href="./static/css/vendor.css" rel="stylesheet" />
- <link href="./static/css/style.css" rel="stylesheet" />
- <link href="./static/css/custom.css" rel="stylesheet" />
- <link href="static/css/index.css" rel="stylesheet"/>
- <link href="./static/css/printstyle.css" rel="stylesheet"/>
-
- <style>
- </style>
- </head>
- <body class="pcs" style="display: none;">
- <div id="app">
- <header>
- <div class='a'>
- <div class='container'>
- <div class='tool'>
- <div class='fr'>
- <a href='' target='_blank'></a>
- </div>
-
- <!-- <script src='static/js/time.js'></script> -->
- <div class='loca'>
- <span> 欢迎访问 刷制品质量监督检验中心 ! 今天{{date_show}} {{week}}</span>
- </div>
- <div class='srch'><input type='text' class='tt' placeholder='输入要查找的信息' v-model="inpute"
- @blur="inpubie" /> <img src='static/picture/icon_ztl_ss@2x.png' @click="nhyesee">
- </div>
- </div>
- </div>
- </div>
- <div class='b'>
- <div class='container'>
- <div class='logo'>
- <a href='javascript:void(0)'><img src='static/picture/pic_hp_dh_logo@2x.png' alt='' /></a>
- </div>
- <div class='frs fr' v-if="hyew == true">
- <div class='menu _list'>
- <ul>
- <li v-for="item,index in tablide" :key="index" @mouseover="dheyfr(item.label)">
- <div :class="[ nue == item.label ? 'on' : '' , 'i' ]">
- <p @click="tabcl(item.id,item.label)"><a href='javascript:void(0)'>{{item.label}}</a></p>
- <!-- ulrw -->
- <div class='ex' >
- <!-- :class="[inhye]" -->
- <!-- ulrw -->
- <p > <a href='javascript:void(0)' v-for="(items,indexs) in item.children" :key="items.id"
- @click.stop="jeuese(items)" >{{items.label}}</a></p>
- <!-- jggk.html -->
- <!-- <p><a href='zzhjg.html'>组织架构</a></p> -->
- </div>
- </div>
- </li>
-
- </ul>
- </div>
- </div>
- <a href='' class='mbtn pc-hide'></a>
- </div>
- </div>
- </header>
-
- <main>
- <div class="u-fullpart">
- <div class="p_container">
- <!-- 定位 -->
- <!-- <div class="pleft">
- <ul>
- <li class="pleft_tit">党建工作</li>
- <li><a href="#" class="act">党建动态</a></li>
- <li><a href="#">党史学习</a></li>
- <li><a href="#">党风廉政</a></li>
- <li><a href="#">党建风采</a></li>
- </ul>
- </div> -->
-
- <div class="container">
-
- <div class="u-pagepath">
- <p>
- <a href="index.html">首页</a>
- <i>·</i>
- <a href="#">搜索</a>
- <!-- <i>·</i>
- <a href="党建动态.html">党建动态</a> -->
- </p>
- </div>
- <div class="p_box">
- <div class="p_box_tit cf"><p class="fl p_box_titl">搜索结果</p></div>
- <div class="pd10 pf_list">
- <ul>
- <li v-for=" item,index in newsleisL" :key="item.newsId" @click="nhueyfr(item.newsId,item)">
- <a href="#" class="cf">
- <div class="fl">
- <h1 v-html="item.newsTitle"></h1>
- <p class="overtwo" v-html="item.newsContent"></p>
- </div>
- <div class="fr" >
- <div class="num" style="margin: 0; margin-left: 60%; margin-bottom: 10px;">{{item.times}}</div>
- <div class="day">{{item.createTime}}</div>
- </div>
- </a>
- </li>
- </ul>
- <!-- 分页 -->
- <div class="p_page" v-if="nhyuese" >
- <el-pagination
- background
- layout="prev, pager, next"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :total="total">
- </el-pagination>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 分割 -->
- <!-- <div class="foot_line"></div> -->
- </main>
- </div>
- </body>
- <!-- <script type="text/javascript" src="static/js/header.js"></script> -->
- <script type="text/javascript">
- var app = new Vue({
- el: '#app',
- data: {
- message: 'Hello Vue!',
- inpute:'',
- tablide:[],
- hyew:false,
- nue:0,
- week:'',
- date_show:'',
- ulrw:'',
- mjuede:'',
- valdes:{pageNum:1,pageSize:10},
- newsleisL:[],
- total:0,
- nhyuese:true
- },
- created() {
- // this.getdataTime()
- this.gettablist()
- // Vue.$forceUpdate();
- },
- mounted() {
- // console.log(this.getQueryString("id") == '')
- let search = location.search;
- let arrd = search.split("?");
- // console.log(decodeURI(arrd[1]));//学历
- if(arrd !== ''){
- this.valdes.newsTitle = decodeURI(arrd[1])
- }
-
- // console.log(this.getQueryString("title"))
- // console.log(this.valdes)
- this.gettablists(this.valdes)
- },
- methods:{
- // 跳转详情页面
- nhueyfr(index,e){
- if(e&&e.reprintUrl){
- window.location.href=e.reprintUrl
- }else if(e&&index){
- window.location.href="jgjj.html?id=" + index
- }
- },
- gettablists(val){
- var that = this
- $.ajax({
- url:'https://jyzx.qs163.cn/prod-api/gateway/query/getNewS',
- type:'post',
- data:val,
- dataType:'json',
- success:function(res){
- if(res.code == 200){
- if(res.rows.length !== 0){
- res.rows.filter(rou =>{
- rou.times = rou.createTime.slice(0,10).split('-')[1]
- // console.log(rou.createTime.slice(0,10).split('-')[1])
- if(rou.newsTitle !== null){
- rou.newsTitle = that.hfeys(rou.newsTitle)
- }
- if(rou.newsContent !== null){
- rou.newsContent = that.hfeys(rou.newsContent)
- }
- // console.log(rou.newsTitle)
- })
- }else{
- hyews=[{newsTitle:'暂无数据',newsContent:'暂无数据',createTime:'暂无数据'}]
- res.rows = hyews
- }
-
- that.newsleisL = res.rows
- that.total = res.total
- if(that.total>0){
- that.nhyuese = true
- }else{
- that.nhyuese = false
- }
- // that.hyew = true
- }else{
- that.$message({
- message: res.msg,
- type: 'error'
- });
- }
- }
- })
- },
- gettablist(){
- var that = this
- $.ajax({
- url:'https://jyzx.qs163.cn/prod-api/gateway/query/treeselect',
- type:'get',
- data:'',
- dataType:'json',
- success:function(res){
- if(res.code == 200){
- that.tablide = res.data
- that.hyew = true
- }else{
- that.$message({
- message: res.msg,
- type: 'error'
- });
- }
- }
- })
- },
- inpubie(){
- },
- nhyesee(){
- this.valdes.newsTitle = this.inpute
- this.gettablists(this.valdes)
- },
- tabcl(index,val){
- this.nue = index
- if(val == "首页"){
- window.location.href = "index.html?ntitel=首页"
- }
- },
- jeuese(index,val){
- // console.log(index)
- if(index.label=='报告查询'){
- window.location.href="bgcx.html"
- }else if(index.label=='网上送检'){
- window.location.href="wshsj.html"
- }else{
- window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr + '&openMode=' + index.openMode
- }
- // window.location.href="djdt.html?id=" + index.id +'&titel=' + index.label + '&ntitel=' + this.hyesfr + '&openMode=' + index.openMode
- },
- dheyfr(val){
- this.hyesfr = val
- },
- // 获取路由参数
- getQueryString(name) {
- try {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
- var r = window.location.href.split('?')[1].match(reg);
- if(r != null) {
- return r[2];
- }
- return "";//如果此处只写return;则返回的是undefined
- } catch(e) {
- return "";//如果此处只写return;则返回的是undefined
- }
- },
- hfeys(nju){
- var that = this
- if (that.valdes.newsTitle && that.valdes.newsTitle.length > 0) {
- // 匹配关键字正则
- let replaceReg = new RegExp(that.valdes.newsTitle, 'g');
- // 高亮替换v-html值
- let replaceString = '<span style="color:#007bff">' + that.valdes.newsTitle + '</span>';
- // 开始替换
- nju = nju.replace(replaceReg, replaceString);
- }
-
- return nju
- },
- handleSizeChange(){
-
- },
- handleCurrentChange(){
- this.valdes.pageNum = val
- this.gettablists(this.valdes)
- }
-
- }
- })
- </script>
- <!--移动'vendor'目录后,注意修改'vendor\vendor.js'内引用文件的'src'路径以匹配该html-->
- <script src="static/js/footer.js" type="text/javascript" charset="utf-8"></script>
- <script src="./vendor/vendor.js"></script>
- <script src="static/js/script.js"></script>
- <script src="static/js/custom.js"></script>
- <script>
- $(document).ready(function() {
- $(".pleft a").click(function(){
- $(this).addClass('act')
- $(this).parent().siblings().find('a').removeClass('act')
- })
- });
- </script>
- </html>
|