dev_review
yujialong 3 months ago
parent 45ff98f698
commit 0d952de033
  1. 29
      src/assets/css/main.css
  2. 9
      src/views/match/add/step3.vue
  3. 43
      src/views/match/manage/theoryArchList.vue
  4. 36
      src/views/match/manage/theoryReport.vue

@ -491,3 +491,32 @@ li {
.edui-default { .edui-default {
line-height: normal; line-height: normal;
} }
.html-parse {
table {
display: table;
margin-bottom: 10px;
border-collapse: collapse;
th,
td {
padding: 5px 10px;
border: 1px solid #DDD;
}
}
ol {
padding-left: 30px;
li {
list-style-type: decimal;
}
}
ul {
padding-left: 30px;
li {
list-style-type: disc;
}
}
}

@ -81,8 +81,13 @@
</template> </template>
<template v-else> <template v-else>
<el-form-item class="req" label="已选择试卷"> <el-form-item class="req" label="已选择试卷">
{{ item.paperName }} <div class="flex">
<el-button v-if="item.paperName" type="primary" size="mini" @click="previewPaper(item)">预览</el-button> {{ item.paperName }}&emsp;
<el-form>
<el-button v-if="item.paperName" type="primary" size="mini" :disabled="false"
@click="previewPaper(item)">预览</el-button>
</el-form>
</div>
</el-form-item> </el-form-item>
</template> </template>
<el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点"> <el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点">

@ -45,16 +45,9 @@
<el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable <el-input size="small" placeholder="请输入学校/学生姓名" prefix-icon="el-icon-search" v-model="keyword" clearable
style="width: 300px"></el-input> style="width: 300px"></el-input>
</div> </div>
<div v-if="!active">
<el-button v-if="method == 2" type="primary" @click="batchImport">上传成绩</el-button>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出' <el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出'
}}</el-button> }}</el-button>
</div> </div>
<div v-else>
<el-button type="primary" :loading="exporting1" @click="exportData1">{{ exporting1 ? '正在导出' : '批量导出'
}}</el-button>
</div>
</div>
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center" <el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="id"> @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
@ -256,6 +249,7 @@ export default {
competitionId: this.id, competitionId: this.id,
isNakadai: 1, isNakadai: 1,
stageId: this.stageId, stageId: this.stageId,
participatingState: this.active,
}, { }, {
headers: this.headers, headers: this.headers,
responseType: 'blob' responseType: 'blob'
@ -265,31 +259,22 @@ export default {
} }
} }
}, },
// () async handleDelete (row) { //
exportData1 () { await this.$confirm(`<p>确认要删除【${row.userName}】的成绩记录吗?</p><p style="color: #f56c6c;">删除后成绩数据不可恢复,自动变为未提交</p>`, '提示', {
this.exporting1 = true confirmButtonText: '确定',
let list = this.list1 cancelButtonText: '取消',
if (this.multipleSelection1.length) { type: 'warning',
list = this.multipleSelection1 closeOnClickModal: false,
} dangerouslyUseHTMLString: true,
Zip('批量导出', list, () => {
this.exporting1 = false
}) })
},
handleDelete (row) { // await this.$post(this.api.batchDeleteContestGrade, {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.batchDeleteContestGrade, {
ids: [this.method == 2 ? row.scoreId : row.reportId], ids: [this.method == 2 ? row.scoreId : row.reportId],
competitionId: this.id, competitionId: this.id,
stageId: this.stageId stageId: this.stageId
}).then(res => { })
util.successMsg("删除成功"); util.successMsg("删除成功")
this.getData(); this.getData()
}).catch(res => {
});
}).catch(() => { });
}, },
delAllData () { // delAllData () { //
const list = this.multipleSelection const list = this.multipleSelection
@ -433,6 +418,8 @@ export default {
}, },
// tab // tab
tabChange (i) { tabChange (i) {
this.multipleSelection = []
this.$refs.table.clearSelection()
this.active = i this.active = i
this.initData() this.initData()
}, },

