commit
2e0cf47e4c
@ -206,6 +206,10 @@ aside {
|
|||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
&.wrap {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
&.center {
|
&.center {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -182,11 +182,13 @@ export default {
|
|||||||
}
|
}
|
||||||
listChildCheck(this.queryParams).then((response) => {
|
listChildCheck(this.queryParams).then((response) => {
|
||||||
// console.log(response.rows);
|
// console.log(response.rows);
|
||||||
this.bjmc = response.rows[0].bjmc;
|
const {rows = []} = response;
|
||||||
this.childcount = response.rows.length - 1;
|
const first = (rows && rows[0]) || {};
|
||||||
this.jsmc = response.rows[0].zbjsmc;
|
this.bjmc = first.bjmc || '';
|
||||||
|
this.childcount = rows.length > 0 ? rows.length - 1 : 0;
|
||||||
|
this.jsmc = first.zbjsmc || '';
|
||||||
// this.tableData = response.rows;
|
// this.tableData = response.rows;
|
||||||
response.rows.forEach((res) => {
|
rows.forEach((res) => {
|
||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
name: res.name,
|
name: res.name,
|
||||||
zj: this.avg([
|
zj: this.avg([
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
|||||||
title: "微型课程",
|
title: "微型课程",
|
||||||
title1: "概论",
|
title1: "概论",
|
||||||
//目的
|
//目的
|
||||||
note: "微 型 课 程 王东异 主编",
|
note: "微型课程 — 王东异 <span style='font-size: 14px'>主编</span>",
|
||||||
// 树状显示类型
|
// 树状显示类型
|
||||||
treeOptions: [],
|
treeOptions: [],
|
||||||
// 树结构
|
// 树结构
|
||||||
@ -158,6 +158,9 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.app-container, .el-row {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
.text {
|
.text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
@ -211,7 +214,8 @@ export default {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.tree {
|
.tree {
|
||||||
overflow: auto;
|
overflow:auto;
|
||||||
|
height: calc(100% - 52px);
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -2,8 +2,18 @@
|
|||||||
<div class="app-container" @contextmenu.prevent="">
|
<div class="app-container" @contextmenu.prevent="">
|
||||||
<el-form :model="queryParams" ref="queryForm" label-width="70px">
|
<el-form :model="queryParams" ref="queryForm" label-width="70px">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :xs="24" :ms="12" :md="5">
|
<el-col>
|
||||||
<el-form-item label="视频类别" prop="type">
|
<el-form-item style="margin-bottom: 5px" label="视频类型" prop="type">
|
||||||
|
<div class="flex wrap btns">
|
||||||
|
<el-button
|
||||||
|
v-for="ele in optionTypes"
|
||||||
|
size="mini"
|
||||||
|
:key="ele.id"
|
||||||
|
:type="ele.id === type ? 'primary' : ''"
|
||||||
|
@click="changeType(ele)">{{ele.name}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="视频类别" prop="type">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
placeholder="请选择视频类别"
|
placeholder="请选择视频类别"
|
||||||
ref="example"
|
ref="example"
|
||||||
@ -13,7 +23,7 @@
|
|||||||
clearable
|
clearable
|
||||||
@change="exampleChange"
|
@change="exampleChange"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<!-- 博士要求注释掉,不需要该过滤条件 2020-05-30 zlp -->
|
<!-- 博士要求注释掉,不需要该过滤条件 2020-05-30 zlp -->
|
||||||
<!-- <el-form-item label="讲师姓名" prop="lecturer">
|
<!-- <el-form-item label="讲师姓名" prop="lecturer">
|
||||||
<el-select v-model="queryParams.lecturer" filterable placeholder="请选择讲师">
|
<el-select v-model="queryParams.lecturer" filterable placeholder="请选择讲师">
|
||||||
@ -35,7 +45,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :ms="12" :md="6">
|
<!-- <el-col :xs="24" :ms="12" :md="6">
|
||||||
<el-form-item class="no-margin">
|
<el-form-item class="no-margin">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -48,6 +58,19 @@
|
|||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col>
|
||||||
|
<el-form-item style="margin-bottom: 5px" label="详细分类" prop="type">
|
||||||
|
<div class="flex wrap btns">
|
||||||
|
<el-button
|
||||||
|
v-for="ele in getVideoTypes"
|
||||||
|
round
|
||||||
|
size="mini"
|
||||||
|
:key="ele.id"
|
||||||
|
:type="ele.id === ancestors ? 'primary' : ''"
|
||||||
|
@click="changeTypeDetail(ele)">{{ele.name}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -135,10 +158,24 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 8,
|
pageSize: 8,
|
||||||
},
|
},
|
||||||
|
type: 1,
|
||||||
|
ancestors: '',
|
||||||
|
videoTypes: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
getVideoTypes(){
|
||||||
|
let arr = [];
|
||||||
|
for(let ele of this.optionTypes) {
|
||||||
|
if (ele.id === this.type) {
|
||||||
|
arr = ele.children;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
// this.getList();
|
||||||
listAllLecturer().then((response) => {
|
listAllLecturer().then((response) => {
|
||||||
//console.log(response.lecturer);
|
//console.log(response.lecturer);
|
||||||
this.lecturerOptions = response.lecturer;
|
this.lecturerOptions = response.lecturer;
|
||||||
@ -148,12 +185,22 @@ export default {
|
|||||||
this.optionTypes = this.handleTree(response.data, "id", "pid");
|
this.optionTypes = this.handleTree(response.data, "id", "pid");
|
||||||
//第二步移除children为0的数组,也就是将children为0 设置为undefined
|
//第二步移除children为0的数组,也就是将children为0 设置为undefined
|
||||||
this.optionTypes = this.getTreeData(this.optionTypes);
|
this.optionTypes = this.getTreeData(this.optionTypes);
|
||||||
|
console.log(this.optionTypes)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// mounted() {
|
mounted() {
|
||||||
// this.$watermark.set("测试专用");
|
this.handleQuery();
|
||||||
// },
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeType(btn) {
|
||||||
|
this.type = btn.id;
|
||||||
|
this.ancestors = '';
|
||||||
|
this.handleQuery(btn);
|
||||||
|
},
|
||||||
|
changeTypeDetail(btn) {
|
||||||
|
this.ancestors = (this.ancestors && btn.id === this.ancestors) ? '' : btn.id;
|
||||||
|
this.handleQuery(btn);
|
||||||
|
},
|
||||||
exampleChange(e) {
|
exampleChange(e) {
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
// 目的是选择之后将下拉界面收起
|
// 目的是选择之后将下拉界面收起
|
||||||
@ -209,11 +256,13 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
if (this.queryParams.type == null) {
|
// if (this.queryParams.type == null) {
|
||||||
this.queryParams.type = "";
|
// this.queryParams.type = "";
|
||||||
} else {
|
// } else {
|
||||||
this.queryParams.type = this.queryParams.type.toString();
|
// // this.queryParams.type = this.queryParams.type.toString();
|
||||||
}
|
// this.queryParams.type = ancestors;
|
||||||
|
// }
|
||||||
|
this.queryParams.type = [this.type, this.ancestors].join(',');
|
||||||
//console.log(this.queryParams.type);
|
//console.log(this.queryParams.type);
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -227,7 +276,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
.time {
|
.time {
|
||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -265,6 +314,12 @@ export default {
|
|||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btns {
|
||||||
|
.el-button {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 768.98px) {
|
@media (max-width: 768.98px) {
|
||||||
.el-cascader-node__label {
|
.el-cascader-node__label {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>Copyright © 2018-2019 benyiedu.com All Rights Reserved.</span>
|
<span>Copyright © 2018-2019 benyiedu.com All Rights Reserved.</span>
|
||||||
|
<p>技术服务:<svg-icon icon-class="wechat"/> 18633313157</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -190,7 +191,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.el-login-footer {
|
.el-login-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 15px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -199,5 +200,8 @@ export default {
|
|||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
|
p {
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -33,8 +33,8 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8083`,
|
// target: `http://localhost:8083`,
|
||||||
//target: `http://120.53.14.147:9990/`,
|
target: `http://120.53.14.147:9990/`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user