数据看板等

Branch_d40a2540
yujialong 2 years ago
parent 6de1bfc0ed
commit adbef4c7ad
  1. 60
      src/api/index.js
  2. BIN
      src/assets/img/screen/full.png
  3. BIN
      src/assets/img/screen/medal.png
  4. BIN
      src/assets/img/screen/screen1.jpg
  5. BIN
      src/assets/img/screen/screen2.png
  6. BIN
      src/assets/img/screen/stat.png
  7. BIN
      src/assets/img/screen/t_1.png
  8. BIN
      src/assets/img/screen/t_2.png
  9. BIN
      src/assets/img/screen/t_3.png
  10. BIN
      src/assets/img/screen/t_4.png
  11. BIN
      src/assets/img/screen/t_5.png
  12. BIN
      src/assets/img/screen/t_7.png
  13. BIN
      src/assets/img/screen/title-bg.png
  14. BIN
      src/assets/videos/screen.mp4
  15. 10
      src/layouts/navbar/index.vue
  16. 34
      src/pages/achievement/show/index.vue
  17. 43
      src/pages/course/add/index.vue
  18. 59
      src/pages/course/contentSettings/index.vue
  19. 40
      src/pages/course/list/courseManagement/index.vue
  20. 2
      src/pages/course/list/sortManagement/index.vue
  21. 14
      src/pages/course/preview/index.vue
  22. 160
      src/pages/information/addarticle/index.vue
  23. 62
      src/pages/information/columnManage/index.vue
  24. 2
      src/pages/information/contentManage/contentList.vue
  25. 89
      src/pages/information/contentManage/index.vue
  26. 1031
      src/pages/screen/index.vue
  27. 6
      src/router/modules/screen.js
  28. 4
      src/setting.js
  29. 28
      src/styles/common.scss
  30. 429
      src/styles/page/screen.scss

