|
@@ -145,10 +145,12 @@ export default {
|
|
|
this.searchList();
|
|
|
},
|
|
|
openModal(sitem) {
|
|
|
+ if (this.checkAuditTime('9:00','18:00')) return this.$message.warning('9:00至18:00不可编辑')
|
|
|
+
|
|
|
this.showModel = true;
|
|
|
this.sitem = sitem;
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
batchExport(content) {
|
|
|
if (!this.loading) {
|
|
|
this.loading = true;
|
|
@@ -173,6 +175,22 @@ export default {
|
|
|
}
|
|
|
this.loading = false;
|
|
|
},
|
|
|
+ checkAuditTime(beginTime, endTime) {
|
|
|
+ var nowDate = new Date();
|
|
|
+ var beginDate = new Date(nowDate);
|
|
|
+ var endDate = new Date(nowDate);
|
|
|
+
|
|
|
+ var beginIndex = beginTime.lastIndexOf("\:");
|
|
|
+ var beginHour = beginTime.substring(0, beginIndex);
|
|
|
+ var beginMinue = beginTime.substring(beginIndex + 1, beginTime.length);
|
|
|
+ beginDate.setHours(beginHour, beginMinue, 0, 0);
|
|
|
+
|
|
|
+ var endIndex = endTime.lastIndexOf("\:");
|
|
|
+ var endHour = endTime.substring(0, endIndex);
|
|
|
+ var endMinue = endTime.substring(endIndex + 1, endTime.length);
|
|
|
+ endDate.setHours(endHour, endMinue, 0, 0);
|
|
|
+ return nowDate.getTime() - beginDate.getTime() >= 0 && nowDate.getTime() <= endDate.getTime();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|