From 47f6976255833742f904619608b7438f348eb158 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 29 Sep 2021 15:59:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/main.css | 8 +- src/assets/img/upload.png | Bin 0 -> 209 bytes src/components/Sidebar.vue | 22 +- src/components/quill/index.vue | 206 +++++ src/components/quill/options.js | 16 + src/main.js | 2 +- src/router/index.js | 29 +- src/setting.js | 34 + src/store/index.js | 20 +- src/utils/api.js | 88 ++- src/utils/core.js | 4 +- src/views/Login.vue | 28 +- src/views/course/AddCurriculum.vue | 972 +++++++++++++---------- src/views/course/AddLink.vue | 230 +++--- src/views/course/Curriculum.vue | 313 ++++---- src/views/course/assetConfig.vue | 697 +++++++++-------- src/views/course/courseconfig.vue | 1171 ++++++++++++++-------------- src/views/data/Framework.vue | 17 +- src/views/order/AddOrder.vue | 2 +- src/views/serve/Configure.vue | 185 +++-- src/views/serve/projectAdd.vue | 661 ++++++++++++++++ src/views/serve/projectList.vue | 372 +++++++++ src/views/setting/Person.vue | 1 - 23 files changed, 3355 insertions(+), 1723 deletions(-) create mode 100644 src/assets/img/upload.png create mode 100644 src/components/quill/index.vue create mode 100644 src/components/quill/options.js create mode 100644 src/setting.js create mode 100644 src/views/serve/projectAdd.vue create mode 100644 src/views/serve/projectList.vue diff --git a/src/assets/css/main.css b/src/assets/css/main.css index a453206..b5bf6d4 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -93,6 +93,10 @@ li { margin-bottom: 20px; } +.mgb10 { + margin-bottom: 10px; +} + .move-enter-active, .move-leave-active { transition: opacity .5s; @@ -226,10 +230,6 @@ li { margin-bottom: 20px; } -.mgb20 { - margin-bottom: 20px; -} - #app .el-table thead{ color: #fff; } diff --git a/src/assets/img/upload.png b/src/assets/img/upload.png new file mode 100644 index 0000000000000000000000000000000000000000..6ff9beefd44f7188055a9adf8a48a2e8f6949160 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0y_8J;eVAr}5yFZpvh28yshct7>T zjT0Bddd{vna70L_QA62P=b%te&Ve&G#CUppRJ*Q(n(wvWQ`Elv^W5LBON3P8gD#zH zerxb$f|(7snIU&V*Jbr{O}bw`91uI6|8Vts`B~=sUH;myS=byaqOF@HULAA)bY?=M zBg^VU%k3++9g}!2p|?@XqC?Tma7}WP7vrAfzSHr3dfz{*pRkbNpO$};6X-?;Pgg&e IbxsLQ0OdhZ?*IS* literal 0 HcmV?d00001 diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 4961513..180f3ad 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -70,21 +70,21 @@ export default { index: 'order', title: '订单管理' }, - // { - // icon: 'el-icon-lx-emoji', - // index: 'configure', - // title: '服务配置' - // }, - // { - // icon: 'el-icon-document-checked', - // index: 'curriculum', - // title: '课程管理' - // }, + { + icon: 'el-icon-document-checked', + index: 'curriculum', + title: '课程管理' + }, { icon: 'el-icon-notebook-2', index: 'data', title: '数据管理' - } + }, + { + icon: 'el-icon-office-building', + index: 'configure', + title: '服务配置' + }, ], onRoutes:'customer' }; diff --git a/src/components/quill/index.vue b/src/components/quill/index.vue new file mode 100644 index 0000000..953c290 --- /dev/null +++ b/src/components/quill/index.vue @@ -0,0 +1,206 @@ + + + + diff --git a/src/components/quill/options.js b/src/components/quill/options.js new file mode 100644 index 0000000..5a90edd --- /dev/null +++ b/src/components/quill/options.js @@ -0,0 +1,16 @@ +export default [ + ['bold', 'italic', 'underline', 'strike'], + ['blockquote', 'code-block'], + [{ 'header': 1 }, { 'header': 2 }], + [{ 'list': 'ordered' }, { 'list': 'bullet' }], + [{ 'script': 'sub' }, { 'script': 'super' }], + [{ 'indent': '-1' }, { 'indent': '+1' }], + [{ 'direction': 'rtl' }], + [{ 'size': ['small', false, 'large', 'huge'] }], + [{ 'header': [1, 2, 3, 4, 5, 6, false] }], + [{ 'color': [] }, { 'background': [] }], + [{ 'font': [] }], + [{ 'align': [] }], + ['clean'], + ['link', 'image', 'video'] +] \ No newline at end of file diff --git a/src/main.js b/src/main.js index 6a1dbbb..16641c5 100644 --- a/src/main.js +++ b/src/main.js @@ -40,7 +40,7 @@ Vue.prototype.encodeString = encodeString; Vue.prototype.formatDate = formatDate; Vue.config.productionTip = false; -Vue.use(ElementUI); +Vue.use(ElementUI, { size: 'small' }); diff --git a/src/router/index.js b/src/router/index.js index 12060ae..e9d0202 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,9 +3,9 @@ import Router from 'vue-router'; Vue.use(Router); -let router = new Router({ - mode: 'hash', -    base: process.env.BASE_URL, +let router = new Router({ + mode: 'hash', + base: process.env.BASE_URL, routes: [ { path: '/', @@ -62,6 +62,16 @@ let router = new Router({ component: () => import( '../views/serve/AddConfigure.vue'), meta: { title: '新增配置' } }, + { + path: '/projectList', + component: () => import( '../views/serve/projectList.vue'), + meta: { title: '项目管理' } + }, + { + path: '/projectAdd', + component: () => import( '../views/serve/projectAdd.vue'), + meta: { title: '项目配置' } + }, { path: '/curriculum', component: () => import( '../views/course/Curriculum.vue'), @@ -72,6 +82,11 @@ let router = new Router({ component: () => import( '../views/course/AddCurriculum.vue'), meta: { title: '新建课程' } }, + { + path: '/contentSettings', + component: () => import( '../views/course/courseconfig.vue'), + meta: { title: '内容设置' } + }, { path: '/addlink', component: () => import( '../views/course/AddLink.vue'), @@ -116,15 +131,15 @@ let router = new Router({ ] }); -router.beforeEach(function(to,from,next){ +router.beforeEach(function(to, from, next) { // 根据路由元信息设置文档标题 - window.document.title = to.meta.title || '中台' + window.document.title = to.meta.title || '中台'; //使用钩子函数对路由进行权限跳转 if (!sessionStorage.getItem('token') && to.path !== '/login') { next('/login'); } else { next(); } -}) +}); -export default router +export default router; diff --git a/src/setting.js b/src/setting.js new file mode 100644 index 0000000..dcf186d --- /dev/null +++ b/src/setting.js @@ -0,0 +1,34 @@ +/** + * 业务配置 + * */ +const url = location.host; +const isDev = process.env.NODE_ENV === 'development'; // 开发环境 +const isTest = url.includes('10.196.131.73'); //测试服 +const isPro = url.includes('120.78.127.12'); //正式服 + + +let jumpPath = ""; +let host = ""; +if (isDev) { + jumpPath = "http://192.168.31.154:8087/"; + // host = 'http://192.168.31.216:9000'// 榕 + host = 'http://192.168.31.125:9000'// 坤 + // host = 'http://192.168.31.137:9000'// 陈赓 +} else if (isTest) { + jumpPath = ""; + host = "http://39.108.250.202:9000"; +} else if (isPro) { + jumpPath = ""; + host = ""; +} + + +const Setting = { + /** + * 基础配置 + * */ + jumpPath, // 跳转路径前缀 + host, // 请求路径前缀 +}; + +export default Setting; diff --git a/src/store/index.js b/src/store/index.js index cf4b3bc..7ba6e50 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -14,11 +14,26 @@ const store = new Vuex.Store({ orderId: '', userLoginId: '', userName: '', - roleId: '', loginToken: '', - schoolId: '' + schoolId: '', + lastSystemId: null, + projectFields: {}, + }, + actions: { + setSystemId({ state,commit },systemId) { + commit('SET_SYSTEM_ID',systemId) + }, + setProject({ state,commit },projectFields) { + commit('SET_PROJECT',projectFields) + }, }, mutations:{ + SET_SYSTEM_ID: (state, systemId) => { + state.lastSystemId = systemId + }, + SET_PROJECT: (state, projectFields) => { + state.projectFields = projectFields + }, userAvatar(state,payload){ state.avatar = payload.avatar }, @@ -52,6 +67,7 @@ const store = new Vuex.Store({ schoolIdData (state, payload) { state.schoolId = payload.schoolId }, + } }); diff --git a/src/utils/api.js b/src/utils/api.js index d632892..08f3d51 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,15 +1,16 @@ +import Setting from '@/setting'; +// let host = Setting.host; +let uploadURL = "http://8.134.8.197:8001"; + +let host = "http://192.168.31.151:9000"; // 榕 -let host = 'http://39.108.250.202:9000' -let host1 = 'http://192.168.31.216:9000'//榕 -let host2 = 'http://192.168.31.125:9000'//林 -// let host = 'http://192.168.31.137:9000'// 陈赓 export default { - upload:`${host}/nakadai/nakadai/oss/fileUpload`,// 上传文件-订单 logins: `${host}/users/users/user/login`, //登录 verification:`${host}/users/users/user/captcha`,// 验证码图片 bindPhoneOrEmail:`${host}/users/users/userAccount/bindPhoneOrEmail`,// 绑定手机 sendPhoneOrEmailCode:`${host} /users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码 + // 订单管理 orderAdd:`${host}/nakadai/nakadai/order/add`,// 订单添加 orderDelete:`${host}/nakadai/nakadai/order/delete`,// 删除定单 @@ -54,8 +55,8 @@ export default { updatePersonCenter: `${host}/users/users/userAccount/updatePersonCenter`, updateUserAvatars: `${host}/users/users/userAccount/updateUserAvatars`, userInfo: `${host}/users/users/userAccount/userInfo`, - bindPhoneOrEmail: `${host}/users/users/userAccount/bindPhoneOrEmail`, - sendPhoneOrEmailCode: `${host}/users/users/userAccount/sendPhoneOrEmailCode`, + // bindPhoneOrEmail: `${host}/users/users/userAccount/bindPhoneOrEmail`, + // sendPhoneOrEmailCode: `${host}/users/users/userAccount/sendPhoneOrEmailCode`, updateAccountEnable: `${host}/users/users/userAccount/updateAccountEnable`, updateAccountAllEnable: `${host}/users/users/userAccount/updateAccountAllEnable`, examinePassword: `${host}/users/users/userAccount/examinePassword`, @@ -74,23 +75,78 @@ export default { queryCourseList: `${host}/liuwanr/order/queryCourseList`, //查询订单课程列表 isDeliverGoods: `${host}/liuwanr/order/isDeliverGoods`, //是否上架课程 - deleteCourse: `${host}/liuwanr/course/deleteCourse`, //删除课程 - updateCourse: `${host}/liuwanr/course/updateCourse`, //更新课程 - addCourse: `${host}/liuwanr/course/addCourse`, //添加课程 - queryCourse: `${host}/liuwanr/course/queryCourse`, //查询课程 - queryCourseDetails: `${host}/liuwanr/course/queryCourseDetails`, //查询课程详情 - isShelves: `${host}/liuwanr/course/isShelves`, //是否上架课程 - queryCourseNameIsExists: `${host}/liuwanr/course/queryCourseNameIsExists`, //查询课程名称是否存在 - + //服务配置 deleteServiceConfig: `${host}/liuwanr/serviceConfig/deleteServiceConfig`, //删除服务配置 updateServiceConfig: `${host}/liuwanr/serviceConfig/updateServiceConfig`, //更新服务配置 addServiceConfig: `${host}/liuwanr/serviceConfig/addServiceConfig`, //添加服务配置 - queryServiceConfig: `${host}/liuwanr/serviceConfig/queryServiceConfig`, //查询服务配置 queryServiceConfigDetails: `${host}/liuwanr/serviceConfig/queryServiceConfigDetails`, //查询服务配置详情 + queryServiceConfig: `${host}/nakadai/serviceConfiguration/getAllService`, //查询服务配置 + // 项目管理 + avgValues: `${host}/occupationlab/projectManage/avgValues`, // 平均分分配值 + deleteProjectManage: `${host}/occupationlab/projectManage/deleteProjectManage`, // 新增项目管理 + getProjectBySystemId: `${host}/occupationlab/projectManage/getProjectBySystemId`, // 根据系统id获取全部项目 + queryNameIsExist: `${host}/occupationlab/projectManage/queryNameIsExist`, // 新增/编辑项目管理名称判重 + queryProjectManage: `${host}/occupationlab/projectManage/queryProjectManage`, // 项目管理列表(分页、筛选) + updateIsOpen: `${host}/occupationlab/projectManage/updateIsOpen`, // 更新开启状态 + getProjectDetail: `${host}/occupationlab/projectManage/getProjectDetail`, // 根据项目id查询详情 + addProjectManage: `${host}/occupationlab/projectManage/addProjectManage`, // 新增项目管理 + updateProjectManage: `${host}/occupationlab/projectManage/updateProjectManage`, // 修改项目管理 + copyProjectManage: `${host}/occupationlab/projectManage/copyProjectManage`, // 复制项目管理 + // 判分点 + getBcJudgmentPoint: `${host}/judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页) + getLcJudgmentPoint: `${host}/judgment/lcJudgmentPoint/queryAllJudgmentPoint`, // 获取流程类判分点列表(分页) + + // 课程管理三级联查 + courseDiscipline: `${host}/nakadai/nakadai/subject/courseDiscipline`, //课程学科类别 + courseProfessionalClass: `${host}/nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类 + courseProfessional: `${host}/nakadai/nakadai/subject/courseProfessional`, //课程专业 + //课程管理 + curriculumList: `${host}/nakadai/nakadai/curriculum/curriculumList`, //课程列表 + createCurriculum: `${host}/nakadai/nakadai/curriculum/createCurriculum`, //创建课程 + curriculumDetail: `${host}/nakadai/nakadai/curriculum/curriculumDetail`, //课程详情 + modifyCourse: `${host}/nakadai/nakadai/curriculum/modifyCourse`, //编辑课程 + delCourse: `${host}/nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程 + isShelves: `${host}/nakadai/nakadai/curriculum/isShelves`, //上下架课程 + getInternalProjectBySystemId: `${host}/occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目 + // 课程章节管理 + addChapter: `${host}/nakadai/curriculum/chapter/addChapter`, //添加章节 + editChapter: `${host}/nakadai/curriculum/chapter/editChapter`, //修改章节 + deleteChapter: `${host}/nakadai/curriculum/chapter/deleteChapter`, //根据id删除章节 + queryChaptersAndSubsections: `${host}/nakadai/curriculum/chapter/queryChaptersAndSubsections`, //根据课程id查询章节小节,树状结构 + reorder: `${host}/nakadai/curriculum/chapter/reorder`, //编辑排序 + // 课程小节管理 + addSubsection: `${host}/nakadai/curriculum/subsection/addSubsection`, //添加小节 + deleteSubsection: `${host}/nakadai/curriculum/subsection/deleteSubsection`, //根据id删除小节 + editSubsection: `${host}/nakadai/curriculum/subsection/editSubsection`, //修改小节 + getSubsection: `${host}/nakadai/curriculum/subsection/getSubsection`, //根据小节id获取预览文件地址 + + + // 阿里云文件/视频管理 + fileDeletion: `${host}/nakadai/nakadai/oss/fileDeletion`, // 删除OSS文件 + fileupload: `${host}/nakadai/nakadai/oss/fileUpload`, // 文件上传 + getPlayAuth: `${host}/nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证 + + queryProvince: `${host}/nakadai/nakadai/province/queryProvince`, //查询省份 queryCity: `${host}/nakadai/nakadai/city/queryCity`, //查询城市 + + + + + + + + + + + + + + + + queryCourseDiscipline: `${host}/nakadai/nakadai/discipline/queryDiscipline`, //查询课程学科 queryCourseProfessionalClass: `${host}/nakadai/nakadai/professionalClass/queryProfessionalClass`, //查询专业类 queryCourseProfessional: `${host}/nakadai/nakadai/professional/queryProfessional`, //查询专业 diff --git a/src/utils/core.js b/src/utils/core.js index 60aee5c..78af05f 100644 --- a/src/utils/core.js +++ b/src/utils/core.js @@ -66,8 +66,8 @@ function systemAttributionStatus (sts) { function courseTypeStatus (sts) { const status = { - '1': '实训课程', - '2': '理论课程' + '0': '实训课程', + '1': '理论课程' } return status[sts] || '未知状态' } diff --git a/src/views/Login.vue b/src/views/Login.vue index 1691d6a..4cb85d6 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -32,7 +32,7 @@ @keyup.enter.native="submitForm()" > - +
@@ -62,7 +62,7 @@ @keyup.enter.native="submitForm('phone')" > - +
@@ -308,7 +308,7 @@ export default { top: 50px; transform: translate(-50%,0); } -.ms-login { +/deep/ .ms-login { position: relative; width: 1200px; height: calc(92vh - 60px); @@ -316,6 +316,20 @@ export default { background-image: url(../assets/img/login-input.png); box-shadow:0px 0px 79px 0px rgba(11,15,65,0.36); overflow: hidden; + .el-input__inner { + height: 80px; + line-height: 80px; + border: 1px solid rgba(220, 220, 220, 1); + border-radius: 2px; + } + .verification{ + position: absolute; + top: 1px; + right: 1px; + width: 160px; + height: 78px; + cursor: pointer; + } } .title{ font-size: 16px; @@ -389,13 +403,7 @@ img{ width:80px; margin-right: 30px; } -.verification{ - position: absolute; - top: 1px; - right: 1px; - width: 160px; - height: 78px; -} + .el-menu-demo{ display: flex; justify-content: space-between; diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue index 193584d..bf90810 100644 --- a/src/views/course/AddCurriculum.vue +++ b/src/views/course/AddCurriculum.vue @@ -7,10 +7,12 @@
返回 - +
- 确定 -
+ 确定 + +
@@ -23,103 +25,143 @@
- - + + - - - + + + - + :disabled="form.professionalCategoryId ? false : true"> + - + - - - + + + + - - - - + + + - - - - + + + + - - + + + +
+ +

上传封面

+
+ +
+

只能上传jpg/png文件

+

课程封面图将按2:1显示,最佳分辨率1400*700

+
+
+
+ + - - + +
+

练习配置
- +
+ 批量移除 + +
- - - - - - - - + + + + + + - +
+
@@ -127,440 +169,544 @@

考核配置
- +
+ 批量移除 + +
- - - - - - - - + + + + + + - +
- - - - - - - - -
-
-

- 应用列表 -
-
- -
+ + + + +
+
+

+ 应用列表
- - - - - - - - - - - - - - - 取 消 - 确 定 - - - - -
-
-

- 应用列表 -
-
- -
+
+
- - - - - - - - - - - - - - - 取 消 - 确 定 +
+ + + + + + + + + + + + + + + + + 取 消 + 确 定 -
- +
- \ No newline at end of file diff --git a/src/views/course/Curriculum.vue b/src/views/course/Curriculum.vue index 19c401f..f1d0db3 100644 --- a/src/views/course/Curriculum.vue +++ b/src/views/course/Curriculum.vue @@ -12,42 +12,55 @@ - - + + - - + + - - + + - - - + + + + - +
- + @@ -59,47 +72,49 @@ 课程列表
- 新建课程 - 批量删除 + 新建课程 + 批量删除
- - - - - - - + + + + + + - - - - + + + @@ -109,183 +124,169 @@ diff --git a/src/views/course/assetConfig.vue b/src/views/course/assetConfig.vue index 7357b46..5b5d92c 100644 --- a/src/views/course/assetConfig.vue +++ b/src/views/course/assetConfig.vue @@ -15,20 +15,28 @@ - +
-
{{chapter.name}}
+
{{ chapter.name }}
@@ -38,7 +46,7 @@ @@ -46,19 +54,25 @@
- + @@ -70,7 +84,8 @@ - + + > 上传资源 @@ -99,7 +114,8 @@ - +
-
+
- +
- +
-
+
- +
- + \ No newline at end of file diff --git a/src/views/data/Framework.vue b/src/views/data/Framework.vue index 8de18fc..eee9105 100644 --- a/src/views/data/Framework.vue +++ b/src/views/data/Framework.vue @@ -60,7 +60,22 @@
- + + +
diff --git a/src/views/order/AddOrder.vue b/src/views/order/AddOrder.vue index c85f844..312dbc3 100644 --- a/src/views/order/AddOrder.vue +++ b/src/views/order/AddOrder.vue @@ -340,7 +340,7 @@ :before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" - :action="api.upload" + :action="api.fileupload" :file-list="uploadList" > 上传 diff --git a/src/views/serve/Configure.vue b/src/views/serve/Configure.vue index 940d5aa..f1a434d 100644 --- a/src/views/serve/Configure.vue +++ b/src/views/serve/Configure.vue @@ -13,27 +13,32 @@
- - + + - - + +
- +
-
+
@@ -47,13 +52,21 @@ - - - + + + - + + - + + + @@ -82,96 +98,113 @@ diff --git a/src/views/serve/projectAdd.vue b/src/views/serve/projectAdd.vue new file mode 100644 index 0000000..7074f55 --- /dev/null +++ b/src/views/serve/projectAdd.vue @@ -0,0 +1,661 @@ + + + + + \ No newline at end of file diff --git a/src/views/serve/projectList.vue b/src/views/serve/projectList.vue new file mode 100644 index 0000000..4789da3 --- /dev/null +++ b/src/views/serve/projectList.vue @@ -0,0 +1,372 @@ + + + + + \ No newline at end of file diff --git a/src/views/setting/Person.vue b/src/views/setting/Person.vue index 6f5ee1a..68eff3b 100644 --- a/src/views/setting/Person.vue +++ b/src/views/setting/Person.vue @@ -432,7 +432,6 @@ export default { label: '中国' } ], - form: {}, occupationList: [{ value: 1, label: '学生'