dev_202412
yujialong 2 months ago
parent adaf3b1c13
commit 77e3ae771a
  1. 5
      src/layouts/header/index.vue
  2. 8
      src/layouts/sidebar/index.vue
  3. 3
      src/pages/account/login/index.vue
  4. 4
      src/pages/account/redirect/index.vue
  5. 2
      src/pages/achievement/info/project.vue
  6. 178
      src/pages/information/addarticle/index.vue
  7. 26
      src/pages/lesson/content/source.vue
  8. 8
      src/pages/lesson/detail/index.vue
  9. 4
      src/pages/product/show/index.vue
  10. 2
      src/pages/project/list/index.vue
  11. 5
      src/pages/resourse/list/index.vue
  12. 2
      src/pages/station/preview/index.vue
  13. 4
      src/pages/workbench/list/index.vue
  14. 12
      src/store/modules/user.js
  15. 8
      src/styles/page/station.scss

@ -14,7 +14,7 @@
<el-dropdown class="user-wrap" @command="userCommand">
<div class="user">
<el-avatar :size="40" :src="avatar"></el-avatar>
<span class="m-l-10">{{ customerName || userName }}</span>
<span class="m-l-10">{{ userName }}</span>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="person">个人中心</el-dropdown-item>
@ -67,7 +67,7 @@ export default {
},
computed: {
...mapState("user", [
"avatar", "userName", "title", "logoUrl", "customer", "customerName", 'fromClient'
"avatar", "userName", "title", "logoUrl", "customer", 'fromClient'
])
},
mounted () {
@ -169,6 +169,7 @@ export default {
const { userAvatars, userName, userId } = hrUserInfo
this.setUserId(userId)
userAvatars && this.setAvatar(userAvatars)
console.log("🚀 ~ this.$get ~ userAvatars:", userName)
this.setUserName(userName)
}
}).catch(res => { })

