Commit af4c611d authored by liwei's avatar liwei

pc端修改

parent cbfcb297
......@@ -164,3 +164,10 @@ export function addRoleUser(data) {
data
})
}
export function getUserDetail(businessId) {
return request({
url: '/pc/sysuser/detail/' + businessId,
method: 'get'
})
}
......@@ -423,6 +423,44 @@ const USER_VISITOR_ROUTES = [
},
component: () =>
import('@/views/learningCenter/children/statistics')
},
{
path: 'maintenance',
name: 'maintenance',
meta: {
title: '课程维护',
activeMenu: 'maintenance',
USER_LEVEL: USER_LEVEL.USER_LOGIN,
showHeader: false,
animation: false
},
component: () =>
import('@/views/learningCenter/children/maintenance')
},
{
path: 'myStudy',
name: 'myStudy',
meta: {
title: '我的学习',
activeMenu: 'myStudy',
USER_LEVEL: USER_LEVEL.USER_LOGIN,
showHeader: false,
animation: false
},
component: () =>
import('@/views/learningCenter/children/myStudy')
},
{
path: '/learningCenter/children/updateMaintenance',
name: 'updateMaintenance',
meta: {
title: 'updateMaintenance',
USER_LEVEL: USER_LEVEL.USER_LOGIN,
showHeader: false,
animation: false,
showFooter: false
},
component: () => import('@/views/learningCenter/children/updateMaintenance.vue')
}
]
},
......
/** 公共字段*/
const commonField = {
typeParent: 'text',
typePrimary: 'primary',
typeSuccess: 'success',
typeWarning: 'warning',
queryClass: 'queryBtn', // 查询按钮class
resetClass: 'resetBtn', // 重置按钮class
addClass: 'addBtn', // 新增按钮class
updateClass: 'updateBtn', // 修改按钮class
delClass: 'delBtn', // 删除按钮class
importClass: 'importBtn', // 导入按钮class
exportClass: 'exportBtn', // 导出按钮class
addClassText: 'addBtnText', // 文字类型的新增按钮class
resetPasClass: 'resetBtnText', // 文字类型的重置按钮class
queryName: '查询',
resetName: '重置',
addName: '新增',
updateName: '修改',
deleteName: '删除',
dataPower: '数据权限',
resetPassword: '重置密码',
exportName: '导出',
importName: '导入',
cleanName: '清空',
viewName: '查看',
size: 'mini',
smallSize: 'small',
queryIcon: 'el-icon-search',
resetIcon: 'el-icon-refresh',
addIcon: 'el-icon-plus',
delIcon: 'el-icon-delete',
importIcon: 'el-icon-upload',
exportIcon: 'el-icon-download',
deleteTypePrimary: 'danger',
deleteSize: 'small',
deleteDisabled: 'ids.length === 0',
cleanTypePrimary: 'danger',
cleanSize: 'small',
miniSize: 'mini',
exportTypePrimary: 'success',
exportSize: 'small',
typeText: 'text'
}
export default commonField
......@@ -277,6 +277,21 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane name="appraise" v-if="this.$store.getters.roles[0].roleKey === 'teacher'">
<div slot="label" class="label">
<el-image
class="img"
:src="require('@/assets/image/kezi_icon_jieshao1.png')"
fit="cover"
/>
考核
</div>
<div class="introduction-box">
<div class="content">
{{ courseDetails.lessonDescription || '暂无数据' }}
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="right-group-box">
......@@ -298,7 +313,7 @@
</div>
<div class="introduction">{{ courseLecturer.details || '暂无数据' }}</div>
</div>
<div class="right-bottom-box">
<div class="right-bottom-box" v-if="this.$store.getters.roles[0].roleKey !== 'teacher'">
<div class="title">课程推荐</div>
<div class="recommendedCourse-box">
<div
......@@ -329,6 +344,48 @@
</el-button>
</div>
</div>
<div class="right-bottom-box" v-else-if="this.$store.getters.roles[0].roleKey === 'teacher'">
<div class="title">历史审批记录</div>
<div class="recommendedCourse-box">
<div
v-for="record in recordsList"
:key="record.id"
class="recommendedCourseCard"
@click="regainCourseDetails(record)"
>
<div class="picture">
<el-row :gutter="20">
<el-col :span="12">
<div class="grid-content">一级审核</div>
</el-col>
<el-col :span="12">
<div class="grid-content">2016-05-02</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="grid-content">王小虎</div>
</el-col>
<el-col :span="12">
<div class="grid-content">审核通过</div>
</el-col>
</el-row>
</div>
<!-- <div class="recommendedCourseTitle">{{ record.lessonName || '暂无数据' }}</div>-->
<!-- <div :class="'price price-' + (course.lessonPrice ? 'charge' : 'free')">-->
<!-- {{-->
<!-- formatPrice(course.lessonPrice)-->
<!-- }}-->
<!-- </div>-->
</div>
</div>
<div class="getMore">
<el-button class="enterBtn" @click="getMore">
查看更多
<i class="el-icon-d-arrow-right" />
</el-button>
</div>
</div>
</div>
</div>
</div>
......@@ -493,7 +550,24 @@ export default {
// 课程目录
courseCatalogue: [],
// 推荐课程列表数据
recommendedCoursesList: []
recommendedCoursesList: [],
recordsList: [{
rank: '一级审核',
date: '2016-05-02',
name: '王小虎',
state: '审核通过'
}, {
rank: '一级审核',
date: '2016-05-04',
name: '王小虎',
state: '审核通过'
}, {
rank: '二级审核',
date: '2016-05-01',
name: '王小虎',
state: '未通过',
desc: 'xxxxxxxxxxxxxxxxxx'
}]
}
},
computed: {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<template>
<page-layout v-loading="loading">
<el-input
slot="headerRight"
type="text"
style="width: 200px;"
@keyup.native.enter="handleQuery"
v-model="queryParams.lessonName"
placeholder="请输入课程名称"
></el-input>
<el-tabs class="tab-box" v-model="activeName" @tab-click="handleClick">
<el-tab-pane
:label="`未完成`+(courseStatisticsList[0] ? `(${courseStatisticsList[0]})` : '')"
name="first"
>
</el-tab-pane>
<el-tab-pane
:label="`已完成`+(courseStatisticsList[1] ? `(${courseStatisticsList[1]})` : '')"
name="second"
>
</el-tab-pane>
</el-tabs>
<div v-if="tableData.length">
<classesItem
v-for="(i, key) in tableData"
:item="i"
:key="key"
type="2"
refresh="loadData()"
>
</classesItem>
<div class="pagination-list" v-show="total > 0">
<pagination
:total="total"
:background="false"
layout="total, sizes, prev, pager, next, jumper"
:page.sync="queryParams.current"
:limit.sync="queryParams.rows"
@pagination="loadData"
/>
</div>
</div>
<div v-else class="no-data">
<el-image
style="width: 200px;"
:src="require('@/assets/image/zanwushujuP.png')"
/>
</div>
</page-layout>
</template>
<script>
import request from '@/utils/request'
import dictCons from '@/utils/dictCons'
export default {
name: 'Index',
components: {},
data() {
return {
listUrl: 'blesson/pagingBLesson',
activeName: 'first',
queryParams: {
isCompleteLearned: 0,
isObligatory: 1,
current: 1,
rows: 10
},
tableId: false,
loading: false,
// 显示搜索条件
showSearch: true,
// 重新渲染表格状态
refreshTable: true,
tableData: [
{
lessonName: 'sdashbdjasdghjashgd',
businessId: '123',
learnedChapterNum: 1,
chapterName: '2333',
isObligatory: '0',
allChapterNum: 29,
isExpired: '0',
tecClassify: [1, 2, 3],
difficultyClassify: 1,
lessonScore: 20,
isCompleteLearned: '1',
isCompleteExam: '0'
},
{
lessonName: 'sdashbdjasdghjashgd',
businessId: '123',
learnedChapterNum: 29,
chapterName: '',
isObligatory: '0',
allChapterNum: 29,
isExpired: '1',
tecClassify: [1, 2, 3, 4, 5, 6],
difficultyClassify: 1,
lessonScore: 20,
isCompleteLearned: '1',
isCompleteExam: '0'
}
],
total: 0,
courseStatisticsList: [0, 0, 0, 0]
}
},
computed: {},
mounted() {
this.activeName = 'first'
this.loadData()
},
methods: {
handleClick(val) {
console.log(val)
this.queryParams.current = 1
switch (val.name) {
case 'first':
this.queryParams.isCompleteLearned = 0
this.queryParams.isObligatory = 1
break
case 'second':
this.queryParams.isCompleteLearned = 1
this.queryParams.isObligatory = 1
break
case 'third':
this.queryParams.isCompleteLearned = ''
this.queryParams.isObligatory = 0
}
this.loadData()
},
/** 展开/折叠操作 */
toggleExpandAll() {
this.refreshTable = false
this.isExpandAll = !this.isExpandAll
this.$nextTick(() => {
this.refreshTable = true
})
},
resetQuery() {
// this.refs.queryForm.restForm() this.resetForm("queryForm");
this.queryParams = {
current: this.queryParams.current,
rows: this.queryParams.rows
}
this.handleQuery()
},
handleQuery() {
this.queryParams.current = 1
this.loadData()
},
loadData() {
this.loading = true
request({
url: this.listUrl,
method: 'get',
params: this.queryParams,
headers: {
// 'Content-Type': 'application/json'
'Content-Type': 'application/x-www-form-urlencode'
}
})
.then(res => {
// console.log(res.data)
// this.courseStatisticsList = res.data.courseStatisticsArray
// this.tableData = res.data.dataList.records
// this.total = res.data.dataList.total
this.courseStatisticsList = '2'
this.loading = false
})
.catch(error => {
if (error.msg) {
this.$message.error(error.msg)
}
this.loading = false
})
}
}
}
</script>
<style lang="scss" scoped>
.no-data{
::v-deep .el-image{
width: 162px;
}
}
</style>
This diff is collapsed.
......@@ -64,6 +64,22 @@
<!-- v-if="roles[0].roleKey === 'unit_leader'" -->
<span slot="title">我的小组</span>
</el-menu-item>
<el-menu-item
v-if="roles[0].roleKey === 'teacher'"
index="maintenance"
@click.native="goPage('maintenance')"
>
<!-- v-if="roles[0].roleKey === 'unit_leader'" -->
<span slot="title">课程维护</span>
</el-menu-item>
<el-menu-item
v-if="roles[0].roleKey === 'teacher'"
index="myStudy"
@click.native="goPage('myStudy')"
>
<!-- v-if="roles[0].roleKey === 'unit_leader'" -->
<span slot="title">我的学习</span>
</el-menu-item>
<el-menu-item
index="favorite"
@click.native="goPage('favorite')"
......
......@@ -55,6 +55,21 @@
<div class="item-name">组员</div>
</div>
</div>
<div class="item-list" v-if="roles[0].roleKey === 'teacher'">
<div class="item">
<div class="item-num">
<number-plus :number="unitUser ? unitUser.createLessonCount : 0" />
</div>
<div class="item-name">创建课程</div>
</div>
<div class="item">
<div class="item-num">
<number-plus :number="unitUser ? unitUser.studyLessonCount : 0" />
</div>
<div class="item-name">学习课程</div>
</div>
</div>
</div>
</div>
</template>
......
......@@ -350,7 +350,7 @@ export default {
successLogin() {
this.loading = true
this.$store.dispatch('Login', this.loginForm).then((res) => {
console.log('111111111', res)
// console.log('111111111', res)
this.loading = false
this.verify = false
if (res.code === 200) {
......
......@@ -47,6 +47,18 @@
<el-form-item v-show="roleKey==='unit_leader'||roleKey==='unit_user'" label="职位:" class="formItemSpace">
<el-input v-model="personalForm.position" />
</el-form-item>
<el-form-item v-show="roleKey==='teacher'" label="头衔:" class="formItemSpace">
<el-input v-model="personalForm.rank" />
</el-form-item>
<el-form-item v-show="roleKey==='teacher'" label="简介:" class="formItemSpace">
<el-input
v-model="personalForm.description"
type="textarea"
:rows="5"
:maxlength="500"
placeholder="输入内容"
/>
</el-form-item>
</el-form>
<div class="centerLayout">
<el-button v-loading="loading" class="submitBotton" @click="submit()">保存</el-button>
......
......@@ -9,7 +9,10 @@
</div>
<div class="name">{{ user.username }}</div>
<div class="dept">{{ user.unitName }}</div>
<div class="post"><el-tag>{{ user.identity==='1'?'管理员':(user.identity==='2'?'单位':'个人') }}</el-tag></div>
<div class="post">
<el-tag>{{ user.identity==='1'?'管理员':(user.identity==='2'?'单位':'个人') }}</el-tag>
<el-tag v-if="this.$store.getters.roles[0].roleKey === 'teacher'">讲师</el-tag>
</div>
<el-divider />
<div class="tabLayout">
<div v-for="(item,index) in tabName" :key="index" :class="item.index === selectedTab ? 'selectedTab' : 'defaultTab'" @click="selectTab(item)">
......
......@@ -93,6 +93,11 @@
<span v-if="show === 2" slot="suffix" class="inputBtn" @click="handleSendMesCode">重新获取</span>
</el-input>
</el-form-item>
<el-form-item prop="lecturerRole">
<el-checkbox v-model="checked" @change="getValuebox()">注册为讲师
<el-input placeholder="请输入真实姓名" v-model="registerForm.roleName"></el-input>
</el-checkbox>
</el-form-item>
<el-form-item>
<el-button
class="blue-btn"
......@@ -145,6 +150,7 @@ export default {
},
data() {
return {
checked: '',
obtainCode: true, // 是否可以获取验证码
codeUrl: '',
vLoading: true,
......@@ -170,7 +176,9 @@ export default {
confirmPassword: '',
phone: '',
smsCode: '',
rememberMe: false
rememberMe: false,
roleName: '',
typeOfRegistration: ''// 1为个人用户 2是讲师
},
registerFormRules: {
username: [
......@@ -215,6 +223,14 @@ export default {
this.timer = null
},
methods: {
getValuebox() {
if (this.checked === true) {
this.registerForm.typeOfRegistration = '2'
} else {
this.registerForm.typeOfRegistration = '1'
}
console.log('this.registerForm.typeOfRegistration:', this.registerForm.typeOfRegistration)
},
validatePassword(rule, value, callback) {
const types = {
lower: /[a-z]+/,
......@@ -374,13 +390,27 @@ export default {
},
successHandleRegister() {
this.loading = true
const params = {
username: this.registerForm.username,
name: this.registerForm.username,
nickName: this.registerForm.username,
password: this.registerForm.password,
phone: this.registerForm.phone,
smsCode: this.registerForm.smsCode
var params = {}
if (this.registerForm.roleName !== '' && this.registerForm.roleName !== null) {
params = {
username: this.registerForm.username,
name: this.registerForm.roleName,
nickName: this.registerForm.username,
password: this.registerForm.password,
phone: this.registerForm.phone,
smsCode: this.registerForm.smsCode,
typeOfRegistration: this.registerForm.typeOfRegistration
}
} else {
params = {
username: this.registerForm.username,
name: this.registerForm.username,
nickName: this.registerForm.username,
password: this.registerForm.password,
phone: this.registerForm.phone,
smsCode: this.registerForm.smsCode,
typeOfRegistration: this.registerForm.typeOfRegistration
}
}
register(params).then(res => {
if (res.code === 200) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment