diff --git a/E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null b/E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null new file mode 100644 index 0000000..821db7c --- /dev/null +++ b/E/system-commandline-sentinel-files/dotnet-suggest-registration-git-credential-manager-core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null @@ -0,0 +1,6 @@ +Exception during registration: +System.ComponentModel.Win32Exception (0x80004005): 系统找不到指定的文件。 + 在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) + 在 System.Diagnostics.Process.Start() + 在 System.CommandLine.Invocation.Process.StartProcess(String command, String args, String workingDir, Action`1 stdOut, Action`1 stdErr, ValueTuple`2[] environmentVariables) + 在 System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__10_1>d.MoveNext() \ No newline at end of file diff --git a/src/assets/css/index.scss b/src/assets/css/index.scss index e5a25ee..1362381 100644 --- a/src/assets/css/index.scss +++ b/src/assets/css/index.scss @@ -112,4 +112,8 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; +} +.pagination-box{ + text-align:center; + margin:10px; } \ No newline at end of file diff --git a/src/views/examinationPaper/add.vue b/src/views/examinationPaper/add.vue index 4ed635b..0692a8f 100644 --- a/src/views/examinationPaper/add.vue +++ b/src/views/examinationPaper/add.vue @@ -86,7 +86,9 @@ @@ -291,7 +293,12 @@ >取消 上一步 - 下一步 + 下一步 @@ -342,6 +351,10 @@
+
+

{{ form.title }}

+

卷面总分:{{ allScore }}分

+

{{ setBigNum(index) }}、 @@ -350,7 +363,8 @@

  • -
    题号
    +
    题号
    +
    题型
    分数
    选项设置
  • @@ -448,6 +462,17 @@ const subQuesOptions = { correctAnswer: "", }; export default { + computed: { + allScore: function () { + let score = 0; + this.form.questionList.map((item) => { + score += item.subQuestions.reduce((a, b) => { + return a + Number(b.score); + }, 0); + }, 0); + return Number(score).toFixed(2); + }, + }, data() { return { type: 1, //1-创建,2-复制答题卡 @@ -456,7 +481,7 @@ export default { questionForm: { ...questionForm }, questionFormRules: { questionTitle: [ - { required: true, message: "请输入答题卡名称", trigger: "blur" }, + { required: true, message: "请输入大题名称", trigger: "blur" }, { min: 1, max: 30, @@ -484,7 +509,7 @@ export default { tagId: "", gradeName: "", subjectName: "", - examsDuration: 0, + examsDuration: 90, sharingType: 1, questionList: [], }, @@ -510,10 +535,10 @@ export default { }; }, async created() { + this.type = this.$route.query.type ? this.$route.query.type : 1; await this._GradeList(); await this._QuerySubjectList(this.gradeList[0]); await this._TypeList(); - this.type = this.$route.query.type ? this.$route.query.type : 1; if (this.type == 2) { this._QueryDetail(); } @@ -608,16 +633,23 @@ export default { }); }, setStep2() { - let valid = true; - this.form.questionList.map((item) => { + if (!this.form.questionList.length) { + this.$message.warning("请添加题目!"); + return; + } + let valid = ""; + this.form.questionList.map((item, index) => { if (!item.questionTitle) { - valid = false; + valid += index + 1 + "、"; } }); - if (valid) { + if (!valid) { this.step = 2; + return; } else { - this.$message.error("大题名称不能为空,请检查!"); + this.$message.error( + `大题名称不能为空,请检查第${valid.slice(0,-1)}大题!` + ); } }, openQuestion() { @@ -640,7 +672,6 @@ export default { questionsOptions.answerOptions = this.rightOptions .slice(0, questionsOptions.selectNum) .join(","); - questionsOptions.partScore = 0.5; break; case 4: case 5: @@ -686,7 +717,7 @@ export default { questionsOptions.answerOptions = this.rightOptions .slice(0, questionsOptions.selectNum) .join(","); - questionsOptions.partScore = 0.5; + questionsOptions.partScore = 0; break; case 4: case 5: @@ -714,7 +745,6 @@ export default { subQuestions.answerOptions = that.rightOptions .slice(0, subQuestions.selectNum) .join(","); - subQuestions.partScore = 0.5; break; case 4: case 5: @@ -734,7 +764,7 @@ export default { removeOptions(subQuestions) { //删除选项 let length = subQuestions.answerOptions.split(",").length; - if (length < 2) return; + if (length < 3) return; subQuestions.selectNum = length - 1; subQuestions.answerOptions = this.rightOptions .slice(0, subQuestions.selectNum) @@ -824,7 +854,7 @@ export default { //查询年级列表 const { data, status, info } = await this.$request.fetchGradeList(); if (status == 0) { - this.gradeList = data.gradeNames&&[...data.gradeNames] || []; + this.gradeList = (data.gradeNames && [...data.gradeNames]) || []; if (this.type != 2) { this.form.gradeName = this.gradeList[0]; } @@ -838,12 +868,13 @@ export default { gradeName: grade, }); if (status === 0) { - this.subjectList = data.subjectNames?.map((item) => { - return { - value: item, - label: item, - }; - })||[]; + this.subjectList = + data.subjectNames?.map((item) => { + return { + value: item, + label: item, + }; + }) || []; console.log(this.subjectList); if (this.subjectList.length) { this.form.subjectName = this.subjectList[0].value; @@ -859,8 +890,8 @@ export default { paperId: this.$route.query.paperId, }); if (status == 0) { - this.form.title = data.title+'_副本'; - this.form.tagId = data.tagId; + this.form.title = data.title + "_副本"; + this.form.tagId = data.tagId===0?"":data.tagId; this.form.subjectName = data.subjectName; this.form.gradeName = data.gradeName; this.form.examsDuration = data.examsDuration; @@ -980,6 +1011,18 @@ export default { .el-input-number { width: 140px; } +.answer-title { + text-align: center; + font-size: 20px; + color: #333; + font-weight: 700; + padding-bottom: 20px; + .totals { + font-size: 16px; + color: #888; + font-weight: normal; + } +} .answer-box { .answer-s { display: inline-block; diff --git a/src/views/examinationPaper/edit.vue b/src/views/examinationPaper/edit.vue index 62d69fa..e815e2f 100644 --- a/src/views/examinationPaper/edit.vue +++ b/src/views/examinationPaper/edit.vue @@ -7,7 +7,8 @@

    - 2022-11-24 14:30张老师修改了答案。 + + {{`${form.modifiedTime} ${form.realName}`}}老师修改了答案

    {{ form.title }}

    @@ -115,6 +116,8 @@ export default { examsDuration: 90, gradeName: "", share: 1, + realName:"", + modifiedTime:"", questionList: [], }, }; @@ -189,7 +192,7 @@ export default { let score = question.subQuestions.reduce((a, b) => { return a + b.score; }, 0); - return score; + return Number(score).toFixed(2); }, changAnswer(sub, option) { //设置多选答案 @@ -203,6 +206,16 @@ export default { } }, async save() { + let valid = ""; + this.form.questionList.map((item, index) => { + if (!item.questionTitle) { + valid += ((index + 1)+'、'); + } + }); + if (valid) { + this.$message.error(`大题名称不能为空,请检查第${valid.slice(0,-1)}题!`); + return; + } let questionList = this.form.questionList.map((item) => { item.score = null; // item.questionId = ""; @@ -232,6 +245,7 @@ export default { this.form.questionList.map((item) => { item.score = ""; }); + this.paperModifyLog ={...this.paperModifyLog,...this.form.paperModifyLog} } else { this.$message.error(info); } diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue index 3343864..7fdfd8c 100644 --- a/src/views/examinationPaper/index.vue +++ b/src/views/examinationPaper/index.vue @@ -75,11 +75,11 @@
    -

    +

    另有{{ archivedTotal }}份已经归档的答题卡, 点击查看>>

    -
      +
      • @@ -87,7 +87,8 @@

        - {{ item.title }} {{ item.tag }} + {{ item.title }} + {{ item.tag }}

        总题数:{{ item.questionNum }} @@ -101,7 +102,7 @@ :key="clazzChild.classId" >{{ `${clazzChild.className}${ - indexs != item.classList.length-1? "、" : "" + indexs != item.classList.length - 1 ? "、" : "" }` }}

      +
      + + +
      + @@ -166,6 +184,7 @@ export default { name: "examinationPaper", data() { return { + loading: false, userName: "", dialogVisible: false, query: { @@ -178,14 +197,17 @@ export default { subjectList: [], typeList: [], archivedTotal: 0, //已归档答题卡数量 - tableData: [], + tableData: null, shareForm: { id: "", - sharingType: 1,//0-任课班级/1-全年级 + sharingType: 1, //0-任课班级/1-全年级 }, shareRulesForm: { - sharingType: [{ required: true, message: "选择分享范围", trigger: "blur" }], + sharingType: [ + { required: true, message: "选择分享范围", trigger: "blur" }, + ], }, + total: 0, page: 1, size: 20, }; @@ -233,18 +255,21 @@ export default { break; } }, + changePage(page){ + this.page = page + this._QueryData(this.query.title) + }, async saveShare() { //修改分享范围 const { data, status, info } = await this.$request.modifyPaper({ paperId: this.shareForm.id, sharingType: this.shareForm.sharingType, }); - this.loading = false; if (status === 0) { this.shareForm.id = ""; this.shareForm.sharingType = 1; this.dialogVisible = false; - this.$message.success(info) + this.$message.success(info); } else { this.$message.error(info); } @@ -272,7 +297,7 @@ export default { async _QueryTypeList() { const { data, status, info } = await this.$request.fetchTypeNames({ classId: this.query.classId, - type:0 + type: 0, }); if (status === 0) { this.typeList = @@ -284,7 +309,7 @@ export default { }) || []; this.typeList.unshift({ value: "", - label: "--", + label: "请选择标签", }); } else { this.$message.error(info); @@ -292,16 +317,18 @@ export default { }, // 查找班级 async _QueryClassList() { + this.loading = true; const { data, status, info } = await this.$request.fetchClassList(); - console.log(status) + console.log(status); if (status === 0) { if (!!data.list) { - this.classList = data.list?.map((item) => { - return { - value: item.classId, - label: item.className, - }; - })||[]; + this.classList = + data.list?.map((item) => { + return { + value: item.classId, + label: item.className, + }; + }) || []; this.query.classId = this.classList[0]?.value; } } else { @@ -314,18 +341,20 @@ export default { classId: this.query.classId, }); if (status === 0) { - this.subjectList = data.subjectNames?.map((item) => { - return { - value: item, - label: item, - }; - })||[]; + this.subjectList = + data.subjectNames?.map((item) => { + return { + value: item, + label: item, + }; + }) || []; this.query.subjectName = this.subjectList[0]?.value; } else { this.$message.error(info); } }, async _QueryData(type) { + this.loading = true; //获取答题卡列表 let query = {}; if (!type) { @@ -352,12 +381,12 @@ export default { const { data, status, info } = await this.$request.fetchPaperList({ ...query, status: 1, - page: this.page, - size: this.size, + // page: this.page, + // size: this.size, }); this.loading = false; if (status === 0) { - this.archivedTotal = data.archivedTotal + this.archivedTotal = data.archivedTotal; this.total = data.total; this.tableData = (data.list && [...data.list]) || []; } else { @@ -447,7 +476,7 @@ export default { font-weight: 500; position: relative; position: relative; - &.active:after{ + &.active:after { content: "\e79c"; color: #667ffd; } diff --git a/src/views/examinationPaper/recycle.vue b/src/views/examinationPaper/recycle.vue index 48bed6a..c2bca16 100644 --- a/src/views/examinationPaper/recycle.vue +++ b/src/views/examinationPaper/recycle.vue @@ -124,6 +124,18 @@
+
+ + +
@@ -173,8 +185,10 @@ export default { classList: [], subjectList: [], typeList: [], - tableData: null, + tableData: [], total: 0, + page:1, + size:20 }; }, async created() { @@ -214,6 +228,10 @@ export default { await this._QuerySubjectList(); this._QueryData(false); }, + changePage(page){ + this.page = page + this._QueryData(this.query.title) + }, async _QueryData(type) { //获取答题卡列表 this.loading=true @@ -234,7 +252,9 @@ export default { } const { data, status, info } = await this.$request.fetchPaperList({ ...query, - status:2 + status:2, + page:this.page, + size:this.size }); this.loading = false; if (status === 0) { @@ -295,7 +315,7 @@ export default { }) || []; this.typeList.unshift({ value: "", - label: "--", + label: "请选择标签", }); } else { this.$message.error(info);