|
@@ -115,12 +115,11 @@
|
|
|
<span>{{ scope.row.questionType | questionType }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="难度" width="80"> </el-table-column>
|
|
|
- <el-table-column label="使用量" width="80"> </el-table-column>
|
|
|
- <el-table-column label="创建人" width="120">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.creator }}</span>
|
|
|
- </template>
|
|
|
+ <el-table-column label="难度" prop="difficulty" width="80">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="使用量" prop="usageAmount" width="80">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="创建人" prop="creator" width="120">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="创建时间" width="170" prop="creationTime">
|
|
|
</el-table-column>
|
|
@@ -227,12 +226,10 @@
|
|
|
ref="QuestionImportDialog"
|
|
|
@modified="toPage(1)"
|
|
|
></question-import-dialog>
|
|
|
- <!-- ModifyFolder -->
|
|
|
- <modify-folder
|
|
|
- ref="ModifyFolder"
|
|
|
- :instance="curFolder"
|
|
|
- @modified="folderModified"
|
|
|
- ></modify-folder>
|
|
|
+ <!-- FolderQuestionManageDialog -->
|
|
|
+ <folder-question-manage-dialog
|
|
|
+ ref="FolderQuestionManageDialog"
|
|
|
+ ></folder-question-manage-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -250,7 +247,7 @@ import QuestionFolderDialog from "../components/QuestionFolderDialog.vue";
|
|
|
import QuestionImportDialog from "../components/QuestionImportDialog.vue";
|
|
|
import QuestionEditDialog from "../components/QuestionEditDialog.vue";
|
|
|
import QuestionPreviewDialog from "../components/QuestionPreviewDialog.vue";
|
|
|
-import ModifyFolder from "../components/ModifyFolder.vue";
|
|
|
+import FolderQuestionManageDialog from "../components/FolderQuestionManageDialog.vue";
|
|
|
|
|
|
export default {
|
|
|
name: "QuestionMamage",
|
|
@@ -261,7 +258,7 @@ export default {
|
|
|
QuestionImportDialog,
|
|
|
QuestionEditDialog,
|
|
|
QuestionPreviewDialog,
|
|
|
- ModifyFolder,
|
|
|
+ FolderQuestionManageDialog,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -288,17 +285,9 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.toPage(1);
|
|
|
+ this.toPage(1);
|
|
|
},
|
|
|
methods: {
|
|
|
- // async getFolderList() {
|
|
|
- // const res = await classifyListApi(this.filter.classifyId);
|
|
|
- // this.folderList = res.data || [];
|
|
|
- // },
|
|
|
- // toFolder(classifyId) {
|
|
|
- // this.filter.classifyId = classifyId;
|
|
|
- // this.toPage(1);
|
|
|
- // },
|
|
|
toPage(page) {
|
|
|
this.currentPage = page;
|
|
|
this.getList();
|
|
@@ -312,7 +301,6 @@ export default {
|
|
|
}).catch(() => {});
|
|
|
this.loading = false;
|
|
|
if (!res) return;
|
|
|
- this.folderList = res.data.questionClassifyResultList;
|
|
|
this.questionList = res.data.questionPageResult.content;
|
|
|
this.total = res.data.questionPageResult.totalElements;
|
|
|
},
|
|
@@ -412,43 +400,14 @@ export default {
|
|
|
toLinkQuestion(row) {
|
|
|
console.log(row);
|
|
|
},
|
|
|
- toAddFolder() {
|
|
|
- this.curFolder = { parentId: this.filter.classifyId };
|
|
|
- this.$refs.ModifyFolder.open();
|
|
|
- },
|
|
|
- // toEditFolder(row) {
|
|
|
- // this.curFolder = row;
|
|
|
- // this.$refs.ModifyFolder.open();
|
|
|
- // },
|
|
|
- // toMoveFolder(row) {
|
|
|
- // console.log(row);
|
|
|
- // this.isEditFolder = false;
|
|
|
- // this.curMoveType = "folder";
|
|
|
- // this.curFolder = row;
|
|
|
- // this.$refs.QuestionFolderDialog.open();
|
|
|
- // },
|
|
|
- // async toDeleteFolder(row) {
|
|
|
- // const confirm = await this.$confirm(`确定要删除选中的文件夹吗?`, "提示", {
|
|
|
- // type: "warning",
|
|
|
- // }).catch(() => {});
|
|
|
- // if (confirm !== "confirm") return;
|
|
|
-
|
|
|
- // if (this.loading) return;
|
|
|
- // this.loading = true;
|
|
|
- // const res = await deleteClassifyApi(row.id).catch(() => {});
|
|
|
- // this.loading = false;
|
|
|
- // if (!res) return;
|
|
|
- // this.$message.success("操作成功");
|
|
|
- // await this.getClassifyTree();
|
|
|
- // },
|
|
|
- folderModified() {
|
|
|
- this.getFolderList();
|
|
|
- },
|
|
|
toRecycle() {
|
|
|
this.$router.push({
|
|
|
name: "QuestionRecycle",
|
|
|
});
|
|
|
},
|
|
|
+ toAddFolder() {
|
|
|
+ this.$refs.FolderQuestionManageDialog.open();
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|