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 @@
-
数据拉取区
+ 新建日历事件
@@ -35,27 +35,30 @@
{{ date.getDate() }}
+ @click.stop="showEvent(ev)">
+
+ {{ev.title}} +
-
当月事件列表
- +

当月事件列表

+ -
{{ ev.title }} - {{ typeText(ev.className) }} - {{ ev.start | formatDateTime }} ~ {{ ev.end | formatDateTime }} - - {{ ev.location }} - 到期后:{{ expireText(ev.expire) }} + {{ typeText(ev.type) }} + {{ ev.start_time | formatDateTime }} ~ {{ ev.end_time | formatDateTime }} + +
- 编辑 + 编辑
@@ -126,7 +129,8 @@ addCalendar }, data() { - return { + return { + list:[], dataType: 'course', dataId: '', dataList: [], @@ -180,6 +184,7 @@ const res = await index({ month:this.selectMonth }) + this.list = res }, onTypeChange() { @@ -213,7 +218,8 @@ } }, openCreateModal(type,id) { - if(id){ + console.log("type",type,id) + if(type == 'editor'){ this.$refs.addCalendar.id = id } this.$refs.addCalendar.type = type @@ -260,8 +266,8 @@ }, eventsForDate(date) { const d = new Date(date); - return this.events.filter(ev => { - const evDate = new Date(ev.start); + return this.list.filter(ev => { + const evDate = new Date(ev.start_time); return evDate.getFullYear() === d.getFullYear() && evDate.getMonth() === d.getMonth() && evDate .getDate() === d.getDate(); }); @@ -275,10 +281,9 @@ }, typeText(className) { if (!className) return ''; - const t = className.replace('event-', ''); - if (t === 'course') return '课程'; - if (t === 'activity') return '活动'; - if (t === 'workshop') return '移动课堂'; + if (className === 1) return '课程'; + if (className === 3) return '自定义事件'; + if (className === 4) return '资讯'; return t; }, expireText(val) { diff --git a/src/views/config/classFiles.vue b/src/views/config/classFiles.vue new file mode 100644 index 0000000..2af20e7 --- /dev/null +++ b/src/views/config/classFiles.vue @@ -0,0 +1,212 @@ + + + + + diff --git a/src/views/course/components/addClass.vue b/src/views/course/components/addClass.vue index db73ad9..eaa15f3 100644 --- a/src/views/course/components/addClass.vue +++ b/src/views/course/components/addClass.vue @@ -48,7 +48,7 @@ 暂无课件 - +