Commit 0d2b602c authored by 张伯涛's avatar 张伯涛

Merge remote-tracking branch 'origin/1.0' into 1.0

parents b9a969b6 6a1992d9
import request from '@/utils/request'
import Qs from 'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询试卷表列表
export function listTeaExamExaminationPaper(query) {
return request({
url: '/teaexamexaminationpaper/queryTeaExamExaminationPaperByPagination',
method: 'get',
params: query
})
}
// 2. 查询试卷表详细信息
export function getTeaExamExaminationPaper(businessId) {
return request({
url: '/teaexamexaminationpaper/detail/' + businessId,
method: 'get'
})
}
// 3. 新增试卷表
export function addTeaExamExaminationPaper(data) {
data = Qs.stringify(data)
return request({
url: '/teaexamexaminationpaper/add',
method: 'post',
data: data
})
}
// 4. 修改试卷表
export function updateTeaExamExaminationPaper(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/teaexamexaminationpaper/update/' + businessId,
method: 'put',
data
})
}
// 5. 逻辑删除试卷表
export function delTeaExamExaminationPaper(businessId) {
return request({
url: '/teaexamexaminationpaper/deleteLogical/' + businessId,
method: 'delete'
})
}
// 6. 导出试卷表
export function exportTeaExamExaminationPaper(query) {
return request({
url: '/teaexamexaminationpaper/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
import request from '@/utils/request'
import Qs from 'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询试题表列表
export function listTeaExamQuestions(query) {
return request({
url: '/teaexamquestions/queryTeaExamQuestionsByPagination',
method: 'get',
params: query
})
}
// 2. 查询试题表详细信息
export function getTeaExamQuestions(businessId) {
return request({
url: '/teaexamquestions/detail/' + businessId,
method: 'get'
})
}
// 3. 新增试题表
export function addTeaExamQuestions(data) {
data = Qs.stringify(data)
return request({
url: '/teaexamquestions/add',
method: 'post',
data: data
})
}
// 4. 修改试题表
export function updateTeaExamQuestions(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/teaexamquestions/update/' + businessId,
method: 'put',
data
})
}
// 5. 逻辑删除试题表
export function delTeaExamQuestions(businessId) {
return request({
url: '/teaexamquestions/deleteLogical/' + businessId,
method: 'delete'
})
}
// 6. 导出试题表
export function exportTeaExamQuestions(query) {
return request({
url: '/teaexamquestions/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -248,6 +248,7 @@ export default {
res.rows.forEach(item => {
item.srclist = []
item.srclist.push(this.imagePath + item.path)
console.log(item.srclist)
})
_this.tableData = res.rows
_this.fullscreenLoading = false
......
......@@ -272,6 +272,7 @@ export default {
})
} else {
// 新增
form.flag = '1'
addCmsProject(form).then(res => {
if (res.code === 200) {
this.$message({
......
......@@ -55,7 +55,7 @@
<div style="padding:5px 10px">
<el-table class="table" v-loading="loading" border :data="cmsContestList">
<el-table-column type="index" label="序号" width="60" align="center"/>
<el-table-column label="封面" prop="contestPicture" :show-overflow-tooltip="true" width="150">
<el-table-column label="封面" prop="contestPicture" width="150">
<template slot-scope="scope">
<div :id="step(scope.$index)" class="img">
<el-image @click="handleClickStop(scope.$index)" style="width:100px;height:100%;" :src="imagePath+scope.row.url" :preview-src-list="[imagePath+scope.row.url]"/>
......
......@@ -98,9 +98,11 @@
</el-row>
<el-row>
<el-col :span="18" >
<el-col :span="18">
<el-form-item label="新闻内容:" prop="remarks">
<div class="ql-editor">
<vue-editor id="editorsay" v-model="form.details" :editor-toolbar="customToolbar" @image-added="handleImageAdded" />
</div>
</el-form-item>
</el-col>
......@@ -314,6 +316,7 @@ export default {
})
} else {
// 新增
form.flag = '1'
addSysContentNewsInformation(form).then(res => {
if (res.code === 200) {
this.$message({
......
......@@ -280,7 +280,7 @@
:class="commonField.updateClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleExamination(scope.$index)"
@click="handleExamination(scope.row)"
>考试管理</el-button>
<el-button
:class="commonField.updateClass"
......@@ -622,6 +622,7 @@ export default {
obj.id = i + 1
obj.tcode = pages[i].code
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')
......@@ -762,9 +763,14 @@ export default {
}
},
// 跳转考试管理
handleExamination(index) {
handleExamination(data) {
console.log('data', data)
this.$router.push({
path: '/courseInformation/examinationManagement/index'
path: '/courseInformation/examinationManagement/index',
query: {
bussinessId: data.bussinessId,
name: data.tlessonName
}
})
},
// 下载模板
......
......@@ -2,9 +2,9 @@
<template>
<div class="app-container">
<!-- 标题-->
<div class="examinationTitle">大数据平台核心技术</div>
<div class="examinationTitle">{{ name }}</div>
<el-tabs v-model="activeName">
<el-tabs v-model="activeName" @tab-click="tabClick">
<el-tab-pane label="试题管理" name="ExaminationPaper" />
<el-tab-pane label="试卷管理" name="QuestionManagement" />
</el-tabs>
......@@ -23,14 +23,29 @@ export default {
ExaminationPaper,
QuestionManagement
},
// 向子组件QuestionManagement传递参数bussinessId
data() {
return {
activeName: 'ExaminationPaper' // 标签默认选中
activeName: 'ExaminationPaper', // 标签默认选中
bussinessId: '', // 业务id
name: '' // 课程名称
}
},
created() {
// 接受路由传递的参数
this.bussinessId = this.$route.query.bussinessId
this.name = this.$route.query.name
console.log(this.bussinessId, this.name)
},
methods: {
tabClick() {
// 在tab切换时更新bussinessId
if (this.activeName === 'ExaminationPaper') {
this.bussinessId = '123' // 传递给ExaminationPaper组件的业务id值
} else if (this.activeName === 'QuestionManagement') {
this.bussinessId = '456' // 传递给QuestionManagement组件的业务id值
}
}
}
}
</script>
......
......@@ -6,7 +6,7 @@
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="填写人">
<el-input v-model="queryParams.unit" placeholder="请输入填写人" clearable />
<el-input v-model="queryParams.answerName" placeholder="请输入填写人" clearable />
</el-form-item>
<!-- 状态-->
<el-form-item label="状态">
......@@ -56,17 +56,17 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column prop="studentName" label="填写人" show-overflow-tooltip />
<el-table-column prop="examDate" label="填写时间" />
<el-table-column prop="status" label="状态">
<el-table-column prop="answerName" label="填写人" show-overflow-tooltip />
<el-table-column prop="fillingTime" label="填写时间" />
<el-table-column prop="flag" label="状态">
<template slot-scope="scope">
{{ statusChange(scope.row.status) }}
{{ statusChange(scope.row.flag) }}
</template>
</el-table-column>
<!-- 得分-->
<el-table-column prop="score" label="得分">
<template slot-scope="scope">
<span v-if="scope.row.status === '1'">{{ scope.row.score }}</span>
<span v-if="scope.row.flag === '0'">{{ scope.row.score }}</span>
<span v-else>-</span>
</template>
</el-table-column>
......@@ -163,6 +163,7 @@
import commonField from '@/utils/commonField'
import { updateProjectStatus, delCmsProject, listCmsProject } from '@/api/contentManagement/cmsProject'
import { parseTime } from '@/utils'
import { listTeaExamExaminationPaper } from '@/api/examination/teaExamExaminationPaper'
export default {
name: 'QuestionManagement',
data() {
......@@ -353,33 +354,31 @@ export default {
return '困难'
}
},
// loadData() {
// // 列表渲染数据
// var data = []
// const _this = this
// this.tableData = []
// _this.fullscreenLoading = true
// const params = {
// page: _this.queryParams.page,
// rows: _this.queryParams.rows,
// title: _this.queryParams.title,
// unit: _this.queryParams.unit
// }
// listCmsProject(params).then(res => {
// var pages = res.rows// 查询过来的每页数据
// _this.total = res.total// 总记录数
// _this.bussid = []
// res.rows.forEach(item => {
// item.srclist = []
// item.srclist.push(item.path)
// })
// _this.tableData = res.rows
// _this.fullscreenLoading = false
// if (res.rows.length === 0) {
// _this.tableDataTips = '暂无数据'
// }
// })
// },
loadData() {
// 列表渲染数据
var data = []
const _this = this
this.tableData = []
_this.fullscreenLoading = true
const params = {
page: _this.queryParams.page,
rows: _this.queryParams.rows
}
listTeaExamExaminationPaper(params).then(res => {
var pages = res.rows// 查询过来的每页数据
_this.total = res.total// 总记录数
_this.bussid = []
res.rows.forEach(item => {
item.srclist = []
item.srclist.push(item.path)
})
_this.tableData = res.rows
_this.fullscreenLoading = false
if (res.rows.length === 0) {
_this.tableDataTips = '暂无数据'
}
})
},
// 修改状态
// handleStatusChange(row) {
// const text = row.flag === '1' ? '启用' : '停用'
......
......@@ -110,7 +110,7 @@
<!-- <span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" class-name="small-padding fixed-width" width="200px">
<el-table-column label="操作" class-name="small-padding fixed-width" width="130px">
<template slot-scope="scope">
<el-button
:class="commonField.updateClass"
......
......@@ -51,13 +51,11 @@
<div class="mb12 font-small-bold">讲师信息表列表</div>
<el-table v-loading="loading" border :data="cmsLecturerList">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column label="头像" prop="avatarId" :show-overflow-tooltip="true" width="150">
<el-table-column label="头像" prop="avatarId" width="150">
<template slot-scope="scope">
<div :id="step(scope.$index)" class="img">
<!-- <el-image @click="handleClickStop(scope.$index)" style="width:100px;height:100%;" :src="imagePath+scope.row.avatarUrl" :preview-src-list="[imagePath+scope.row.avatarUrl]"/>-->
<el-avatar fit="fill" :size="30"
:src="imagePath+scope.row.avatarUrl"
></el-avatar>
<el-image @click="handleClickStop(scope.$index)" fit="fill" class="self-avatar" :src="imagePath+scope.row.avatarUrl" :preview-src-list="[imagePath+scope.row.avatarUrl]"/>
</div>
</template>
</el-table-column>
......@@ -97,7 +95,7 @@
<!-- <span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" class-name="small-padding fixed-width" width="170px">
<el-table-column label="操作" class-name="small-padding fixed-width" width="130px">
<template slot-scope="scope">
<el-button
:class="commonField.updateClass"
......@@ -125,7 +123,7 @@
@pagination="getList"
/>
<!-- 添加或修改讲师信息表配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="750px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="90px">
<el-form-item label="姓名" prop="name">
<el-input v-model.trim="form.name" placeholder="请输入讲师姓名"/>
......@@ -447,7 +445,11 @@ export default {
//margin: 10px;
//text-align: center!important;
}
.self-avatar{
width: 30px;
height: 30px;
border-radius: 50%;
}
.placeholder {
height: 1.3vh;
......@@ -483,4 +485,5 @@ export default {
height: 178px;
display: block;
}
</style>
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