|
@@ -29,25 +29,10 @@
|
|
|
</b-field>
|
|
</b-field>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="submit-state">
|
|
|
|
|
- 提交情况:<progress
|
|
|
|
|
- class="process-bar progress is-link"
|
|
|
|
|
- value="30"
|
|
|
|
|
- max="100"
|
|
|
|
|
- ></progress>
|
|
|
|
|
- 13/52
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
<b-tabs>
|
|
<b-tabs>
|
|
|
<b-tab-item label="已提交">
|
|
<b-tab-item label="已提交">
|
|
|
<div class="submitted-list">
|
|
<div class="submitted-list">
|
|
|
- <b-table
|
|
|
|
|
- :data="data"
|
|
|
|
|
- paginated
|
|
|
|
|
- per-page="5"
|
|
|
|
|
- detailed
|
|
|
|
|
- detail-key="id"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <b-table :data="showResult" paginated per-page="5">
|
|
|
<template slot-scope="props">
|
|
<template slot-scope="props">
|
|
|
<b-table-column
|
|
<b-table-column
|
|
|
field="id"
|
|
field="id"
|
|
@@ -59,37 +44,31 @@
|
|
|
>
|
|
>
|
|
|
{{ props.row.id }}
|
|
{{ props.row.id }}
|
|
|
</b-table-column>
|
|
</b-table-column>
|
|
|
-
|
|
|
|
|
- <b-table-column label="所处阶段" centered>
|
|
|
|
|
- {{ props.row.stage }}
|
|
|
|
|
- </b-table-column>
|
|
|
|
|
-
|
|
|
|
|
<b-table-column label="构建" centered>
|
|
<b-table-column label="构建" centered>
|
|
|
- <span class="tag is-success">{{ props.row.build }}</span>
|
|
|
|
|
|
|
+ <span :class="props.row.buildTag">{{
|
|
|
|
|
+ props.row.buildStatus
|
|
|
|
|
+ }}</span>
|
|
|
</b-table-column>
|
|
</b-table-column>
|
|
|
|
|
|
|
|
<b-table-column label="部署" centered>
|
|
<b-table-column label="部署" centered>
|
|
|
- <span class="tag is-warning">{{ props.row.deploy }}</span>
|
|
|
|
|
|
|
+ <span :class="props.row.deployTag">{{
|
|
|
|
|
+ props.row.deployStatus
|
|
|
|
|
+ }}</span>
|
|
|
</b-table-column>
|
|
</b-table-column>
|
|
|
<b-table-column label="测试">
|
|
<b-table-column label="测试">
|
|
|
- <span class="tag is-danger">{{ props.row.test }}</span>
|
|
|
|
|
|
|
+ <span :class="props.row.testTag">{{
|
|
|
|
|
+ props.row.testStatus
|
|
|
|
|
+ }}</span>
|
|
|
|
|
+ </b-table-column>
|
|
|
|
|
+ <b-table-column label="详情">
|
|
|
|
|
+ <router-link
|
|
|
|
|
+ :to="{
|
|
|
|
|
+ path: `/course-teacher/:courseId/code/detail/test`,
|
|
|
|
|
+ query: { assignmentInfo: props.row }
|
|
|
|
|
+ }"
|
|
|
|
|
+ >查看详情</router-link
|
|
|
|
|
+ >
|
|
|
</b-table-column>
|
|
</b-table-column>
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <template slot="detail">
|
|
|
|
|
- <article class="media">
|
|
|
|
|
- <div class="media-content">
|
|
|
|
|
- <div class="content">
|
|
|
|
|
- <p>
|
|
|
|
|
- <strong>成绩详情</strong>
|
|
|
|
|
- <small
|
|
|
|
|
- >这里可以放具体的作业成绩,前面可以放总评啥的</small
|
|
|
|
|
- >
|
|
|
|
|
- <br />
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </article>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
</b-table>
|
|
</b-table>
|
|
|
</div>
|
|
</div>
|
|
@@ -133,7 +112,6 @@ const unsubmited = {
|
|
|
{
|
|
{
|
|
|
field: "id",
|
|
field: "id",
|
|
|
label: "小组ID",
|
|
label: "小组ID",
|
|
|
- // width: "80",
|
|
|
|
|
numeric: true,
|
|
numeric: true,
|
|
|
centered: true
|
|
centered: true
|
|
|
},
|
|
},
|
|
@@ -147,29 +125,36 @@ const unsubmited = {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
};
|
|
};
|
|
|
-const data = [
|
|
|
|
|
|
|
+const info = [
|
|
|
{
|
|
{
|
|
|
id: 1,
|
|
id: 1,
|
|
|
stage: "测试",
|
|
stage: "测试",
|
|
|
- build: "SUCCESS",
|
|
|
|
|
- deploy: "SUCCESS",
|
|
|
|
|
- test: "10/10"
|
|
|
|
|
|
|
+ build: 0,
|
|
|
|
|
+ deploy: 0,
|
|
|
|
|
+ test: -1,
|
|
|
|
|
+ pass: 0,
|
|
|
|
|
+ testNum: 10
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
id: 2,
|
|
id: 2,
|
|
|
stage: "测试",
|
|
stage: "测试",
|
|
|
- build: "SUCCESS",
|
|
|
|
|
- deploy: "SUCCESS",
|
|
|
|
|
- test: "10/10"
|
|
|
|
|
|
|
+ build: 1,
|
|
|
|
|
+ deploy: 1,
|
|
|
|
|
+ test: 0,
|
|
|
|
|
+ pass: 0,
|
|
|
|
|
+ testNum: 10
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- id: 2,
|
|
|
|
|
|
|
+ id: 3,
|
|
|
stage: "测试",
|
|
stage: "测试",
|
|
|
- build: "SUCCESS",
|
|
|
|
|
- deploy: "SUCCESS",
|
|
|
|
|
- test: "10/10"
|
|
|
|
|
|
|
+ build: 1,
|
|
|
|
|
+ deploy: 1,
|
|
|
|
|
+ test: 1,
|
|
|
|
|
+ pass: 10,
|
|
|
|
|
+ testNum: 10
|
|
|
}
|
|
}
|
|
|
];
|
|
];
|
|
|
|
|
+const showResult = [];
|
|
|
const assignmentInfo = {
|
|
const assignmentInfo = {
|
|
|
id: 0,
|
|
id: 0,
|
|
|
name: "",
|
|
name: "",
|
|
@@ -178,6 +163,18 @@ const assignmentInfo = {
|
|
|
endAt: 0
|
|
endAt: 0
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const tag = {
|
|
|
|
|
+ success: "tag is-success",
|
|
|
|
|
+ failed: "tag is-danger",
|
|
|
|
|
+ blank: "tag is-dark"
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+const status = {
|
|
|
|
|
+ success: "SUCCESS",
|
|
|
|
|
+ failed: "FAILED",
|
|
|
|
|
+ blank: "BLANK"
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
PageBody,
|
|
PageBody,
|
|
@@ -185,14 +182,30 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.assignmentInfo = this.$route.query.assignmentInfo;
|
|
this.assignmentInfo = this.$route.query.assignmentInfo;
|
|
|
- console.log(this.assignmentInfo.name);
|
|
|
|
|
- console.log(this.assignmentInfo.description);
|
|
|
|
|
|
|
+ for (var item of info) {
|
|
|
|
|
+ showResult.push({
|
|
|
|
|
+ id: item.id,
|
|
|
|
|
+ buildStatus: item.build === 1 ? status.success : status.failed,
|
|
|
|
|
+ buildTag: item.build === 1 ? tag.success : tag.failed,
|
|
|
|
|
+ deployStatus: item.deploy === 1 ? status.success : status.failed,
|
|
|
|
|
+ deployTag: item.deploy === 1 ? tag.success : tag.failed,
|
|
|
|
|
+ testStatus: item.test === 1 ? status.success : status.failed,
|
|
|
|
|
+ testTag: item.test === 1 ? tag.success : tag.failed
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- data,
|
|
|
|
|
|
|
+ info,
|
|
|
unsubmited,
|
|
unsubmited,
|
|
|
- assignmentInfo
|
|
|
|
|
|
|
+ assignmentInfo,
|
|
|
|
|
+ tag,
|
|
|
|
|
+ status,
|
|
|
|
|
+ showResult,
|
|
|
|
|
+ submitCount: {
|
|
|
|
|
+ yes: 19,
|
|
|
|
|
+ no: 8
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|