|
@@ -675,7 +675,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { Q_API, QUESTION_TYPES } from "../constants/constants";
|
|
|
+import { QUESTION_API } from "@/constants/constants";
|
|
|
+import { QUESTION_TYPES } from "../constants/constants";
|
|
|
import { mapState } from "vuex";
|
|
|
import reduplicate_mark from "../component/reduplicate_mark.vue";
|
|
|
import randomColor from "randomcolor";
|
|
@@ -846,7 +847,7 @@ export default {
|
|
|
var paperId = this.paper.id;
|
|
|
var param = JSON.stringify(editpaperDetail);
|
|
|
this.$http
|
|
|
- .post(Q_API + "/updatePaperDetail/" + paperId, param)
|
|
|
+ .post(QUESTION_API + "/updatePaperDetail/" + paperId, param)
|
|
|
.then(() => {
|
|
|
this.$notify({
|
|
|
message: "保存成功",
|
|
@@ -866,7 +867,7 @@ export default {
|
|
|
name: ""
|
|
|
}
|
|
|
};
|
|
|
- this.$http.get(Q_API + "/paper/" + this.paperId).then(response => {
|
|
|
+ this.$http.get(QUESTION_API + "/paper/" + this.paperId).then(response => {
|
|
|
this.paper = response.data;
|
|
|
//查询所有课程属性名
|
|
|
this.initCourseProperty(this.paper.course.code);
|
|
@@ -910,7 +911,7 @@ export default {
|
|
|
//查询所有课程属性名
|
|
|
initCourseProperty(courseCode) {
|
|
|
this.$http
|
|
|
- .get(Q_API + "/courseProperty/enable/" + courseCode)
|
|
|
+ .get(QUESTION_API + "/courseProperty/enable/" + courseCode)
|
|
|
.then(response => {
|
|
|
this.coursePropertyList = response.data;
|
|
|
});
|
|
@@ -934,7 +935,7 @@ export default {
|
|
|
if (action == "confirm") {
|
|
|
this.loading = true;
|
|
|
this.$http
|
|
|
- .delete(Q_API + "/paperDetail/" + paperDetailsId)
|
|
|
+ .delete(QUESTION_API + "/paperDetail/" + paperDetailsId)
|
|
|
.then(() => {
|
|
|
this.initPaper();
|
|
|
this.loading = true;
|
|
@@ -1110,7 +1111,7 @@ export default {
|
|
|
for (let courseProperty of this.coursePropertyList) {
|
|
|
if (courseProperty.name == this.coursePropertyName) {
|
|
|
this.$http
|
|
|
- .get(Q_API + "/property/first/" + courseProperty.id)
|
|
|
+ .get(QUESTION_API + "/property/first/" + courseProperty.id)
|
|
|
.then(response => {
|
|
|
this.firstPropertyList = response.data;
|
|
|
});
|
|
@@ -1123,7 +1124,7 @@ export default {
|
|
|
this.secondPropertyId = "";
|
|
|
if (this.firstPropertyId) {
|
|
|
this.$http
|
|
|
- .get(Q_API + "/property/second/" + this.firstPropertyId)
|
|
|
+ .get(QUESTION_API + "/property/second/" + this.firstPropertyId)
|
|
|
.then(response => {
|
|
|
this.secondPropertyList = response.data;
|
|
|
});
|
|
@@ -1291,7 +1292,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
this.dialogLoading = true;
|
|
|
this.$http
|
|
|
- .delete(Q_API + "/paper/deleteQuestion/" + this.quesModel.id)
|
|
|
+ .delete(QUESTION_API + "/paper/deleteQuestion/" + this.quesModel.id)
|
|
|
.then(response => {
|
|
|
if (response.data.length > 0) {
|
|
|
var deleteInfo =
|
|
@@ -1314,7 +1315,7 @@ export default {
|
|
|
} else {
|
|
|
this.dialogLoading = true;
|
|
|
this.$http
|
|
|
- .put(Q_API + "/paperDetailUnit", paperDetailUnitExp)
|
|
|
+ .put(QUESTION_API + "/paperDetailUnit", paperDetailUnitExp)
|
|
|
.then(() => {
|
|
|
this.$notify({
|
|
|
message: "保存成功",
|
|
@@ -1364,7 +1365,7 @@ export default {
|
|
|
if (action == "confirm") {
|
|
|
this.loading = true;
|
|
|
this.$http
|
|
|
- .delete(Q_API + "/paperDetailUnit/" + paperDetailUnitId)
|
|
|
+ .delete(QUESTION_API + "/paperDetailUnit/" + paperDetailUnitId)
|
|
|
.then(() => {
|
|
|
this.initPaper();
|
|
|
this.getreduplicateQuestions();
|
|
@@ -1387,7 +1388,7 @@ export default {
|
|
|
if (action == "confirm") {
|
|
|
this.loading = true;
|
|
|
this.$http
|
|
|
- .delete(Q_API + "/paper/deleteQuestion/" + questionId)
|
|
|
+ .delete(QUESTION_API + "/paper/deleteQuestion/" + questionId)
|
|
|
.then(response => {
|
|
|
if (response.data.length > 0) {
|
|
|
var deleteInfo =
|
|
@@ -1418,7 +1419,7 @@ export default {
|
|
|
getreduplicateQuestions() {
|
|
|
this.duplicateLoading = true;
|
|
|
this.$http
|
|
|
- .get(Q_API + "/paper/" + this.paperId + "/reduplicate-questions")
|
|
|
+ .get(QUESTION_API + "/paper/" + this.paperId + "/reduplicate-questions")
|
|
|
.then(response => {
|
|
|
this.reduplicateQuestions = response.data;
|
|
|
this.duplicateLoading = false;
|
|
@@ -1465,7 +1466,7 @@ export default {
|
|
|
savePaper() {
|
|
|
this.loading = true;
|
|
|
this.$http
|
|
|
- .put(Q_API + "/paper", this.paper)
|
|
|
+ .put(QUESTION_API + "/paper", this.paper)
|
|
|
.then(() => {
|
|
|
this.$notify({
|
|
|
message: "保存成功",
|
|
@@ -1488,7 +1489,7 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
this.loading = true;
|
|
|
- this.$http.delete(Q_API + "/paper/" + id).then(
|
|
|
+ this.$http.delete(QUESTION_API + "/paper/" + id).then(
|
|
|
() => {
|
|
|
this.$notify({
|
|
|
message: "删除成功",
|
|
@@ -1563,7 +1564,7 @@ export default {
|
|
|
this.parentView = this.$route.params.parentView;
|
|
|
this.initPaper();
|
|
|
this.getreduplicateQuestions();
|
|
|
- this.uploadAction = Q_API + "/uploadRadio/" + this.paperId;
|
|
|
+ this.uploadAction = QUESTION_API + "/uploadRadio/" + this.paperId;
|
|
|
this.uploadHeaders = {
|
|
|
key: this.user.key,
|
|
|
token: this.user.token
|