@ -85,6 +85,7 @@ export default {
spliceClass: `occupationlab/occupationlab/achievement/spliceClass`, spliceClass: `occupationlab/occupationlab/achievement/spliceClass`,
exportLabReport: `occupationlab/occupationlab/achievement/exportLabReport`, exportLabReport: `occupationlab/occupationlab/achievement/exportLabReport`,
exportBankExperimentReport: `occupationlab/occupationlab/achievement/exportBankExperimentReport`, exportBankExperimentReport: `occupationlab/occupationlab/achievement/exportBankExperimentReport`,
editExperimentalData: 'occupationlab/occupationlab/experimentalReport/editExperimentalData',
// 项目管理 // 项目管理
getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统 getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统
@ -144,20 +145,20 @@ export default {
saveAnnouncementAnnex: `occupationlab/occupationlab/contestAnnouncementAnnex/save`, saveAnnouncementAnnex: `occupationlab/occupationlab/contestAnnouncementAnnex/save`,
// 栏目管理 // 栏目管理
addColumn: `${host2}occupationlab/occupationlab/information/column/addColumn`, addColumn: `occupationlab/occupationlab/information/column/addColumn`,
deleteColumn: `${host2}occupationlab/occupationlab/information/column/deleteColumn`, deleteColumn: `occupationlab/occupationlab/information/column/deleteColumn`,
editColumn: `${host2}occupationlab/occupationlab/information/column/editColumn`, editColumn: `occupationlab/occupationlab/information/column/editColumn`,
queryAllColumns: `${host2}occupationlab/occupationlab/information/column/queryAllColumns`, queryAllColumns: `occupationlab/occupationlab/information/column/queryAllColumns`,
columnReorder: `${host2}occupationlab/occupationlab/information/column/reorder`, columnReorder: `occupationlab/occupationlab/information/column/reorder`,
// 内容管理 // 内容管理
addArticle: `${host2}occupationlab/occupationlab/information/article/addArticle`, addArticle: `occupationlab/occupationlab/information/article/addArticle`,
deleteArticles: `${host2}occupationlab/occupationlab/information/article/deleteArticles`, deleteArticles: `occupationlab/occupationlab/information/article/deleteArticles`,
editArticle: `${host2}occupationlab/occupationlab/information/article/editArticle`, editArticle: `occupationlab/occupationlab/information/article/editArticle`,
enableArticle: `${host2}occupationlab/occupationlab/information/article/enableArticle`, enableArticle: `occupationlab/occupationlab/information/article/enableArticle`,
getArticle: `${host2}occupationlab/occupationlab/information/article/getArticle`, getArticle: `occupationlab/occupationlab/information/article/getArticle`,
getArticles: `${host2}occupationlab/occupationlab/information/article/getArticles`, getArticles: `occupationlab/occupationlab/information/article/getArticles`,
queryArticleByCondition: `${host2}occupationlab/occupationlab/information/article/queryArticleByCondition`, queryArticleByCondition: `occupationlab/occupationlab/information/article/queryArticleByCondition`,
articleSort: `${host2}occupationlab/occupationlab/information/article/articleSort`, articleSort: `occupationlab/occupationlab/information/article/articleSort`,
// 课程管理 // 课程管理
delTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/batchDeletion`, delTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/batchDeletion`,
@ -167,25 +168,26 @@ export default {
updateTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/update`, updateTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/update`,
disabledTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/disabledEvents`, disabledTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/disabledEvents`,
checkRepeatTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/checkRepeat`, checkRepeatTheoreticalCourse: `occupationlab/occupationlab/theoreticalCourse/checkRepeat`,
getRedisCache: `occupationlab/occupationlab/theoreticalCourse/getRedisCache`,
// 分类管理 // 分类管理
checkRepeat: `occupationlab/occupationlab/theoreticalCourseClassification/checkRepeat`, checkRepeat: `occupationlab/occupationlab/theoreticalCourseClassification/checkRepeat`,
delClassification: `occupationlab/occupationlab/theoreticalCourseClassification/delete`, delClassification: `occupationlab/occupationlab/theoreticalCourseClassification/batchDeletion`,
findClassification: `occupationlab/occupationlab/theoreticalCourseClassification/findById`, findClassification: `occupationlab/occupationlab/theoreticalCourseClassification/findById`,
listClassification: `occupationlab/occupationlab/theoreticalCourseClassification/pagingQuery`, listClassification: `occupationlab/occupationlab/theoreticalCourseClassification/pagingQuery`,
saveClassification: `occupationlab/occupationlab/theoreticalCourseClassification/save`, saveClassification: `occupationlab/occupationlab/theoreticalCourseClassification/save`,
updateClassification: `occupationlab/occupationlab/theoreticalCourseClassification/update`, updateClassification: `occupationlab/occupationlab/theoreticalCourseClassification/update`,
// 课程章节管理 // 课程章节管理
addChapter: `occupationlab/occupationlab/management/edu/courseChapter/addChapter`, addChapter: `occupationlab/occupationlab/theoreticalCourseChapter/addChapter`,
chapterReorder: `occupationlab/occupationlab/management/edu/courseChapter/chapterReorder`, chapterReorder: `occupationlab/occupationlab/theoreticalCourseChapter/chapterReorder`,
deleteChapter: `occupationlab/occupationlab/management/edu/courseChapter/deleteChapter`, deleteChapter: `occupationlab/occupationlab/theoreticalCourseChapter/deleteChapter`,
editChapter: `occupationlab/occupationlab/management/edu/courseChapter/editChapter`, editChapter: `occupationlab/occupationlab/theoreticalCourseChapter/editChapter`,
queryChaptersAndSubsections: `occupationlab/occupationlab/management/edu/courseChapter/queryChaptersAndSubsections`, queryChaptersAndSubsections: `occupationlab/occupationlab/theoreticalCourseChapter/queryChaptersAndSubsections`,
reorder: `occupationlab/occupationlab/management/edu/courseChapter/reorder`, reorder: `occupationlab/occupationlab/theoreticalCourseChapter/reorder`,
// 课程小节管理 // 课程小节管理
addSubsection: `occupationlab/occupationlab/management/edu/courseSubsection/addSubsection`, // 添加小节 addSubsection: `occupationlab/occupationlab/theoreticalCourseSubsection/addSubsection`, // 添加小节
deleteSubsection: `occupationlab/occupationlab/management/edu/courseSubsection/deleteSubsection`, // 根据id删除小节 deleteSubsection: `occupationlab/occupationlab/theoreticalCourseSubsection/deleteSubsection`, // 根据id删除小节
editSubsection: `occupationlab/occupationlab/management/edu/courseSubsection/editSubsection`, // 修改小节 editSubsection: `occupationlab/occupationlab/theoreticalCourseSubsection/editSubsection`, // 修改小节
getSubsection: `occupationlab/occupationlab/management/edu/courseSubsection/getSubsection`, // 根据小节id获取预览文件地址 getSubsection: `occupationlab/occupationlab/theoreticalCourseSubsection/getSubsection`, // 根据小节id获取预览文件地址
// 阿里云文件/视频管理 // 阿里云文件/视频管理
fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件 fileDeletion: `${uploadURL}oss/manage/fileDeletion`, // 删除OSS文件
@ -242,7 +244,15 @@ export default {
logoSave: `occupationlab/occupationlab/sys/logo/save`, //新增系统设置信息 logoSave: `occupationlab/occupationlab/sys/logo/save`, //新增系统设置信息
logoUpdate: `occupationlab/occupationlab/sys/logo/update`, //编辑系统设置信息 logoUpdate: `occupationlab/occupationlab/sys/logo/update`, //编辑系统设置信息
academicLeadersRanking: `occupationlab/occupationlab/data/kanban/academicLeadersRanking`,
getTheMostUsedCoursesInOurSchool: `occupationlab/occupationlab/data/kanban/getTheMostUsedCoursesInOurSchool`,
examStatistics: `occupationlab/occupationlab/data/kanban/examStatistics`,
studentGradeDistribution: `occupationlab/occupationlab/data/kanban/studentGradeDistribution`,
studentAssessSchievement: `occupationlab/occupationlab/data/kanban/studentAssessSchievement`,
overviewOfOurSchoolData: `occupationlab/occupationlab/data/kanban/overviewOfOurSchoolData`,
monthlyAverageOnlineTime: `occupationlab/occupationlab/data/kanban/monthlyAverageOnlineTime`,
courseRankings: `occupationlab/occupationlab/data/kanban/courseRankings`,
platformLoginStatistics: `users/users/user/platformLoginStatistics`,
// 教师评语 // 教师评语

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-menu class="sidebar-el-menu" :default-active="active" background-color="#324157" text-color="#bfcbd9" active-text-color="#9278FF" unique-opened mode="horizontal" router> <el-menu class="sidebar-el-menu" :default-active="active" background-color="#324157" text-color="#bfcbd9" active-text-color="#9278FF" unique-opened mode="horizontal" @select="menuSelect">
<template v-for="item in menus"> <template v-for="item in menus">
<template v-if="item.subs"> <template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index"> <el-submenu :index="item.index" :key="item.index">
@ -86,6 +86,10 @@ export default {
icon: "el-icon-setting", icon: "el-icon-setting",
index: "/system/list", index: "/system/list",
title: "系统设置" title: "系统设置"
},
{
index: "/screen",
title: "数据看板"
} }
], ],
menus: [], menus: [],
@ -142,6 +146,10 @@ export default {
} else { } else {
this.menus = this.defaultMenus this.menus = this.defaultMenus
} }
},
//
menuSelect(path) {
path === '/screen' ? window.open(this.$router.resolve(path).href) : this.$router.push(path)
} }
} }
}; };

@ -160,9 +160,9 @@ export default {
}, },
methods: { methods: {
getData() { // getData() { //
this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(res => { this.$get(`${this.api.reportDetail}?reportId=${this.reportId}`).then(({ report, userScores }) => {
this.form = res.report this.form = report
this.expData = res.userScores this.expData = userScores
this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords this.project = this.expData.find(e => e.lcRuleRecords) // lcRuleRecords
let form = this.form; let form = this.form;
this.infoData = { this.infoData = {
@ -175,8 +175,36 @@ export default {
score: form.score, score: form.score,
userName: form.userName userName: form.userName
} }
const data = report.data
// data使
if (!data) {
this.handleList(userScores)
this.$post(this.api.editExperimentalData, {
reportId,
data: JSON.stringify(userScores)
}).then(res => {}).catch(err => {})
} else {
this.handleList(JSON.parse(data))
}
}).catch(res => {}) }).catch(res => {})
}, },
//
handleList(list) {
this.project = list.find(e => e.lcRuleRecords) // lcRuleRecords
if (this.project) {
list.map(e => {
e.assessmentPoint = ''
e.referenceAnswer = ''
e.answer = ''
e.lcRuleRecords.map((n, i) => {
e.assessmentPoint += `${i + 1}.${n.name}`
e.referenceAnswer += `${i + 1}.${n.ruleAnswer}`
e.answer += `${i + 1}.${n.userAnswer}`
})
})
}
this.expData = list
},
exportPage() { exportPage() {
const form = JSON.parse(JSON.stringify(this.form)) const form = JSON.parse(JSON.stringify(this.form))
const list = JSON.parse(JSON.stringify(this.expData)) const list = JSON.parse(JSON.stringify(this.expData))

@ -7,7 +7,7 @@
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<el-form :model="form" :rules="rules" ref="form" :disabled="isDetail" label-width="110px" label-suffix=":"> <el-form :model="form" :rules="rules" ref="form" :disabled="isDetail" label-width="120px" label-suffix=":">
<el-form-item prop="courseName" label="课程名称"> <el-form-item prop="courseName" label="课程名称">
<div class="d-inline-block"> <div class="d-inline-block">
<el-input placeholder="请输入课程名称" v-model="form.courseName" clearable maxlength="25" @change="nameChange"></el-input> <el-input placeholder="请输入课程名称" v-model="form.courseName" clearable maxlength="25" @change="nameChange"></el-input>
@ -21,12 +21,12 @@
</el-select> </el-select>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="可见范围"> <el-form-item prop="visibleRange" label="可见范围">
<div> <div>
<el-radio v-model="form.visibleRange" :label="1">全平台</el-radio> <el-radio v-model="form.visibleRange" :label="0" @change="visibleChange">仅本校</el-radio>
</div> </div>
<div> <div>
<el-radio v-model="form.visibleRange" :label="0">仅本校</el-radio> <el-radio v-model="form.visibleRange" :label="1" @change="visibleChange">全平台</el-radio>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="schoolClassificationsIds" label="课程分类"> <el-form-item prop="schoolClassificationsIds" label="课程分类">
@ -36,7 +36,7 @@
</el-select> </el-select>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="platformClassificationIds" label="平台课程分类"> <el-form-item v-if="form.visibleRange == 1" prop="platformClassificationIds" label="平台课程分类">
<div class="d-inline-block"> <div class="d-inline-block">
<el-select v-model="form.platformClassificationIds" placeholder="请选择平台课程分类" multiple> <el-select v-model="form.platformClassificationIds" placeholder="请选择平台课程分类" multiple>
<el-option v-for="item in platformClassificationList" :key="item.id" :label="item.classificationName" :value="item.id"></el-option> <el-option v-for="item in platformClassificationList" :key="item.id" :label="item.classificationName" :value="item.id"></el-option>
@ -69,7 +69,7 @@
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="课程介绍"> <el-form-item prop="courseIntroduction" label="课程介绍">
<quill :border="true" :readonly="isDetail" v-model="form.courseIntroduction" :height="400" /> <quill :border="true" :readonly="isDetail" v-model="form.courseIntroduction" :height="400" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -102,17 +102,29 @@ export default {
platformSource: Setting.platformSource, platformSource: Setting.platformSource,
platformClassificationIds: [], platformClassificationIds: [],
schoolClassificationsIds: [], schoolClassificationsIds: [],
visibleRange: 1 visibleRange: 0
}, },
rules: { rules: {
courseName: [ courseName: [
{ required: true, message: '请输入课程名称', trigger: 'blur' } { required: true, message: '请输入课程名称', trigger: 'blur' }
], ],
// platformClassificationIds: [ platformClassificationIds: [
// { required: true, message: '', trigger: 'change' } { required: true, message: '请选择平台课程分类', trigger: 'change' }
// ], ],
schoolClassificationsIds: [
{ required: true, message: '请选择课程分类', trigger: 'change' }
],
coverUrl: [ coverUrl: [
{ required: true, message: '请选择课程封面', trigger: 'change' } { required: true, message: '请选择课程封面', trigger: 'change' }
],
courseType: [
{ required: true, message: '请选择课程类型', trigger: 'change' }
],
visibleRange: [
{ required: true, message: '请选择可见范围', trigger: 'change' }
],
courseIntroduction: [
{ required: true, message: '请输入课程介绍', trigger: 'blur' }
] ]
}, },
platformClassificationList: [], platformClassificationList: [],
@ -124,7 +136,6 @@ export default {
rangeVisible: false, rangeVisible: false,
range: [], range: [],
rangeInit: [], rangeInit: [],
rangeName: '',
rangeChecked: [], rangeChecked: [],
schools: [], schools: [],
rangeList: [], rangeList: [],
@ -246,7 +257,9 @@ export default {
data.schoolClassificationsIds = data.schoolClassificationsList.map(e => e.classificationId) data.schoolClassificationsIds = data.schoolClassificationsList.map(e => e.classificationId)
delete data.schoolClassificationsList delete data.schoolClassificationsList
} }
this.visibleChange(data.visibleRange)
this.form = data this.form = data
this.uploadList.push({ this.uploadList.push({
name: "cover.jpg", name: "cover.jpg",
url: data.coverUrl url: data.coverUrl
@ -265,6 +278,10 @@ export default {
this.nameRepeat = true this.nameRepeat = true
}) })
}, },
//
visibleChange(val) {
this.rules.platformClassificationIds[0].required = val == 1
},
handleExceed(files, fileList) { // handleExceed(files, fileList) { //
util.warningMsg("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!"); util.warningMsg("当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!");
}, },
@ -305,14 +322,14 @@ export default {
this.submiting = false; this.submiting = false;
}); });
} else { } else {
this.$post(this.api.saveTheoreticalCourse, form).then(res => { this.$post(this.api.saveTheoreticalCourse, form).then(({ courseId }) => {
this.submiting = false; this.submiting = false;
this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", { this.$confirm("课程创建成功,是否马上进行课程内容设置?", "提示", {
type: "success", type: "success",
confirmButtonText: "马上设置", confirmButtonText: "马上设置",
cancelButtonText: "稍后操作" cancelButtonText: "稍后操作"
}).then(() => { }).then(() => {
this.$router.push(`/setTheoreticalCourse?id=${res.id}`); this.$router.replace(`/course/contentSettings?id=${courseId}`);
}).catch(() => { }).catch(() => {
this.$router.back(); this.$router.back();
}); });

@ -12,13 +12,13 @@
<div class="p-title">内容设置</div> <div class="p-title">内容设置</div>
<div class="btns" style="top: -10px"> <div class="btns" style="top: -10px">
<template v-if="!sorting"> <template v-if="!sorting">
<el-button v-auth="'/course/list:课程管理:内容设置:添加章节'" type="primary" round v-throttle @click="addChapter">添加章节</el-button> <el-button v-auth="'/course/list:课程管理:内容设置:添加章节'" type="primary" round @click="addChapter">添加章节</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:编辑顺序'" type="primary" round v-throttle @click="sort">编辑顺序</el-button> <el-button v-auth="'/course/list:课程管理:内容设置:编辑顺序'" type="primary" round @click="sort">编辑顺序</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="primary" round @click="move">批量移动</el-button> <el-button type="primary" round @click="move">批量移动</el-button>
<el-button type="primary" round v-throttle @click="cancelSort">取消</el-button> <el-button type="primary" round @click="cancelSort">取消</el-button>
<el-button type="primary" round v-throttle @click="saveSort">保存</el-button> <el-button type="primary" round @click="saveSort">保存</el-button>
</template> </template>
</div> </div>
</div> </div>
@ -29,9 +29,9 @@
<div>{{ chapter.name }}</div> <div>{{ chapter.name }}</div>
<div> <div>
<template v-if="!sorting"> <template v-if="!sorting">
<el-button v-auth="'/course/list:课程管理:内容设置:修改章节名称'" class="action-btn" type="primary" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button> <el-button v-auth="'/course/list:课程管理:内容设置:修改章节名称'" class="action-btn" type="primary" round @click="editChapter(chapter)">修改章节名称</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:添加小节'" class="action-btn" type="primary" round v-throttle @click="addSection(chapter.id)">添加小节</el-button> <el-button v-auth="'/course/list:课程管理:内容设置:添加小节'" class="action-btn" type="primary" round @click="addSection(chapter.id)">添加小节</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:章节删除'" class="action-btn" type="primary" round v-throttle @click="delChapter(chapter.id)">删除</el-button> <el-button v-auth="'/course/list:课程管理:内容设置:章节删除'" class="action-btn" type="primary" round @click="delChapter(chapter.id)">删除</el-button>
</template> </template>
<template v-else> <template v-else>
<i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i> <i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i>
@ -97,10 +97,12 @@
:action="this.api.fileupload" :action="this.api.fileupload"
:file-list="uploadList" :file-list="uploadList"
:headers="headers" :headers="headers"
:http-request="handleRequest"
name="file" name="file"
> >
<el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button> <el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button>
</el-upload> </el-upload>
<el-progress v-if="showProgress" :stroke-width="3" :percentage="progressPercent"></el-progress>
</el-form-item> </el-form-item>
<el-form-item label="小节名称"> <el-form-item label="小节名称">
<el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input> <el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input>
@ -125,10 +127,12 @@
:action="this.api.fileupload" :action="this.api.fileupload"
:file-list="uploadList" :file-list="uploadList"
:headers="headers" :headers="headers"
:http-request="handleRequest"
name="file" name="file"
> >
<el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button> <el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button>
</el-upload> </el-upload>
<el-progress v-if="showProgress" :stroke-width="3" :percentage="progressPercent"></el-progress>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="switchVisible = false">取消</el-button> <el-button @click="switchVisible = false">取消</el-button>
@ -211,6 +215,7 @@ import util from "@/libs/util";
import Setting from "@/setting"; import Setting from "@/setting";
import { Loading } from "element-ui"; import { Loading } from "element-ui";
import pdf from "@/components/pdf"; import pdf from "@/components/pdf";
import axios from 'axios'
export default { export default {
name: "contentSettings", name: "contentSettings",
@ -253,6 +258,8 @@ export default {
loadIns: null, loadIns: null,
pdfVisible: false, pdfVisible: false,
pdfSrc: "", pdfSrc: "",
showProgress: false,
progressPercent: 0,
previewing: false, previewing: false,
moveVisible: false, moveVisible: false,
checkList: [], checkList: [],
@ -289,7 +296,7 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`) this.$get(`${this.api.queryChaptersAndSubsections}?courseId=${this.id}`)
.then(res => { .then(res => {
this.chapters = res.chapterList; this.chapters = res.chapterList;
}) })
@ -365,12 +372,42 @@ export default {
this.originalFileName = file.name; this.originalFileName = file.name;
if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf(".")); if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf("."));
this.fileType = file.name.substring(file.name.lastIndexOf(".") + 1); this.fileType = file.name.substring(file.name.lastIndexOf(".") + 1);
this.showProgress = true
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
util.warningMsg( util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
); );
}, },
//
handleRequest(data) {
const param = new FormData()
param.append('file', data.file)
const config = {
timeout: 10000000000,
headers: {
'Accept': '*/*',
'Content-Type': 'multipart/form-data',
token: util.local.get(Setting.tokenKey)
},
//
onUploadProgress: progressEvent => {
const per = Number((progressEvent.loaded / progressEvent.total * 100).toFixed(2))
console.log("🚀 ~ file: contentSettings.vue ~ line 329 ~ handleRequest ~ per", per, this.progressPercent)
if (this.progressPercent <= 80) this.progressPercent = (per > 80) ? (Math.random() * 10 + 80).toFixed(2) : per
}
}
axios.post(this.api.fileupload, param, config).then(res => {
this.progressPercent = 100
this.showProgress = false
const { fileId, fileType, fileUrl, ossFileName } = res.data.data.filesResult
this.uploading = false
this.fileId = fileId
this.fileType = fileType
this.fileUrl = fileUrl
this.fileName = ossFileName
})
},
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.uploading = false; this.uploading = false;
this.fileId = res.data.filesResult.fileId; this.fileId = res.data.filesResult.fileId;
@ -525,7 +562,7 @@ export default {
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.$del(`${this.api.deleteChapter}/${id}`).then(res => { this.$del(`${this.api.deleteChapter}?chapterId=${id}`).then(res => {
util.successMsg("删除成功"); util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(res => { }).catch(res => {
@ -625,7 +662,7 @@ export default {
this.pdfSrc = row.fileUrl; this.pdfSrc = row.fileUrl;
this.pdfVisible = true; this.pdfVisible = true;
} else { } else {
this.$get(`${this.api.getSubsection}/${row.id}`).then(res => { this.$get(`${this.api.getSubsection}?subsectionId=${row.id}`).then(res => {
this.previewing = true; this.previewing = true;
this.loadIns = Loading.service(); this.loadIns = Loading.service();
this.$route.fullPath.includes("#file") || history.pushState({ file: true }, "文件预览", "#" + this.$route.fullPath + "#file"); this.$route.fullPath.includes("#file") || history.pushState({ file: true }, "文件预览", "#" + this.$route.fullPath + "#file");
@ -718,7 +755,7 @@ export default {
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.$del(`${this.api.deleteSubsection}/${row.id}`).then(res => { this.$del(`${this.api.deleteSubsection}?subsectionId=${row.id}`).then(res => {
util.successMsg("删除成功"); util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(res => { }).catch(res => {

@ -28,9 +28,14 @@
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="courseName" label="课程名称"> <el-table-column prop="courseName" label="课程名称" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="courseClassification" label="课程分类"> <el-table-column prop="courseClassification" label="课程分类" align="center" show-overflow-tooltip>
</el-table-column>
<el-table-column label="可见范围" align="center">
<template slot-scope="scope">
{{ regionName[scope.row.visibleRange] }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"> <el-table-column prop="createTime" label="创建时间" align="center">
</el-table-column> </el-table-column>
@ -77,6 +82,8 @@ export default {
name: "courseManagement", name: "courseManagement",
data() { data() {
return { return {
regionName: ['本校内', '全平台可见', '指定院校区域'],
timer: null,
keyword: "", keyword: "",
categoryId: '', categoryId: '',
list: [], list: [],
@ -96,11 +103,14 @@ export default {
} }
}, },
mounted() { mounted() {
this.getClassification(); this.getClassification();
this.getData(); this.getData();
this.$once('hook:beforeDestroy', function() {
clearInterval(this.timer)
})
}, },
methods: { methods: {
getData() { getList() {
this.$post(this.api.listTheoreticalCourse, { this.$post(this.api.listTheoreticalCourse, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -110,6 +120,13 @@ export default {
categoryId: this.categoryId categoryId: this.categoryId
}).then(({ page }) => { }).then(({ page }) => {
this.list = page.records; this.list = page.records;
//:
//
// 使
//1.
page.records.map(e => {
if (e.ztOpen) e.isOpen = 1
})
this.total = page.total; this.total = page.total;
if (!this.list.length && this.total) { if (!this.list.length && this.total) {
this.page--; this.page--;
@ -118,6 +135,19 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
// redis
getRedis() {
this.$post(this.api.getRedisCache).then(({ data }) => {
data && this.getList()
}).catch(res => {})
},
getData() {
this.getList()
if (!Setting.isDev) {
clearInterval(this.timer)
this.timer = setInterval(this.getRedis, 1000)
}
},
initData() { initData() {
this.page = 1; this.page = 1;
this.getData(); this.getData();

@ -90,7 +90,7 @@ export default {
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.$post(`${this.api.delClassification}?id=${row.id}`).then(res => { this.$post(this.api.delClassification, [row.id]).then(res => {
util.successMsg("删除成功"); util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(res => { }).catch(res => {

@ -125,14 +125,14 @@ export default {
this.$router.back(); this.$router.back();
}, },
async getData() { async getData() {
let res = await this.$get(`${this.api.getCourse}/${this.id}`); let res = await this.$post(`${this.api.findTheoreticalCourse}?id=${this.id}`);
this.courseName = res.course.name; this.courseName = res.data.courseName;
this.description = res.course.description; this.description = res.data.courseIntroduction;
this.coverUrl = res.course.coverUrl; this.coverUrl = res.data.coverUrl;
}, },
async getChapter() { async getChapter() {
let res = await this.$get(`${this.api.queryChaptersAndSubsections}/${this.id}`); let res = await this.$get(`${this.api.queryChaptersAndSubsections}?courseId=${this.id}`);
this.videoList = res.chapterList; this.videoList = res.chapterList
}, },
insertScript() { insertScript() {
const linkTag = document.createElement("link"); const linkTag = document.createElement("link");
@ -183,7 +183,7 @@ export default {
this.pdfSrc = row.fileUrl; this.pdfSrc = row.fileUrl;
this.pdfVisible = true; this.pdfVisible = true;
} else { } else {
this.$get(`${this.api.getSubsection}/${row.id}`).then(res => { this.$get(`${this.api.getSubsection}?subsectionId=${row.id}`).then(res => {
if (row.fileType == "pptx") { if (row.fileType == "pptx") {
this.isPPT = true; this.isPPT = true;
this.isWord = false; this.isWord = false;

@ -6,8 +6,8 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<el-form label-width="90px" label-suffix=":" size="small"> <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-suffix=":" size="small">
<el-form-item label="封面图"> <el-form-item prop="coverUrl" label="封面图">
<el-upload <el-upload
class="avatar-uploader" class="avatar-uploader"
accept=".jpg,.png,.jpeg" accept=".jpg,.png,.jpeg"
@ -21,31 +21,31 @@
:headers="headers" :headers="headers"
name="file" name="file"
> >
<img v-if="coverUrl" :src="coverUrl" class="avatar"> <img v-if="form.coverUrl" :src="form.coverUrl" class="avatar">
<div class="uploader-default" v-else> <div class="uploader-default" v-else>
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
<p>上传封面</p> <p>上传封面</p>
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="作者"> <el-form-item prop="author" label="作者">
<div class="d-inline-block"> <div class="d-inline-block">
<el-input placeholder="请输入作者" v-model="author" clearable></el-input> <el-input placeholder="请输入作者" v-model="form.author" clearable></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="日期"> <el-form-item prop="date" label="日期">
<div class="d-inline-block"> <div class="d-inline-block">
<el-date-picker v-model="date" type="date" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"></el-date-picker> <el-date-picker v-model="form.date" type="date" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"></el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="文章标题"> <el-form-item prop="title" label="文章标题">
<el-input placeholder="请输入文章标题" v-model="title" clearable></el-input> <el-input placeholder="请输入文章标题" v-model="form.title" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="文章内容"> <el-form-item prop="content" label="文章内容">
<quill :border="true" v-model="content" :uploading.sync="uploading" :height="400" /> <quill :border="true" v-model="form.content" :uploading.sync="uploading" :height="400" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" v-throttle @click="saveData">确定</el-button> <el-button type="primary" @click="saveData">确定</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -56,37 +56,56 @@
import { mapState } from "vuex"; import { mapState } from "vuex";
import quill from "@/components/quill"; import quill from "@/components/quill";
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting"; import Setting from '@/setting'
export default { export default {
name: "addarticle", name: "addarticle",
data() { data() {
return { return {
headers: { headers: {
token: util.local.get(Setting.tokenKey) token: util.local.get(Setting.tokenKey)
},
form: {
columnId: +this.$route.query.columnId,
sort: +this.$route.query.sort,
id: '',
coverUrl: '',
author: '',
date: '',
title: '',
content: '',
createUser: this.customerName || this.userName
},
rules: {
coverUrl: [
{ required: true, message: '请上传封面', trigger: 'change' }
],
author: [
{ required: true, message: '请输入作者', trigger: 'blur' }
],
date: [
{ required: true, message: '请选择日期', trigger: 'change' }
],
title: [
{ required: true, message: '请输入文章标题', trigger: 'blur' }
],
content: [
{ required: true, message: '请输入文章内容', trigger: 'blur' }
],
}, },
columnId: +this.$route.query.columnId,
sort: +this.$route.query.sort,
id: "",
coverUrl: "",
uploadList: [], uploadList: [],
uploadDataList: [], uploadDataList: [],
author: "",
date: "",
title: "",
content: "",
submiting: false, submiting: false,
uploading: false uploading: false
}; };
}, },
components: {
quill
},
computed: { computed: {
...mapState("user", [ ...mapState("user", [
"userName", "customerName" "userName", "customerName"
]) ])
}, },
components: {
quill
},
mounted() { mounted() {
this.id = this.$route.query.id; this.id = this.$route.query.id;
this.id && this.getData(); this.id && this.getData();
@ -97,59 +116,39 @@ export default {
this.$router.back(); this.$router.back();
}, },
getData() { getData() {
this.$get(`${this.api.getArticle}/${this.id}`) this.$get(`${this.api.getArticle}/${this.id}`).then(({ article }) => {
.then(res => { this.form = article
let data = res.article; }).catch(err => {})
this.coverUrl = data.coverUrl;
this.author = data.author;
this.date = data.date;
this.title = data.title;
this.content = data.content;
})
.catch(err => {
});
}, },
saveData() { saveData() {
if (this.submiting) return false; this.$refs.form.validate((valid) => {
if (!this.coverUrl) return util.warningMsg("请上传封面图"); if (valid) {
if (!this.author) return util.warningMsg("请填写作者"); if (this.submiting) return false
if (!this.date) return util.warningMsg("请选择日期"); const { form } = this
if (!this.title) return util.warningMsg("请填写文章标题"); if (this.uploading) return util.warningMsg("图片正在上传中,请稍等");
if (!this.content) return util.warningMsg("请填写文章内容"); this.submiting = true
if (this.uploading) return util.warningMsg("图片正在上传中,请稍等"); if (form.id) {
this.submiting = true; this.$put(this.api.editArticle, form).then(res => {
this.submiting = false;
let data = { util.successMsg("修改成功");
id: this.id, this.back();
columnId: this.columnId, })
author: this.author, .catch(err => {
coverUrl: this.coverUrl, this.submiting = false;
date: this.date, });
title: this.title, } else {
content: this.content, this.createUser = this.customerName || this.userName
sort: this.sort, this.$post(this.api.addArticle, form).then(res => {
createUser: this.customerName || this.userName this.submiting = false;
}; util.successMsg("创建成功");
if (this.id) { this.back();
this.$put(this.api.editArticle, data).then(res => { })
this.submiting = false; .catch(err => {
util.successMsg("修改成功"); this.submiting = false;
this.back(); });
}) }
.catch(err => {
this.submiting = false;
});
} else {
this.$post(this.api.addArticle, data).then(res => {
this.submiting = false;
util.successMsg("创建成功");
this.back();
})
.catch(err => {
this.submiting = false;
});
} }
})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.currPage = val; this.currPage = val;
@ -158,13 +157,13 @@ export default {
util.warningMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`); util.warningMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`);
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
if (this.coverUrl) { if (this.form.coverUrl) {
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", ""); let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => { this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
}).catch(res => { }).catch(res => {
}); });
} }
this.coverUrl = res.data.filesResult.fileUrl; this.form.coverUrl = res.data.filesResult.fileUrl;
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.$message({ this.$message({
@ -177,9 +176,9 @@ export default {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`);
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
let fileName = this.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", ""); let fileName = this.form.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", "");
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => { this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.coverUrl = ""; this.form.coverUrl = "";
}).catch(res => { }).catch(res => {
}); });
}, },
@ -190,7 +189,6 @@ export default {
this.getData(); this.getData();
}, },
back() { back() {
// this.$router.push(`/content?id=${this.columnId}`)
this.$router.back(); this.$router.back();
}, },
goback() { goback() {

@ -21,8 +21,7 @@
<span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span> <span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span>
</div> </div>
</div> </div>
<el-tree :data="listData" node-key="id" default-expand-all @node-drop="handleDrop" <el-tree :data="listData" node-key="id" default-expand-all :draggable="sorting" :allow-drop="allowDrop">
:draggable="sorting" :allow-drop="allowDrop" :allow-drag="allowDrag">
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span class="name">{{ data.name }}</span> <span class="name">{{ data.name }}</span>
<span class="action" v-show="!sorting"> <span class="action" v-show="!sorting">
@ -81,7 +80,8 @@ export default {
isAddType: false, isAddType: false,
defaultProps: { defaultProps: {
label: "name" label: "name"
} },
level: 0
}; };
}, },
mounted() { mounted() {
@ -142,27 +142,28 @@ export default {
} }
} }
}, },
// list
handleList(data, parent = {}) {
data.map((n, i) => {
n.parentId = parent.id || 0
n.level = this.level
n.sort = i
if (n.children.length) {
this.level++
this.handleList(n.children, n)
} else {
this.level = 0
}
})
this.level++
},
sortSubmit() { sortSubmit() {
let list = JSON.parse(JSON.stringify(this.listData)); this.level = 0
list.forEach((n, k) => { let list = JSON.parse(JSON.stringify(this.listData))
n.name = n.label; this.handleList(list)
n.parentId = 1; this.$post(this.api.columnReorder, {
n.level = 1; columnTree: list
n.sort = k + 1; }).then(res => {
n.children && n.children.forEach((j, i) => {
j.name = j.label;
j.parentId = n.id;
j.level = 2;
j.sort = i + 1;
delete j.label;
j.secondColumn = [];
});
delete n.label;
n.secondColumn = n.children;
n.children = null;
});
let data = { columnTree: list };
this.$post(this.api.columnReorder, data).then(res => {
util.successMsg("保存成功"); util.successMsg("保存成功");
this.sorting = false; this.sorting = false;
this.getData(); this.getData();
@ -199,10 +200,6 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
onSearch() {
this.pageNo = 1;
this.getData();
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.pageNo = val;
this.getData(); this.getData();
@ -210,20 +207,15 @@ export default {
closeColumn() { closeColumn() {
this.curRow = {} this.curRow = {}
}, },
handleDrop(draggingNode, dropNode, dropType, ev) {
// console.log('tree drop: ', dropNode, dropType);
},
allowDrop(draggingNode, dropNode, type) { allowDrop(draggingNode, dropNode, type) {
if (dropNode.level == 2 && draggingNode.childNodes.length == 0) { console.log("🚀 ~ file: index.vue ~ line 207 ~ allowDrop ~ draggingNode, dropNode, type", draggingNode, dropNode.level, type)
if (dropNode.level == 4 && draggingNode.childNodes.length == 0) {
return type !== "inner"; return type !== "inner";
} else if ((draggingNode.childNodes.length > 0 && dropNode.level == 2) || (draggingNode.childNodes.length > 0 && type == "inner")) { } else if ((draggingNode.childNodes.length > 0 && dropNode.level == 4) || (draggingNode.childNodes.length > 0 && type == "inner")) {
return false; return false;
} else { } else {
return true; return true;
} }
},
allowDrag(draggingNode) {
return draggingNode.data.label.indexOf("三级 3-2-2") === -1;
} }
} }
}; };

@ -16,7 +16,7 @@
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题" show-overflow-tooltip> <el-table-column prop="title" label="标题" show-overflow-tooltip align="center">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="排序值" width="80" align="center"> <el-table-column prop="name" label="排序值" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

@ -1,25 +1,24 @@
<template> <template>
<!-- 内容管理 --> <!-- 内容管理 -->
<div> <div class="flex">
<el-row :gutter="20"> <div class="menu-con">
<el-col :span="3"> <el-menu
<div class="menu-con"> ref="columnMenu"
<el-menu unique-opened
ref="columnMenu" text-color="#303133"
unique-opened :default-openeds="ids"
text-color="#303133" :default-active="activeName"
:default-active="activeName" @open="handleSelect"
@select="handleSelect" @close="handleSelect"
> @select="handleSelect"
<menuTree :menuList="menuList"></menuTree> >
</el-menu> <menuTree :menuList="menuList"></menuTree>
</div> </el-menu>
</el-col>
<el-col :span="21">
<ContentList v-show="menuList.length" :columnId="columnId" />
</el-col>
</el-row>
</div> </div>
<div class="right">
<ContentList v-show="menuList.length" :columnId="columnId" />
</div>
</div>
</template> </template>
<script> <script>
@ -36,8 +35,9 @@ export default {
data() { data() {
return { return {
menuList: [], menuList: [],
activeName: this.$store.state.columnId, activeName: this.$store.state.info.columnId,
columnId: "" columnId: "",
ids: []
}; };
}, },
mounted() { mounted() {
@ -55,6 +55,7 @@ export default {
}).then(res => { }).then(res => {
this.menuList = res.columnTree; this.menuList = res.columnTree;
if (this.menuList.length) { if (this.menuList.length) {
this.getId(this.menuList)
if (this.menuList[0].children && this.menuList[0].children.length) { if (this.menuList[0].children && this.menuList[0].children.length) {
this.columnId = this.menuList[0].children[0].id; this.columnId = this.menuList[0].children[0].id;
} else { } else {
@ -63,12 +64,21 @@ export default {
if (!this.$store.state.info.columnId) { if (!this.$store.state.info.columnId) {
this.setColumnId(this.columnId) this.setColumnId(this.columnId)
} else { } else {
this.columnId = this.$store.state.info.columnId; this.columnId = this.$store.state.info.columnId
} }
} }
console.log("🚀 ~ file: index.vue ~ line 58 ~ getMenuData ~ this.columnId", this.columnId)
}).catch(err => { }).catch(err => {
}); });
}, },
// id便
getId(data) {
data.map(e => {
this.ids.push(e.id)
e.children.length && this.getId(e.children)
})
},
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
this.columnId = key; this.columnId = key;
this.setColumnId(key) this.setColumnId(key)
@ -79,23 +89,24 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.menu-con { .menu-con {
// width: 210px;
height: calc(100vh - 250px); height: calc(100vh - 250px);
border-right: solid 1px #e6e6e6; border-right: solid 1px #e6e6e6;
background-color: #F2F6FC; background-color: #F2F6FC;
// overflow: hidden; .el-menu {
background-color: transparent;
.el-menu {
background-color: transparent;
.el-submenu { .el-submenu {
background-color: transparent; background-color: transparent;
} }
.el-menu-item.is-active { .el-menu-item.is-active {
color: #ffffff; color: #ffffff;
background-color: #9278FF; background-color: #9278FF;
} }
} }
}
.right {
flex: 1;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,6 @@
export default {
path: `/screen`,
name: 'screen',
component: () => import('@/pages/screen'),
meta: { title: '数据看板' }
}

@ -23,7 +23,7 @@ if (isPro) {
jumpPath = "http://192.168.31.125:8087/"; jumpPath = "http://192.168.31.125:8087/";
bankPath = `http://192.168.31.125:8093` bankPath = `http://192.168.31.125:8093`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
host = "http://192.168.31.151:9000/"; // 榕 // host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.137:9000/'; // 赓 // host = 'http://192.168.31.137:9000/'; // 赓
} }
@ -84,7 +84,7 @@ const Setting = {
// 相同路由,不同参数间进行切换,是否强力更新 // 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false, sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮) // 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
dynamicRoute: true, dynamicRoute: false,
// 文件上传 // 文件上传
upload: { upload: {
apiURL: uploadURL, apiURL: uploadURL,

@ -255,20 +255,20 @@
} }
} }
&:not(.normal) { // &:not(.normal) {
.el-button--primary { // .el-button--primary {
color: #606266; // color: #606266;
background: #fff; // background: #fff;
border-color: #DCDFE6; // border-color: #DCDFE6;
&:hover { // &:hover {
color: $--color-primary; // color: $--color-primary;
border-color: #efbdbb; // border-color: #efbdbb;
background-color: #fae9e8; // background-color: #fae9e8;
} // }
} // }
} // }
} }
.el-dialog__wrapper { .el-dialog__wrapper {

@ -0,0 +1,429 @@
@import "../var.scss";
// ::-webkit-scrollbar-thumb {
// display: none;
// }
body {
min-width: 1480px;
}
// ::-webkit-scrollbar {
// width: 8px;
// height: 8px;
// }
// ::-webkit-scrollbar-thumb {
// width: 5px;
// border-radius: 6px;
// background: rgba(85, 219, 255, .8);
// }
.video {
position: absolute;
top: 0;
left: -500px;
width: 100vw;
// height: 720px;
}
.wrap {
width: 100%;
height: 100vh;
color:#333;
background: url('../../assets/img/screen/screen1.jpg') no-repeat;
background-size: 100% 100%;
overflow: auto;
.full {
z-index: 10;
position: absolute;
top: 20px;
right: 30px;
cursor: pointer;
transition: .5s;
&:hover {
transform: scale(1.2);
}
}
.l_t_line{
width: 5px;
height: 24px;
left: -3px;
top: -3px;
}
.t_l_line{
height: 5px;
width: 26px;
left: -3px;
top: -3px;
}
.t_line_box {
position: absolute;
width: 100%;
height: 100%;
}
.t_line_box i{
background-color: #4788fb;
box-shadow: 0px 0px 10px #4788fb;
position: absolute;
}
.t_r_line{
height: 5px;
width: 26px;
right: -3px;
top: -3px;
}
.r_t_line{
width: 5px;
height: 24px;
right: -3px;
top: -3px;
}
.l_b_line{
width: 5px;
height: 24px;
left: -3px;
bottom: -3px;
}
.b_l_line{
height: 5px;
width: 26px;
left: -3px;
bottom: -3px;
}
.r_b_line{
width: 5px;
height: 24px;
right: -3px;
bottom: -3px;
}
.b_r_line{
height: 5px;
width: 26px;
right: -3px;
bottom: -3px;
}
.earth {
z-index: 0;
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
img {
position: absolute;
top: 52%;
left: 50%;
transform: translate(-50%, -50%);
opacity: .4;
}
.lbx {
z-index: 2;
max-width: 95%;
max-height: 95%;
animation: rotate 15s linear infinite;
}
.jt {
z-index: 3;
max-width: 90%;
max-height: 90%;
opacity: .3;
animation: rotate-reverse 15s linear infinite;
}
.map {
z-index: 1;
max-width: 85%;
max-height: 85%;
}
}
@keyframes rotate {
0% {
transform: translate(-50%, -50%) rotate(0);
}
50% {
transform: translate(-50%, -50%) rotate(180deg);
}
100% {
transform: translate(-50%, -50%) rotate(360deg);
}
}
@keyframes rotate-reverse {
0% {
transform: translate(-50%, -50%) rotate(0360deg);
}
50% {
transform: translate(-50%, -50%) rotate(180deg);
}
100% {
transform: translate(-50%, -50%) rotate(0);
}
}
}
.time-switch {
z-index: 2;
position: absolute;
display: flex;
top: 24px;
right: 10px;
li {
padding: 0 14px;
line-height: 24px;
color: #fff;
background-color: #0a111c;
border-radius: 8px;
cursor: pointer;
&.active {
background-color: #00d8ff;
}
}
}
.active-number {
position: absolute;
top: 10px;
left: 10px;
padding: 10px 40px;
background: url(../../assets/img/screen/title-bg.png) 0 0/cover no-repeat;
.val {
font-size: 50px;
font-family: 'yjsz';
color: #00f3ff;
text-shadow: 0 0 25px #00d8ff;
text-align: center;
}
.name {
font-size: 16px;
color: #fff;
text-shadow: 0 0 25px #00d8ff;
}
}
.stat-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .65);
}
.stat-wrap {
position: relative;
height: 100%;
background: url(../../assets/img/screen/stat.png) 0 0/100% auto no-repeat;
.num {
position: absolute;
width: 100px;
text-align: center;
font-size: 32px;
font-weight: bold;
color: #00d8ff;
white-space: nowrap;
}
.num1 {
top: 140px;
left: 12px;
}
.num2 {
top: 49px;
right: 187px;
}
.num3 {
top: 260px;
left: 200px;
}
.num4 {
top: 296px;
right: 368px;
}
.num5 {
bottom: 319px;
right: 36px;
}
}
.main_table {
width: 100%;
margin-top: 25px;
table {
width: 100%;
}
tr{
height: 42px;
}
th{
font-size: 12px;
font-weight: 600;
color:#61d2f7;
text-align: center;
}
td{
color:#fff;
font-size: 10px;
text-align: center;
}
tbody tr:nth-child(odd) {
background-color: #072951;
box-shadow:-10px 0px 15px #2C58A6 inset, 10px 0px 15px #2C58A6 inset;
}
.percent {
width: 64px;
margin: 0 auto;
line-height: 24px;
color: #fff;
text-align: center;
background-color: #0faf7d;
border-radius: 2px;
&.fall {
background-color: #db4154;
}
}
}
.header{
z-index: 2;
position: relative;
width: 100%;
height: 80px;
padding:0 20px;
}
.bg_header{
width: 100%;
height: 80px;
background: url(../../assets/img/screen/screen2.png) no-repeat;
background-size: 100% 100%;
}
.t_title{
width: 100%;
height: 100%;
text-align: center;
font-size: 2.5em;
line-height: 80px;
color: #fff;
}
$height: 250px;
.content{
display: flex;
padding: 20px;
.left, .right {
min-width: 300px;
width: 24%;
}
.middle {
width: 913px;
min-width: 913px;
margin: 0 30px;
overflow: hidden;
}
.item {
position: relative;
height: $height;
margin-bottom: 30px;
border: 1px solid #2C58A6;
box-shadow: 0 0 10px #2C58A6;
}
}
.chart {
height: $height;
}
.popular-wrap {
height: 170px;
margin-top: 45px;
overflow: auto;
&::-webkit-scrollbar-thumb {
display: none;
}
}
.list {
padding: 0 15px;
margin-top: 25px;
overflow: auto;
li {
position: relative;
padding: 10px 10px;
&:nth-child(2) {
.index {
background-color: #67a0ff;
}
}
&:nth-child(3) {
.index {
background-color: #2b71ff;
}
}
&:nth-child(4) {
.index {
background-color: #8c2bff;
}
}
&:nth-child(5) {
.index {
background-color: #ff612b;
}
}
&:nth-child(6) {
.index {
background-color: #4152f1;
}
}
&:nth-child(7) {
.index {
background-color: #d14cc9;
}
}
&:nth-child(8) {
.index {
background-color: #f52c8d;
}
}
&:nth-child(9) {
.index {
background-color: #f1561b;
}
}
&:nth-child(10) {
.index {
background-color: #f50000;
}
}
}
&.popular {
margin-top: 0;
li:nth-child(odd) {
background-color: #072951;
box-shadow:-10px 0px 15px #2C58A6 inset, 10px 0px 15px #2C58A6 inset;
}
}
.index {
position: absolute;
width: 20px;
line-height: 20px;
color: #fff;
font-size: 12px;
text-align: center;
border-radius: 50%;
background-color: #2defe2;
}
.text {
width: 60%;
margin: 0 auto;
color: #61d2f7;
text-align: center;
@include ellipsis;
}
.icon {
position: absolute;
top: 10px;
right: 10%;
}
}
.main_title{
display: flex;
align-items: center;
height: 35px;
line-height: 33px;
background-color: #2C58A6;
border-radius: 18px;
position: absolute;
top: -17px;
left: 50%;
color:#fff;
font-size: 18px;
font-weight: 600;
white-space: nowrap;
padding: 0 20px;
z-index: 1000;
text-align: center;
transform: translateX(-50%);
img {
margin-right: 10px;
}
}
Loading…
Cancel
Save