|
|
@@ -94,7 +94,12 @@
|
|
|
>已完成</span
|
|
|
> -->
|
|
|
<span v-if="!obj.endDate || (obj.endDate && obj.download >= 1 && obj.report >= 1)" class="noPoint">已完成</span>
|
|
|
- <span v-else @click="waitToReport(obj, index)" :class="{noDownLoad: obj.download == '0'}" class="line">待办</span>
|
|
|
+ <span
|
|
|
+ v-else-if="obj.download >= 1 && obj.report == 0 && (obj.endDate.replace(RegExp('-', 'g'), '') - localDate) >= 0"
|
|
|
+ @click="waitToReport(obj, index)"
|
|
|
+ class="canJump"
|
|
|
+ >待办</span>
|
|
|
+ <span v-else class="noJump">待办</span>
|
|
|
</td>
|
|
|
|
|
|
<td v-if="operation" :style="trStyle" class="operationStyle">
|
|
|
@@ -209,7 +214,8 @@ export default {
|
|
|
userId: localStorage.getItem("userId") || '',
|
|
|
endDate: "",
|
|
|
localReport: "",
|
|
|
- downLoadFlag: false // 下载以后刷新页面
|
|
|
+ downLoadFlag: false, // 下载以后刷新页面
|
|
|
+ localDate: ""
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -218,7 +224,11 @@ export default {
|
|
|
return Math.ceil(this.sum / this.pageSize);
|
|
|
},
|
|
|
isShowDetail() {
|
|
|
- return this.$route.query && this.$route.query.tag ? true : false;
|
|
|
+ let flag = this.$route.query && this.$route.query.tag;
|
|
|
+ if (!flag && this.$route.path === '/inforList') {
|
|
|
+ this.getDataListPage();
|
|
|
+ }
|
|
|
+ return flag ? true : false;
|
|
|
},
|
|
|
showItemOperation: function () {
|
|
|
if (!this.localReport) {
|
|
|
@@ -435,6 +445,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
waitToReport: function(obj) {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/uploadLink/sonUploadLink",
|
|
|
+ query: { informationName: obj.informationName, informationId: obj.id, editFlag: true},
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getNowDate: function() {
|
|
|
let data = new Date();
|
|
|
let year = data.getFullYear();
|
|
|
let month = data.getMonth() + 1;
|
|
|
@@ -449,31 +465,13 @@ export default {
|
|
|
} else {
|
|
|
day = day + "";
|
|
|
}
|
|
|
- let endDate = obj.endDate.replace(RegExp("-", "g"), "");
|
|
|
- let localDate = year + month + day;
|
|
|
- let dateFlag = (+endDate) - (+localDate)
|
|
|
- if (obj.report == 0 && obj.download != 0 && dateFlag >= 0) {
|
|
|
- this.$router.push({
|
|
|
- path: "/uploadLink/sonUploadLink",
|
|
|
- query: { informationName: obj.informationName, informationId: obj.id },
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+ this.localDate = year + month + day;
|
|
|
+ }
|
|
|
},
|
|
|
- // watch: {
|
|
|
- // //普通的watch监听
|
|
|
- // userId(newValue) {
|
|
|
- // if(newValue) {
|
|
|
- // this.getDataListPage()
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
mounted() {
|
|
|
- setTimeout(() => {
|
|
|
- this.userId = localStorage.getItem("userId");
|
|
|
- this.getDataListPage();
|
|
|
- }, 500);
|
|
|
- },
|
|
|
+ this.userId = localStorage.getItem("userId");
|
|
|
+ this.getNowDate();
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
@@ -574,14 +572,12 @@ export default {
|
|
|
.showItemOperationStyle {
|
|
|
display: none;
|
|
|
}
|
|
|
-.noDownLoad{
|
|
|
+.noJump{
|
|
|
color: rgb(173, 162, 162);
|
|
|
cursor: text!important;
|
|
|
-}
|
|
|
-.line{
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
-.noPoint{
|
|
|
- cursor: text!important;
|
|
|
+.canJump{
|
|
|
+ text-decoration: underline;
|
|
|
}
|
|
|
</style>
|