征求意见信息展示

This commit is contained in:
宋伟佳
2021-09-09 16:04:56 +08:00
parent 7f4cde4eb6
commit 68913d68fc
2 changed files with 48 additions and 26 deletions
@@ -2,9 +2,9 @@
<template>
<div class="solicitopinions">
<ul>
<li v-for="item in domesticDynamics" :key="item.id" class="time-title">
<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>
<span class="time">{{ item.endTime }}</span>
</li>
</ul>
</div>
@@ -12,62 +12,83 @@
<script>
export default {
name: 'Solicitopinions',
name: "Solicitopinions",
components: {},
mixins: [],
data() {
return {
putTime: '',
domesticDynamics: [], //标准征求意见数据
}
updateTime: "",
putTime: "",
domesticDynamics: [] //标准征求意见数据
};
},
computed: {},
watch: {},
mounted() {
this.getDate()
this.getAdvice()
this.getDate();
this.getAdvice();
this.addDate();
},
methods: {
//截取时间
getDate (date) {
return date != null ? date.substring(0, date.indexOf(' ')) : ''
//获取当前年月日
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', {}, {
_this: this
}, res => {
this.domesticDynamics = res.data.records
}, e => {
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)
standForComments(item) {
this.$store.commit("setDetailMap", this.$router.path);
this.$router.push({
name: 'consultationDetails',
name: "consultationDetails",
query: {
item: item
}
})
},
},
}
});
}
}
};
</script>
<style lang="less" scoped>
.solicitopinions {
.time-title {
margin: 15px;
.time {
float: right;
color:#FFFFFF;
color: #FFFFFF;
}
a {
color: #ffffff;
&:hover {
color: #e9c851;
cursor:pointer;
cursor: pointer;
text-decoration: underline;
}
}
@@ -142,6 +142,7 @@ export default {
// 查询表格
sarStandCompareHis() {
this.spinShow = true;
this.standCommonlySearch.type = 1;
var form = this.standCommonlySearch;
this.$http.get("slrs/sar-public-idea/SelectAllPage", form, {
_this: this