From bc0b5d40418dee0a9961eb575baeb1553a3183ca Mon Sep 17 00:00:00 2001 From: wangxinbo Date: Sat, 25 Sep 2021 19:22:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update:=20=E4=BC=98=E5=8C=96=E8=A7=86?= =?UTF-8?q?=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/index.scss | 4 + .../benyi/checkinstatisticsclass/index.vue | 10 ++- .../views/benyi/microcoursestudy/index.vue | 11 ++- .../views/benyi_train/video_study/index.vue | 83 +++++++++++++++---- ruoyi-ui/src/views/login.vue | 6 +- ruoyi-ui/vue.config.js | 4 +- 6 files changed, 94 insertions(+), 24 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/index.scss b/ruoyi-ui/src/assets/styles/index.scss index 7b9f52ba1..079573b9a 100644 --- a/ruoyi-ui/src/assets/styles/index.scss +++ b/ruoyi-ui/src/assets/styles/index.scss @@ -206,6 +206,10 @@ aside { .flex { display: flex; + &.wrap { + flex-wrap: wrap; + } + &.center { align-items: center; justify-content: center; diff --git a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue index e03bde19c..54eed0bc4 100644 --- a/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue +++ b/ruoyi-ui/src/views/benyi/checkinstatisticsclass/index.vue @@ -182,11 +182,13 @@ export default { } listChildCheck(this.queryParams).then((response) => { // console.log(response.rows); - this.bjmc = response.rows[0].bjmc; - this.childcount = response.rows.length - 1; - this.jsmc = response.rows[0].zbjsmc; + const {rows = []} = response; + const first = (rows && rows[0]) || {}; + this.bjmc = first.bjmc || ''; + this.childcount = rows.length > 0 ? rows.length - 1 : 0; + this.jsmc = first.zbjsmc || ''; // this.tableData = response.rows; - response.rows.forEach((res) => { + rows.forEach((res) => { this.tableData.push({ name: res.name, zj: this.avg([ diff --git a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue index ba9575778..d4aaea2e2 100644 --- a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue +++ b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue @@ -38,7 +38,9 @@ @click="prints" >打印 -
+
+
+
@@ -61,7 +63,7 @@ export default { title: "微型课程", title1: "概论", //目的 - note: "微 型 课 程 王东异 主编", + note: "微型课程 — 王东异 主编", // 树状显示类型 treeOptions: [], // 树结构 @@ -120,6 +122,9 @@ export default { }; \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi_train/video_study/index.vue b/ruoyi-ui/src/views/benyi_train/video_study/index.vue index 528dd2662..97b69c29f 100644 --- a/ruoyi-ui/src/views/benyi_train/video_study/index.vue +++ b/ruoyi-ui/src/views/benyi_train/video_study/index.vue @@ -2,8 +2,18 @@
- - + + +
+ {{ele.name}} +
+
+
- + + + +
+ {{ele.name}} +
+
@@ -135,10 +158,24 @@ export default { pageNum: 1, 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() { - this.getList(); + // this.getList(); listAllLecturer().then((response) => { //console.log(response.lecturer); this.lecturerOptions = response.lecturer; @@ -148,12 +185,22 @@ export default { this.optionTypes = this.handleTree(response.data, "id", "pid"); //第二步移除children为0的数组,也就是将children为0 设置为undefined this.optionTypes = this.getTreeData(this.optionTypes); + console.log(this.optionTypes) }); }, - // mounted() { - // this.$watermark.set("测试专用"); - // }, + mounted() { + this.handleQuery(); + }, 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) { // console.log(e); // 目的是选择之后将下拉界面收起 @@ -209,11 +256,13 @@ export default { }, /** 搜索按钮操作 */ handleQuery() { - if (this.queryParams.type == null) { - this.queryParams.type = ""; - } else { - this.queryParams.type = this.queryParams.type.toString(); - } + // if (this.queryParams.type == null) { + // this.queryParams.type = ""; + // } else { + // // this.queryParams.type = this.queryParams.type.toString(); + // this.queryParams.type = ancestors; + // } + this.queryParams.type = [this.type, this.ancestors].join(','); //console.log(this.queryParams.type); this.queryParams.pageNum = 1; this.getList(); @@ -227,7 +276,7 @@ export default { }; - diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index b14adb873..70dff57cd 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -33,8 +33,8 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8083`, - //target: `http://120.53.14.147:9990/`, + // target: `http://localhost:8083`, + target: `http://120.53.14.147:9990/`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' From 70a25e2a6790f7a8e6d957eae6d18b40f0218c66 Mon Sep 17 00:00:00 2001 From: wangxinbo Date: Sat, 25 Sep 2021 19:26:29 +0800 Subject: [PATCH 2/2] update --- ruoyi-ui/src/views/benyi/microcoursestudy/index.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue index 7cda7a013..6f5729c9b 100644 --- a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue +++ b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue @@ -214,12 +214,8 @@ export default { display: inline-block; } .tree { -<<<<<<< HEAD overflow:auto; height: calc(100% - 52px); -======= - overflow: auto; max-height: 600px; ->>>>>>> master } \ No newline at end of file