commit
This commit is contained in:
@@ -2,87 +2,106 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="release">
|
<div class="release">
|
||||||
<ul>
|
<ul>
|
||||||
|
<li v-for="item in standardReleaseList" :key="item.id" class="time-title" v-if="updateTime>=item.issueTime">
|
||||||
|
<a @click="handlePreview(item)" class="table-jump">{{ item.standName }}</a>
|
||||||
|
<span class="time">{{item.issueTime }}</span>
|
||||||
<li v-for="item in standardReleaseList" :key="item.id" class="time-title" >
|
<li v-for="item in standardReleaseList" :key="item.id" class="time-title" >
|
||||||
<div style="height: 18px;">
|
<div style="height: 18px;">
|
||||||
<a @click="handlePreview(item)" class="table-jump">{{ item.standName }}</a>
|
<a @click="handlePreview(item)" class="table-jump">{{ item.standName }}</a>
|
||||||
<span class="time">{{item.issueTime ? $moment(item.issueTime).format('YYYY-MM-DD') : '' }}</span>
|
<span class="time">{{item.issueTime ? $moment(item.issueTime).format('YYYY-MM-DD') : '' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Release',
|
name: 'Release',
|
||||||
components: {},
|
components: {},
|
||||||
mixins: [],
|
mixins: [],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
putTime: '',
|
putTime: '',
|
||||||
standardReleaseList: [], //标准发布数据
|
standardReleaseList: [], //标准发布数据
|
||||||
}
|
updateTime:""
|
||||||
},
|
}
|
||||||
computed: {},
|
},
|
||||||
watch: {},
|
computed: {},
|
||||||
mounted() {
|
watch: {},
|
||||||
this.getDate()
|
mounted() {
|
||||||
this.getAdvice()
|
this.getDate()
|
||||||
this.addDate()
|
this.getAdvice()
|
||||||
},
|
this.addDate()
|
||||||
methods: {
|
},
|
||||||
// 点击查看
|
methods: {
|
||||||
handlePreview (item) {
|
//获取当前年月日
|
||||||
let routeUrl = this.$router.resolve({
|
addDate(){
|
||||||
name: 'OtherStandardDetails',
|
const nowDate = new Date();
|
||||||
params: {
|
const date = {
|
||||||
id: item.id,
|
year: nowDate.getFullYear(),
|
||||||
pageType: item.standType + '_STAND'
|
month: nowDate.getMonth() + 1,
|
||||||
|
date: nowDate.getDate(),
|
||||||
}
|
}
|
||||||
})
|
const newmonth = date.month>10?date.month:'0'+date.month
|
||||||
window.open(routeUrl.href, '_blank')
|
const day = date.date>10?date.date:'0'+date.date
|
||||||
},
|
this.updateTime = date.year + '-' + newmonth + '-' + day
|
||||||
//截取时间
|
console.log("当前时间"+this.updateTime)
|
||||||
getDate (date) {
|
},
|
||||||
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
// 点击查看
|
||||||
},
|
handlePreview (item) {
|
||||||
//获取数据
|
let routeUrl = this.$router.resolve({
|
||||||
getAdvice() {
|
name: 'OtherStandardDetails',
|
||||||
let obj = {}
|
params: {
|
||||||
obj.limit = 8
|
id: item.id,
|
||||||
this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoByList', obj, {
|
pageType: item.standType + '_STAND'
|
||||||
_this: this
|
|
||||||
}, res => {
|
|
||||||
let arr = res.data
|
|
||||||
arr.forEach(item => {
|
|
||||||
if(item.standName !== ""){
|
|
||||||
this.standardReleaseList.push(item)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, e => {
|
window.open(routeUrl.href, '_blank')
|
||||||
})
|
},
|
||||||
|
//截取时间
|
||||||
|
getDate (date) {
|
||||||
|
return date != null ? date.substring(0, date.indexOf(' ')) : ''
|
||||||
|
},
|
||||||
|
//获取数据
|
||||||
|
getAdvice() {
|
||||||
|
let obj = {}
|
||||||
|
obj.limit = 8
|
||||||
|
this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoByList', obj, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.standardReleaseList = res.data
|
||||||
|
let arr = res.data
|
||||||
|
arr.forEach(item => {
|
||||||
|
if(item.standName !== ""){
|
||||||
|
this.standardReleaseList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, e => {
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.release {
|
.release {
|
||||||
.time-title {
|
.time-title {
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
.time {
|
.time {
|
||||||
float: right;
|
float: right;
|
||||||
color:#FFFFFF;
|
color:#FFFFFF;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #e9c851;
|
color: #e9c851;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user