Commit 43094e88 authored by 高宇's avatar 高宇

修改bug

parent 701e0bba
...@@ -4,7 +4,7 @@ ENV = 'development' ...@@ -4,7 +4,7 @@ ENV = 'development'
# base api # base api
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_APIS = 'http://192.168.1.46:8090/' VUE_APP_BASE_APIS = 'http://49.232.167.247:20020/teaServer'
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
...@@ -4,4 +4,4 @@ ENV = 'test' ...@@ -4,4 +4,4 @@ ENV = 'test'
# 测试环境 # 测试环境
# base api # base api
VUE_APP_BASE_API = 'http://49.232.167.247:20024/' VUE_APP_BASE_API = 'http://49.232.167.247:20024/'
VUE_APP_BASE_APIS = 'http://49.232.167.247:20024/' VUE_APP_BASE_APIS = 'http://49.232.167.247:20020/teaServer'
...@@ -66,3 +66,12 @@ export function exportCmsLecturer(query) { ...@@ -66,3 +66,12 @@ export function exportCmsLecturer(query) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 7.查询进师详情
export function listAllCmsLecturer(query) {
return request({
url: '/cmslecturer/queryCmsLecturers',
method: 'get',
params: query
})
}
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</el-form-item> </el-form-item>
<!-- 课程方案--> <!-- 课程方案-->
<el-form-item label="课程方案" prop="classPlan"> <el-form-item label="课程方案" prop="classPlan">
<el-select v-model="queryParams.classPlan" class="selectWidth" placeholder="课程方案" clearable> <el-select v-model="queryParams.classPlan" class="selectWidth" placeholder="课程方案" clearable>
<el-option <el-option
v-for="item in coursePlanOptions" v-for="item in coursePlanOptions"
:key="item.dictValue" :key="item.dictValue"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
v-for="(item,index) in teacherOptions" v-for="(item,index) in teacherOptions"
:key="index" :key="index"
:label="item.name" :label="item.name"
:value="item.bussinessId" :value="item.businessId"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -268,12 +268,10 @@ ...@@ -268,12 +268,10 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div :id="step(scope.$index)"> <div :id="step(scope.$index)">
<el-image <el-image
:src="scope.row.defaultUrl" :src="scope.row.imageSrc"
:preview-src-list="scope.row.srclist" :preview-src-list="scope.row.srclist"
style="width:100%;height:100%;" style="width:100%;height:100%;"
@click="handleClickStop(scope.$index)" @click="handleClickStop(scope.$index)"
@mouseover="justEnter($event)"
@mouseout="justOut($event)"
/> />
</div> </div>
</template> </template>
...@@ -460,8 +458,7 @@ import { ...@@ -460,8 +458,7 @@ import {
} from '@/api/courseManagement/indexApi' } from '@/api/courseManagement/indexApi'
import commonField from '@/utils/commonField' import commonField from '@/utils/commonField'
import { getDict } from '@/api/system/dict/data' import { getDict } from '@/api/system/dict/data'
import { listCmsLecturer } from '@/api/courseManagement/cmsLecturer' import { listAllCmsLecturer } from '@/api/courseManagement/cmsLecturer'
import { updateStatus } from '@/api/contentManagement/sysContentNewsInformation'
export default { export default {
name: 'Index', name: 'Index',
components: { components: {
...@@ -493,7 +490,7 @@ export default { ...@@ -493,7 +490,7 @@ export default {
setTimeout(() => { setTimeout(() => {
if (value.length > 50) { if (value.length > 50) {
callback(new Error('名称不能超过50位')) callback(new Error('名称不能超过50位'))
} else if (pattern.test(value) == false) { } else if (pattern.test(value) === false) {
callback(new Error('请不要输入特殊字符')) callback(new Error('请不要输入特殊字符'))
} else { } else {
callback() callback()
...@@ -502,7 +499,7 @@ export default { ...@@ -502,7 +499,7 @@ export default {
} }
var checkNum = (rule, value, callback) => { var checkNum = (rule, value, callback) => {
const pattern = new RegExp('^([1-9]\\d*|[0]{1,1})$') const pattern = new RegExp('^([1-9]\\d*|[0]{1,1})$')
if (pattern.test(value) == false) { if (pattern.test(value) === false) {
callback(new Error('学分只能为0或正整数')) callback(new Error('学分只能为0或正整数'))
} else { } else {
callback() callback()
...@@ -510,13 +507,14 @@ export default { ...@@ -510,13 +507,14 @@ export default {
} }
var checkTime = (rule, value, callback) => { var checkTime = (rule, value, callback) => {
const pattern = new RegExp('^([1-9]\\d*|[0]{1,1})$') const pattern = new RegExp('^([1-9]\\d*|[0]{1,1})$')
if (pattern.test(value) == false) { if (pattern.test(value) === false) {
callback(new Error('学时只能为0或正整数')) callback(new Error('学时只能为0或正整数'))
} else { } else {
callback() callback()
} }
} }
return { return {
title: '',
hasAddPerm: ['sys:lesson:add'], hasAddPerm: ['sys:lesson:add'],
hasUpdatePerm: ['sys:lesson:update'], hasUpdatePerm: ['sys:lesson:update'],
hasDetailPerm: ['sys:lesson:detail'], hasDetailPerm: ['sys:lesson:detail'],
...@@ -840,6 +838,7 @@ export default { ...@@ -840,6 +838,7 @@ export default {
teacherName: _this.queryParams.teacherName, teacherName: _this.queryParams.teacherName,
lessonPrice: _this.queryParams.lessonPrice, lessonPrice: _this.queryParams.lessonPrice,
homeDisplay: _this.queryParams.homeDisplay, homeDisplay: _this.queryParams.homeDisplay,
lessonTeaName: _this.queryParams.lessonTeaName,
flag: _this.queryParams.flag, flag: _this.queryParams.flag,
schoolQualityLesson: _this.queryParams.schoolQualityLesson, schoolQualityLesson: _this.queryParams.schoolQualityLesson,
entQualityLesson: _this.queryParams.entQualityLesson, entQualityLesson: _this.queryParams.entQualityLesson,
...@@ -849,15 +848,15 @@ export default { ...@@ -849,15 +848,15 @@ export default {
var pages = res.rows// 查询过来的每页数据 var pages = res.rows// 查询过来的每页数据
_this.total = res.total// 总记录数 _this.total = res.total// 总记录数
_this.bussid = [] _this.bussid = []
console.log('查询过来的每页数据', pages)
for (let i = 0; i < pages.length; i++) { for (let i = 0; i < pages.length; i++) {
var obj = {} var obj = {}
obj.id = i + 1 obj.id = i + 1
obj.tlessonName = pages[i].lessonName obj.tlessonName = pages[i].lessonName
obj.bussinessId = pages[i].businessId obj.bussinessId = pages[i].businessId
obj.tname = pages[i].name obj.tname = pages[i].name
obj.tsex = (pages[i].sex == '1') ? '女' : '男' obj.tsex = (pages[i].sex === '1') ? '女' : '男'
obj.imageSrc = pages[i].defaultUrl ? pages[i].defaultUrl : require('@/assets/image/test.png') obj.imageSrc = pages[i].defaultUrl && (pages[i].defaultUrl !== '/default/course.jpg') ? this.HTTPApi + pages[i].defaultUrl : require('@/assets/image/test.png')
console.log('imageSrc', obj.imageSrc)
obj.srclist = [] obj.srclist = []
obj.srclist.push(obj.imageSrc) obj.srclist.push(obj.imageSrc)
obj.directionId = pages[i].directionId obj.directionId = pages[i].directionId
...@@ -871,10 +870,8 @@ export default { ...@@ -871,10 +870,8 @@ export default {
_this.bussid.push(pages[i].businessId) _this.bussid.push(pages[i].businessId)
// obj.imageSrc = 'http://imgsrc.baidu.com/image/c0%3Dshijue1%2C0%2C0%2C294%2C40/sign=60aeee5da74bd11310c0bf7132c6ce7a/72f082025aafa40fe3c0c4f3a164034f78f0199d.jpg' // obj.imageSrc = 'http://imgsrc.baidu.com/image/c0%3Dshijue1%2C0%2C0%2C294%2C40/sign=60aeee5da74bd11310c0bf7132c6ce7a/72f082025aafa40fe3c0c4f3a164034f78f0199d.jpg'
data[i] = obj data[i] = obj
console.log('data', data)
} }
_this.tableData = pages _this.tableData = pages
console.log('tableData', _this.tableData)
_this.fullscreenLoading = false _this.fullscreenLoading = false
if (res.rows.length === 0) { if (res.rows.length === 0) {
_this.tableDataTips = '暂无数据' _this.tableDataTips = '暂无数据'
...@@ -955,12 +952,12 @@ export default { ...@@ -955,12 +952,12 @@ export default {
// 查询讲师 // 查询讲师
getTeacher() { getTeacher() {
const params = { const params = {
page: -1, flag: '1'
rows: -1
} }
listCmsLecturer(params).then(res => { listAllCmsLecturer(params).then(res => {
this.teacherOptions = res.rows console.log('res', res)
console.log('讲师', this.teacherOptions) this.teacherOptions = res.data
// console.log('讲师', this.teacherOptions)
}) })
}, },
// 新增课程 // 新增课程
...@@ -987,7 +984,7 @@ export default { ...@@ -987,7 +984,7 @@ export default {
type: type type: type
}) })
that.fullscreenLoading = false that.fullscreenLoading = false
if (type == 'success') { if (type === 'success') {
that.loadData() that.loadData()
} }
}).catch((err) => { }).catch((err) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment