Explorar el Código

企业信息excel导入+原来功能的调整

yin_yu820 hace 5 días
padre
commit
f610c680dd
Se han modificado 20 ficheros con 1498 adiciones y 128 borrados
  1. 17 7
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/enterpriseinfo/controller/EnterpriseInfoController.java
  2. 139 5
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/enterpriseinfo/service/EnterpriseInfoService.java
  3. 41 20
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/controller/IdleFactoryBuildingsController.java
  4. 24 0
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/domain/IdleFactoryBuildings.java
  5. 1 0
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/mapper/IdleFactoryBuildingsMapper.java
  6. 36 5
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/mapper/xml/IdleFactoryBuildingsMapper.xml
  7. 11 1
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/service/IdleFactoryBuildingsService.java
  8. 70 34
      jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/service/dto/IdleFactoryBuildingsDTO.java
  9. 10 0
      jp-console/jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/core/excel/EasyExcelUtils.java
  10. 107 0
      jp-console/jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/core/excel/EnterpriseInfoExcelListener.java
  11. 115 16
      jp-console/jeeplus-plugins/jeeplus-file/src/main/java/com/jeeplus/file/controller/FileController.java
  12. 31 0
      jp-console/jeeplus-plugins/jeeplus-file/src/main/java/com/jeeplus/file/utils/ByteArrayMultipartFile.java
  13. 585 11
      jp-mobile/pages/factoryBuildings/factoryBuildingsInfo.vue
  14. 111 12
      jp-mobile/pages/factoryBuildings/factoryBuildingsList.vue
  15. 15 11
      jp-mobile/pages/index/factoryindex.vue
  16. BIN
      jp-mobile/static/img/logo2.png
  17. 2 3
      jp-ui/src/views/modules/enterpriseinfo/EnterpriseInfoForm.vue
  18. 4 2
      jp-ui/src/views/modules/enterpriseinfo/EnterpriseInfoList.vue
  19. 168 1
      jp-ui/src/views/modules/idlefactorybuildings/IdleFactoryBuildingsForm.vue
  20. 11 0
      jp-ui/src/views/modules/idlefactorybuildings/IdleFactoryBuildingsList.vue

+ 17 - 7
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/enterpriseinfo/controller/EnterpriseInfoController.java

