dev_xds
姜玉琦 2024-03-22 01:09:25 +08:00
parent cf1bbc65a8
commit ad4692ea79
2 changed files with 6 additions and 5 deletions

View File

@ -481,13 +481,14 @@ export default {
this.deptOptions = response.data;
this.open = true;
});
let that = this;
getWorkTrain(id).then((response) => {
this.form = response.data;
that.form = response.data;
let depts = [];
this.form.workTrainDeptList.forEach((item) => {
that.form.workTrainDeptList.forEach((item) => {
depts.push(item.deptId);
});
this.form.workTrainDeptList = depts;
that.form.workTrainDeptList = depts;
if (that.form.trainFile) {
that.files = that.form.trainFile.split(",");
}

View File

@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, wt.data_type, sdd.dict_label as data_type_name, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
select wt.id, wt.project_id, sp.projectName as project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, wt.data_type, sdd.dict_label as data_type_name, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
from work_train wt
left join work_train_dept wtd on wtd.train_id = wt.id
left join sys_dept sd on sd.dept_id = wtd.dept_id
@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
<if test="deptId != null"> and wtd2.dept_id = #{deptId}</if>
<if test="dataType != null"> and wt.data_type = #{dataType}</if>
<if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
<if test="trainTitle != null and trainTitle != ''"> and train_title like concat('%', #{trainTitle}, '%')</if>
<if test="trainNature != null and trainNature != ''"> and wt.train_nature = #{trainNature}</if>