diff --git a/src/assets/css/main.css b/src/assets/css/main.css index f369883..a365a94 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -231,7 +231,7 @@ li { border-radius: 6px; box-sizing: border-box; width: 360px; - height: 180px; + /* height: 180px; */ text-align: center; cursor: pointer; position: relative; diff --git a/src/assets/img/arrow-down.png b/src/assets/img/arrow-down.png new file mode 100644 index 0000000..dc9a3a9 Binary files /dev/null and b/src/assets/img/arrow-down.png differ diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 928cc82..5747c33 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -87,6 +87,16 @@ export default { index: '/match', title: '大赛管理' }, + { + icon: 'el-icon-box', + index: '/theoreticalCourse', + title: '理论课程' + }, + { + icon: 'el-icon-box', + index: '/information', + title: '资讯管理' + }, { icon: 'el-icon-office-building', index: '/configure', diff --git a/src/directive/auth/index.js b/src/directive/auth/index.js index 1523038..4e0cd3d 100644 --- a/src/directive/auth/index.js +++ b/src/directive/auth/index.js @@ -4,23 +4,25 @@ * 用例:text 或者:text * */ import store from '@/store' +import Setting from '@/setting' export default { inserted (el, binding, vnode) { - let btnText = '' - // 如果有传值,就取传的值,否则,就取页面路由和按钮名字拼接起来 - if(binding.value){ - btnText = binding.value - }else{ - btnText = `${vnode.context.$route.path}:${el.innerText}` - } - const btnPermissions = store.state.btns - if (btnText && btnPermissions && btnPermissions.length) { - const isPermission = btnPermissions.includes(btnText) - // 如果按钮集合里没有该权限,就把该按钮给去除 - if (!isPermission) { - el.parentNode && el.parentNode.removeChild(el) - } - } + if (!Setting.dynamicRoute) return false + let btnText = '' + // 如果有传值,就取传的值,否则,就取页面路由和按钮名字拼接起来 + if(binding.value){ + btnText = binding.value + }else{ + btnText = `${vnode.context.$route.path}:${el.innerText}` + } + const btnPermissions = store.state.btns + if (btnText && btnPermissions && btnPermissions.length) { + const isPermission = btnPermissions.includes(btnText) + // 如果按钮集合里没有该权限,就把该按钮给去除 + if (!isPermission) { + el.parentNode && el.parentNode.removeChild(el) + } + } } } diff --git a/src/router/index.js b/src/router/index.js index b6b0e63..c0fedca 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -137,6 +137,36 @@ let router = new Router({ component: () => import( '../views/match/manage/noticeDetail'), // meta: { title: '数据管理' } }, + { + path: `/theoreticalCourse`, + component: () => import("../views//theoreticalCourse/list"), + meta: { title: "理论课程" } + }, + { + path: `/addTheoreticalCourse`, + component: () => import("../views//theoreticalCourse/add"), + meta: { title: "理论课程详情" } + }, + { + path: `/previewTheoreticalCourse`, + component: () => import("../views//theoreticalCourse/preview"), + meta: { title: "理论课程预览" } + }, + { + path: `/setTheoreticalCourse`, + component: () => import("../views//theoreticalCourse/contentSettings"), + meta: { title: "理论课程内容设置" } + }, + { + path: `/information`, + component: () => import("../views//information/list"), + meta: { title: "资讯管理" } + }, + { + path: `/addArticle`, + component: () => import("../views//information/addArticle"), + meta: { title: "新增文章" } + }, { path: '/system', component: () => import( '../views/system'), diff --git a/src/setting.js b/src/setting.js index 3f54fc8..8e8af79 100644 --- a/src/setting.js +++ b/src/setting.js @@ -11,7 +11,7 @@ if (isDev) { jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' - // host = 'http://192.168.31.151:9000/'// 榕 + host = 'http://192.168.31.151:9000/'// 榕 // host = 'http://192.168.31.137:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' @@ -23,6 +23,7 @@ const Setting = { * 基础配置 * */ platformId: 3, // 平台标识,1职站,2数据平台,3中台,4合伙人 + platformSource: 0, // 平台来源(0中台,1职站) jumpPath, // 判分点系统跳转路径前缀 apiBaseURL: host, // 请求路径前缀 uploadURL: isDev ? 'http://121.37.12.51/' : location.origin + '/', // 阿里云oss域名 @@ -44,7 +45,7 @@ const Setting = { isDev, isPro, // 是否使用动态路由 - dynamicRoute: true, + dynamicRoute: false, /** * @description 默认密码 */ diff --git a/src/store/index.js b/src/store/index.js index acd9371..0755484 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -23,7 +23,8 @@ const store = new Vuex.Store({ routes: [], customerPage: 1, matchPage: 1, - platformSource: 0 + platformSource: 0, + columnId: '' }, actions: { setSystemId({ state,commit },systemId) { @@ -91,6 +92,9 @@ const store = new Vuex.Store({ SET_M_SOURCE: (state, platformSource) => { state.platformSource = platformSource }, + setColumnId: (state, columnId) => { + state.columnId = columnId + }, } }); diff --git a/src/utils/api.js b/src/utils/api.js index 5add5fe..e1f9848 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -146,6 +146,37 @@ export default { editSubsection: `nakadai/nakadai/curriculum/subsection/editSubsection`, //修改小节 getSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, //根据小节id获取预览文件地址 + + // 理论课程 + delTheoreticalCourse: `occupationlab/theoreticalCourse/batchDeletion`, + findTheoreticalCourse: `occupationlab/theoreticalCourse/findById`, + listTheoreticalCourse: `occupationlab/theoreticalCourse/pageConditionalQueryCourse`, + saveTheoreticalCourse: `occupationlab/theoreticalCourse/save`, + updateTheoreticalCourse: `occupationlab/theoreticalCourse/update`, + // 理论课程分类管理 + checkRepeatClassification: `occupationlab/theoreticalCourseClassification/checkRepeat`, + delClassification: `occupationlab/theoreticalCourseClassification/delete`, + findClassification: `occupationlab/theoreticalCourseClassification/findById`, + listClassification: `occupationlab/theoreticalCourseClassification/pagingQuery`, + saveClassification: `occupationlab/theoreticalCourseClassification/save`, + updateClassification: `occupationlab/theoreticalCourseClassification/update`, + + // 栏目管理 + addColumn: `${host1}occupationlab/occupationlab/information/column/addColumn`, + deleteColumn: `${host1}occupationlab/occupationlab/information/column/deleteColumn`, + editColumn: `${host1}occupationlab/occupationlab/information/column/editColumn`, + queryAllColumns: `${host1}occupationlab/occupationlab/information/column/queryAllColumns`, + columnReorder: `${host1}occupationlab/occupationlab/information/column/reorder`, + // 内容管理 + addArticle: `${host1}occupationlab/occupationlab/information/article/addArticle`, + deleteArticles: `${host1}occupationlab/occupationlab/information/article/deleteArticles`, + editArticle: `${host1}occupationlab/occupationlab/information/article/editArticle`, + enableArticle: `${host1}occupationlab/occupationlab/information/article/enableArticle`, + getArticle: `${host1}occupationlab/occupationlab/information/article/getArticle`, + getArticles: `${host1}occupationlab/occupationlab/information/article/getArticles`, + queryArticleByCondition: `${host1}occupationlab/occupationlab/information/article/queryArticleByCondition`, + articleSort: `${host1}occupationlab/occupationlab/information/article/articleSort`, + // 阿里云文件/视频管理 fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件 fileupload: `${uploadURL}oss/manage/fileupload`, // 文件上传 diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index d1f6eb0..0845408 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -332,7 +332,7 @@ export default { } ], phone: [ - // { required: true, message: '请输入手机号', trigger: 'blur' }, + { required: true, message: '请输入手机号', trigger: 'blur' }, { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', diff --git a/src/views/information/addArticle/index.vue b/src/views/information/addArticle/index.vue new file mode 100644 index 0000000..4cebe9c --- /dev/null +++ b/src/views/information/addArticle/index.vue @@ -0,0 +1,282 @@ + + + + + \ No newline at end of file diff --git a/src/views/information/columnManage/index.vue b/src/views/information/columnManage/index.vue new file mode 100644 index 0000000..1c13f6d --- /dev/null +++ b/src/views/information/columnManage/index.vue @@ -0,0 +1,394 @@ + + + + + \ No newline at end of file diff --git a/src/views/information/contentManage/contentList.vue b/src/views/information/contentManage/contentList.vue new file mode 100644 index 0000000..cf7ee36 --- /dev/null +++ b/src/views/information/contentManage/contentList.vue @@ -0,0 +1,212 @@ + + + + + \ No newline at end of file diff --git a/src/views/information/contentManage/index.vue b/src/views/information/contentManage/index.vue new file mode 100644 index 0000000..1de12a6 --- /dev/null +++ b/src/views/information/contentManage/index.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/src/views/information/list/index.vue b/src/views/information/list/index.vue new file mode 100644 index 0000000..c83e03c --- /dev/null +++ b/src/views/information/list/index.vue @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/src/views/theoreticalCourse/add/index.vue b/src/views/theoreticalCourse/add/index.vue new file mode 100644 index 0000000..8c6f9e7 --- /dev/null +++ b/src/views/theoreticalCourse/add/index.vue @@ -0,0 +1,503 @@ + + + + + \ No newline at end of file diff --git a/src/views/theoreticalCourse/contentSettings/index.vue b/src/views/theoreticalCourse/contentSettings/index.vue new file mode 100644 index 0000000..ffc143a --- /dev/null +++ b/src/views/theoreticalCourse/contentSettings/index.vue @@ -0,0 +1,888 @@ + + + + + \ No newline at end of file diff --git a/src/views/theoreticalCourse/list/buildPlatform/index.vue b/src/views/theoreticalCourse/list/buildPlatform/index.vue new file mode 100644 index 0000000..21f791e --- /dev/null +++ b/src/views/theoreticalCourse/list/buildPlatform/index.vue @@ -0,0 +1,269 @@ + + + + + \ No newline at end of file diff --git a/src/views/theoreticalCourse/list/courseManagement/index.vue b/src/views/theoreticalCourse/list/courseManagement/index.vue new file mode 100644 index 0000000..d7638b9 --- /dev/null +++ b/src/views/theoreticalCourse/list/courseManagement/index.vue @@ -0,0 +1,269 @@ + + + + + \ No newline at end of file diff --git a/src/views/theoreticalCourse/list/index.vue b/src/views/theoreticalCourse/list/index.vue new file mode 100644 index 0000000..98e3a9d --- /dev/null +++ b/src/views/theoreticalCourse/list/index.vue @@ -0,0 +1,68 @@ + + + + + \ No newline at end of file diff --git a/src/views/theoreticalCourse/list/sortManagement/index.vue b/src/views/theoreticalCourse/list/sortManagement/index.vue new file mode 100644 index 0000000..82c6efd --- /dev/null +++ b/src/views/theoreticalCourse/list/sortManagement/index.vue @@ -0,0 +1,187 @@ + + + + + \ No newline at end of file diff --git a/src/views/theoreticalCourse/preview/index.vue b/src/views/theoreticalCourse/preview/index.vue new file mode 100644 index 0000000..e2d10ec --- /dev/null +++ b/src/views/theoreticalCourse/preview/index.vue @@ -0,0 +1,500 @@ + + + + + \ No newline at end of file