Commit 6fffbd556aac41cd9f86c4e8e6e788c1be7f9b76

Authored by 阿宝
1 parent 5424ef82

组卷接口调整

src/views/examinationPaper/add.vue
@@ -764,7 +764,7 @@ export default { @@ -764,7 +764,7 @@ export default {
764 return; 764 return;
765 } 765 }
766 //添加测验类型 766 //添加测验类型
767 - const { data, status, message } = await this.$request.addPaperType({ 767 + const { data, status, info } = await this.$request.addPaperType({
768 typeName: this.answerTypeName, 768 typeName: this.answerTypeName,
769 }); 769 });
770 if (status == 0) { 770 if (status == 0) {
@@ -773,7 +773,7 @@ export default { @@ -773,7 +773,7 @@ export default {
773 this.answerTypeName = ""; 773 this.answerTypeName = "";
774 this.$message.success("添加成功"); 774 this.$message.success("添加成功");
775 } else { 775 } else {
776 - this.$message.error(message); 776 + this.$message.error(info);
777 } 777 }
778 }, 778 },
779 async save() { 779 async save() {
@@ -789,7 +789,7 @@ export default { @@ -789,7 +789,7 @@ export default {
789 items.questionIndex = indexs + 1; 789 items.questionIndex = indexs + 1;
790 }); 790 });
791 }); 791 });
792 - const { data, status, message } = await this.$request.addPaper({ 792 + const { data, status, info } = await this.$request.addPaper({
793 ...this.form, 793 ...this.form,
794 }); 794 });
795 this.saceLoading = false; 795 this.saceLoading = false;
@@ -798,7 +798,7 @@ export default { @@ -798,7 +798,7 @@ export default {
798 path: "/examinationPaper", 798 path: "/examinationPaper",
799 }); 799 });
800 } else { 800 } else {
801 - this.$message.error(message); 801 + this.$message.error(info);
802 } 802 }
803 }, 803 },
804 async changeGrade() { 804 async changeGrade() {
@@ -807,7 +807,9 @@ export default { @@ -807,7 +807,9 @@ export default {
807 }, 807 },
808 async _CreatedTypeList() { 808 async _CreatedTypeList() {
809 //测验类型查询 809 //测验类型查询
810 - const { data, status, message } = await this.$request.fetchTypeNames(); 810 + const { data, status, info } = await this.$request.fetchTypeNames(
  811 + {gradeName :grade}
  812 + );
811 if (status == 0) { 813 if (status == 0) {
812 this.answerTypeList = [...data.list] || []; 814 this.answerTypeList = [...data.list] || [];
813 this.answerTypeList.unshift({ 815 this.answerTypeList.unshift({
@@ -818,12 +820,12 @@ export default { @@ -818,12 +820,12 @@ export default {
818 this.form.tagId = this.answerTypeList[0].id || ""; 820 this.form.tagId = this.answerTypeList[0].id || "";
819 } 821 }
820 } else { 822 } else {
821 - this.$message.error(message); 823 + this.$message.error(info);
822 } 824 }
823 }, 825 },
824 async _GradeList() { 826 async _GradeList() {
825 //查询年级列表 827 //查询年级列表
826 - const { data, status, message } = await this.$request.fetchGradeList(); 828 + const { data, status, info } = await this.$request.fetchGradeList();
827 if (status == 0) { 829 if (status == 0) {
828 this.gradeList = [...data.gradeNames] || []; 830 this.gradeList = [...data.gradeNames] || [];
829 if (this.type != 2) { 831 if (this.type != 2) {
@@ -831,12 +833,12 @@ export default { @@ -831,12 +833,12 @@ export default {
831 } 833 }
832 this._QuerySubjectList(this.gradeList[0]); 834 this._QuerySubjectList(this.gradeList[0]);
833 } else { 835 } else {
834 - this.$message.error(message); 836 + this.$message.error(info);
835 } 837 }
836 }, 838 },
837 async _QuerySubjectList(grade) { 839 async _QuerySubjectList(grade) {
838 //查询科目列表 840 //查询科目列表
839 - const { data, status, message } = await this.$request.fetchSubjectList( 841 + const { data, status, info } = await this.$request.fetchSubjectList(
840 {gradeName :grade} 842 {gradeName :grade}
841 ); 843 );
842 if (status === 0) { 844 if (status === 0) {
@@ -850,12 +852,12 @@ export default { @@ -850,12 +852,12 @@ export default {
850 this.form.subjectName = this.subjectList[0].value; 852 this.form.subjectName = this.subjectList[0].value;
851 } 853 }
852 } else { 854 } else {
853 - this.$message.error(message); 855 + this.$message.error(info);
854 } 856 }
855 }, 857 },
856 async _QueryDetail() { 858 async _QueryDetail() {
857 //查询年级列表 859 //查询年级列表
858 - const { data, status, message } = await this.$request.fetchPaperDetail({ 860 + const { data, status, info } = await this.$request.fetchPaperDetail({
859 paperId: this.$route.query.paperId, 861 paperId: this.$route.query.paperId,
860 }); 862 });
861 if (status == 0) { 863 if (status == 0) {
@@ -883,7 +885,7 @@ export default { @@ -883,7 +885,7 @@ export default {
883 }; 885 };
884 }); 886 });
885 } else { 887 } else {
886 - this.$message.error(message); 888 + this.$message.error(info);
887 } 889 }
888 }, 890 },
889 }, 891 },
src/views/examinationPaper/edit.vue
@@ -16,11 +16,11 @@ @@ -16,11 +16,11 @@
16 <div v-for="(question, index) in form.questionList" :key="index"> 16 <div v-for="(question, index) in form.questionList" :key="index">
17 <p class="question-title"> 17 <p class="question-title">
18 <span>{{ setBigNum(index) }}、</span> 18 <span>{{ setBigNum(index) }}、</span>
19 - <el-input  
20 - class="ipt"  
21 - v-model.trim="question.questionTitle"  
22 - placeholder="填写大题名称"  
23 - ></el-input> 19 + <el-input
  20 + class="ipt"
  21 + v-model.trim="question.questionTitle"
  22 + placeholder="填写大题名称"
  23 + ></el-input>
24 <span>共 {{ setScore(question) }} 分</span> 24 <span>共 {{ setScore(question) }} 分</span>
25 </p> 25 </p>
26 <ul class="questions-ul"> 26 <ul class="questions-ul">
@@ -105,7 +105,7 @@ import { deepClone } from &quot;utils&quot;; @@ -105,7 +105,7 @@ import { deepClone } from &quot;utils&quot;;
105 export default { 105 export default {
106 data() { 106 data() {
107 return { 107 return {
108 - questionList:[], 108 + questionList: [],
109 form: { 109 form: {
110 //答题卡详情 110 //答题卡详情
111 title: "", 111 title: "",
@@ -130,7 +130,7 @@ export default { @@ -130,7 +130,7 @@ export default {
130 }, 130 },
131 }, 131 },
132 created() { 132 created() {
133 - this._QueryDetail() 133 + this._QueryDetail();
134 }, 134 },
135 methods: { 135 methods: {
136 linkBack() { 136 linkBack() {
@@ -201,37 +201,38 @@ export default { @@ -201,37 +201,38 @@ export default {
201 sub.correctAnswer = arrs.sort().join(""); 201 sub.correctAnswer = arrs.sort().join("");
202 } 202 }
203 }, 203 },
204 - async save(){  
205 - let questionList = this.form.questionList.map(item=>{  
206 - item.score = null  
207 - return item  
208 - })  
209 - //更新答题卡  
210 - const { data, status, message } = await this.$request.modifyPaper({  
211 - paperId:this.form.id,  
212 - questionList:questionList  
213 - }); 204 + async save() {
  205 + let questionList = this.form.questionList.map((item) => {
  206 + item.score = null;
  207 + items.questionId = "";
  208 + items.questionIndex = "";
  209 + return item;
  210 + });
  211 + //更新答题卡
  212 + const { data, status, info } = await this.$request.modifyPaper({
  213 + paperId: this.form.id,
  214 + questionList: questionList,
  215 + });
214 if (status == 0) { 216 if (status == 0) {
215 this.$router.push({ 217 this.$router.push({
216 - path:"/examinationPaper"  
217 - }) 218 + path: "/examinationPaper",
  219 + });
218 } else { 220 } else {
219 - this.$message.error(message); 221 + this.$message.error(info);
220 } 222 }
221 }, 223 },
222 async _QueryDetail() { 224 async _QueryDetail() {
223 //查询年级列表 225 //查询年级列表
224 - const { data, status, message } = await this.$request.fetchPaperDetail({  
225 - paperId:this.$route.query.paperId 226 + const { data, status, info } = await this.$request.fetchPaperDetail({
  227 + paperId: this.$route.query.paperId,
226 }); 228 });
227 if (status == 0) { 229 if (status == 0) {
228 - this.form = deepClone(data)  
229 - this.questionList = deepClone(data.questionList)  
230 - this.form.questionList.map(item=>{  
231 - item.score = ""  
232 - }) 230 + this.form = deepClone(data);
  231 + this.form.questionList.map((item) => {
  232 + item.score = "";
  233 + });
233 } else { 234 } else {
234 - this.$message.error(message); 235 + this.$message.error(info);
235 } 236 }
236 }, 237 },
237 }, 238 },
src/views/examinationPaper/index.vue
@@ -235,7 +235,7 @@ export default { @@ -235,7 +235,7 @@ export default {
235 }, 235 },
236 async saveShare() { 236 async saveShare() {
237 //修改分享范围 237 //修改分享范围
238 - const { data, status, message } = await this.$request.modifyPaper({ 238 + const { data, status, info } = await this.$request.modifyPaper({
239 paperId: that.shareForm.id, 239 paperId: that.shareForm.id,
240 sharingType: that.shareForm.share, 240 sharingType: that.shareForm.share,
241 }); 241 });
@@ -245,12 +245,12 @@ export default { @@ -245,12 +245,12 @@ export default {
245 this.shareForm.share = 1; 245 this.shareForm.share = 1;
246 dialogVisible = false; 246 dialogVisible = false;
247 } else { 247 } else {
248 - this.$message.error(message); 248 + this.$message.error(info);
249 } 249 }
250 }, 250 },
251 async recovery(item) { 251 async recovery(item) {
252 //归档 252 //归档
253 - const { data, status, message } = await this.$request.modifyPaper({ 253 + const { data, status, info } = await this.$request.modifyPaper({
254 paperId: item.id, 254 paperId: item.id,
255 status: 2, 255 status: 2,
256 }); 256 });
@@ -259,7 +259,7 @@ export default { @@ -259,7 +259,7 @@ export default {
259 this.page = 1; 259 this.page = 1;
260 this._QueryData(type); 260 this._QueryData(type);
261 } else { 261 } else {
262 - this.$message.error(message); 262 + this.$message.error(info);
263 } 263 }
264 }, 264 },
265 //切换班级 265 //切换班级
@@ -269,7 +269,7 @@ export default { @@ -269,7 +269,7 @@ export default {
269 }, 269 },
270 // 查找答题卡类型 270 // 查找答题卡类型
271 async _QueryTypeList() { 271 async _QueryTypeList() {
272 - const { data, status, message } = await this.$request.fetchTypeNames({ 272 + const { data, status, info } = await this.$request.fetchTypeNames({
273 classId: this.query.classId, 273 classId: this.query.classId,
274 }); 274 });
275 if (status === 0) { 275 if (status === 0) {
@@ -285,12 +285,12 @@ export default { @@ -285,12 +285,12 @@ export default {
285 label: "--", 285 label: "--",
286 }); 286 });
287 } else { 287 } else {
288 - this.$message.error(message); 288 + this.$message.error(info);
289 } 289 }
290 }, 290 },
291 // 查找班级 291 // 查找班级
292 async _QueryClassList() { 292 async _QueryClassList() {
293 - const { data, status, message } = await this.$request.fetchClassList(); 293 + const { data, status, info } = await this.$request.fetchClassList();
294 console.log(status) 294 console.log(status)
295 if (status === 0) { 295 if (status === 0) {
296 if (!!data.list) { 296 if (!!data.list) {
@@ -303,12 +303,12 @@ export default { @@ -303,12 +303,12 @@ export default {
303 this.query.classId = this.classList[0]?.value; 303 this.query.classId = this.classList[0]?.value;
304 } 304 }
305 } else { 305 } else {
306 - this.$message.error(message); 306 + this.$message.error(info);
307 } 307 }
308 }, 308 },
309 // 查找科目 309 // 查找科目
310 async _QuerySubjectList() { 310 async _QuerySubjectList() {
311 - const { data, status, message } = await this.$request.fetchSubjectList({ 311 + const { data, status, info } = await this.$request.fetchSubjectList({
312 classId: this.query.classId, 312 classId: this.query.classId,
313 }); 313 });
314 if (status === 0) { 314 if (status === 0) {
@@ -320,7 +320,7 @@ export default { @@ -320,7 +320,7 @@ export default {
320 }); 320 });
321 this.query.subjectName = this.subjectList[0]?.value; 321 this.query.subjectName = this.subjectList[0]?.value;
322 } else { 322 } else {
323 - this.$message.error(message); 323 + this.$message.error(info);
324 } 324 }
325 }, 325 },
326 async _QueryData(type) { 326 async _QueryData(type) {
@@ -347,7 +347,7 @@ export default { @@ -347,7 +347,7 @@ export default {
347 return; 347 return;
348 } 348 }
349 this.loading = true; 349 this.loading = true;
350 - const { data, status, message } = await this.$request.fetchPaperList({ 350 + const { data, status, info } = await this.$request.fetchPaperList({
351 ...query, 351 ...query,
352 status: 1, 352 status: 1,
353 page: this.page, 353 page: this.page,
@@ -358,7 +358,7 @@ export default { @@ -358,7 +358,7 @@ export default {
358 this.total = data.total; 358 this.total = data.total;
359 this.tableData = (data.list && [...data.list]) || []; 359 this.tableData = (data.list && [...data.list]) || [];
360 } else { 360 } else {
361 - this.$message.error(message); 361 + this.$message.error(info);
362 } 362 }
363 }, 363 },
364 }, 364 },
src/views/examinationPaper/recycle.vue
@@ -186,7 +186,7 @@ export default { @@ -186,7 +186,7 @@ export default {
186 methods: { 186 methods: {
187 async modify(obj) { 187 async modify(obj) {
188 //恢复答题卡 188 //恢复答题卡
189 - const { data, status, message } = await this.$request.modifyPaper({ 189 + const { data, status, info } = await this.$request.modifyPaper({
190 paperId: obj.id, 190 paperId: obj.id,
191 status: 1, 191 status: 1,
192 }); 192 });
@@ -194,19 +194,19 @@ export default { @@ -194,19 +194,19 @@ export default {
194 let type = this.query.title ? 1 : 0; 194 let type = this.query.title ? 1 : 0;
195 this._QueryData(type); 195 this._QueryData(type);
196 } else { 196 } else {
197 - this.$message.error(message); 197 + this.$message.error(info);
198 } 198 }
199 }, 199 },
200 async remove(obj) { 200 async remove(obj) {
201 //删除答题卡 201 //删除答题卡
202 - const { data, status, message } = await this.$request.delPaper({ 202 + const { data, status, info } = await this.$request.delPaper({
203 paperId: obj.id, 203 paperId: obj.id,
204 }); 204 });
205 if (status == 0) { 205 if (status == 0) {
206 let type = this.query.title ? 1 : 0; 206 let type = this.query.title ? 1 : 0;
207 this._QueryData(type); 207 this._QueryData(type);
208 } else { 208 } else {
209 - this.$message.error(message); 209 + this.$message.error(info);
210 } 210 }
211 }, 211 },
212 //切换班级 212 //切换班级
@@ -232,7 +232,7 @@ export default { @@ -232,7 +232,7 @@ export default {
232 query[key] = null; 232 query[key] = null;
233 } 233 }
234 } 234 }
235 - const { data, status, message } = await this.$request.fetchPaperList({ 235 + const { data, status, info } = await this.$request.fetchPaperList({
236 ...query, 236 ...query,
237 status:2 237 status:2
238 }); 238 });
@@ -241,12 +241,12 @@ export default { @@ -241,12 +241,12 @@ export default {
241 this.total = data.total; 241 this.total = data.total;
242 this.tableData = (data.list && [...data.list]) || []; 242 this.tableData = (data.list && [...data.list]) || [];
243 } else { 243 } else {
244 - this.$message.error(message); 244 + this.$message.error(info);
245 } 245 }
246 }, 246 },
247 // 查找班级 247 // 查找班级
248 async _QueryClassList() { 248 async _QueryClassList() {
249 - const { data, status, message } = await this.$request.fetchClassList(); 249 + const { data, status, info } = await this.$request.fetchClassList();
250 console.log(status); 250 console.log(status);
251 if (status === 0) { 251 if (status === 0) {
252 if (!!data.list) { 252 if (!!data.list) {
@@ -259,12 +259,12 @@ export default { @@ -259,12 +259,12 @@ export default {
259 this.query.classId = this.classList[0]?.value; 259 this.query.classId = this.classList[0]?.value;
260 } 260 }
261 } else { 261 } else {
262 - this.$message.error(message); 262 + this.$message.error(info);
263 } 263 }
264 }, 264 },
265 // 查找科目 265 // 查找科目
266 async _QuerySubjectList() { 266 async _QuerySubjectList() {
267 - const { data, status, message } = await this.$request.fetchSubjectList({ 267 + const { data, status, info } = await this.$request.fetchSubjectList({
268 classId: this.query.classId, 268 classId: this.query.classId,
269 }); 269 });
270 if (status === 0) { 270 if (status === 0) {
@@ -276,12 +276,12 @@ export default { @@ -276,12 +276,12 @@ export default {
276 }); 276 });
277 this.query.subjectName = this.subjectList[0]?.value; 277 this.query.subjectName = this.subjectList[0]?.value;
278 } else { 278 } else {
279 - this.$message.error(message); 279 + this.$message.error(info);
280 } 280 }
281 }, 281 },
282 // 查找答题卡类型 282 // 查找答题卡类型
283 async _QueryTypeList() { 283 async _QueryTypeList() {
284 - const { data, status, message } = await this.$request.fetchTypeNames({ 284 + const { data, status, info } = await this.$request.fetchTypeNames({
285 classId: this.query.classId, 285 classId: this.query.classId,
286 }); 286 });
287 if (status === 0) { 287 if (status === 0) {
@@ -297,7 +297,7 @@ export default { @@ -297,7 +297,7 @@ export default {
297 label: "--", 297 label: "--",
298 }); 298 });
299 } else { 299 } else {
300 - this.$message.error(message); 300 + this.$message.error(info);
301 } 301 }
302 }, 302 },
303 }, 303 },
src/views/layout/header/header.vue
@@ -129,9 +129,9 @@ export default { @@ -129,9 +129,9 @@ export default {
129 this.$store.dispatch("permissions", this); 129 this.$store.dispatch("permissions", this);
130 }, 130 },
131 async logOut() { 131 async logOut() {
132 - const { data } = await this.$request.logout();  
133 - if (data.status == 0) {  
134 - if (data.data) { 132 + const { data,status } = await this.$request.logout();
  133 + if (status == 0) {
  134 + if (data) {
135 window.location.href = data; 135 window.location.href = data;
136 } else { 136 } else {
137 this.$router.push({ 137 this.$router.push({
src/views/portrait/index.vue
1 <template> 1 <template>
2 - <div>学生画像</div> 2 + <div>
  3 + <back-box>
  4 + <template slot="title">
  5 + <span>{{ "学生画像" }}</span>
  6 + </template>
  7 + </back-box>
  8 + </div>
3 </template> 9 </template>
4 10
5 <script> 11 <script>