7.16日任务

dev
lion 1 year ago
parent db57d414af
commit 83e7f89731

@ -2,6 +2,6 @@
ENV='development'
# base api
VUE_APP_BASE_API=http://starter.ali251.langye.net
VUE_APP_UPLOAD_API=http://starter.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API=http://suzhoukeji-test.ali251.langye.net
VUE_APP_UPLOAD_API=http://suzhoukeji-test.ali251.langye.net/api/admin/upload-file
VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview

@ -2,6 +2,6 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = http://starter.ali251.langye.net
VUE_APP_UPLOAD_API =http://starter.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API = http://suzhoukeji-test.ali251.langye.net
VUE_APP_UPLOAD_API = http://suzhoukeji-test.ali251.langye.net/api/admin/upload-file
VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview

@ -4,6 +4,6 @@ NODE_ENV = production
ENV = 'staging'
# base api
VUE_APP_BASE_API=http://starter.ali251.langye.net
VUE_APP_UPLOAD_API=http://starter.ali251.langye.net/api/admin/upload-file
VUE_APP_BASE_API=http://suzhoukeji-test.ali251.langye.net/
VUE_APP_UPLOAD_API=http://suzhoukeji-test.ali251.langye.net/api/admin/upload-file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@ -144,7 +144,8 @@ export default {
if(form.hasOwnProperty(key) && $scopedSlots[key]){
formItems.push(
<el-form-item
prop={key}>
prop={key}
class={key}>
{eval(`{$scopedSlots.${key} ? $scopedSlots.${key}() : ''}`)}
</el-form-item>
)

@ -163,7 +163,11 @@ export default {
type: Number,
default: 220,
},
//
showIndex:{
type: Boolean,
default: true,
},
//
isPage: {
type: Boolean,
@ -862,10 +866,19 @@ export default {
["expand-change"]: this.expandChange,
}}
>
{
(this.showIndex? <el-table-column
type="index"
width="50" align="center" >
</el-table-column>:""
)
}
{this.tableFormat.map((item, index) => {
if ($scopedSlots[item.prop]) {
return $scopedSlots[item.prop](item, index);
}
return (
<af-table-column
// TODO: keysort
@ -914,6 +927,7 @@ export default {
: ""
}
>
{item.multiHd
? item.multiHd.map((item1, index1) => {
return (

@ -37,7 +37,7 @@
}
.sidebar-name-logo {
width: 120px;
height: 22px;
// height: 22px;
}
.sidebarLogoFade-enter,

@ -1,7 +1,7 @@
module.exports = {
title: '朗业基础平台',
TOKEN_KEY: 'starter_token',
title: '苏州科技商学院',
TOKEN_KEY: 'kjsxy_token',
/**
* @type {boolean} true | false
* @description Whether fix the header

@ -1,7 +1,8 @@
/* 改变主题色变量 */
$--color-primary: #0077CC;
// $--color-primary:#010296;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";
@import "~element-ui/packages/theme-chalk/src/index";

@ -11,7 +11,7 @@
transition: width 0.28s;
width: $sideBarWidth !important;
//background-color: $menuBg;
background: linear-gradient(180deg, #0284cd, #0077CC);
background: linear-gradient(to bottom, #010296, #0077CC);
box-shadow: 1px 1px 15px 0px rgba(17, 76, 157, 0.2);
height: 100%;
position: fixed;

@ -14,6 +14,7 @@ $submenuActiveBg:rgba(242, 242, 242, .4);
$sideBarWidth: 210px;
$primaryColor: #0077CC;
// $primaryColor:#010296;
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {

@ -2,3 +2,4 @@
// Here are the variables to cover, such as:
@primary-color: #0077CC;
// @primary-color:#010296;

@ -74,6 +74,9 @@ export function getRenderTable (ctx, fields, replaces) {
throw new Error("replaces参数错误,需要Map类型");
}
return fields.map((field, index) => {
console.log("fields",fields)
//
//自定义替换
if (replaces instanceof Map && replaces.get(field.field)) {
return replaces.get(field.field)
@ -232,11 +235,16 @@ export function getRenderTable (ctx, fields, replaces) {
}
}
return {
prop: field.field,
label: field.name,
width: field.width,
fixed: field.is_fixed
if(field.list_show===0){
}else{
return {
prop: field.field,
label: field.name,
width: field.width,
fixed: field.is_fixed
}
}
})
}

@ -420,7 +420,7 @@ export default {
const data = this.$refs['xyTable'].getListData();
if (data.length < 2) return;
try {
this.form.filter(i => i.list_show).forEach((i) => {
this.form.filter(i => i.list_show===1).forEach((i) => {
let maxLength = -Infinity;
let minLength = Infinity;
let numberLength = 0;

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

@ -0,0 +1,148 @@
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="请输入课程名称"></el-input>
</div>
<div>
<el-date-picker v-model="select.daterange" type="daterange" range-separator="" start-placeholder=""
end-placeholder="结束日期">
</el-date-picker>
</div>
<div>
<el-select v-model="select.type" placeholder="请选择类别" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small">查询</el-button>
</div>
</div>
</div>
</lx-header>
</div>
</div>
<div>
<xy-table :list="list" :total="total" :table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' label="操作" width="280" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editClass('add',scope.row.id)"></el-button>
<el-button type="primary" size="small">考勤</el-button>
<el-button type="primary" size="small" @click="setMain"></el-button>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<add-class ref="addClass"></add-class>
<set-main-teacher ref="setMainTeacher"></set-main-teacher>
</div>
</template>
<script>
import addClass from './components/addClass.vue';
import setMainTeacher from './components/setMainTeacher.vue';
export default {
components: {
addClass,
setMainTeacher
},
data() {
return {
select: {
name: '',
daterange: '',
type: ''
},
type_options: [{
id: 0,
value: '常规课程'
}, {
id: 1,
value: '短期课程'
}],
status_options: [{
id: 0,
value: '进行中'
}, {
id: 1,
value: '未开始'
}],
list: [{
name: '第六期高级科创人才研修班',
daterange: '2024.3.1-2024.9.1',
type: '常规课程',
status: '进行中',
status2: '已发布'
}],
total: 0,
table_item: [{
prop: 'name',
label: '课程名称',
align: 'left'
}, {
prop: 'daterange',
label: '开课日期',
align: 'center',
width: 180,
}, {
prop: 'type',
label: '类别',
align: 'center',
width: 160,
}, {
prop: 'status',
label: '课程状态',
align: 'center',
width: 180,
}, {
prop: 'main_teacher',
label: '班主任',
align: 'center',
width: 180,
}]
}
},
created() {
},
methods: {
editClass(type, id) {
this.$refs.addClass.isShow = true
},
setMain() {
this.$refs.setMainTeacher.isShow = true
},
}
}
</script>
<style lang="scss" scoped>
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>

@ -0,0 +1,264 @@
<template>
<div>
<Modal v-model="isShow" width="70" title="排课设置">
<div class="txl">
<div>课程名称第六期高级科创人才研修班</div>
<div>开课日期2024.3.1--2024.9.1</div>
<div>类别正常课程</div>
</div>
<div class="txl">
<div>班主任李老师</div>
<div>课表状态未发布</div>
</div>
<div class="txl">
<div>
<el-button @click="addColum" type="primary" size="small">新增一行</el-button>
</div>
<div>
<el-button type="primary" size="small">导入</el-button>
</div>
<div>
<el-button type="primary" size="small">发布课表</el-button>
</div>
<div>
<el-button type="primary" size="small">下载并打印课表</el-button>
</div>
</div>
<div class="schedule">
<el-table :data="scheduleData" border style="width: 100%" row-class-name="hover-row">
<el-table-column v-for="(column, index) in columns" :key="index" :prop="column.prop" :label="column.label"
:width="column.width">
<template slot-scope="scope">
<div v-if="column.type === 'time'" @click="openTime(scope.$index,scope.row[column.prop])">
{{ formatTime(scope.row[column.prop]) }}
</div>
<div class="subjectCell" v-else @click="openSubject(scope.$index,column.prop,scope.row[column.prop])">
<div v-if="formatSubject(scope.row[column.prop])" class="close"
@click.stop="delColum(scope.$index,column.prop)">X</div>
<div v-html='formatSubject(scope.row[column.prop])'></div>
</div>
</template>
</el-table-column>
<el-table-column label="操作" :width="80">
<template slot-scope="scope">
<div>
<el-button type="danger" size="small" @click="delTime(scope.$index)"></el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
<template v-slot:footer>
<el-button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit"></el-button>
<el-button plain type="primary" ghost style='margin-left:5px;margin-bottom:5px;'
@click="isShow=false">取消</el-button>
</template>
</Modal>
<!-- 时间选择 -->
<change-time ref="changeTime" @refreshTime="updateTime"></change-time>
<!-- 课时选择 -->
<change-subject ref="changeSubject" @refresh="updateSubject"></change-subject>
</div>
</template>
<script>
import changeTime from './changeTime.vue'
import changeSubject from './changeSubject.vue'
export default {
components: {
changeTime,
changeSubject
},
data() {
return {
isShow: false,
hoverRowIndex: null,
columns: [{
type: 'time',
prop: 'time',
label: '时间',
width: '120'
},
{
prop: 'monday',
label: '星期一'
},
{
prop: 'tuesday',
label: '星期二'
},
{
prop: 'wednesday',
label: '星期三'
},
{
prop: 'thursday',
label: '星期四'
},
{
prop: 'friday',
label: '星期五'
},
{
prop: 'saturday',
label: '星期六'
},
{
prop: 'sunday',
label: '星期日'
}
],
scheduleData: [{
time: ['09:00', '10:00'],
monday: {
name: 0,
name_value: '管理',
teacher: 0,
teacher_value: '王老师',
room: '会议室1'
},
tuesday: {},
wednesday: {},
thursday: {},
friday: {},
saturday: {},
sunday: {}
},
{
time: ['10:15', '11:15'],
monday: {},
tuesday: {},
wednesday: {},
thursday: {},
friday: {},
saturday: {},
sunday: {}
},
{
time: ['11:15', '13:00'],
tuesday: {},
wednesday: {},
thursday: {},
friday: {},
saturday: {},
sunday: {}
},
{
time: ['13:00', '14:00'],
tuesday: {},
wednesday: {},
thursday: {},
friday: {},
saturday: {},
sunday: {}
},
{
time: ['14:15', '15:15'],
tuesday: {},
wednesday: {},
thursday: {},
friday: {},
saturday: {},
sunday: {}
}
],
}
},
methods: {
//
addColum(index) {
const obj = {
time: [],
tuesday: {},
wednesday: {},
thursday: {},
friday: {},
saturday: {},
sunday: {}
}
this.scheduleData.push(obj)
},
//
delTime(index) {
this.scheduleData.splice(index, 1)
},
//
formatTime(val) {
if (val && val.length > 0) {
return val.join("--")
}
},
openTime(index, time) {
this.$refs.changeTime.setIndex(index, time)
this.$refs.changeTime.isShow = true
},
updateTime(e) {
this.scheduleData[e.index]['time'] = e.range
},
//
formatSubject(val) {
if (!val) {
return ''
}
if (JSON.stringify(val) === '{}') {
return ''
} else {
return `<div>${val.teacher_value}</div><div>${val.name_value}</div><div>${val.room}</div>`
}
},
openSubject(index, prop, form) {
this.$refs.changeSubject.setIndex(index, prop, form)
this.$refs.changeSubject.isShow = true
},
updateSubject(e) {
console.log("e1", e)
this.scheduleData[e.index][e.prop] = e
},
delColum(index, prop) {
this.scheduleData[index][prop] = {}
},
//
submit() {}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-table__cell {
position: relative;
}
.subjectCell {
min-height: 50px;
.close {
position: absolute;
width: 20px;
height: 20px;
background-color: #ddd;
color: #fff;
text-align: center;
line-height: 20px;
top: 5px;
right: 5px;
border-radius: 20px;
cursor: pointer
}
&>div {
text-align: center;
}
}
.txl {
display: flex;
align-items: center;
margin-bottom: 10px;
&>div {
margin-right: 10px;
}
}
</style>

@ -0,0 +1,276 @@
<template>
<div>
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" :type="'form'" :title="type === 'add' ? '新增课程' : '编辑课程'"
:form="form" :rules='rules' @submit="submit">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>课程名称
</div>
<div class="xy-table-item-content">
<el-input v-model="form.name" placeholder="请输入课程名称" clearable style="width: 300px;"></el-input>
</div>
</div>
</template>
<template v-slot:type>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>课程类别
</div>
<div class="xy-table-item-content">
<el-select v-model="form.type" placeholder="请选择类别" clearable style="width: 300px;">
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:menu>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>课程简介
</div>
<div class="xy-table-item-content">
<my-tinymce :value="form.menu"></my-tinymce>
</div>
</div>
</template>
<template v-slot:level>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>开课日期
</div>
<div class="xy-table-item-content">
<el-date-picker style="width: 300px;" v-model="form.daterange" type="daterange" range-separator=""
start-placeholder="开课日期" end-placeholder="结束日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:period>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>开课人数
</div>
<div class="xy-table-item-content">
<el-input style="width: 300px;" v-model="form.period" placeholder="请输入开课人数" clearable></el-input>
</div>
</div>
</template>
<template v-slot:end_time>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>所在班级地点
</div>
<div class="xy-table-item-content">
<el-input style="width: 300px;" v-model="form.end_time" placeholder="请输入所在班级(地点)" clearable></el-input>
</div>
</div>
</template>
<template v-slot:content>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>面向学员的企业性质
</div>
<div class="xy-table-item-content">
<el-select style="width: 300px;" v-model="form.content" placeholder="请选择" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:require>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>所属行业
</div>
<div class="xy-table-item-content">
<el-select style="width: 300px;" v-model="form.require" placeholder="请选择" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:status>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>状态
</div>
<div class="xy-table-item-content">
<el-select style="width: 300px;" v-model="form.status" placeholder="请选择" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:settings>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>课程设置
</div>
<div class="xy-table-item-content" style="flex-grow: 1;">
<el-button
type="primary"
icon="md-add"
style="margin-bottom: 10px"
@click="form.settings.push({ name: '',desc:''})"
>新增</el-button>
<xy-table
style="width: 100%"
:height="260"
:is-page="false"
:list="form.settings"
:table-item="settings_Table"
>
<template v-slot:btns>
<el-table-column
label="操作"
width="90"
header-align="center"
align="center"
>
<template v-slot:default="scope">
<el-button
size="small"
type="danger"
ghost
@click="form.settings.splice(scope.$index, 1)"
>删除</el-button>
</template>
</el-table-column>
</template>
</xy-table>
</div>
</div>
</template>
<template v-slot:footerContent>
<el-button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit"></el-button>
<el-button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></el-button>
</template>
</xy-dialog>
</div>
</template>
<script>
export default {
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
type_options: [{
id: 0,
value: '常规课程'
}, {
id: 1,
value: '短期课程'
}],
form: {
name: '',
type: '',
menu: '',
level: '',
period: '',
end_time: '',
content: '',
require: '',
status: '',
settings: [],
},
settings_Table:[{
label: "课时名称",
width: 180,
customFn: (row) => {
return ( <el-input placeholder = "请输入课时名称"
type = "text"
v-model = {
row.name
} >
</el-input>
);
},
},{
label: "课时简介",
customFn: (row) => {
return ( <el-input placeholder = "请输入课时简介"
type = "text"
v-model = {
row.desc
} >
</el-input>
);
},
},],
rules: {
}
}
},
created() {},
methods: {
clickSubmit() {
this.$refs.dialog.submit()
},
submit() {
if (this.id) {
this.form.id = this.id
}
if (this.type == 'add') {
this.form.id = ''
}
save({
table_name: 'new_plans',
...this.form
}).then(res => {
Message({
type: 'success',
message: this.type === 'add' ? '新增课程成功' : '编辑课程成功'
})
this.isShow = false
this.$emit('refresh')
})
},
getDetail() {
show({
id: this.id,
table_name: 'new_plans',
}).then(res => {
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
// this.getDetail()
}
} else {
this.id = ''
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .menu,
::v-deep .settings{
flex-basis: 100%;
}
</style>

@ -0,0 +1,161 @@
<template>
<div>
<xy-dialog ref="dialog" :width="35" :is-show.sync="isShow" :type="'form'" title="更改课程" :form="form" :rules='rules'
@submit="submit">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>课时名称
</div>
<div class="xy-table-item-content">
<el-select v-model="submitObj.name" @change="changeName" placeholder="请选择课时" clearable style="width: 300px;">
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:teacher>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>授课老师
</div>
<div class="xy-table-item-content">
<el-select v-model="submitObj.teacher" @change="changeTeacher" placeholder="请选择授课老师" clearable
style="width: 300px;">
<el-option v-for="item in teacher_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:room>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>授课教室
</div>
<div class="xy-table-item-content">
<el-input type="textarea" v-model="submitObj.room" placeholder="请选择授课教室"></el-input>
</div>
</div>
</template>
<template v-slot:footerContent>
<el-button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit"></el-button>
<el-button plain type="primary" ghost style='margin-left:5px;margin-bottom:5px;'
@click="isShow=false">取消</el-button>
</template>
</xy-dialog>
</div>
</template>
<script>
export default {
components: {
},
data() {
return {
isShow: false,
type_options: [{
id: 0,
value: '管理'
}, {
id: 1,
value: '实践'
}],
teacher_options: [{
id: 0,
value: '王老师'
}, {
id: 1,
value: '李老师'
}],
submitObj:{
name: '',
name_value: '',
teacher: '',
teacher_value: '',
room: '',
index: 0,
prop: ''
},
form: {
name: '',
teacher: '',
room: '',
},
rules: {}
}
},
created() {},
methods: {
setIndex(index, prop, form) {
this.submitObj = form
this.submitObj.prop = prop
this.submitObj.index = index
console.log("this.submitObj", this.submitObj)
},
changeTeacher(e) {
this.teacher_options.map(item => {
if (item.id === e) {
this.submitObj.teacher_value = item.value
this.submitObj.teacher = item.id
}
})
},
changeName(e) {
this.type_options.map(item => {
if (item.id === e) {
this.submitObj.name_value = item.value
this.submitObj.name = item.id
}
})
},
submit() {
if (!this.submitObj.name_value) {
this.$message({
type: 'warning',
message: '请选择课时'
})
return
}
if (!this.submitObj.teacher_value) {
this.$message({
type: 'warning',
message: '请选择授课老师'
})
return
}
if (!this.submitObj.room) {
this.$message({
type: 'warning',
message: '请输入授课教室'
})
return
}
console.log("this.form111", this.submitObj)
this.$emit("@refresh", this.submitObj)
this.isShow = false
}
},
watch: {
isShow(newVal) {
// if(!){}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .name,
::v-deep .teacher,
::v-deep .room {
flex-basis: 100%;
}
</style>

@ -0,0 +1,85 @@
<template>
<div>
<xy-dialog ref="dialog" :width="35" :is-show.sync="isShow" :type="'form'" title="时间设置" :form="form" :rules='rules'>
<template v-slot:range>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>上课时间
</div>
<div class="xy-table-item-content">
<el-time-picker @change="changeHHmm" is-range v-model="range" value-format="HH:mm" format="HH:mm"
range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围">
</el-time-picker>
</div>
</div>
</template>
<template v-slot:footerContent>
<el-button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit"></el-button>
<el-button plain type="primary" ghost style='margin-left:5px;margin-bottom:5px;'
@click="isShow=false">取消</el-button>
</template>
</xy-dialog>
</div>
</template>
<script>
export default {
components: {
},
data() {
return {
isShow: false,
index: 0,
range: [],
form: {
range: ''
},
rules: {}
}
},
created() {},
methods: {
setIndex(index, time) {
this.index = index
this.range = time
},
changeHHmm(e) {
if (e) {
this.range = e
}
},
submit() {
if (!this.range) {
this.$message({
type: 'warning',
message: '请选择上课时间'
})
return
}
this.$emit("refreshTime", {
index: this.index,
range: this.range
})
this.isShow = false
}
},
watch: {
isShow(newVal) {
// if(!){}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .menu,
::v-deep .settings {
flex-basis: 100%;
}
</style>

@ -0,0 +1,113 @@
<template>
<div>
<xy-dialog ref="dialog" :width="30" :is-show.sync="isShow" :type="'form'" title="设定班主任"
:form="form" :rules='rules' @submit="submit">
<template v-slot:name>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>班主任
</div>
<div class="xy-table-item-content">
<el-select v-model="form.type" placeholder="请选择班主任" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:footerContent>
<el-button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="submit"></el-button>
<el-button type="primary" plain style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></el-button>
</template>
</xy-dialog>
</div>
</template>
<script>
export default {
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
type_options: [{
id: 0,
value: '王老师'
}, {
id: 1,
value: '李老师'
}],
form: {
name: '',
},
rules: {
name: [{
required: true,
message: '请选择班主任'
}]
}
}
},
created() {},
methods: {
clickSubmit() {
this.$refs.dialog.submit()
},
submit() {
if (this.id) {
this.form.id = this.id
}
if (this.type == 'add') {
this.form.id = ''
}
save({
table_name: 'new_plans',
...this.form
}).then(res => {
Message({
type: 'success',
message: this.type === 'add' ? '新增班主任成功' : '编辑班主任成功'
})
this.isShow = false
this.$emit('refresh')
})
},
getDetail() {
show({
id: this.id,
table_name: 'new_plans',
}).then(res => {
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
// this.getDetail()
}
} else {
this.id = ''
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .name{
flex-basis: 100%;
}
</style>

@ -0,0 +1,100 @@
<template>
<div>
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" :type="'form'" :title="'二维码'" :form="form"
:rules='rules'>
<template v-slot:settings>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold;width:0">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style="flex-grow: 1;">
<div class="txl">
<div>
<div>课程名称第六期高级科创人才研修班</div>
<div>开课日期2024.3.1-----2024.9.1</div>
<div>类别正常课程</div>
</div>
</div>
<div class="code">
<img src="../../../assets/logo-mini.png"></img>
</div>
</div>
</div>
</template>
<template v-slot:footerContent>
<el-button type="primary" ghost style='margin-left:5px;margin-bottom:5px;' @click="isShow=false"></el-button>
</template>
</xy-dialog>
</div>
</template>
<script>
export default {
components: {
},
data() {
return {
isShow: false,
type: 'add',
id: '',
form: {
settings: '',
},
rules: {}
}
},
created() {},
methods: {
getDetail() {
show({
id: this.id,
table_name: 'new_plans',
}).then(res => {
})
}
},
watch: {
isShow(newVal) {
if (newVal) {
if (this.type === 'editor') {
// this.getDetail()
}
} else {
this.id = ''
this.$refs['dialog'].reset()
}
},
}
}
</script>
<style scoped lang="scss">
::v-deep .settings {
flex-basis: 100%;
}
.txl {
display: flex;
justify-content: center;
margin-bottom: 30px;
}
.code {
height: 300px;
text-align: center;
>img {
width: 300px;
height: 300px;
}
}
</style>

@ -0,0 +1,155 @@
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="请输入课程名称"></el-input>
</div>
<div>
<el-date-picker v-model="select.daterange" type="daterange" range-separator="" start-placeholder=""
end-placeholder="结束日期">
</el-date-picker>
</div>
<div>
<el-select v-model="select.type" placeholder="请选择类别" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.status" placeholder="请选择课程状态" clearable>
<el-option v-for="item in status_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small">查询</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="editCourse('add')"></el-button>
</div>
</div>
</div>
</lx-header>
</div>
</div>
<div>
<xy-table :list="list" :total="total" :table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' label="操作" width="320" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small">编辑</el-button>
<el-button type="danger" size="small">删除</el-button>
<el-button type="primary" size="small">通讯录</el-button>
<el-button type="primary" size="small">二维码</el-button>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<add-course ref="addCourse"></add-course>
</div>
</template>
<script>
import addCourse from './components/addCourse.vue';
export default {
components:{
addCourse
},
data() {
return {
select: {
name: '',
daterange: '',
type: ''
},
type_options: [{
id: 0,
value: '常规课程'
}, {
id: 1,
value: '短期课程'
}],
status_options: [{
id: 0,
value: '进行中'
}, {
id: 1,
value: '未开始'
}],
list: [],
total: 0,
table_item: [{
prop: 'name',
label: '课程名称',
align: 'left'
}, {
prop: 'daterange',
label: '开课日期',
align: 'center',
width: 180,
}, {
prop: 'type',
label: '类别',
align: 'center',
width: 160,
}, {
prop: 'status',
label: '发布状态',
align: 'center',
width: 180,
}]
}
},
created() {
},
methods: {
editCourse(type,id){
this.$refs.addCourse.type = type
this.$refs.addCourse.isShow = true
},
deleteList() {
var that = this;
destroy({
id: this.id,
table_name: 'new_plans'
}).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
},
}
}
</script>
<style lang="scss" scoped>
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>

@ -0,0 +1,176 @@
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="请输入课程名称"></el-input>
</div>
<div>
<el-date-picker v-model="select.daterange" type="daterange" range-separator="" start-placeholder=""
end-placeholder="结束日期">
</el-date-picker>
</div>
<div>
<el-select v-model="select.type" placeholder="请选择类别" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.status" placeholder="请选择课程状态" clearable>
<el-option v-for="item in status_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small">查询</el-button>
</div>
<div>
<el-button type="primary" size="small" @click="editCourse('add')"></el-button>
</div>
</div>
</div>
</lx-header>
</div>
</div>
<div>
<xy-table :list="list" :total="total" :table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' label="操作" width="320" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="editCourse('add',scope.row.id)"></el-button>
<el-button type="danger" size="small">删除</el-button>
<el-button type="primary" size="small" @click="toTxl"></el-button>
<el-button type="primary" size="small" @click="showQrCode"></el-button>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<add-course ref="addCourse"></add-course>
<show-code ref="showCode"></show-code>
</div>
</template>
<script>
import addCourse from './components/addCourse.vue';
import showCode from './components/showCode.vue';
export default {
components: {
addCourse,
showCode
},
data() {
return {
select: {
name: '',
daterange: '',
type: ''
},
type_options: [{
id: 0,
value: '常规课程'
}, {
id: 1,
value: '短期课程'
}],
status_options: [{
id: 0,
value: '进行中'
}, {
id: 1,
value: '未开始'
}],
list: [{
name: '第六期高级科创人才研修班',
daterange: '2024.3.1-2024.9.1',
type: '常规课程',
status: '进行中',
status2: '已发布'
}],
total: 0,
table_item: [{
prop: 'name',
label: '课程名称',
align: 'left'
}, {
prop: 'daterange',
label: '开课日期',
align: 'center',
width: 180,
}, {
prop: 'type',
label: '类别',
align: 'center',
width: 160,
}, {
prop: 'status',
label: '课程状态',
align: 'center',
width: 180,
}, {
prop: 'status2',
label: '发布状态',
align: 'center',
width: 180,
}]
}
},
created() {
},
methods: {
editCourse(type, id) {
this.$refs.addCourse.type = type
this.$refs.addCourse.isShow = true
},
showQrCode() {
this.$refs.showCode.isShow = true
},
toTxl() {
window.location.href = '/admin/#/course/txl'
},
deleteList() {
var that = this;
destroy({
id: this.id,
table_name: 'new_plans'
}).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
},
}
}
</script>
<style lang="scss" scoped>
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>

@ -0,0 +1,198 @@
<template>
<div>
<div>
<div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content" style="padding-left:0">
<div class="txl">
<div>课程名称第六期高级科创人才研修班</div>
<div>开课日期2024.3.1-----2024.9.1</div>
<div>类别正常课程</div>
</div>
<div class="searchwrap" style="display: flex;align-items: center;">
<div>
<el-input v-model="select.name" placeholder="请输入姓名"></el-input>
</div>
<div>
<el-select v-model="select.type" placeholder="请选择企业性质" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.type" placeholder="请选择所属行业" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.status" placeholder="请选择所属区域" clearable>
<el-option v-for="item in type_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.status" placeholder="请选择审核状态" clearable>
<el-option v-for="item in status_options" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-button type="primary" size="small">查询</el-button>
</div>
<div>
<el-button type="primary" size="small">导出</el-button>
</div>
</div>
</div>
</lx-header>
</div>
</div>
<div>
<xy-table :list="list" :total="total" :table-item="table_item">
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="80" header-align="center">
<template slot-scope="scope">
<el-button type="primary" size="small">查看</el-button>
</template>
</el-table-column>
</template>
</xy-table>
</div>
<add-course ref="addCourse"></add-course>
</div>
</template>
<script>
import addCourse from './components/addCourse.vue';
export default {
components:{
addCourse
},
data() {
return {
select: {
name: '',
daterange: '',
type: ''
},
type_options: [{
id: 0,
value: '常规课程'
}, {
id: 1,
value: '短期课程'
}],
status_options: [{
id: 0,
value: '未通过'
}, {
id: 1,
value: '已通过'
}],
list: [],
total: 0,
table_item: [{
prop: 'name',
label: '姓名',
align: 'center',
width:120
}, {
prop: 'compony',
label: '公司',
align: 'left',
width:200
}, {
prop: 'zw',
label: '职位',
align: 'center',
width: 160,
}, {
prop: 'mobile',
label: '联系电话',
align: 'center',
width: 180,
}, {
prop: 'type',
label: '企业性质',
align: 'center',
width: 180,
}, {
prop: 'opc',
label: '所属行业',
align: 'center',
width: 180,
}, {
prop: 'area',
label: '所属区域',
align: 'center',
width: 180,
}, {
prop: 'date',
label: '报名时间',
align: 'center',
width: 180,
},{
prop: 'status',
label: '审核状态',
align: 'center',
width: 180,
}]
}
},
created() {
},
methods: {
editCourse(type,id){
this.$refs.addCourse.type = type
this.$refs.addCourse.isShow = true
},
deleteList() {
var that = this;
destroy({
id: this.id,
table_name: 'new_plans'
}).then(response => {
this.$Message.success('操作成功');
this.isShow = false
this.$emit('refresh')
}).catch(error => {
console.log(error)
reject(error)
})
},
}
}
</script>
<style lang="scss" scoped>
.txl{
display: flex;
align-items: center;
margin-bottom:10px;
&>div{
margin-right:10px;
}
}
.searchwrap {
display: flex;
align-items: center;
&>div {
display: flex;
align-items: center;
margin-right: 10px;
span {
min-width: 70px;
}
}
}
</style>
Loading…
Cancel
Save