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

修改bug

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