This commit is contained in:
2018-04-26 19:37:46 +08:00
parent 608251afa2
commit 5a132f549a
42 changed files with 9900 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
#控制配置文件调用
spring:
profiles:
active: prod
active: dev

View File

@@ -25,8 +25,8 @@
<!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径文件名,文件名包含时间-->
<!--<fileNamePattern>F:\JAVA Workspace\Temp\log\%d\info.%d.log</fileNamePattern>-->
<fileNamePattern>/www/cmsfile/%d/info.%d.log</fileNamePattern>
<fileNamePattern>F:\JAVA Workspace\Temp\log\%d\info.%d.log</fileNamePattern>
<!-- <fileNamePattern>/www/cmsfile/%d/info.%d.log</fileNamePattern>-->
</rollingPolicy>
</appender>
@@ -44,8 +44,8 @@
<!--滚动策略-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--路径文件名,文件名包含时间-->
<!--<fileNamePattern>F:\JAVA Workspace\Temp\log\error.%d.log</fileNamePattern>-->
<fileNamePattern>/www/cmsfile/%d/error.%d.log</fileNamePattern>
<fileNamePattern>F:\JAVA Workspace\Temp\log\error.%d.log</fileNamePattern>
<!--<fileNamePattern>/www/cmsfile/%d/error.%d.log</fileNamePattern>-->
</rollingPolicy>
</appender>

View File

@@ -5,13 +5,18 @@ var year = dt.getFullYear();
var cur = year + '-' + month + '-' + day;
function DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
var aDate, oDate1, oDate2, iDays
aDate = sDate1.split("-")
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) //转换为12-18-2002格式
aDate = sDate2.split("-")
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数
return iDays
let aDate, oDate1, oDate2, iDays;
if (compareTime(sDate1, sDate2)) {
return "已截止";
}
else {
aDate = sDate1.split("-");
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]); //转换为12-18-2002格式
aDate = sDate2.split("-");
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]);
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24); //把相差的毫秒数转换为天数
return iDays
}
}
function displayStyle(id, type) {

View File

@@ -82,14 +82,14 @@
<div slot="header" class="clearfix">
<span>作业提交倒计时</span>
<!--超时后仍为正数-->
<span style="color: red"> 功能未完成</span>
<!--<span style="color: red"> 功能未完成</span>-->
</div>
<div class="text item">
<el-table :data="tableHomeworkData" style="width: 100%"
:default-sort="{prop: 'coursename', order: 'descending'}">
:default-sort="{prop: 'time', order: 'descending'}">
<el-table-column prop="coursename" label="科目" sortable width="180">
</el-table-column>
<el-table-column label="倒计时" sortable>
<el-table-column prop="time" label="倒计时" sortable>
<template slot-scope="scope">
{{limitTime(scope.row)}}
</template>