diff --git a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue index 66c3101be..16c22b087 100644 --- a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue +++ b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue @@ -1,7 +1,7 @@ <template> <div class="app-container"> <el-row :gutter="20"> - <el-col :span="4" :xs="24"> + <el-col :span="6" :xs="24"> <div class="head-container"> <el-input v-model="name" @@ -12,19 +12,19 @@ style="margin-bottom: 20px" /> </div> - <div class="head-container"> + <div class="head-container tree"> <el-tree :data="treeOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" - default-expand-all + :default-expand-all="false" @node-click="handleNodeClick" /> </div> </el-col> - <el-col :span="20" :xs="24"> + <el-col :span="18" :xs="24"> <el-card class="box-card"> <div slot="header" class="clearfix"> <span class="box-card-title">{{ title }}</span> @@ -50,7 +50,7 @@ import { treeselect, getMicrocourse } from "@/api/benyi/microcourse"; export default { - name: "Detail", + name: "Microcoursestudy", data() { return { // 主题整合名称 @@ -186,4 +186,12 @@ div { -ms-user-select: none; user-select: none; } +.el-tree { + min-width: 100%; + display: inline-block; +} +.tree { + overflow:auto; + max-height: 300px; +} </style> \ No newline at end of file diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByMicrocourseMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByMicrocourseMapper.xml index 97a3e334d..33d5f3694 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByMicrocourseMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByMicrocourseMapper.xml @@ -22,21 +22,33 @@ </sql> <sql id="selectByMicrocourseVoTree"> - select dict_value+9999 id, 0 parent_id,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_yebjlx' and dict_label !='托班(2-3岁)' +select dict_value+9999 id, 0 parent_id,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_yebjlx' and dict_label !='托班(2-3岁)' union all - select 1000101 ,concat(10001),'上册','5' - union all - select 1000102 ,concat(10001),'下册','6' - union all - select 1000201 ,concat(10002),'上册','7' - union all - select 1000202 ,concat(10002),'下册','8' - union all - select 1000301 ,concat(10003),'上册','9' - union all - select 1000302 ,concat(10003),'下册','10' + select 1000101 ,concat(10001),'上册',5 union all - select id, CONCAT(scpoe+9999,upanddown), title, sort from by_microcourse + select 1000102 ,concat(10001),'下册',6 + union all + select 1000201 ,concat(10002),'上册',7 + union all + select 1000202 ,concat(10002),'下册',8 + union all + select 1000301 ,concat(10003),'上册',9 + union all + select 1000302 ,concat(10003),'下册',10 + union all + select concat(1000101,dict_value), 1000101,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_dm_wxkclx' + union all + select concat(1000102,dict_value), 1000102,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_dm_wxkclx' + union all + select concat(1000201,dict_value), 1000201,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_dm_wxkclx' + union all + select concat(1000202,dict_value), 1000202,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_dm_wxkclx' + union all + select concat(1000301,dict_value), 1000301,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_dm_wxkclx' + union all + select concat(1000302,dict_value), 1000302,dict_label title,dict_sort sort from sys_dict_data where dict_type='sys_dm_wxkclx' + union all + select id, CONCAT(scpoe+9999,upanddown,type), title, sort from by_microcourse </sql> <select id="selectByMicrocourseListTree" parameterType="ByMicrocourse" resultMap="ByMicrocourseResult">