@@ -672,7 +672,10 @@ public class EnterpriseInfoController {
 
 			enterpriseInfoService.saveOrUpdate (enterpriseInfoWrapper.toEntity (enterpriseInfoDTO));
 
-			UserDTO olduserDTO=userService.getUserByLoginName(oldLoginname);
+			UserDTO olduserDTO=null;
+			if(oldLoginname!=null){
+				olduserDTO=userService.getUserByLoginName(oldLoginname);
+			}
 			if(olduserDTO!=null){//有账号就编辑
 				olduserDTO.setLoginName(enterpriseInfoDTO.getPhone());
 				olduserDTO.setMobile(enterpriseInfoDTO.getPhone());
@@ -775,12 +778,19 @@ public class EnterpriseInfoController {
      *
      * @return
      */
-    @PreAuthorize("hasAnyAuthority('enterpriseinfo:enterpriseInfo:import')")
-    @PostMapping("import")
-    public ResponseEntity importFile(MultipartFile file) throws IOException {
-        String result = EasyExcelUtils.newInstance ( enterpriseInfoService, enterpriseInfoWrapper ).importExcel ( file, EnterpriseInfoDTO.class );
-        return ResponseEntity.ok ( result );
-    }
+//    @PreAuthorize("hasAnyAuthority('enterpriseinfo:enterpriseInfo:import')")
+//    @PostMapping("import")
+//    public ResponseEntity importFile(MultipartFile file) throws IOException {
+//        String result = EasyExcelUtils.newInstance ( enterpriseInfoService, enterpriseInfoWrapper ).importExcel_EnterpriseInfo ( file, EnterpriseInfoDTO.class );
+//        return ResponseEntity.ok ( result );
+//    }
+
+	@PreAuthorize("hasAnyAuthority('enterpriseinfo:enterpriseInfo:import')")
+	@PostMapping("import")
+	public ResponseEntity<String> importFile(MultipartFile file) throws IOException {
+		String result = enterpriseInfoService.importEnterprise(file);
+		return ResponseEntity.ok(result);
+	}
 
     /**
      * 下载导入企业基本信息数据模板

+ 139 - 5
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/enterpriseinfo/service/EnterpriseInfoService.java

@@ -3,6 +3,8 @@
  */
 package com.jeeplus.enterpriseinfo.service;
 
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.excel.EasyExcel;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -21,11 +23,14 @@ import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.utils.UserUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jeeplus.enterpriseinfo.domain.EnterpriseInfo;
 import com.jeeplus.enterpriseinfo.mapper.EnterpriseInfoMapper;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.IOException;
 import java.time.Year;
 import java.util.ArrayList;
 import java.util.Date;
@@ -40,7 +45,6 @@ import java.util.UUID;
  * @version 2024-11-04
  */
 @Service
-@Transactional
 public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, EnterpriseInfo> {
 
     @Autowired
@@ -106,6 +110,7 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
         return  baseMapper.findByName (name);
     }
 
+    @Transactional
     public int insertEnterpriseInfo(EnterpriseInfo enterpriseInfo) {
         return baseMapper.insertEnterpriseInfo( enterpriseInfo);
     }
@@ -224,12 +229,14 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
 
     public HashMap<String, Object> getWxtoke() {return baseMapper.getWxtoke ();    }
 
+    @Transactional
     public int setWxtoke(String id,String token,String expires_in) {return baseMapper.setWxtoke ( id, token, new Date(),expires_in);    }
 
     public List<HashMap<String, Object>> getnologinstr(String str) {
         return baseMapper.getnologinstr (str);
     }
 
+    @Transactional
     public int getloginstr(String id,String username) {
         return baseMapper.getloginstr (id,username,new Date());
     }
@@ -242,12 +249,12 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
         return baseMapper.getchupassword (phone);
     }
 
-
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
     public int generateAccount(EnterpriseInfoDTO ef){
         //返回生成账号总数
         int ccb=0;
         //都企供需-挂钩干部
-        if(ef.getBz6()!=null&&!ef.getBz6().equals("")){
+        if(ef.getBz6()!=null&&!ef.getBz6().equals("")&&ef.getBz5()!=null&&!ef.getBz5().equals("")){
             String pp=ef.getBz6();
             String password="Dzf@"+pp.substring(pp.length()-4,pp.length());//固定格式
             int res=addUserBy(pp,password,ef.getBz5(),ef.getName(),"1910166518827778049","1910141956174053377");
@@ -255,7 +262,7 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
         }
 
         //企业用户
-        if(ef.getPhone()!=null&&!ef.getPhone().equals("")){
+        if(ef.getPhone()!=null&&!ef.getPhone().equals("")&&ef.getLxr()!=null&&!ef.getLxr().equals("")){
             String pp=ef.getPhone();
             String password=generateRandomString(8);//随机生成初始密码
             int res=addUserBy(pp,password,ef.getLxr(),ef.getName(),"1890304178267557890","38a14f1f42ed424eab4cb5d489596b0d");
@@ -269,7 +276,7 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
         }
 
         //大走访-挂钩干部
-        if(ef.getDes13()!=null&&!ef.getDes13().equals("")){
+        if(ef.getDes13()!=null&&!ef.getDes13().equals("")&&ef.getDes14()!=null&&!ef.getDes14().equals("")){
             String pp=ef.getDes13();
             String password="Dzf@"+pp.substring(pp.length()-4,pp.length());//固定格式
             int res=addUserBy(pp,password,ef.getDes14(),ef.getName(),"1910166518827778049","1915280292672946177");
@@ -329,6 +336,7 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
     }
 
     //根据企业基本信息表,补全  机构表和中间表
+    @Transactional
     public String ce11() {
         List<EnterpriseInfoDTO> aa=baseMapper.findList();
         for(int i=0;i<aa.size();i++){
@@ -379,4 +387,130 @@ public class EnterpriseInfoService extends ServiceImpl<EnterpriseInfoMapper, Ent
     public List<EnterpriseInfoDTO> queryByUserNameList(String loginName) {
         return  baseMapper.queryByUserNameList (loginName);
     }
+
+
+    public String importEnterprise(MultipartFile file) throws IOException {
+        StringBuilder message = new StringBuilder();
+        int insertCount = 0;
+        int updateCount = 0;
+        int noupdateCount = 0;
+        int errorCount = 0;
+
+        List<EnterpriseInfoDTO> list = EasyExcel.read(file.getInputStream())
+                .head(EnterpriseInfoDTO.class)
+                .sheet()
+                .doReadSync();
+
+        for (EnterpriseInfoDTO dto : list) {
+            try {
+                // 调用独立事务方法处理单条
+                String result = processSingleEnterprise(dto);
+
+                switch (result) {
+                    case "INSERT":
+                        insertCount++;
+                        break;
+                    case "UPDATE":
+                        updateCount++;
+                        break;
+                    case "NOUPDATE":
+                        noupdateCount++;
+                        break;
+                }
+            } catch (Exception e) {
+                message.append("企业[").append(dto.getName()).append("]导入失败:").append(e.getMessage()).append("; ");
+                errorCount++;
+                // 继续下一条,当前事务已回滚,不影响其他数据
+            }
+        }
+
+        return String.format("导入完成!新增:%d条, 更新:%d条, 无需更新:%d条, 失败:%d条。%s",
+                insertCount, updateCount, noupdateCount, errorCount, message.toString());
+    }
+
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
+    public String processSingleEnterprise(EnterpriseInfoDTO dto) {
+        // 校验
+        if (StrUtil.isBlank(dto.getName())) {
+            throw new RuntimeException("企业名称不能为空");
+        }
+
+        // 查询已存在
+        EnterpriseInfo existing = this.lambdaQuery()
+                .eq(EnterpriseInfo::getName, dto.getName())
+                .one();
+
+        // 处理默认值
+        if (dto.getOfficeArea() == null || StrUtil.isBlank(dto.getDes3())) {
+            dto.setOfficeArea("0");
+        }
+
+        String result;
+        if (existing != null) {
+            // ===== 编辑模式 =====
+            result = handleUpdate(existing, dto);
+        } else {
+            // ===== 新增模式 =====
+            result = handleInsert(dto);
+        }
+
+        return result;
+    }
+
+    /**
+     * 处理更新逻辑
+     */
+    private String handleUpdate(EnterpriseInfo existing, EnterpriseInfoDTO dto) {
+        // 判断是否需要更新
+        boolean noNeedUpdate = existing.getLxr().equals(dto.getLxr())
+                && existing.getPhone().equals(dto.getPhone())
+                && existing.getDes13().equals(dto.getDes13())
+                && existing.getDes14().equals(dto.getDes14());
+
+        if (noNeedUpdate) {
+            return "NOUPDATE";
+        }
+
+        String oldLoginname = existing.getPhone();
+
+        // 只更新指定字段
+        existing.setLxr(dto.getLxr());
+        existing.setPhone(dto.getPhone());
+        existing.setDes13(dto.getDes13());
+        existing.setDes14(dto.getDes14());
+        this.updateById(existing);
+
+        // 同步更新账号
+
+        UserDTO olduser=null;
+        if(oldLoginname!=null){
+            olduser=userService.getUserByLoginName(oldLoginname);
+        }
+        if (olduser != null) {
+            olduser.setLoginName(dto.getPhone());
+            olduser.setMobile(dto.getPhone());
+            olduser.setName(dto.getLxr());
+            userService.saveOrUpdate(olduser);
+        } else {
+            // 生成新账号
+            generateAccount(dto);
+        }
+
+        return "UPDATE";
+    }
+
+    /**
+     * 处理新增逻辑
+     */
+    private String handleInsert(EnterpriseInfoDTO dto) {
+        String enterpriseid = UUID.randomUUID().toString().replace("-", "");
+        dto.setId(enterpriseid);
+
+        this.save(enterpriseInfoWrapper.toEntity(dto));
+
+        // 生成账号
+        generateAccount(dto);
+
+        return "INSERT";
+    }
 }

+ 41 - 20
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/controller/IdleFactoryBuildingsController.java

@@ -99,38 +99,61 @@ public class IdleFactoryBuildingsController {
 	}
 
 	/**
-	 * 闲置厂房列表数据
+	 * 闲置厂房列表数据-只能看到闲置状态下的
 	 */
-	@ApiLog("查询闲置厂房列表数据")
-	@ApiOperation(value = "查询闲置厂房列表数据")
+	@ApiLog("查询闲置厂房列表数据-只能看到闲置状态下的")
+	@ApiOperation(value = "查询闲置厂房列表数据-只能看到闲置状态下的")
 	@GetMapping("list2")
 	public ResponseEntity<IPage<IdleFactoryBuildingsDTO>> list2(IdleFactoryBuildingsDTO idleFactoryBuildingsDTO, Page<IdleFactoryBuildingsDTO> page) throws Exception {
 		String area=idleFactoryBuildingsDTO.getIdleArea();
 		String des1=idleFactoryBuildingsDTO.getDes1();
+		String DrivingCount=idleFactoryBuildingsDTO.getDrivingCount();
+		String CleanRoom=idleFactoryBuildingsDTO.getCleanRoom();
+		String des7=idleFactoryBuildingsDTO.getDes7();
 		if(area!=null&&area.equals("")){
 			idleFactoryBuildingsDTO.setIdleArea("");
 		}
 		idleFactoryBuildingsDTO.setState(1);
-		QueryWrapper queryWrapper = QueryWrapperGenerator.buildQueryCondition (idleFactoryBuildingsDTO, IdleFactoryBuildingsDTO.class);
+		QueryWrapper<IdleFactoryBuildingsDTO> queryWrapper =QueryWrapperGenerator.buildQueryCondition(idleFactoryBuildingsDTO, IdleFactoryBuildingsDTO.class);
 		if(area!=null&&!area.equals("")) {
 			if (area.equals("1")) {
-				queryWrapper.between("idle_area",0,500);
+				queryWrapper.between("idle_area",0,5000);
 			}else if(area.equals("2")){
-				queryWrapper.between("idle_area",500,1000);
+				queryWrapper.between("idle_area",5000,10000);
 			}else if(area.equals("3")){
-				queryWrapper.between("idle_area",1000,3000);
-			}else if(area.equals("4")){
-				queryWrapper.between("idle_area",3000,5000);
-			}else if(area.equals("5")){
-				queryWrapper.gt("idle_area",5000);
+				queryWrapper.gt("idle_area",10000);
+			}
+		}
+		//添加行车数量的筛选
+		if(DrivingCount!=null&&!DrivingCount.equals("")) {
+			if (DrivingCount.equals("1")) {
+				queryWrapper.gt("driving_count",0);
+			}else if(DrivingCount.equals("2")){
+				queryWrapper.and(q -> q.isNull("driving_count")
+						.or()
+						.eq("driving_count", "")
+						.or()
+						.eq("driving_count", "0"));
 			}
 		}
-		//添加产业的筛选
-//		if(des1!=null&&!des1.equals("")) {
-//			queryWrapper.apply("FIND_IN_SET({0}, des1)", des1);
-//		}
 
+		//添加洁净车间的筛选
+		if(CleanRoom!=null&&!CleanRoom.equals("")) {
+			if (CleanRoom.equals("1")) {
+				queryWrapper.gt("clean_room",1);
+			}else if(CleanRoom.equals("2")){
+				queryWrapper.and(q -> q.isNull("clean_room")
+						.or()
+						.eq("clean_room", "")
+						.or()
+						.eq("clean_room", "1"));
+			}
+		}
 
+		//添加四个平台公司的筛选
+		if(des7!=null&&!des7.equals("")) {
+			queryWrapper.eq("des7", des7);
+		}
 
 		// 1. 拆分 des1
 		List<String> desArr = new ArrayList<>();
@@ -141,7 +164,6 @@ public class IdleFactoryBuildingsController {
 					.collect(Collectors.toList());
 		}
 
-		// 2. 把数组变成 final,才能在 lambda 里用
 		final List<String> finalDesArr = desArr;
 
 		// 3. 拼 OR 条件
@@ -158,7 +180,6 @@ public class IdleFactoryBuildingsController {
 			});
 		}
 
-
 		IPage<IdleFactoryBuildingsDTO> result = idleFactoryBuildingsService.findPage (page, queryWrapper);
 		return ResponseEntity.ok (result);
 	}
@@ -175,10 +196,10 @@ public class IdleFactoryBuildingsController {
 	}
 
 	/**
-	 *板块统计
+	 *板块统计+4个公司
 	 */
-	@ApiLog("板块统计")
-	@ApiOperation(value = "板块统计")
+	@ApiLog("板块统计+4个公司")
+	@ApiOperation(value = "板块统计+4个公司")
 	@GetMapping("getParkList")
 	public ResponseEntity<List<HashMap<String, Object>>> getParkList() throws Exception {
 		List<HashMap<String, Object>> map=idleFactoryBuildingsService.getParkList();

+ 24 - 0
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/domain/IdleFactoryBuildings.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.idlefactorybuildings.domain;
 
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
@@ -83,6 +84,22 @@ public class IdleFactoryBuildings extends BaseEntity {
      * 预留
      */
 	private String des5;
+
+	private String drivingCount;
+
+	private String drivingLoad;
+
+	private String cleanRoom;
+
+	private String situation;
+
+	private String lxr;
+
+	private String phone;
+
+	private String pic1;
+
+	private String pic2;
 	/**
      * 预留
      */
@@ -96,4 +113,11 @@ public class IdleFactoryBuildings extends BaseEntity {
      */
 	private String des8;
 
+	private String ispark;
+	private String remark1;
+	private String remark2;
+	private String remark3;
+	private String remark4;
+	private String remark5;
+	private String remark6;
 }

+ 1 - 0
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/mapper/IdleFactoryBuildingsMapper.java

@@ -27,6 +27,7 @@ public interface IdleFactoryBuildingsMapper extends BaseMapper<IdleFactoryBuildi
     IdleFactoryBuildingsDTO findById(String id);
     List<HashMap<String, Object>> getDictList(String type);
     List<HashMap<String, Object>> getParkList();
+    List<HashMap<String, Object>> getParkList2();
     List<HashMap<String, Object>> getIndustryList();
     HashMap<String, Object> statByDesCodes(@Param("codes") List<Integer> codes);
 

+ 36 - 5
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/mapper/xml/IdleFactoryBuildingsMapper.xml

@@ -15,14 +15,31 @@
 		a.idle_area AS "idleArea",
 		a.remark AS "remark",
         a.state AS "state",
-		b.label AS "des1",
+		a.des1 AS "des1",
 		a.des2 AS "des2",
 		a.des3 AS "des3",
 		a.des4 AS "des4",
 		a.des5 AS "des5",
+a.driving_count AS "drivingCount",
+a.driving_load AS "drivingLoad",
+a.clean_room AS "cleanRoom",
+a.situation AS "situation",
+a.lxr AS "lxr",
+a.phone AS "phone",
+a.pic1 AS "pic1",
+a.pic2 AS "pic2",
+
 		a.des6 AS "des6",
 		a.des7 AS "des7",
-		a.des8 AS "des8",
+		b.label AS "des8",
+a.ispark AS "ispark",
+a.remark1 AS "remark1",
+a.remark2 AS "remark2",
+a.remark3 AS "remark3",
+a.remark4 AS "remark4",
+a.remark5 AS "remark5",
+a.remark6 AS "remark6",
+
 		a.create_by AS "createBy.id",
 		a.create_date AS "createDate",
 		a.update_by AS "updateBy.id",
@@ -69,12 +86,26 @@
 		FROM sys_dict_value a
 				 LEFT JOIN ly_idle_factory_buildings b
 				 ON a.value = b.park
-				 AND b.del_flag = 0 and b.state=1
+				 AND b.del_flag = 0 and b.state=1 and b.ispark=1
 		WHERE a.dict_type_id = '1995785139824984065'
 		GROUP BY a.label
 		ORDER BY a.sort asc;
 	</select>
 
+	<select id="getParkList2" resultType="map">
+		SELECT a.label,
+			   COUNT(b.id)  AS building_cnt,
+			   IFNULL(SUM(b.idle_area),0) AS total_idle_area,
+			   IFNULL(SUM(b.area),0) AS total_area
+		FROM sys_dict_value a
+				 LEFT JOIN ly_idle_factory_buildings b
+						   ON a.value = b.des7
+							   AND b.del_flag = 0 and b.state=1
+		WHERE a.dict_type_id = '2011716512185036801'
+		GROUP BY a.label
+		ORDER BY a.sort asc;
+	</select>
+
 	<select id="getIndustryList" resultType="map">
 		SELECT a.label,
 			   a.value AS content,
@@ -85,7 +116,7 @@
 				 LEFT JOIN ly_idle_factory_buildings b
 						   ON FIND_IN_SET(a.value, b.des1) > 0
 							   AND b.del_flag = 0
-							   AND b.state = 1
+							   AND b.state = 1 and b.ispark=1
 		WHERE a.dict_type_id = '2008827031063937026' and a.del_flag=0
 		GROUP BY a.label
 		ORDER BY a.sort ASC;
@@ -98,7 +129,7 @@
 		IFNULL(SUM(b.area), 0)      AS total_area
 		FROM ly_idle_factory_buildings b
 		WHERE b.del_flag = 0
-		AND b.state = 1
+		AND b.state = 1 and b.ispark=1
 		<if test="codes != null and codes.size > 0">
 			AND (
 			<foreach collection="codes" item="c" separator=" OR ">

+ 11 - 1
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/service/IdleFactoryBuildingsService.java

@@ -42,7 +42,17 @@ public class IdleFactoryBuildingsService extends ServiceImpl<IdleFactoryBuilding
     }
 
     public List<HashMap<String, Object>> getParkList() {
-        return baseMapper.getParkList ();
+
+        List<HashMap<String, Object>> map=baseMapper.getParkList ();
+        List<HashMap<String, Object>> map2=baseMapper.getParkList2 ();
+        if(map2!=null){
+            for(int i=0;i<map2.size();i++){
+                if(!map2.get(i).get("label").toString().equals("无")){
+                    map.add(map2.get(i));
+                }
+            }
+        }
+        return map;
     }
 
     public List<HashMap<String, Object>> getIndustryList() {

+ 70 - 34
jp-console/jeeplus-module/ly/src/main/java/com/jeeplus/idlefactorybuildings/service/dto/IdleFactoryBuildingsDTO.java

@@ -25,15 +25,15 @@ public class IdleFactoryBuildingsDTO extends BaseDTO {
 
 	private static final long serialVersionUID = 1L;
 
-	        
+
 	/**
      * 厂房名称
      */
 	@NotNull(message="厂房名称不能为空")
     @Query(type = QueryType.LIKE)
-	@ExcelProperty("厂房名称") 
+	@ExcelProperty("厂房名称")
 	private String name;
-	        
+
 	/**
      * 板块
      */
@@ -42,61 +42,61 @@ public class IdleFactoryBuildingsDTO extends BaseDTO {
 	@ExcelProperty(value = "板块", converter = ExcelDictDTOConverter.class)
 	@ExcelDictProperty("sys_park")
 	private Integer park;
-	        
+
 	/**
      * 位置
      */
 	@NotNull(message="位置不能为空")
-	@ExcelProperty("位置") 
+	@ExcelProperty("位置")
 	private String address;
-	        
+
 	/**
      * 厂房权属
      */
 	@ExcelProperty(value = "厂房权属", converter = ExcelDictDTOConverter.class)
 	@ExcelDictProperty("sys_ownership")
 	private Integer ownership;
-	        
+
 	/**
      * 厂房占地面积(亩)
      */
 	@NotNull(message="厂房占地面积(亩)不能为空")
-	@ExcelProperty("厂房占地面积(亩)") 
+	@ExcelProperty("厂房占地面积(亩)")
 	private String area;
-	        
+
 	/**
      * 单层或多层
      */
 	@ExcelProperty(value = "单层或多层", converter = ExcelDictDTOConverter.class)
 	@ExcelDictProperty("sys_single_layer")
 	private Integer singleLayer;
-	        
+
 	/**
      * 层数
      */
-	@ExcelProperty("层数") 
+	@ExcelProperty("层数")
 	private String numberLayers;
-	        
+
 	/**
      * 层高(米)
      */
-	@ExcelProperty("层高(米)") 
+	@ExcelProperty("层高(米)")
 	private String floorHeight;
-	        
+
 	/**
      * 闲置厂房面积(㎡)
      */
 	@NotNull(message="闲置厂房面积(㎡)不能为空")
     @Query(type = QueryType.BETWEEN)
-	@ExcelProperty("闲置厂房面积(㎡)") 
+	@ExcelProperty("闲置厂房面积(㎡)")
 	private String idleArea;
-	        
+
 	/**
      * 备注
      */
-	@ExcelProperty("备注") 
+	@ExcelProperty("备注")
 	private String remark;
-	        
+
 	/**
      * 厂房状态
      */
@@ -105,53 +105,89 @@ public class IdleFactoryBuildingsDTO extends BaseDTO {
 	@ExcelProperty(value = "厂房状态", converter = ExcelDictDTOConverter.class)
 	@ExcelDictProperty("sys_factory_state")
 	private Integer state;
-	        
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
 	private String des1;
-	        
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
 	private String des2;
-	        
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
+	@Query(type = QueryType.EQ)
 	private String des3;
-	        
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
 	private String des4;
-	        
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
 	private String des5;
-	        
+
+
+	@ExcelProperty("行车数量")
+	private String drivingCount;
+
+	@ExcelProperty("行车承载负荷(吨)")
+	private String drivingLoad;
+
+	@ExcelProperty("洁净车间")
+	private String cleanRoom;
+
+	@ExcelProperty("水电气情况")
+	private String situation;
+
+	@ExcelProperty("联系人")
+	private String lxr;
+
+	@ExcelProperty("联系电话")
+	private String phone;
+
+	@ExcelProperty("平面图")
+	private String pic1;
+
+	@ExcelProperty("厂房图")
+	private String pic2;
+
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
 	private String des6;
-	        
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
 	private String des7;
-	        
+
 	/**
      * 预留
      */
-	@ExcelProperty("预留") 
+	@ExcelProperty("预留")
 	private String des8;
 
+	@Query(type = QueryType.EQ)
+	private String ispark;
+
+	private String remark1;
+	private String remark2;
+	private String remark3;
+	private String remark4;
+	private String remark5;
+	private String remark6;
 }

+ 10 - 0
jp-console/jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/core/excel/EasyExcelUtils.java

@@ -94,5 +94,15 @@ public class EasyExcelUtils<T> {
 
     }
 
+    public String importExcel_EnterpriseInfo(MultipartFile file, Class <T> pojoClass) throws IOException {
+        if ( file == null ) {
+            return "上传文件不能为空!";
+        }
+        EnterpriseInfoExcelListener excelListener = new EnterpriseInfoExcelListener ( this.service, this.wrapper );
+        EasyExcel.read ( file.getInputStream ( ), pojoClass, excelListener ).sheet ( ).doRead ( );
+        return excelListener.getMessage ( );
+
+    }
+
 
 }

+ 107 - 0
jp-console/jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/core/excel/EnterpriseInfoExcelListener.java

@@ -0,0 +1,107 @@
+package com.jeeplus.core.excel;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.read.listener.ReadListener;
+import com.alibaba.excel.util.ListUtils;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jeeplus.common.beanvalidator.BeanValidators;
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.validation.ConstraintViolationException;
+import javax.validation.Validator;
+import java.util.List;
+
+// 有个很重要的点 EnterpriseInfoExcelListener 不能被spring管理,要每次读取excel都要new,然后里面用到spring可以构造方法传进去
+@Slf4j
+@Data
+public class EnterpriseInfoExcelListener<T> implements ReadListener <T> {
+
+    private String message;
+
+    /**
+     * 每隔5条存储数据库,实际使用中可以100条,然后清理list ,方便内存回收
+     */
+    private static final int BATCH_COUNT = 100;
+    /**
+     * 缓存的数据
+     */
+    private List <T> cachedDataList = ListUtils.newArrayListWithExpectedSize ( BATCH_COUNT );
+    /**
+     * 业务存储service
+     */
+    private IService service;
+
+    private EntityWrapper wrapper;
+
+
+    /**
+     * 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来
+     *
+     * @param service
+     */
+    public EnterpriseInfoExcelListener(IService service, EntityWrapper wrapper) {
+        this.service = service;
+        this.wrapper = wrapper;
+    }
+
+    /**
+     * 这个每一条数据解析都会来调用
+     *
+     * @param data    one row value. Is is same as {@link AnalysisContext#readRowHolder()}
+     * @param context
+     */
+    @Override
+    public void invoke(T data, AnalysisContext context) {
+        log.info ( "解析到一条数据:{}", data.toString ( ) );
+        cachedDataList.add ( data );
+        // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
+        if ( cachedDataList.size ( ) >= BATCH_COUNT ) {
+            saveData ( );
+            // 存储完成清理 list
+            cachedDataList = ListUtils.newArrayListWithExpectedSize ( BATCH_COUNT );
+        }
+    }
+
+    /**
+     * 所有数据解析完成了 都会来调用
+     *
+     * @param context
+     */
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+        // 保存数据到数据库
+        saveData ( );
+        log.info ( "所有数据解析完成!" );
+    }
+
+    /**
+     * 加上存储数据库
+     */
+    public void saveData() {
+        log.info ( "{}条数据,开始导入数据库!", cachedDataList.size ( ) );
+        Validator validator = SpringUtil.getBean ( Validator.class );
+        StringBuilder failureMsg = new StringBuilder ( );
+        cachedDataList.forEach ( cachedData -> {
+            try {
+                BeanValidators.validateWithException ( validator, cachedData );
+            } catch (ConstraintViolationException ex) {
+                List <String> messageList = BeanValidators.extractPropertyAndMessageAsList ( ex, ": " );
+                for (String message : messageList) {
+                    failureMsg.append ( message + "; " );
+                }
+            }
+        } );
+
+        if ( StrUtil.isNotEmpty ( failureMsg.toString ( ) ) ) {
+            this.message = failureMsg.toString ( );
+            log.info ( this.message );
+            return;
+        }
+        service.saveBatch ( wrapper.toEntity ( cachedDataList ) );
+        this.message = "导入数据库成功!";
+    }
+}

+ 115 - 16
jp-console/jeeplus-plugins/jeeplus-file/src/main/java/com/jeeplus/file/controller/FileController.java

@@ -6,6 +6,7 @@ package com.jeeplus.file.controller;
 import cn.hutool.core.util.StrUtil;
 import com.jeeplus.file.config.FileProperties;
 import com.jeeplus.file.repository.AccessoryRepository;
+import com.jeeplus.file.utils.ByteArrayMultipartFile;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
@@ -16,8 +17,16 @@ import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;
 
+import javax.imageio.IIOImage;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriteParam;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -70,31 +79,121 @@ public class FileController {
      * @return
      * @throws IOException
      */
+//    @RequestMapping("upload")
+//    public ResponseEntity upload(HttpServletRequest request, MultipartFile file) {
+//
+//        Calendar cal = Calendar.getInstance ( );
+//        int year = cal.get ( Calendar.YEAR );
+//        int month = cal.get ( Calendar.MONTH ) + 1;
+//        String uploadPath = request.getParameter ( "uploadPath" ) + "/" + year + "/" + month + "/";
+//        // 判断文件是否为空
+//        if ( !file.isEmpty ( ) ) {
+//            String name = file.getOriginalFilename ( );
+//            if ( fileProperties.isAvailable ( name ) ) {
+//                // 文件保存路径
+//                // 转存文件
+//                accessoryRepository.save ( file, uploadPath, name );
+//                return ResponseEntity.ok ( FILE_SERVER + "/download?uploadPath=" + uploadPath + "&name=" + name );
+//
+//            } else {
+//                return ResponseEntity.badRequest ( ).body ( "请勿上传非法文件!" );
+//            }
+//        } else {
+//            return ResponseEntity.badRequest ( ).body ( "文件不存在!" );
+//        }
+//    }
+
+
     @RequestMapping("upload")
-    public ResponseEntity upload(HttpServletRequest request, MultipartFile file) {
+    public ResponseEntity upload(HttpServletRequest request,MultipartFile file) throws IOException {
+
+        Calendar cal = Calendar.getInstance();
+        int year  = cal.get(Calendar.YEAR);
+        int month = cal.get(Calendar.MONTH) + 1;
+        String uploadPath = request.getParameter("uploadPath") + "/" + year + "/" + month + "/";
+        /* ---- 0. 空文件 ---- */
+        if (file.isEmpty()) {
+            return ResponseEntity.badRequest().body("文件不存在!");
+        }
+        String name = file.getOriginalFilename();
+        if (!fileProperties.isAvailable(name)) {
+            return ResponseEntity.badRequest().body("请勿上传非法文件!");
+        }
 
-        Calendar cal = Calendar.getInstance ( );
-        int year = cal.get ( Calendar.YEAR );
-        int month = cal.get ( Calendar.MONTH ) + 1;
-        String uploadPath = request.getParameter ( "uploadPath" ) + "/" + year + "/" + month + "/";
-        // 判断文件是否为空
-        if ( !file.isEmpty ( ) ) {
-            String name = file.getOriginalFilename ( );
-            if ( fileProperties.isAvailable ( name ) ) {
-                // 文件保存路径
-                // 转存文件
-                accessoryRepository.save ( file, uploadPath, name );
-                return ResponseEntity.ok ( FILE_SERVER + "/download?uploadPath=" + uploadPath + "&name=" + name );
+        /* ---- 1. 只处理>1M的图片 ---- */
+        String contentType = file.getContentType();
+        boolean isImage = contentType != null && contentType.startsWith("image/");
+        long oneMB = 1024 * 1024;
+        byte[] finalBytes;
 
-            } else {
-                return ResponseEntity.badRequest ( ).body ( "请勿上传非法文件!" );
+        if (isImage && file.getSize() > oneMB) {
+            BufferedImage src = ImageIO.read(file.getInputStream());
+            if (src == null) {
+                return ResponseEntity.badRequest().body("图片格式无法识别!");
             }
+            /* 等比缩边 1600 */
+            BufferedImage scaled = scaleToWidth(src, 1600);
+            /* 压到 <=900KB */
+            finalBytes = compressJpgTo900K(scaled);
         } else {
-            return ResponseEntity.badRequest ( ).body ( "文件不存在!" );
+            finalBytes = file.getBytes();
         }
+
+        /* ---- 2. 保存 ---- */
+        String timePrefix = new java.text.SimpleDateFormat("yyyyMMddHHmmss").format(cal.getTime());
+        String newName = timePrefix + "_" + name;
+
+        MultipartFile outFile = new ByteArrayMultipartFile(
+                file.getName(), newName, contentType, finalBytes);
+        accessoryRepository.save(outFile, uploadPath, newName);
+
+        /* ---- 3. 返回 ---- */
+        return ResponseEntity.ok(FILE_SERVER + "/download?uploadPath=" + uploadPath + "&name=" + newName);
     }
 
 
+    /**
+     * 等比缩放到指定最大宽度
+     */
+    private BufferedImage scaleToWidth(BufferedImage src, int maxWidth) {
+        int w = src.getWidth();
+        int h = src.getHeight();
+        if (w <= maxWidth) return src;
+        int newH = (int) ((double) h * maxWidth / w);
+        BufferedImage dest = new BufferedImage(maxWidth, newH, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g = dest.createGraphics();
+        g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
+                RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+        g.drawImage(src, 0, 0, maxWidth, newH, null);
+        g.dispose();
+        return dest;
+    }
+
+    /**
+     * 循环降质量,直到 <=900 KB
+     */
+    private byte[] compressJpgTo900K(BufferedImage image) throws IOException {
+        float quality = 0.95f;
+        ByteArrayOutputStream out;
+        do {
+            out = new ByteArrayOutputStream();
+            ImageWriter writer = ImageIO.getImageWritersByFormatName("jpg").next();
+            ImageWriteParam param = writer.getDefaultWriteParam();
+            param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+            param.setCompressionQuality(quality);
+
+            ImageOutputStream ios = ImageIO.createImageOutputStream(out);
+            writer.setOutput(ios);
+            writer.write(null, new IIOImage(image, null, null), param);
+            ios.close();
+            writer.dispose();
+
+            if (out.size() <= 900 * 1024) break;
+            quality -= 0.08f;          // 每次降 8%
+        } while (quality > 0.15f);     // 最低别压成“马赛克”
+
+        return out.toByteArray();
+    }
 
     /**
      * 下载文件流

+ 31 - 0
jp-console/jeeplus-plugins/jeeplus-file/src/main/java/com/jeeplus/file/utils/ByteArrayMultipartFile.java

@@ -0,0 +1,31 @@
+package com.jeeplus.file.utils;
+import org.springframework.web.multipart.MultipartFile;
+import java.io.*;
+
+public class ByteArrayMultipartFile implements MultipartFile {
+    private final String name;
+    private final String originalFilename;
+    private final String contentType;
+    private final byte[] content;
+
+    public ByteArrayMultipartFile(String name, String originalFilename,
+                                  String contentType, byte[] content) {
+        this.name = name;
+        this.originalFilename = originalFilename;
+        this.contentType = contentType;
+        this.content = content;
+    }
+
+    @Override public String getName() { return name; }
+    @Override public String getOriginalFilename() { return originalFilename; }
+    @Override public String getContentType() { return contentType; }
+    @Override public boolean isEmpty() { return content == null || content.length == 0; }
+    @Override public long getSize() { return content.length; }
+    @Override public byte[] getBytes() { return content; }
+    @Override public InputStream getInputStream() { return new ByteArrayInputStream(content); }
+    @Override public void transferTo(File dest) throws IOException {
+        try (FileOutputStream out = new FileOutputStream(dest)) {
+            out.write(content);
+        }
+    }
+}

+ 585 - 11
jp-mobile/pages/factoryBuildings/factoryBuildingsInfo.vue

@@ -22,6 +22,13 @@
 			
 			<view class="show1">
 				
+				<view class="textbg">
+					<view class="text1">
+						 厂房编号
+					</view>	
+					<input class="text44" v-model="inputForm.des6" placeholder="输入厂房编号" :disabled="ischeck"></input>
+				</view>
+				
 				<view class="textbg">
 					<view class="text1">
 						 厂房名称
@@ -33,8 +40,8 @@
 					<view class="text1">
 						 所属园区
 					</view>
-					<view v-if="ischeck" class="text2" :class="inputForm.des1 === '需' ? 'text33' : 'text44'" >
-						 {{inputForm.des1}}
+					<view v-if="ischeck" class="text2" :class="inputForm.des8 === '需' ? 'text33' : 'text44'" >
+						 {{inputForm.des8}}
 					</view>	
 								
 					<picker v-else class="title2" @change="bindPickerChange" rangeKey="label" rangeValue="value" :range="parkList">
@@ -49,6 +56,23 @@
 					</view>
 					<input class="text44" v-model="inputForm.address" placeholder="输入详细位置" :disabled="ischeck"></input>			
 				</view>
+				
+				<view class="textbg">
+					<view class="text1">
+						 联系人
+					</view>
+										
+					<button v-if="showloginbt" @click="tologin" class="cu-btn block bg-blue ">{{dengtxt}}</button>
+					<input v-else class="text44" v-model="inputForm.lxr" placeholder="输入联系人" :disabled="ischeck"></input>			
+				</view>
+				
+				<view class="textbg">
+					<view class="text1">
+						 联系电话
+					</view>
+					<button v-if="showloginbt" @click="tologin" class="cu-btn block bg-blue ">{{dengtxt}}</button>
+					<input v-else class="text44" v-model="inputForm.phone" placeholder="输入联系电话" :disabled="ischeck"></input>			
+				</view>
 			</view>
 
 			<view class="titlebg2">
@@ -71,6 +95,21 @@
 				</picker>
 				
 			</view>
+						
+			<view class="textbg">
+				<view class="text12">
+					 产权
+				</view>
+				<view v-if="ischeck" class="text44" >
+					 {{selecteddes7}}
+				</view>	
+							
+				<picker v-else class="title2" @change="bindPickerChange4" rangeKey="label" rangeValue="value" :range="parkList4">
+					<view class="text44" :class="{ placeholder: selecteddes7 === '请选择' }">{{ selecteddes7 }}</view>
+				</picker>	
+																			
+			</view>
+			
 			
 			<view class="textbg">
 				<view class="text12">
@@ -122,6 +161,114 @@
 			</view>
 			
 			<view class="textbg">
+				<view class="text12">
+					 适用产业
+				</view>
+									
+				<!-- 回显(查看模式) -->
+				<view v-if="ischeck" class="text44">
+				  {{ inputForm.des2 || '暂无' }}
+				</view>
+				
+				<!-- 编辑(选择模式) -->
+				<zqs-select
+				  v-else
+				  class="input2"
+				  :multiple="true"
+				  :list="industryList"
+				  label-key="label"
+				  value-key="value"
+				  placeholder=" 请选择"
+				  title="请选择适用产业"
+				  clearable
+				  v-model="selectedIndustry"
+				  @search="searchEvent"
+				  @change="selectChange2"
+				></zqs-select>
+										
+			</view>	
+			
+			
+			<view class="textbg">
+				<view class="text12">
+					 厂房装修
+				</view>
+				<view v-if="ischeck" class="text44">
+					 {{ inputForm.des3==='1' ? '毛坯' :
+					        inputForm.des3==='2' ? '精装' : '' }}
+				</view>	
+				<picker v-else class="title2" @change="bindPickerChange6" rangeKey="label" rangeValue="value" :range="parkList6">
+					<view class="text44" :class="{ placeholder: selecteddes3 === '请选择' }">{{ selecteddes3 }}</view>
+				</picker>			
+			</view>
+			
+			<view class="textbg">
+				<view class="text12">
+					 长宽
+				</view>	
+				<view class="text221">
+					 <input class="text44" v-model="inputForm.des4" placeholder="输入长宽" :disabled="ischeck"></input>
+				</view>			
+			</view>
+			
+			<view class="textbg">
+				<view class="text12">
+					 承载负荷(kg/m²)
+				</view>	
+				<view class="text221">
+					 <input class="text44" v-model="inputForm.des5" placeholder="输入承载负荷" :disabled="ischeck"></input>
+				</view>			
+			</view>
+			
+			<view class="textbg">
+				<view class="text12">
+					 行车数量
+				</view>	
+				<view class="text221">
+					 <input class="text44" v-model="inputForm.drivingCount" placeholder="输入行车数量" :disabled="ischeck"></input>
+				</view>			
+			</view>
+			
+			<view class="textbg">
+				<view class="text12">
+					 行车承载负荷(吨)
+				</view>	
+				<view class="text221">
+					 <input class="text44" v-model="inputForm.drivingLoad" placeholder="输入行车承载负荷" :disabled="ischeck"></input>
+				</view>			
+			</view>
+			
+			<view class="textbg">
+				<view class="text12">
+					 洁净车间
+				</view>
+				<view v-if="ischeck" class="text44">
+					 {{ selectedcleanRoom }}
+				</view>	
+				<picker v-else class="title2" @change="bindPickerChange5" rangeKey="label" rangeValue="value" :range="parkList5">
+					<view class="text44" :class="{ placeholder: selectedcleanRoom === '请选择' }">{{ selectedcleanRoom }}</view>
+				</picker>			
+			</view>
+			
+			<view class="textbg">
+				<view class="text12">
+					 水电气情况
+				</view>	
+				<view class="text221">
+					 <input class="text44" v-model="inputForm.situation" placeholder="输入水电气情况" :disabled="ischeck"></input>
+				</view>			
+			</view>
+			
+			<view v-if="!ischeck" class="textbg">
+				<view class="text12">
+					 纳入板块统计
+				</view>				
+				<picker class="title2" @change="bindPickerChange7" rangeKey="label" rangeValue="value" :range="parkList7">
+					<view class="text44" :class="{ placeholder: selectedispark === '请选择' }">{{ selectedispark }}</view>
+				</picker>			
+			</view>
+			
+			<view class="textbg" >
 				<view class="text12">
 					 备注
 				</view>	
@@ -130,14 +277,46 @@
 				</view>			
 			</view>
 			
+			<view v-if="!showloginbt&&!ischeck" class="cu-form-group margin-top" style="0.5px solid #eee;margin-top: 10rpx;">
+				<uni-file-picker style="margin-bottom: 10px;margin-top: 10rpx;" limit="1" ref="picFile" v-model="picLists"
+					fileMediatype="image" mode="grid" title="平面图" :auto-upload="autoUpload" @select="select"
+					@progress="progress" @success="success" @fail="fail" @delete="deleteFile"
+					:imageStyles="imageStyles" :disabled="ischeck">
+				</uni-file-picker>
+			</view>
+			
+			<view  v-if="!showloginbt&&!ischeck" class="cu-form-group margin-top" style="0.5px solid #eee;margin-top: 10rpx;">
+				<uni-file-picker style="margin-bottom: 10px;margin-top: 10rpx;" limit="4" ref="picFile2" v-model="picLists2"
+					fileMediatype="image" mode="grid" title="厂房图" :auto-upload="autoUpload" @select="select2"
+					@progress="progress" @success="success" @fail="fail" @delete="deleteFile2"
+					:imageStyles="imageStyles" :disabled="ischeck">
+				</uni-file-picker>
+			</view>
+			
 			<view style="height: 30rpx;background-color: white;"></view>
 			
+			<view class="padding-xl" v-if="showloginbt">
+				<button @click="tologin" class="cu-btn block bg-blue margin-tb-sm lg">登录查看厂房照片</button>
+			</view>
+			
+			<view class="titlebg2" v-if="swiperList2.length>0" >
+				<view class="titlet1" ></view>
+				<view class="titlet2" >平面图</view>								
+			</view>
+			
+			<view v-for="(item, index) in swiperList2" :key="'pic1-'+index" style="width: 100%;">
+				<image :src="item.url"  mode="widthFix" style="width: 100%;" >					
+				</image>
+			</view>				
+			
+			<view style="height: 40rpx;"></view>
+			
 			<view class="titlebg2" v-if="swiperList.length>0" >
 				<view class="titlet1" ></view>
-				<view class="titlet2" >图文详情</view>								
+				<view class="titlet2" >厂房图</view>								
 			</view>
 			
-			<view v-for="(item, index) in swiperList" :key="index" style="width: 100%;">
+			<view v-for="(item, index) in swiperList" :key="'pic2-'+index" style="width: 100%;">
 				<image :src="item.url"  mode="widthFix" style="width: 100%;" >					
 				</image>
 			</view>				
@@ -147,6 +326,8 @@
 			<view class="padding-xl" v-if="!ischeck">
 				<button @click="save" class="cu-btn block bg-blue margin-tb-sm lg">提交</button>
 			</view>
+			
+			
 
 		</form>
 	</view>
@@ -167,6 +348,7 @@
 				isAdd: true,
 				autoUpload: false,
 				swiperList: [],
+				swiperList2: [],
 				inputForm: {
 					id: '',
 					name: '',
@@ -175,6 +357,7 @@
 					ownership: '',
 					area: '',
 					singleLayer: '',
+					cleanRoom: '',
 					numberLayers: '',
 					floorHeight: '',
 					idleArea: '',
@@ -188,7 +371,15 @@
 					des6: '',
 					des7: '',
 					des8: '',
-					des9: '',		
+					des9: '',	
+					lxr: '',	
+					phone: '',
+					drivingCount: '',
+					drivingLoad: '',
+					situation: '',
+					pic1: '',
+					pic2: '',
+					ispark: '',
 
 				},
 				t1: '厂房权属',
@@ -202,12 +393,37 @@
 				parkList: [],
 				parkList2: [],
 				parkList3: [],
+				parkList4: [],
+				parkList5: [],
+				parkList6: [],
+				parkList7: [{label: '是',value: '1'},{label: '否',value: '0'}],
 				selectedPark:'请选择',
 				selectedownership:'请选择',
-				selectedsingleLayer:'请选择',
+				selectedsingleLayer:'请选择',				
+				selecteddes7:'请选择',
+				selecteddes3:'请选择',
+				selectedcleanRoom:'请选择',
+				selectedispark:'请选择',
+				// 适用产业
+				industryList: [],        // 字典数组
+				selectedIndustry: [],    // 当前选中的 value 数组
+				showIndustryPicker: false,
+				showIndustryPop: false ,
+				
+				dengtxt: '登录查看',
+				
+				picLists: [],
+				picUrl: [],
+				picLists2: [],
+				picUrl2: [],
+				imageStyles: {
+					width: 90,
+					height: 90
+				},
 				
 				index:0,
 				isLogin:"",
+				showloginbt:true,
 				username:"",
 				isadmin:false,
 				lyIndex: '',
@@ -230,12 +446,17 @@
 		},
 		mounted() {
 			
+		},
+		computed: {
+
 		},
 		onShow() {
 			this.isLogin=this.$auth.checkisLogin();
 			//判断是否能新增
 			if(this.isLogin!=null){
 				this.getRole();
+				
+				this.showloginbt=false;
 			}
 		},
 		onLoad(query) {
@@ -250,11 +471,19 @@
 			Promise.all([
 			    loginService.getDictListBytype("sys_park"),
 			    loginService.getDictListBytype("sys_ownership"),
-			    loginService.getDictListBytype("sys_single_layer")
-			  ]).then(([park, own, layer]) => {
+			    loginService.getDictListBytype("sys_single_layer"),
+			    loginService.getDictListBytype("sys_property_right"),
+			    loginService.getDictListBytype("sys_clean_room"),
+			    loginService.getDictListBytype("sys_renovation"),
+			    loginService.getDictListBytype("sys_industry")
+			  ]).then(([park, own, layer, propertyright, cleanroom,renovation,industry]) => {
 			    this.parkList = park.data;
 			    this.parkList2 = own.data;
 			    this.parkList3 = layer.data;
+				this.parkList4 = propertyright.data;
+				this.parkList5 = cleanroom.data;
+				this.parkList6 = renovation.data;
+				this.industryList  = industry.data;
 			    // 字典到位后再回显详情
 			    if (query.id) {                 // 有 id → 编辑/查看
 				  this.isAdd = false
@@ -306,6 +535,77 @@
 			  this.inputForm.singleLayer = item.value
 			},
 			
+			bindPickerChange4(e) {
+			  const idx = e.detail.value
+			  const item = this.parkList4[idx]
+			  this.selecteddes7 = item.label
+			  this.inputForm.des7 = item.value
+			},
+			
+			bindPickerChange5(e) {
+			  const idx = e.detail.value
+			  const item = this.parkList5[idx]
+			  this.selectedcleanRoom = item.label
+			  this.inputForm.cleanRoom = item.value
+			},
+			
+			bindPickerChange6(e) {
+			  const idx = e.detail.value
+			  const item = this.parkList6[idx]
+			  this.selecteddes3 = item.label
+			  this.inputForm.des3 = item.value
+			},
+			
+			bindPickerChange7(e) {
+			  const idx = e.detail.value
+			  const item = this.parkList7[idx]
+			  this.selectedispark = item.label
+			  this.inputForm.ispark = item.value
+			},
+			
+			selectChange2() {
+			  // 此处为点击的事件
+			  //this.pickerData=this.pickerDataOld;
+			  console.log(this.selectedIndustry);
+			},
+			searchEvent(val) {
+			  //this.pickerData=this.filteredItems(val);
+			},
+			
+			// industryChange(e){
+			//   this.selectedIndustry = e.detail.value
+			//   // 同时拼好 label 字符串
+			//   const labels = this.selectedIndustry.map(v =>
+			//     this.industryList.find(d => d.value === v)?.label
+			//   ).filter(Boolean)
+			//   this.inputForm.des1 = this.selectedIndustry.join(',')
+			//   this.inputForm.des2 = labels.join(',')
+			// },
+			
+			// 弹窗点确定
+			// confirmIndustry () {
+			//   // 把 value 数组 -> 字符串
+			//   this.inputForm.des1 = this.selectedIndustry.join(',')
+			//   // 把对应 label 拼成字符串
+			//   const dict = this.industryList
+			//   const labels = this.selectedIndustry.map(v => {
+			//     const item = dict.find(d => d.value === v)
+			//     return item ? item.label : ''
+			//   })
+			//   this.inputForm.des2 = labels.join(',')
+			//   this.showIndustryPicker = false
+			// },
+			
+			// 回显(setData 里调用)
+			fillIndustry () {
+			  // 后端是字符串,先拆成数组
+			  if (this.inputForm.des1) {
+			    this.selectedIndustry = this.inputForm.des1.split(',')
+			  } else {
+			    this.selectedIndustry = []
+			  }
+			},
+			
 			validate() {
 			    for (const key in this.rules) {
 			      const rule = this.rules[key]
@@ -322,6 +622,142 @@
 			    }
 			    return true
 			  },
+			  
+			  
+			  // 获取上传进度
+			  progress(e) {
+			  	console.log('上传进度:', e)
+			  },
+			  // 上传成功
+			  success(e) {
+			  	console.log('上传成功')
+			  },
+			  // 上传失败
+			  fail(e) {
+			  	console.log('上传失败:', e)
+			  },
+			  deleteFile(e) {
+			  	this.picUrl.splice(e.index, 1)
+			  },
+			  deleteFile2(e) {
+			  	this.picUrl2.splice(e.index, 1)
+			  },
+			  // 获取上传状态
+			  select(e) {
+			  	console.log('选择文件:', e)
+								
+			  	var _this = this
+			  	var i = 0
+			  	upload()
+			  
+			  	function upload() {
+			  		if (i >= e.tempFiles.length) {
+			  			return;
+			  		}
+			  		var item = e.tempFiles[i]
+			  		uni.showLoading({
+			  			title: "上传中",
+			  			mask: true
+			  		});
+			  		uni.uploadFile({
+			  			url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
+			  			filePath: item.url,
+			  			name: 'file',
+			  			formData: {
+			  				'fileName': item.name
+			  			},
+			  			header: {
+			  				'token': _this.$auth.getUserToken()
+			  			},
+			  			success: (res) => {
+			  				var data = res.data
+			  				if (typeof data['error'] != "undefined") {
+			  					uni.showToast({
+			  						icon: 'none',
+			  						title: '上传失败,请联系开发!'
+			  					});
+			  					_this.$refs.picFile.clearFiles(_this.picLists.length)
+			  				} else {
+			  					_this.picUrl.push({
+			  						url: data,
+			  						uuid: item.uuid
+			  					})
+			  					i++;
+			  					upload()
+			  				}
+			  			},
+			  			fail: () => {
+			  				uni.hideLoading();
+			  				uni.showToast({
+			  					icon: 'none',
+			  					title: '上传失败,请联系开发!'
+			  				});
+			  				_this.$refs.picFile.clearFiles(_this.picLists.length)
+			  			},
+			  			complete: function() {
+			  				uni.hideLoading();
+			  			}
+			  		});
+			  	}
+			  },
+			  
+			  select2(e) {
+			  	console.log('选择文件:', e)
+								
+			  	var _this = this
+			  	var i = 0
+			  	upload()
+			  
+			  	function upload() {
+			  		if (i >= e.tempFiles.length) {
+			  			return;
+			  		}
+			  		var item = e.tempFiles[i]
+			  		uni.showLoading({
+			  			title: "上传中",
+			  			mask: true
+			  		});
+			  		uni.uploadFile({
+			  			url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
+			  			filePath: item.url,
+			  			name: 'file',
+			  			formData: {
+			  				'fileName': item.name
+			  			},
+			  			header: {
+			  				'token': _this.$auth.getUserToken()
+			  			},
+			  			success: (res) => {
+			  				var data = res.data
+			  				if (typeof data['error'] != "undefined") {
+			  					uni.showToast({
+			  						icon: 'none',
+			  						title: '上传失败,请联系开发!'
+			  					});
+			  					_this.$refs.picFile2.clearFiles(_this.picLists2.length)
+			  				} else {
+			  					_this.picUrl2.push({
+			  						url: data,
+			  						uuid: item.uuid
+			  					})
+			  					i++;
+			  					upload()
+			  				}
+			  			},
+			  			fail: () => {
+			  				uni.hideLoading();
+			  				uni.showToast({
+			  					icon: 'none',
+			  					title: '上传失败,请联系开发!'
+			  				});
+			  				_this.$refs.picFile2.clearFiles(_this.picLists2.length)
+			  			},
+			  			complete: function() {
+			  				uni.hideLoading();
+			  			}
+			  		});
+			  	}
+			  },
 			
 			save(){
 				
@@ -329,6 +765,26 @@
 				
 				this.inputForm.state=1;
 				
+				//产业
+			
+				const labels = this.selectedIndustry.map(v =>
+				    this.industryList.find(d => d.value === v)?.label
+				).filter(Boolean)
+				this.inputForm.des1 = this.selectedIndustry.join(',')
+				this.inputForm.des2 = labels.join(',')				
+				
+				this.inputForm.pic1 = [];
+				this.inputForm.pic2 = [];				
+				this.picUrl.forEach(item => {
+					this.inputForm.pic1.push(item.url.replace('https://ydwqfw.com.cn/yd_qycpfbWeb/', ''))
+				})
+				this.picUrl2.forEach(item => {
+					this.inputForm.pic2.push(item.url.replace('https://ydwqfw.com.cn/yd_qycpfbWeb/', ''))
+				})
+				this.inputForm.pic1 = this.inputForm.pic1.toString();
+				this.inputForm.pic2 = this.inputForm.pic2.toString();
+				
+				
 				uni.showLoading()
 				loginService.savefactoryBuildings(this.inputForm).then(({
 					data
@@ -346,8 +802,15 @@
 				})
 			},
 			
+			tologin(){
+				uni.showLoading()
+				uni.reLaunch({
+					url: '/pages/login/factorylogin'
+				})	
+			},
+			
 			setData(data){
-				this.inputForm = this.recover(this.inputForm, data)
+				this.inputForm = this.recover(this.inputForm, data)				
 									
 				const parkItem = this.parkList.find(p => p.value == data.park);
 				//    把中文名赋给用来显示的变量
@@ -358,7 +821,79 @@
 				this.selectedownership = ownItem ? ownItem.label : '请选择';
 				
 				const layerItem = this.parkList3.find(p => p.value == data.singleLayer);
-				this.selectedsingleLayer = layerItem ? layerItem.label : '请选择';		  
+				this.selectedsingleLayer = layerItem ? layerItem.label : '请选择';	
+					  
+				const des7Item = this.parkList4.find(p => p.value == data.des7);
+								
+				this.selecteddes7 = des7Item ? des7Item.label : '请选择';				  
+				console.log("产权:"+this.selecteddes7)
+				
+				const des3Item = this.parkList6.find(p => p.value == data.des3);
+				this.selecteddes3 = des3Item ? des3Item.label : '请选择';	
+				
+				
+				 /* ===== 洁净车间回显 ===== */
+			    const cleanItem = this.parkList5.find(p => p.value == data.cleanRoom)				
+			    this.selectedcleanRoom = cleanItem ? cleanItem.label : '请选择'
+				
+				const isparkItem = this.parkList7.find(p => p.value == data.ispark)
+				this.selectedispark = isparkItem ? isparkItem.label : '请选择'
+
+				this.fillIndustry()
+				
+				if(this.isLogin!=null){
+					// 回显图片
+					if(this.inputForm.pic2!=undefined&&this.inputForm.pic2!=''){
+						let pics=this.inputForm.pic2.split(",");
+						pics.forEach(item => {
+							if(item!=''){
+								this.swiperList.push({
+									'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+item,
+								})
+								
+								this.picUrl2.push({
+									'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+item,
+									'uuid': item
+								})
+								this.picLists2.push({
+									'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+item,
+									'uuid': item
+								})
+								
+							}
+							
+						})
+					}
+					
+					
+					let pics2=this.inputForm.pic1;
+					
+					if(pics2!=undefined&&pics2!=''){
+						this.swiperList2.push({
+							'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+pics2,
+						})
+						
+						this.picUrl.push({
+							'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+pics2,
+							'uuid': pics2
+						})
+						this.picLists.push({
+							'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+pics2,
+							'uuid': pics2
+						})
+						
+					}
+					
+				
+					
+					
+					
+					
+				}
+				
+				
+					
+				
 				
 			},			
 
@@ -396,7 +931,7 @@
 		font-size: 30rpx;
 	}
 	.text12{
-		width: 200rpx;
+		width: 260rpx;
 		margin-left: 30rpx;
 		color: #000000;
 		font-size: 29rpx;
@@ -524,4 +1059,43 @@
 	.bg-blue {
 	  background-color: #4285f4; /* 假设这是一个蓝色背景 */
 	}
+	
+	.input2 {
+	  flex: 1;
+	  font-size: 30rpx;
+	  color: #1E8AD7;          /* 想保持的蓝色 */
+	  padding-right: 20rpx;
+	  width: 100%;
+	}
+	
+	/* 关键:把颜色强制透传到组件内部 input/占位节点 */
+	.input2 .input,          /* 有的版本用 .input */
+	.input2 .uni-input,      /* 有的版本用 .uni-input */
+	.input2 input::placeholder,
+	.input2 .placeholder {
+	  color: #1E8AD7 !important;   /* 强制覆盖黑色 */
+	}
+	.input2 * {
+	  color: #1E8AD7 !important;
+	}
+	
+	
+	/* 强制让 zqs-select 内部所有文字都变成蓝色 */
+	.input2,
+	.input2 *,
+	.input2 .input,
+	.input2 .uni-input,
+	.input2 .select-input,
+	.input2 .select-tag,
+	.input2 .placeholder,
+	.input2 input,
+	.input2 .input-placeholder,
+	.input2 .uni-input-placeholder {
+	  color: #1E8AD7 !important;
+	}
+	
+	/deep/ .input2 input {
+	  color: #1E8AD7 !important;
+	  font-size: 30rpx !important;
+	}
 </style>

+ 111 - 12
jp-mobile/pages/factoryBuildings/factoryBuildingsList.vue

@@ -71,6 +71,43 @@
 				  </view>
 				</view>
 				
+				<view class="search-box1" style="margin-top: 15rpx;">
+				  <!-- 厂房装修 -->
+				  <view class="choose-box">
+				    <jp-picker2
+				      v-model="searchForm.des3"
+				      empty="选择厂房装修"
+				      rangeKey="label"
+				      rangeValue="value"
+				      :range="parkList4"
+				      @change="picker2change">
+				    </jp-picker2>
+				  </view>			  
+				
+				  <!-- 行车 -->
+				  <view class="choose-box22 one-line-picker">
+				    <jp-picker2
+				      v-model="searchForm.drivingCount"
+				      empty="是否有行车"
+				      rangeKey="label"
+				      rangeValue="value"
+				      :range="parkList5"
+				      @change="picker2change">
+				    </jp-picker2>
+				  </view>
+				  
+				  <!-- 洁净车间 -->
+				  <view class="choose-box22">
+				    <jp-picker2
+				      v-model="searchForm.cleanRoom"
+				      empty="是否洁净车间"
+				      rangeKey="label"
+				      rangeValue="value"
+				      :range="parkList6"
+				      @change="picker2change">
+				    </jp-picker2>
+				  </view>
+				</view>
 											
 				<view class="search-box"  >
 												
@@ -93,6 +130,12 @@
 						
 						
 						<view class="item-box" @click="gotoBuildInfo(item.id)">
+							<view class="item-code">								
+								<view>
+									{{item.des6}}
+								</view>								
+							</view>
+							
 							<view class="item-title">
 								
 								<view>
@@ -102,7 +145,7 @@
 							</view>
 							<view class="item-line">
 									
-								<view class="item-name">{{item.des1}}-{{item.address}}</view>	
+								<view class="item-name">{{item.des8}}-{{item.address}}</view>	
 							</view>
 							<view class="item-line">
 									
@@ -168,20 +211,29 @@
 					idleArea:"",
 					park:'',
 					name:"",
-					des1:''
+					des1:'',
+					des3:'',
+					drivingCount:'',
+					cleanRoom:'',
+					des7:'',//四个平台公司
+					ispark:'',
 				},
 				
 				dataList: [], // 数据列表
 				modalName: null,
 
 				loading: false,
-				parkList: [{label: '全部',value: ''},{label: '0-500㎡',value: '1'},{label: '500-1000㎡',value: '2'},
-				{label: '1000-3000㎡',value: '3'},{label: '3000-5000㎡',value: '4'},{label: '大于5000㎡',value: '5'}],
+				parkList: [{label: '全部',value: ''},{label: '5000㎡以下',value: '1'},{label: '5000-10000㎡',value: '2'},
+				{label: '10000㎡以上',value: '3'}],
 				parkList2: [{label: '全部',value: ''},{label: '高新区',value: '12'},{label: '盐渎',value: '9'},{label: '潘黄',value: '8'},
 				{label: '龙冈',value: '13'},{label: '张庄',value: '6'},{label: '大冈',value: '2'},{label: '郭猛',value: '11'},
 				{label: '大纵湖',value: '3'},{label: '秦南',value: '10'},{label: '学富',value: '4'},{label: '楼王',value: '7'},
 				{label: '尚庄',value: '5'},{label: '台创园',value: '1'},{label: '大纵湖度假区',value: '14'}],
 				parkList3: [],
+				
+				parkList4: [{label: '全部',value: ''},{label: '毛坯',value: '1'},{label: '精装',value: '2'}],
+				parkList5: [{label: '全部',value: ''},{label: '有行车',value: '1'},{label: '无行车',value: '2'}],
+				parkList6: [{label: '全部',value: ''},{label: '洁净车间',value: '1'},{label: '不是洁净车间',value: '2'}],
 
 			};
 		},
@@ -194,42 +246,74 @@
 		    this.$nextTick(() => {
 		      if (query.parkid === '台创园') {
 		        this.searchForm.park = '1';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '大冈镇'|| query.parkid === '大冈') {
 		        this.searchForm.park = '2';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '大纵湖镇' || query.parkid === '大纵湖') {
 		        this.searchForm.park = '3';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '学富镇'|| query.parkid === '学富') {
 		        this.searchForm.park = '4';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '尚庄镇'|| query.parkid === '尚庄') {
 		        this.searchForm.park = '5';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '张庄街道'|| query.parkid === '张庄') {
 		        this.searchForm.park = '6';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '楼王镇'|| query.parkid === '楼王') {
 		        this.searchForm.park = '7';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '潘黄街道'|| query.parkid === '潘黄') {
 		        this.searchForm.park = '8';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '盐渎街道'|| query.parkid === '盐渎') {
 		        this.searchForm.park = '9';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '秦南镇'|| query.parkid === '秦南') {
 		        this.searchForm.park = '10';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '郭猛镇'|| query.parkid === '郭猛') {
 		        this.searchForm.park = '11';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '盐龙街道'|| query.parkid === '高新区') {
 		        this.searchForm.park = '12';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '龙冈镇'|| query.parkid === '龙冈') {
 		        this.searchForm.park = '13';
+				this.searchForm.ispark = '1';
 		      } else if (query.parkid === '大纵湖度假区') {
 		        this.searchForm.park = '14';
+				this.searchForm.ispark = '1';
+		      } 
+			  
+			  else if (query.parkid === '盐高新产控集团') {
+		        this.searchForm.des7 = '4';
+		      } else if (query.parkid === '城镇化集团') {
+		        this.searchForm.des7 = '3';
+		      } else if (query.parkid === '国控集团') {
+		        this.searchForm.des7 = '1';
+		      } else if (query.parkid === '盛州集团') {
+		        this.searchForm.des7 = '2';
 		      }
+			  
+			  
+			  
 		    });
 		  }
-		  	  if (query.des1) {
-		  	     this.searchForm.des1 = query.des1 + '';
-		  	  					
-		  	  }
+		  if (query.des1) {
+			 this.searchForm.des1 = query.des1 + '';		
+			 this.searchForm.ispark = '1';
+		  }
+		  
+		  //四个平台公司
+		  if (query.des7) {
+		  	 this.searchForm.des7 = query.des7 + '';							
+		  }
 		  
 		   // 1. 先清空,避免残留
-		    this.searchForm.des1 = '';		  	
+	  	
 			
 			loginService.getDictListBytype('sys_industry_show').then(({data}) => {
 				this.parkList3 = data;          // 先让下拉列表有数据
@@ -265,7 +349,6 @@
 			
 			/*获取数据列表 */
 			upCallback(page) {
-				console.log(this.searchForm.des1);
 				this.loading = true
 				loginService.factoryBuildingsList({
 					current: page.num,
@@ -310,7 +393,7 @@
 			
 			picker2change(e) {
 				this.doSearch() ;
-			},
+			},			
 			
 			totongxunlu(){
 				uni.navigateTo({
@@ -642,6 +725,17 @@
 		margin-top: 20rpx;
 	}
 	
+	.item-code{
+		position: relative;
+		display: flex;
+		justify-content: space-between;
+		font-size: 30rpx;
+		padding-bottom: 12rpx;
+		color: #55aaff;
+		font-weight: bold;
+		align-items: center;
+	}
+	
 	.item-title{
 		position: relative;
 		display: flex;
@@ -673,6 +767,10 @@
 		margin-top: 5rpx;
 		font-size: 29rpx;
 		color: #666666;
+		
+		white-space: nowrap;      /* 不换行 */
+		overflow: hidden;         /* 超出隐藏 */
+		text-overflow: ellipsis;  /* 用 … 代替 */
 	}
 	
 	.item-name2{
@@ -701,7 +799,8 @@
 	.item-name31{
 		padding-right: 30rpx;
 		font-size: 29rpx;
-		color: #2E8B57;
+		/* color: #2E8B57; */
+		color: #676D99;
 	}
 	
 	.item-content{

+ 15 - 11
jp-mobile/pages/index/factoryindex.vue

@@ -27,15 +27,8 @@
     </swiper>
 	
 	<view style="display: flex;width: 100%;flex-direction:row-reverse;background: white;">
-	<text class="title2" @tap="goMap">地图</text>
-	<text class="title2" @tap="goMap2">3+3+N产业体系</text>
-	
-	  <!-- <image
-	    class="map-btn2"
-	    src="/static/img/tab4.png"
-	    mode="aspectFit"
-	    @tap="goMap"
-	  /> -->
+		<text class="title2" @tap="goMap">地图</text>
+		<text class="title2" @tap="goMap2">3+3+N产业体系</text>
 	</view>
 
     <!-- 3. 九宫格导航 -->
@@ -65,7 +58,9 @@
 	  </view>
 	</view>
 	
-	
+	<!-- <view style="display: flex;width: 100%;flex-direction:row-reverse;background: white;">
+		<text class="title2" style="margin-bottom: 20rpx;" @tap="goMap3">四个平台公司</text>
+	</view> -->
 
     <!-- 地图已注释,如需恢复直接放开即可 -->
     <!--
@@ -115,7 +110,10 @@ export default {
   	}) => {
 		let alls=0;
 		for(var i = 0; i < data.length; i++){
-			alls=alls+data[i].building_cnt;
+			if(data[i].label!='盐高新产控集团'&&data[i].label!='城镇化集团'&&data[i].label!='国控集团'&&data[i].label!='盛州集团'){
+				alls=alls+data[i].building_cnt;
+			}
+			
 		}
 		
 		this.allcount=alls;		
@@ -145,6 +143,12 @@ export default {
 		  url: `/pages/index/factoryindex7`   // 换成你的地图页面路径
 		})
 	},
+	
+	goMap3() {
+		uni.navigateTo({
+		  url: `/pages/factoryBuildings/factoryBuildingsList?des7=1`
+		})
+	},
   }
 }
 </script>

BIN
jp-mobile/static/img/logo2.png


+ 2 - 3
jp-ui/src/views/modules/enterpriseinfo/EnterpriseInfoForm.vue

@@ -86,7 +86,7 @@
               <el-col :span="8">
                   <el-form-item label="工信局联系人" prop="bz5"
                       :rules="[
-                        {required: true, message:'工信局联系人不能为空', trigger:'blur'}
+
                        ]">
                     <el-input v-model="inputForm.bz5" placeholder="请填写工信局联系人"     ></el-input>
                  </el-form-item>
@@ -94,8 +94,7 @@
               <el-col :span="8">
                   <el-form-item label="联系人手机" prop="bz6"
                       :rules="[
-                        {required: true, message:'联系人手机不能为空', trigger:'blur'},
-                        {validator: validator.isMobile, trigger:'blur'}
+
                        ]">
                     <el-input v-model="inputForm.bz6" placeholder="请填写联系人手机"     ></el-input>
                  </el-form-item>

+ 4 - 2
jp-ui/src/views/modules/enterpriseinfo/EnterpriseInfoList.vue

@@ -194,8 +194,10 @@
     <vxe-column
         field="updateDate"
         sortable
+        sort-by="a.update_date"
         title="更新时间">
-      </vxe-column>
+    </vxe-column>
+
       <vxe-column
         fixed="right"
         align="center"
@@ -481,7 +483,7 @@
         if (obj.order != null) {
           this.tablePage.orders = [{ column: obj.column.sortBy || this.$utils.toLine(obj.property), asc: obj.order === 'asc' }]
         } else {
-          this.tablePage.orders = [{ column: 'create_date', asc: false }]
+          this.tablePage.orders = [{ column: 'a.create_date', asc: false }]
         }
         this.refreshList()
       },

+ 168 - 1
jp-ui/src/views/modules/idlefactorybuildings/IdleFactoryBuildingsForm.vue

@@ -8,6 +8,14 @@
     <el-form :model="inputForm" size="small" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
              label-width="140px">
       <el-row  :gutter="15">
+        <el-col :span="12">
+            <el-form-item label="厂房编号" prop="des6"
+                :rules="[
+                  {required: true, message:'厂房编号不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.des6" placeholder="请填写厂房编号"     ></el-input>
+           </el-form-item>
+        </el-col>
         <el-col :span="12">
             <el-form-item label="厂房名称" prop="name"
                 :rules="[
@@ -39,6 +47,24 @@
               <el-input v-model="inputForm.address" placeholder="请填写位置"     ></el-input>
            </el-form-item>
         </el-col>
+        <el-col :span="12">
+            <el-form-item label="联系人" prop="lxr"
+                :rules="[
+                  {required: true, message:'联系人不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.lxr" placeholder="请填写联系人"     ></el-input>
+           </el-form-item>
+        </el-col>
+        <el-col :span="12">
+            <el-form-item label="联系电话" prop="phone"
+                :rules="[
+                  {required: true, message:'联系电话不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.phone" placeholder="请填写联系电话"     ></el-input>
+           </el-form-item>
+        </el-col>
+
+
         <el-col :span="12">
             <el-form-item label="厂房权属" prop="ownership"
                 :rules="[
@@ -53,6 +79,22 @@
                       </el-select>
            </el-form-item>
         </el-col>
+
+        <el-col :span="12">
+            <el-form-item label="产权" prop="des7"
+                :rules="[
+                 ]">
+                <el-select v-model="inputForm.des7" placeholder="请选择"  style="width: 100%;">
+                          <el-option
+                            v-for="item in $dictUtils.getDictList('sys_property_right')"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                          </el-option>
+                      </el-select>
+           </el-form-item>
+        </el-col>
+
         <el-col :span="12">
             <el-form-item label="厂房占地面积(亩)" prop="area"
                 :rules="[
@@ -113,6 +155,80 @@
           </el-form-item>
         </el-col>
 
+        <el-col :span="12">
+            <el-form-item label="厂房装修" prop="des3"
+                :rules="[
+                  {required: true, message:'厂房装修不能为空', trigger:'blur'}
+                 ]">
+                <el-select v-model="inputForm.des3" placeholder="请选择"  style="width: 100%;">
+                          <el-option
+                            v-for="item in $dictUtils.getDictList('sys_renovation')"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                          </el-option>
+                      </el-select>
+           </el-form-item>
+        </el-col>
+
+
+        <el-col :span="12">
+            <el-form-item label="长宽" prop="des4"
+                :rules="[
+                  {required: true, message:'长宽不能为空', trigger:'blur'}
+                 ]">
+              <el-input v-model="inputForm.des4" placeholder="请填写长宽"     ></el-input>
+           </el-form-item>
+        </el-col>
+        <el-col :span="12">
+            <el-form-item label="每层承载负荷(kg/m²)" prop="des5"
+                :rules="[
+                  {required: true, message:'每层承载负荷不能为空', trigger:'blur'}
+                 ]">
+          <el-input-number v-model="inputForm.des5" placeholder="请填写每层承载负荷"     style="width: 100%;"></el-input-number>
+           </el-form-item>
+        </el-col>
+        <el-col :span="12">
+            <el-form-item label="行车数量" prop="drivingCount"
+                :rules="[
+                  {required: true, message:'行车数量不能为空', trigger:'blur'}
+                 ]">
+          <el-input-number v-model="inputForm.drivingCount" placeholder="请填写行车数量"     style="width: 100%;"></el-input-number>
+           </el-form-item>
+        </el-col>
+        <el-col :span="12">
+            <el-form-item label="行车承载负荷(吨)" prop="drivingLoad"
+                :rules="[
+                  {required: true, message:'行车承载负荷不能为空', trigger:'blur'}
+                 ]">
+          <el-input-number v-model="inputForm.drivingLoad" placeholder="请填写行车承载负荷"     style="width: 100%;"></el-input-number>
+           </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+            <el-form-item label="洁净车间" prop="cleanRoom"
+                :rules="[
+                  {required: true, message:'洁净车间不能为空', trigger:'blur'}
+                 ]">
+                <el-select v-model="inputForm.cleanRoom" placeholder="请选择"  style="width: 100%;">
+                          <el-option
+                            v-for="item in $dictUtils.getDictList('sys_clean_room')"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                          </el-option>
+                      </el-select>
+           </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+            <el-form-item label="水电气情况" prop="situation"
+                :rules="[
+                 ]">
+          <el-input type="textarea" v-model="inputForm.situation" placeholder="请填写水电气情况"     ></el-input>
+           </el-form-item>
+        </el-col>
+
 
         <el-col :span="12">
             <el-form-item label="备注" prop="remark"
@@ -136,6 +252,41 @@
                       </el-select>
            </el-form-item>
         </el-col>
+
+        <el-col :span="12">
+            <el-form-item label="是否纳入板块统计" prop="ispark"
+                :rules="[
+                  {required: true, message:'是否纳入板块统计不能为空', trigger:'blur'}
+                 ]">
+                <el-select v-model="inputForm.ispark" placeholder="请选择"  style="width: 100%;">
+                          <el-option
+                            v-for="item in $dictUtils.getDictList('is_yes_no')"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                          </el-option>
+                      </el-select>
+           </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+            <el-form-item label="平面图" prop="pic1"
+                :rules="[
+                 ]">
+        <image-upload v-model="inputForm.pic1" :limit="1" tip="最多上传1个图片,单个图片不要超过10M"></image-upload>
+           </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+            <el-form-item label="厂房图" prop="pic2"
+                :rules="[
+                 ]">
+        <image-upload v-model="inputForm.pic2" :limit="4" tip="最多上传4个图片,单个图片不要超过10M"></image-upload>
+           </el-form-item>
+        </el-col>
+
+
+
         </el-row>
     </el-form>
     <span slot="footer" class="dialog-footer">
@@ -168,8 +319,24 @@
           idleArea: '',
           remark: '',
           state: '',
+          ispark: '',
           des1: '',
-          des2: ''
+          des2: '',
+          des3: '',
+          des4: '',
+          des5: '',
+          des6: '',
+          des7: '',
+          drivingCount: '',
+          drivingLoad: '',
+          cleanRoom: '',
+          situation: '',
+          lxr: '',
+          phone: '',
+          pic1: '',
+          pic2: '',
+
+
         }
       }
     },

+ 11 - 0
jp-ui/src/views/modules/idlefactorybuildings/IdleFactoryBuildingsList.vue

@@ -87,6 +87,17 @@
             :checkbox-config="{}">
             <vxe-column type="seq" width="40"></vxe-column>
             <vxe-column type="checkbox"  width="40px"></vxe-column>
+    <vxe-column
+        field="des6"
+        width="100"
+        sortable
+        title="厂房编号">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('idlefactorybuildings:idleFactoryBuildings:edit')" @click="edit(scope.row.id)">{{scope.row.des6}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('idlefactorybuildings:idleFactoryBuildings:view')"  @click="view(scope.row.id)">{{scope.row.des6}}</el-link>
+              <span v-else>{{scope.row.des6}}</span>
+            </template>
+      </vxe-column>
     <vxe-column
         field="name"
         width="200"