课程方向

master
lion 4 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: [], //
}

@ -8,72 +8,72 @@
<div>
<div>
<el-input v-model="select.name" placeholder="请输入姓名"></el-input>
</div>
<xy-selectors style="width:auto" @reset="resetSelect" @search="select.page=1,getList()">
<template v-slot:selected>
<div class="selected-wrap">
<div>
<el-input v-model="select.mobile" placeholder="请输入手机号"></el-input>
</div>
<div style="width:200px">
<el-select v-model="typeSelect" placeholder="请选择个人荣誉" @change="(e)=>{changeSelectType(e,'type')}" multiple collapse-tags clearable>
<el-option v-for="item in formSelect.type" :key="item.id" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select
style="width:100%" v-model="educationType"
@change="(e)=>{changeSelectType(e,'education')}" multiple collapse-tags placeholder="请选择学历" clearable>
<el-option v-for="item in formSelect.education" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-input v-model="select.company_name" placeholder="请输入公司名称"></el-input>
</div>
<div>
<el-input v-model="select.company_position" placeholder="请输入职务"></el-input>
</div>
<div style="width:200px">
<el-select style="width:100%" v-model="companyArea"
multiple collapse-tags
@change="(e)=>{changeSelectType(e,'company_area')}"
placeholder="请选择所属区域" clearable>
<el-option v-for="item in formSelect.company_area" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div style="width:250px">
<el-select style="width:100%" v-model="companyType"
@change="(e)=>{changeSelectType(e,'company_type')}" multiple collapse-tags
placeholder="请选择企业资质" clearable>
</div>
<xy-selectors style="width:auto" @reset="resetSelect" @search="select.page=1,getList()">
<template v-slot:selected>
<div class="selected-wrap">
<div>
<el-input v-model="select.mobile" placeholder="请输入手机号"></el-input>
</div>
<div style="width:200px">
<el-select v-model="typeSelect" placeholder="请选择个人荣誉" @change="(e)=>{changeSelectType(e,'type')}" multiple collapse-tags clearable>
<el-option v-for="item in formSelect.type" :key="item.id" :label="item.value" :value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-select
style="width:100%" v-model="educationType"
@change="(e)=>{changeSelectType(e,'education')}" multiple collapse-tags placeholder="请选择学历" clearable>
<el-option v-for="item in formSelect.education" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div>
<el-input v-model="select.company_name" placeholder="请输入公司名称"></el-input>
</div>
<div>
<el-input v-model="select.company_position" placeholder="请输入职务"></el-input>
</div>
<div style="width:200px">
<el-select style="width:100%" v-model="companyArea"
multiple collapse-tags
@change="(e)=>{changeSelectType(e,'company_area')}"
placeholder="请选择所属区域" clearable>
<el-option v-for="item in formSelect.company_area" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</div>
<div style="width:250px">
<el-select style="width:100%" v-model="companyType"
@change="(e)=>{changeSelectType(e,'company_type')}" multiple collapse-tags
placeholder="请选择企业资质" clearable>
<el-option v-for="(item,index) in formSelect.company_type" :key="index" :label="item"
:value="item">
</el-option>
</el-select>
</div>
<div style="width:250px">
<el-select style="width:100%" v-model="companyIndustry" multiple collapse-tags
@change="(e)=>{changeSelectType(e,'company_industry')}" placeholder="请选择所属领域" clearable>
<el-option v-for="item in formSelect.company_industry" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
<!-- <el-option v-for="item in formSelect.company_industry_detail" :key="item.id" :label="item.value"
:value="item.value">
</el-option> -->
</el-select>
</div>
</div>
</template>
</el-option>
</el-select>
</div>
<div style="width:250px">
<el-select style="width:100%" v-model="companyIndustry" multiple collapse-tags
@change="(e)=>{changeSelectType(e,'company_industry')}" placeholder="请选择所属领域" clearable>
<el-option v-for="item in formSelect.company_industry" :key="item.id" :label="item.value"
:value="item.value">
</el-option>
<!-- <el-option v-for="item in formSelect.company_industry_detail" :key="item.id" :label="item.value"
:value="item.value">
</el-option> -->
</el-select>
</div>
</div>
</template>
</xy-selectors>
<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="importTable"></el-button>
<el-button type="primary" size="small" @click="exportExcel"></el-button>
@ -94,13 +94,13 @@
<div>课程体系{{subjectObj.leibie}}</div>
</div>
<xy-table :list="list" :total="total" :showIndex="false" @pageIndexChange="pageIndexChange"
@pageSizeChange="pageSizeChange" :table-item="table_item">
<template v-slot:index>
<el-table-column align='center' fixed="left" label="" width="50" header-align="center">
<template slot-scope="scope">
{{getIndex(scope.$index)}}
</template>
</el-table-column>
@pageSizeChange="pageSizeChange" :table-item="table_item">
<template v-slot:index>
<el-table-column align='center' fixed="left" label="" width="50" header-align="center">
<template slot-scope="scope">
{{getIndex(scope.$index)}}
</template>
</el-table-column>
</template>
<template v-slot:status>
<el-table-column align='center' label="状态" width="120" header-align="center">
@ -117,9 +117,9 @@
<el-button type="primary" v-if="scope.row.status===1 " size="small"
@click="showDetail('setPosition',scope.row)">设置班委</el-button>
<el-button type="primary" size="small" @click="editSign('editor',scope.row)"></el-button>
<el-button type="primary" size="small" @click="showDetail('checkshow',scope.row)"></el-button>
<el-popconfirm style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
<el-button type="primary" size="small" @click="showDetail('checkshow',scope.row)"></el-button>
<el-popconfirm style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</template>
</el-table-column>
@ -139,15 +139,15 @@
import myMixins from "@/mixin/selectMixin.js";
import formMixin from "@/mixin/formMixin.js";
import {
index,
index,
destroy
} from '@/api/apply/index.js'
import {
download
} from "@/utils/downloadRequest";
import imports from "@/views/component/imports.vue"
import {
index as formIndex
import imports from "@/views/component/imports.vue"
import {
index as formIndex
} from "@/api/course/form";
export default {
mixins: [myMixins, formMixin],
@ -158,11 +158,11 @@
},
data() {
return {
subjectObj: {},
companyType: [],
typeSelect: [],
educationType:[],
companyIndustry:[],
subjectObj: {},
companyType: [],
typeSelect: [],
educationType:[],
companyIndustry:[],
companyArea:[],
select: {
name: '',
@ -173,12 +173,12 @@
company_area: '',
company_type: '',
company_industry: '',
education: '',
education: '',
type:'',
status: '',
apply_status: '',
page: 1,
page_size: 10,
page_size: 10,
is_fee:''
},
list: [],
@ -252,12 +252,12 @@
label: '报名时间',
align: 'center',
width: 180,
}, {
prop: 'user.plate',
label: '车牌号',
align: 'left',
width: 180,
}, {
prop: 'user.plate',
label: '车牌号',
align: 'left',
width: 180,
},{
prop: 'status',
label: '审核状态',
@ -268,23 +268,23 @@
}
},
mounted() {
this.subjectObj = this.$route.query
if(this.$route.query.is_fee==0){
this.select.is_fee = ''
}else{
this.select.is_fee = 1
}
this.select.course_id = this.subjectObj.id
this.subjectObj = this.$route.query
if(this.$route.query.is_fee==0){
this.select.is_fee = ''
}else{
this.select.is_fee = 1
}
this.select.course_id = this.subjectObj.id
this.getAutoForm()
this.getList()
},
methods: {
changeSelectType(e, selectName) {
if (e) {
this.select[selectName] = e.join(",")
} else {
this.select[selectName] = ''
}
methods: {
changeSelectType(e, selectName) {
if (e) {
this.select[selectName] = e.join(",")
} else {
this.select[selectName] = ''
}
},
pageIndexChange(e) {
this.select.page = e
@ -294,29 +294,29 @@
this.select.page_size = e
this.select.page = 1
this.getList()
},
getIndex(e){
let perSize = (this.select.page -1 ) * this.select.page_size
let index = perSize + e + 1
return index
},
resetSelect(){
this.companyType = []
this.typeSelect = []
this.educationType=[]
this.companyIndustry=[]
this.companyArea=[]
this.select.name = ''
this.select.mobile = ''
this.select.company_name = ''
this.select.company_position = ''
this.select.company_area = ''
this.select.company_type = ''
this.select.company_industry = ''
this.select.education = ''
this.select.type = ''
this.select.page=1
this.getList()
},
getIndex(e){
let perSize = (this.select.page -1 ) * this.select.page_size
let index = perSize + e + 1
return index
},
resetSelect(){
this.companyType = []
this.typeSelect = []
this.educationType=[]
this.companyIndustry=[]
this.companyArea=[]
this.select.name = ''
this.select.mobile = ''
this.select.company_name = ''
this.select.company_position = ''
this.select.company_area = ''
this.select.company_type = ''
this.select.company_industry = ''
this.select.education = ''
this.select.type = ''
this.select.page=1
this.getList()
},
async getList() {
const res = await index({
@ -329,8 +329,8 @@
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
education: this.select.education,
type:this.select.type,
education: this.select.education,
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
},
@ -357,40 +358,40 @@
},
importTable(row) {
this.$refs.imports.show()
},
//
async getAutoForm(){
const res = await formIndex({
page:1,
page_size:999,
sort_name: 'sort',
sort_type: 'ASC',
filter: [{
key: 'course_id',
op: 'eq',
value: this.select.course_id
}],
})
this.formList = res.data
},
//
editSign(type, row) {
this.$refs.editSign.type = type
this.$refs.editSign.row = row
this.$refs.editSign.formList = this.formList
this.$refs.editSign.isShow = true
},
deleteList(id) {
var that = this;
destroy({
id: id,
}).then(response => {
this.$Message.success('删除成功');
this.getList()
}).catch(error => {
console.log(error)
reject(error)
})
},
//
async getAutoForm(){
const res = await formIndex({
page:1,
page_size:999,
sort_name: 'sort',
sort_type: 'ASC',
filter: [{
key: 'course_id',
op: 'eq',
value: this.select.course_id
}],
})
this.formList = res.data
},
//
editSign(type, row) {
this.$refs.editSign.type = type
this.$refs.editSign.row = row
this.$refs.editSign.formList = this.formList
this.$refs.editSign.isShow = true
},
deleteList(id) {
var that = this;
destroy({
id: id,
}).then(response => {
this.$Message.success('删除成功');
this.getList()
}).catch(error => {
console.log(error)
reject(error)
})
},
exportExcel() {
let _export = {}
@ -415,7 +416,7 @@
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
education: this.select.education,
education: this.select.education,
type:this.select.type,
export_fields: _export,
filter: [{
@ -477,4 +478,4 @@
}
}
</style>
</style>

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

Loading…
Cancel
Save