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

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

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

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

@ -294,7 +294,7 @@ export default {
// //
async getActivity () { 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.activations = message.records
this.totalActivation = message.total this.totalActivation = message.total
}, },

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

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

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

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

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

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

@ -450,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 || 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 () { init () {
this.insertScript() this.insertScript()

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

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

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

Loading…
Cancel
Save