课程方向

master
lion 9 months ago
parent cd137688e9
commit 2d99b62097

@ -2,13 +2,13 @@
ENV='development' ENV='development'
# base api # base api
VUE_APP_PRO_API = https://suzhoukeji-test.ali251.langye.net #VUE_APP_PRO_API = https://suzhoukeji-test.ali251.langye.net
VUE_APP_BASE_API = https://suzhoukeji-test.ali251.langye.net #VUE_APP_BASE_API = https://suzhoukeji-test.ali251.langye.net
VUE_APP_UPLOAD_API = https://suzhoukeji-test.ali251.langye.net/api/admin/upload-file #VUE_APP_UPLOAD_API = https://suzhoukeji-test.ali251.langye.net/api/admin/upload-file
#VUE_APP_PRO_API = https://www.sstbc.com VUE_APP_PRO_API = https://www.sstbc.com
#VUE_APP_BASE_API = https://wx.sstbc.com VUE_APP_BASE_API = https://wx.sstbc.com
#VUE_APP_UPLOAD_API = https://wx.sstbc.com/api/admin/upload-file VUE_APP_UPLOAD_API = https://wx.sstbc.com/api/admin/upload-file

@ -13,8 +13,8 @@
</el-select> </el-select>
</div> </div>
<div> <div>
<el-select filterable v-model="select.direction" placeholder="请选择或输入课程方向" clearable style="width: 100%;"> <el-select collapse-tags multiple filterable v-model="select.direction" placeholder="请选择或输入课程方向" clearable style="width: 100%;">
<el-option v-for="(item,index) in direction_options" :key="index" :label="item.value" :value="item.id"> <el-option v-for="(item,index) in direction_options" :key="index" :label="item" :value="item">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -73,8 +73,8 @@
index index
} from '@/api/course/courseContent.js' } from '@/api/course/courseContent.js'
import { import {
getparameteritem companyConfig
} from "@/api/system/dictionary.js" } from "@/api/student/schoolmateCompany.js"
export default { export default {
components: { components: {
}, },
@ -84,7 +84,7 @@
direction_options: [], // 课程方向选项 direction_options: [], // 课程方向选项
select: { select: {
teacher_id: '', teacher_id: '',
direction: '', // 课程方向筛选 direction: [], // 课程方向筛选
page: 1, page: 1,
page_size: 10 page_size: 10
}, },
@ -157,8 +157,8 @@
this.teachers = res.data this.teachers = res.data
}, },
async getDirectionOptions() { async getDirectionOptions() {
const res = await getparameteritem('course_direction') const res = await companyConfig()
this.direction_options = res.detail this.direction_options = res.directions || []
}, },
pageIndexChange(e) { pageIndexChange(e) {
this.select.page = e this.select.page = e
@ -171,7 +171,7 @@
}, },
resetSelect() { resetSelect() {
this.select.teacher_id = '' this.select.teacher_id = ''
this.select.direction = '' this.select.direction = []
this.select.course = '' this.select.course = ''
this.select.page = 1 this.select.page = 1
this.getList() this.getList()
@ -181,6 +181,7 @@
page_size: this.select.page_size, page_size: this.select.page_size,
page: this.select.page, page: this.select.page,
show_relation: ['course','teacher'], show_relation: ['course','teacher'],
direction:this.select.direction && this.select.direction.length > 0 ? this.select.direction.join(',') : '',
filter: [{ filter: [{
key: 'file_ids', key: 'file_ids',
op: 'notnull', op: 'notnull',
@ -189,10 +190,6 @@
key: 'teacher_id', key: 'teacher_id',
op: 'eq', op: 'eq',
value: this.select.teacher_id?this.select.teacher_id:'' value: this.select.teacher_id?this.select.teacher_id:''
},{
key: 'direction',
op: 'like',
value: this.select.direction?this.select.direction:''
}] }]
}) })
this.list = res.data this.list = res.data

