dev_202412
yujialong 2 months ago
parent 8f99871ad7
commit f2b6fb204f
  1. 2
      src/components/Navbar.vue
  2. 16
      src/components/Sidebar.vue
  3. 8
      src/views/Home.vue
  4. 25
      src/views/course/Curriculum.vue
  5. 14
      src/views/match/add/index.vue
  6. 6
      src/views/match/list/index.vue
  7. 2
      src/views/parner/staff.vue
  8. 12
      src/views/serve/Configure.vue

@ -79,7 +79,6 @@ export default {
} }
}, },
mounted () { mounted () {
// sessionStorage.getItem('sideBar') && this.handleSelect(sessionStorage.getItem('sideBar'))
sessionStorage.getItem('token') && this.getPer() // sessionStorage.getItem('token') && this.getPer() //
}, },
methods: { methods: {
@ -88,7 +87,6 @@ export default {
this.$store.commit('setInfoTab', '1') this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '') this.$store.commit('setColumnId', '')
this.$store.commit('setCompetitionCache', null) this.$store.commit('setCompetitionCache', null)
sessionStorage.setItem('sideBar', index)
}, },
initMenu () { initMenu () {
if (Setting.dynamicRoute) { if (Setting.dynamicRoute) {

@ -31,8 +31,10 @@
<script> <script>
export default { export default {
props: ['path'],
data () { data () {
return { return {
active: '',
menus: [ menus: [
{ {
index: '1', index: '1',
@ -123,17 +125,14 @@ export default {
] ]
}, },
], ],
onRoutes: this.$route.path
}; };
}, },
watch: { watch: {
"$route.path": function (val) { path: {
this.menuList.map(e => { handler (val) {
if (val.replace('/', '') === e.index) { this.active = val === '/configure' ? `/configure?id=${this.$route.query.id}` : val
this.handleSelect(val.replace('/', '')) },
this.$forceUpdate(); immediate: true
}
})
} }
}, },
mounted () { mounted () {
@ -156,7 +155,6 @@ export default {
transform: translateX(-200px); transform: translateX(-200px);
&.show { &.show {
transform: translateX(0); transform: translateX(0);
} }

@ -3,7 +3,7 @@
<v-head></v-head> <v-head></v-head>
<Navbar></Navbar> <Navbar></Navbar>
<div class="layout"> <div class="layout">
<Sidebar :class="{ show: showSidebar }" /> <Sidebar :class="{ show: showSidebar }" :path.sync="path" />
<div class="content-box"> <div class="content-box">
<transition name="move" mode="out-in"> <transition name="move" mode="out-in">
<router-view></router-view> <router-view></router-view>
@ -24,6 +24,7 @@ export default {
data () { data () {
return { return {
showSidebar: false, showSidebar: false,
path: '',
}; };
}, },
components: { components: {
@ -34,6 +35,7 @@ export default {
watch: { watch: {
'$route.path': { '$route.path': {
handler (val) { handler (val) {
this.path = val
// //
this.showSidebar = ['/configure', '/curriculum', '/information', '/shop', '/market', '/parnerOperation', '/parner', '/match', '/data', '/review', '/theoreticalCourse'].includes(val) this.showSidebar = ['/configure', '/curriculum', '/information', '/shop', '/market', '/parnerOperation', '/parner', '/match', '/data', '/review', '/theoreticalCourse'].includes(val)
}, },
@ -83,5 +85,9 @@ export default {
transition: left 0.3s ease-in-out; transition: left 0.3s ease-in-out;
overflow: auto; overflow: auto;
} }
.sidebar:not(.show) {
margin-left: -200px;
}
} }
</style> </style>

@ -67,29 +67,28 @@
<el-table v-loading="loading" :data="courseData" class="table" ref="table" header-align="center" <el-table v-loading="loading" :data="courseData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" :row-key="getRowKeys"> @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="70" label="序号" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column> <el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="curriculumType" label="课程类" align="center"> <el-table-column prop="curriculumType" label="课程类" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span> <span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="创建人" align="center"></el-table-column> <el-table-column prop="expectedCourse" label="预计课时" align="center"></el-table-column>
<el-table-column label="配置的实训应用" align="center"> <el-table-column label="配置的系统" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sysName }}</span> <span class="ellipsis">{{ scope.row.sysName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="curriculumName" label="内容资源" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="练习项目" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="考核项目" align="center"></el-table-column>
<el-table-column prop="curriculumName" label="状态" align="center"></el-table-column>
<el-table-column prop="orderVolume" label="订单量" align="center"></el-table-column> <el-table-column prop="orderVolume" label="订单量" align="center"></el-table-column>
<el-table-column prop="expectedCourse" label="预计课时" align="center"></el-table-column> <el-table-column prop="expectedCourse" label="创建时间" align="center"></el-table-column>
<el-table-column label="上架/下架" align="center"> <el-table-column prop="expectedCourse" label="最近编辑时间" align="center"></el-table-column>
<template slot-scope="scope"> <el-table-column prop="userName" label="编辑人" align="center"></el-table-column>
<el-switch v-model="scope.row.isShelves" :active-value="1" :inactive-value="0" <el-table-column label="操作" width="150" align="center">
@change="changeSwitch($event, scope.row)" v-auth="'/curriculum:上下架'">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> <el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button>
<el-button type="text" @click="config(scope.row)" v-auth>内容设置</el-button> <el-button type="text" @click="config(scope.row)" v-auth>内容设置</el-button>

@ -298,28 +298,28 @@ export default {
.active { .active {
.circle { .circle {
color: #fff; color: #fff;
border-color: #459ffb; border-color: #26499f;
background: #007eff; background: #062c87;
} }
.text { .text {
color: #007eff; color: #062c87;
} }
} }
.done { .done {
.circle { .circle {
color: #fff; color: #fff;
background: #9c86ff; background: #062c87;
border-color: #bbacff; border-color: #26499f;
&:after { &:after {
background: #bbacff; background: #062c87;
} }
} }
.text { .text {
color: #9178ff; color: #062c87;
} }
} }

@ -73,7 +73,7 @@
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="competitionName" label="竞赛名称" align="center"></el-table-column> <el-table-column prop="competitionName" min-width="160" label="竞赛名称" align="center"></el-table-column>
<el-table-column prop="name" label="竞赛来源" width="90" align="center"> <el-table-column prop="name" label="竞赛来源" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ sourceList.find(e => e.id === scope.row.platformSource).name }} {{ sourceList.find(e => e.id === scope.row.platformSource).name }}
@ -94,8 +94,8 @@
{{ scope.row.competitionType ? '团队赛' : '个人赛' }} {{ scope.row.competitionType ? '团队赛' : '个人赛' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="applicantNum" label="报名人数" align="center" width="100"></el-table-column> <el-table-column prop="applicantNum" label="报名人数" align="center" width="90"></el-table-column>
<el-table-column prop="status" label="状态" align="center" width="80"> <el-table-column prop="status" label="状态" align="center" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.publishStatus ? '已发布' : '未发布' }} {{ scope.row.publishStatus ? '已发布' : '未发布' }}
</template> </template>

@ -100,7 +100,7 @@
</el-table-column> </el-table-column>
</template> </template>
<el-table-column prop="loginNumber" label="登录次数" align="center" width="120"></el-table-column> <el-table-column prop="loginNumber" label="登录次数" align="center" width="120"></el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="120"></el-table-column> <el-table-column prop="lastLoginTime" label="上次登录时间" align="center" width="150"></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-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button> <el-button v-if="!type" type="text" v-auth="'/parner:账号管理:重置密码'" @click="edit(scope.row)">编辑</el-button>

@ -87,7 +87,7 @@ import qs from 'qs'
export default { export default {
data () { data () {
return { return {
id: this.$route.query.id || '', id: '',
userId: this.$store.state.userLoginId, userId: this.$store.state.userLoginId,
token: btoa(sessionStorage.getItem('token')), token: btoa(sessionStorage.getItem('token')),
form: { form: {
@ -114,15 +114,21 @@ export default {
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
},
'$route.query': {
handler (val) {
this.id = this.$route.query.id || ''
this.getData()
},
immediate: true
} }
}, },
mounted () { mounted () {
const { query } = this.$route const { query } = this.$route
if (query.page) { if (query.page) {
this.$router.push('/configure').catch(() => { }) this.$router.push(`/configure?id=${this.id}`).catch(() => { })
} }
this.getData();
}, },
methods: { methods: {
initData () { initData () {

Loading…
Cancel
Save