浏览代码

学习园地 - 在查看计划列表添加是否签名字段,告诉管理员是否所有学员完成学习并已签名

Wang Zi Wen 1 年之前
父节点
当前提交
96dd7b416d

+ 11 - 0
ruoyi-system/src/main/java/com/ruoyi/branch/domain/TBranchLearning.java

@@ -63,6 +63,17 @@ public class TBranchLearning extends BaseEntity
     /** 部门id */
     private Long deptId;
 
+    /** 是否签名 */
+    private String isSigned;
+
+    public String getIsSigned() {
+        return isSigned;
+    }
+
+    public void setIsSigned(String isSigned) {
+        this.isSigned = isSigned;
+    }
+
     public String getFileUrl() {
         return fileUrl;
     }

+ 7 - 2
ruoyi-system/src/main/resources/mapper/branch/TBranchLearningMapper.xml

@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="deptId"    column="dept_id"    />
+        <result property="isSigned"    column="is_signed"    />
     </resultMap>
 
     <sql id="selectTBranchLearningVo">
-        select u.learning_id, u.user_id, u.file_id, u.learning_status, u.learning_time_required, u.learning_time_studied, u.learning_progress, u.learning_deadline, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id,
+        select u.learning_id, u.is_signed, u.user_id, u.file_id, u.learning_status, u.learning_time_required, u.learning_time_studied, u.learning_progress, u.learning_deadline, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id,
         us.nick_name,
         f.name as file_name, f.url as file_url
         from t_branch_learning u
@@ -46,11 +47,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="learningProgress != null  and learningProgress != ''"> and u.learning_progress = #{learningProgress}</if>
             <if test="learningDeadline != null  and learningDeadline != ''"> and u.learning_deadline = #{learningDeadline}</if>
             <if test="deptId != null "> and u.dept_id = #{deptId}</if>
+            <if test="isSigned != null "> and u.is_signed = #{isSigned}</if>
             and u.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
-        order by u.learning_status asc, u.learning_deadline asc
+        order by u.learning_status asc, u.learning_deadline asc, u.is_signed asc
     </select>
     
     <select id="selectTBranchLearningByLearningId" parameterType="Long" resultMap="TBranchLearningResult">
@@ -79,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="isSigned != null">is_signed,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="learningId != null">#{learningId},</if>
@@ -95,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="isSigned != null">#{isSigned},</if>
          </trim>
     </insert>
 
@@ -114,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="isSigned != null">is_signed = #{isSigned},</if>
         </trim>
         where learning_id = #{learningId}
     </update>

+ 7 - 0
ruoyi-ui/src/views/branch/xxyd/mystudy/index.vue

@@ -20,6 +20,12 @@
         <span>{{ parseTime(scope.row.learningDeadline, '{y}-{m}-{d}') }}</span>
       </template>
     </el-table-column>
+      <el-table-column label="是否签名" align="center" prop="isSigned" width="80">
+        <template slot-scope="scope">
+          <el-tag type="success" v-if="scope.row.isSigned == 1">已签名</el-tag>
+          <el-tag type="info" v-if="scope.row.isSigned == 0">未签名</el-tag>
+        </template>
+      </el-table-column>
       <!--<el-table-column label="部门id" align="center" prop="deptId" />-->
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -117,6 +123,7 @@ export default {
         learningTimeStudied: null,
         learningProgress: null,
         deptId: null,
+        isSigned: null,
       },
       // 表单参数
       form: {},

+ 7 - 1
ruoyi-ui/src/views/branch/xxyd/studyplan/index.vue

@@ -62,7 +62,7 @@
             <el-button @click="cancelAddPlan">取 消</el-button>
           </div>
     </el-dialog>
-    <el-dialog :title="seePlanTitle" :visible.sync="seePlanOpen" width="60%" append-to-body>
+    <el-dialog :title="seePlanTitle" :visible.sync="seePlanOpen" width="80%" append-to-body>
       <el-table :data="learningList" border>
         <el-table-column label="学员姓名" align="center" prop="nickName" />
         <el-table-column label="状态" align="center" prop="learningStatus" :formatter="learningStatusFormat"/>
@@ -97,6 +97,12 @@
             </span>
           </template>
         </el-table-column>
+        <el-table-column label="是否签名" align="center" prop="isSigned" width="80">
+          <template slot-scope="scope">
+            <el-tag type="success" v-if="scope.row.isSigned == 1">已签名</el-tag>
+            <el-tag type="info" v-if="scope.row.isSigned == 0">未签名</el-tag>
+          </template>
+        </el-table-column>
         <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button