瀏覽代碼

章节模板、问卷模板优化

wangggziwen 9 月之前
父節點
當前提交
463dc3fcd3

+ 1 - 0
rc-buisness/src/main/resources/mapper/rc/TChapterTemplateMapper.xml

@@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
+        order by code asc
     </select>
     
     <select id="selectTChapterTemplateById" parameterType="Long" resultMap="TChapterTemplateResult">

+ 1 - 0
rc-buisness/src/main/resources/mapper/rc/TQuestionnaireTemplateMapper.xml

@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="deptId != null  and deptId != ''"> and dept_id = #{deptId}</if>
         </where>
+        order by directory asc, code asc
     </select>
     
     <select id="selectTQuestionnaireTemplateById" parameterType="Long" resultMap="TQuestionnaireTemplateResult">

+ 3 - 3
ruoyi-ui/src/views/rc/chaptertemplate/index.vue

@@ -71,8 +71,8 @@
 
     <el-table border v-loading="loading" :data="chaptertemplateList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="code" />
-      <el-table-column label="名称" align="center" prop="name" />
+      <el-table-column label="序号" align="center" prop="code"/>
+      <el-table-column label="名称" align="center" prop="name"/>
       <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -148,7 +148,7 @@ export default {
       // 查询参数
       queryParams: {
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 50,
         code: null,
         name: null,
         deptId: null

+ 6 - 5
ruoyi-ui/src/views/rc/questionnairetemplate/index.vue

@@ -99,14 +99,14 @@
 
     <el-table border v-loading="loading" :data="questionnairetemplateList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="章节" align="center" prop="chapterName" />
-      <el-table-column label="问卷类型" align="center" prop="type">
+      <el-table-column label="目录" align="center" prop="directory" width="120" />
+      <el-table-column label="章节" align="center" prop="chapterName" width="240" />
+      <el-table-column label="问卷类型" align="center" prop="type"width="120" >
         <template slot-scope="scope">
           <dict-tag :options="dict.type.t_sec_sub_chap_type" :value="scope.row.type"/>
         </template>
       </el-table-column>
-      <el-table-column label="目录" align="center" prop="directory" />
-      <el-table-column label="序号" align="center" prop="code" />
+      <el-table-column label="序号" align="center" prop="code" width="120" />
       <el-table-column label="名称" align="center" prop="name" />
       <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -247,7 +247,8 @@ export default {
       listAllChaptertemplate().then(response => {
         let data = response.data;
         for (let i = 0; i < data.length; i++) {
-          this.chapterTemplateOptions.push({"dictLabel": data[i].name, "dictValue": data[i].id + ""});
+          console.log(data[i])
+          this.chapterTemplateOptions.push({"dictLabel": data[i].name, "dictValue": data[i].id});
         }
       });
     },