dev_202412
yujialong 2 months ago
parent fdfda44913
commit 79c930b297
  1. 2
      src/api/index.js
  2. 2
      src/layouts/navbar/index.vue
  3. 3
      src/pages/expSystem/list/index.vue
  4. 30
      src/pages/lesson/content/index.vue
  5. 33
      src/pages/lesson/content/source.vue
  6. 38
      src/pages/lesson/detail/index.vue
  7. 6
      src/pages/match/add/index.vue
  8. 179
      src/pages/station/list/index.vue
  9. 9
      src/pages/station/preview/index.vue
  10. 29
      src/pages/student/list/index.vue
  11. 14
      src/pages/system/list/role.vue
  12. 14
      src/pages/system/list/staff.vue
  13. 27
      src/pages/workbench/list/index.vue

@ -30,6 +30,7 @@ export default {
whetherToRenewTheFee: 'nakadai/nakadai/curriculum/whetherToRenewTheFee', whetherToRenewTheFee: 'nakadai/nakadai/curriculum/whetherToRenewTheFee',
recentUse: `nakadai/nakadai/curriculum/recentUse`, recentUse: `nakadai/nakadai/curriculum/recentUse`,
recordRecentUsage: `nakadai/nakadai/curriculum/recordRecentUsage`, recordRecentUsage: `nakadai/nakadai/curriculum/recordRecentUsage`,
selfBuildCourse: `nakadai/nakadai/curriculum/selfBuildCourse`,
courseLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/courseLearningProgress', courseLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/courseLearningProgress',
deleteLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/delete', deleteLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/delete',
findLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/findById', findLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/findById',
@ -106,6 +107,7 @@ export default {
deleteAssessment: `occupationlab/occupationlab/assessment/deleteAssessment`, // 单个、批量删除 deleteAssessment: `occupationlab/occupationlab/assessment/deleteAssessment`, // 单个、批量删除
collectPaper: `occupationlab/occupationlab/assessment/collectPaper`, // 收卷(提前结束) collectPaper: `occupationlab/occupationlab/assessment/collectPaper`, // 收卷(提前结束)
schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
selfBuildCourse: `nakadai/nakadai/curriculum/selfBuildCourse`,
getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`, getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`,
projectListByCourseId: `occupationlab/occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表 projectListByCourseId: `occupationlab/occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表
getProjectOrExamPaperByAssessment: `occupationlab/occupationlab/projectManage/getProjectOrExamPaperByAssessment`, getProjectOrExamPaperByAssessment: `occupationlab/occupationlab/projectManage/getProjectOrExamPaperByAssessment`,

@ -124,6 +124,8 @@ export default {
initMenu () { initMenu () {
// store // store
if (Setting.dynamicRoute) { if (Setting.dynamicRoute) {
this.menus = this.defaultMenus
return false
const { routes } = this const { routes } = this
const menus = [] const menus = []
this.defaultMenus.map(e => { this.defaultMenus.map(e => {

@ -34,7 +34,8 @@
<el-table-column prop="payamount" label="系统后台" align="center"> <el-table-column prop="payamount" label="系统后台" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toBackstage(scope.row)" <el-button type="text" @click="toBackstage(scope.row)"
v-if="scope.row.systemId !== '11' && scope.row.systemId !== '12'" v-auth>进入</el-button> v-if="scope.row.systemId !== '11' && scope.row.systemId !== '12'"
v-auth="'/expSystem/list:进入'">进入</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -13,11 +13,17 @@
<el-button type="primary" size="mini" @click="addChapter" v-auth="'/curriculum:内容设置:添加章节'">新增章节</el-button> <el-button type="primary" size="mini" @click="addChapter" v-auth="'/curriculum:内容设置:添加章节'">新增章节</el-button>
</div> </div>
<ul class="chapters"> <ul class="chapters">
<li v-for="(chapter, i) in chapters" :key="i" :class="{ active: chapterId === chapter.id }"> <draggable v-model="chapters" :disabled="false" :group="{
<span class="name ellipsis" @click="chapterClick(chapter)">{{ chapter.name }}</span> name: 'sec',
<el-link :underline="false" type="primary" @click="editChapter(chapter)">修改名称</el-link> pull: false,
<el-link v-if="i" class="del" :underline="false" type="primary" @click="delChapter(chapter.id)">删除</el-link> }" animation="1000" @end="updateSort">
</li> <li v-for="(chapter, i) in chapters" :key="i" :class="{ active: chapterId === chapter.id }">
<span class="name ellipsis" @click="chapterClick(chapter)">{{ chapter.name }}</span>
<el-link :underline="false" type="primary" @click="editChapter(chapter)">修改名称</el-link>
<el-link v-if="i" class="del" :underline="false" type="primary"
@click="delChapter(chapter.id)">删除</el-link>
</li>
</draggable>
</ul> </ul>
</div> </div>
<div class="right"> <div class="right">
@ -33,7 +39,10 @@
</div> </div>
<ul class="sections"> <ul class="sections">
<draggable v-model="sections" :group="dragGroup" chosenClass="chosen" animation="1000" @update="updateSort"> <draggable v-model="sections" :group="{
name: 'sec',
pull: false,
}" handle=".drag" animation="1000" @end="updateSort">
<li v-for="(section, i) in sections" :key="i"> <li v-for="(section, i) in sections" :key="i">
<div class="section-left"> <div class="section-left">
<img class="drag" src="@/assets/img/drag.svg" alt=""> <img class="drag" src="@/assets/img/drag.svg" alt="">
@ -276,10 +285,6 @@ export default {
}, },
sourceVisible: false, sourceVisible: false,
sections: [], sections: [],
dragGroup: {
pull: false,
},
}; };
}, },
mounted () { mounted () {
@ -457,12 +462,11 @@ export default {
// //
async updateSort (e) { async updateSort (e) {
e.preventDefault() e.preventDefault()
console.log(33, this.sections)
const { chapters, sections, chapterId } = this const { chapters, sections, chapterId } = this
chapters.forEach((n, k) => { chapters.forEach((n, k) => {
n.sort = k + 1 n.sort = k + 1
if (n.id === chapterId) n.subsectionList = sections if (n.id === chapterId) n.subsectionList = sections
n.subsectionList.forEach((j, i) => { n.subsectionList && n.subsectionList.forEach((j, i) => {
j.sort = i + 1 j.sort = i + 1
j.chapterId = n.id j.chapterId = n.id
}) })
@ -998,7 +1002,7 @@ export default {
.drag { .drag {
margin-right: 10px; margin-right: 10px;
cursor: pointer; cursor: move;
} }
.section-left, .section-left,

@ -252,21 +252,25 @@ export default {
async submit () { async submit () {
try { try {
if (this.submiting) return false if (this.submiting) return false
this.submiting = true
const { checked } = this const { checked } = this
const { chapterId, id } = this.$parent if (checked.length) {
const result = checked.map(e => { this.submiting = true
return { const { chapterId, id } = this.$parent
chapterId, const result = checked.map(e => {
cid: id, return {
resourceId: e.id, chapterId,
type: e.cid ? 0 : 1, cid: id,
} resourceId: e.id,
}) type: e.cid ? 0 : 1,
const res = await this.$post(this.api.combinationResource, result) }
this.sourceVisible = false })
this.$parent.getData() await this.$post(this.api.combinationResource, result)
this.submiting = false this.sourceVisible = false
this.$parent.getData()
this.submiting = false
} else {
Util.warningMsg('请选择资源')
}
} catch (e) { } catch (e) {
this.submiting = false this.submiting = false
} }
@ -356,6 +360,7 @@ export default {
width: 100px; width: 100px;
max-height: 80px; max-height: 80px;
margin-right: 15px; margin-right: 15px;
border-radius: 6px;
} }
.course-name { .course-name {

@ -235,7 +235,8 @@
<div v-if="item.systemInfo" class="children"> <div v-if="item.systemInfo" class="children">
<div v-for="(system, j) in item.systemInfo" :key="j" :title="system.label" class="line"> <div v-for="(system, j) in item.systemInfo" :key="j" :title="system.label" class="line">
<el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox> <el-checkbox v-model="system.check" @change="val => systemChange(val, system, item)"></el-checkbox>
<div :class="['name', { active: curSystem == system.systemId }]" @click="getProject(item, system)"> <div :class="['name', { active: curCourse == item.cid && curSystem == system.systemId }]"
@click="getProject(item, system)">
<span>{{ system.systemName }}</span> <span>{{ system.systemName }}</span>
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
</div> </div>
@ -386,6 +387,7 @@ export default {
systemChecked: [], systemChecked: [],
curCourse: '', curCourse: '',
curSystem: '', curSystem: '',
curSystemIds: '',
projects: [], projects: [],
projectKeyword: '', projectKeyword: '',
checkedKeyword: '', checkedKeyword: '',
@ -583,16 +585,20 @@ export default {
async getProject (item, system) { async getProject (item, system) {
const checked = this.checkeds const checked = this.checkeds
if (system) { if (system) {
this.curCourse = item.cid
this.curSystem = +system.systemId this.curSystem = +system.systemId
this.curSystemIds = ''
} else if (item) { } else if (item) {
this.curCourse = item.cid this.curCourse = item.cid
this.curSystem = ''
this.curSystemIds = item.systemInfo ? item.systemInfo.map(e => e.systemId).join() : ''
} }
const res = await this.$post(this.api.configureCourseProjectBySchool, { const res = await this.$post(this.api.configureCourseProjectBySchool, {
projectName: this.projectKeyword, projectName: this.projectKeyword,
permissions: this.permissions, permissions: this.permissions,
cid: item.cid, cid: this.curCourse,
systemId: system ? system.systemId : item.systemInfo.map(e => e.systemId).join(), systemId: this.curSystem || this.curSystemIds,
}) })
const list = res.projectManages const list = res.projectManages
list.map(e => { list.map(e => {
@ -723,11 +729,11 @@ export default {
}, },
handleBatchDelete (type) { // handleBatchDelete (type) { //
if (type == 1 && !this.multipleAssessment.length) { if (type == 1 && !this.multipleAssessment.length) {
this.$message.warning("请勾选考核项目!"); this.$message.warning("请勾选考核项目!")
return; return
} else if (!type && !this.multiplePractice.length) { } else if (!type && !this.multiplePractice.length) {
this.$message.warning("请勾选练习项目!"); this.$message.warning("请勾选练习项目!")
return; return
} }
this.$confirm("此操作将批量移除项目, 是否继续?", "提示", { this.$confirm("此操作将批量移除项目, 是否继续?", "提示", {
type: "warning" type: "warning"
@ -737,7 +743,7 @@ export default {
let tempArr = []; let tempArr = [];
for (let i = 0; i < this.assessmentData.length; i++) { for (let i = 0; i < this.assessmentData.length; i++) {
if (!ids.includes(this.assessmentData[i].projectId)) { if (!ids.includes(this.assessmentData[i].projectId)) {
tempArr.push(this.assessmentData[i]); tempArr.push(this.assessmentData[i])
} }
} }
this.assessmentData = tempArr; this.assessmentData = tempArr;
@ -746,28 +752,28 @@ export default {
let tempArr = []; let tempArr = [];
for (let i = 0; i < this.practiceData.length; i++) { for (let i = 0; i < this.practiceData.length; i++) {
if (!ids.includes(this.practiceData[i].projectId)) { if (!ids.includes(this.practiceData[i].projectId)) {
tempArr.push(this.practiceData[i]); tempArr.push(this.practiceData[i])
} }
} }
this.practiceData = tempArr; this.practiceData = tempArr;
} }
this.$message.success("批量移除成功"); this.$message.success("批量移除成功")
}).catch(() => { }).catch(() => {
this.$message.info("已取消批量移除"); this.$message.info("已取消批量移除")
}); });
}, },
handleDelete (index, data) { // handleDelete (index, data) { //
this.$confirm("此操作将移除该项目, 是否继续?", "提示", { this.$confirm("此操作将移除该项目, 是否继续?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
data.splice(index, 1); data.splice(index, 1)
this.$message.success("移除成功"); this.$message.success("移除成功")
}).catch(() => { }).catch(() => {
this.$message.info("已取消移除"); this.$message.info("已取消移除")
}); })
}, },
practiceSortChange (row, index) { // practiceSortChange (row, index) { //
this.practiceData.splice(index, 1, row); this.practiceData.splice(index, 1, row)
}, },
// //

@ -326,7 +326,7 @@ export default {
.active { .active {
.circle { .circle {
color: #fff; color: #fff;
border-color: #bbacff; border-color: #2c45a1;
background: $main-color; background: $main-color;
} }
@ -339,10 +339,10 @@ export default {
.circle { .circle {
color: #fff; color: #fff;
background: #9c86ff; background: #9c86ff;
border-color: #bbacff; border-color: #2c45a1;
&:after { &:after {
background: #bbacff; background: #2c45a1;
} }
} }

@ -1,6 +1,6 @@
<template> <template>
<!-- 实验台 --> <!-- 实验台 -->
<div class="wrap"> <div class="wrap" v-loading="loading">
<div class="search"> <div class="search">
<h6>创新实验智能教学</h6> <h6>创新实验智能教学</h6>
<div class="input" v-auth="'搜索'"> <div class="input" v-auth="'搜索'">
@ -11,8 +11,16 @@
<div class="station"> <div class="station">
<div class="inner"> <div class="inner">
<div class="tab"> <div class="tab">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.classificationId === active }" <a class="item" v-for="(item, i) in types" :key="i" :class="{ active: item.id === typeActive }"
@click="tabChange(item)">{{ item.classificationName }}</a> @click="tabChange(item)">{{ item.name }}</a>
</div>
<div class="tab-wrap">
<span class="label">课程类型</span>
<div class="tabs1">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.classificationId === active }"
@click="tab1Change(item)">{{ item.classificationName }}</a>
</div>
</div> </div>
<div class="curs"> <div class="curs">
<template v-if="products.length"> <template v-if="products.length">
@ -21,7 +29,7 @@
<div v-else class="cover" :style="{ backgroundImage: 'url(' + item.coverUrl + ')' }"></div> <div v-else class="cover" :style="{ backgroundImage: 'url(' + item.coverUrl + ')' }"></div>
<div class="bottom"> <div class="bottom">
<p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p> <p class="text"><span>{{ item.goodsName || item.curriculumName }}</span></p>
<a v-if="!item.isInEffect">续费</a> <a v-if="!typeActive && !item.isInEffect">续费</a>
<a v-else>进入实验</a> <a v-else>进入实验</a>
</div> </div>
</div> </div>
@ -56,10 +64,34 @@ export default {
isZj: location.host === '10.60.32.76', // isZj: location.host === '10.60.32.76', //
isSq: Setting.isSq, isSq: Setting.isSq,
keyword: this.$route.query.keyword || '', keyword: this.$route.query.keyword || '',
active: +this.$route.query.active || 0, typeActive: +this.$route.query.typeActive || 0,
active: +this.$route.query.active || '',
searchTimer: null, searchTimer: null,
types: [
{
id: 0,
name: '校本课程'
},
{
id: 1,
name: '我的课程'
},
],
defaultTypes: [],
selfBuildCourseType: [],
defaultTabs: [
{
classificationId: '',
classificationName: '全部',
},
{
classificationId: -1,
classificationName: '最近使用',
},
],
tabs: [], tabs: [],
products: [], products: [],
loading: false,
linkVisible: false, linkVisible: false,
links: [], links: [],
@ -77,36 +109,44 @@ export default {
methods: { methods: {
// tab // tab
async getTab () { async getTab () {
const { data } = await this.$get(this.api.getSchoolCourseAuthority) const res = await this.$get(this.api.getSchoolCourseAuthority)
this.defaultTypes = res.data
this.selfBuildCourseType = res.selfBuildCourseType
this.tabs = [ this.tabs = [
{ ...this.defaultTabs,
classificationId: 0, ...res.data,
classificationName: '最近使用',
},
{
classificationId: -1,
classificationName: '全部',
},
...data,
] ]
this.getList() this.getList()
}, },
// //
async getList () { async getList () {
this.loading = true
// 使 // 使
if (this.active === 0) { if (this.active === -1) {
const { page } = await this.$post(this.api.recentUse, { const { list } = await this.$post(this.api.recentUse, {
pageNum: 1, courseType: this.typeActive,
pageSize: 100,
goodsName: this.keyword, goodsName: this.keyword,
}) })
this.products = page.records this.products = list
this.loading = false
} else { } else {
const { data } = await this.$get(this.api.schoolCourse, { if (this.typeActive) {
authority: this.active === -1 ? '' : this.active, //
goodsName: this.keyword, const res = await this.$post(this.api.selfBuildCourse, {
}) curriculumType: this.active,
this.products = data curriculumName: this.keyword,
})
this.products = res.courses
this.loading = false
} else {
//
const { data } = await this.$get(this.api.schoolCourse, {
authority: this.active,
goodsName: this.keyword,
})
this.products = data
this.loading = false
}
} }
}, },
// 使 // 使
@ -114,32 +154,46 @@ export default {
await this.$post(`${this.api.recordRecentUsage}?mallId=${mallId}`) await this.$post(`${this.api.recordRecentUsage}?mallId=${mallId}`)
}, },
toProduct (item) { toProduct (item) {
const params = `&keyword=${this.keyword}&active=${this.active}` const params = `&keyword=${this.keyword}&active=${this.active}&typeActive=${this.typeActive}`
const links = item.nonAssociatedLinks if (this.typeActive) {
// / cid this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${encodeURIComponent(item.curriculumName)}&mallId=${item.mallId || ''}${params}`)
if (!item.isInEffect) {
this.$router.push(`/product/show?id=${item.mallId}${params}`)
} else if (item.isInEffect && !item.cid && !links) {
this.addRecord(item.mallId)
this.$router.push(`/product/show?id=${item.mallId}${params}`)
} else { } else {
// const links = item.nonAssociatedLinks
if (links && links.length) { // / cid
if (links.length === 1) { if (!item.isInEffect) {
this.addRecord(item.mallId) this.$router.push(`/product/show?id=${item.mallId}${params}`)
window.open(links[0].url) } else if (item.isInEffect && !item.cid && !links) {
this.addRecord(item.mallId)
this.$router.push(`/product/show?id=${item.mallId}${params}`)
} else {
//
if (links && links.length) {
if (links.length === 1) {
this.addRecord(item.mallId)
window.open(links[0].url)
} else {
this.addRecord(item.mallId)
this.linkVisible = true
this.links = item.nonAssociatedLinks
}
} else { } else {
this.addRecord(item.mallId) this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${encodeURIComponent(item.goodsName)}&mallId=${item.mallId || ''}${params}`)
this.linkVisible = true
this.links = item.nonAssociatedLinks
} }
} else {
this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${encodeURIComponent(item.goodsName)}&mallId=${item.mallId || ''}${params}`)
} }
} }
}, },
// tab // tab
tabChange (item) { tabChange ({ id }) {
this.typeActive = id
this.tabs = [
...this.defaultTabs,
...this[id ? 'selfBuildCourseType' : 'defaultTypes'],
]
if (this.active !== '' && this.active !== -1) this.active = ''
this.getList()
},
// tab
tab1Change (item) {
this.active = item.classificationId this.active = item.classificationId
this.getList() this.getList()
}, },
@ -200,7 +254,7 @@ export default {
font-size: 17px; font-size: 17px;
text-align: center; text-align: center;
color: #333; color: #333;
line-height: 50px; line-height: 44px;
border-bottom: 3px solid transparent; border-bottom: 3px solid transparent;
cursor: pointer; cursor: pointer;
@ -211,6 +265,41 @@ export default {
} }
} }
.tab-wrap {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
.label {
margin-right: 20px;
font-size: 16px;
font-weight: 600;
}
.tabs1 {
display: flex;
justify-content: center;
align-items: center;
.item {
padding: 0 15px;
margin-right: 16px;
font-size: 16px;
text-align: center;
color: #333;
line-height: 40px;
border-radius: 2px;
cursor: pointer;
&.active {
color: #fff;
background-color: $main-color;
}
}
}
}
.station { .station {
min-height: calc(100vh - 520px); min-height: calc(100vh - 520px);
background: url(../../../assets/img/station1.png) (top left) / auto no-repeat, background: url(../../../assets/img/station1.png) (top left) / auto no-repeat,

@ -51,7 +51,8 @@
</div> </div>
<div class="catalog"> <div class="catalog">
<div v-if="mallId" class="m-b-20"> <div v-if="mallId" class="m-b-20">
<el-button v-if="!overdue" class="entry" type="primary" size="small" @click="showBuy">续费</el-button> <el-button v-if="mallId && !overdue" class="entry" type="primary" size="small"
@click="showBuy">续费</el-button>
<el-button v-if="practiceTheoreticalPaper" class="entry" type="primary" @click="entry(1)">进入理论</el-button> <el-button v-if="practiceTheoreticalPaper" class="entry" type="primary" @click="entry(1)">进入理论</el-button>
<el-button v-if="practicePracticeProject" class="entry" type="primary" @click="entry(0)">进入实训</el-button> <el-button v-if="practicePracticeProject" class="entry" type="primary" @click="entry(0)">进入实训</el-button>
</div> </div>
@ -449,7 +450,7 @@ export default {
const { query } = this.$route const { query } = this.$route
this.fromAdmin ? this.fromAdmin ?
this.$router.back() : this.$router.back() :
this.mallId ? this.$router.push(`/station?keyword=${query.keyword || ''}&active=${query.active || 0}`) : this.$router.back() (this.mallId || query.typeActive) ? this.$router.push(`/station?keyword=${query.keyword || ''}&active=${query.active || 0}&typeActive=${query.typeActive || 0}`) : this.$router.back()
}, },
init () { init () {
this.insertScript() this.insertScript()
@ -473,7 +474,7 @@ export default {
}, },
// 使 // 使
async addRecord () { async addRecord () {
await this.$post(`${this.api.recordRecentUsage}?mallId=${this.mallId}`) await this.$post(`${this.api.recordRecentUsage}?mallId=${this.mallId}&cid=${this.courseId}`)
}, },
// //
async getStatus () { async getStatus () {
@ -483,9 +484,9 @@ export default {
}) })
// 10-1 // 10-1
this.overdue = isRenew this.overdue = isRenew
this.getProgress()
} }
this.getChapter() this.getChapter()
this.getProgress()
}, },
// //
async getChapter () { async getChapter () {

@ -16,7 +16,7 @@
<div> <div>
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<h6 class="p-title" style="margin-bottom: 0">学生组织架构</h6> <h6 class="p-title" style="margin-bottom: 0">学生组织架构</h6>
<el-button v-auth="'学生组织架构添加'" type="text" @click="handleAdd">添加</el-button> <el-button v-auth="'/student/list:学生组织架构添加'" type="text" @click="handleAdd">添加</el-button>
</div> </div>
<div style="height: 504px; max-height: 504px; overflow: auto"> <div style="height: 504px; max-height: 504px; overflow: auto">
@ -27,11 +27,11 @@
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span class="name" :title="node.label">{{ node.label }}</span> <span class="name" :title="node.label">{{ node.label }}</span>
<span> <span>
<el-button v-auth="'学生组织架构编辑'" type="text" icon="el-icon-edit-outline" <el-button v-auth="'/student/list:学生组织架构编辑'" type="text" icon="el-icon-edit-outline"
@click="() => handleEdit(node, data)"> @click="() => handleEdit(node, data)">
</el-button> </el-button>
<el-button v-auth="'学生组织架构添加'" v-if="node.level < 3" type="text" icon="el-icon-circle-plus-outline" <el-button v-auth="'/student/list:学生组织架构添加'" v-if="node.level < 3" type="text"
@click="() => handleAdd(node, data)"> icon="el-icon-circle-plus-outline" @click="() => handleAdd(node, data)">
</el-button> </el-button>
</span> </span>
</span> </span>
@ -71,9 +71,9 @@
</ul> </ul>
<div> <div>
<el-button type="info" @click="batchGenerate">一键批量生成账号</el-button> <el-button type="info" @click="batchGenerate">一键批量生成账号</el-button>
<el-button type="info" v-auth @click="addStudent">新增学生</el-button> <el-button type="info" v-auth="'/student/list:新增学生'" @click="addStudent">新增学生</el-button>
<el-button type="primary" v-auth @click="batchImport">批量导入</el-button> <el-button type="primary" v-auth="'/student/list:批量导入'" @click="batchImport">批量导入</el-button>
<el-button type="primary" v-auth @click="delAllSelection">批量删除</el-button> <el-button type="primary" v-auth="'/student/list:批量删除'" @click="delAllSelection">批量删除</el-button>
</div> </div>
</div> </div>
@ -95,12 +95,13 @@
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="180"></el-table-column> <el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="180"></el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth v-if="isRemove" type="text" @click="removeStudent(scope.row)">移除</el-button> <el-button v-auth="'/student/list:移除'" v-if="isRemove" type="text"
<el-button v-auth type="text" @click="editStudent(scope.row, true)">查看</el-button> @click="removeStudent(scope.row)">移除</el-button>
<el-button v-auth type="text" @click="editStudent(scope.row, false)">编辑</el-button> <el-button v-auth="'/student/list:查看'" type="text" @click="editStudent(scope.row, true)">查看</el-button>
<el-button v-auth type="text" @click="resetPassword(scope.row)">重置密码</el-button> <el-button v-auth="'/student/list:编辑'" type="text" @click="editStudent(scope.row, false)">编辑</el-button>
<el-button v-auth type="text" @click="handleDelete(scope.row)">删除</el-button> <el-button v-auth="'/student/list:重置密码'" type="text" @click="resetPassword(scope.row)">重置密码</el-button>
<el-switch v-auth="'禁用'" v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" <el-button v-auth="'/student/list:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-switch v-auth="'/student/list:禁用'" v-model="scope.row.isEnable" :active-value="1" :inactive-value="0"
style="margin: 0 5px" @change="switchOff(scope.row)"></el-switch> style="margin: 0 5px" @change="switchOff(scope.row)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
@ -148,7 +149,7 @@
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span style="display: inline-block; margin-right: 20px">{{ node.label }}</span> <span style="display: inline-block; margin-right: 20px">{{ node.label }}</span>
<span> <span>
<el-button v-auth="'学生组织架构添加'" v-if="node.level < 3" type="text" <el-button v-auth="'/student/list:学生组织架构添加'" v-if="node.level < 3" type="text"
icon="el-icon-circle-plus-outline" @click="() => handleAdd(node, data)"> icon="el-icon-circle-plus-outline" @click="() => handleAdd(node, data)">
</el-button> </el-button>
</span> </span>

@ -8,8 +8,8 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button v-auth="'角色权限:新增角色'" type="info" round @click="addRole">新增角色</el-button> <el-button v-auth="'/system/list:角色权限:新增角色'" type="info" round @click="addRole">新增角色</el-button>
<el-button v-auth="'角色权限:批量删除'" type="primary" round @click="delAllSelection">批量删除</el-button> <el-button v-auth="'/system/list:角色权限:批量删除'" type="primary" round @click="delAllSelection">批量删除</el-button>
</div> </div>
</div> </div>
@ -27,11 +27,13 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'角色权限:查看'" type="text" @click="showRole(scope.row)">查看</el-button> <el-button v-auth="'/system/list:角色权限:查看'" type="text" @click="showRole(scope.row)">查看</el-button>
<!-- v-if="scope.row.roleName !== '超级管理员'" --> <!-- v-if="scope.row.roleName !== '超级管理员'" -->
<el-button v-auth="'角色权限:编辑'" type="text" @click="editRole(scope.row)">编辑</el-button> <el-button v-if="scope.row.roleName !== '超级管理员'" v-auth="'/system/list:角色权限:编辑'" type="text"
<el-button v-auth="'角色权限:删除'" v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" @click="editRole(scope.row)">编辑</el-button>
type="text" @click="handleDelete(scope.row)">删除</el-button> <el-button v-auth="'/system/list:角色权限:删除'"
v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -14,9 +14,9 @@
</ul> </ul>
<div> <div>
<el-button type="info" @click="batchGenerate">一键批量生成账号</el-button> <el-button type="info" @click="batchGenerate">一键批量生成账号</el-button>
<el-button v-auth="'教师管理:新增教师'" type="info" round @click="addTeacher">新增教师</el-button> <el-button v-auth="'/system/list:教师管理:新增教师'" type="info" round @click="addTeacher">新增教师</el-button>
<el-button v-auth="'教师管理:批量导入'" type="primary" round @click="batchImport">批量导入</el-button> <el-button v-auth="'/system/list:教师管理:批量导入'" type="primary" round @click="batchImport">批量导入</el-button>
<el-button v-auth="'教师管理:批量删除'" type="primary" round @click="delAllSelection">批量删除</el-button> <el-button v-auth="'/system/list:教师管理:批量删除'" type="primary" round @click="delAllSelection">批量删除</el-button>
</div> </div>
</div> </div>
@ -35,10 +35,10 @@
<el-table-column prop="lastLoginTime" label="上次登录时间" width="160" align="center"></el-table-column> <el-table-column prop="lastLoginTime" label="上次登录时间" width="160" align="center"></el-table-column>
<el-table-column label="操作" width="200" align="center"> <el-table-column label="操作" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'教师管理:教师查看'" type="text" @click="showTeacher(scope.row)">查看</el-button> <el-button v-auth="'/system/list:教师管理:教师查看'" type="text" @click="showTeacher(scope.row)">查看</el-button>
<el-button v-auth="'教师管理:教师编辑'" type="text" @click="editTeacher(scope.row)">编辑</el-button> <el-button v-auth="'/system/list:教师管理:教师编辑'" type="text" @click="editTeacher(scope.row)">编辑</el-button>
<el-button v-auth="'教师管理:重置密码'" type="text" @click="resetPassword(scope.row)">重置密码</el-button> <el-button v-auth="'/system/list:教师管理:重置密码'" type="text" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button v-auth="'教师管理:教师删除'" type="text" @click="delTeacher(scope.row)">删除</el-button> <el-button v-auth="'/system/list:教师管理:教师删除'" type="text" @click="delTeacher(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -3,31 +3,31 @@
<div class="block"> <div class="block">
<div class="title">功能模块</div> <div class="title">功能模块</div>
<div class="apps"> <div class="apps">
<div class="app" @click="to('/assessment')"> <div class="app" v-auth="'/assessment/list'" @click="to('/assessment')">
<img src="@/assets/img/workbench/1.png" alt=""> <img src="@/assets/img/workbench/1.png" alt="">
<p class="name">考核管理</p> <p class="name">考核管理</p>
</div> </div>
<div class="app" @click="to('/achievement')"> <div class="app" v-auth="'/achievement/list'" @click="to('/achievement')">
<img src="@/assets/img/workbench/2.png" alt=""> <img src="@/assets/img/workbench/2.png" alt="">
<p class="name">成绩管理</p> <p class="name">成绩管理</p>
</div> </div>
<div class="app" @click="to('/evaluation')"> <div class="app" v-auth="'/evaluation/list'" @click="to('/evaluation')">
<img src="@/assets/img/workbench/3.png" alt=""> <img src="@/assets/img/workbench/3.png" alt="">
<p class="name">测评管理</p> <p class="name">测评管理</p>
</div> </div>
<div class="app" @click="to('/course')"> <div class="app" v-auth="'/course/list'" @click="to('/course')">
<img src="@/assets/img/workbench/4.png" alt=""> <img src="@/assets/img/workbench/4.png" alt="">
<p class="name">精品课程管理</p> <p class="name">精品课程管理</p>
</div> </div>
<div class="app" @click="to('/review')"> <div class="app" v-auth="'/review'" @click="to('/review')">
<img src="@/assets/img/workbench/5.png" alt=""> <img src="@/assets/img/workbench/5.png" alt="">
<p class="name">评阅中心</p> <p class="name">评阅中心</p>
</div> </div>
<div class="app" @click="to('/information')"> <div class="app" v-auth="'/information/list'" @click="to('/information')">
<img src="@/assets/img/workbench/6.png" alt=""> <img src="@/assets/img/workbench/6.png" alt="">
<p class="name">资讯管理</p> <p class="name">资讯管理</p>
</div> </div>
<div class="app" @click="to('/project')"> <div class="app" v-auth="'/project/list'" @click="to('/project')">
<img src="@/assets/img/workbench/7.png" alt=""> <img src="@/assets/img/workbench/7.png" alt="">
<p class="name">项目管理</p> <p class="name">项目管理</p>
</div> </div>
@ -63,18 +63,29 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
import Setting from '@/setting' import Setting from '@/setting'
export default { export default {
data () { data () {
return { return {
matchPer: false,
systems: [], systems: [],
}; };
}, },
computed: {
...mapState('auth', [
'btns'
])
},
mounted () { mounted () {
}, },
methods: { methods: {
//
async getPer () {
const { show } = await this.$get(this.api.getCustomerOrder)
this.matchPer = show
},
to (path) { to (path) {
path === 'data' ? window.open('https://www.dataforward.cn/') : this.$router.push(path) path === 'data' ? window.open('https://www.dataforward.cn/') : this.$router.push(path)
}, },

Loading…
Cancel
Save