Commit a1f76e47 by Lyan

全文搜索

parent 755af626
...@@ -110,6 +110,11 @@ const relatedLinks = (params = {}) => { ...@@ -110,6 +110,11 @@ const relatedLinks = (params = {}) => {
return GET(`${Prefix}/office/news/api/relatedLinks`, params) return GET(`${Prefix}/office/news/api/relatedLinks`, params)
} }
// 全局搜索
const getSearchInfo = (params = {}) => {
return POST(`${Prefix}/office/news/api/getSearchInfo`, params);
}
export default { export default {
pictureList, pictureList,
...@@ -135,5 +140,6 @@ export default { ...@@ -135,5 +140,6 @@ export default {
relatedLinks, relatedLinks,
dsxxjyTop8, dsxxjyTop8,
gzzdTop7, gzzdTop7,
centerTop6 centerTop6,
getSearchInfo
} }
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<div @click="handelMore" class="more float-end"><span>了解更多</span><img src="../../../assets/image/home/more-arrow.png" alt=""></div> <div @click="handelMore" class="more float-end"><span>了解更多</span><img src="../../../assets/image/home/more-arrow.png" alt=""></div>
</div> </div>
</div> </div>
<p style="text-align:center;padding:30px" v-if="list.length===0">没有符合条件的记录!</p>
</div> </div>
</template> </template>
<script> <script>
......
<template> <template>
<ul class="sousuoList"> <ul class="sousuoList">
<li v-for="(tmp, i) in 10" :key="i"> <li v-for="(tmp, i) in list" :key="i" >
<div class="sousuoList-top"> <div class="sousuoList-top">
<span>【资讯动态】山东省条码印刷品质量检验站通过</span> <span>【资讯动态】</span>
<span>CNAS评审组现场评审</span> <span v-html="tmp.title" @click="handelMsg(tmp.urlid)"></span>
</div> </div>
<div class="sousuoList-middle">中国合格评定国家认可委员会(CNAS)派遣2名评审员组成评审组就所申请一维条码符号、二维条码符号、行业应用软件、移动智能终端应用软件和移动智能终端应用软件(个人信息安全保护…</div> <div class="sousuoList-middle" v-html="changeText(tmp.content)"></div>
<div class="sousuoList-bottom"> <div class="sousuoList-bottom">
<div> <div>
<span>日期:</span> <span>日期:</span>
<span>2021-07-07</span> <span>{{tmp.date}}</span>
</div> </div>
<div> <div>
<span>来自:</span> <span>来自:</span>
<span>中国物品编码中心山东分中心</span> <span>{{tmp.source}}</span>
</div> </div>
</div> </div>
</li> </li>
<p style="text-align:center;padding:30px" v-if="list.length===0">没有符合条件的记录!</p>
</ul> </ul>
</template> </template>
<script>
export default {
props: ['list'],
methods: {
handelMsg(id) {
this.$router.push({
path: '/News/Msg',
query:{id:id}
});
},
changeText(val){
val=(val ||'').replace(/<[^>]+>/g,"").replace(/<br\/>/g, '\n').replace(/&nbsp;/g, '');
return val
}
},
}
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
.sousuoList{ .sousuoList{
margin: 0; margin: 0;
...@@ -30,22 +49,33 @@ ...@@ -30,22 +49,33 @@
padding-top: 0; padding-top: 0;
} }
.sousuoList-top{ .sousuoList-top{
padding-bottom: 20px;
font-size: 18px; font-size: 18px;
span{ span{
&:nth-child(1) { &:nth-child(1) {
color: rgba(65, 67, 69, 1); color: rgba(65, 67, 69, 1);
} }
&:nth-child(2) { &:nth-child(2) {
color: rgba(242, 99, 53, 1);
cursor: pointer;
&:hover,&:active{
color: rgba(242, 99, 53, 1);
}
} }
} }
} }
.sousuoList-middle{ .sousuoList-middle{
width: 95%;
height: 21px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
padding: 20px 0; // padding: 20px 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.sousuoList-bottom{ .sousuoList-bottom{
padding-top: 20px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
font-size: 13px; font-size: 13px;
......
...@@ -7,22 +7,24 @@ ...@@ -7,22 +7,24 @@
placeholder="请输入内容" placeholder="请输入内容"
clearable clearable
v-model="search.keywords" v-model="search.keywords"
@input="e => search.keywords = validSpecialZf(e)"
></el-input> ></el-input>
<div class="top-form-btn"> <div class="top-form-btn" @click="initListFn(1,'')">
<img src="../../assets/image/home/sousuo-ico1.png" alt="" /> <img src="../../assets/image/home/sousuo-ico1.png" alt="" />
</div> </div>
</div> </div>
<div class="hot"> <!-- 迭代 -->
<!-- <div class="hot">
<span>热词:</span> <span>热词:</span>
<span>我要续展</span> <span>我要续展</span>
<span>申请条码</span> <span>申请条码</span>
</div> </div> -->
</div> </div>
</div> </div>
<div class="sousuo-bottom"> <div class="sousuo-bottom">
<div class="container"> <div class="container">
<ul class="nav nav-tabs" id="myTab" role="tablist"> <ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation" @click="initListFn(1,'')">
<button <button
class="nav-link active" class="nav-link active"
id="home-tab" id="home-tab"
...@@ -36,7 +38,35 @@ ...@@ -36,7 +38,35 @@
<span>全部问题</span> <span>全部问题</span>
</button> </button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation" @click="initListFn(1,'1')">
<button
class="nav-link"
id="profile-tab"
data-bs-toggle="tab"
data-bs-target="#profile"
type="button"
role="tab"
aria-controls="profile"
aria-selected="false"
>
<span>标准科研</span>
</button>
</li>
<li class="nav-item" role="presentation" @click="initListFn(1,'2')">
<button
class="nav-link"
id="profile-tab"
data-bs-toggle="tab"
data-bs-target="#profile"
type="button"
role="tab"
aria-controls="profile"
aria-selected="false"
>
<span>政策法规</span>
</button>
</li>
<li class="nav-item" role="presentation" @click="initListFn(1,'3,31,32')">
<button <button
class="nav-link" class="nav-link"
id="profile-tab" id="profile-tab"
...@@ -50,10 +80,41 @@ ...@@ -50,10 +80,41 @@
<span>资讯动态</span> <span>资讯动态</span>
</button> </button>
</li> </li>
<li class="nav-item" role="presentation" @click="initListFn(1,'5')">
<button
class="nav-link"
id="profile-tab"
data-bs-toggle="tab"
data-bs-target="#profile"
type="button"
role="tab"
aria-controls="profile"
aria-selected="false"
>
<span>应用领域</span>
</button>
</li>
<li class="nav-item" role="presentation" @click="initListFn(1,'6')">
<button
class="nav-link"
id="profile-tab"
data-bs-toggle="tab"
data-bs-target="#profile"
type="button"
role="tab"
aria-controls="profile"
aria-selected="false"
>
<span>技术知识</span>
</button>
</li>
</ul> </ul>
<div class="sousuo-bottom-solt"> <div class="sousuo-bottom-solt">
<div class="sousuo-total">相关结果1209个</div> <div class="sousuo-total">相关结果{{pageParams.totalCount}}</div>
<el-date-picker <!-- 迭代 -->
<!-- <el-date-picker
type="daterange" type="daterange"
align="right" align="right"
unlink-panels unlink-panels
...@@ -63,7 +124,7 @@ ...@@ -63,7 +124,7 @@
size="mini" size="mini"
:picker-options="pickerOptions" :picker-options="pickerOptions"
> >
</el-date-picker> </el-date-picker> -->
</div> </div>
<div class="tab-content" id="myTabContent"> <div class="tab-content" id="myTabContent">
<div <div
...@@ -72,12 +133,7 @@ ...@@ -72,12 +133,7 @@
role="tabpanel" role="tabpanel"
aria-labelledby="home-tab" aria-labelledby="home-tab"
> >
<sousuoList />
<pages
:currPage="pageParams.currPage"
:pageSize="pageParams.pageSize"
:total="pageParams.total"
/>
</div> </div>
<div <div
class="tab-pane fade" class="tab-pane fade"
...@@ -85,11 +141,20 @@ ...@@ -85,11 +141,20 @@
role="tabpanel" role="tabpanel"
aria-labelledby="profile-tab" aria-labelledby="profile-tab"
> >
<sousuoList />
</div> </div>
</div> </div>
<sousuoList :list="pageParams.list" />
<pages
:currPage="pageParams.currPage"
:pageSize="pageParams.pageSize"
:total="pageParams.totalCount"
@getLimit='initListFn'
/>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -107,9 +172,10 @@ export default { ...@@ -107,9 +172,10 @@ export default {
keywords: "", keywords: "",
}, },
pageParams: { pageParams: {
list:[],
currPage: 1, currPage: 1,
pageSize: 10, pageSize: 10,
total: 0, totalCount: 0,
}, },
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
...@@ -144,12 +210,40 @@ export default { ...@@ -144,12 +210,40 @@ export default {
}, },
}; };
}, },
created() {
this.initListFn(this.pageParams.currPage);
},
methods:{
// 列表
async initListFn(page,type) {
const params = {
page: page,
size: this.pageParams.pageSize,
type:type,
name:this.search.keywords
};
const listRes =
await this.$api.news.getSearchInfo(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.pageParams = data
}
},
validSpecialZf(valInput){
valInput = valInput.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,./;'~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g, '').replace(/\s/g, '').replace(/[^\w_^\u4E00-\u9FA5]/g,'');
return valInput;
}
}
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.sousuo { .sousuo {
.sousuo-top-form { .sousuo-top-form {
@include elInput(50px, #333, #666, #fff, #cfdcea); @include elInput(50px, #333, #666, #fff, #cfdcea);
padding-bottom: 30px;
.el-input__inner { .el-input__inner {
border-right: 0; border-right: 0;
border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px;
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -37,6 +38,9 @@ export default { ...@@ -37,6 +38,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 行业应用 // 行业应用
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -57,6 +61,13 @@ export default { ...@@ -57,6 +61,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "行业应用",
path: "/News/Application",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -52,6 +53,9 @@ export default { ...@@ -52,6 +53,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods: { methods: {
...mapMutations({
setMatche: "setMatche",
}),
// 查看更多 // 查看更多
lookMore() { lookMore() {
window.open('/News/PicNews', '_target'); window.open('/News/PicNews', '_target');
...@@ -77,6 +81,14 @@ export default { ...@@ -77,6 +81,14 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "活动中心",
path: "/News/Center",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -36,6 +37,9 @@ export default { ...@@ -36,6 +37,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 列表 // 列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -58,6 +62,13 @@ export default { ...@@ -58,6 +62,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "综合报道",
path: "/News/Composite",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -36,6 +37,9 @@ export default { ...@@ -36,6 +37,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 列表 // 列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -58,6 +62,13 @@ export default { ...@@ -58,6 +62,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "深度资讯",
path: "/News/DepthTopics",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</p> </p>
<div class="list-style"> <div class="list-style">
<ul > <ul >
<li v-for="(tmp, i) in tableResult.list" :key="i"><a :href="tmp" target="_blank">{{tmp.title}}</a></li> <li v-for="(tmp, i) in tableResult.list" :key="i"><span>{{tmp.title}}</span></li>
</ul> </ul>
</div> </div>
...@@ -269,6 +269,7 @@ export default { ...@@ -269,6 +269,7 @@ export default {
.more{ .more{
font-size: 12px; font-size: 12px;
float: right; float: right;
cursor: pointer;
} }
} }
ul{ ul{
...@@ -280,6 +281,7 @@ export default { ...@@ -280,6 +281,7 @@ export default {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space:nowrap; white-space:nowrap;
cursor: pointer;
} }
li::before{ li::before{
content: "●"; content: "●";
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import Title from "../comps/title.vue"; import Title from "../comps/title.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
...@@ -154,6 +155,9 @@ export default { ...@@ -154,6 +155,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods: { methods: {
...mapMutations({
setMatche: "setMatche",
}),
// 食品追溯 // 食品追溯
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -173,6 +177,13 @@ export default { ...@@ -173,6 +177,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "食品安全追溯",
path: "/News/FoodSafety",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -36,6 +37,9 @@ export default { ...@@ -36,6 +37,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 列表 // 列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -58,6 +62,13 @@ export default { ...@@ -58,6 +62,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "国际追踪",
path: "/News/International",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -45,6 +46,9 @@ export default { ...@@ -45,6 +46,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 列表 // 列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -67,6 +71,13 @@ export default { ...@@ -67,6 +71,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "物联网",
path: "/News/IoT",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -36,6 +37,9 @@ export default { ...@@ -36,6 +37,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 列表 // 列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -58,6 +62,13 @@ export default { ...@@ -58,6 +62,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "地方动态",
path: "/News/Local",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -37,6 +38,9 @@ export default { ...@@ -37,6 +38,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 通知公告 // 通知公告
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -57,6 +61,13 @@ export default { ...@@ -57,6 +61,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "公告通知",
path: "/News/Notice",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import Title from "../comps/title.vue"; import Title from "../comps/title.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
...@@ -63,6 +64,9 @@ export default { ...@@ -63,6 +64,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 其他 // 其他
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -81,6 +85,13 @@ export default { ...@@ -81,6 +85,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "其他",
path: "/News/Other",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<cate :father="tpzxCate"></cate> <cate :father="tpzxCate"></cate>
<div class="container"> <div class="container">
<ul class="picNews-ul"> <ul class="picNews-ul">
<li v-for="(tmp, i) in 4" :key="i" @click="jump"> <li v-for="(tmp, i) in pictureListArr" :key="i" @click="getInfo(tmp.pictureid,tmp.jumppath)">
<div class="picNews-li-tp"> <div class="picNews-li-tp">
<img src="../../assets/image/news/tpzx-tp1.jpg" alt="" /> <img :src="tmp.picFile" alt="" />
</div> </div>
<div class="picNews-li-bt"> <div class="picNews-li-bt">
中国物品编码中心应邀出席食品安全智慧监管研讨会 {{tmp.title}}
</div> </div>
</li> </li>
</ul> </ul>
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
</template> </template>
<script> <script>
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
export default { export default {
...@@ -65,18 +64,6 @@ export default { ...@@ -65,18 +64,6 @@ export default {
...mapMutations({ ...mapMutations({
setMatche: "setMatche", setMatche: "setMatche",
}), }),
jump() {
const matche = [
{
name: "图片资讯",
path: "/News/PicNews",
},
];
this.setMatche(matche);
this.$router.push({
path: "/News/msg",
});
},
// 图片资讯列表 // 图片资讯列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -107,6 +94,13 @@ export default { ...@@ -107,6 +94,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "图片资讯",
path: "/News/PicNews",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -36,6 +37,9 @@ export default { ...@@ -36,6 +37,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 列表 // 列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -58,6 +62,13 @@ export default { ...@@ -58,6 +62,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "标准科研动态",
path: "/News/Research",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
import cate from "../comps/cate.vue"; import cate from "../comps/cate.vue";
import list from "./comps/list.vue"; import list from "./comps/list.vue";
import pages from "../comps/pages2.vue"; import pages from "../comps/pages2.vue";
...@@ -36,6 +37,9 @@ export default { ...@@ -36,6 +37,9 @@ export default {
this.initListFn(this.tableResult.currPage); this.initListFn(this.tableResult.currPage);
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
// 列表 // 列表
async initListFn(page,limit) { async initListFn(page,limit) {
const params = { const params = {
...@@ -58,6 +62,13 @@ export default { ...@@ -58,6 +62,13 @@ export default {
if(directpath&&directpath!==''&& directpath.length>0){ if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank'); window.open(directpath,'_blank');
}else{ }else{
const matche = [
{
name: "精彩视频",
path: "/News/Video",
}
];
this.setMatche(matche);
let link = this.$router.resolve({ let link = this.$router.resolve({
path: `/news/msg?id=${id}`, path: `/news/msg?id=${id}`,
}); });
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
</div> </div>
<div class="col-lg-2 list-right">{{tmp.showtime}}</div> <div class="col-lg-2 list-right">{{tmp.showtime}}</div>
</div> </div>
<p style="text-align:center;padding:30px" v-if="list.length===0">没有符合条件的记录</p>
</div> </div>
</template> </template>
<script> <script>
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<div class="container"> <div class="container">
<div class="cate"> <div class="cate">
<span>相关连接</span> <span>相关连接</span>
<span>更多>></span> <!-- <span>更多>></span> -->
</div> </div>
<list :list="xgljListArr" @getInfo='getInfo' /> <list :list="xgljListArr" @getInfo='getInfo' />
</div> </div>
...@@ -131,7 +131,6 @@ export default { ...@@ -131,7 +131,6 @@ export default {
this.newsTop10() this.newsTop10()
this.announceList() this.announceList()
this.zttjList() this.zttjList()
this.xgljList()
}, },
methods: { methods: {
async InfoFn() { async InfoFn() {
...@@ -149,10 +148,12 @@ export default { ...@@ -149,10 +148,12 @@ export default {
this.source=data.source this.source=data.source
this.editor=data.editor this.editor=data.editor
this.breadcrumb = this.breadcrumb.concat(this.matche); this.breadcrumb = this.breadcrumb.concat(this.matche);
this.breadcrumb.push({ this.breadcrumb.push(
{
name: this.title, name: this.title,
}); });
this.$store.commit("system/SET_BREADCRUMB", this.breadcrumb); this.$store.commit("system/SET_BREADCRUMB", this.breadcrumb);
this.xgljList(data.keyword)
} }
}, },
...@@ -198,10 +199,10 @@ export default { ...@@ -198,10 +199,10 @@ export default {
}, },
// 相关链接 // 相关链接
async xgljList() { async xgljList(keyword) {
const params = { const params = {
id:9979, id:9979,
keyword:'GS1' keyword:keyword
}; };
const listRes = const listRes =
await this.$api.news.relatedLinks(params); await this.$api.news.relatedLinks(params);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="pages-middle"> <div class="pages-middle" v-if="total!=0">
<button class="pages-btn" v-if="false">首页</button> <button class="pages-btn" v-if="false">首页</button>
<el-pagination <el-pagination
:page-size="pageSize" :page-size="pageSize"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment