|
@@ -3,29 +3,29 @@
|
|
|
<div class="personal">
|
|
|
<HomeCommon ref="common" :data="exercise_list" :total="total_count" @getList="pageQueryExerciseList">
|
|
|
<template #default>
|
|
|
- <el-table-column prop="index" label="序号" width="65">
|
|
|
+ <el-table-column prop="index" label="序号" width="70">
|
|
|
<template slot-scope="{ $index }">{{ $index + 1 }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="练习名称" width="180" />
|
|
|
- <el-table-column prop="tag" label="标签" width="120">
|
|
|
+ <el-table-column prop="name" label="练习名称" width="280" />
|
|
|
+ <el-table-column prop="tag" label="标签" width="180">
|
|
|
<template slot-scope="{ row }">
|
|
|
<span v-for="(item, i) in row.label_list" :key="i" class="tag">{{ item }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="creator_name" label="创建者" width="120" />
|
|
|
- <el-table-column prop="create_time" label="创建时间" width="140" />
|
|
|
- <el-table-column prop="last_modifier_name" label="最近编辑" width="100" />
|
|
|
- <el-table-column prop="last_modify_time" label="最近编辑时间" width="140" />
|
|
|
- <el-table-column prop="intro" label="简介" width="200" />
|
|
|
- <el-table-column label="状态" width="90">
|
|
|
+ <el-table-column prop="creator_name" label="创建者" width="160" />
|
|
|
+ <el-table-column prop="create_time" label="创建时间" width="180" />
|
|
|
+ <el-table-column prop="last_modifier_name" label="最近编辑" width="140" />
|
|
|
+ <el-table-column prop="last_modify_time" label="最近编辑时间" width="180" />
|
|
|
+ <el-table-column prop="intro" label="简介" width="240" />
|
|
|
+ <el-table-column label="状态" width="100">
|
|
|
<template slot-scope="{ row }">
|
|
|
<span :class="statusList[row.status].class">{{ statusList[row.status].name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="operation" label="操作">
|
|
|
+ <el-table-column prop="operation" label="操作" fixed="right" width="200">
|
|
|
<template slot-scope="{ row }">
|
|
|
<span class="link" @click="$router.push({ path: '/exercise', query: { id: row.id } })">编辑</span>
|
|
|
- <span class="link">分享</span>
|
|
|
+ <span class="link" @click="share(row.id)">分享</span>
|
|
|
<span class="link">公开</span>
|
|
|
<span class="link danger" @click="deleteExercise(row.id)">删除</span>
|
|
|
</template>
|
|
@@ -56,6 +56,7 @@
|
|
|
</HomeCommon>
|
|
|
|
|
|
<CreateExercise :dialog-visible.sync="dialogVisible" />
|
|
|
+ <ShareDialog :dialog-visible.sync="visibleShare" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -63,13 +64,15 @@
|
|
|
import { PageQueryExerciseList, DeleteExercise } from '@/api/exercise';
|
|
|
|
|
|
import HomeCommon from '../common.vue';
|
|
|
-import CreateExercise from './CreateExercise.vue';
|
|
|
+import CreateExercise from './components/CreateExercise.vue';
|
|
|
+import ShareDialog from './components/ShareDialog.vue';
|
|
|
|
|
|
export default {
|
|
|
name: 'PersonalQuestion',
|
|
|
components: {
|
|
|
HomeCommon,
|
|
|
- CreateExercise
|
|
|
+ CreateExercise,
|
|
|
+ ShareDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -90,7 +93,8 @@ export default {
|
|
|
// 表格数据
|
|
|
exercise_list: [],
|
|
|
total_count: 0, // 总条数
|
|
|
- dialogVisible: false
|
|
|
+ dialogVisible: false,
|
|
|
+ visibleShare: false // 分享弹窗
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -113,7 +117,9 @@ export default {
|
|
|
this.$message.error('删除失败');
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ share() {
|
|
|
+ this.visibleShare = true;
|
|
|
+ },
|
|
|
createExercise() {
|
|
|
this.dialogVisible = true;
|
|
|
}
|