页面内容调整

This commit is contained in:
18571350067 2021-11-26 16:44:03 +08:00
parent 26ba23320c
commit 3c4dc139ac
5 changed files with 47 additions and 52 deletions

View File

@ -175,10 +175,8 @@ export default {
methods: { methods: {
// //
onChange(dataValue) { onChange(dataValue) {
console.log('changed', dataValue)
}, },
save() { save() {
console.log(this.form)
courseAdd(this.form).then((res) => { courseAdd(this.form).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message.info('保存成功') this.$message.info('保存成功')
@ -205,12 +203,9 @@ export default {
// //
dictionaryDropDown({dictionaryCode: '0008'}).then((res) => { dictionaryDropDown({dictionaryCode: '0008'}).then((res) => {
const tagList = res.data const tagList = res.data
console.log(tagList)
for ( let i = 0; i < tagList.length; i++) { for ( let i = 0; i < tagList.length; i++) {
console.log(tagList[i]);
tagList[i].value = tagList[i].value.toString() tagList[i].value = tagList[i].value.toString()
} }
console.log(tagList)
this.dictCourseTag = tagList this.dictCourseTag = tagList
}) })
}, },
@ -231,7 +226,6 @@ export default {
return hreader return hreader
}, },
onSuccess(file) { onSuccess(file) {
console.log('1---', file)
}, },
handleCancel() { handleCancel() {
this.previewVisible = false this.previewVisible = false
@ -252,7 +246,6 @@ export default {
// //
handleTagChange(value) { handleTagChange(value) {
console.log('value------' ,value);
this.form.tags = value; this.form.tags = value;
}, },
}, },

View File

@ -62,7 +62,6 @@ export default {
}, },
created() { created() {
this.dictionaryDropDown() this.dictionaryDropDown()
console.log('aaa', this.dictCourseTag)
}, },
methods: { methods: {
// //
@ -72,12 +71,9 @@ export default {
// //
dictionaryDropDown({ dictionaryCode: '0008' }).then((res) => { dictionaryDropDown({ dictionaryCode: '0008' }).then((res) => {
const tagList = res.data const tagList = res.data
console.log(tagList)
for (let i = 0; i < tagList.length; i++) { for (let i = 0; i < tagList.length; i++) {
console.log(tagList[i])
tagList[i].id = tagList[i].value.toString() tagList[i].id = tagList[i].value.toString()
} }
console.log(tagList)
this.queryOptions[1].options = tagList this.queryOptions[1].options = tagList
}) })
}, },

View File

@ -1,26 +1,26 @@
<template> <template>
<a-card :bordered="false" title="课件信息"> <a-card :bordered="false" title="课件信息">
<template slot="extra"> <template slot="extra">
<a-button size="small" @click="goback">返回</a-button> <a-button size="small" @click="goback">返回</a-button>
</template>
<div class="button" style="width: 100%; height: 32px; margin-bottom: 8px; margin-right: 10%;">
<!-- <a-button type="primary" @click="goback">返回</a-button> -->
<a-button type="primary" @click="coursewareAdd">上传课件</a-button>
</div>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="detail(record)">预览</a>
<a-divider type="vertical" />
<a href="javascript:;" @click="courseWare(record)">重新上传</a>
<a-divider type="vertical" />
<a-popconfirm title="是否删除?" @confirm="() => del(record)">
<a href="javascript:;">删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a href="javascript:;" @click="courseQuestion(record)">抽考题</a>
</template> </template>
<div class="button" style="width: 100%; height: 32px; margin-bottom: 8px; margin-right: 10%;"> </s-table>
<!-- <a-button type="primary" @click="goback">返回</a-button> --> </a-card>
<a-button type="primary" @click="coursewareAdd">上传课件</a-button>
</div>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="detail(record)">预览</a>
<a-divider type="vertical" />
<a href="javascript:;" @click="courseWare(record)">重新上传</a>
<a-divider type="vertical" />
<a-popconfirm title="是否删除?" @confirm="() => del(record)">
<a href="javascript:;">删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a href="javascript:;" @click="courseQuestion(record)">抽考题</a>
</template>
</s-table>
</a-card>
</template> </template>
<script> <script>
import { STable, SearchCom } from '@/components' import { STable, SearchCom } from '@/components'
@ -43,36 +43,47 @@ export default {
}, },
columns: [ columns: [
{ title: '课件名称', width: '160px', align: 'center', dataIndex: 'name', key: 'name' }, { title: '课件名称', width: '160px', align: 'center', dataIndex: 'name', key: 'name' },
{ title: '课件分类',width: '300px',align: 'center', dataIndex: 'coursewareClassifyId', key: 'coursewareClassifyId',}, {
title: '课件分类',
width: '300px',
align: 'center',
dataIndex: 'coursewareClassifyId',
key: 'coursewareClassifyId',
},
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'duration', key: 'duration' }, { title: '课时/分', width: '160px', align: 'center', dataIndex: 'duration', key: 'duration' },
{ title: '课件大小(MB)', width: '160px', align: 'center', dataIndex: 'sizeStr', key: 'sizeStr'}, { title: '课件大小(MB)', width: '160px', align: 'center', dataIndex: 'sizeStr', key: 'sizeStr' },
{ title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } }, { title: '操作', key: 'operation', width: '200px', align: 'center', scopedSlots: { customRender: 'action' } },
], ],
} }
}, },
methods: { methods: {
// //
coursewareAdd(){ coursewareAdd() {
this.$router.push({path:"/course/CoursewareAddOrUpdate",query:{courseId: this.$route.query.id}}) this.$router.push({ path: '/course/CoursewareAddOrUpdate', query: { courseId: this.$route.query.id } })
console.log('IDIDIDID',this.$route.query.id) console.log('IDIDIDID', this.$route.query.id)
}, },
// //
goback(){ goback() {
this.$router.push({path:"/course/CourseList",query:{} }) this.$router.push({ path: '/course/CourseList', query: {} })
}, },
// //
del(record){ del(record) {
deleteCourseware({id:record.id}).then(res => { deleteCourseware({ id: record.id }).then((res) => {
if(res.code == 200) this.$refs.table.refresh(true); if (res.code == 200) {
}); this.$refs.table.refresh(true)
this.$message.success('删除成功!');
} else {
this.$message.error('删除失败!');
}
})
}, },
// //
courseQuestion(record){ courseQuestion(record) {
console.log("哈哈"); console.log('哈哈')
this.$router.push({path :'/course/question/examQuestion',query:{id : record.id} }); this.$router.push({ path: '/course/question/examQuestion', query: { id: record.id } })
} },
}, },
} }
</script> </script>

