|
@@ -46,15 +46,6 @@
|
|
|
更多 <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :loading="duplicateLoading"
|
|
|
- size="small"
|
|
|
- @click="getreduplicateQuestions"
|
|
|
- ><i class="el-icon-zoom-in"></i>查重
|
|
|
- </el-button>
|
|
|
- </el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
|
<el-button type="primary" size="small" @click="openDialog"
|
|
|
><i class="el-icon-upload2"></i>上传音频
|
|
@@ -76,6 +67,16 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
|
+ <div v-if="showCheckDuplicateBtn" class="paper-top-right-div">
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="checkDuplicate"
|
|
|
+ >
|
|
|
+ 进入查重
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
<div class="paper-top-right-div">
|
|
|
<el-button
|
|
|
v-show="isShowEditBtn()"
|
|
@@ -282,17 +283,13 @@
|
|
|
v-for="(paperDetailUnit, unitIndex) in paperDetail.paperDetailUnits"
|
|
|
v-show="quesShow(paperDetailUnit.id)"
|
|
|
:key="unitIndex"
|
|
|
- class="ques"
|
|
|
+ :class="{
|
|
|
+ ques: true,
|
|
|
+ duplicate:
|
|
|
+ paperDetailUnit.question.checkDuplicateStatus ==
|
|
|
+ 'TO_BE_DISPOSE',
|
|
|
+ }"
|
|
|
>
|
|
|
- <reduplicate_mark
|
|
|
- :id="paperDetailUnit.id"
|
|
|
- :show="reduplicateMarkShow(paperDetailUnit.id)"
|
|
|
- :fill-color="reduplicateMarkColor(paperDetailUnit.id)"
|
|
|
- :checked="reduplicateMarkCheck(paperDetailUnit.id)"
|
|
|
- @reduplicate_mark_check="reduplicate_mark_check"
|
|
|
- >
|
|
|
- </reduplicate_mark>
|
|
|
-
|
|
|
<div
|
|
|
class="quesSelect"
|
|
|
@mouseover="quesMouseOver(paperDetailUnit.id)"
|
|
@@ -300,6 +297,15 @@
|
|
|
>
|
|
|
<div :id="paperDetailUnit.id" class="btnDiv">
|
|
|
<span>{{ paperDetailUnit.question.bodyLengthText }}</span>
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ paperDetailUnit.question.checkDuplicateStatus ==
|
|
|
+ 'TO_BE_DISPOSE'
|
|
|
+ "
|
|
|
+ size="small"
|
|
|
+ @click="checkDuplicateQuestion(paperDetailUnit.question.id)"
|
|
|
+ >进入查重
|
|
|
+ </el-button>
|
|
|
<span v-show="isShowEditBtn()">
|
|
|
<el-button
|
|
|
size="small"
|
|
@@ -422,10 +428,6 @@
|
|
|
:key="subIndex"
|
|
|
class="subQues"
|
|
|
>
|
|
|
- <reduplicate_mark
|
|
|
- :show="reduplicateMarkShow(subQuestion.id)"
|
|
|
- ></reduplicate_mark>
|
|
|
-
|
|
|
<div
|
|
|
class="quesSelect"
|
|
|
@mouseover="
|
|
@@ -1129,8 +1131,6 @@
|
|
|
import { QUESTION_API } from "@/constants/constants";
|
|
|
import { isEmptyStr, QUESTION_TYPES } from "../constants/constants";
|
|
|
import { mapState } from "vuex";
|
|
|
-import reduplicate_mark from "../component/reduplicate_mark.vue";
|
|
|
-import randomColor from "randomcolor";
|
|
|
import ckeditor from "../component/ckeditor.vue";
|
|
|
import PaperBasicComposition from "./PaperBasicComposition.vue";
|
|
|
import PaperQuestionType from "./PaperQuestionType.vue";
|
|
@@ -1141,7 +1141,6 @@ import AuditPaper from "./AuditPaper.vue";
|
|
|
export default {
|
|
|
name: "EditPaperApp",
|
|
|
components: {
|
|
|
- reduplicate_mark,
|
|
|
ckeditor,
|
|
|
PaperBasicComposition,
|
|
|
PaperQuestionType,
|
|
@@ -1151,6 +1150,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ showCheckDuplicateBtn: false,
|
|
|
selectedPaperIds: [],
|
|
|
auditPaperDialog: false,
|
|
|
auditResult: "",
|
|
@@ -1298,7 +1298,6 @@ export default {
|
|
|
this.paperId = this.$route.params.id;
|
|
|
this.parentView = this.$route.params.parentView;
|
|
|
this.initPaper();
|
|
|
- this.getreduplicateQuestions();
|
|
|
this.uploadAction = QUESTION_API + "/uploadRadio/" + this.paperId;
|
|
|
this.uploadHeaders = {
|
|
|
key: this.user.key,
|
|
@@ -1306,6 +1305,40 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ showCheckDuplicate() {
|
|
|
+ if (this.paper.checkDuplicateStatus == "DISPOSED") {
|
|
|
+ this.showCheckDuplicateBtn = false;
|
|
|
+ } else {
|
|
|
+ for (let paperDetilData of this.paper.paperDetails) {
|
|
|
+ for (let unit of paperDetilData.paperDetailUnits) {
|
|
|
+ if (unit.question.checkDuplicateStatus == "TO_BE_DISPOSE") {
|
|
|
+ this.showCheckDuplicateBtn = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.showCheckDuplicateBtn = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ checkDuplicate() {
|
|
|
+ this.$router.push({
|
|
|
+ name: "check_duplicate_info",
|
|
|
+ params: {
|
|
|
+ basePaperId: this.paper.id,
|
|
|
+ from: "paper",
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ checkDuplicateQuestion(questionId) {
|
|
|
+ this.$router.push({
|
|
|
+ name: "check_duplicate_info",
|
|
|
+ params: {
|
|
|
+ quesId: questionId,
|
|
|
+ basePaperId: this.paper.id,
|
|
|
+ from: "paper",
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
isShowEditBtn() {
|
|
|
if (
|
|
|
this.paper.creationBy == this.user.userId &&
|
|
@@ -1765,6 +1798,7 @@ export default {
|
|
|
dindx++;
|
|
|
}
|
|
|
}
|
|
|
+ this.showCheckDuplicate();
|
|
|
setTimeout(() => {
|
|
|
document.documentElement.scrollTop = document.body.scrollTop =
|
|
|
scrollPosition;
|
|
@@ -1837,78 +1871,6 @@ export default {
|
|
|
}
|
|
|
return false;
|
|
|
},
|
|
|
- reduplicateMarkShow(id) {
|
|
|
- var found = false;
|
|
|
- for (var i = 0, imax = this.reduplicateQuestions.length; i < imax; i++) {
|
|
|
- for (
|
|
|
- var j = 0, jmax = this.reduplicateQuestions[i].length;
|
|
|
- j < jmax;
|
|
|
- j++
|
|
|
- ) {
|
|
|
- if (this.reduplicateQuestions[i][j] == id) {
|
|
|
- found = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if (found) {
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return found;
|
|
|
- },
|
|
|
- reduplicateMarkColor(id) {
|
|
|
- for (var i = 0, imax = this.reduplicateQuestions.length; i < imax; i++) {
|
|
|
- for (
|
|
|
- var j = 0, jmax = this.reduplicateQuestions[i].length;
|
|
|
- j < jmax;
|
|
|
- j++
|
|
|
- ) {
|
|
|
- if (this.reduplicateQuestions[i][j] == id) {
|
|
|
- return this.reduplicateQuesColor[i];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- reduplicateMarkCheck(id) {
|
|
|
- for (var i = 0, imax = this.reduplicateGroup.length; i < imax; i++) {
|
|
|
- if (id == this.reduplicateGroup[i]) {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- },
|
|
|
- reduplicate_mark_check(id, checked) {
|
|
|
- console.log(checked);
|
|
|
- console.log(this.reduplicateQuestions);
|
|
|
- console.log(id);
|
|
|
- if (!checked) {
|
|
|
- for (
|
|
|
- var i = 0, imax = this.reduplicateQuestions.length;
|
|
|
- i < imax;
|
|
|
- i++
|
|
|
- ) {
|
|
|
- for (
|
|
|
- var j = 0, jmax = this.reduplicateQuestions[i].length;
|
|
|
- j < jmax;
|
|
|
- j++
|
|
|
- ) {
|
|
|
- if (this.reduplicateQuestions[i][j] == id) {
|
|
|
- this.reduplicateGroup = [];
|
|
|
- for (
|
|
|
- var k = 0, kmax = this.reduplicateQuestions[i].length;
|
|
|
- k < kmax;
|
|
|
- k++
|
|
|
- ) {
|
|
|
- this.reduplicateGroup.push(this.reduplicateQuestions[i][k]);
|
|
|
- }
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.reduplicateGroup = [];
|
|
|
- }
|
|
|
- },
|
|
|
//编辑题目
|
|
|
editQues(paperDetailUnit, question) {
|
|
|
console.log("question:", question);
|
|
@@ -2359,7 +2321,6 @@ export default {
|
|
|
.delete(QUESTION_API + "/paperDetailUnit/" + paperDetailUnitId)
|
|
|
.then(() => {
|
|
|
this.initPaper();
|
|
|
- this.getreduplicateQuestions();
|
|
|
this.reduplicateGroup = [];
|
|
|
this.loading = true;
|
|
|
this.$notify({
|
|
@@ -2398,7 +2359,6 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
this.initPaper();
|
|
|
- this.getreduplicateQuestions();
|
|
|
this.reduplicateGroup = [];
|
|
|
this.loading = true;
|
|
|
this.$notify({
|
|
@@ -2412,19 +2372,6 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
- //获取重复试题
|
|
|
- getreduplicateQuestions() {
|
|
|
- this.duplicateLoading = true;
|
|
|
- this.$http
|
|
|
- .get(QUESTION_API + "/paper/" + this.paperId + "/reduplicate-questions")
|
|
|
- .then((response) => {
|
|
|
- this.reduplicateQuestions = response.data;
|
|
|
- this.duplicateLoading = false;
|
|
|
- this.initReduplicateQuesColor();
|
|
|
- // var ques = document.getElementsByClassName("ques")[0];
|
|
|
- // ques.style.display = "inline";
|
|
|
- });
|
|
|
- },
|
|
|
exportPaperAnswer() {
|
|
|
var key = this.user.key;
|
|
|
var token = this.user.token;
|
|
@@ -2438,17 +2385,6 @@ export default {
|
|
|
token
|
|
|
);
|
|
|
},
|
|
|
- initReduplicateQuesColor() {
|
|
|
- var colorCount = this.reduplicateQuestions.length;
|
|
|
- if (colorCount > 20) {
|
|
|
- this.reduplicateQuesColor = randomColor({
|
|
|
- luminosity: "bright",
|
|
|
- count: colorCount,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.reduplicateQuesColor = this.defaultColor;
|
|
|
- }
|
|
|
- },
|
|
|
getSubQuesEditId(paperDetailUnit, subQuestion) {
|
|
|
return paperDetailUnit.question.id + "_" + subQuestion.subNumber;
|
|
|
},
|