模型、评论

Branch_d40a2540
yujialong 2 years ago
parent 743ff5e560
commit 44a321d6e1
  1. 14
      src/api/index.js
  2. BIN
      src/assets/img/love1.png
  3. BIN
      src/assets/img/love2.png
  4. 69
      src/pages/achievement/teach/index.vue
  5. 39
      src/pages/activity/list/index.vue
  6. 32
      src/pages/expSystem/backstage/compiler.vue
  7. 34
      src/pages/expSystem/backstage/index.vue
  8. 27
      src/pages/expSystem/backstage/model.vue
  9. 28
      src/pages/expSystem/backstage/modelType.vue
  10. 77
      src/pages/expSystem/backstage/sourceModel.vue
  11. 11
      src/pages/expSystem/backstage/sourceType.vue
  12. 2
      src/pages/expSystem/list/index.vue
  13. 70
      src/pages/match/manage/matchRank.vue
  14. 35
      src/pages/project/list/index.vue
  15. 159
      src/pages/station/preview/index.vue
  16. 105
      src/pages/system/list/role.vue
  17. 2
      src/setting.js
  18. 21
      src/styles/page/station.scss

@ -29,6 +29,7 @@ export default {
findLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/findById', findLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/findById',
saveLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/save', saveLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/save',
updateLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/update', updateLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/update',
maximumPracticeScoreList: 'occupationlab/occupationlab/achievement/maximumPracticeScoreList',
// 课程笔记 // 课程笔记
addNote: `nakadai/curriculumNotes/addNote`, addNote: `nakadai/curriculumNotes/addNote`,
curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`, curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`,
@ -109,6 +110,9 @@ export default {
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', editExperimentalData: 'occupationlab/occupationlab/experimentalReport/editExperimentalData',
practiceActivity: 'occupationlab/occupationlab/achievement/practiceActivity',
exportAllActivity: `${host}occupationlab/occupationlab/achievement/exportAllData`,
exportActivity: `${host}occupationlab/occupationlab/achievement/exportDataInBatches`,
// 项目管理 // 项目管理
getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统 getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统
@ -124,6 +128,8 @@ export default {
updateProjectManage: `occupationlab/occupationlab/projectManage/updateProjectManage`, // 修改项目管理 updateProjectManage: `occupationlab/occupationlab/projectManage/updateProjectManage`, // 修改项目管理
editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理 editProjectDraft: `occupationlab/occupationlab/projectManage/editProjectDraft`, // 修改项目管理
copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理 copyProjectManage: `occupationlab/occupationlab/projectManage/copyProjectManage`, // 复制项目管理
schoolCreateProjectPromptsEnabled: `occupationlab/schoolProjectHintOpen/schoolCreateProjectPromptsEnabled`,
schoolProjectPromptsEnabled: `occupationlab/schoolProjectHintOpen/schoolProjectPromptsEnabled`,
// 判分点 // 判分点
getBcJudgmentPoint: `judgment/judgment/bcJudgmentPoint/getTeacherJudgmentPoint`, // 获取编程类判分点列表(分页) getBcJudgmentPoint: `judgment/judgment/bcJudgmentPoint/getTeacherJudgmentPoint`, // 获取编程类判分点列表(分页)
@ -370,6 +376,8 @@ export default {
findActivityAnnouncement: `occupationlab/occupationlab/activity/announcement/queryAnnouncementDetails`, findActivityAnnouncement: `occupationlab/occupationlab/activity/announcement/queryAnnouncementDetails`,
delActivityAnnouncementAnnex: `occupationlab/occupationlab/activity/announcement/annex/delete`, delActivityAnnouncementAnnex: `occupationlab/occupationlab/activity/announcement/annex/delete`,
saveActivityAnnouncementAnnex: `occupationlab/occupationlab/activity/announcement/annex/save`, saveActivityAnnouncementAnnex: `occupationlab/occupationlab/activity/announcement/annex/save`,
collectionActivity: `occupationlab/occupationlab/activity/collectionActivity`,
concernedActivity: `occupationlab/occupationlab/activity/concernedActivity`,
// 数据看板 // 数据看板
curriculumListForBeforeLogin: `nakadai/nakadai/curriculum/curriculumListForBeforeLogin`, curriculumListForBeforeLogin: `nakadai/nakadai/curriculum/curriculumListForBeforeLogin`,
@ -440,6 +448,12 @@ export default {
builtInClassificationByNakadai: `nakadai/nakadai/model/reference/builtInClassificationByNakadai`, builtInClassificationByNakadai: `nakadai/nakadai/model/reference/builtInClassificationByNakadai`,
disableModelDemo: `nakadai/nakadai/model/demo/disabledEvents`, disableModelDemo: `nakadai/nakadai/model/demo/disabledEvents`,
synchronizationMdelByOccupationlab: `nakadai/nakadai/model/reference/demo/synchronizationMdelByOccupationlab`, synchronizationMdelByOccupationlab: `nakadai/nakadai/model/reference/demo/synchronizationMdelByOccupationlab`,
controlPasteCode: `nakadai/nakadai/model/demo/controlPasteCode`,
whetherCanPaste: `nakadai/nakadai/model/demo/whetherCanPaste`,
builtInModelButtonDisplayByTeacher: `nakadai/nakadai/model/demo/builtInModelButtonDisplayByTeacher`,
displayListOrNotByTeacher: `nakadai/nakadai/model/demo/displayListOrNotByTeacher`,
builtInModelStateByTeacher: `nakadai/nakadai/model/demo/builtInModelStateByTeacher`,
modelRedis: `nakadai/nakadai/model/demo/getRedisCache`,
// 教师评语 // 教师评语
addComment: `evaluation/cevaluation/comment/addComment`, addComment: `evaluation/cevaluation/comment/addComment`,

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

@ -87,6 +87,7 @@
</div> </div>
<template v-if="curTab == 0"> <template v-if="curTab == 0">
<el-table :data="listData" <el-table :data="listData"
:key="1"
class="table" class="table"
ref="table" ref="table"
stripe stripe
@ -166,6 +167,7 @@
</template> </template>
<template v-else> <template v-else>
<el-table :data="activations" <el-table :data="activations"
:key="2"
ref="table" ref="table"
stripe stripe
header-align="center" header-align="center"
@ -196,19 +198,19 @@
label="学号" label="学号"
min-width="100" min-width="100"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="score" <el-table-column prop="practiceNum"
label="练习次数" label="练习次数"
min-width="90" min-width="90"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="score" <el-table-column prop="avgScore"
label="实验平均分" label="实验平均分"
min-width="90" min-width="90"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="score" <el-table-column prop="highestScore"
label="实验最高分" label="实验最高分"
min-width="90" min-width="90"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="score" <el-table-column prop="lowestMark"
label="实验最低分" label="实验最低分"
min-width="90" min-width="90"
align="center"></el-table-column> align="center"></el-table-column>
@ -217,7 +219,7 @@
min-width="90" min-width="90"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.timeSum }}min {{ scope.row.theLongestTime }}min
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="timeSum" <el-table-column prop="timeSum"
@ -225,24 +227,14 @@
min-width="90" min-width="90"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.timeSum }}min {{ scope.row.shortestTime }}min
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitTime" <el-table-column prop="lastSubmissionTime"
label="提交时间" label="最近提交时间"
min-width="150" min-width="150"
align="center"> align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作"
align="center"
width="160">
<template slot-scope="scope">
<el-button type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background
@ -340,7 +332,7 @@ export default {
}, },
// tab // tab
tabChange () { tabChange () {
this.curTab == 1 && this.getActivity()
}, },
// //
async getData () { async getData () {
@ -361,6 +353,13 @@ export default {
this.getChart() this.getChart()
this.errorChart() this.errorChart()
}, },
//
async getActivity () {
//
const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}`)
this.activations = message.records
this.total = message.total
},
initData () { initData () {
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
this.page = 1; this.page = 1;
@ -466,24 +465,28 @@ export default {
}, },
// () // ()
exportDataActivation () { async exportDataActivation () {
// const list = this.multipleSelectionActivation
let url = this.permissions let res
? `${this.api.exportAssessmentInfo}?assessmentId=${this.id}&classId=${this.classId}` if (list.length) {
: `${this.api.exportPracticeInfo}?projectId=${this.id}` list.forEach((e, i) => {
// id e.rownum = i + 1
if (this.multipleSelection.length) { })
const ids = this.multipleSelection.map(e => e.reportId) res = await axios.post(this.api.exportActivity, list, {
url += `&ids=${ids.toString()}`
}
axios.get(url, {
headers: { headers: {
token: this.token token: this.token
}, },
responseType: 'blob' responseType: 'blob'
}).then((res) => { })
util.downloadFileDirect(`学生${this.permissions ? '考核' : '练习'}成绩.xls`, new Blob([res.data])) } else {
}).catch(res => { }) res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}`, {
headers: {
token: this.token
},
responseType: 'blob'
})
}
util.downloadFileDirect(`活跃度.xls`, new Blob([res.data]))
}, },
getChart () { // 线 getChart () { // 线
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

@ -63,6 +63,18 @@
<span class="val">{{ item.initiator }}</span> <span class="val">{{ item.initiator }}</span>
</div> </div>
</template> </template>
<div class="m-t-20"
@click.stop="follow(item)">
<template v-if="item.collectionStatus">
<img class="m-r-5"
src="@/assets/img/love2.png"
alt="">
{{ item.collectorsNum }}人关注
</template>
<img v-else
src="@/assets/img/love1.png"
alt="">
</div>
</div> </div>
</div> </div>
</div> </div>
@ -145,6 +157,10 @@ export default {
{ {
id: 0, id: 0,
name: "已报名" name: "已报名"
},
{
id: 1,
name: "已关注项目"
} }
], ],
form: { form: {
@ -193,22 +209,21 @@ export default {
methods: { methods: {
getList () { getList () {
this.clearTimer() this.clearTimer()
const { form } = this
const data = { const data = {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
platformSource: 1, platformSource: 2,
keyWords: this.keyword, keyWords: this.keyword,
...this.form ...form
} }
this.$post(this.api.schoolActivities, data).then(({ data }) => { if (form.whetherToSignUp) data.whetherToSignUp = ''
this.$post(this.api[form.whetherToSignUp ? 'concernedActivity' : 'schoolActivities'], data).then(({ data }) => {
const { records } = data const { records } = data
this.listData = records this.listData = records
this.totals = data.total this.totals = data.total
this.handleStatus() this.handleStatus()
// this.loadIns.close(); }).catch(res => { })
}).catch(res => {
// this.loadIns.close()
})
}, },
// //
handleStatus () { handleStatus () {
@ -266,10 +281,10 @@ export default {
getData () { getData () {
// this.loadIns = Loading.service() // this.loadIns = Loading.service()
this.getList() this.getList()
// if (!Setting.isDev) { if (!Setting.isDev) {
clearInterval(this.redisTimer) clearInterval(this.redisTimer)
this.redisTimer = setInterval(this.getRedis, 1000) this.redisTimer = setInterval(this.getRedis, 1000)
// } }
}, },
initData () { initData () {
this.page = 1 this.page = 1
@ -305,6 +320,12 @@ export default {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
//
follow ({ id, collectionStatus }) {
this.$post(`${this.api.collectionActivity}?activityId=${id}&state=${collectionStatus ? 0 : 1}`).then(res => {
this.getData()
}).catch(res => { })
},
// //
signupSubmit () { signupSubmit () {

@ -7,12 +7,10 @@
<div class="line"> <div class="line">
<span class="field">粘贴代码</span> <span class="field">粘贴代码</span>
<div class="field"> <div class="field">
<el-switch v-model="isOpen" <el-switch v-model="isShow"
:active-text="isOpen ? '关闭' : '启用'" :active-text="isShow ? '启用' : '关闭'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px" style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"></el-switch> @change="switchOff"></el-switch>
</div> </div>
</div> </div>
@ -23,19 +21,23 @@ export default {
data () { data () {
return { return {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
isOpen: 0 isShow: false
}; };
}, },
mounted () { }, mounted () {
this.getStatus()
},
methods: { methods: {
//
switchOff (row) { getStatus () {
// this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => { this.$post(`${this.api.whetherCanPaste}?systemId=${this.systemId}`).then(res => {
// util.successMsg(""); this.isShow = res.data == 'true' ? true : fale
// this.getData(); }).catch(err => { })
// }).catch(err => { },
// console.log(err); switchOff () {
// }); this.$post(`${this.api.controlPasteCode}?isShow=${this.isShow}&systemId=${this.systemId}`).then(res => {
this.getStatus()
}).catch(err => { })
}, },
} }
}; };

@ -23,30 +23,47 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
import Setting from '@/setting'
import model from "./model"; import model from "./model";
import sourceModel from "./sourceModel"; import sourceModel from "./sourceModel";
import compiler from "./compiler"; import compiler from "./compiler";
export default { export default {
data () { data () {
return { return {
systemId: this.$route.query.systemId,
active: this.$route.query.type || 'model', active: this.$route.query.type || 'model',
tabs: { tabs: {
model: "模型列表管理", model: "模型列表管理",
sourceModel: "源模型管理", sourceModel: "源模型管理",
compiler: '编译器管理' compiler: '编译器管理'
} },
modelIsShow: false
}; };
}, },
computed: { computed: {
...mapState('auth', [
'btns'
])
}, },
components: { components: {
model, model,
sourceModel, sourceModel,
compiler compiler
}, },
created () { }, created () {
this.getModelStatus()
},
methods: { methods: {
initTabs () {
const { btns } = this
const tab1 = btns.includes('/expSystem/list:进入:模型列表管理')
const tab2 = btns.includes('/expSystem/list:进入:源模型管理')
const tab3 = btns.includes('/expSystem/list:进入:编译器管理')
tab1 || delete this.tabs.model
tab2 || delete this.tabs.sourceModel
tab3 || delete this.tabs.compiler
},
tabChange (index) { tabChange (index) {
this.active = index this.active = index
this.$router.push({ this.$router.push({
@ -59,6 +76,17 @@ export default {
} }
}) })
}, },
//
getModelStatus () {
this.$post(`${this.api.builtInModelStateByTeacher}?systemId=${this.systemId}`).then(res => {
if (res.message == 'false') {
this.$delete(this.tabs, 'model')
this.$delete(this.tabs, 'sourceModel')
this.active = 'compiler'
}
Setting.dynamicRoute && this.initTabs()
}).catch(res => { })
},
back () { back () {
this.$router.push('list') this.$router.push('list')
} }

@ -18,10 +18,12 @@
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" <el-button v-auth="'/expSystem/list:进入:模型列表管理:导入模型'"
type="primary"
round round
@click="add">导入模型</el-button> @click="add">导入模型</el-button>
<el-button type="primary" <el-button v-auth="'/expSystem/list:进入:模型列表管理:批量移除'"
type="primary"
round round
@click="batchDel">批量移除</el-button> @click="batchDel">批量移除</el-button>
</div> </div>
@ -61,9 +63,11 @@
width="200" width="200"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:模型列表管理:查看'"
type="text"
@click="show(scope.row)">查看</el-button> @click="show(scope.row)">查看</el-button>
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:模型列表管理:移除'"
type="text"
@click="del(scope.row)">移除</el-button> @click="del(scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -106,6 +110,7 @@
</template> </template>
<script> <script>
import org from "./modelType" import org from "./modelType"
import Setting from '@/setting'
export default { export default {
data () { data () {
return { return {
@ -172,10 +177,20 @@ export default {
getData () { getData () {
clearInterval(this.timer) clearInterval(this.timer)
this.getList() this.getList()
// this.timer = setInterval(this.getList, 1000) if (!Setting.isDev) {
this.timer = setInterval(this.getRedis, 1000)
}
},
// redis
getRedis () {
this.$post(this.api.modelRedis).then(({ data }) => {
if (data) {
localStorage.getItem('modelAdmin') !== data && this.getList() // redis
localStorage.setItem('modelAdmin', data)
}
}).catch(res => { })
}, },
initData () { initData () {
this.$refs.table.clearSelection()
this.page = 1 this.page = 1
this.getData() this.getData()
}, },

@ -2,17 +2,18 @@
<div> <div>
<div> <div>
<div class="front-switch"> <div class="front-switch">
<el-switch v-model="modelIsShow" <el-switch v-auth="'/expSystem/list:进入:模型列表管理:内置模型按钮前台展示'"
:active-value="0" v-model="modelIsShow"
:inactive-value="1"
active-text="内置模型按钮前台展示" active-text="内置模型按钮前台展示"
@change="changeModelStatus"></el-switch> @change="changeModelStatus"></el-switch>
</div> </div>
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:模型列表管理:同步原始模型列表'"
type="text"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="syncModel">同步原始模型列表</el-button> @click="syncModel">同步原始模型列表</el-button>
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:模型列表管理:新增分类'"
type="text"
@click="addType(0)">添加</el-button> @click="addType(0)">添加</el-button>
</div> </div>
<org-tree v-if="orgList.length" <org-tree v-if="orgList.length"
@ -28,15 +29,18 @@
slot-scope="{ node, data }"> 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 type="text" <el-button v-auth="'/expSystem/list:进入:模型列表管理:编辑分类'"
type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
@click="editType(data)"> @click="editType(data)">
</el-button> </el-button>
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:模型列表管理:新增分类'"
type="text"
icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline"
@click="addType(node, data)"> @click="addType(node, data)">
</el-button> </el-button>
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:模型列表管理:删除分类'"
type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="delType(data)"> @click="delType(data)">
</el-button> </el-button>
@ -122,13 +126,15 @@ export default {
}, },
// //
getModelStatus () { getModelStatus () {
this.$post(`${this.api.checkIsShowBySystemId}?systemId=${this.systemId}`).then(res => { this.$post(`${this.api.displayListOrNotByTeacher}?systemId=${this.systemId}`).then(res => {
this.modelIsShow = res.isShow // 0 1 this.modelIsShow = res.teacherButtonStatus == 'true' ? true : fale
}).catch(res => { }) }).catch(res => { })
}, },
// //
changeModelStatus (val) { changeModelStatus (val) {
this.$post(`${this.api.modifyIsShowState}?systemId=${this.systemId}&isShow=${val}`).then(res => { }).catch(res => { }) this.$post(`${this.api.builtInModelButtonDisplayByTeacher}?systemId=${this.systemId}&isShow=${val}`).then(res => {
this.getModelStatus()
}).catch(res => { })
}, },
getSingle () { getSingle () {
this.$router.push({ this.$router.push({

@ -2,7 +2,7 @@
<div class="wrap"> <div class="wrap">
<div class="side"> <div class="side">
<org ref="tree" <org ref="tree"
@initData="initData" @initData="catetoryClick"
@getData="getData"></org> @getData="getData"></org>
</div> </div>
@ -18,16 +18,20 @@
</li> </li>
</ul> </ul>
<div v-if="!isSystem"> <div v-if="!isSystem">
<el-button type="primary" <el-button v-auth="'/expSystem/list:进入:源模型管理:新增模型'"
type="primary"
round round
@click="add">新增模型</el-button> @click="add">新增模型</el-button>
<el-button type="primary" <el-button v-auth="'/expSystem/list:进入:源模型管理:批量删除'"
type="primary"
round round
@click="batchDel">批量删除</el-button> @click="batchDel">批量删除</el-button>
<el-button type="primary" <el-button v-auth="'/expSystem/list:进入:源模型管理:批量禁用'"
type="primary"
round round
@click="batchOff(1)">批量禁用</el-button> @click="batchOff(1)">批量禁用</el-button>
<el-button type="primary" <el-button v-auth="'/expSystem/list:进入:源模型管理:批量开启'"
type="primary"
round round
@click="batchOff(0)">批量开启</el-button> @click="batchOff(0)">批量开启</el-button>
</div> </div>
@ -80,13 +84,17 @@
label="操作" label="操作"
width="230"> width="230">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:源模型管理:查看'"
type="text"
@click="show(scope.row)">查看</el-button> @click="show(scope.row)">查看</el-button>
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:源模型管理:编辑'"
type="text"
@click="edit(scope.row)">编辑</el-button> @click="edit(scope.row)">编辑</el-button>
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:源模型管理:删除'"
type="text"
@click="del(scope.row)">删除</el-button> @click="del(scope.row)">删除</el-button>
<el-switch v-if="scope.row.postStatus" <el-switch v-auth="'/expSystem/list:进入:源模型管理:禁用'"
v-if="scope.row.postStatus"
v-model="scope.row.isOpen" v-model="scope.row.isOpen"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
@ -108,6 +116,7 @@
</template> </template>
<script> <script>
import org from "./sourceType" import org from "./sourceType"
import Setting from '@/setting'
export default { export default {
data () { data () {
return { return {
@ -141,14 +150,10 @@ export default {
}, },
methods: { methods: {
// //
async getList (school = 0) { async getList () {
this.isSystem = school const curNode = this.$refs.tree.$refs[this.isSystem ? 'systemTree' : 'tree'].getCurrentNode() || {}//
const curNode = this.$refs.tree.$refs[school ? 'systemTree' : 'tree'].getCurrentNode() || {}//
this.isTopLevel = !curNode.level this.isTopLevel = !curNode.level
let res let res
//
if (school) {
//
const data = { const data = {
modelName: this.keyword, modelName: this.keyword,
pageNum: this.page, pageNum: this.page,
@ -157,32 +162,46 @@ export default {
founder: 0 founder: 0
} }
if (curNode.level) data.categoryId = curNode.id if (curNode.level) data.categoryId = curNode.id
//
if (this.isSystem) {
//
res = await this.$post(this.api[!curNode.level ? 'getAllModelList' : 'referenceDemoList'], data) res = await this.$post(this.api[!curNode.level ? 'getAllModelList' : 'referenceDemoList'], data)
} else { } else {
data.founder = 1
// //
res = await this.$post(this.api.InstitutionSourceModel, { res = await this.$post(this.api.InstitutionSourceModel, data)
modelName: this.keyword, // ztOpen=1)
pageNum: this.page, res.data.records.forEach(e => {
pageSize: this.pageSize, if (e.ztOpen) e.isOpen = 1
categoryId: curNode.id,
systemId: this.systemId,
founder: 1
}) })
} }
this.listData = res.data.records this.listData = res.data.records
this.total = res.data.total this.total = res.data.total
}, },
getData (school) { getData () {
clearInterval(this.timer) clearInterval(this.timer)
this.getList(school) this.getList()
// this.timer = setInterval(() => { if (!Setting.isDev) {
// this.getList(school) this.timer = setInterval(this.getRedis, 1000)
// }, 1000) }
},
// redis
getRedis () {
this.$post(this.api.modelRedis).then(({ data }) => {
if (data) {
localStorage.getItem('modelAdmin') !== data && this.getList() // redis
localStorage.setItem('modelAdmin', data)
}
}).catch(res => { })
},
//
catetoryClick (school) {
this.isSystem = school
this.initData()
}, },
initData (school) { initData (school) {
this.$refs.table.clearSelection()
this.page = 1 this.page = 1
this.getData(school) this.getData()
}, },
// //
add () { add () {

@ -12,16 +12,19 @@
slot-scope="{ node, data }"> 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-if="node.level > 1" <el-button v-auth="'/expSystem/list:进入:源模型管理:编辑分类'"
v-if="node.level > 1"
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
@click="editType(data)"> @click="editType(data)">
</el-button> </el-button>
<el-button type="text" <el-button v-auth="'/expSystem/list:进入:源模型管理:新增分类'"
type="text"
icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline"
@click="addType(node, data)"> @click="addType(node, data)">
</el-button> </el-button>
<el-button v-if="node.level > 1" <el-button v-auth="'/expSystem/list:进入:源模型管理:删除分类'"
v-if="node.level > 1"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="delType(data)"> @click="delType(data)">
@ -98,7 +101,7 @@ export default {
const { data } = await this.$post(this.api.sourceModelClassification + '?founder=1') const { data } = await this.$post(this.api.sourceModelClassification + '?founder=1')
this.orgList = data this.orgList = data
data.length && this.$nextTick(() => { data.length && this.$nextTick(() => {
const categoryId = this.$route.query.categoryId const { categoryId } = this.$route.query
this.$refs.tree.setCurrentKey(categoryId || data[0].id) this.$refs.tree.setCurrentKey(categoryId || data[0].id)
this.$router.push({ this.$router.push({
path: 'backstage', path: 'backstage',

@ -58,7 +58,7 @@
<el-button type="text" <el-button type="text"
@click="toBackstage(scope.row)" @click="toBackstage(scope.row)"
v-if="scope.row.systemId !== '11'" v-if="scope.row.systemId !== '11'"
v-auth="'/configure:系统后台进入'">进入</el-button> v-auth>进入</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -36,14 +36,12 @@
@click="batchImport">上传文件</el-button> @click="batchImport">上传文件</el-button>
</div> </div>
<div> <div>
<!-- <el-button v-if="(type && uploadData.length) || (!type && !published) || (!type && sourceType == 1)" type="primary" @click="cancelPublish(1)">发布排名</el-button> -->
<el-button v-if="!published" <el-button v-if="!published"
type="primary" type="primary"
@click="cancelPublish(1)">发布排名</el-button> @click="cancelPublish(1)">发布排名</el-button>
<div v-else> <div v-else>
<span>{{ publishTime }}发布排名</span> <span style="margin-right: 10px">{{ publishTime }}发布排名</span>
<el-button class="m-l-5" <el-button type="primary"
type="primary"
@click="cancelPublish(0)">取消发布</el-button> @click="cancelPublish(0)">取消发布</el-button>
</div> </div>
</div> </div>
@ -299,6 +297,7 @@ export default {
sourceType: '', sourceType: '',
publishVisible: false, publishVisible: false,
publishTime: '', publishTime: '',
timeId: '',
pickerOptions: { pickerOptions: {
// //
disabledDate (time) { disabledDate (time) {
@ -321,35 +320,6 @@ export default {
methods: { methods: {
// //
getData () { getData () {
//
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => {
// const ids = this.grades.map(e => e.stageId)
// ids.pop()
// // >(:(1,0))
// whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// this.sourceType = source
// this.type = source == 1 ? 1 : 0
// }).catch(res => {})
// this.published = whetherToPublish
// this.getRank(whetherToPublish)
// }).catch(res => {})
// this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&publicationType=${this.type}`).then(({ whetherToPublish }) => {
// const ids = this.grades.map(e => e.stageId)
// ids.pop()
// // >(:(1,0))
// whetherToPublish ?
// this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
// this.sourceType = source
// this.type = source == 1 ? 1 : 0
// this.getRank(whetherToPublish)
// }).catch(res => {}) :
// this.getRank()
// this.published = whetherToPublish
// }).catch(res => {})
this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { this.$post(`${this.api.selectTheLastSortStatus}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
this.sourceType = source this.sourceType = source
this.type = source == 1 ? 1 : 0 this.type = source == 1 ? 1 : 0
@ -372,6 +342,7 @@ export default {
this.sourceType = message.total ? message.records[0].isRelease : 0 this.sourceType = message.total ? message.records[0].isRelease : 0
this.list = message.records this.list = message.records
this.total = message.total this.total = message.total
this.getPublishTime()
}).catch(res => { }) }).catch(res => { })
} else { // } else { //
if (!this.active) { if (!this.active) {
@ -388,12 +359,14 @@ export default {
this.published = publishStatus this.published = publishStatus
this.list = page this.list = page
this.total = total this.total = total
this.getPublishTime()
}).catch(res => { }) }).catch(res => { })
} else { // } else { //
this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}`).then(({ page, total, publishStatus }) => { this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}`).then(({ page, total, publishStatus }) => {
this.published = publishStatus this.published = publishStatus
this.list = page this.list = page
this.total = total this.total = total
this.getPublishTime()
}).catch(res => { }) }).catch(res => { })
} }
} }
@ -412,7 +385,6 @@ export default {
stageId: 0, stageId: 0,
stageName: '总分' stageName: '总分'
}) })
this.getPublishTime()
this.getData() this.getData()
}).catch(res => { }); }).catch(res => { });
}, },
@ -593,12 +565,17 @@ export default {
}, },
// //
async getPublishTime () { async getPublishTime () {
const res = this.$post(this.api.getCompetitionStageRankingTime, { const res = await this.$post(this.api.getCompetitionStageRankingTime, {
competitionId: this.id, competitionId: this.id,
isOverallRanking: this.active ? 0 : 1, isOverallRanking: this.active ? 0 : 1,
publicationType: this.type, publicationType: this.type,
stageId: this.active || this.stageId, stageId: this.active || this.stageId,
}) })
if (res.releaseTime) {
this.published = true
this.timeId = res.releaseTime.id
this.publishTime = res.releaseTime.releaseTime
}
}, },
// //
async publishTimeSubmit () { async publishTimeSubmit () {
@ -610,10 +587,11 @@ export default {
releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime) releaseTime: util.formatDate("yyyy-MM-dd hh:mm:ss", this.publishTime)
}) })
util.successMsg('发布成功') util.successMsg('发布成功')
this.getData()
this.publishVisible = false this.publishVisible = false
}, },
// //
cancelPublish (publish) { async cancelPublish (publish) {
const ids = this.grades.map(e => e.stageId) const ids = this.grades.map(e => e.stageId)
const stageIds = ids.splice(0, ids.length - 1) const stageIds = ids.splice(0, ids.length - 1)
const query = [] const query = []
@ -623,24 +601,22 @@ export default {
// //
// //
if (publish) { if (publish) {
// this.type ?
// this.publish()
this.publishTime = new Date() this.publishTime = new Date()
this.publishVisible = true this.publishVisible = true
// this.$post(this.api.deleteLastPublication, {
// competitionId: this.id,
// isOverallRanking: this.active ? 0 : 1,
// stageIds: this.active ? [this.active] : stageIds
// }).then(res => {
// this.publish()
// }).catch(res => {})
} else { } else {
this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`).then(res => { try {
//
if (this.timeId) {
await this.$post(`${this.api.cancelCompetitionStageRankingTime}?releaseId=${this.timeId}`)
} else {
await this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`)
}
this.publishTime = ''
this.sourceType = '' this.sourceType = ''
this.type = 0 this.type = 0
this.getData() this.getData()
util.successMsg('取消发布成功!') util.successMsg('取消发布成功!')
}).catch(res => { }) } catch (error) { }
} }
}, },
// //

@ -137,6 +137,30 @@
{{ stateKeys[scope.row.state] }} {{ stateKeys[scope.row.state] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实验提示"
width="120"
align="center">
<template slot-scope="scope">
<template v-if="scope.row.state">
<!-- 老师 -->
<el-switch v-if="scope.row.founder"
v-model="scope.row.hintOpen"
:active-text="scope.row.hintOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOffTips(scope.row, scope.row.hintOpen)"></el-switch>
<!-- 系统 -->
<el-switch v-else
v-model="scope.row.hintOpenBySchool"
:active-text="scope.row.hintOpenBySchool ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOffTips(scope.row, scope.row.hintOpenBySchool)"></el-switch>
</template>
</template>
</el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
width="300" width="300"
align="center"> align="center">
@ -440,7 +464,16 @@ export default {
this.$message.info("已取消删除"); this.$message.info("已取消删除");
}); });
}, },
switchOff (row) { // //
switchOffTips (row, val) {
//
this.$post(`${this.api[row.founder ? 'schoolCreateProjectPromptsEnabled' : 'schoolProjectPromptsEnabled']}?hintOpen=${val}&projectId=${row.projectId}`).then(res => {
util.successMsg("修改成功");
this.getData();
}).catch(err => { });
},
//
switchOff (row) {
this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => { this.$get(`${this.api.updateIsOpen}?isOpen=${row.ccupationlabOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => {
util.successMsg("更新启用状态成功"); util.successMsg("更新启用状态成功");
this.getData(); this.getData();

@ -147,12 +147,12 @@
:class="{active: item.id == active}" :class="{active: item.id == active}"
@click="tabChange(item)">{{ item.name }}</a> @click="tabChange(item)">{{ item.name }}</a>
</div> </div>
<div class="flex">
<div class="tab-content"> <div class="tab-content">
<template v-if="active === 1"> <template v-if="active === 1">
<el-card shadow="hover" <div class="page">
class="m-t-20 m-b-20">
<div v-html="briefIntroduction"></div> <div v-html="briefIntroduction"></div>
</el-card> </div>
</template> </template>
<template v-if="active === 2"> <template v-if="active === 2">
<div class="page"> <div class="page">
@ -244,7 +244,7 @@
<span class="name">{{ item.createUsername }}</span> <span class="name">{{ item.createUsername }}</span>
发表于 {{ item.createTime }} 发表于 {{ item.createTime }}
</h6> </h6>
<div class="des" <div class="m-t-8"
v-html="item.content"></div> v-html="item.content"></div>
</div> </div>
<div class="action"> <div class="action">
@ -253,11 +253,14 @@
<i v-if="deleteIdentity || item.currentAccountId == item.createAccountId" <i v-if="deleteIdentity || item.currentAccountId == item.createAccountId"
class="icon el-icon-delete" class="icon el-icon-delete"
@click="delComment(item)"></i> @click="delComment(item)"></i>
<img v-if="item.isLike"
class="icon" <template v-if="item.isLike">
<img class="icon"
src="@/assets/img/like-up.png" src="@/assets/img/like-up.png"
alt="" alt=""
@click="like(item)"> @click="like(item)">
{{ item.likeCount }}
</template>
<img v-else <img v-else
class="icon" class="icon"
src="@/assets/img/like.png" src="@/assets/img/like.png"
@ -271,7 +274,7 @@
v-model="item.replyContent" v-model="item.replyContent"
:toTop="false" :toTop="false"
:height="150" /> :height="150" />
<div class="m-t-10 text-right"> <div class="m-v-10 text-right">
<el-button type="primary" <el-button type="primary"
size="mini" size="mini"
@click="submitComment(item)">提交</el-button> @click="submitComment(item)">提交</el-button>
@ -288,8 +291,13 @@
alt=""> alt="">
<div class="texts"> <div class="texts">
<div class="name">{{reply.createUsername}}</div> <div class="name">{{reply.createUsername}}</div>
<div class="des" <div class="flex m-v-8">
v-html="reply.content"></div> <template v-if="reply.showReplyName">
回复
<span class="reply-name">@{{ reply.replyUsername }}</span>
</template>
<div v-html="reply.content"></div>
</div>
<div class="date">{{reply.createTime}}</div> <div class="date">{{reply.createTime}}</div>
</div> </div>
<div class="action"> <div class="action">
@ -298,11 +306,13 @@
<i v-if="deleteIdentity || reply.currentAccountId == reply.createAccountId" <i v-if="deleteIdentity || reply.currentAccountId == reply.createAccountId"
class="icon el-icon-delete" class="icon el-icon-delete"
@click="delComment(reply)"></i> @click="delComment(reply)"></i>
<img v-if="reply.isLike" <template v-if="reply.isLike">
class="icon" <img class="icon"
src="@/assets/img/like-up.png" src="@/assets/img/like-up.png"
alt="" alt=""
@click="like(reply)"> @click="like(reply)">
{{ reply.likeCount }}
</template>
<img v-else <img v-else
class="icon" class="icon"
src="@/assets/img/like.png" src="@/assets/img/like.png"
@ -316,7 +326,7 @@
v-model="reply.replyContent" v-model="reply.replyContent"
:toTop="false" :toTop="false"
:height="150" /> :height="150" />
<div class="m-t-10 text-right"> <div class="p-b-10 m-t-10 text-right">
<el-button type="primary" <el-button type="primary"
size="mini" size="mini"
@click="submitComment(item, reply)">提交</el-button> @click="submitComment(item, reply)">提交</el-button>
@ -324,13 +334,39 @@
</div> </div>
</li> </li>
</ul> </ul>
<div v-if="item.getCommentReplyNum" <div v-if="item.children"
class="toggle"><span @click="item.showChildren = !item.showChildren">{{item.showChildren ? '收起所有回复' : `查看所有${item.getCommentReplyNum}条回复`}} <i class="el-icon-arrow-down"></i></span></div> class="toggle"><span @click="item.showChildren = !item.showChildren">{{item.showChildren ? '收起所有回复' : `查看所有${item.children.length}条回复`}} <i class="el-icon-arrow-down"></i></span></div>
</li> </li>
</ul> </ul>
</div> </div>
</template> </template>
</div> </div>
<div class="rank">
<el-select style="width: 100%"
v-model="archProject"
placeholder="请选择"
@change="getMaximumScore">
<el-option v-for="(item, i) in progressList"
:key="i"
:label="item.projectName"
:value="item.projectId"></el-option>
</el-select>
<div v-if="maximumScores.length"
class="arches">
<div v-for="(item, i) in maximumScores"
:key="i"
class="line">
<div>
<img :src="item.userAvatars"
alt=""
class="avatar">
<span class="name">{{ item.userName }}</span>
</div>
<span class="point">{{ item.highestScore }}</span>
</div>
</div>
</div>
</div>
<el-dialog title="请选择项目" <el-dialog title="请选择项目"
v-loading="loading" v-loading="loading"
@ -470,7 +506,9 @@ export default {
comments: [], comments: [],
comment: '', comment: '',
deleteIdentity: false, deleteIdentity: false,
archProject: '' archProject: '',
curReplyId: '',
maximumScores: []
}; };
}, },
computed: { computed: {
@ -547,16 +585,27 @@ export default {
const section = this.section === undefined ? 0 : +this.section const section = this.section === undefined ? 0 : +this.section
const clist = this.chapterList[chapter] const clist = this.chapterList[chapter]
if (this.chapterList.length && clist.subsectionList && clist.subsectionList.length && !this.commentId) { if (this.chapterList.length && clist.subsectionList && clist.subsectionList.length && !this.commentId) {
this.preview(clist.subsectionList[section], clist.name, 1); // this.preview(clist.subsectionList[section], clist.name, 1);
} }
}, },
// //
async getProgress () { async getProgress () {
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}`); let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}`);
this.progressList = res.list this.progressList = res.list
if (res.list.length) this.archProject = res.list[0].projectId
this.maximumScores.length || this.getMaximumScore()
this.plan = res.plan this.plan = res.plan
this.schedule = +(res.schedule.replace('%', '')) this.schedule = +(res.schedule.replace('%', ''))
}, },
//
async getMaximumScore () {
let { message } = await this.$post(`${this.api.maximumPracticeScoreList}?projectId=${this.archProject}&pageNum=1&pageSize=1000`);
const list = message.records
list.forEach(e => {
if (!e.userAvatars) e.userAvatars = 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
})
this.maximumScores = list
},
// //
percentFormat (val) { percentFormat (val) {
return this.plan return this.plan
@ -623,25 +672,35 @@ export default {
const list = res.rootComments const list = res.rootComments
this.handleComments(list) this.handleComments(list)
this.comments = list this.comments = list
this.$nextTick(async () => {
if (this.curReplyId) {
const el = document.querySelector('#comment' + this.curReplyId)
el && el.scrollIntoView(false)
}
if (this.commentId) { if (this.commentId) {
this.active = 4 this.active = 4
this.$nextTick(async () => { const el = document.getElementById('comment' + this.commentId)
document.getElementById('comment' + this.commentId).scrollIntoView(false) el && el.scrollIntoView(false)
await this.$post(`${this.api.noticeRead}?isRead=1&notifyId=${this.notifyId}`) await this.$post(`${this.api.noticeRead}?isRead=1&notifyId=${this.notifyId}`) //
}) this.commentId = ''
} }
})
}).catch(res => { }) }).catch(res => { })
}, },
// //
handleComments (list, parent = {}) { handleComments (list, parent = {}) {
list.forEach(e => { list.forEach(e => {
if (!e.createUserAvatars) e.createUserAvatars = 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png' if (!e.createUserAvatars) e.createUserAvatars = 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
e.getCommentReplyNum = e.children && e.children.length
e.showChildren = false e.showChildren = false
if (e.commentId == this.commentId) parent.showChildren = true if (e.commentId == this.commentId) parent.showChildren = true
if (e.commentId == this.curReplyId) e.showChildren = true
e.showReply = false e.showReply = false
e.replyContent = '' e.replyContent = ''
e.children && this.handleComments(e.children, e) if (e.children && e.children.length && parent.children) {
e.children.forEach(n => n.showReplyName = true)
parent.children.push(...e.children)
}
e.children && this.handleComments(e.children, parent.commentId ? parent : e)
}) })
}, },
// //
@ -671,6 +730,7 @@ export default {
status: row ? 2 : 1 status: row ? 2 : 1
}).then(res => { }).then(res => {
this.comment = '' this.comment = ''
this.curReplyId = row ? row.commentId : ''
this.getComment() this.getComment()
}).catch(res => { }) }).catch(res => { })
}, },
@ -926,7 +986,7 @@ export default {
@import '../../../styles/page/station.scss'; @import '../../../styles/page/station.scss';
$height: 700px; $height: 700px;
.page { .page {
margin: 12px 0; border-radius: 0;
.intro { .intro {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
@ -1218,10 +1278,36 @@ $height: 700px;
margin: 0 auto; margin: 0 auto;
} }
} }
.tabs {
margin-bottom: 10px;
}
.tab-content { .tab-content {
width: 80%; width: 80%;
} }
.rank {
width: calc(20% - 12px);
padding: 20px;
margin-left: 12px;
background-color: #fff;
.arches {
margin-top: 20px;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.avatar {
width: 35px;
height: 35px;
margin-right: 10px;
}
.point {
font-weight: 600;
color: #9278ff;
}
}
/deep/.project-dia { /deep/.project-dia {
.el-dialog__body { .el-dialog__body {
padding: 28px 32px; padding: 28px 32px;
@ -1263,29 +1349,4 @@ $height: 700px;
color: #333; color: #333;
} }
} }
.rank {
width: 296px;
padding: 20px;
margin: 12px 0 0 12px;
background-color: #fff;
.arches {
margin-top: 20px;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.avatar {
width: 35px;
height: 35px;
margin-right: 10px;
}
.point {
font-weight: 600;
color: #007eff;
}
}
</style> </style>

@ -4,48 +4,103 @@
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入角色名称"
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button v-auth="'角色权限:新增角色'" type="info" round @click="addRole">新增角色</el-button> <el-button v-auth="'角色权限:新增角色'"
<el-button v-auth="'角色权限:批量删除'" type="primary" round @click="delAllSelection">批量删除</el-button> type="info"
round
@click="addRole">新增角色</el-button>
<el-button v-auth="'角色权限:批量删除'"
type="primary"
round
@click="delAllSelection">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys"> <el-table :data="listData"
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column> class="table"
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> ref="table"
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column> stripe
<el-table-column label="角色描述" min-width="400" align="center"> header-align="center"
@selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="selection"
width="55"
align="center"
:selectable="practiceSelectable"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="roleName"
label="角色名称"
align="center"
min-width="250"
show-overflow-tooltip></el-table-column>
<el-table-column label="角色描述"
min-width="400"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input> <el-input placeholder="该角色用于管理全部功能权限"
v-model="scope.row.remark"
disabled></el-input>
</template> </template>
</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="'角色权限:查看'"
<el-button v-auth="'角色权限:编辑'" v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)">编辑</el-button> type="text"
<el-button v-auth="'角色权限:删除'" v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)">删除</el-button> @click="showRole(scope.row)">查看</el-button>
<el-button v-auth="'角色权限:编辑'"
v-if="scope.row.roleName !== '超级管理员'"
type="text"
@click="editRole(scope.row)">编辑</el-button>
<el-button v-auth="'角色权限:删除'"
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>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false"> <el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')"
<el-form ref="form" label-width="80px" :disabled="isDetail"> :visible.sync="roleVisible"
width="30%"
@close="closeRole"
class="dialog"
:close-on-click-modal="false">
<el-form ref="form"
label-width="80px"
:disabled="isDetail">
<el-form-item label="角色名称"> <el-form-item label="角色名称">
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input> <el-input v-model="form.roleName"
placeholder="请输入角色名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="角色描述"> <el-form-item label="角色描述">
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input> <el-input v-model="form.remark"
placeholder="请输入角色描述"
type="textarea"
rows="5"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="role" label="角色权限"> <el-form-item prop="role"
label="角色权限">
<div style="max-height: 300px; overflow: auto"> <div style="max-height: 300px; overflow: auto">
<el-tree <el-tree ref="per"
ref="per"
:data="permissions" :data="permissions"
show-checkbox show-checkbox
default-expand-all default-expand-all
@ -57,9 +112,12 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail"> <span slot="footer"
class="dialog-footer"
v-if="!isDetail">
<el-button @click="roleVisible = false"> </el-button> <el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button> <el-button type="primary"
@click="saveData"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -267,5 +325,4 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

@ -87,7 +87,7 @@ const Setting = {
// 相同路由,不同参数间进行切换,是否强力更新 // 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false, sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮) // 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
dynamicRoute: false, dynamicRoute: true,
// 文件上传 // 文件上传
upload: { upload: {
apiURL: uploadURL, apiURL: uploadURL,

@ -22,25 +22,25 @@
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
font-size: 16px; font-size: 16px;
} }
.des{
margin: 8px 0;
}
.date { .date {
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
font-size: 14px; font-size: 14px;
} }
} }
.reply-name {
color: #9076ff;
}
.action { .action {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
margin-top: 15px; margin: 15px 10px 0 0;
.icon { .icon {
margin: 0 5px; margin: 0 5px;
color: $main-color; color: $main-color;
font-size: 18px; font-size: 18px;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: .8; opacity: 0.8;
} }
&:first-child { &:first-child {
margin-right: 5px; margin-right: 5px;
@ -101,10 +101,11 @@
display: inline-block; display: inline-block;
margin-left: -12.5%; margin-left: -12.5%;
font-size: 14px; font-size: 14px;
color: #9076FF; color: #9076ff;
} }
.draft { .draft {
.ver, .sign { .ver,
.sign {
color: #b1b1b1; color: #b1b1b1;
} }
} }
@ -115,7 +116,7 @@
padding-bottom: 10px; padding-bottom: 10px;
margin: -22px 0 20px; margin: -22px 0 20px;
font-size: 18px; font-size: 18px;
color: #9076FF; color: #9076ff;
border-bottom: 1px dashed #bfbfbf; border-bottom: 1px dashed #bfbfbf;
} }
.withdraw { .withdraw {
@ -128,10 +129,10 @@
i { i {
margin-left: 8px; margin-left: 8px;
font-size: 14px; font-size: 14px;
color: #9076FF; color: #9076ff;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
opacity: .9; opacity: 0.9;
} }
} }
} }

Loading…
Cancel
Save