View File

@ -337,7 +337,6 @@ export default {
// //
estimateV() { estimateV() {
console.log('rightAnswers', this.estimate.rightAnswers)
// //
if (!this.estimate.questionName || this.estimate.questionName === '') { if (!this.estimate.questionName || this.estimate.questionName === '') {
this.$message.error('题干不能为空!') this.$message.error('题干不能为空!')
@ -390,7 +389,6 @@ export default {
if(this.multiselect.rightAnswers.indexOf('B') > -1) this.multiselect.b = true; if(this.multiselect.rightAnswers.indexOf('B') > -1) this.multiselect.b = true;
if(this.multiselect.rightAnswers.indexOf('C') > -1) this.multiselect.c = true; if(this.multiselect.rightAnswers.indexOf('C') > -1) this.multiselect.c = true;
if(this.multiselect.rightAnswers.indexOf('D') > -1) this.multiselect.d = true; if(this.multiselect.rightAnswers.indexOf('D') > -1) this.multiselect.d = true;
console.log('1---', this.multiselect)
}, },
}, },

View File

@ -130,7 +130,6 @@ export default {
quesionId: function (i, index) { quesionId: function (i, index) {
if (this.quesitonList != null && this.quesitonList.length != 0) { if (this.quesitonList != null && this.quesitonList.length != 0) {
//ID //ID
console.log('题目!!!!', this.quesitonList.length)
this.isactive = index this.isactive = index
this.questionId = i this.questionId = i
@ -168,7 +167,6 @@ export default {
}) })
}, },
edit(record) { edit(record) {
console.log(record)
this.$router.push({ this.$router.push({
path: '/course/question/QuestionAdd', path: '/course/question/QuestionAdd',
query: { query: {
@ -227,7 +225,6 @@ export default {
this.visible = true this.visible = true
}, },
handleOk(e) { handleOk(e) {
console.log(e)
this.visible = false this.visible = false
}, },