|
@@ -7,6 +7,11 @@
|
|
<template slot-scope="{ $index }">{{ $index + 1 }}</template>
|
|
<template slot-scope="{ $index }">{{ $index + 1 }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="url" label="链接" width="800" />
|
|
<el-table-column prop="url" label="链接" width="800" />
|
|
|
|
+ <el-table-column label="类型" width="60">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <span>{{ row.access_popedom === 1 ? '协作' : '答题' }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="memo" label="备注" width="180" />
|
|
<el-table-column prop="memo" label="备注" width="180" />
|
|
<el-table-column prop="finish_person_count" label="完成练习" width="180" />
|
|
<el-table-column prop="finish_person_count" label="完成练习" width="180" />
|
|
<el-table-column prop="begin_date" label="开始日期" width="120" />
|
|
<el-table-column prop="begin_date" label="开始日期" width="120" />
|
|
@@ -14,15 +19,20 @@
|
|
|
|
|
|
<el-table-column prop="operation" label="操作" fixed="right" width="200">
|
|
<el-table-column prop="operation" label="操作" fixed="right" width="200">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
- <span
|
|
|
|
- class="link"
|
|
|
|
- @click="
|
|
|
|
- $router.push({ path: '/answer_data', query: { share_record_id: row.id, exercise_id: exercise_id } })
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- 查看
|
|
|
|
- </span>
|
|
|
|
- <span class="link danger">停止</span>
|
|
|
|
|
|
+ <template v-if="row.access_popedom === 1 && row.status === 0">
|
|
|
|
+ <span class="link danger" @click="stopShareRecord(row.id)">停止协作</span>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="row.access_popedom === 2">
|
|
|
|
+ <span
|
|
|
|
+ class="link"
|
|
|
|
+ @click="
|
|
|
|
+ $router.push({ path: '/answer_data', query: { share_record_id: row.id, exercise_id: exercise_id } })
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ 查看
|
|
|
|
+ </span>
|
|
|
|
+ <span v-if="row.status === 0" class="link danger" @click="stopShareRecord(row.id)">停止</span>
|
|
|
|
+ </template>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -32,7 +42,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { PageQueryExerciseShareRecordList } from '@/api/exercise';
|
|
|
|
|
|
+import { PageQueryExerciseShareRecordList, StopShareRecord } from '@/api/exercise';
|
|
|
|
|
|
import PaginationPage from '@/components/common/PaginationPage.vue';
|
|
import PaginationPage from '@/components/common/PaginationPage.vue';
|
|
|
|
|
|
@@ -54,6 +64,9 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getPageList() {
|
|
|
|
+ this.$refs.pagination.getList();
|
|
|
|
+ },
|
|
pageQueryExerciseShareRecordList(data) {
|
|
pageQueryExerciseShareRecordList(data) {
|
|
PageQueryExerciseShareRecordList({ ...data, exercise_id: this.exercise_id })
|
|
PageQueryExerciseShareRecordList({ ...data, exercise_id: this.exercise_id })
|
|
.then(({ total_count, exercise_info, share_record_list }) => {
|
|
.then(({ total_count, exercise_info, share_record_list }) => {
|
|
@@ -63,6 +76,25 @@ export default {
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
},
|
|
},
|
|
|
|
+ stopShareRecord(share_record_id) {
|
|
|
|
+ this.$confirm('是否停止当前分享记录', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ StopShareRecord({ share_record_id })
|
|
|
|
+ .then(() => {
|
|
|
|
+ console.log(1);
|
|
|
|
+ this.$message.success('停止成功');
|
|
|
|
+ this.getPageList();
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message.error('停止失败');
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|