yujialong 2 months ago
parent ceb4845179
commit b6568bd97c
  1. 191
      src/components/editor.js
  2. 6
      src/pages/achievement/show/index.vue
  3. 1
      src/pages/match/manage/matchSignup.vue
  4. 355
      src/pages/student/list/index.vue

@ -2,9 +2,9 @@ import Oss from '@/components/upload/upload.js'
import { Loading } from 'element-ui' import { Loading } from 'element-ui'
export default { export default {
//skin:'oxide-dark', //skin:'oxide-dark',
language:'zh_CN', language: 'zh_CN',
language_url: './styles/tinymce/langs/zh_CN.js', 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 | \ 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 | \ styleselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em formatpainter', table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em formatpainter',
@ -20,40 +20,40 @@ export default {
{ {
title: '行高', title: '行高',
items: [{ items: [{
title: '1', title: '1',
styles: { styles: {
'line-height': '1' 'line-height': '1'
},
inline: 'span'
}, },
{ inline: 'span'
title: '1.5', },
styles: { {
'line-height': '1.5' title: '1.5',
}, styles: {
inline: 'span' 'line-height': '1.5'
}, },
{ inline: 'span'
title: '2', },
styles: { {
'line-height': '2' title: '2',
}, styles: {
inline: 'span' 'line-height': '2'
}, },
{ inline: 'span'
title: '2.5', },
styles: { {
'line-height': '2.5' title: '2.5',
}, styles: {
inline: 'span' 'line-height': '2.5'
}, },
{ inline: 'span'
title: '3', },
styles: { {
'line-height': '3' title: '3',
}, styles: {
inline: 'span' 'line-height': '3'
} },
inline: 'span'
}
] ]
}, },
//默认的配置 //默认的配置
@ -186,33 +186,34 @@ export default {
fontsize_formats: '12px 14px 16px 19px 24px 36px 48px 56px 72px', 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', 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: [ link_list: [
{ title: '预置链接1', value: 'http://www.tinymce.com' }, { title: '预置链接1', value: 'http://www.tinymce.com' },
{ title: '预置链接2', value: 'http://tinymce.ax-z.cn' } { title: '预置链接2', value: 'http://tinymce.ax-z.cn' }
], ],
image_list: [ image_list: [
{ title: '预置图片1', value: 'https://www.tiny.cloud/images/glyph-tinymce@2x.png' }, { title: '预置图片1', value: 'https://www.tiny.cloud/images/glyph-tinymce@2x.png' },
{ title: '预置图片2', value: 'https://www.baidu.com/img/bd_logo1.png' } { title: '预置图片2', value: 'https://www.baidu.com/img/bd_logo1.png' }
], ],
image_class_list: [ image_class_list: [
{ title: 'None', value: '' }, { title: 'None', value: '' },
{ title: 'Some class', value: 'class-name' } { title: 'Some class', value: 'class-name' }
], ],
//importcss_append: true, //importcss_append: true,
//自定义文件选择器的回调内容 //自定义文件选择器的回调内容
file_picker_callback: function (callback, value, meta) { file_picker_callback: function (callback, value, meta) {
if (meta.filetype === 'file') { if (meta.filetype === 'file') {
callback('https://www.baidu.com/img/bd_logo1.png', { text: 'My text' }); callback('https://www.baidu.com/img/bd_logo1.png', { text: 'My text' });
} }
if (meta.filetype === 'image') { if (meta.filetype === 'image') {
callback('https://www.baidu.com/img/bd_logo1.png', { alt: 'My alt text' }); callback('https://www.baidu.com/img/bd_logo1.png', { alt: 'My alt text' });
} }
if (meta.filetype === 'media') { if (meta.filetype === 'media') {
callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.baidu.com/img/bd_logo1.png' }); callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.baidu.com/img/bd_logo1.png' });
} }
}, },
//为内容模板插件提供预置模板 //为内容模板插件提供预置模板
templates: [ templates: [
{ title: '个股分析报告', description: '', content: ` {
title: '个股分析报告', description: '', content: `
<div class="tiny-report"> <div class="tiny-report">
<h2>个股分析报告</h2> <h2>个股分析报告</h2>
<h6>1.引言</h6> <h6>1.引言</h6>
@ -268,10 +269,11 @@ export default {
<li>列出用于报告的参考文献和数据来源</li> <li>列出用于报告的参考文献和数据来源</li>
</ul> </ul>
</div> </div>
` `
}, },
{ title: '行业数据分析报告', description: '', content: ` {
title: '行业数据分析报告', description: '', content: `
<div class="tiny-report"> <div class="tiny-report">
<h2>行业数据分析报告</h2> <h2>行业数据分析报告</h2>
<h6>1.引言</h6> <h6>1.引言</h6>
@ -341,10 +343,11 @@ export default {
<li>列出用于报告的参考文献和数据来源</li> <li>列出用于报告的参考文献和数据来源</li>
</ul> </ul>
</div> </div>
` `
}, },
{ title: '宏观数据分析报告', description: '', content: ` {
title: '宏观数据分析报告', description: '', content: `
<div class="tiny-report"> <div class="tiny-report">
<h2>宏观数据分析报告</h2> <h2>宏观数据分析报告</h2>
<h6>1.引言</h6> <h6>1.引言</h6>
@ -400,10 +403,11 @@ export default {
<li>列出用于报告的参考文献和数据来源</li> <li>列出用于报告的参考文献和数据来源</li>
</ul> </ul>
</div> </div>
` `
}, },
{ title: '可视化报告', description: '', content: ` {
title: '可视化报告', description: '', content: `
<div class="tiny-report"> <div class="tiny-report">
<h2>可视化报告</h2> <h2>可视化报告</h2>
<h6>1.封面</h6> <h6>1.封面</h6>
@ -471,10 +475,11 @@ export default {
<li>提供其他补充信息和参考资料</li> <li>提供其他补充信息和参考资料</li>
</ul> </ul>
</div> </div>
` `
}, },
{ title: '数据分析报告', description: '', content: ` {
title: '数据分析报告', description: '', content: `
<div class="tiny-report"> <div class="tiny-report">
<h2>数据分析报告</h2> <h2>数据分析报告</h2>
<h6>1.引言</h6> <h6>1.引言</h6>
@ -548,8 +553,8 @@ export default {
<li>提供其他补充信息和参考资料</li> <li>提供其他补充信息和参考资料</li>
</ul> </ul>
</div> </div>
` `
}, },
], ],
// content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js", // content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js",
// extended_valid_elements:'script[src]', // extended_valid_elements:'script[src]',
@ -557,7 +562,7 @@ export default {
// template_cdate_format: '[CDATE: %m/%d/%Y : %H:%M:%S]', // template_cdate_format: '[CDATE: %m/%d/%Y : %H:%M:%S]',
// template_mdate_format: '[MDATE: %m/%d/%Y : %H:%M:%S]', // template_mdate_format: '[MDATE: %m/%d/%Y : %H:%M:%S]',
// autosave_ask_before_unload: false, // autosave_ask_before_unload: false,
toolbar_mode : 'wrap', toolbar_mode: 'wrap',
// automatic_uploads: true, // automatic_uploads: true,
// images_upload_base_path: '/demo', // images_upload_base_path: '/demo',
// images_upload_url: 'http://10.10.11.7:10000/iasf/sysFiles/upload', // images_upload_url: 'http://10.10.11.7:10000/iasf/sysFiles/upload',
@ -565,25 +570,25 @@ export default {
powerpaste_allow_local_images: true, powerpaste_allow_local_images: true,
powerpaste_word_import: 'clean', powerpaste_word_import: 'clean',
powerpaste_html_import: 'clean', powerpaste_html_import: 'clean',
urlconverter_callback: (url, node, onSave, name) => { urlconverter_callback: (url, node, onSave, name) => {
if (node === 'img' && url.startsWith('blob:')) { if (node === 'img' && url.startsWith('blob:')) {
// Do some custom URL conversion // Do some custom URL conversion
tinymce.activeEditor && tinymce.activeEditor.uploadImages() tinymce.activeEditor && tinymce.activeEditor.uploadImages()
} }
// Return new URL // Return new URL
return url return url
}, },
// 自定义上传 // 自定义上传
images_upload_handler: function (blobInfo, succFun, failFun) { images_upload_handler: function (blobInfo, succFun, failFun) {
const blob = blobInfo.blob() const blob = blobInfo.blob()
// blob转换为file // blob转换为file
const file = new File([blob], blobInfo.filename(), { const file = new File([blob], blobInfo.filename(), {
type: 'application/json', type: 'application/json',
lastModified: Date.now() lastModified: Date.now()
}); });
Oss.upload(file).then(res => { Oss.upload(file).then(res => {
succFun(res.url) succFun(res.url)
}) })
}, },
//自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发 //自定义文件选择器的回调内容 此方法只有在点击上方图片按钮才会触发
file_picker_callback: function (callback, value, meta) { file_picker_callback: function (callback, value, meta) {
@ -599,23 +604,23 @@ export default {
let input = document.createElement('input');//创建一个隐藏的input let input = document.createElement('input');//创建一个隐藏的input
input.setAttribute('type', 'file'); input.setAttribute('type', 'file');
input.setAttribute("accept", ".mp4"); input.setAttribute("accept", ".mp4");
input.onchange = function(){ input.onchange = function () {
let file = this.files[0]; let file = this.files[0];
const load = Loading.service() const load = Loading.service()
Oss.upload(file).then(res => { Oss.upload(file).then(res => {
load.close() load.close()
callback(res.url) callback(res.url)
}).catch(e => { }).catch(e => {
load.close() load.close()
}) })
} }
//触发点击 //触发点击
input.click(); input.click();
} }
}, },
// 初始化事件 // 初始化事件
setup: function(editor) { setup: function (editor) {
editor.on('init', function(ed) { editor.on('init', function (ed) {
// 设置默认字体 // 设置默认字体
ed.target.editorCommands.execCommand("fontName", false, "Microsoft Yahei") ed.target.editorCommands.execCommand("fontName", false, "Microsoft Yahei")
ed.target.editorCommands.execCommand("fontSize", false, "14px") ed.target.editorCommands.execCommand("fontSize", false, "14px")

@ -169,8 +169,6 @@ export default {
this.loading = true this.loading = true
const { report, userScores } = await this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`) const { report, userScores } = await this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`)
this.form = report this.form = report
this.expData = userScores
this.isLc = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords
let form = this.form; let form = this.form;
this.infoData = { this.infoData = {
workNumber: form.workNumber, workNumber: form.workNumber,
@ -184,16 +182,16 @@ export default {
className: form.className className: form.className
} }
const data = report.data const data = report.data
this.userScores = userScores
// data使 // data使
if (!data) { if (!data) {
this.userScores = userScores
this.handleList(userScores) this.handleList(userScores)
this.$post(this.api.editExperimentalData, { this.$post(this.api.editExperimentalData, {
reportId, reportId,
data: JSON.stringify(userScores) data: JSON.stringify(userScores)
}).then(res => { }).catch(err => { }) }).then(res => { }).catch(err => { })
} else { } else {
this.handleList(userScores.find(e => e.lcRuleRecords) ? userScores : JSON.parse(data)) this.handleList(JSON.parse(data))
} }
}, },
// //

@ -25,6 +25,7 @@
<div slot="content"> <div slot="content">
<p style="margin-bottom: 5px;">报名结束前设置的自动分配将在报名结束时触发一次系统自动分配取消则不触发</p> <p style="margin-bottom: 5px;">报名结束前设置的自动分配将在报名结束时触发一次系统自动分配取消则不触发</p>
<p>报名结束后也可以手动点击自动分配按钮来立即触发系统自动分配并且点击一次就触发一次</p> <p>报名结束后也可以手动点击自动分配按钮来立即触发系统自动分配并且点击一次就触发一次</p>
<p>自动分配仅对触发时已报名的人员进行对于分配后才报名的人员如需自动分配则需手动再次触发自动分配</p>
</div> </div>
<i class="el-icon-question" <i class="el-icon-question"
style="margin: 0 10px 0 5px;font-size: 16px;color: #8f8f8f;cursor: pointer;"></i> style="margin: 0 10px 0 5px;font-size: 16px;color: #8f8f8f;cursor: pointer;"></i>

@ -1,11 +1,9 @@
<template> <template>
<div class="flex"> <div class="flex">
<div class="page" <div class="page" style="width: 320px">
style="width: 320px">
<div class="m-b-20"> <div class="m-b-20">
<h6 class="p-title">学生</h6> <h6 class="p-title">学生</h6>
<el-radio-group v-model="studentType" <el-radio-group v-model="studentType" @change="changeStudentType">
@change="changeStudentType">
<div class="m-b-20"> <div class="m-b-20">
<el-radio :label="1">所有学生</el-radio> <el-radio :label="1">所有学生</el-radio>
</div> </div>
@ -17,40 +15,23 @@
<el-divider></el-divider> <el-divider></el-divider>
<div> <div>
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<h6 class="p-title" <h6 class="p-title" style="margin-bottom: 0">学生组织架构</h6>
style="margin-bottom: 0">学生组织架构</h6> <el-button v-auth="'学生组织架构添加'" type="text" @click="handleAdd">添加</el-button>
<el-button v-auth="'学生组织架构添加'"
type="text"
@click="handleAdd">添加</el-button>
</div> </div>
<div style="height: 504px; max-height: 504px; overflow: auto"> <div style="height: 504px; max-height: 504px; overflow: auto">
<org-tree v-if="treeVisible" <org-tree v-if="treeVisible" default-expand-all ref="orgTree" node-key="id" highlight-current lazy
default-expand-all :load="loadNodeTree" :expand-on-click-node="false" @node-click="handleNodeClick"
ref="orgTree" :current-node-key="architectureId"
node-key="id" :props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }">
highlight-current <span class="custom-tree-node" slot-scope="{ node, data }">
lazy <span class="name" :title="node.label">{{ node.label }}</span>
:load="loadNodeTree"
:expand-on-click-node="false"
@node-click="handleNodeClick"
:current-node-key="architectureId"
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="name"
:title="node.label">{{ node.label }}</span>
<span> <span>
<el-button v-auth="'学生组织架构编辑'" <el-button v-auth="'学生组织架构编辑'" type="text" icon="el-icon-edit-outline"
type="text" @click="() => handleEdit(node, data)">
icon="el-icon-edit-outline"
@click="() => handleEdit(node, data)">
</el-button> </el-button>
<el-button v-auth="'学生组织架构添加'" <el-button v-auth="'学生组织架构添加'" v-if="node.level < 3" type="text" icon="el-icon-circle-plus-outline"
v-if="node.level < 3" @click="() => handleAdd(node, data)">
type="text"
icon="el-icon-circle-plus-outline"
@click="() => handleAdd(node, data)">
</el-button> </el-button>
</span> </span>
</span> </span>
@ -58,225 +39,113 @@
</div> </div>
</div> </div>
<el-dialog :title="orgTitle" <el-dialog :title="orgTitle" :visible.sync="orgVisible" :close-on-click-modal="false" width="50%"
:visible.sync="orgVisible" @close="handleClose">
:close-on-click-modal="false" <el-form v-if="orgVisible" ref="orgForm" :model="orgForm" :rules="rules" label-width="100px">
width="50%" <el-form-item :label="labelName" prop="organizationName">
@close="handleClose"> <el-input v-model.trim="orgForm.organizationName" placeholder="请输入"></el-input>
<el-form v-if="orgVisible"
ref="orgForm"
:model="orgForm"
:rules="rules"
label-width="100px">
<el-form-item :label="labelName"
prop="organizationName">
<el-input v-model.trim="orgForm.organizationName"
placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上级部门"> <el-form-item label="上级部门">
<el-cascader v-if="showCascader" <el-cascader v-if="showCascader" v-model="cascaderValue" :props="cascaderProps"
v-model="cascaderValue" @change="handleChangeCascader" clearable style="width: 100%">
:props="cascaderProps"
@change="handleChangeCascader"
clearable
style="width: 100%">
</el-cascader> </el-cascader>
<span v-else>{{ orgForm.parentName }}</span> <span v-else>{{ orgForm.parentName }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer"> <el-button v-if="isAddOrg" @click="handleClose"> </el-button>
<el-button v-if="isAddOrg" <el-button v-if="!isAddOrg" type="danger" plain @click="handleDel">删除</el-button>
@click="handleClose"> </el-button> <el-button type="primary" @click="orgSubmit"> </el-button>
<el-button v-if="!isAddOrg"
type="danger"
plain
@click="handleDel">删除</el-button>
<el-button type="primary"
@click="orgSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<div class="page flex-1 m-l-20" <div class="page flex-1 m-l-20" style="max-width: calc(100% - 320px)">
style="max-width: calc(100% - 320px)">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input style="width: 250px;" <el-input style="width: 250px;" placeholder="请输入学生姓名/学号" prefix-icon="el-icon-search" v-model="keyWord"
placeholder="请输入学生姓名/学号" clearable></el-input>
prefix-icon="el-icon-search"
v-model="keyWord"
clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="info" <el-button type="info" v-auth @click="addStudent">新增学生</el-button>
v-auth <el-button type="primary" v-auth @click="batchImport">批量导入</el-button>
@click="addStudent">新增学生</el-button> <el-button type="primary" v-auth @click="delAllSelection">批量删除</el-button>
<el-button type="primary"
v-auth
@click="batchImport">批量导入</el-button>
<el-button type="primary"
v-auth
@click="delAllSelection">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" stripe header-align="center"
class="table" @selection-change="handleSelectionChange" :row-key="getRowKeys">
ref="table" <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
stripe <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
header-align="center" <el-table-column prop="userName" label="学生姓名" align="center" min-width="100"></el-table-column>
@selection-change="handleSelectionChange" <el-table-column prop="workNumber" label="学生学号" align="center" min-width="100"></el-table-column>
:row-key="getRowKeys"> <el-table-column prop="className" label="班级" align="center" min-width="200"
<el-table-column type="selection" show-overflow-tooltip></el-table-column>
width="55" <el-table-column prop="countries" label="账号角色" align="center" width="100">
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="userName"
label="学生姓名"
align="center"
min-width="100"></el-table-column>
<el-table-column prop="workNumber"
label="学生学号"
align="center"
min-width="100"></el-table-column>
<el-table-column prop="className"
label="班级"
align="center"
min-width="200"
show-overflow-tooltip></el-table-column>
<el-table-column prop="countries"
label="账号角色"
align="center"
width="100">
<template slot-scope="scope">学生</template> <template slot-scope="scope">学生</template>
</el-table-column> </el-table-column>
<el-table-column prop="loginNumber" <el-table-column prop="loginNumber" label="登录次数" align="center" width="100"></el-table-column>
label="登录次数" <el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="180"></el-table-column>
align="center" <el-table-column label="操作" align="center" width="300">
width="100"></el-table-column>
<el-table-column prop="lastLoginTime"
label="上次登录时间"
align="center"
width="180"></el-table-column>
<el-table-column label="操作"
align="center"
width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth <el-button v-auth v-if="isRemove" type="text" @click="removeStudent(scope.row)">移除</el-button>
v-if="isRemove" <el-button v-auth type="text" @click="editStudent(scope.row, true)">查看</el-button>
type="text" <el-button v-auth type="text" @click="editStudent(scope.row, false)">编辑</el-button>
@click="removeStudent(scope.row)">移除</el-button> <el-button v-auth type="text" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-auth <el-button v-auth type="text" @click="handleDelete(scope.row)">删除</el-button>
type="text" <el-switch v-auth="'禁用'" v-model="scope.row.isEnable" :active-value="1" :inactive-value="0"
@click="editStudent(scope.row,true)">查看</el-button> style="margin: 0 5px" @change="switchOff(scope.row)"></el-switch>
<el-button v-auth
type="text"
@click="editStudent(scope.row,false)">编辑</el-button>
<el-button v-auth
type="text"
@click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-auth
type="text"
@click="handleDelete(scope.row)">删除</el-button>
<el-switch v-auth="'禁用'"
v-model="scope.row.isEnable"
:active-value="1"
:inactive-value="0"
style="margin: 0 5px"
@change="switchOff(scope.row)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
@current-change="currentChange" :total="total"></el-pagination>
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
<el-dialog class="dialog" <el-dialog class="dialog" width="60%" :title="isDetail ? '查看学生' : (isAdd ? '新增学生' : '编辑学生')"
width="60%" :visible.sync="studentVisible" :close-on-click-modal="false" @close="closeStudent">
:title="isDetail ? '查看学生' : (isAdd ? '新增学生' : '编辑学生')" <el-form ref="form" :model="form" :rules="rules" :disabled="isDetail" label-width="100px">
:visible.sync="studentVisible"
:close-on-click-modal="false"
@close="closeStudent">
<el-form ref="form"
:model="form"
:rules="rules"
:disabled="isDetail"
label-width="100px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="workNumber" <el-form-item prop="workNumber" label="学生学号">
label="学生学号"> <el-input v-model.trim="form.workNumber" placeholder="学生学号" @blur="workNumberChange"></el-input>
<el-input v-model.trim="form.workNumber"
placeholder="学生学号"
@blur="workNumberChange"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userName" <el-form-item prop="userName" label="学生姓名">
label="学生姓名"> <el-input v-model.trim="form.userName" placeholder="请输入学生姓名"></el-input>
<el-input v-model.trim="form.userName"
placeholder="请输入学生姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="roleId" <el-form-item prop="roleId" label="账号角色">
label="账号角色">
学生 学生
</el-form-item> </el-form-item>
<el-form-item prop="phone" <el-form-item prop="phone" label="手机号">
label="手机号"> <el-input v-model.trim="form.phone" placeholder="可用于登录平台,以及找回密码" maxlength="11"></el-input>
<el-input v-model.trim="form.phone"
placeholder="可用于登录平台,以及找回密码"
maxlength="11"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" <el-form-item prop="email" label="邮箱">
label="邮箱"> <el-input v-model.trim="form.email" placeholder="可用于登录平台,以及找回密码"></el-input>
<el-input v-model.trim="form.email"
placeholder="可用于登录平台,以及找回密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="uniqueIdentification" <el-form-item prop="uniqueIdentification" label="唯一标识">
label="唯一标识"> <el-input disabled v-model="form.uniqueIdentification"></el-input>
<el-input disabled
v-model="form.uniqueIdentification"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item prop="classId" <el-form-item prop="classId" label="所在班级">
label="所在班级"> <el-input placeholder="输入关键字进行过滤" v-model="filterText" style="margin-bottom: 10px">
<el-input placeholder="输入关键字进行过滤"
v-model="filterText"
style="margin-bottom: 10px">
</el-input> </el-input>
<div style="max-height: 245px; border: 1px solid #DCDFE6; border-radius: 4px; padding: 10px 10px 10px 0px; overflow: auto"> <div
<org-tree v-if="showTree && treeVisible" style="max-height: 245px; border: 1px solid #DCDFE6; border-radius: 4px; padding: 10px 10px 10px 0px; overflow: auto">
ref="classTree" <org-tree v-if="showTree && treeVisible" ref="classTree" show-checkbox node-key="id" highlight-current
show-checkbox default-expand-all lazy :load="loadClassTree" :default-checked-keys="defaultCheckedKeys"
node-key="id" :filter-node-method="filterNode"
highlight-current :props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }">
default-expand-all <span class="custom-tree-node" slot-scope="{ node, data }">
lazy
:load="loadClassTree"
:default-checked-keys="defaultCheckedKeys"
:filter-node-method="filterNode"
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span> <span style="display: inline-block; margin-right: 20px">{{ node.label }}</span>
<span> <span>
<el-button v-auth="'学生组织架构添加'" <el-button v-auth="'学生组织架构添加'" v-if="node.level < 3" type="text"
v-if="node.level < 3" icon="el-icon-circle-plus-outline" @click="() => handleAdd(node, data)">
type="text"
icon="el-icon-circle-plus-outline"
@click="() => handleAdd(node, data)">
</el-button> </el-button>
</span> </span>
</span> </span>
@ -287,55 +156,28 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer" v-if="!isDetail">
class="dialog-footer" <el-button type="primary" :disabled="disableds" @click="saveData(0)">保存</el-button>
v-if="!isDetail"> <el-button v-if="isAdd" type="primary" :disabled="disableds" @click="saveData(1)">保存并继续添加</el-button>
<el-button type="primary" <el-button size="small" @click="closeStudent">取消</el-button>
:disabled="disableds"
@click="saveData(0)">保存</el-button>
<el-button v-if="isAdd"
type="primary"
:disabled="disableds"
@click="saveData(1)">保存并继续添加</el-button>
<el-button size="small"
@click="closeStudent">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="批量导入" <el-dialog title="批量导入" :visible.sync="importVisible" width="24%" :close-on-click-modal="false">
:visible.sync="importVisible"
width="24%"
:close-on-click-modal="false">
<div style="text-align: center"> <div style="text-align: center">
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<el-button type="primary" <el-button type="primary" @click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
@click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div> </div>
<el-upload name="file" <el-upload name="file" accept=".xls,.xlsx" :on-remove="handleRemove" :on-error="uploadError"
accept=".xls,.xlsx" :on-success="uploadSuccess" :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed"
:on-remove="handleRemove" :action="this.api.importStudent" :file-list="uploadList" :headers="headers">
:on-error="uploadError" <el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.importStudent"
:file-list="uploadList"
:headers="headers">
<el-button type="primary"
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload> </el-upload>
<el-link v-if="uploadFaild" <el-link v-if="uploadFaild" type="primary" @click="showFaild">部分数据导入失败查看失败原因</el-link>
type="primary"
@click="showFaild">部分数据导入失败查看失败原因</el-link>
</div> </div>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer"> <el-button size="small" @click="importVisible = false"> </el-button>
<el-button size="small" <el-button size="small" type="primary" @click="uploadSure"> </el-button>
@click="importVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="uploadSure"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -1116,14 +958,15 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.custom-tree-node { .custom-tree-node {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
.name { .name {
display: inline-block; display: inline-block;
max-width: 160px; max-width: 160px;
margin-right: 20px; margin-right: 20px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
</style> </style>
Loading…
Cancel
Save