mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
提交修改
This commit is contained in:
@@ -24,6 +24,19 @@ const lineHeightStyle = new lineHeightAttributor("lineHeight", "line-height", {
|
||||
scope: Parchment.Scope.INLINE,
|
||||
whitelist: ["1", "1.5", "2", "3", "4"]
|
||||
});
|
||||
const toolbarOptions = [
|
||||
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
|
||||
["blockquote", "code-block"], // 引用 代码块
|
||||
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
|
||||
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||
[{ size: [false,"18px"] }], // 字体大小
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||
[{ align: [] }], // 对齐方式
|
||||
[{ lineheight: ['initial', '1', '1.5', '2', '3', '4'] }],
|
||||
["clean"], // 清除文本格式
|
||||
["link", "image"]
|
||||
]
|
||||
Quill.register({ 'formats/lineHeight': lineHeightStyle }, true)
|
||||
export default {
|
||||
name: "Editor",
|
||||
@@ -33,6 +46,10 @@ export default {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
toobar:{
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "请输入长度大于100个字符的内容",
|
||||
@@ -68,19 +85,7 @@ export default {
|
||||
},
|
||||
// 工具栏配置
|
||||
toolbar: {
|
||||
container:[
|
||||
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
|
||||
["blockquote", "code-block"], // 引用 代码块
|
||||
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
|
||||
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||
[{ size: [false,"18px"] }], // 字体大小
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||
[{ align: [] }], // 对齐方式
|
||||
[{ lineheight: ['initial', '1', '1.5', '2', '3', '4'] }],
|
||||
["clean"], // 清除文本格式
|
||||
["link", "image"] // 链接、图片、视频, "video"
|
||||
],
|
||||
container:this.toobar? toolbarOptions:[],
|
||||
handlers: {
|
||||
image: function(value) {
|
||||
if (value) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
|
||||
// }
|
||||
// let o = {
|
||||
// 'M+': new date(date).getMonth() +1,
|
||||
// 'M+': new date(date).getMonth() +1,
|
||||
// 'd+': date.getDate(),
|
||||
// 'h+': date.getHours(),
|
||||
// 'm+': date.getMinutes(),
|
||||
@@ -70,11 +70,16 @@ export function formatDate(date){
|
||||
// 秒转时分秒
|
||||
export function formatSeconds(value) {
|
||||
let result = parseInt(value)
|
||||
let h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
|
||||
let m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
|
||||
let s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
|
||||
let d= Math.floor(result / (3600*24));
|
||||
let last=Math.floor(result % (3600*24));
|
||||
let h = Math.floor(last / 3600) < 10 ? '0' + Math.floor(last / 3600) : Math.floor(last / 3600);
|
||||
let m = Math.floor((last / 60 % 60)) < 10 ? '0' + Math.floor((last / 60 % 60)) : Math.floor((last / 60 % 60));
|
||||
let s = Math.floor((last % 60)) < 10 ? '0' + Math.floor((last % 60)) : Math.floor((last % 60));
|
||||
|
||||
let res = '';
|
||||
if(d>0){
|
||||
res += `${d}天`;
|
||||
}
|
||||
if(h !== '00'){
|
||||
res += `${h}小时`;
|
||||
}
|
||||
|
||||
@@ -1,31 +1,38 @@
|
||||
<template>
|
||||
<div class="u-page">
|
||||
<div style="padding-bottom: 10px;">
|
||||
<div style="display: flex;justify-content:flex-start;">
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-select v-model="query.tsystemId" value-key="id" clearable @change="queryChangeSystem" placeholder="请选择教师体系">
|
||||
<el-option v-for="item in systemData" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 要在换一个变量与新建区别开 -->
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-select v-model="query.tlevelId" clearable value-key="id" placeholder="请选择教师级别">
|
||||
<el-option v-for="item in queryLevelData" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="请输入姓名" v-model="query.name" clearable></el-input></div>
|
||||
<div style="padding: 0px 5px;">
|
||||
<el-select v-model="query.salaryId" clearable value-key="id" placeholder="请选择发薪地">
|
||||
<el-option v-for="item in placeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:10px;padding: 0px 5px;">
|
||||
<div>
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="4">
|
||||
<el-select style="width: 100%" v-model="query.tsystemId" value-key="id" clearable @change="queryChangeSystem" placeholder="教师体系">
|
||||
<el-option v-for="item in systemData" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select style="width: 100%" v-model="query.tlevelId" clearable value-key="id" placeholder="教师级别">
|
||||
<el-option v-for="item in queryLevelData" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input style="width: 100%" placeholder="姓名" v-model="query.name" clearable></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select style="width: 100%" v-model="query.salaryId" clearable value-key="id" placeholder="发薪地">
|
||||
<el-option v-for="item in placeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button icon="el-icon-search" type="primary" @click="loadData(1)">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button>
|
||||
<el-button icon="el-icon-circle-plus-outline" type="primary" @click="openDialog">新建教师</el-button>
|
||||
<el-button icon="el-icon-folder-opened" type="primary" @click="exportsExcel">导出</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div style="margin-top:10px;padding: 0px 5px;">
|
||||
|
||||
<el-button icon="el-icon-circle-plus-outline" type="primary" @click="openDialog">新建教师</el-button>
|
||||
<el-button icon="el-icon-folder-opened" type="primary" @click="exportsExcel">导出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table ref="teacherTable" style="100%" :data="tableData" border stripe @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection"></el-table-column>
|
||||
@@ -72,7 +79,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;margin-top: 70px;">
|
||||
<div style="text-align: center;margin-top: 50px;">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@@ -84,7 +91,7 @@
|
||||
:total="count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<div style="height: 100px;"></div>
|
||||
<div style="height: 50px;"></div>
|
||||
<el-dialog :title="newOrEdit" custom-class="g-dialog" width="900px" :visible.sync="dialogVisible" :close-on-click-modal='false' >
|
||||
<el-form label-width="100px" :model="form" ref="form" :rules="rules">
|
||||
<el-form-item>
|
||||
@@ -146,8 +153,8 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<!-- <el-input v-model="form.description" clearable type="textarea" :autosize='{ minRows: 3, maxRows: 6 }'></el-input> -->
|
||||
<WxEditor v-model="form.description" :minHeight="50"></WxEditor>
|
||||
<el-input v-model="form.description" clearable type="textarea" :autosize='{ minRows: 3, maxRows: 6 }'></el-input>
|
||||
<!--<WxEditor :toobar="false" v-model="form.description" :minHeight="50"></WxEditor>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="擅长课程">
|
||||
<el-input v-model="form.courses" clearable placeholder="请输入"></el-input>
|
||||
@@ -161,7 +168,7 @@
|
||||
<el-dialog title="教师详情" :close-on-click-modal="false" :visible.sync="showTeacherDetails" width="800px">
|
||||
<teacher-details v-if="teacherDetailId != ''" :id="teacherDetailsId" :newId="teacherDetailId"></teacher-details>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleCloseOne()">取 消</el-button>
|
||||
<el-button @click="handleCloseOne()">关 闭</el-button>
|
||||
<!-- <el-button type="primary" @click="showTeacherDetails = false">确 定</el-button> -->
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
@@ -82,51 +82,29 @@
|
||||
</el-option>
|
||||
</el-select></div>
|
||||
</div>
|
||||
<el-table height="430"
|
||||
:data="records.list"
|
||||
style="width: 100%;margin-top:10px">
|
||||
<el-table-column
|
||||
prop="courseCode" width="120"
|
||||
label="班级编号">
|
||||
<el-table height="430" :data="records.list" style="width: 100%;margin-top:10px">
|
||||
<el-table-column prop="courseCode" width="120" label="班级编号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseType"
|
||||
label="类型">
|
||||
<el-table-column prop="courseType" label="类型">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.courseType == '1'">面授班</span>
|
||||
<span v-if="scope.row.courseType == '2'">训练班</span>
|
||||
<span v-if="scope.row.courseType == '0'">在线班</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseName" show-overflow-tooltip
|
||||
label="班级名称" width="180">
|
||||
<el-table-column prop="courseName" show-overflow-tooltip label="班级名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="modName" show-overflow-tooltip
|
||||
label="模块名称"
|
||||
width="100">
|
||||
<el-table-column prop="modName" show-overflow-tooltip label="模块名称" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="teachingTime"
|
||||
label="授课时长(min)" width="120">
|
||||
<el-table-column prop="teachingTime" label="授课时长(min)" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="openStartTime"
|
||||
label="开班时间" width="140">
|
||||
<el-table-column prop="openStartTime" label="开班时间" width="140">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseStatus"
|
||||
label="班级状态"
|
||||
width="100">
|
||||
<el-table-column prop="courseStatus" label="班级状态" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="teacherScore"
|
||||
label="评分">
|
||||
<el-table-column prop="teacherScore" label="评分">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="120">
|
||||
<el-table-column label="操作" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="recordsUpdate(scope.row)">修改</el-button>
|
||||
<el-button type="text" @click="recordsDel(scope.row)">删除</el-button>
|
||||
@@ -173,55 +151,30 @@
|
||||
</div> -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="未开班资源" name="fourth">
|
||||
<el-table height="430"
|
||||
:data="courseInfoList"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="courseCode"
|
||||
label="班级编号"
|
||||
width="120">
|
||||
<el-table height="430" :data="courseInfoList" style="width: 100%">
|
||||
<el-table-column prop="courseCode" label="班级编号" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="courseName" show-overflow-tooltip
|
||||
label="班级名称"
|
||||
width="200">
|
||||
<el-table-column prop="courseName" show-overflow-tooltip label="班级名称" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="modName" width="150" show-overflow-tooltip
|
||||
label="模块名称">
|
||||
<el-table-column prop="modName" width="150" show-overflow-tooltip label="模块名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="teachingTime"
|
||||
label="授课时长"
|
||||
width="100">
|
||||
<el-table-column prop="teachingTime" label="授课时长" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="openStartTime"
|
||||
label="开班时间"
|
||||
width="180">
|
||||
<el-table-column prop="openStartTime" label="开班时间" width="180">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="晋级过程" name="five">
|
||||
<el-table height="370"
|
||||
:data="precessList"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="operatorTime"
|
||||
label="变更时间"
|
||||
width="180">
|
||||
<el-table height="370" :data="precessList" style="width: 100%">
|
||||
<el-table-column prop="operatorTime" label="变更时间" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="变更方式">
|
||||
<template slot-scope="scope">
|
||||
<el-table-column prop="type" label="变更方式">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == '0'">手动</span>
|
||||
<span v-if="scope.row.type == '1'">自动</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="afterLevelName"
|
||||
label="变更结果">
|
||||
<el-table-column prop="afterLevelName" label="变更结果">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="operatorName"
|
||||
@@ -315,7 +268,7 @@ export default {
|
||||
if(this.id) {
|
||||
this.getDetail();
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
watch:{
|
||||
id(newVal){
|
||||
@@ -492,10 +445,10 @@ export default {
|
||||
//应该是自己系统的教师信息呀
|
||||
// teacherApi.detail(this.newId).then(rs=>{
|
||||
// if(rs.status==200){
|
||||
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
teacherBoeApi.teacherInfo(this.id).then(res => {
|
||||
if (res.status == 200) {
|
||||
const result = res.result;
|
||||
|
||||
Reference in New Issue
Block a user