|
@@ -204,7 +204,11 @@
|
|
|
<template slot-scope="scope">
|
|
|
<div class="operate_left">
|
|
|
<el-button
|
|
|
- v-if="scope.row.questionType !== 'NESTED_ANSWER_QUESTION'"
|
|
|
+ v-if="
|
|
|
+ scope.row.questionType !== 'NESTED_ANSWER_QUESTION' &&
|
|
|
+ scope.row.questionType !== 'LISTENING_QUESTION' &&
|
|
|
+ scope.row.questionType !== 'MATCHING_QUESTION'
|
|
|
+ "
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
plain
|
|
@@ -341,6 +345,7 @@
|
|
|
<script>
|
|
|
import { QUESTION_API } from "@/constants/constants";
|
|
|
import { QUESTION_TYPES, LEVEL_TYPE } from "../constants/constants";
|
|
|
+import { mapState } from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -356,13 +361,12 @@ export default {
|
|
|
},
|
|
|
courseList: [], //课程list
|
|
|
levelList: LEVEL_TYPE, //层次list
|
|
|
- questionTypeList: [], //题型
|
|
|
tableData: [],
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
total: 10,
|
|
|
quesModel: {},
|
|
|
- questionTypes: QUESTION_TYPES,
|
|
|
+ questionTypes: [],
|
|
|
quesDialog: false,
|
|
|
loading: false,
|
|
|
deleteDialogVisible: false,
|
|
@@ -380,6 +384,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState({ user: (state) => state.user }),
|
|
|
courseInfoSelect() {
|
|
|
var courseList = [];
|
|
|
for (let course of this.courseList) {
|
|
@@ -423,6 +428,18 @@ export default {
|
|
|
},
|
|
|
//钩子函数
|
|
|
created() {
|
|
|
+ var url =
|
|
|
+ QUESTION_API +
|
|
|
+ "/org/property/" +
|
|
|
+ this.user.rootOrgId +
|
|
|
+ "/ROOT_ORG_QUESTION_TYPES";
|
|
|
+ this.$http.get(url).then((response) => {
|
|
|
+ if (response.data && response.data.length > 0) {
|
|
|
+ this.questionTypes = QUESTION_TYPES.filter((m) =>
|
|
|
+ response.data.includes(m.value)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
this.initVue();
|
|
|
},
|
|
|
methods: {
|