98 lines
2.1 KiB
Vue
98 lines
2.1 KiB
Vue
<!-- 标准征求意见 -->
|
|
<template>
|
|
<div class="solicitopinions">
|
|
<ul>
|
|
<li v-for="item in domesticDynamics" :key="item.id" class="time-title" v-if="updateTime < item.endTime">
|
|
<a class="title" :title="item.cname" @click="standForComments(item)">{{ item.cname }}</a>
|
|
<span class="time">{{ item.endTime }}</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "Solicitopinions",
|
|
components: {},
|
|
mixins: [],
|
|
data() {
|
|
return {
|
|
updateTime: "",
|
|
putTime: "",
|
|
domesticDynamics: [] //标准征求意见数据
|
|
};
|
|
},
|
|
computed: {},
|
|
watch: {},
|
|
mounted() {
|
|
this.getDate();
|
|
this.getAdvice();
|
|
this.addDate();
|
|
},
|
|
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) {
|
|
return date != null ? date.substring(0, date.indexOf(" ")) : "";
|
|
},
|
|
//获取数据
|
|
getAdvice() {
|
|
this.$http.get("slrs/sar-public-idea/SelectAllPage", {
|
|
page: 1,
|
|
size: 1000,
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
this.domesticDynamics = res.data.records
|
|
}, e => {
|
|
|
|
});
|
|
},
|
|
standForComments(item) {
|
|
this.$store.commit("setDetailMap", this.$router.path);
|
|
this.$router.push({
|
|
name: "consultationDetails",
|
|
query: {
|
|
item: item
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.solicitopinions {
|
|
.time-title {
|
|
margin: 15px;
|
|
|
|
.time {
|
|
float: right;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
a {
|
|
color: #ffffff;
|
|
|
|
&:hover {
|
|
color: #e9c851;
|
|
cursor: pointer;
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|