课程方向

master
lion 9 months ago
parent cd137688e9
commit 2d99b62097

@ -2,13 +2,13 @@
ENV='development'
# 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_UPLOAD_API = https://wx.sstbc.com/api/admin/upload-file
VUE_APP_BASE_API = https://wx.sstbc.com
VUE_APP_UPLOAD_API = https://wx.sstbc.com/api/admin/upload-file

@ -13,8 +13,8 @@
</el-select>
</div>
<div>
<el-select 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-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="item">
</el-option>
</el-select>
</div>
@ -73,8 +73,8 @@
index
} from '@/api/course/courseContent.js'
import {
getparameteritem
} from "@/api/system/dictionary.js"
companyConfig
} from "@/api/student/schoolmateCompany.js"
export default {
components: {
},
@ -84,7 +84,7 @@
direction_options: [], // 课程方向选项
select: {
teacher_id: '',
direction: '', // 课程方向筛选
direction: [], // 课程方向筛选
page: 1,
page_size: 10
},
@ -157,8 +157,8 @@
this.teachers = res.data
},
async getDirectionOptions() {
const res = await getparameteritem('course_direction')
this.direction_options = res.detail
const res = await companyConfig()
this.direction_options = res.directions || []
},
pageIndexChange(e) {
this.select.page = e
@ -171,7 +171,7 @@
},
resetSelect() {
this.select.teacher_id = ''
this.select.direction = ''
this.select.direction = []
this.select.course = ''
this.select.page = 1
this.getList()
@ -181,6 +181,7 @@
page_size: this.select.page_size,
page: this.select.page,
show_relation: ['course','teacher'],
direction:this.select.direction && this.select.direction.length > 0 ? this.select.direction.join(',') : '',
filter: [{
key: 'file_ids',
op: 'notnull',
@ -189,10 +190,6 @@
key: 'teacher_id',
op: 'eq',
value: this.select.teacher_id?this.select.teacher_id:''
},{
key: 'direction',
op: 'like',
value: this.select.direction?this.select.direction:''
}]
})
this.list = res.data

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

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

@ -330,7 +330,7 @@
company_type: this.select.company_type,
company_industry: this.select.company_industry,
education: this.select.education,
type:this.select.type,
type: this.select.type,
filter: [{
key: 'course_id',
op: 'eq',
@ -339,12 +339,13 @@
key: 'status',
op: 'eq',
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.total = res.total
},

@ -37,7 +37,7 @@ module.exports = {
less: {
javascriptEnabled: true
},
sass:{
sass: {
prependData: '@import "@/styles/index.scss";'
}
}

Loading…
Cancel
Save