diff --git a/src/api/student/schoolmateCompany.js b/src/api/student/schoolmateCompany.js new file mode 100644 index 0000000..ab2e88a --- /dev/null +++ b/src/api/student/schoolmateCompany.js @@ -0,0 +1,58 @@ +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/company/index", + params, + paramsSerializer: customParamsSerializer, + isLoading + }) +} + +export function show(params, isLoading = true) { + return request({ + method: "get", + url: "/api/admin/company/show", + params, + isLoading + }) +} + + +export function save(data) { + return request({ + method: "post", + url: "/api/admin/company/save", + data + }) +} + +export function destroy(params) { + return request({ + method: "get", + url: "/api/admin/company/destroy", + params + }) +} + diff --git a/src/assets/dashboard.png b/src/assets/dashboard.png new file mode 100644 index 0000000..bf3c36d Binary files /dev/null and b/src/assets/dashboard.png differ diff --git a/src/mixin/formMixin.js b/src/mixin/formMixin.js index aea8881..be347ea 100644 --- a/src/mixin/formMixin.js +++ b/src/mixin/formMixin.js @@ -676,7 +676,9 @@ export default { }], formSelect: { // company_position: [], - company_type: [], + company_type: [], + company_tag:[], + company_scale:[], company_area: [], company_industry: [], company_industry_detail: [], @@ -694,7 +696,7 @@ export default { mounted() {}, methods: { getAllPara() { - let number = ['company_type', 'company_area', 'company_industry', 'company_industry_detail', 'type', 'education', + let number = ['company_type', 'company_area','company_tag','company_scale', 'company_industry', 'company_industry_detail', 'type', 'education', 'sign_from' ] getparameter({ diff --git a/src/router/index.js b/src/router/index.js index da2723c..0700d8f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -61,20 +61,20 @@ export const constantRoutes = [{ hidden: true }, - // { - // path: '/', - // component: Layout, - // redirect: '/dashboard', - // children: [{ - // path: 'dashboard', - // name: '系统首页', - // component: () => import('@/views/dashboard/index'), - // meta: { - // title: '系统首页', - // icon: 'dashboard' - // } - // }] - // }, + { + path: '/', + component: Layout, + redirect: '/dashboard', + children: [{ + path: 'dashboard', + name: '系统首页', + component: () => import('@/views/dashboard/index'), + meta: { + title: '系统首页', + icon: 'dashboard' + } + }] + }, { path: '/course/txl', component: Layout, diff --git a/src/views/calendar/components/addCalendar.vue b/src/views/calendar/components/addCalendar.vue index 3a4315a..6e027c4 100644 --- a/src/views/calendar/components/addCalendar.vue +++ b/src/views/calendar/components/addCalendar.vue @@ -169,16 +169,19 @@ type_options: [{ id: 1, value: '课程' - }, { - id: 2, - value: '课表' - }, { + }, + // { + // id: 2, + // value: '课表' + // }, + { id: 3, value: '自定义事件' }, { id: 4, value: '资讯' - }], + }], + course_content_options:[], course_options: [], canSelect: false, form: { @@ -236,7 +239,7 @@ this.$Message.warning("该课程暂无课表") return } - this.course_options = res.data + this.course_content_options = res.data }, saveContent(e) { this.form.content = e @@ -246,14 +249,36 @@ }, changeCourse(e) { - console.log("course", e) - if (e && e === 2) { + console.log("course", e) + // 获取课表 + if (this.form.type == 2) { this.form.course_content_id = '' this.getCourseContentList(e) + } + // 选择课程 自动填充 + if(this.form.type==1){ + this.course_options.map(item=>{ + if(item.id===e){ + this.form.title = item.name + this.form.start_time = item.start_date + this.form.end_time = item.end_date + this.form.date = item.start_date + } + }) } }, - changeCourseContent() { - + changeCourseContent(e) { + // 选择课表 自动填充 + if(this.form.type==2){ + this.course_content_options.map(item=>{ + if(item.id===e){ + this.form.title = item.theme + this.form.start_time = item.start_date + this.form.end_time = item.end_date + this.form.date = item.start_date + } + }) + } }, submit() { if (this.id) { @@ -276,8 +301,7 @@ getDetail() { show({ - id: this.id, - show_relation: ['image'] + id: this.id }).then(res => { this.form = this.base.requestToForm(res, this.form) this.showTinymce = true @@ -287,7 +311,8 @@ watch: { isShow(newVal) { if (newVal) { - if (this.type === 'editor') { + if (this.type === 'editor') { + console.log("id",this.id) this.getDetail() }else{ this.showTinymce = true diff --git a/src/views/calendar/index.vue b/src/views/calendar/index.vue index 637e572..1e81212 100644 --- a/src/views/calendar/index.vue +++ b/src/views/calendar/index.vue @@ -6,7 +6,7 @@
主题:{{ selectedCourse.theme }}
老师:{{ selectedCourse.teacher ? selectedCourse.teacher.name : '' }}