首页展示
This commit is contained in:
@@ -2,9 +2,11 @@
|
|||||||
<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">
|
<li v-for="item in standardReleaseList" :key="item.id" class="time-title" >
|
||||||
<a @click="handlePreview(item)" class="table-jump">{{ item.standName }}</a>
|
<div style="height: 18px;">
|
||||||
<span class="time">{{item.issueTime }}</span>
|
<a @click="handlePreview(item)" class="table-jump">{{ item.standName }}</a>
|
||||||
|
<span class="time">{{item.issueTime ? $moment(item.issueTime).format('YYYY-MM-DD') : '' }}</span>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -19,7 +21,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
putTime: '',
|
putTime: '',
|
||||||
standardReleaseList: [], //标准发布数据
|
standardReleaseList: [], //标准发布数据
|
||||||
updateTime:""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
@@ -30,19 +31,6 @@ export default {
|
|||||||
this.addDate()
|
this.addDate()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取当前年月日
|
|
||||||
addDate(){
|
|
||||||
const nowDate = new Date();
|
|
||||||
const date = {
|
|
||||||
year: nowDate.getFullYear(),
|
|
||||||
month: nowDate.getMonth() + 1,
|
|
||||||
date: nowDate.getDate(),
|
|
||||||
}
|
|
||||||
const newmonth = date.month>10?date.month:'0'+date.month
|
|
||||||
const day = date.date>10?date.date:'0'+date.date
|
|
||||||
this.updateTime = date.year + '-' + newmonth + '-' + day
|
|
||||||
console.log("当前时间"+this.updateTime)
|
|
||||||
},
|
|
||||||
// 点击查看
|
// 点击查看
|
||||||
handlePreview (item) {
|
handlePreview (item) {
|
||||||
let routeUrl = this.$router.resolve({
|
let routeUrl = this.$router.resolve({
|
||||||
@@ -65,7 +53,12 @@ export default {
|
|||||||
this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoByList', obj, {
|
this.$http.get('sarStandardsInfo/sar-standards-info/getStandInfoByList', obj, {
|
||||||
_this: this
|
_this: this
|
||||||
}, res => {
|
}, res => {
|
||||||
this.standardReleaseList = res.data
|
let arr = res.data
|
||||||
|
arr.forEach(item => {
|
||||||
|
if(item.standName !== ""){
|
||||||
|
this.standardReleaseList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
}, e => {
|
}, e => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="solicitopinions">
|
<div class="solicitopinions">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="item in domesticDynamics" :key="item.id" class="time-title" v-if="updateTime < item.endTime">
|
<li v-for="item in domesticDynamics" :key="item.id" class="time-title">
|
||||||
<a class="title" :title="item.cname" @click="standForComments(item)">{{ item.cname }}</a>
|
<div style="height: 18px">
|
||||||
<span class="time">{{ item.endTime }}</span>
|
<a class="title" :title="item.cname" @click="standForComments(item)">{{ item.cname }}</a>
|
||||||
|
<span class="time">{{ item.endTime }}</span>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,22 +29,9 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getDate();
|
this.getDate();
|
||||||
this.getAdvice();
|
this.getAdvice();
|
||||||
this.addDate();
|
// this.addDate();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取当前年月日
|
|
||||||
addDate() {
|
|
||||||
const nowDate = new Date();
|
|
||||||
const date = {
|
|
||||||
year: nowDate.getFullYear(),
|
|
||||||
month: nowDate.getMonth() + 1,
|
|
||||||
date: nowDate.getDate()
|
|
||||||
};
|
|
||||||
const newmonth = date.month > 10 ? date.month : "0" + date.month;
|
|
||||||
const day = date.date > 10 ? date.date : "0" + date.date;
|
|
||||||
this.updateTime = date.year + "-" + newmonth + "-" + day;
|
|
||||||
console.log("当前时间" + this.updateTime);
|
|
||||||
},
|
|
||||||
//截取时间
|
//截取时间
|
||||||
getDate(date) {
|
getDate(date) {
|
||||||
return date != null ? date.substring(0, date.indexOf(" ")) : "";
|
return date != null ? date.substring(0, date.indexOf(" ")) : "";
|
||||||
@@ -51,11 +40,16 @@ export default {
|
|||||||
getAdvice() {
|
getAdvice() {
|
||||||
this.$http.get("slrs/sar-public-idea/SelectAllPage", {
|
this.$http.get("slrs/sar-public-idea/SelectAllPage", {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 1000,
|
size: 1000
|
||||||
}, {
|
}, {
|
||||||
_this: this
|
_this: this
|
||||||
}, res => {
|
}, res => {
|
||||||
this.domesticDynamics = res.data.records
|
let arr = res.data.records;
|
||||||
|
arr.forEach(item => {
|
||||||
|
if (item.cname !== "") {
|
||||||
|
this.domesticDynamics.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
}, e => {
|
}, e => {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user