课程资讯等修复

Branch_d40a2540
yujialong 2 years ago
parent dc2fc10b5e
commit afc85230c1
  1. 1
      src/layouts/navbar/index.vue
  2. 18
      src/pages/course/contentSettings/index.vue
  3. 2
      src/pages/course/list/sortManagement/index.vue
  4. 2
      src/pages/information/addarticle/index.vue
  5. 28
      src/pages/information/columnManage/index.vue
  6. 21
      src/pages/information/contentManage/contentList.vue
  7. 36
      src/pages/information/contentManage/index.vue
  8. 50
      src/pages/information/list/index.vue
  9. 13
      src/setting.js
  10. 4
      src/styles/page/screen.scss

@ -88,6 +88,7 @@ export default {
title: "系统设置"
},
{
icon: "el-icon-pie-chart",
index: "/screen",
title: "数据看板"
}

@ -47,13 +47,15 @@
</template>
</el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="资源名称">
<el-table-column prop="name" label="资源名称" min-width="200">
</el-table-column>
<el-table-column prop="fileType" label="资源类型" align="center">
<el-table-column prop="fileType" label="资源类型" min-width="120" align="center">
<template slot-scope="scope">
{{ transferType(scope.row.fileType) }}
</template>
</el-table-column>
<el-table-column prop="fileType" label="格式" min-width="120" align="center">
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<template v-if="!sorting">
@ -101,6 +103,7 @@
name="file"
>
<el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button>
<div slot="tip" class="el-upload__tip">视频请上传MP4格式大小不超过30Moffice文件大小不要超过10M</div>
</el-upload>
<el-progress v-if="showProgress" :stroke-width="3" :percentage="progressPercent"></el-progress>
</el-form-item>
@ -368,6 +371,10 @@ export default {
util.errorMsg("请上传10M以内的文件");
return false;
}
if (type == "视频" && (file.size / 1024 / 1024) > 30) {
util.errorMsg("请上传30M以内的视频");
return false;
}
this.uploading = true;
this.originalFileName = file.name;
if (this.isAddSection) this.sectionName = file.name.substring(0, file.name.lastIndexOf("."));
@ -835,6 +842,13 @@ export default {
padding-right: 70px;
margin-right: -70px;
}
.el-upload__tip {
position: absolute;
top: -4px;
right: 0;
width: 300px;
line-height: 1.4;
}
.sort-icon {
font-size: 24px;
cursor: pointer;

@ -67,7 +67,7 @@ export default {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.nameChange();
}, 500);
}, 100);
}
},
mounted() {

@ -116,7 +116,7 @@ export default {
this.$router.back();
},
getData() {
this.$get(`${this.api.getArticle}/${this.id}`).then(({ article }) => {
this.$get(`${this.api.getArticle}?articleId=${this.id}`).then(({ article }) => {
this.form = article
}).catch(err => {})
},

@ -21,7 +21,7 @@
<span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span>
</div>
</div>
<el-tree :data="listData" node-key="id" default-expand-all :draggable="sorting" :allow-drop="allowDrop">
<el-tree :data="list" node-key="id" default-expand-all :draggable="sorting" :allow-drop="allowDrop">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span class="name">{{ data.name }}</span>
<span class="action" v-show="!sorting">
@ -66,8 +66,8 @@ export default {
first: "栏目管理"
},
name: this.$store.state.name,
originalList: [],
listData: [],
originList: [],
list: [],
multipleSelection: [],
pageNo: 1,
pageSize: 10,
@ -87,20 +87,6 @@ export default {
mounted() {
this.getData();
},
beforeRouteLeave(to, from, next) {
if (JSON.stringify(this.originalList) !== JSON.stringify(this.listData)) {
this.$confirm("确定返回?排序尚未保存。", "提示", {
type: "warning"
})
.then(() => {
next();
})
.catch(() => {
});
} else {
next();
}
},
methods: {
getData() {
this.$get(this.api.queryAllColumns, {
@ -108,8 +94,8 @@ export default {
page: this.pageNo,
size: this.pageSize
}).then(({ columnTree }) => {
this.listData = columnTree
this.originalList = JSON.parse(JSON.stringify(this.listData));
this.list = columnTree
this.originList = JSON.parse(JSON.stringify(this.list));
this.total = columnTree.length
}).catch(res => {
});
@ -159,7 +145,7 @@ export default {
},
sortSubmit() {
this.level = 0
let list = JSON.parse(JSON.stringify(this.listData))
let list = JSON.parse(JSON.stringify(this.list))
this.handleList(list)
this.$post(this.api.columnReorder, {
columnTree: list
@ -191,7 +177,7 @@ export default {
},
cancelSort() {
this.sorting = false;
this.listData = JSON.parse(JSON.stringify(this.originalList));
this.list = JSON.parse(JSON.stringify(this.originList));
this.sortObj.destroy();
},
openSort() {

@ -18,6 +18,9 @@
</el-table-column>
<el-table-column prop="title" label="标题" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="title" label="栏目" show-overflow-tooltip align="center">
{{ columnName }}
</el-table-column>
<el-table-column prop="name" label="排序值" width="80" align="center">
<template slot-scope="scope">
<el-input class="sort-input" width="120" min="1" v-model.number="scope.row.sort" type="number"></el-input>
@ -70,12 +73,14 @@ export default {
tabs: {
first: "栏目内容管理"
},
columns: this.$parent.menuList,
columnName: '',
list: [],
multipleSelection: [],
pageNo: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
originSort: []
originList: []
};
},
props: {
@ -83,10 +88,12 @@ export default {
},
watch: {
columnId() {
this.getColumnName(this.$parent.menuList)
this.getData();
}
},
mounted() {
this.getColumnName(this.$parent.menuList)
this.getData();
},
methods: {
@ -97,7 +104,7 @@ export default {
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(({ articleList, total }) => {
this.list = articleList;
this.totals = total;
if (JSON.stringify(this.originSort) !== '{}') this.originSort = JSON.parse(JSON.stringify(articleList))
this.originList = JSON.parse(JSON.stringify(articleList))
if (!this.list.length && this.totals) {
this.pageNo--;
this.getData();
@ -113,6 +120,16 @@ export default {
this.$router.push(`list?page=${val}`)
this.getData();
},
//
getColumnName(data) {
data.map(e => {
if (e.id == this.columnId) {
this.columnName = e.name
} else {
this.getColumnName(e.children)
}
})
},
addArticle() {
this.$router.push(`/information/addarticle?columnId=${this.columnId}&sort=${this.list.length + 1}`);
},

@ -43,21 +43,18 @@ export default {
}).then(res => {
this.menuList = res.columnTree
const storeId = this.$store.state.info.columnId
console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId)
if (this.menuList.length) {
this.getId(this.menuList)
if (this.menuList[0].children && this.menuList[0].children.length) {
this.columnId = this.menuList[0].children[0].id;
} else {
this.columnId = this.menuList[0].id;
}
this.columnId = this.menuList[0].id
if (!storeId) {
this.$store.commit('setColumnId', this.columnId)
this.setColumnId(this.columnId)
} else {
this.columnId = storeId
}
}
this.$nextTick(() => {
this.$refs.column.setCurrentKey(storeId)
this.$refs.column.setCurrentKey(this.columnId)
})
}).catch(err => {
});
@ -69,9 +66,26 @@ export default {
e.children.length && this.getId(e.children)
})
},
setColumn(id) {
this.columnId = id
this.setColumnId(id)
},
handleSelect(key) {
this.columnId = key.id
this.setColumnId(key.id)
const { content } = this.$refs
const { list, originList } = content
//
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
this.setColumn(key.id)
}).catch(() => {
this.setColumn(key.id)
})
} else {
this.setColumn(key.id)
}
}
}
};
@ -90,4 +104,8 @@ export default {
.right {
flex: 1;
}
/deep/.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
color: #fff;
background-color: #9278ff;
}
</style>

@ -5,8 +5,8 @@
<li :class="{active: tabsName == 1}" @click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
<li :class="{active: tabsName == 2}" @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
</ul>
<columnManage class="flex-1" v-if="tabsName === 1" />
<ContentManage class="flex-1" ref="contentManage" v-if="tabsName === 2" />
<columnManage class="flex-1" ref="content1" v-if="tabsName == 1" />
<ContentManage class="flex-1" ref="content2" v-if="tabsName == 2" />
</div>
</template>
@ -27,22 +27,7 @@ export default {
},
//
beforeRouteLeave(to, from, next) {
const { content } = this.$refs.contentManage.$refs
const { list, originSort } = content
//
if (JSON.stringify(list) !== JSON.stringify(originSort)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
next()
}).catch(() => {
next()
})
} else {
next()
}
this.routeLeave(next, true)
},
methods: {
...mapActions("info", [
@ -52,27 +37,29 @@ export default {
this.tabsName = id
this.setTabsName(id)
},
handleClick(id) {
if (this.tabsName == 2) {
const { content } = this.$refs.contentManage.$refs
const { list, originSort } = content
//
routeLeave(fn, param) {
const tab = this.tabsName
let content = this.$refs['content' + tab]
if (tab == 2) content = content.$refs.content
const { list, originList } = content
//
if (JSON.stringify(list) !== JSON.stringify(originSort)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了${tab == 1 ? '栏目' : '文章'}排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
this.switchTab(id)
fn(param)
}).catch(() => {
this.switchTab(id)
fn(param)
})
} else {
this.switchTab(id)
}
} else {
this.switchTab(id)
fn(param)
}
},
// tab
handleClick(id) {
this.routeLeave(this.switchTab, id)
}
},
mounted() {
@ -87,6 +74,7 @@ export default {
}
.column-tab {
width: 120px;
border-right: solid 1px #e6e6e6;
li {
display: flex;
align-items: center;

@ -3,10 +3,11 @@
* */
const url = location.host;
const isDev = process.env.NODE_ENV === "development"; // 开发环境
const isHh = url.includes("10.196.131.73"); //是否河海版本
const isCH = url.includes("124.71.12.62"); //是否巢湖版本
const isPro = url.includes("occupationlab.com"); //是否职站生产
const isTest = url.includes('121.37.12.51'); //是否中台测试服
const isHh = url.includes("10.196.131.73"); //河海版本
const isCH = url.includes("124.71.12.62"); //巢湖版本
const isPro = url.includes("occupationlab.com"); //职站生产
const isZxy = url.includes("izhixinyun.com"); //智信云
const isTest = url.includes('121.37.12.51'); //中台测试服
let bankPath = `${location.origin}/banksystem` // 银行系统地址
let jumpPath = `${location.origin}/judgmentPoint`
@ -14,7 +15,7 @@ let host = `${location.origin}/`
let uploadURL = `http://121.37.12.51/`
let title = (isHh || isCH) ? '教师管理端' : '职站服务端管理系统'
if (isPro) {
if (isPro || isZxy) {
// 职站生产
uploadURL = `https://www.huorantech.cn/`
bankPath = `https://www.huorantech.cn/banksystem`
@ -25,6 +26,8 @@ if (isPro) {
host = "http://121.37.12.51/"; // 中台测试服
// host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.137:9000/'; // 赓
} else if (isZxy) {
uploadURL = `https://izhixinyun.com/`
}
const Setting = {

@ -17,8 +17,8 @@ body {
.video {
position: absolute;
top: 0;
left: -500px;
width: 100vw;
left: -20%;
width: 150%;
// height: 720px;
}
.wrap {

Loading…
Cancel
Save