重置方法

This commit is contained in:
18571350067 2021-11-26 19:06:08 +08:00
parent 75c74adca2
commit 8cc943a784
2 changed files with 5 additions and 1 deletions

View File

@ -44,6 +44,7 @@ export function deleteCourse (params) {
// 查询课程列表 // 查询课程列表
export function getCourseList (params) { export function getCourseList (params) {
if(params.tag) params.tag = params.tag.toString();
return request({ return request({
url: courseApi.list, url: courseApi.list,
method: 'get', method: 'get',

View File

@ -42,7 +42,7 @@ export default {
data() { data() {
return { return {
dictCourseTag: [], dictCourseTag: [],
queryParam: { courseName: this.$route.query.courseName || '' }, queryParam: { courseName: this.$route.query.courseName || '', tag: [] },
queryOptions: [ queryOptions: [
{ type: 'input', placeholder: '课程名称', key: 'courseName' }, { type: 'input', placeholder: '课程名称', key: 'courseName' },
{ type: 'select-dic-tree', placeholder: '请选择课程类别', key: 'courseType' , options: [] }, { type: 'select-dic-tree', placeholder: '请选择课程类别', key: 'courseType' , options: [] },
@ -56,6 +56,7 @@ export default {
columns: [ columns: [
{ title: '课程编号', width: '160px', align: 'center', dataIndex: 'courseCode', key: 'courseCode' }, { title: '课程编号', width: '160px', align: 'center', dataIndex: 'courseCode', key: 'courseCode' },
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' }, { title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
{ title: '课程类别', width: 'auto', align: 'center', dataIndex: 'courseType', key: 'courseType' },
{ title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' }, { title: '课时/分', width: '160px', align: 'center', dataIndex: 'hour', key: 'hour' },
{ title: '数量', width: '160px', align: 'center', dataIndex: 'questionCount', key: 'questionCount' }, { title: '数量', width: '160px', align: 'center', dataIndex: 'questionCount', key: 'questionCount' },
{ title: '操作', key: 'operation', width: '300px', align: 'center', scopedSlots: { customRender: 'action' } }, { title: '操作', key: 'operation', width: '300px', align: 'center', scopedSlots: { customRender: 'action' } },
@ -78,6 +79,8 @@ export default {
// //
dictionaryDropDown({ dictionaryCode: '0008' }).then((res) => { dictionaryDropDown({ dictionaryCode: '0008' }).then((res) => {
this.queryOptions[2].options = res.data this.queryOptions[2].options = res.data
}) })
}, },
handleRefresh() { handleRefresh() {