主题整合优化

This commit is contained in:
zhanglipeng 2021-08-15 10:31:16 +08:00
parent 249c2ef099
commit 5e294546fe
3 changed files with 33 additions and 8 deletions

View File

@ -78,7 +78,7 @@
<script> <script>
import { treeselect, getTheme } from "@/api/benyi/theme"; import { treeselect, getTheme } from "@/api/benyi/theme";
import { listActivity } from "@/api/benyi/activity"; import { listActivity, getActivity } from "@/api/benyi/activity";
import Editor from "@/components/Editor"; import Editor from "@/components/Editor";
export default { export default {
@ -119,6 +119,7 @@ export default {
}, },
// //
queryParams: { queryParams: {
id: undefined,
themeid: undefined, themeid: undefined,
}, },
}; };
@ -181,18 +182,24 @@ export default {
// //
handleNodeClick(data) { handleNodeClick(data) {
this.id = data.id; this.id = data.id;
console.log(data.id); //console.log(data.id);
if (data.id >= 9999) { if (data.id >= 9999 && data.id < 99999) {
} else { } else if (data.id >= 99999) {
//console.log("2jiedian");
this.id = this.id - 99999;
this.title = data.label; this.title = data.label;
this.getThemeDetails(); this.getThemeDetails();
} else {
this.title = data.label;
this.getThemeDetail();
//console.log("");
} }
// console.log(this.dayflowtaskList[date.id]) // console.log(this.dayflowtaskList[date.id])
// this.getStandardList(); // this.getStandardList();
}, },
getThemeDetails() { getThemeDetails() {
getTheme(this.id).then((response) => { getTheme(this.id).then((response) => {
console.log(response); //console.log(response);
if (response.code == "200") { if (response.code == "200") {
this.title1 = "主题网络"; this.title1 = "主题网络";
this.title2 = "家园沟通"; this.title2 = "家园沟通";
@ -200,9 +207,10 @@ export default {
this.note = response.data.content; this.note = response.data.content;
this.communicate = response.data.communicate; this.communicate = response.data.communicate;
this.queryParams.themeid = response.data.id; this.queryParams.themeid = response.data.id;
this.queryParams.id = "";
listActivity(this.queryParams).then((req) => { listActivity(this.queryParams).then((req) => {
console.log(req); //console.log(req);
if (req.code == "200") { if (req.code == "200") {
this.activityList = req.rows; this.activityList = req.rows;
} }
@ -210,6 +218,20 @@ export default {
} }
}); });
}, },
getThemeDetail() {
this.title1 = "";
this.title2 = "";
this.title3 = "活动方案";
this.queryParams.id = this.id;
this.queryParams.themeid = "";
//console.log(this.id);
listActivity(this.queryParams).then((req) => {
//console.log(req);
if (req.code == "200") {
this.activityList = req.rows;
}
});
},
}, },
}; };
</script> </script>

View File

@ -27,6 +27,7 @@
<select id="selectByThemeActivityList" parameterType="ByThemeActivity" resultMap="ByThemeActivityResult"> <select id="selectByThemeActivityList" parameterType="ByThemeActivity" resultMap="ByThemeActivityResult">
<include refid="selectByThemeActivityVo"/> <include refid="selectByThemeActivityVo"/>
<where> <where>
<if test="id != null ">and id = #{id}</if>
<if test="themeid != null ">and themeid = #{themeid}</if> <if test="themeid != null ">and themeid = #{themeid}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''">and type = #{type}</if> <if test="type != null and type != ''">and type = #{type}</if>

View File

@ -22,8 +22,10 @@
<sql id="selectByThemeVoTree"> <sql id="selectByThemeVoTree">
select dict_value+9999 id, 0 parent_id,dict_label name,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 name,dict_sort sort from sys_dict_data where dict_type='sys_yebjlx' and dict_label !='托班2-3岁'
union all union all
select id, classid+9999, name, sort from by_theme select id+99999, classid+9999, name, sort from by_theme
order by sort union all
select id,themeid+99999,name,sort from by_theme_activity
order by sort
</sql> </sql>
<select id="selectByThemeListTree" parameterType="ByTheme" resultMap="ByThemeResult"> <select id="selectByThemeListTree" parameterType="ByTheme" resultMap="ByThemeResult">