|
@@ -6,8 +6,17 @@
|
|
|
班级人数:<span>{{ stuTotal }}</span> 作业人数:<span>{{ total }}</span>
|
|
|
</p>
|
|
|
</el-col>
|
|
|
- <data-table :fields="fields" :data="tableData" :opera="opera" @view="toTaskDetail"></data-table>
|
|
|
+ <data-table :fields="fields" :data="tableData" :opera="opera" @view="toTaskDetail">
|
|
|
+ <template #custom="{item, row}">
|
|
|
+ <template v-if="item.prop === 'picurl'">
|
|
|
+ <el-image :src="row.picurl" style="width:100px;height:100px;" @click="btnpicurl(row.picurl)"></el-image>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </data-table>
|
|
|
</list-frame>
|
|
|
+ <el-dialog title="查看" :visible.sync="dialog" center :append-to-body="true">
|
|
|
+ <el-image :src="image" style="width: 100%;"></el-image>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -34,11 +43,14 @@ export default {
|
|
|
fields: [
|
|
|
{ label: '学生名称', prop: 'stuname' },
|
|
|
{ label: '作业得分', prop: 'score' },
|
|
|
+ { label: '上传作业(单击放大)', prop: 'picurl', custom: true },
|
|
|
],
|
|
|
tableData: [],
|
|
|
stuTotal: 0,
|
|
|
total: 0,
|
|
|
options: undefined,
|
|
|
+ image: require('@/assets/logo.png'),
|
|
|
+ dialog: false,
|
|
|
}),
|
|
|
created() {
|
|
|
this.search();
|
|
@@ -66,6 +78,7 @@ export default {
|
|
|
this.$set(this, `total`, tableData.length);
|
|
|
},
|
|
|
toTaskDetail(item) {
|
|
|
+ console.log(item);
|
|
|
this.$router.push({ path: '/task/taskDetail', query: { uploadtaskid: item.data._id } });
|
|
|
},
|
|
|
// 查班级学生
|
|
@@ -73,6 +86,11 @@ export default {
|
|
|
let res = await this.stuQuery({ classid: this.id });
|
|
|
if (res.errcode == 0) this.$set(this, `stuTotal`, res.total);
|
|
|
},
|
|
|
+ // 放大图片
|
|
|
+ btnpicurl(url) {
|
|
|
+ this.$set(this, `image`, url);
|
|
|
+ this.dialog = true;
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
defaultOption: {
|