|
@@ -5,18 +5,30 @@
|
|
|
<div class="evaluation-list-title">
|
|
|
<span>评测列表</span>
|
|
|
<Icon type="md-add" class="to-create-icon" size="20" @click="goToCreate" title="新建" />
|
|
|
- <Icon type="md-trash" :class="evaluationList.length == 0 ? 'custom-label-disabeld to-create-icon':'to-create-icon'" title="删除" @click="deleteEvaluation" />
|
|
|
- <Icon type="md-create" :class="evaluationList.length == 0 ? 'custom-label-disabeld to-create-icon':'to-create-icon'" @click="editEvaluation" title="编辑" />
|
|
|
+ <!--<Icon type="md-trash" :class="evaluationList.length == 0 ? 'custom-label-disabeld to-create-icon':'to-create-icon'" title="删除" @click="deleteEvaluation" />
|
|
|
+ <Icon type="md-create" :class="evaluationList.length == 0 ? 'custom-label-disabeld to-create-icon':'to-create-icon'" @click="editEvaluation" title="编辑" />-->
|
|
|
</div>
|
|
|
<div class="evaluation-list-main">
|
|
|
<vuescroll>
|
|
|
<div :class="index == avtiveEvaluationIndex ? 'evaluation-item block-bg-active block-bg':'evaluation-item block-bg'" v-for="(item,index) in evaluationList" @click="selectEvaluation(index)">
|
|
|
+ <Icon type="md-trash" :class="evaluationList.length == 0 ? 'custom-label-disabeld to-create-icon':'to-create-icon'" title="删除" @click="deleteEvaluation" />
|
|
|
+ <Icon type="md-create" :class="evaluationList.length == 0 ? 'custom-label-disabeld to-create-icon':'to-create-icon'" @click="editEvaluation" title="编辑" />
|
|
|
<p class="evaluation-name">{{item.name}}</p>
|
|
|
<p class="evaluation-type">
|
|
|
- <Icon type="ios-cube" color="#a5a5a5" style="margin-right:10px;" size="16" />
|
|
|
- <span>评测类型:{{getTypeLabel(item.type)}}</span>
|
|
|
+ <Icon type="md-time" color="#a5a5a5" style="margin-right:5px;" size="16" />
|
|
|
+ <span>施测时间:{{dateFormat(item.startTime)}}</span>
|
|
|
<span class="evaluation-status-tag" :style="{ background: (item.state === 100 ? '#0BADD4' : item.state === 200 ? '#0fb68b' : '#949594')}">{{ item.state === 100 ? '待发布' : item.state === 200 ? '进行中' : '已结束' }}</span>
|
|
|
</p>
|
|
|
+ <div style="display:inline-flex">
|
|
|
+ <p class="evaluation-type">
|
|
|
+ <Icon type="ios-cube" color="#a5a5a5" style="margin-right:5px;" size="16" />
|
|
|
+ <span>评测类型:{{getTypeLabel(item.type)}}</span>
|
|
|
+ </p>
|
|
|
+ <p class="evaluation-type">
|
|
|
+ <Icon type="ios-cube" color="#a5a5a5" style="margin-right:5px;" size="16" />
|
|
|
+ <span>施测对象:{{getTypeLabel(item.type)}}</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<EmptyData v-if="evaluationList.length == 0" style="margin-top:120px;"></EmptyData>
|
|
|
</vuescroll>
|
|
@@ -31,7 +43,7 @@
|
|
|
</div>
|
|
|
<!--评测基础信息-->
|
|
|
<div :class="currentBraIndex == 0 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="currentBraIndex == 0">
|
|
|
- <div class="evalustion-base-attr dark-iview-input dark-iview-select">
|
|
|
+ <!--<div class="evalustion-base-attr dark-iview-input dark-iview-select">
|
|
|
<div class="evalustion-base-attr-header">
|
|
|
基础信息
|
|
|
</div>
|
|
@@ -59,7 +71,7 @@
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
<EmptyData v-else style="margin-top:80px;"></EmptyData>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
<!-- 试卷详细信息 -->
|
|
|
<div class="evaluation-test-paper">
|
|
|
<div class="evaluation-test-paper-header">
|
|
@@ -102,7 +114,7 @@
|
|
|
@on-ok="confirmDeleteEvaluation">
|
|
|
<p style="font-size:16px;" v-if="evaluationList.length > 0">确认删除 {{evaluationList[avtiveEvaluationIndex].name}}?</p>
|
|
|
</Modal>
|
|
|
- <Modal v-model="publishStatus"
|
|
|
+ <!--<Modal v-model="publishStatus"
|
|
|
title="发布评测"
|
|
|
class-name="dark-iview-modal dark-iview-form"
|
|
|
@on-ok="confirmPublishEvaluation">
|
|
@@ -126,7 +138,7 @@
|
|
|
<DatePicker type="date" format="yyyy/MM/dd HH:mm" split-panels placeholder="请选择发布时间" style="width:100%" @on-change="getDate"></DatePicker>
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
- </Modal>
|
|
|
+ </Modal>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -217,13 +229,7 @@
|
|
|
label:'定时发布'
|
|
|
}
|
|
|
],
|
|
|
- //studentLsit: [
|
|
|
- // {
|
|
|
- // id: HSBN001,
|
|
|
- // name: '测试一',
|
|
|
-
|
|
|
- // },
|
|
|
- //]
|
|
|
+ startTime:''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -495,9 +501,17 @@
|
|
|
let date = new Date(timestamp)
|
|
|
return date
|
|
|
},
|
|
|
+ dateFormat(timestamp) {
|
|
|
+ var date = new Date(timestamp)
|
|
|
+ var Y = date.getFullYear() + '-'
|
|
|
+ var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
|
|
|
+ var D = date.getDate() + ' '
|
|
|
+ return Y + M + D ;
|
|
|
+ },
|
|
|
getMyDate(start, end) {
|
|
|
this.myDate.length = 0
|
|
|
this.myDate = [this.formatDate(start), this.formatDate(end)]
|
|
|
+ this.startTime = this.dateFormat( start)
|
|
|
},
|
|
|
selectEvaluation(index) {
|
|
|
this.currentBraIndex = 0
|
|
@@ -505,13 +519,13 @@
|
|
|
this.getMyDate(this.evaluationList[this.avtiveEvaluationIndex].startTime, this.evaluationList[this.avtiveEvaluationIndex].endTime)
|
|
|
this.findExamPaper()
|
|
|
},
|
|
|
- timestampToTime(timestamp) {
|
|
|
- var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
|
|
- var Y = date.getFullYear() + '-';
|
|
|
- var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
|
|
- var D = date.getDate()
|
|
|
- return Y + M + D;
|
|
|
- },
|
|
|
+ //timestampToTime(timestamp) {
|
|
|
+ // var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
|
|
+ // var Y = date.getFullYear() + '-';
|
|
|
+ // var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
|
|
+ // var D = date.getDate()
|
|
|
+ // return Y + M + D;
|
|
|
+ //},
|
|
|
findEvaluation() {
|
|
|
let requestData = {
|
|
|
code: this.$store.state.userInfo.TEAMModelId
|
|
@@ -520,6 +534,7 @@
|
|
|
res => {
|
|
|
if (res.error == null) {
|
|
|
this.evaluationList = res.result.data
|
|
|
+ console.log(this.evaluationList)
|
|
|
if (this.evaluationList.length > 0) {
|
|
|
this.selectEvaluation(0)
|
|
|
}
|
|
@@ -559,82 +574,6 @@
|
|
|
}
|
|
|
)
|
|
|
},
|
|
|
- //checkCount(count) {
|
|
|
- // switch (count) {
|
|
|
- // case 0:
|
|
|
- // return '一、'
|
|
|
- // break
|
|
|
- // case 1:
|
|
|
- // return '二、'
|
|
|
- // break
|
|
|
- // case 2:
|
|
|
- // return '三、'
|
|
|
- // break
|
|
|
- // case 3:
|
|
|
- // return '四、'
|
|
|
- // break
|
|
|
- // case 4:
|
|
|
- // return '五、'
|
|
|
- // break
|
|
|
- // case 5:
|
|
|
- // return '六、'
|
|
|
- // break
|
|
|
- // default:
|
|
|
- // return ''
|
|
|
- // break
|
|
|
- // }
|
|
|
- //},
|
|
|
- //getOrder(type) {
|
|
|
- // let count = 0
|
|
|
- // switch (type) {
|
|
|
- // case 'Single':
|
|
|
- // return '一、'
|
|
|
- // break
|
|
|
- // case 'Multiple':
|
|
|
- // if (this.groupQuestion.Single != undefined) {
|
|
|
- // return '二、'
|
|
|
- // } else {
|
|
|
- // return '一、'
|
|
|
- // }
|
|
|
- // break
|
|
|
- // case 'Complete':
|
|
|
- // for (let key in this.groupQuestion) {
|
|
|
- // if (key == 'Single' || key == 'Multiple') {
|
|
|
- // count++
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return this.checkCount(count)
|
|
|
- // break
|
|
|
- // case 'Judge':
|
|
|
-
|
|
|
- // for (let key in this.groupQuestion) {
|
|
|
- // if (key == 'Single' || key == 'Complete' || key == 'Multiple') {
|
|
|
- // count++
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return this.checkCount(count)
|
|
|
- // break
|
|
|
- // case 'Subjective':
|
|
|
- // for (let key in this.groupQuestion) {
|
|
|
- // if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge') {
|
|
|
- // count++
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return this.checkCount(count)
|
|
|
- // break
|
|
|
- // case 'Compose':
|
|
|
- // for (let key in this.groupQuestion) {
|
|
|
- // if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge' || key == 'Subjective') {
|
|
|
- // count++
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return this.checkCount(count)
|
|
|
- // break
|
|
|
- // default:
|
|
|
- // return ''
|
|
|
- // break
|
|
|
- // }
|
|
|
- //}
|
|
|
},
|
|
|
mounted() {
|
|
|
setTimeout(() => {
|