Pārlūkot izejas kodu

fix 修改项目管理增加部门搜索

Administrator 3 gadi atpakaļ
vecāks
revīzija
4277d91b4e

+ 5 - 5
ruoyi-common/pom.xml

@@ -36,21 +36,21 @@
             <version>5.7.8</version>
         </dependency>-->
         <!--积木-->
-        <dependency>
+<!--        <dependency>
             <groupId>org.jeecgframework.jimureport</groupId>
             <artifactId>jimureport-spring-boot-starter</artifactId>
             <version>1.3.75</version>
-        </dependency>
+        </dependency>-->
         <!--宋体字体-->
-        <dependency>
+<!--        <dependency>
             <groupId>org.jeecgframework.jimureport</groupId>
             <artifactId>jimureport-font</artifactId>
             <version>1.1.0</version>
-        </dependency>
+        </dependency>-->
         <!--本地积木-->
 <!--        <dependency>
             <groupId>com.boman</groupId>
-            <artifactId>boman-report</artifactId>
+            <artifactId>boman-report-NO-NACOS</artifactId>
             <version>2.5.0-SNAPSHOT</version>
         </dependency>-->
         <!-- Spring框架基本的核心工具 -->

+ 4 - 0
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java

@@ -76,6 +76,10 @@ public class Constants
      * 令牌
      */
     public static final String TOKEN = "token";
+    /**
+     * 密码是否符合复杂度
+     */
+    public static final String PASS_WORD_FLAG = "pass_word_flag";
 
     /**
      * 令牌前缀

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/project/BmProject.java

@@ -2,6 +2,8 @@ package com.ruoyi.system.domain.project;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -72,6 +74,19 @@ public class BmProject extends BaseEntity
     @Excel(name = "填报单位")
     private String deptName;
 
+    /**
+     * 部门id集合
+     */
+    private List<String> deptList;
+
+    public List<String> getDeptList() {
+        return deptList;
+    }
+
+    public void setDeptList(List<String> deptList) {
+        this.deptList = deptList;
+    }
+
     /**
      * 首页统计数据用
      */

+ 6 - 0
ruoyi-system/src/main/resources/mapper/system/project/BmProjectMapper.xml

@@ -67,6 +67,12 @@
             <if test="isDel != null ">and p.is_del = #{isDel}</if>
             <if test="beginTime != null ">and p.create_time &gt;= #{beginTime}</if>
             <if test="endTime != null ">and p.create_time &lt;= #{endTime}</if>
+            <if test="deptList != null  and deptList.size() > 0">
+                and p.dept_id in
+                <foreach item="deptId" collection="deptList" open="(" separator="," close=")">
+                    #{deptId}
+                </foreach>
+            </if>
         </where>
         order by p.create_time DESC
     </select>

+ 17 - 3
ruoyi-ui/src/views/management/info/index.vue

@@ -7,6 +7,9 @@
       <el-form-item label="项目名称" prop="name">
         <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable size="small" @keyup.enter.native="handleQuery" />
       </el-form-item>
+      <el-form-item label="填报单位" prop="name">
+        <el-input v-model="queryParams.deptName" placeholder="请输入填报单位" clearable size="small" @keyup.enter.native="handleQuery" />
+      </el-form-item>
       <el-form-item label="填报日期" prop="addtime">
         <el-date-picker value-format="yyyy-MM-dd" @change="tiemsChange" v-model="times" type="daterange"
           range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
@@ -248,6 +251,7 @@
     setPass,
     exportInfo
   } from "@/api/projectInfo/info";
+  import { listDept } from '@/api/system/dept'
   let vm = ''
 
   export default {
@@ -329,7 +333,9 @@
           address: null,
           isFrameorder: null,
           attachment: null,
-          description: null
+          description: null,
+          deptName: undefined,
+          deptList: []
         },
         // 表单参数
         form: {},
@@ -479,13 +485,22 @@
           address: null,
           isFrameorder: null,
           attachment: null,
-          description: null
+          description: null,
+          deptName: undefined,
+          deptList: []
         };
         this.resetForm("form");
       },
       /** 搜索按钮操作 */
       handleQuery() {
         this.queryParams.pageNum = 1;
+        listDept(this.queryParams).then(response => {
+          if (response.data.length  !== 0){
+            for (var i = 0; i < response.data.length; i++) {
+              this.queryParams.deptList.push(response.data[i].deptId)
+            }
+          }
+        });
         this.getList();
       },
       /** 重置按钮操作 */
@@ -529,7 +544,6 @@
                 this.msgSuccess("新增成功");
                 this.open = false;
                 this.getList();
-                console.log(345)
 
               });
             }