@ -67,10 +67,10 @@ export default {
index: '/resourse/list',
title: '资源库'
},
{
index: '/exam/list',
title: '理论考试系统'
},
// {
// index: '/exam/list',
// title: ''
// },
{
index: '/lesson/list',
title: '备课管理'

@ -103,9 +103,6 @@ export default {
...mapMutations("user", [
"SET_ROLENAME", 'SET_FROM'
]),
...mapActions("user", [
"setCustomerName"
]),
getVerImg () { //
this.loginForm.random = Math.floor(Math.random() * 999999999);
this.verificationIMG = this.api.verification + "?random=" + `${this.loginForm.random}`;

@ -22,9 +22,6 @@ export default {
...mapMutations("user", [
"SET_ROLENAME", 'SET_FROM'
]),
...mapActions("user", [
"setCustomerName"
]),
setLogin () {
this.SET_FROM(true)
Util.local.set(Setting.tokenKey, window.atob(decodeURI(this.token)), Setting.tokenExpires);
@ -39,7 +36,6 @@ export default {
},
async queryCustomer () { //
Util.successMsg('登录成功')
this.setCustomerName(Util.cookies.get('customerName'))
const path = '/product/list' //
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => {

@ -294,7 +294,7 @@ export default {
//
async getActivity () {
//
const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}}&paperId=${this.paperId}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}&paperId=${this.paperId}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.activations = message.records
this.totalActivation = message.total
},

@ -1,74 +1,41 @@
<template>
<div>
<el-card shadow="hover"
class="m-b-20">
<el-card shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="back"
:content="'新增文章'"></el-page-header>
<el-page-header @back="back" :content="'新增文章'"></el-page-header>
</div>
</el-card>
<el-card shadow="hover"
class="m-b-20">
<el-form :model="form"
:rules="rules"
ref="form"
label-width="90px"
label-suffix=":"
size="small">
<el-form-item prop="coverUrl"
label="封面图">
<el-upload class="avatar-uploader"
accept=".jpg,.png,.jpeg"
:on-remove="handleRemove"
:on-error="uploadError"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
action=""
:http-request="handleRequest">
<img v-if="form.coverUrl"
:src="form.coverUrl"
class="avatar">
<div class="uploader-default"
v-else>
<el-card shadow="hover" class="m-b-20">
<el-form :model="form" :rules="rules" ref="form" label-width="90px" label-suffix=":" size="small">
<el-form-item prop="coverUrl" label="封面图">
<el-upload class="avatar-uploader" accept=".jpg,.png,.jpeg" :on-remove="handleRemove" :on-error="uploadError"
:before-remove="beforeRemove" :limit="1" :on-exceed="handleExceed" action="" :http-request="handleRequest">
<img v-if="form.coverUrl" :src="form.coverUrl" class="avatar">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传封面</p>
</div>
</el-upload>
</el-form-item>
<el-form-item prop="author"
label="作者">
<el-form-item prop="author" label="作者">
<div class="d-inline-block">
<el-input placeholder="请输入作者"
v-model="form.author"
clearable></el-input>
<el-input placeholder="请输入作者" v-model="form.author" clearable></el-input>
</div>
</el-form-item>
<el-form-item prop="date"
label="日期">
<el-form-item prop="date" label="日期">
<div class="d-inline-block">
<el-date-picker v-model="form.date"
type="date"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期"></el-date-picker>
<el-date-picker v-model="form.date" type="date" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期"></el-date-picker>
</div>
</el-form-item>
<el-form-item prop="title"
label="文章标题">
<el-input placeholder="请输入文章标题"
v-model="form.title"
clearable></el-input>
<el-form-item prop="title" label="文章标题">
<el-input placeholder="请输入文章标题" v-model="form.title" clearable></el-input>
</el-form-item>
<el-form-item prop="content"
label="文章内容">
<quill :border="true"
v-model="form.content"
:uploading.sync="uploading"
:height="400" />
<el-form-item prop="content" label="文章内容">
<quill :border="true" v-model="form.content" :uploading.sync="uploading" :height="400" />
</el-form-item>
<el-form-item>
<el-button type="primary"
@click="save(0)">确定</el-button>
<el-button type="primary" @click="save(0)">确定</el-button>
</el-form-item>
</el-form>
</el-card>
@ -98,7 +65,7 @@ export default {
date: '',
title: '',
content: '',
createUser: this.customerName || this.userName
createUser: this.userName
},
rules: {
coverUrl: [
@ -126,7 +93,7 @@ export default {
},
computed: {
...mapState("user", [
"userName", "customerName"
"userName"
])
},
components: {
@ -231,7 +198,7 @@ export default {
this.submiting = false;
});
} else {
this.createUser = this.customerName || this.userName
this.createUser = this.userName
this.$post(this.api.addArticle, form).then(res => {
this.submiting = false;
util.successMsg("创建成功");
@ -268,70 +235,71 @@ export default {
<style lang="scss" scoped>
$avatar-width: 104px;
/deep/ .avatar-uploader {
.el-upload {
position: relative;
width: $avatar-width;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
.el-upload {
position: relative;
width: $avatar-width;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
overflow: hidden;
&:hover {
border-color: #409eff;
}
&:hover {
border-color: #409eff;
}
.uploader-default {
display: flex;
flex-direction: column;
justify-content: center;
width: $avatar-width !important;
height: $avatar-width;
text-align: center;
background: rgba(0, 0, 0, 0.04);
.uploader-default {
display: flex;
flex-direction: column;
justify-content: center;
width: $avatar-width !important;
height: $avatar-width;
text-align: center;
background: rgba(0, 0, 0, 0.04);
i {
font-size: 20px;
font-weight: bold;
color: #8c939d;
}
i {
font-size: 20px;
font-weight: bold;
color: #8c939d;
}
p {
margin-top: 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
line-height: 1;
}
}
p {
margin-top: 10px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
line-height: 1;
}
}
.avatar {
width: $avatar-width;
height: $avatar-width;
display: block;
}
.avatar {
width: $avatar-width;
height: $avatar-width;
display: block;
}
}
.el-upload__tip {
margin-top: 0;
.el-upload__tip {
margin-top: 0;
p {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
p {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
&:first-child {
margin-bottom: 5px;
}
}
&:first-child {
margin-bottom: 5px;
}
}
}
}
/deep/ .d-inline-block {
width: 216px;
width: 216px;
.el-select,
.el-input {
width: 100%;
}
.el-select,
.el-input {
width: 100%;
}
}
</style>

@ -185,6 +185,7 @@ export default {
try {
this.loading = true
this.checkAll = false
const { checked } = this
if (this.active === 'tab3') {
const { page } = await this.$post(this.api.resourceLibrary, {
pageNum: 1,
@ -196,8 +197,9 @@ export default {
})
const list = page.records
list.forEach(e => {
const cur = checked.find(m => m.resourceName && m.id === e.id)
e.name = e.resourceName
e.check = false
e.check = !!cur
})
this.sources = list
} else {
@ -212,10 +214,25 @@ export default {
n.check = false
all.push(...n.subsections)
n.subsections.forEach(m => {
m.check = false
const cur = checked.find(j => m.cid === j.cid && m.id === j.id)
m.check = !!cur
})
})
})
list.forEach(e => {
e.shrink = false
e.check = false
e.chapters.forEach(n => {
n.shrink = false
n.check = n.subsections.every(m => m.check)
})
})
list.forEach(e => {
e.shrink = false
e.check = e.chapters.every(m => m.check)
})
list[0].shrink = true
list[0].chapters[0].shrink = true
this.allSections = all
@ -227,10 +244,11 @@ export default {
}
},
initData () {
this.page = 1;
this.getData();
this.page = 1
this.getData()
},
tabChange (index) {
this.keyword = ''
this.active = index
this.getCourse()
},

@ -2,7 +2,7 @@
<div class="wrap">
<el-card shadow="hover" class="m-b-20">
<div class="flex-between">
<el-page-header @back="back" :content="(isCopy ? '复制' : cid ? '编辑' : '新建') + '课程'"></el-page-header>
<el-page-header @back="back" :content="(isCopy ? '复制' : !isAdd ? '编辑' : '新建') + '课程'"></el-page-header>
</div>
</el-card>
<div class="page">
@ -317,6 +317,7 @@ export default {
return {
cid: this.$route.query.cid,
isCopy: this.$route.query.copy,
isAdd: true,
editorConfig,
step: 1,
form: {
@ -418,6 +419,7 @@ export default {
},
mounted () {
if (this.cid) this.isAdd = false
this.getSubject()
this.cid && this.getInfoData()
},
@ -885,6 +887,10 @@ export default {
}
}
},
//
toStep (i) {
this.step = i
},
//
back () {
this.$router.push(this.$store.state.lesson.referrer || 'list')

@ -318,8 +318,8 @@ export default {
},
back () {
const { query } = this.$route
query.active ?
this.$router.push(`/station?keyword=${query.keyword || ''}&active=${query.active || 0}&typeActive=${query.typeActive || 0}&page=${query.page || 1}`) :
query.typeActive ?
this.$router.push(`/station?keyword=${query.keyword || ''}&active=${query.active || ''}&typeActive=${query.typeActive || 0}&page=${query.page || 1}`) :
this.$router.push('list')
},
}

@ -455,6 +455,8 @@ export default {
row.projectManage.systemId = this.copyMallId[1]
}
row.projectManage.projectId = ''
row.projectManage.createTime = ''
row.projectManage.updateTime = ''
row.projectManage.founder = 1
row.projectJudgmentList.forEach(i => {
i.projectId = ''

@ -73,9 +73,9 @@
<template v-if="active === 2">
<el-table-column key="1" prop="resourceDescription" min-width="160" label="资源描述"
align="center"></el-table-column>
<el-table-column key="2" prop="name" width="100" label="是否被引用" align="center">
<!-- <el-table-column key="2" prop="name" width="100" label="是否被引用" align="center">
<template slot-scope="scope">{{ scope.row.isReferenced ? '是' : '否' }}</template>
</el-table-column>
</el-table-column> -->
</template>
<template v-else>
<el-table-column key="3" prop="curriculumName" min-width="160" label="课程名称" align="center"></el-table-column>
@ -314,6 +314,7 @@ export default {
tabChange (id) {
this.active = id
this.form.cid = ''
this.$refs.table.clearSelection()
this.initData()
this.getCourse()
this.$router.push({

@ -450,7 +450,7 @@ export default {
const { query } = this.$route
this.fromAdmin ?
this.$router.back() :
(this.mallId || query.typeActive) ? this.$router.push(`/station?keyword=${query.keyword || ''}&active=${query.active || 0}&typeActive=${query.typeActive || 0}&page=${query.page || 1}`) : this.$router.back()
(this.mallId || query.typeActive) ? this.$router.push(`/station?keyword=${query.keyword || ''}&active=${query.active || ''}&typeActive=${query.typeActive || 0}&page=${query.page || 1}`) : this.$router.back()
},
init () {
this.insertScript()

@ -41,10 +41,10 @@
<div class="block block1">
<div class="title">全部应用</div>
<div class="apps">
<div class="app" @click="to('/exam')">
<!-- <div class="app" @click="to('/exam')">
<img src="@/assets/img/workbench/9.png" alt="">
<p class="name">理论考试系统</p>
</div>
</div> -->
<div class="app" @click="to('/lesson')">
<img src="@/assets/img/workbench/10.png" alt="">
<p class="name">备课管理</p>

@ -9,7 +9,6 @@ import api from "@/api";
export default {
namespaced: true,
state: {
customerName: "", // 客户名称
title: "",
logoUrl: "",
avatar: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
@ -30,9 +29,6 @@ export default {
state.roleId = info.roleId;
state.dataTime = info.dataTime;
},
SET_CUSTOMER_NAME: (state, customerName) => {
state.customerName = customerName;
},
SET_TITLE: (state, title) => {
state.title = title;
},
@ -70,7 +66,6 @@ export default {
let { data } = res
util.local.set(Setting.tokenKey, data.token, Setting.tokenExpires);
commit("SET_CUSTOMER", data.customer);
commit("SET_CUSTOMER_NAME", data.customerName);
util.successMsg("登录成功");
commit("SET_INFO", data);
resolve();
@ -94,9 +89,7 @@ export default {
util.cookies.remove('serverLogin')
location.href = Setting.isDev
? `http://${location.hostname}:8082/#/`
: Setting.isTest
? `${location.origin}/student/#/login`
: `${location.origin}/#/login`
: `${location.origin}/#/login`
} else {
location.reload()
}
@ -115,9 +108,6 @@ export default {
setLogoUrl ({ state, commit }, logoUrl) {
commit("SET_LOGO_URL", logoUrl);
},
setCustomerName ({ state, commit }, customerName) {
commit("SET_CUSTOMER_NAME", customerName);
},
setAvatar ({ state, commit }, avatar) {
commit("SET_AVATAR", avatar);
},

@ -31,7 +31,7 @@
}
}
.reply-name {
color: #9076ff;
color: #062c87;
}
.action {
display: inline-flex;
@ -109,7 +109,7 @@
display: inline-block;
margin-left: -12.5%;
font-size: 14px;
color: #9076ff;
color: #062c87;
}
.draft {
.ver,
@ -124,7 +124,7 @@
padding-bottom: 10px;
margin: -22px 0 20px;
font-size: 15px;
color: #9076ff;
color: #062c87;
border-bottom: 1px dashed #bfbfbf;
}
.des {
@ -144,7 +144,7 @@
i {
margin-left: 8px;
font-size: 14px;
color: #9076ff;
color: #062c87;
cursor: pointer;
&:hover {
opacity: 0.9;

Loading…
Cancel
Save