feature: 首页三天内数据new标注

This commit is contained in:
zyn
2023-12-19 17:51:02 +08:00
parent c4079c7413
commit a074fdb84b
8 changed files with 103 additions and 64 deletions
+3 -5
View File
@@ -34,7 +34,7 @@
<template slot-scope="scope">
<span style="display: flex;align-items: center" @click="handlePreview(scope.row)">
<span>{{ scope.row.standardName }}</span>
<img v-if="checkTime(scope.row.renewTime)" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
<img v-if="scope.row.threeDaysNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
</span>
</template>
</el-table-column>
@@ -137,10 +137,8 @@ export default {
this.total = res.data.total
this.loading = false
if (res.data && res.data.records && res.data.records.length > 0) {
if (res.data.records[0].renewTime && res.data.records[0].renewTime !== '') {
const isNew = this.checkTime(res.data.records[0].renewTime)
this.$emit('isNew', isNew)
}
const isNew = res.data.records[0].threeDaysNew || false
this.$emit('isNew', isNew)
}
}, e => {
this.loading = false
+11 -8
View File
@@ -35,7 +35,10 @@
label="标准名称"
>
<template slot-scope="scope">
<span @click="handlePreview(scope.row)">{{ scope.row.standardName }}</span>
<span style="display: flex;align-items: center" @click="handlePreview(scope.row)">
{{ scope.row.standardName }}
<img v-if="scope.row.threeDaysNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
</span>
</template>
</el-table-column>
<el-table-column
@@ -120,7 +123,7 @@ export default {
getAdvice () {
this.loading = true
this.$http.get('/lawss/NewsFeed/getNewsFeed', {
messageType: 'GNWBZFG',
messageType: this.$route.query.messageType,
page: this.page,
pageSize: this.pageSize
}, {
@@ -149,12 +152,12 @@ export default {
font-size: 13px;
}
/deep/.more {
position: absolute;
right: 0;
bottom: 2px;
font-size: 15px;
float: right;
color: #4788c0;
//position: absolute;
//right: 0;
//bottom: 2px;
//font-size: 15px;
//float: right;
//color: #4788c0;
&:hover {
color: #3a8ee6;
cursor: pointer;
@@ -34,7 +34,7 @@
<template slot-scope="scope">
<span style="display: flex;align-items: center" @click="handlePreview(scope.row)">
<span>{{ scope.row.standardName }}</span>
<img v-if="checkTime(scope.row.releaseDate)" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
<img v-if="scope.row.threeDaysNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
</span>
</template>
</el-table-column>
@@ -71,7 +71,7 @@ export default {
loading: false,
pageVerify: false,
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
pageSize: 10,
total: 0,
putTime: '',
standardReleaseList: [], // 标准发布数据
@@ -130,6 +130,10 @@ export default {
this.standardReleaseList = res.data.records
this.total = res.data.total
this.loading = false
if (res.data && res.data.records && res.data.records.length > 0) {
const isNew = res.data.records[0].threeDaysNew || false
this.$emit('isNew', isNew)
}
}, e => {
this.loading = false
this.standardReleaseList = []
@@ -1,14 +1,6 @@
<!-- 企标发布 -->
<template>
<div class="release">
<!-- <ul>-->
<!-- <li v-for="item in standardReleaseList" :key="item.id" class="time-title" >-->
<!-- <div style="height: 18px;">-->
<!-- <a @click="handlePreview(item)" style="color: #333333" class="table-jump">{{ item.standName }}</a>-->
<!-- <span class="time">{{item.issueTime ? $moment(item.issueTime).format('YYYY-MM-DD') : '' }}</span>-->
<!-- </div>-->
<!-- </li>-->
<!-- </ul>-->
<el-table
ref="selection"
:data="standardReleaseList"
@@ -45,7 +37,7 @@
<template slot-scope="scope">
<span style="display: flex;align-items: center" @click="handlePreview(scope.row)">
{{ scope.row.standardName }}
<img v-if="checkTime(scope.row.releaseDate)" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
<img v-if="scope.row.threeDaysNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
</span>
</template>
</el-table-column>
@@ -32,7 +32,10 @@
align="center"
>
<template slot-scope="scope">
<a class="table-jump" @click="handleClick(scope.row.id)">{{ scope.row.problemDescription }}</a>
<span style="display: flex;align-items: center;justify-content: center">
<a class="table-jump" @click="handleClick(scope.row.id)">{{ scope.row.problemDescription }}</a>
<img v-if="scope.row.threeDaysNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
</span>
</template>
</el-table-column>
<el-table-column
@@ -104,6 +107,11 @@ export default {
}
this.loading = false
resolve(res)
if (res.data && res.data.records && res.data.records.length > 0) {
const isNew = res.data.records[0].threeDaysNew || false
this.$emit('isNew', isNew)
}
}, e => {
this.loading = false
reject(e)
@@ -1,14 +1,6 @@
<!-- 企标发布 -->
<template>
<div class="release">
<!-- <ul>-->
<!-- <li v-for="item in standardReleaseList" :key="item.id" class="time-title" >-->
<!-- <div style="height: 18px;">-->
<!-- <a @click="handlePreview(item)" style="color: #333333" class="table-jump">{{ item.standName }}</a>-->
<!-- <span class="time">{{item.issueTime ? $moment(item.issueTime).format('YYYY-MM-DD') : '' }}</span>-->
<!-- </div>-->
<!-- </li>-->
<!-- </ul>-->
<el-table
ref="selection"
:data="standardReleaseList"
@@ -42,7 +34,10 @@
align="center"
>
<template slot-scope="scope">
<span style="cursor:pointer;color: #409eff" @click.stop="toDetail(scope.row)">{{ scope.row.dataTitle }}</span>
<span style="display: flex;align-items: center;justify-content: center">
<span style="cursor:pointer;color: #409eff" @click.stop="toDetail(scope.row)">{{ scope.row.dataTitle }}</span>
<img v-if="scope.row.threeDaysNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
</span>
</template>
</el-table-column>
<el-table-column
@@ -147,6 +142,10 @@ export default {
this.standardReleaseList = res.data
this.total = res.data.total
this.loading = false
if (res.data && res.data.length > 0) {
const isNew = res.data[0].threeDaysNew || false
this.$emit('isNew', isNew)
}
}, e => {
this.loading = false
this.standardReleaseList = []
@@ -1,14 +1,6 @@
<!-- 标准征求意见 -->
<template>
<div class="solicitopinions">
<!-- <ul>-->
<!-- <li v-for="item in domesticDynamics" :key="item.id" class="time-title">-->
<!-- <div style="height: 18px; border-bottom: dashed 1px #cccccc">-->
<!-- <a class="title" style="color: #333333;" :title="item.cname" @click="standForComments(item)">{{ item.cid }}</a>-->
<!-- <span class="time">{{ item.endTime }}</span>-->
<!-- </div>-->
<!-- </li>-->
<!-- </ul>-->
<el-table
ref="selection"
:data="domesticDynamics"
@@ -17,7 +9,6 @@
style="cursor:pointer;"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
style="width: 100%">
<el-table-column
label="序号"
type="index"
@@ -26,11 +17,13 @@
/>
<el-table-column
prop="cid"
show-overflow-tooltip
label="标准名称"
>
<template slot-scope="scope">
<span @click="standForComments(scope.row)">{{ scope.row.cid }}</span>
<span style="display: flex;align-items: center" @click="standForComments(scope.row)">
<span>{{ scope.row.cid }}</span>
<img v-if="scope.row.threeDaysNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">
</span>
</template>
</el-table-column>
<el-table-column
@@ -60,7 +53,6 @@ export default {
mounted () {
this.getDate();
this.getAdvice();
// this.addDate();
},
methods: {
// 截取时间
@@ -76,6 +68,10 @@ export default {
_this: this
}, res => {
this.domesticDynamics = res.data.records
if (res.data && res.data.records && res.data.records.length > 0) {
const isNew = res.data.records[0].threeDaysNew || false
this.$emit('isNew', isNew)
}
}, e => {
});
+57 -18
View File
@@ -5,43 +5,73 @@
<search-group />
<div class="main-tabs" style="box-shadow:1px 1px 10px rgba(0,0,0,0.1);border-radius: 3px;">
<div class="main-left-wrap">
<!-- <el-button type="text" style="font-size: 14px" class="more" @click="MORE">MORE</el-button>-->
<el-tabs
v-model="activeName"
class="home-tabs"
@tab-click="handleTabClick"
>
<el-tab-pane name="solicitOpinions">
<span slot="label"><i class="el-icon-s-order" /> 标准征求意见</span>
<solicitOpinions />
<span slot="label" style="position: relative">
<i class="el-icon-s-order" />
标准征求意见
<span v-if="opinionIsNew" class="more-doc" />
</span>
<solicitOpinions @isNew="setIsNew($event, 'opinionIsNew')" />
</el-tab-pane>
<el-tab-pane name="releaseZL" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-chat-line-round" /> 标准化动态</span>
<releaseZL />
<span slot="label" style="position: relative">
<i class="el-icon-chat-line-round" />
标准化动态
<span v-if="trendsIsNew" class="more-doc" />
</span>
<releaseZL @isNew="setIsNew($event, 'trendsIsNew')" />
</el-tab-pane>
<el-tab-pane name="releaseUs" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-s-operation" /> 在研标准法规动态</span>
<releaseUs />
<span slot="label" style="position: relative">
<i class="el-icon-s-operation" />
在研标准法规动态
<span v-if="underResearchIsNew" class="more-doc" />
</span>
<!-- <releaseUs />-->
<release messageType="ZYBZFG" @isNew="setIsNew($event, 'underResearchIsNew')" />
</el-tab-pane>
<el-tab-pane name="releaseCn" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-s-promotion" /> 国内标准法规动态</span>
<release messageType="GNBZFG" />
<span slot="label" style="position: relative">
<i class="el-icon-s-promotion" />
国内标准法规动态
<span v-if="domIsNew" class="more-doc" />
</span>
<release messageType="GNBZFG" @isNew="setIsNew($event, 'domIsNew')" />
</el-tab-pane>
<el-tab-pane name="release" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-s-promotion" /> 国外标准法规动态</span>
<release messageType="GWBZFG" />
<span slot="label" style="position: relative">
<i class="el-icon-s-promotion" />
国外标准法规动态
<span v-if="abroadIsNew" class="more-doc" />
</span>
<release messageType="GWBZFG" @isNew="setIsNew($event, 'abroadIsNew')" />
</el-tab-pane>
<el-tab-pane name="releaseBuss" style="overflow-y: auto;height: 100%">
<span slot="label" style="position: relative"><i class="el-icon-s-promotion" />
<span slot="label" style="position: relative">
<i class="el-icon-s-promotion" />
企业标准发布
<span v-if="isNew" class="more-doc" />
<!--<img v-if="isNew" src="/static/images/new.png" style="width: 30px;margin-left: 5px">-->
</span>
<releaseBuss />
<releaseBuss @isNew="setIsNew($event, 'isNew')" />
</el-tab-pane>
<el-tab-pane name="releaseQA" style="overflow-y: auto;height: 100%">
<span slot="label"><i class="el-icon-chat-line-round" /> 标准问答</span>
<releaseQA />
<span slot="label" style="position: relative">
<i class="el-icon-chat-line-round" />
标准问答
<span v-if="questionIsNew" class="more-doc" />
</span>
<releaseQA @isNew="setIsNew($event, 'questionIsNew')" />
</el-tab-pane>
</el-tabs>
</div>
@@ -88,13 +118,22 @@ export default {
data () {
return {
activeName: 'solicitOpinions',
isNew: false
opinionIsNew: false,
trendsIsNew: false,
underResearchIsNew: false,
domIsNew: false,
abroadIsNew: false,
isNew: false,
questionIsNew: false,
}
},
created () {
this.getAdvice()
// this.getAdvice()
},
methods: {
setIsNew (isNew, key) {
this.$set(this, key, isNew)
},
getAdvice () {
this.$http.get('/lawss/NewsFeed/getNewsFeed', {
messageType: 'QYBZFB',