@ -112,7 +112,7 @@
<ul v-if="paper" class="ques-wrap" id="quesWrap"> <ul v-if="paper" class="ques-wrap" id="quesWrap">
<li v-for="(item, i) in paper" :key="i"> <li v-for="(item, i) in paper" :key="i">
<div class="outline"> <div class="outline">
{{ arabicToChinese(i + 1) }}{{ item.questionTypeName }}本题共{{ item.questionNum }}小题{{ {{ arabicToChinese(i + 1) }}{{ item.outlineName }}本题共{{ item.questionNum }}小题{{
item.targetScore }} item.targetScore }}
<img :class="['shrink', { active: item.shrink }]" src="@/assets/img/shrink.svg" alt="" <img :class="['shrink', { active: item.shrink }]" src="@/assets/img/shrink.svg" alt=""
@click="item.shrink = !item.shrink"> @click="item.shrink = !item.shrink">
@ -181,7 +181,8 @@
</div> </div>
<div v-if="ques.attachmentUrl" class="line"> <div v-if="ques.attachmentUrl" class="line">
<span class="line-label">考生上传附件</span> <span class="line-label">考生上传附件</span>
<el-link class="m-r-10" type="primary">{{ ques.attachmentName }}</el-link> <el-link class="m-r-10" type="primary" @click="preview(ques.attachmentUrl)">{{
ques.attachmentName }}</el-link>
<el-button type="primary" size="mini" round <el-button type="primary" size="mini" round
@click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button> @click="download(ques.attachmentName, ques.attachmentUrl)">下载</el-button>
</div> </div>
@ -217,7 +218,7 @@
考试总结与体会 考试总结与体会
</h6> </h6>
<quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" /> <quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" />
<div v-else class="pre-wrap" v-html="form.summarize"></div> <div v-else class="pre-wrap html-parse" v-html="form.summarize"></div>
</div> </div>
</div> </div>
</div> </div>
@ -237,6 +238,7 @@ import QuesConst from '@/const/ques'
import TestPaperConst from '@/const/testPaper' import TestPaperConst from '@/const/testPaper'
import Util from '@/libs/util' import Util from '@/libs/util'
import _ from 'lodash' import _ from 'lodash'
import axios from 'axios'
export default { export default {
components: { components: {
PdfDia PdfDia
@ -246,6 +248,7 @@ export default {
numToLetter: Util.numToLetter, numToLetter: Util.numToLetter,
arabicToChinese: Util.arabicToChinese, arabicToChinese: Util.arabicToChinese,
reportId: this.$route.query.reportId, reportId: this.$route.query.reportId,
token: sessionStorage.getItem("token"),
title: "实验报告", title: "实验报告",
form: { form: {
className: "", className: "",
@ -465,11 +468,14 @@ export default {
// //
async exportPage () { async exportPage () {
this.exporting = true this.exporting = true
const res = await this.$get(this.api.exportExamPaperReport, { const res = await axios.get(`${this.api.exportExamPaperReport}?reportId=${this.reportId}`, {
reportId: this.reportId headers: {
token: this.token
},
responseType: 'blob'
}) })
console.log(res) const name = res.headers['content-disposition']
Util.downloadFileDirect(`标准实验报告.docx`, new Blob([res])) Util.downloadFileDirect(name ? decodeURI(name) : '标准成绩报告.docx', new Blob([res.data]))
this.exporting = false this.exporting = false
}, },
} }
@ -598,7 +604,7 @@ samp {
.exist { .exist {
position: absolute; position: absolute;
left: 70px; left: 95px;
white-space: nowrap; white-space: nowrap;
color: #f00; color: #f00;
} }
@ -835,20 +841,6 @@ samp {
} }
} }
.html-parse {
table {
display: table;
margin-bottom: 10px;
border-collapse: collapse;
th,
td {
padding: 5px 10px;
border: 1px solid #DDD;
}
}
}
img { img {
max-width: 100%; max-width: 100%;
} }

Loading…
Cancel
Save