课程资讯等修复

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: "系统设置" title: "系统设置"
}, },
{ {
icon: "el-icon-pie-chart",
index: "/screen", index: "/screen",
title: "数据看板" title: "数据看板"
} }

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

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

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

@ -21,7 +21,7 @@
<span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span> <span><em :class="{hide: sorting}" style="font-style: normal">操作</em></span>
</div> </div>
</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="custom-tree-node" slot-scope="{ node, data }">
<span class="name">{{ data.name }}</span> <span class="name">{{ data.name }}</span>
<span class="action" v-show="!sorting"> <span class="action" v-show="!sorting">
@ -66,8 +66,8 @@ export default {
first: "栏目管理" first: "栏目管理"
}, },
name: this.$store.state.name, name: this.$store.state.name,
originalList: [], originList: [],
listData: [], list: [],
multipleSelection: [], multipleSelection: [],
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -87,20 +87,6 @@ export default {
mounted() { mounted() {
this.getData(); 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: { methods: {
getData() { getData() {
this.$get(this.api.queryAllColumns, { this.$get(this.api.queryAllColumns, {
@ -108,8 +94,8 @@ export default {
page: this.pageNo, page: this.pageNo,
size: this.pageSize size: this.pageSize
}).then(({ columnTree }) => { }).then(({ columnTree }) => {
this.listData = columnTree this.list = columnTree
this.originalList = JSON.parse(JSON.stringify(this.listData)); this.originList = JSON.parse(JSON.stringify(this.list));
this.total = columnTree.length this.total = columnTree.length
}).catch(res => { }).catch(res => {
}); });
@ -159,7 +145,7 @@ export default {
}, },
sortSubmit() { sortSubmit() {
this.level = 0 this.level = 0
let list = JSON.parse(JSON.stringify(this.listData)) let list = JSON.parse(JSON.stringify(this.list))
this.handleList(list) this.handleList(list)
this.$post(this.api.columnReorder, { this.$post(this.api.columnReorder, {
columnTree: list columnTree: list
@ -191,7 +177,7 @@ export default {
}, },
cancelSort() { cancelSort() {
this.sorting = false; this.sorting = false;
this.listData = JSON.parse(JSON.stringify(this.originalList)); this.list = JSON.parse(JSON.stringify(this.originList));
this.sortObj.destroy(); this.sortObj.destroy();
}, },
openSort() { openSort() {

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

@ -43,21 +43,18 @@ export default {
}).then(res => { }).then(res => {
this.menuList = res.columnTree this.menuList = res.columnTree
const storeId = this.$store.state.info.columnId const storeId = this.$store.state.info.columnId
console.log("🚀 ~ file: index.vue ~ line 46 ~ getMenuData ~ storeId", storeId)
if (this.menuList.length) { if (this.menuList.length) {
this.getId(this.menuList) this.getId(this.menuList)
if (this.menuList[0].children && this.menuList[0].children.length) { this.columnId = this.menuList[0].id
this.columnId = this.menuList[0].children[0].id;
} else {
this.columnId = this.menuList[0].id;
}
if (!storeId) { if (!storeId) {
this.$store.commit('setColumnId', this.columnId) this.setColumnId(this.columnId)
} else { } else {
this.columnId = storeId this.columnId = storeId
} }
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.column.setCurrentKey(storeId) this.$refs.column.setCurrentKey(this.columnId)
}) })
}).catch(err => { }).catch(err => {
}); });
@ -69,9 +66,26 @@ export default {
e.children.length && this.getId(e.children) e.children.length && this.getId(e.children)
}) })
}, },
setColumn(id) {
this.columnId = id
this.setColumnId(id)
},
handleSelect(key) { handleSelect(key) {
this.columnId = key.id const { content } = this.$refs
this.setColumnId(key.id) 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 { .right {
flex: 1; flex: 1;
} }
/deep/.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
color: #fff;
background-color: #9278ff;
}
</style> </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 == 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> <li :class="{active: tabsName == 2}" @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
</ul> </ul>
<columnManage class="flex-1" v-if="tabsName === 1" /> <columnManage class="flex-1" ref="content1" v-if="tabsName == 1" />
<ContentManage class="flex-1" ref="contentManage" v-if="tabsName === 2" /> <ContentManage class="flex-1" ref="content2" v-if="tabsName == 2" />
</div> </div>
</template> </template>
@ -27,22 +27,7 @@ export default {
}, },
// //
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const { content } = this.$refs.contentManage.$refs this.routeLeave(next, true)
const { list, originSort } = content
//
if (JSON.stringify(list) !== JSON.stringify(originSort)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
next()
}).catch(() => {
next()
})
} else {
next()
}
}, },
methods: { methods: {
...mapActions("info", [ ...mapActions("info", [
@ -52,27 +37,29 @@ export default {
this.tabsName = id this.tabsName = id
this.setTabsName(id) this.setTabsName(id)
}, },
handleClick(id) { //
if (this.tabsName == 2) { routeLeave(fn, param) {
const { content } = this.$refs.contentManage.$refs const tab = this.tabsName
const { list, originSort } = content let content = this.$refs['content' + tab]
if (tab == 2) content = content.$refs.content
const { list, originList } = content
// //
if (JSON.stringify(list) !== JSON.stringify(originSort)) { if (JSON.stringify(list) !== JSON.stringify(originList)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', { this.$confirm(`您已更改了${tab == 1 ? '栏目' : '文章'}排序,是否保存更改?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
content.sortSubmit() content.sortSubmit()
this.switchTab(id) fn(param)
}).catch(() => { }).catch(() => {
this.switchTab(id) fn(param)
}) })
} else { } else {
this.switchTab(id) fn(param)
}
} else {
this.switchTab(id)
} }
},
// tab
handleClick(id) {
this.routeLeave(this.switchTab, id)
} }
}, },
mounted() { mounted() {
@ -87,6 +74,7 @@ export default {
} }
.column-tab { .column-tab {
width: 120px; width: 120px;
border-right: solid 1px #e6e6e6;
li { li {
display: flex; display: flex;
align-items: center; align-items: center;

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

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

Loading…
Cancel
Save