diff --git a/src/api/course/courseware.js b/src/api/course/courseware.js index 7e96e62..38fa122 100644 --- a/src/api/course/courseware.js +++ b/src/api/course/courseware.js @@ -1,15 +1,10 @@ import request from '@/utils/request' const coursewareApi = { - add: '/courseManagement/xmCourseCourseware/addOrUpdate', - get: '/courseManagement/xmCourseCourseware/details', - // update: 'sys/menu/update', - del: 'courseManagement/xmCourseCourseware/delete', - // updateStatus: 'sys/menu/updateStatus', - // list: '/courseManagement/course/listPage', - // coursewareList:'/courseManagement/course/courseware/details', - // questionList:'/courseManagement/course/questionList' - classList: '/courseManagement/coursewareClassify/listPage' + add: '/courseManagement/xmCourseCourseware/addOrUpdate', + get: '/courseManagement/xmCourseCourseware/details', + del: 'courseManagement/xmCourseCourseware/delete', + classList: '/courseManagement/coursewareClassify/listPage' } @@ -17,37 +12,37 @@ const coursewareApi = { //删除课件 export function deleteCourseware(params) { - return request({ - url: coursewareApi.del, - method: 'delete', - params: params - }) + return request({ + url: coursewareApi.del, + method: 'delete', + params: params + }) } // 课件新增 export function coursewareAdd(params) { - return request({ - url: coursewareApi.add, - method: 'post', - data: params - }) + return request({ + url: coursewareApi.add, + method: 'post', + data: params + }) } // 课件分类列表 export function coursewareClassList(params) { - return request({ - url: coursewareApi.classList, - method: 'get', - params: params - }) + return request({ + url: coursewareApi.classList, + method: 'get', + params: params + }) } // 课件详情 export function coursewareDeatil(params) { - return request({ - url: coursewareApi.get, - method: 'get', - params: params - }) + return request({ + url: coursewareApi.get, + method: 'get', + params: params + }) } \ No newline at end of file diff --git a/src/api/notice/notice.js b/src/api/notice/notice.js new file mode 100644 index 0000000..3fdf13c --- /dev/null +++ b/src/api/notice/notice.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +const noticeApi = { + add: 'notice/addOrUpdate', + del: 'notice/del', + get: 'notice/get', + page: 'notice/pageList', + read: 'notice/read', + pagePerson: 'notice/pagePersonList' +} + +export function noticeAdd (params) { + return request({ + url: noticeApi.add, + method: 'post', + data: params + }) +} +export function noticeDel (params) { + return request({ + url: noticeApi.del, + method: 'post', + params: params + }) +} +export function noticeGet (params) { + return request({ + url: noticeApi.get, + method: 'get', + params: params + }) +} +export function noticePage (params) { + return request({ + url: noticeApi.page, + method: 'post', + params: {pageSize: params.pageSize, pageNum: params.pageNum}, + data: params + }) +} +export function noticeRead (params) { + return request({ + url: noticeApi.read, + method: 'get', + params: params + }) +} +export function noticePagePerson (params) { + return request({ + url: noticeApi.pagePerson, + method: 'post', + params: params + }) +} diff --git a/src/components/SearchCom/index.vue b/src/components/SearchCom/index.vue index 23ae735..962b758 100644 --- a/src/components/SearchCom/index.vue +++ b/src/components/SearchCom/index.vue @@ -73,5 +73,5 @@ export default { } - diff --git a/src/views/notice/NoticeDetail.vue b/src/views/notice/NoticeDetail.vue new file mode 100644 index 0000000..939c123 --- /dev/null +++ b/src/views/notice/NoticeDetail.vue @@ -0,0 +1,138 @@ + + + + diff --git a/src/views/notice/NoticeForm.vue b/src/views/notice/NoticeForm.vue new file mode 100644 index 0000000..ef9f619 --- /dev/null +++ b/src/views/notice/NoticeForm.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/src/views/notice/NoticeList.vue b/src/views/notice/NoticeList.vue new file mode 100644 index 0000000..725296e --- /dev/null +++ b/src/views/notice/NoticeList.vue @@ -0,0 +1,198 @@ + + + diff --git a/src/views/org/OrgTree.vue b/src/views/org/OrgTree.vue index f5d0f90..b17955d 100644 --- a/src/views/org/OrgTree.vue +++ b/src/views/org/OrgTree.vue @@ -104,7 +104,7 @@ export default { }) }, loadOrg () { - orgList().then(res => { + orgList({ orgType: 1 }).then(res => { if (!res.code === 200 || !res.data.length) { return } diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index 4e967af..5e3015a 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -12,19 +12,9 @@ 未发布 开始时间: - + 结束时间: - + 培训方式: 全部 @@ -39,28 +29,23 @@ - 新增项目 + 新增项目 - + {{ index + 1 }} @@ -79,6 +64,12 @@ export default { }, data() { return { + power: { + add: '', + del: '', + edit: '', + release: '', + }, // 查询参数 queryParam: { projectName: null, @@ -129,7 +120,7 @@ export default { { title: '操作', width: 200, - align: 'center', + align: 'right', scopedSlots: { customRender: 'action' }, }, ], @@ -147,7 +138,7 @@ export default { this.changeType() }, //生命周期 - 销毁完成 - destroyed() {}, + destroyed() { }, // 监控data中的数据变化 watch: { $route(to, from) { //to是前往的路由 from是去往的路由 同一个组件只会渲染一次 @@ -156,12 +147,17 @@ export default { }, }, methods: { - getDetail(record){ + //发布项目 + handledRelease(record){ + + }, + //编辑时获取详情 + getDetail(record) { this.$router.push({ path: '/project/detail', query: { id: record.id, //自主项目还是系统项目,控制路由跳转 - t:this.queryParam.type, + t: this.queryParam.type, projectId: record.id, //项目id projectPageNum: this.$refs.table.localPagination.current, //当前页 }, @@ -181,14 +177,23 @@ export default { //变更类型 changeType(path) { var arr = [] - if(path){ + if (path) { arr = path.split('/') - }else{ + } else { arr = this.$route.path.split('/') } - this.queryParam.type = arr[arr.length - 1] + let str = arr[arr.length - 1] + this.queryParam.type = str + //权限 + str === 'sys' ? this.power.add = 'project:sys:add' : this.power.add = 'project:add' + str === 'sys' ? this.power.del = 'project:sys:del' : this.power.del = 'project:del' + str === 'sys' ? this.power.edit = 'project:sys:edit' : this.power.edit = 'project:edit' + str === 'sys' ? this.power.release = 'project:sys:release' : this.power.release = 'project:release' }, }, } + + + diff --git a/src/views/project/form/ProjectCourseList.vue b/src/views/project/form/ProjectCourseList.vue index 6a5744f..476dd32 100644 --- a/src/views/project/form/ProjectCourseList.vue +++ b/src/views/project/form/ProjectCourseList.vue @@ -1,11 +1,5 @@