@ -5,10 +5,16 @@
<div ref="lxHeader"> <div ref="lxHeader">
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"> <div slot="content">
<div class="searchwrap" style="display: flex;align-items: center;"> <div class="searchwrap" style="display: flex;align-items: center; flex-wrap: wrap; gap: 10px;">
<div> <div>
<el-input v-model="select.name" placeholder="请输入授课老师姓名\方向" clearable @clear="select.page=1,getList()"></el-input> <el-input v-model="select.name" placeholder="请输入授课老师姓名\方向" clearable @clear="select.page=1,getList()"></el-input>
</div> </div>
<div>
<el-select collapse-tags multiple v-model="select.direction" placeholder="请选择课程方向" clearable style="width: 200px;">
<el-option v-for="(item,index) in directions" :key="index" :label="item" :value="item">
</el-option>
</el-select>
</div>
<div> <div>
<el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button> <el-button type="primary" size="small" @click="select.page=1,getList()">查询</el-button>
<el-button type="primary" size="small" @click="resetSelect">重置</el-button> <el-button type="primary" size="small" @click="resetSelect">重置</el-button>
@ -156,7 +162,8 @@
import addTeacher from './components/addTeacher.vue'; import addTeacher from './components/addTeacher.vue';
import { import {
index, index,
destroy destroy,
teacherConfig
} from "@/api/info/teachers.js" } from "@/api/info/teachers.js"
import imports from "@/views/component/imports.vue" import imports from "@/views/component/imports.vue"
import * as XLSX from "xlsx"; import * as XLSX from "xlsx";
@ -167,6 +174,9 @@
save as saveCourseContent save as saveCourseContent
} from '@/api/course/courseContent.js' } from '@/api/course/courseContent.js'
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import {
companyConfig
} from "@/api/student/schoolmateCompany.js"
export default { export default {
components: { components: {
addTeacher, addTeacher,
@ -176,10 +186,11 @@
return { return {
select: { select: {
name: '', name: '',
direction: [],
page: 1, page: 1,
page_size: 10, page_size: 10,
}, },
directions: [],
list: [], list: [],
total: 0, total: 0,
editingItem: null, editingItem: null,
@ -212,6 +223,11 @@
label: '联系方式', label: '联系方式',
align: 'center', align: 'center',
width: 180, width: 180,
}, {
prop: 'direction',
label: '课程方向',
align: 'center',
width: 180,
},{ },{
prop: 'course_contents', prop: 'course_contents',
label: '排课历史', label: '排课历史',
@ -223,6 +239,7 @@
}, },
created() { created() {
this.getList() this.getList()
this.getTeacherConfig()
}, },
methods: { methods: {
pageIndexChange(e){ pageIndexChange(e){
@ -237,6 +254,7 @@
resetSelect(){ resetSelect(){
this.select.name = '' this.select.name = ''
this.select.direction = []
this.select.page=1 this.select.page=1
this.getList() this.getList()
}, },
@ -244,7 +262,8 @@
const res = await index({ const res = await index({
page: this.select.page, page: this.select.page,
page_size: this.select.page_size, page_size: this.select.page_size,
keyword: this.select.name keyword: this.select.name,
direction: this.select.direction && this.select.direction.length > 0 ? this.select.direction.join(',') : ''
// filter: [{ // filter: [{
// key: 'name', // key: 'name',
// op: 'like', // op: 'like',
@ -255,6 +274,10 @@
this.total = res.total this.total = res.total
}, },
async getTeacherConfig() {
const res = await companyConfig()
this.directions = res.directions || []
},
async exportExcel() { async exportExcel() {
let sheetName = `授课老师${new Date().getTime().toString()}` let sheetName = `授课老师${new Date().getTime().toString()}`
const res = await index({ const res = await index({

@ -77,8 +77,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>课程方向: <span style="color: red;font-weight: bold;padding-right: 4px;"></span>课程方向:
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select multiple filterable allow-create v-model="form.direction" style="width:100%" placeholder="请选择或创建课程方向" clearable> <el-select collapse-tags multiple filterable allow-create v-model="form.direction" style="width:100%" placeholder="请选择或创建课程方向" clearable>
<el-option v-for="item in direction_options" :key="item.id" :label="item.value" :value="item.value"> <el-option v-for="(item,index) in direction_options" :key="index" :label="item" :value="item">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -180,8 +180,8 @@
import { index as teacherIndex } from "@/api/info/teachers.js"; import { index as teacherIndex } from "@/api/info/teachers.js";
import addTeacher from '@/views/config/components/addTeacher.vue' import addTeacher from '@/views/config/components/addTeacher.vue'
import { import {
getparameteritem companyConfig
} from "@/api/system/dictionary.js" } from "@/api/student/schoolmateCompany.js"
export default { export default {
mixins: [myMixins], mixins: [myMixins],
components: { components: {
@ -206,7 +206,7 @@
teacher_id: "", teacher_id: "",
teacher_introduce: '', // 授课老师简介 teacher_introduce: '', // 授课老师简介
theme: '', theme: '',
direction: '', // 课程方向 direction: [], // 课程方向
address: '', address: '',
address_detail: '', address_detail: '',
latitude: '', latitude: '',
@ -235,11 +235,9 @@
this.getAllPara() this.getAllPara()
}, },
methods: { methods: {
getAllPara() { async getAllPara() {
getparameteritem('course_direction').then(res => { const res = await companyConfig()
console.log("res", res) this.direction_options = res.directions || []
this.direction_options = res.detail
})
}, },
setTeachers(e) { setTeachers(e) {
this.teacher_options = e this.teacher_options = e
@ -468,7 +466,7 @@
latitude: '', latitude: '',
longitude: '', longitude: '',
course_id: '', // 重置课程ID字段 course_id: '', // 重置课程ID字段
direction: '', // 重置课程方向 direction: [], // 重置课程方向
remark: '', // 重置备注 remark: '', // 重置备注
files: [], // 重置课件列表 files: [], // 重置课件列表
} }

@ -339,12 +339,13 @@
key: 'status', key: 'status',
op: 'eq', op: 'eq',
value: '1' value: '1'
}, {
key: 'fee_status',
op: 'eq',
value: this.select.is_fee
}] }]
}) })
// , {
// key: 'fee_status',
// op: 'eq',
// value: this.select.is_fee
// }
this.list = res.data this.list = res.data
this.total = res.total this.total = res.total
}, },

Loading…
Cancel
Save