diff --git a/src/api/course/courseType.js b/src/api/course/courseType.js new file mode 100644 index 0000000..7764452 --- /dev/null +++ b/src/api/course/courseType.js @@ -0,0 +1,64 @@ +import request from "@/utils/request"; +function customParamsSerializer(params) { + let result = ''; + for (let key in params) { + if (params.hasOwnProperty(key)) { + if (Array.isArray(params[key])) { + params[key].forEach((item,index) => { + if(item.key){ + result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`; + + }else{ + result +=`${key}[${index}]=${item}&` + } + }); + } else { + result += `${key}=${params[key]}&`; + } + } + } + return result.slice(0, -1); +} +export function index(params,isLoading = false) { + return request({ + method: "get", + url: "/api/admin/course-types/index", + params, + paramsSerializer: customParamsSerializer, + isLoading + }) +} + +export function show(params, isLoading = true) { + return request({ + method: "get", + url: "/api/admin/course-types/show", + params, + isLoading + }) +} + +export function save(data) { + return request({ + method: "post", + url: "/api/admin/course-types/save", + data + }) +} + +export function destroy(params) { + return request({ + method: "get", + url: "/api/admin/course-types/destroy", + params + }) +} + +export function contentImport(data) { + return request({ + method: "post", + url: "/api/admin/course-types/import", + data + }) +} + diff --git a/src/mixin/selectMixin.js b/src/mixin/selectMixin.js index 3ee3f94..f434c62 100644 --- a/src/mixin/selectMixin.js +++ b/src/mixin/selectMixin.js @@ -1,6 +1,13 @@ export default { data() { - return { + return { + types_status:[{ + id: 0, + value: '禁用' + }, { + id: 1, + value: '启用' + }], false_or_true: [{ id: 0, value: '否' diff --git a/src/views/course/components/addCourse.vue b/src/views/course/components/addCourse.vue index e950b5d..9170a44 100644 --- a/src/views/course/components/addCourse.vue +++ b/src/views/course/components/addCourse.vue @@ -343,7 +343,8 @@ } }) } - this.form.publicize_ids = pubFiles + this.form.publicize_ids = pubFiles + this.form.publicize = [] save({ ...this.form }).then(res => { diff --git a/src/views/course/components/addTypes.vue b/src/views/course/components/addTypes.vue new file mode 100644 index 0000000..57b01b5 --- /dev/null +++ b/src/views/course/components/addTypes.vue @@ -0,0 +1,183 @@ + + + + + diff --git a/src/views/course/history.vue b/src/views/course/history.vue index ed25ddf..c047ade 100644 --- a/src/views/course/history.vue +++ b/src/views/course/history.vue @@ -160,14 +160,13 @@ this.$refs.showCourse.type = type this.$refs.showCourse.isShow = true }, - goTxl() { + goTxl(row) { let value = '' this.course_type.map(item=>{ if(item.id==row.type){ value = item.value } }) - this.$router.push({ path: '/course/txl', query: { title: row.name, id:row.id, date: row.start_date+'至'+row.end_date,leibie:value } diff --git a/src/views/course/txl.vue b/src/views/course/txl.vue index 2312866..7549bdd 100644 --- a/src/views/course/txl.vue +++ b/src/views/course/txl.vue @@ -59,7 +59,7 @@ @@ -103,13 +103,23 @@ list: [], total: 0, table_item: [{ - prop: 'name', + prop: 'username', label: '姓名', align: 'center', width: 120 }, { + prop: 'sex', + label: '性别', + align: 'center', + width: 120 + },{ + prop: 'idcard', + label: '身份证号', + align: 'center', + width: 180 + },{ prop: 'company_name', - label: '公司', + label: '公司名称', align: 'left', }, { prop: 'company_position', @@ -121,32 +131,7 @@ label: '联系电话', align: 'center', width: 120, - }, { - prop: 'company_type', - label: '企业性质', - align: 'center', - width: 180, - }, { - prop: 'company_industry', - label: '所属行业', - align: 'center', - width: 120, - }, { - prop: 'company_area', - label: '所属区域', - align: 'center', - width: 120, - }, { - prop: 'date', - label: '报名时间', - align: 'center', - width: 180, - }, { - prop: 'status', - label: '审核状态', - align: 'center', - width: 180, - }] + },] } }, mounted() { @@ -198,7 +183,7 @@ value: this.select.company_industry }] }) - this.list = res.data + this.list = res.list.data this.total = res.total }, showDetail(type, id) { diff --git a/src/views/course/types.vue b/src/views/course/types.vue new file mode 100644 index 0000000..4a3bb43 --- /dev/null +++ b/src/views/course/types.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/src/views/student/components/detail.vue b/src/views/student/components/detail.vue index 55fb609..5f5706c 100644 --- a/src/views/student/components/detail.vue +++ b/src/views/student/components/detail.vue @@ -101,20 +101,22 @@ - + +