dev_202412
yujialong 5 months ago
parent 5868ddd3c3
commit 50ecd7e2f1
  1. 2
      public/static/ueditorPlus/ueditor.config.js
  2. 175
      src/components/editor.js
  3. 80
      src/pages/match/details/index.vue
  4. 1
      src/pages/match/list/index.vue
  5. 2
      src/pages/match/theoryExam/index.vue
  6. 21
      src/pages/record/trialReport/index.vue
  7. 1
      src/pages/touristMatch/list/index.vue

@ -62,7 +62,7 @@
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义
toolbars: [
["fullscreen", "source", "|", "bold", "italic", "underline", "forecolor", "fontfamily", "fontsize", "|", "justifyleft", "justifycenter", "justifyright", "justifyjustify", "|", "insertimage", "inserttable", 'formula', 'combox']
["fullscreen", "source", "|", "bold", "italic", "underline", 'removeformat', 'formatmatch', 'blockquote', 'pasteplain', "rowspacingtop", "rowspacingbottom", "lineheight", "|", "customstyle", "paragraph", "fontfamily", "fontsize", "|", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist", "|", "link", "unlink", "anchor", "|", "imagenone", "imageleft", "imagecenter", "imageright", "|", "justifyleft", "justifycenter", "justifyright", "justifyjustify", "|", "insertcode", "insertimage", "inserttable", 'formula', 'combox']
]
// 公式配置
, formulaConfig: {

@ -2,9 +2,9 @@ import Oss from '@/components/upload/upload.js'
import { Loading } from 'element-ui'
export default {
//skin:'oxide-dark',
language:'zh_CN',
language: 'zh_CN',
language_url: './styles/tinymce/langs/zh_CN.js',
plugins: 'print powerpaste preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template advcode codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave autoresize formatpainter',
plugins: 'print powerpaste preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template advcode codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autoresize formatpainter',
toolbar: 'code undo redo restoredraft | cut copy powerpaste pastetext | forecolor backcolor headings fontsize lineHeight bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify | \
styleselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em formatpainter',
@ -20,40 +20,40 @@ export default {
{
title: '行高',
items: [{
title: '1',
styles: {
'line-height': '1'
},
inline: 'span'
title: '1',
styles: {
'line-height': '1'
},
{
title: '1.5',
styles: {
'line-height': '1.5'
},
inline: 'span'
inline: 'span'
},
{
title: '1.5',
styles: {
'line-height': '1.5'
},
{
title: '2',
styles: {
'line-height': '2'
},
inline: 'span'
inline: 'span'
},
{
title: '2',
styles: {
'line-height': '2'
},
{
title: '2.5',
styles: {
'line-height': '2.5'
},
inline: 'span'
inline: 'span'
},
{
title: '2.5',
styles: {
'line-height': '2.5'
},
{
title: '3',
styles: {
'line-height': '3'
},
inline: 'span'
}
inline: 'span'
},
{
title: '3',
styles: {
'line-height': '3'
},
inline: 'span'
}
]
},
//默认的配置
@ -186,33 +186,34 @@ export default {
fontsize_formats: '12px 14px 16px 19px 24px 36px 48px 56px 72px',
font_formats: '苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;知乎配置=BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;小米配置=Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif',
link_list: [
{ title: '预置链接1', value: 'http://www.tinymce.com' },
{ title: '预置链接2', value: 'http://tinymce.ax-z.cn' }
{ title: '预置链接1', value: 'http://www.tinymce.com' },
{ title: '预置链接2', value: 'http://tinymce.ax-z.cn' }
],
image_list: [
{ title: '预置图片1', value: 'https://www.tiny.cloud/images/glyph-tinymce@2x.png' },
{ title: '预置图片2', value: 'https://www.baidu.com/img/bd_logo1.png' }
{ title: '预置图片1', value: 'https://www.tiny.cloud/images/glyph-tinymce@2x.png' },
{ title: '预置图片2', value: 'https://www.baidu.com/img/bd_logo1.png' }
],
image_class_list: [
{ title: 'None', value: '' },
{ title: 'Some class', value: 'class-name' }
{ title: 'None', value: '' },
{ title: 'Some class', value: 'class-name' }
],
//importcss_append: true,
//自定义文件选择器的回调内容
file_picker_callback: function (callback, value, meta) {
if (meta.filetype === 'file') {
callback('https://www.baidu.com/img/bd_logo1.png', { text: 'My text' });
}
if (meta.filetype === 'image') {
callback('https://www.baidu.com/img/bd_logo1.png', { alt: 'My alt text' });
}
if (meta.filetype === 'media') {
callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.baidu.com/img/bd_logo1.png' });
}
if (meta.filetype === 'file') {
callback('https://www.baidu.com/img/bd_logo1.png', { text: 'My text' });
}
if (meta.filetype === 'image') {
callback('https://www.baidu.com/img/bd_logo1.png', { alt: 'My alt text' });
}
if (meta.filetype === 'media') {
callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.baidu.com/img/bd_logo1.png' });
}
},
//为内容模板插件提供预置模板
templates: [
{ title: '个股分析报告', description: '', content: `
{
title: '个股分析报告', description: '', content: `
<div class="tiny-report">
<h2>个股分析报告</h2>
<h6>1.引言</h6>
@ -268,10 +269,11 @@ export default {
<li>列出用于报告的参考文献和数据来源</li>
</ul>
</div>
`
},
{ title: '行业数据分析报告', description: '', content: `
`
},
{
title: '行业数据分析报告', description: '', content: `
<div class="tiny-report">
<h2>行业数据分析报告</h2>
<h6>1.引言</h6>
@ -341,10 +343,11 @@ export default {
<li>列出用于报告的参考文献和数据来源</li>
</ul>
</div>
`
},
{ title: '宏观数据分析报告', description: '', content: `
`
},
{
title: '宏观数据分析报告', description: '', content: `
<div class="tiny-report">
<h2>宏观数据分析报告</h2>
<h6>1.引言</h6>
@ -400,10 +403,11 @@ export default {
<li>列出用于报告的参考文献和数据来源</li>
</ul>
</div>
`
},
{ title: '可视化报告', description: '', content: `
`
},
{
title: '可视化报告', description: '', content: `
<div class="tiny-report">
<h2>可视化报告</h2>
<h6>1.封面</h6>
@ -471,10 +475,11 @@ export default {
<li>提供其他补充信息和参考资料</li>
</ul>
</div>
`
},
{ title: '数据分析报告', description: '', content: `
`
},
{
title: '数据分析报告', description: '', content: `
<div class="tiny-report">
<h2>数据分析报告</h2>
<h6>1.引言</h6>
@ -548,8 +553,8 @@ export default {
<li>提供其他补充信息和参考资料</li>
</ul>
</div>
`
},
`
},
],
// content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js",
// extended_valid_elements:'script[src]',
@ -557,7 +562,7 @@ export default {
// template_cdate_format: '[CDATE: %m/%d/%Y : %H:%M:%S]',
// template_mdate_format: '[MDATE: %m/%d/%Y : %H:%M:%S]',
// autosave_ask_before_unload: false,
toolbar_mode : 'wrap',
toolbar_mode: 'wrap',
// automatic_uploads: true,
// images_upload_base_path: '/demo',
// images_upload_url: 'http://10.10.11.7:10000/iasf/sysFiles/upload',
@ -567,15 +572,15 @@ export default {
powerpaste_html_import: 'clean',
// 自定义上传
images_upload_handler: function (blobInfo, succFun, failFun) {
const blob = blobInfo.blob()
// blob转换为file
const file = new File([blob], blobInfo.filename(), {
type: 'application/json',
lastModified: Date.now()
});
Oss.upload(file).then(res => {
succFun(res.url)
})
const blob = blobInfo.blob()
// blob转换为file
const file = new File([blob], blobInfo.filename(), {
type: 'application/json',
lastModified: Date.now()
});
Oss.upload(file).then(res => {
succFun(res.url)
})
},
//自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发
file_picker_callback: function (callback, value, meta) {
@ -591,23 +596,23 @@ export default {
let input = document.createElement('input');//创建一个隐藏的input
input.setAttribute('type', 'file');
input.setAttribute("accept", ".mp4");
input.onchange = function(){
input.onchange = function () {
let file = this.files[0];
const load = Loading.service()
Oss.upload(file).then(res => {
load.close()
callback(res.url)
}).catch(e => {
load.close()
})
Oss.upload(file).then(res => {
load.close()
callback(res.url)
}).catch(e => {
load.close()
})
}
//触发点击
input.click();
}
},
// 初始化事件
setup: function(editor) {
editor.on('init', function(ed) {
setup: function (editor) {
editor.on('init', function (ed) {
// 设置默认字体
ed.target.editorCommands.execCommand("fontName", false, "Microsoft Yahei")
ed.target.editorCommands.execCommand("fontSize", false, "19px")

@ -183,54 +183,51 @@
<th>学号</th>
<td>{{ info.person.workNumber }}</td>
</tr>
</template>
<tr>
<th>学校</th>
<td>
<div class="flex a-center">
<template v-if="schoolEdit">
<el-select class="m-r-10" v-model="curRealSchoolId" filterable>
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
<i class="el-icon-check icon" @click="saveSchoolId"></i>
</template>
<template v-else>
<span class="m-r-10">{{ info.person.realSchool }}</span>
<i class="el-icon-edit icon" @click="schoolEdit = 1"></i>
</template>
</div>
<!-- <span v-else>{{ info.person.realSchool }}</span> -->
</td>
</tr>
<template v-if="form.completeCompetitionSetup.competitionType && info.team.captain">
<tr>
<th>学校</th>
<th width="150">团队名称</th>
<td>
<div v-if="fromOffical" class="flex a-center">
<template v-if="schoolEdit">
<el-select class="m-r-10" v-model="curRealSchoolId" filterable>
<el-option v-for="(item, i) in schools" :key="i" :label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
<i class="el-icon-check icon" @click="saveSchoolId"></i>
</template>
<template v-else>
<span class="m-r-10">{{ info.person.realSchool }}</span>
<i class="el-icon-edit icon" @click="schoolEdit = 1"></i>
</template>
</div>
<span v-else>{{ info.person.realSchool }}</span>
<span>{{ info.team.teamName }}</span>
</td>
</tr>
</template>
<template v-if="form.completeCompetitionSetup.competitionType">
<tr v-if="info.team.captain">
<th width="150">团队名称</th>
<tr>
<th>队长</th>
<td>{{ info.caption.userName }}{{ info.caption.realSchool && ',' + info.caption.realSchool }}{{
info.caption.workNumber && ',' + info.caption.workNumber }}</td>
</tr>
<tr>
<th>团队成员</th>
<td>
<span>{{ info.team.teamName }}</span>
<el-tag v-for="(item, i) in info.teamDetail" :key="i" style="margin-right: 5px">{{ item.userName
}}</el-tag>
</td>
</tr>
<tr>
<th>团队邀请码</th>
<td>
<span>{{ info.team.invitationCode }}</span>
</td>
</tr>
<template v-if="info.team.captain">
<tr>
<th>队长</th>
<td>{{ info.caption.userName }}{{ info.caption.realSchool && ',' + info.caption.realSchool }}{{
info.caption.workNumber && ',' + info.caption.workNumber }}</td>
</tr>
<tr>
<th>团队成员</th>
<td>
<el-tag v-for="(item, i) in info.teamDetail" :key="i" style="margin-right: 5px">{{ item.userName
}}</el-tag>
</td>
</tr>
<tr>
<th>团队邀请码</th>
<td>
<span>{{ info.team.invitationCode }}</span>
</td>
</tr>
</template>
</template>
<tr>
<th width="130">指导老师</th>
@ -1414,7 +1411,6 @@ export default {
if (!form.teamId) return Util.errorMsg('请选择团队')
if (!form.invitationCode) return Util.errorMsg('请输入团队邀请码')
if (this.form.completeCompetitionSetup.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
delete form.realSchoolId
await this.$post(this.api.joinCompetitionTeam, form)
this.status = 1
this.enterVisible = false

@ -715,7 +715,6 @@ export default {
if (!form.teamId) return Util.errorMsg('请选择团队')
if (!form.invitationCode) return Util.errorMsg('请输入团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
delete form.realSchoolId
this.$post(this.api.joinCompetitionTeam, form).then(res => {
this.enterVisible = false
this.getData()

@ -674,8 +674,8 @@ export default {
//
await this.$post(this.api[isSubmit ? 'submitTheExamPaper' : 'examPaperRecordCache'], data)
window.opener && window.opener.location.reload()
if (isSubmit) {
window.opener && window.opener.location.reload()
clearInterval(this.counterTimer)
this.submiting = false
this.submited = true

@ -231,24 +231,25 @@ export default {
}
this.routes = routes
const { data } = report
this.userScores = userScores
let { data } = report
// data使
if (!data) {
this.userScores = userScores
this.handleList(userScores)
this.$post(this.api.editExperimentalData, {
reportId,
data: JSON.stringify(userScores)
}).then(res => { }).catch(err => { })
} else {
const cacheData = JSON.parse(data)
cacheData.forEach((e, i) => {
const item = userScores.find(n => n.judgmentId === e.judgmentId)
if (item) {
e.answer = item.answer
}
})
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : cacheData)
data = JSON.parse(data)
// this.userScores = data
// cacheData.forEach((e, i) => {
// const item = userScores.find(n => n.judgmentId === e.judgmentId)
// if (item) {
// e.answer = item.answer
// }
// })
this.handleList(data)
}
}).catch(res => { })
},

@ -606,7 +606,6 @@ export default {
if (!form.teamId) return Util.errorMsg('请选择团队')
if (!form.invitationCode) return Util.errorMsg('请输入团队邀请码')
if (this.curItem.isNeedCode && !form.registrationInvitationCode) return Util.errorMsg('请输入大赛邀请码')
delete form.realSchoolId
await this.$post(this.api.joinCompetitionTeam, form)
this.enterVisible = false
this.getData()

Loading…
Cancel
Save