Commit 727a47e8 authored by liuChang's avatar liuChang

Merge branch 'V20231129-中建一局二公司' of 192.168.60.201:root/dsk-operate-sys into V20231129-中建一局二公司

parents b0deb53d 77d23477
...@@ -178,4 +178,17 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { ...@@ -178,4 +178,17 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
int year = localDate.getYear(); int year = localDate.getYear();
return year; return year;
} }
/***
*@Description: 获取当前 小时
*@Param:
*@return: int
*@Author: Dgm
*@date: 2023/11/29 16:05
*/
public static int getHour() {
LocalTime localDate = LocalTime.now();
int year = localDate.getHour();
return year;
}
} }
...@@ -6,10 +6,7 @@ import lombok.NoArgsConstructor; ...@@ -6,10 +6,7 @@ import lombok.NoArgsConstructor;
import org.redisson.api.*; import org.redisson.api.*;
import java.time.Duration; import java.time.Duration;
import java.util.Collection; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
...@@ -486,4 +483,17 @@ public class RedisUtils { ...@@ -486,4 +483,17 @@ public class RedisUtils {
RKeys rKeys = CLIENT.getKeys(); RKeys rKeys = CLIENT.getKeys();
return rKeys.countExists(key) > 0; return rKeys.countExists(key) > 0;
} }
/***
*@Description: 锁-释放
*@Param:
*@return: boolean
*@Author: Dgm
*@date: 2022/6/15 9:41
*/
public static void hasValueDelete (String lockKey, String value) {
if (value.contentEquals(Objects.requireNonNull(CLIENT.getBucket(lockKey).get()+""))) {
CLIENT.getBucket(lockKey).delete();
}
}
} }
package com.dsk.cscec.constant;
/**
* 搜索常量信息
*
* @author sxk
* @date 2023.12.11
* @time 14:22
*/
public interface QueryConstants {
/**
* 筛选数据一级公司名称
*/
String LEVEL1_COMPANY_NAME = "中建一局集团第二建筑有限公司";
/**
* 筛选数据一级公司ID
*/
String LEVEL1_COMPANY_ID = "F17305B4EA4444CBAB12892C7B99E475";
/**
* 筛选数据二级公司名称
* 备用,需要时请填入内容
*/
String LEVEL2_COMPANY_NAME = "";
/**
* 筛选数据二级公司ID
* 备用,需要时请填入内容
*/
String LEVEL2_COMPANY_ID = "";
}
...@@ -14,6 +14,7 @@ import com.dsk.system.domain.SysDept; ...@@ -14,6 +14,7 @@ import com.dsk.system.domain.SysDept;
import com.dsk.system.domain.vo.SysDeptVo; import com.dsk.system.domain.vo.SysDeptVo;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -43,6 +44,14 @@ public class DCustomerController extends BaseController { ...@@ -43,6 +44,14 @@ public class DCustomerController extends BaseController {
return baseService.allSearchList(bo,query); return baseService.allSearchList(bo,query);
} }
/**
* 供应商信息
*/
@GetMapping("/info/{customerKey}")
public R<DCustomer> info(@PathVariable String customerKey) {
return R.ok(baseService.getById(customerKey));
}
} }
...@@ -3,6 +3,8 @@ package com.dsk.cscec.domain; ...@@ -3,6 +3,8 @@ package com.dsk.cscec.domain;
import java.util.Date; import java.util.Date;
import java.io.Serializable; import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data; import lombok.Data;
/** /**
...@@ -19,6 +21,7 @@ public class DCustomer implements Serializable { ...@@ -19,6 +21,7 @@ public class DCustomer implements Serializable {
/** /**
* 客商主键 * 客商主键
*/ */
@TableId(value = "customer_key")
private Long customerKey; private Long customerKey;
/** /**
* ipm供应商id * ipm供应商id
...@@ -528,5 +531,15 @@ public class DCustomer implements Serializable { ...@@ -528,5 +531,15 @@ public class DCustomer implements Serializable {
* 数据更新时间 * 数据更新时间
*/ */
private Date loadTime; private Date loadTime;
/**
* 企业合作数量
*/
@TableField(exist = false)
private Integer enterpriseCooperationCount;
/**
* 项目合作数量
*/
@TableField(exist = false)
private Integer projectCooperationCount;
} }
package com.dsk.cscec.domain;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
/**
* 分包分供合同(DSubcontract)表实体类
*
* @author lcl
* @since 2023-12-11 15:31:44
*/
@Data
public class DSubcontract implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 分包合同主键
*/
private Long subcontractKey;
/**
* 分包合同ID
*/
private String subcontractId;
/**
* 分包合同编码
*/
private String subcontractCode;
/**
* 分包合同名称
*/
private String subcontractName;
/**
* 财务一体化分包合同编码
*/
private String fipSubcontractCode;
/**
* 财务一体化分包合同名称
*/
private String fipSubcontractName;
/**
* 业务类型
*/
private String contractScope;
/**
* 合同类型
*/
private String contractType;
/**
* 项目ID
*/
private String projectId;
/**
* 项目编码
*/
private String projectCode;
/**
* 项目名称
*/
private String projectName;
/**
* 分包合同金额
*/
private Double subcontractValue;
/**
* 分包合同不含税金额
*/
private Double subcontractValueExcl;
/**
* 分包合同税额
*/
private Double subcontractTaxValue;
/**
* 签订单位ID
*/
private String signOrgId;
/**
* 签订单位名称
*/
private String signOrgName;
/**
* 合同签订日期
*/
private String signDate;
/**
* 合同盖章日期
*/
private String stampDate;
/**
* 合同返回日期
*/
private String returnDate;
/**
* 交底日期
*/
private String noticeDate;
/**
* 实际完成时间
*/
private String completeDate;
/**
* 合同开始日期
*/
private String subcontractStartDate;
/**
* 合同结束日期
*/
private String subcontractEndDate;
/**
* 是否甲指
*/
private String isownerappoint;
/**
* 施工专业ID
*/
private String specialtyId;
/**
* 施工专业
*/
private String specialtyType;
/**
* 履约状态
*/
private String contractState;
/**
* 供应商ID
*/
private String customerId;
/**
* 供应商名称
*/
private String customerName;
/**
* 客商类型
*/
private String customerType;
/**
* 分包范围
*/
private String jobScope;
/**
* 付款方式
*/
private String payType;
/**
* 付款比例是否固定
*/
private Double isfixedpayratio;
/**
* 过程中付款比例
*/
private Double processPayRatio;
/**
* 完工后付款比例
*/
private Double completePayRatio;
/**
* 结算后付款比例
*/
private Double settlePayRatio;
/**
* 保修金比例
*/
private Double warrantyGoldRatio;
/**
* 分包合同应付金额
*/
private Double subcontractPayableValue;
/**
* 分包合同已付金额
*/
private Double subcontractPaidValue;
/**
* 预付款
*/
private Double prepayValue;
/**
* 已付款
*/
private Double paidValue;
/**
* 垫付款
*/
private Double advanceValue;
/**
* 结算方式
*/
private String settleType;
/**
* 结算价
*/
private Double settleValue;
/**
* 人工费
*/
private Double laborFee;
/**
* 备注
*/
private String remark;
/**
* 合同分类
*/
private String contractClass;
/**
* 成本科目ID
*/
private String costSubjectId;
/**
* 成本科目名称
*/
private String costSubjectName;
/**
* 成本科目全路径名称
*/
private String costSubjectFullname;
/**
* 执行备案
*/
private String contractTextType;
/**
* 税率
*/
private Double taxRate;
/**
* 盖章份数
*/
private Double noOfStamp;
/**
* 盖章明晰
*/
private String signRemark;
/**
* 返回明晰
*/
private String issign;
/**
* 承包类型
*/
private String contractForm;
/**
* 是否为一局内部公司
*/
private String iscscec1bcompany;
/**
* 是否主体结构分包合同
*/
private String isfirststruct;
/**
* 建筑面积
*/
private Double areaSum;
/**
* 锁定金额
*/
private Double lockValue;
/**
* 战采资源级别
*/
private String gpResLevel;
/**
* 战采资源类别
*/
private String gpResScope;
/**
* 战采资源品类
*/
private String gpResCategory;
/**
* 战略采购供应商年度
*/
private Double gpSupplierYear;
/**
* 是否集中采购(是/否)
*/
private String isGp;
/**
* 战采管理要求
*/
private String gpApplication;
/**
* 合同是否执行战采价格
*/
private String isUseGpprice;
/**
* 战采供应商ID
*/
private String fgpcustomerid;
/**
* 分包合同版本
*/
private Double subcontractVersion;
/**
* 流程状态
*/
private String fbizstatename;
/**
* 流程状态
*/
private String fbizstate;
/**
* 材料类型
*/
private String materialType;
/**
* 数据加载时间
*/
private String loadTime;
}
...@@ -2,6 +2,8 @@ package com.dsk.cscec.domain.bo; ...@@ -2,6 +2,8 @@ package com.dsk.cscec.domain.bo;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @Author lcl * @Author lcl
* @Data 2023/12/8 16:07 * @Data 2023/12/8 16:07
...@@ -15,30 +17,42 @@ public class DCustomerSearchBo { ...@@ -15,30 +17,42 @@ public class DCustomerSearchBo {
/** /**
* 区域 * 区域
*/ */
private String[] region; private List<String> region;
/** /**
* 省 * 省
*/ */
private String[] province; private List<String> province;
/** /**
* 市 * 市
*/ */
private String[] city; private List<String> city;
/** /**
* 供应商类别 * 供应商类别
*/ */
private String[] customerClass; private List<String> customerClass;
/** /**
* 供应商状态 * 供应商状态
*/ */
private String[] customerState; private List<String> customerState;
/** /**
* 评价等级 * 评价等级
*/ */
private String[] creditLevel; private List<String> creditLevel;
/** /**
* 资质等级 * 资质等级
*/ */
private String[] credential; private List<String> credential;
/**
* 准入时间(开始)
*/
private String approveDateBegion;
/**
* 准入时间(结束)
*/
private String approveDateEnd;
/**
* 是否队伍 0:否 1:是
*/
private Integer isTeam;
} }
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.DSubcontract;
/**
* 分包分供合同(DSubcontract)表数据库访问层
*
* @author lcl
* @since 2023-12-11 15:31:44
*/
public interface DSubcontractMapper extends BaseMapper<DSubcontract> {
Integer selectEnterpriseCountByCustomerId(String customerId);
Integer selectProjectCountByCustomerId(String customerId);
}
package com.dsk.cscec.service.impl; package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.core.domain.PageQuery; import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo; import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.bo.DCustomerSearchBo; import com.dsk.cscec.domain.bo.DCustomerSearchBo;
import com.dsk.cscec.mapper.DCustomerMapper; import com.dsk.cscec.mapper.DCustomerMapper;
import com.dsk.cscec.domain.DCustomer; import com.dsk.cscec.domain.DCustomer;
import com.dsk.cscec.mapper.DSubcontractMapper;
import com.dsk.cscec.service.IDCustomerService; import com.dsk.cscec.service.IDCustomerService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/** /**
* 组织维表(DCustomer)表服务实现类 * 组织维表(DCustomer)表服务实现类
...@@ -18,9 +26,62 @@ import org.springframework.stereotype.Service; ...@@ -18,9 +26,62 @@ import org.springframework.stereotype.Service;
@Service @Service
public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer> implements IDCustomerService { public class DCustomerServiceImpl extends ServiceImpl<DCustomerMapper, DCustomer> implements IDCustomerService {
@Resource
private DSubcontractMapper subcontractMapper;
@Override @Override
public TableDataInfo<DCustomer> allSearchList(DCustomerSearchBo bo, PageQuery query) { public TableDataInfo<DCustomer> allSearchList(DCustomerSearchBo bo, PageQuery query) {
return TableDataInfo.build(baseMapper.allSearchList(query.build(),bo)); dealWithCustomerClass(bo);
Page<DCustomer> page = baseMapper.allSearchList(query.build(), bo);
if (CollectionUtils.isNotEmpty(page.getRecords())) {
for (DCustomer customer : page.getRecords()) {
//企业合作数量
customer.setEnterpriseCooperationCount(subcontractMapper.selectEnterpriseCountByCustomerId(customer.getCustomerId()));
//项目合作数量
customer.setProjectCooperationCount(subcontractMapper.selectProjectCountByCustomerId(customer.getCustomerId()));
}
}
return TableDataInfo.build(page);
}
private void dealWithCustomerClass(DCustomerSearchBo bo) {
if (!ObjectUtils.isEmpty(bo.getCustomerClass())) {
List<String> list = new ArrayList<>();
Integer isTeam = null;
for (String customerClass : bo.getCustomerClass()) {
switch (customerClass){
case "专业分包":
list.add("专业分包");
break;
case "物资设备":
list.add("分供");
break;
case "施工机械":
list.add("租赁");
break;
case "劳务分包":
if(isTeam == null){
isTeam = 0;
}else if(isTeam == 1) {
isTeam = null;
}
list.add("劳务分包");
break;
case "劳务队伍":
if(isTeam == null) {
isTeam = 1;
}else if(isTeam == 0) {
isTeam = null;
}
list.add("劳务分包");
break;
default:
break;
}
}
bo.setCustomerClass(list);
bo.setIsTeam(isTeam);
}
} }
} }
package com.dsk.jsk.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @ClassName PartnershipProjectSource
* @Description
* @Author Dgm
* @Date 2023/12/11 20:35
* @Version
*/
@Slf4j
@RestController
@RequestMapping(value = "/enterpriseCredit")
public class PartnershipProjectSource {
}
package com.dsk.jsk.domain.bo;
import java.util.Date;
/**
* @ClassName PartnershipProjectSource
* @Description
* @Author Dgm
* @Date 2023/12/11 20:37
* @Version
*/
public class JskCompanyRelationTableV1 {
/**
*
*/
private String uuid;
/**
* 项目唯一标识
*/
private String partnerRelationshipUuid;
/**
* 企业Id
*/
private Long companyId;
/**
* 企业名称
*/
private String companyName;
/**
* 企业角色
*/
private String companyRole;
/**
* 乙方企业名称
*/
private String counterpartCompanyName;
/**
* 乙方企业id
*/
private String counterpartCompanyId;
/**
* 乙方企业角色
*/
private String counterpartCompanyRole;
/**
* 工程名称
*/
private String project;
/**
*
*/
private String projectMd5;
/**
* 项目类型
*/
private String buildingProjectType;
/**
* 咨询机构业务类型
*/
private String enquiryAgencyBusinessType;
/**
* 公布日期
*/
private Date contractStartDate;
/**
* 本次合作合同金额(万元)
*/
private String contractAmount;
/**
* 币种
*/
private String currency;
/**
* 省份
*/
private String province;
/**
* 省Id
*/
private String provinceId;
/**
* 市
*/
private String city;
/**
* 市Id
*/
private String cityId;
/**
* 区
*/
private String area;
/**
* 区Id
*/
private String areaId;
/**
* 数据来源id
*/
private String isDeal;
}
package com.dsk.jsk.domain.bo;
/**
* @ClassName PartnershipProjectSource
* @Description
* @Author Dgm
* @Date 2023/12/11 20:37
* @Version
*/
public class JskPartnershipProjectSourceV1 {
/**
*
*/
private String uuid;
/**
* 项目唯一标识
*/
private String partnerRelationshipUuid;
/**
* 工程名称
*/
private String projectName;
/**
* 处理后项目名称
*/
private String dealProjectName;
/**
* 数据来源
*/
private String dataSource;
/**
* 数据来源id
*/
private String dataSourceId;
/**
*
*/
private String isDeal;
}
package com.dsk.monitor.controlelr;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.monitor.domain.vo.*;
import com.dsk.monitor.service.MonitorService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
/**
* @ClassName MonitorController
* @Description 监控企业相关
* @Author Dgm
* @Date 2023/12/8 10:19
* @Version 1.0.0
*/
@RestController
@RequestMapping("/monitor")
public class MonitorController {
@Resource
private MonitorService monitorService;
/***
*@Description: 同步推送数据入库
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "push/insert")
public R insert(@RequestBody PushMonitorInfoVo pushMonitorInfoVo) {
return monitorService.insert(pushMonitorInfoVo);
}
/***
*@Description: 监控维度下拉选择
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@GetMapping(value = "push/rulesSelect")
public R rulesSelect() {
return monitorService.rulesSelect();
}
/***
*@Description: 新增修改我的规则
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "push/rules/insertOrUpdate")
public R insertRules(@RequestBody PushMonitorRulesVo rulesVo) {
return monitorService.insertRules(rulesVo);
}
/***
*@Description: 我的推送规则
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "push/rulesDetail")
public R rulesDetail(@RequestBody PushMonitorRulesDetailVo detailVo) {
return monitorService.rulesDetail(detailVo);
}
/***
*@Description: 监控动态/监控报告详情 分页
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "company/dynamicPage")
public TableDataInfo companyDynamicPage(@RequestBody PushMonitorDynamicPageVo pageVo) throws Exception{
return monitorService.companyDynamicPage(pageVo);
}
/***
*@Description: 监控动态详情
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "company/dynamicDetail")
public R companyDynamicDetail(@RequestBody PushMonitorDynamicDetailVo detailVo) {
return monitorService.companyDynamicDetail(detailVo);
}
/***
*@Description: 监控报告 分页
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "reportPage")
public TableDataInfo reportPage(@RequestBody PushMonitorReportPageVo pageVo) throws Exception{
return monitorService.reportPage(pageVo);
}
/***
*@Description: 企业监控列表 分页
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "system/companyPage")
public TableDataInfo companyPage(@RequestBody PushMonitorCompanyPageVo pageVo) throws Exception{
return monitorService.companyPage(pageVo);
}
/***
*@Description: 添加监控
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "system/add")
public R systemAdd(@RequestBody PushMonitorCompanyAddVo addVo) {
return monitorService.systemAdd(addVo);
}
/***
*@Description: 取消监控
*@Param:
*@return: com.dsk.common.core.domain.R
*@Author: Dgm
*@date: 2023/12/9 9:29
*/
@PostMapping(value = "system/cancel")
public R systemCancel(@RequestBody PushMonitorCompanyCancelVo cancelVo) throws Exception{
return monitorService.systemCancel(cancelVo);
}
/***
*@Description: 批量导入
*@Param:
*@return: java.lang.String
*@Author: Dgm
*@date: 2022/6/14 10:45
*/
@RequestMapping("/system/import")
public R systemImport(@RequestParam MultipartFile file, PushMonitorCompanyImportAddVo importAddVo) throws Exception{
return monitorService.systemImport(file, importAddVo);
}
}
package com.dsk.monitor.domain.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ClassName PushMonitorInfoDto
* @Description 推送监控信息
* @Author Dgm
* @Date 2023/12/9 9:43
* @Version
*/
@Data
public class PushMonitorInfo implements Serializable {
private static final long serialVersionUID = 6732846953537725830L;
/**
* 对外开放的id
*/
private String id;
/**
* 源表id
*/
private String sourceId;
/**
* 源表名
*/
private String sourceTable;
/**
* 公司Id
*/
private Integer companyId;
/**
* 企业名称
*/
private String companyName;
/**
* 风险等级:正向,负向,中立,警示
*/
private String riskLevel;
/**
* 监控维度父级
*/
private String parentDimension;
/**
* 监控维度
*/
private String dimension;
/**
* 动态内容
*/
private String details;
/**
* 发布时间
*/
private Date publishTime;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 变更时间-暂时用于法人变更
*/
private Date changeDate;
/**
* 更新次数
*/
private Integer versionNum;
/**
* 是否发送 0否 1是
*/
private Integer isSend;
/**
* 数据来源(jsk,fy)
*/
private String source;
/**
* 系统类型 JSK/BRIS
*/
private String sysType;
}
package com.dsk.monitor.domain.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ClassName PushMonitorRulesDto
* @Description 推送监控规则信息
* @Author Dgm
* @Date 2023/12/9 9:43
* @Version
*/
@Data
public class PushMonitorRules implements Serializable {
private static final long serialVersionUID = -2226356282137776096L;
/**
* id
*/
private Integer id;
/**
* 创建人Id
*/
private Long userId = 98L;
/**
* 风险类型,多个逗号隔开
*/
private String riskType;
/**
* 监控维度,多个逗号隔开
*/
private String dimension;
/**
* 推送频率 每小时:0 每天:1 工作日:2
*/
private Integer pushFrequency;
/**
* 推送时段-起
*/
private Integer timePeriodStart;
/**
* 推送时段-止
*/
private Integer timePeriodEnd;
/**
* 接收方式 手机:0 PC:1
*/
private String receiveMode;
/**
* 手机号码,多个逗号隔开
*/
private String phones;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新次数
*/
private Integer versionNum;
}
package com.dsk.monitor.domain.vo;
import lombok.Data;
/**
* @ClassName ConditionVo
* @Description 共用条件
* @Author Dgm
* @Date 2023/12/9 15:36
* @Version
*/
@Data
public class ConditionVo {
/**
* 用户id
*/
private Long userId = 98L;
/**
* 条件查询企业id
*/
private Integer companyOrstaffId;
/**
* 条件查询企业名称(模糊查询)
*/
private String companyName;
/**
* 条件查询风险等级:正向,负向,中立,警示
*/
private String riskLevel;
/**
* 条件查询监控维度子级名称
*/
private String dimensionId;
/**
* 条件查询监控维度父级名称
*/
private String parentId;
/**
* 条件查询开始时间
*/
private String beginTime;
/**
* 条件查询结束时间
*/
private String endTime;
/**
* 报告类型(1.日报,2.周报,3.月报)
*/
private Integer reportType;
}
package com.dsk.monitor.domain.vo;
import com.dsk.jsk.domain.BasePage;
import lombok.Data;
import java.util.List;
/**
* @ClassName PushMonitorRulesVo
* @Description 监控报告 分页
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorCompanyAddVo {
/**
* 用户id
*/
private Long userId = 98L;
/**
* 多个企业id数组
*/
private List<Integer> cid;
}
package com.dsk.monitor.domain.vo;
import lombok.Data;
import java.util.List;
/**
* @ClassName PushMonitorRulesVo
* @Description 监控报告 分页
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorCompanyCancelVo {
/**
* 用户id
*/
private Long userId = 98L;
/**
* 多个企业id数组
*/
private List<Integer> cid;
}
package com.dsk.monitor.domain.vo;
import lombok.Data;
import java.util.List;
/**
* @ClassName PushMonitorRulesVo
* @Description 监控报告 分页
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorCompanyImportAddVo {
/**
* 用户id
*/
private Long userId = 98L;
/**
* 多个企业id数组
*/
private List<String> names;
}
package com.dsk.monitor.domain.vo;
import com.dsk.jsk.domain.BasePage;
import lombok.Data;
/**
* @ClassName PushMonitorRulesVo
* @Description 监控报告 分页
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorCompanyPageVo extends BasePage {
/**
* 查询条件
*/
private ConditionVo condition;
}
package com.dsk.monitor.domain.vo;
import lombok.Data;
/**
* @ClassName PushMonitorRulesVo
* @Description 监控动态详情
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorDynamicDetailVo {
private String sourceId;
}
package com.dsk.monitor.domain.vo;
import com.dsk.jsk.domain.BasePage;
import lombok.Data;
/**
* @ClassName PushMonitorRulesVo
* @Description 监控动态/监控报告详情 分页
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorDynamicPageVo extends BasePage {
private ConditionVo condition;
}
package com.dsk.monitor.domain.vo;
import lombok.Data;
import java.util.List;
/**
* @ClassName PushMonitorImportCompanyVo
* @Description
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorImportCompanyVo {
/**
* 条件查询企业名称
*/
private String companyName;
}
package com.dsk.monitor.domain.vo;
import com.dsk.monitor.domain.dto.PushMonitorInfo;
import lombok.Data;
/**
* @ClassName PushMonitorInfoDto
* @Description 推送监控信息
* @Author Dgm
* @Date 2023/12/9 9:43
* @Version
*/
@Data
public class PushMonitorInfoVo extends PushMonitorInfo {
}
package com.dsk.monitor.domain.vo;
import com.dsk.jsk.domain.BasePage;
import lombok.Data;
/**
* @ClassName PushMonitorRulesVo
* @Description 企业监控列表 分页
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorReportPageVo extends BasePage {
/**
* 查询条件
*/
private ConditionVo condition;
}
package com.dsk.monitor.domain.vo;
import lombok.Data;
/**
* @ClassName PushMonitorRulesVo
* @Description 我的推送规则
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
@Data
public class PushMonitorRulesDetailVo {
/**
* 创建人Id
*/
private Long userId = 98L;
}
package com.dsk.monitor.domain.vo;
import com.dsk.monitor.domain.dto.PushMonitorRules;
/**
* @ClassName PushMonitorRulesVo
* @Description
* @Author Dgm
* @Date 2023/12/9 11:05
* @Version
*/
public class PushMonitorRulesVo extends PushMonitorRules {
}
package com.dsk.monitor.job;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsk.common.utils.DateUtils;
import com.dsk.monitor.domain.dto.PushMonitorRules;
import com.dsk.monitor.mapper.PushMonitorInfoMapper;
import com.dsk.monitor.mapper.PushMonitorRulesMapper;
import com.dsk.monitor.util.SendMessageUtil;
import org.springframework.scheduling.annotation.Scheduled;
import javax.annotation.Resource;
/**
* @ClassName PushScheduling
* @Description 发送短信
* @Author Dgm
* @Date 2023/12/9 13:51
* @Version
*/
public class PushScheduling {
@Resource
private PushMonitorInfoMapper monitorInfoMapper;
@Resource
private PushMonitorRulesMapper rulesMapper;
@Scheduled(cron = "0 0 5 * * * ?")
public void receiveModePhone() {
// 获取当前整点时间
Integer concurrentHour = DateUtils.getHour();
QueryWrapper queryWrapper = new QueryWrapper();
PushMonitorRules detail = rulesMapper.selectOne(queryWrapper);
// 推送时段-起
Integer timePeriodStart = detail.getTimePeriodStart();
// 推送时段-止
Integer timePeriodEnd = detail.getTimePeriodEnd();
if (concurrentHour > timePeriodStart && concurrentHour < timePeriodEnd) {
QueryWrapper monitorInfoWrapper = new QueryWrapper();
// 风险类型
monitorInfoWrapper.in("risk_type", detail.getRiskType());
// 监控维度
monitorInfoWrapper.in("dimension", detail.getDimension());
Long count = monitorInfoMapper.selectCount(monitorInfoWrapper);
if (count >0 ) {
SendMessageUtil.sendMessage(detail.getPhones(), count.toString());
}
}
}
}
package com.dsk.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.monitor.domain.dto.PushMonitorInfo;
/**
* @ClassName PushMonitorInfoMapper
* @Description 推送监控内容
* @Author Dgm
* @Date 2023/12/9 9:38
* @Version 1.0.0
*/
public interface PushMonitorInfoMapper extends BaseMapper<PushMonitorInfo> {
}
package com.dsk.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.monitor.domain.dto.PushMonitorRules;
/**
* @ClassName PushMonitorInfoMapper
* @Description 推送监控规则信息
* @Author Dgm
* @Date 2023/12/9 9:38
* @Version 1.0.0
*/
public interface PushMonitorRulesMapper extends BaseMapper<PushMonitorRules> {
}
package com.dsk.monitor.service;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.monitor.domain.vo.*;
import org.springframework.web.multipart.MultipartFile;
/**
* @ClassName MonitorService
* @Description 监控service
* @Author Dgm
* @Date 2023/12/9 10:01
* @Version
*/
public interface MonitorService {
/***
*@Description: 保存监控信息
*@Param: pushMonitorInfoDto 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R insert(PushMonitorInfoVo pushMonitorInfoDto);
/***
*@Description: 监控维度下拉选择
*@Param:
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R rulesSelect();
/***
*@Description: 保存监控规则信息
*@Param: monitorRulesDto 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R insertRules(PushMonitorRulesVo monitorRulesDto);
/***
*@Description: 我的推送规则
*@Param: detailVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R rulesDetail(PushMonitorRulesDetailVo detailVo);
/***
*@Description: 监控动态/监控报告 分页
*@Param: pageVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
TableDataInfo companyDynamicPage(PushMonitorDynamicPageVo pageVo) throws Exception;
/***
*@Description: 监控动态详情
*@Param: detailVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R companyDynamicDetail(PushMonitorDynamicDetailVo detailVo);
/***
*@Description: 监控报告
*@Param: pageVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
TableDataInfo reportPage(PushMonitorReportPageVo pageVo) throws Exception;
/***
*@Description: 企业监控列表 分页
*@Param: pageVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
TableDataInfo companyPage(PushMonitorCompanyPageVo pageVo) throws Exception;
/***
*@Description: 添加监控
*@Param: addVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R systemAdd(PushMonitorCompanyAddVo addVo);
/***
*@Description: 取消监控
*@Param: cancelVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R systemCancel(PushMonitorCompanyCancelVo cancelVo);
/***
*@Description: 批量导入
*@Param: cancelVo 信息
*@return: R
*@Author: Dgm
*@date: 2023/12/9 10:03
*/
R systemImport(MultipartFile file, PushMonitorCompanyImportAddVo importAddVo) throws Exception;
}
package com.dsk.monitor.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.common.helper.LoginHelper;
import com.dsk.common.utils.redis.RedisUtils;
import com.dsk.monitor.domain.dto.PushMonitorInfo;
import com.dsk.monitor.domain.dto.PushMonitorRules;
import com.dsk.monitor.domain.vo.*;
import com.dsk.monitor.mapper.PushMonitorInfoMapper;
import com.dsk.monitor.mapper.PushMonitorRulesMapper;
import com.dsk.monitor.service.MonitorService;
import com.dsk.system.utils.DskOpenApiUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.time.Duration;
import java.util.*;
/**
* @ClassName MonitorServiceImpl
* @Description
* @Author Dgm
* @Date 2023/12/9 10:04
* @Version
*/
@Slf4j
@Service
public class MonitorServiceImpl implements MonitorService {
@Resource
private PushMonitorInfoMapper monitorInfoMapper;
@Resource
private PushMonitorRulesMapper rulesMapper;
@Resource
private DskOpenApiUtil dskOpenApiUtil;
@Override
public R insert(PushMonitorInfoVo pushMonitorInfoDto) {
monitorInfoMapper.insert(pushMonitorInfoDto);
return R.ok();
}
@Override
public R rulesSelect() {
// todo 20231209 产品出细致 具体全部类型
Map<String, Object> objectMap = new HashMap<>(2);
List<String> riskType = new ArrayList<>(2);
riskType.add("工商风险");
riskType.add("司法风险");
objectMap.put("riskType", riskType);
// 维度
List<String> dimension = new ArrayList<>(10);
dimension.add("法院公告");
dimension.add("裁判文书");
dimension.add("开庭公告");
dimension.add("股权冻结");
dimension.add("限制高消费");
dimension.add("被执行人");
dimension.add("失信被执行人");
dimension.add("限制高消费");
objectMap.put("dimension", dimension);
return R.ok(objectMap);
}
@Override
public R insertRules(PushMonitorRulesVo monitorRulesDto) {
// todo 20231211 规则是否与使用登录人强关联
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
monitorRulesDto.setUserId(userId);
}
if (ObjectUtil.isEmpty(monitorRulesDto.getId())) {
rulesMapper.insert(monitorRulesDto);
} else {
rulesMapper.updateById(monitorRulesDto);
}
return R.ok();
}
@Override
public R rulesDetail(PushMonitorRulesDetailVo detailVo) {
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
detailVo.setUserId(userId);
}
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("user_id", detailVo.getUserId());
PushMonitorRules detail = rulesMapper.selectOne(queryWrapper);
return R.ok(detail);
}
@Override
public TableDataInfo companyDynamicPage(PushMonitorDynamicPageVo pageVo) throws Exception {
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
pageVo.getCondition().setUserId(userId);
}
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/info/companyDynamicList", BeanUtil.beanToMap(pageVo, false, false));
return dskOpenApiUtil.responsePage(map);
}
@Override
public R companyDynamicDetail(PushMonitorDynamicDetailVo detailVo) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("source_id", detailVo.getSourceId());
PushMonitorInfo detail = monitorInfoMapper.selectOne(queryWrapper);
return R.ok(detail);
}
@Override
public TableDataInfo reportPage(PushMonitorReportPageVo pageVo) throws Exception {
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
pageVo.getCondition().setUserId(userId);
}
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/info/monitor/report", BeanUtil.beanToMap(pageVo, false, false));
return dskOpenApiUtil.responsePage(map);
}
@Override
public TableDataInfo companyPage(PushMonitorCompanyPageVo pageVo) throws Exception {
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
pageVo.getCondition().setUserId(userId);
}
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/supplier/system/paging", BeanUtil.beanToMap(pageVo, false, false));
return dskOpenApiUtil.responsePage(map);
}
@Override
public R systemAdd(PushMonitorCompanyAddVo addVo) {
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
addVo.setUserId(userId);
}
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/supplier/system/add", BeanUtil.beanToMap(addVo, false, false));
return BeanUtil.toBean(map, R.class);
}
@Override
public R systemCancel(PushMonitorCompanyCancelVo cancelVo) {
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
cancelVo.setUserId(userId);
}
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/supplier/system/cancel", BeanUtil.beanToMap(cancelVo, false, false));
return BeanUtil.toBean(map, R.class);
}
@Override
public R systemImport(MultipartFile file, PushMonitorCompanyImportAddVo importAddVo) {
Long userId = LoginHelper.getUserId();
if (ObjectUtil.isNotEmpty(userId)) {
importAddVo.setUserId(userId);
}
//存放保单信息
List<String> companyList = new ArrayList<String>();
// 设置redisKey
String lockKey = "stockKey" + userId;
// 设置redisValue
String value = UUID.randomUUID().toString();
try {
// 这里默认设置超时时间为30秒
boolean hasKey = RedisUtils.setObjectIfAbsent(lockKey, value, Duration.ofMillis(1000 * 30));
if (!hasKey) {
return R.fail("数据正在上传请等待");
}
//如果文件不存在 则文件上传失败
if (file == null){
return R.fail("操作失敗,数据异常,請使用正确的模板");
}
if (file.isEmpty()){
return R.fail("操作失敗,数据异常,請使用正确的模板");
}
//得到整个excel
XSSFWorkbook wook = new XSSFWorkbook((file.getInputStream()));
//得到第一个表单sheet
Sheet sheet = wook.getSheetAt(0);
//得到最后一行的行号
int lastRowNum = sheet.getLastRowNum();
//如果总行数小于等于2 (没有数据)提示数据异常
if ((lastRowNum) < 1){
return R.fail("未提供有效数据,请确认!");
}
//进行excel格式判定
String name = sheet.getRow(0).getCell(0) + "";
//只要其中一个不满足则格式有误
if (!"企业名称".equals(name)){
return R.fail("操作失败,数据异常,请使用正确的模板");
}
//行列皆从0开始
for (int i = 1; i <= lastRowNum; i++) {
String companyNameStr = "";
// 统一社会信用代码
Cell companyName = sheet.getRow(i).getCell(0);
if (ObjectUtil.isNotEmpty(companyName)) {
String cn = companyName.toString();
companyNameStr = cn.trim();
}
companyList.add(companyNameStr);
}
} catch (Exception e) {
log.error("",e.getMessage());
} finally {
RedisUtils.hasValueDelete(lockKey, value);
}
if (ObjectUtil.isEmpty(companyList)) {
return R.fail("操作失败");
}
importAddVo.setNames(companyList);
Map<String, Object> map = dskOpenApiUtil.requestBody("/operate/monitor/company/supplier/system/addPatch", BeanUtil.beanToMap(importAddVo, false, false));
return BeanUtil.toBean(map, R.class);
}
}
package com.dsk.monitor.util;
import lombok.extern.slf4j.Slf4j;
import org.dromara.sms4j.api.SmsBlend;
import org.dromara.sms4j.api.entity.SmsResponse;
import org.dromara.sms4j.core.factory.SmsFactory;
import org.dromara.sms4j.provider.enumerate.SupplierType;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
/**
* @ClassName SendMessageUtil
* @Description 发送短息
* @Author Dgm
* @Date 2023/12/9 14:14
* @Version
*/
@Slf4j
public class SendMessageUtil {
public static void sendMessage(String phones, String message) {
String[] array = phones.split(",");
List<String> stringList = Arrays.asList(array);
for (String phone : stringList) {
LinkedHashMap<String, String> map = new LinkedHashMap<>(1);
map.put("code", message);
SmsBlend smsBlend = SmsFactory.createSmsBlend(SupplierType.ALIBABA);
SmsResponse smsResponse = smsBlend.sendMessage(phone, "SMS_181860796", map);
if (!"OK".equals(smsResponse.getCode())) {
log.error("验证码短信发送异常 => {}", smsResponse);
}
}
}
}
...@@ -6,13 +6,58 @@ ...@@ -6,13 +6,58 @@
<select id="allSearchList" resultType="com.dsk.cscec.domain.DCustomer"> <select id="allSearchList" resultType="com.dsk.cscec.domain.DCustomer">
select select
customer_code, customer_name, recommend_org, register_region, register_province, register_city, customer_class, primary_business, paytax_type, tax_rate, customer_key, customer_id, customer_code, customer_name, recommend_org, register_region, register_province, register_city, customer_class, primary_business,
customer_state, leader_name, labor_captain_phone, labor_captain_idcard, service_team_personnum, service_team_speciality, construct_job_scope, credential, paytax_type, tax_rate, customer_state, leader_name, labor_captain_phone, labor_captain_idcard, service_team_personnum, service_team_speciality,
register_capital, contact_person, contact_phone, approve_date2, credit_level construct_job_scope, credential, register_capital, contact_person, contact_phone, approve_date2, credit_level
from d_customer from d_customer
where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475' where recommend_org_id = 'F17305B4EA4444CBAB12892C7B99E475'
<if test="bo.customerName != null and bo.customerName != '' "> and customer_name like concat('%',#{bo.customerName},'%')</if> <if test="bo.customerName != null and bo.customerName != '' "> and customer_name like concat('%',#{bo.customerName},'%')</if>
order by approve_date2 desc <if test="bo.region != null and bo.region != '' ">
and register_region in
<foreach collection="region" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.province != null and bo.province != '' ">
and register_province in
<foreach collection="province" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.city != null and bo.city != '' ">
and register_city in
<foreach collection="city" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.customerClass != null and bo.customerClass != '' ">
and customer_class in
<foreach collection="customerClass" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.customerState != null and bo.customerState != '' ">
and customer_state in
<foreach collection="customerState" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.creditLevel != null and bo.creditLevel != '' ">
and credit_level in
<foreach collection="creditLevel" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.credential != null and bo.credential != '' ">
and credential in
<foreach collection="credential" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="bo.approveDateBegion != null and bo.approveDateBegion != '' ">and approve_date2 &gt;= #{bo.approveDateBegion}</if>
<if test="bo.approveDateEnd != null and bo.approveDateEnd != '' ">and approve_date2 &lt;= #{bo.approveDateBegion} </if>
<if test="bo.isTeam != null"> and leader_name is <if test="bo.isTeam == 0">not</if> null </if>
order by approve_date2 desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.DSubcontractMapper">
<select id="selectEnterpriseCountByCustomerId" resultType="java.lang.Integer">
select count(num) from (
select count(sign_org_id) num from d_subcontract where customer_id = #{customerId} group by sign_org_id
) a
</select>
<select id="selectProjectCountByCustomerId" resultType="java.lang.Integer">
select count(num) from (
select count(project_id) num from d_subcontract where customer_id = #{customerId} group by project_id
) a
</select>
</mapper>
\ No newline at end of file
...@@ -9,19 +9,7 @@ ...@@ -9,19 +9,7 @@
"build:prod": "vue-cli-service build", "build:prod": "vue-cli-service build",
"build:test": "vue-cli-service build --mode test", "build:test": "vue-cli-service build --mode test",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview"
"lint": "eslint --ext .js,.vue src"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
}, },
"keywords": [ "keywords": [
"vue", "vue",
...@@ -75,15 +63,11 @@ ...@@ -75,15 +63,11 @@
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0", "@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
"@vue/babel-preset-jsx": "^1.4.0", "@vue/babel-preset-jsx": "^1.4.0",
"@vue/cli-plugin-babel": "4.4.6", "@vue/cli-plugin-babel": "4.4.6",
"@vue/cli-plugin-eslint": "4.4.6",
"@vue/cli-service": "4.4.6", "@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0",
"babel-plugin-dynamic-import-node": "2.3.3", "babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "4.1.0", "chalk": "4.1.0",
"compression-webpack-plugin": "5.0.2", "compression-webpack-plugin": "5.0.2",
"connect": "3.6.6", "connect": "3.6.6",
"eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0",
"js-base64": "^3.7.5", "js-base64": "^3.7.5",
"lint-staged": "10.5.3", "lint-staged": "10.5.3",
"runjs": "4.4.2", "runjs": "4.4.2",
......
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_14_81552"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_14_81552)"><g><rect x="0" y="0" width="16" height="16" rx="0" fill-opacity="0.009999999776482582"/></g><g><path d="M4.2354478125,13.9198078125Q4.2685578125,13.9761078125,4.3150178125,14.0220078125Q4.3614778125,14.0679078125,4.4181678125,14.1004078125Q4.4748578125,14.1328078125,4.537977812499999,14.1496078125Q4.6010978125,14.1663078125,4.6664078125,14.1663078125L11.3331078125,14.1663078125Q11.3984078125,14.1663078125,11.4615078125,14.1496078125Q11.5246078125,14.1328078125,11.5813078125,14.1004078125Q11.6380078125,14.0679078125,11.6845078125,14.0220078125Q11.7310078125,13.9761078125,11.7641078125,13.9198078125L15.0973078125,8.253177812499999Q15.1312078125,8.1955478125,15.1488078125,8.1310378125Q15.1663078125,8.0665378125,15.1663078125,7.9996778125Q15.1663078125,7.9328178125,15.1488078125,7.8683078125Q15.1312078125,7.8037978125,15.0973078125,7.7461678125L11.7641078125,2.0795038125Q11.7310078125,2.0232098125,11.6845078125,1.9773098125Q11.6380078125,1.9314098125,11.5813078125,1.8989848125Q11.5246078125,1.8665588125,11.4615078125,1.8497838125000001Q11.3984078125,1.8330078125,11.3331078125,1.8330078125L4.6664078125,1.8330078125Q4.6010978125,1.8330078125,4.537977812499999,1.8497828125Q4.4748578125,1.8665578125,4.4181678125,1.8989818125Q4.3614778125,1.9314058125,4.3150178125,1.9773038125Q4.2685578125,2.0232018125,4.2354478125,2.0794938125L0.9020428125,7.7461578125Q0.8681428125,7.8037878125,0.8505748125,7.8682978125Q0.8330078125,7.9328178125,0.8330078125,7.9996778125Q0.8330078125,8.0665378125,0.8505748125,8.1310478125Q0.8681428125,8.195557812499999,0.9020428125,8.2531878125L4.2354478125,13.9198078125ZM4.9523778125,13.1663078125L1.9131018124999999,7.9996778125L4.9523778125,2.8330078125L11.0471278125,2.8330078125L14.0862078125,7.9996778125L11.0471278125,13.1663078125L4.9523778125,13.1663078125Z" fill-rule="evenodd" fill-opacity="0.800000011920929"/></g><g><path d="M6.4676128125,6.4676128125Q5.8330078125,7.1022178125,5.8330078125,7.9996778125Q5.8330078125,8.897127812499999,6.4676128125,9.5317378125Q7.1022178125,10.1663378125,7.9996778125,10.1663378125Q8.897127812499999,10.1663378125,9.5317378125,9.5317378125Q10.1663378125,8.897127812499999,10.1663378125,7.9996778125Q10.1663378125,7.1022178125,9.5317378125,6.4676128125Q8.897127812499999,5.8330078125,7.9996778125,5.8330078125Q7.1022178125,5.8330078125,6.4676128125,6.4676128125ZM7.1747198125,8.824627812500001Q6.8330078125,8.4829178125,6.8330078125,7.9996778125Q6.8330078125,7.5164278125,7.1747198125,7.1747198125Q7.5164278125,6.8330078125,7.9996778125,6.8330078125Q8.4829178125,6.8330078125,8.824627812500001,7.1747198125Q9.1663378125,7.5164278125,9.1663378125,7.9996778125Q9.1663378125,8.4829178125,8.824627812500001,8.824627812500001Q8.4829178125,9.1663378125,7.9996778125,9.1663378125Q7.5164278125,9.1663378125,7.1747198125,8.824627812500001Z" fill-rule="evenodd" fill-opacity="0.800000011920929"/></g></g></svg>
\ No newline at end of file
...@@ -39,3 +39,19 @@ ...@@ -39,3 +39,19 @@
.el-message { .el-message {
z-index: 3000 !important; z-index: 3000 !important;
} }
/* 规范容器样式 */
.default-layout-container {
width: 100%;
height: 100%;
box-sizing: border-box;
overflow: auto;
}
.default-layout-container-inner {
width: 100%;
height: 100%;
padding: 16px 24px;
box-sizing: border-box;
}
::v-deep .el-search-form-public {
.each-line {
white-space: nowrap;
}
// 重置element 表单样式
.el-form-item {
display: inline-flex;
align-items: center;
margin-bottom: 16px;
margin-right: 24px;
.el-form-item__label {
font-weight: 400;
color: rgba(35, 35, 35, 0.8);
text-align: left;
font-size: 14px;
line-height: 32px;
padding-right: 0px;
margin-right: 12px;
}
.el-form-item__content {
margin-left: 0px !important;
line-height: 32px;
}
.el-input__inner {
height: 32px;
line-height: 32px;
width: 268px;
border-radius: 2px;
border: 1px solid #dcdfe6;
padding: 0px 12px;
padding-right: 30px;
box-sizing: border-box;
&:focus {
border-color: #0081ff;
}
&::placeholder {
color: #c0c4cc !important;
}
}
.el-date-editor {
width: 268px;
height: 32px;
line-height: 32px;
border-radius: 2px;
border: 1px solid #dcdfe6;
padding: 3px 0px;
box-sizing: border-box;
&.is-active {
border-color: #0081ff;
}
.el-input__icon.el-range__icon.el-icon-date {
display: none;
}
.el-range__close-icon {
line-height: 32px;
}
.el-range-separator {
padding: 0px;
line-height: 24px;
color: rgba(35, 35, 35, 0.8);
}
.el-range-input {
padding: 0px 12px;
box-sizing: border-box;
text-align: left;
}
}
}
}
...@@ -11,7 +11,7 @@ body { ...@@ -11,7 +11,7 @@ body {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
Microsoft YaHei, Arial, sans-serif; Microsoft YaHei, Arial, sans-serif;
} }
label { label {
...@@ -106,7 +106,7 @@ aside { ...@@ -106,7 +106,7 @@ aside {
line-height: 32px; line-height: 32px;
font-size: 16px; font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
color: #2c3e50; color: #2c3e50;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
...@@ -143,11 +143,11 @@ aside { ...@@ -143,11 +143,11 @@ aside {
padding-right: 20px; padding-right: 20px;
transition: 600ms ease position; transition: 600ms ease position;
background: linear-gradient( background: linear-gradient(
90deg, 90deg,
rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%,
rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%,
rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%,
rgba(33, 120, 241, 1) 100% rgba(33, 120, 241, 1) 100%
); );
.subtitle { .subtitle {
...@@ -311,7 +311,10 @@ li { ...@@ -311,7 +311,10 @@ li {
.table-item { .table-item {
width: 100%; width: 100%;
height: 100%;
.el-table { .el-table {
width: 100%;
height: 100%;
font-size: 14px; font-size: 14px;
color: #232323; color: #232323;
th { th {
...@@ -322,8 +325,8 @@ li { ...@@ -322,8 +325,8 @@ li {
font-size: 14px; font-size: 14px;
} }
.cell { .cell {
padding-right: 12px !important; padding-right: 12px;
padding-left: 12px !important; padding-left: 12px;
line-height: 18px; line-height: 18px;
} }
thead { thead {
...@@ -344,7 +347,6 @@ li { ...@@ -344,7 +347,6 @@ li {
.el-table__header-wrapper { .el-table__header-wrapper {
th { th {
background: #f0f3fa; background: #f0f3fa;
// text-align: left;
} }
} }
.el-table__fixed-header-wrapper { .el-table__fixed-header-wrapper {
...@@ -448,6 +450,156 @@ li { ...@@ -448,6 +450,156 @@ li {
} }
} }
} }
// 封装组件样式
.table-list-com-ins {
.table-item {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
.el-table {
width: 100%;
height: 100%;
font-size: 14px;
color: #232323;
th {
height: 40px;
font-size: 12px !important;
font-weight: 400 !important;
color: rgba(35, 35, 35, 0.8);
padding: 9px 0px;
}
td {
font-size: 14px;
}
.cell {
padding-right: 12px;
padding-left: 12px;
line-height: 21px;
}
.sort-caret.ascending {
border-bottom-color: rgba(0, 129, 255, 0.5);
}
.ascending .sort-caret.ascending {
border-bottom-color: #0081ff;
}
.sort-caret.descending {
border-top-color: rgba(0, 129, 255, 0.5);
}
.descending .sort-caret.descending {
border-top-color: #0081ff;
}
.el-table__header-wrapper {
box-sizing: border-box;
th {
background: #f0f3fa;
}
}
.el-table__fixed-header-wrapper {
th {
background: #f0f3fa;
}
}
.is-scrolling-left + .el-table__fixed,
.is-scrolling-middle + .el-table__fixed,
.is-scrolling-right + .el-table__fixed {
//box-shadow:none;
//-webkit-box-shadow: 2px 0px 1px -2px #C3CBD5;
box-shadow: 2px 0 8px -7px #202020;
//border-right: 1px solid #C3CBD5;
height: auto !important;
bottom: 16px !important;
}
.el-table__body tr.current-row > td.el-table__cell {
background: none;
}
.caret-wrapper {
width: 10px;
}
.el-table__body-wrapper {
&::-webkit-scrollbar {
width: 16px; //竖轴宽度
height: 16px; //横轴宽度
}
&::-webkit-scrollbar-track {
background-color: #f3f4f5;
border-radius: 0;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(98, 110, 126, 0.2);
border: 4px solid #f3f4f5;
border-radius: 10px;
}
&::-webkit-scrollbar-corner {
background: #f3f4f5;
/*border-left: 1px solid #E0EAF2;*/
}
tr {
&.current-row > td {
background-color: initial;
}
&:nth-child(2n) {
background: #f8fbff;
}
}
tr:hover > td.el-table__cell {
background: #dcebff;
}
}
.el-table__body tr.hover-row > td.el-table__cell {
background: #dcebff;
}
.el-table__fixed {
//bottom:0 !important;
.el-table__body {
padding-bottom: 16px;
}
tr:nth-child(2n) {
background-color: #f8fbff;
}
}
::-webkit-scrollbar-track-piece {
//滚动条凹槽的颜色,还可以设置边框属性
background-color: #f3f4f5;
height: 16px;
padding: 0 4px;
}
//滚动条的宽度
::-webkit-scrollbar {
width: 8px;
height: 16px;
background-color: #f3f4f5;
border-radius: 6px;
}
//滚动条的滑块
::-webkit-scrollbar-thumb {
border-radius: 8px;
height: 8px;
margin: 0 4px;
background: rgba(98, 110, 126, 0.2);
border: 4px solid #f3f4f5;
&:hover {
background: #566380;
}
}
.el-scrollbar {
height: 16px;
.el-scrollbar__bar.is-horizontal {
height: 8px;
}
.el-scrollbar__thumb {
background: rgba(98, 110, 126, 0.4);
&:hover {
background: #566380;
}
}
}
}
}
}
.el-table__body tr.hover-row > td.el-table__cell { .el-table__body tr.hover-row > td.el-table__cell {
background-color: #dcebff; background-color: #dcebff;
} }
......
.search-result-head-container {
display: flex;
align-items: center;
justify-content: space-between;
line-height: 24px;
height: 24px;
.result-head-left {
.result-list-total {
font-size: 12px;
color: rgba(35, 35, 35, 0.8);
padding-left: 6px;
box-sizing: border-box;
position: relative;
&::before {
content: "";
position: absolute;
width: 2px;
height: 2px;
background: rgba(35, 35, 35, 0.4);
left: 0px;
top: 50%;
transform: translateY(-50%);
}
}
}
.result-head-right {
}
}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
box-sizing: border-box;
} }
.search-supplier { .search-supplier {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
......
<template>
<div class="dsk-amount-range" :class="{'dsk-amount-range-active' : iptActive}">
<div class="dsk-amount-inner">
<el-input v-model="amountArray[0]" :placeholder="startPlaceholder" class="dsk-range-start dsk-amount-ipt" @focus="iptActive = true" @blur="iptActive = false"></el-input>
<div class="dsk-range-text">{{rangeText}}</div>
<el-input v-model="amountArray[1]" :placeholder="endPlaceholder" class="dsk-range-end dsk-amount-ipt" @focus="iptActive = true" @blur="iptActive = false"></el-input>
</div>
</div>
</template>
<script>
export default {
name: "dskAmountRange",
props: {
amountArray: {
required: true,
type: Array,
default: () => []
},
// 区间文字
rangeText: {
type: String,
default: "至"
},
// 开始区间输入框提示语
startPlaceholder: {
type: String,
default: ""
},
// 结束区间输入框提示语
endPlaceholder: {
type: String,
default: ""
},
},
model: {
prop: "amountArray",
event: "amountRangeChange"
},
data() {
return {
iptActive: false
};
},
//可访问data属性
created() {
},
//计算集
computed: {
},
//方法集
methods: {
},
}
</script>
<style lang="scss" scoped>
.dsk-amount-range {
width: 268px;
height: 32px;
padding: 5px 0px;
border-radius: 2px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
&.dsk-amount-range-active {
border-color: #0081ff;
}
::v-deep .dsk-amount-inner {
display: flex;
height: 100%;
align-items: center;
.dsk-range-start,
.dsk-range-end {
&.dsk-amount-ipt.el-input {
line-height: 20px;
height: 100%;
.el-input__inner {
line-height: 1;
height: 100%;
width: 100%;
padding: 0px 12px;
border: none;
}
}
}
.dsk-range-text {
color: rgba(35, 35, 35, 0.8);
}
}
}
</style>
<template>
<div class="dsk-tab-toggle">
<!-- tab列表 -->
<div class="dsk-tab-items-container">
<div class="dsk-tab-items-container-inner">
<div class="dsk-tab-item" v-for="item of tabs" :key="item.id" :class="{'tab-current' : item.value == currentValue}" @click="tabChoose(item)">
<div class="dsk-tab-item-name">{{item.name}}</div>
</div>
<!-- 下滑条 -->
<div class="dsk-tab-sliding-bar" v-if="tabs.length" :style="{width : `${silidingBarWidth}px`,transform : `translateX(${silidingBarLeft}px)`}">
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "dskTabToggle",
props: {
currentValue: {
required: true,
type: [String, Number]
},
tabs: {
required: true,
type: Array,
default: () => []
}
},
model: {
prop: "currentValue",
event: "currentTabChange"
},
data() {
return {
silidingBarLeft: 0,
silidingBarWidth: 0
};
},
//可访问data属性
created() {
this.initSlidingBar();
},
//计算集
computed: {
},
//方法集
methods: {
async initSlidingBar() {
try {
await this.$nextTick();
const current = document.querySelector(".tab-current");
if (current) {
const text = current.querySelector(".dsk-tab-item-name");
const width = text.offsetWidth;
const boxOffsetLeft = current.offsetLeft;
const textOffsetLeft = text.offsetLeft;
this.silidingBarWidth = width;
this.silidingBarLeft = boxOffsetLeft + textOffsetLeft;
}
} catch (error) {
}
},
tabChoose(item) {
this.$emit("currentTabChange", item.value);
this.$emit("tabToggle", item.value);
this.initSlidingBar();
}
},
}
</script>
<style lang="scss" scoped>
.dsk-tab-toggle {
width: 100%;
height: 48px;
border-bottom: 1px solid #eeeeee;
background: #fff;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
box-sizing: border-box;
.dsk-tab-items-container {
width: 100%;
height: 100%;
display: flex;
align-items: center;
.dsk-tab-items-container-inner {
width: 100%;
height: 100%;
display: flex;
align-items: center;
white-space: nowrap;
overflow: auto;
box-sizing: border-box;
position: relative;
.dsk-tab-item {
height: 100%;
display: flex;
align-items: center;
padding: 0px 16px;
box-sizing: border-box;
position: relative;
.dsk-tab-item-name {
cursor: pointer;
color: #232323;
font-size: 16px;
}
&.tab-current {
.dsk-tab-item-name {
color: #0081ff;
font-weight: bold;
}
}
}
.dsk-tab-sliding-bar {
position: absolute;
left: 0px;
bottom: 0px;
height: 2px;
background: #0081ff;
transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
}
}
}
</style>
<template>
<transition>
<div class="dsk-table-header-setting-bar">
<div class="dsk-table-header-setting-bar-inner">
</div>
</div>
</transition>
</template>
<script>
import vuedraggable from "vuedraggable";
export default {
name: "dskTableHeaderSettingBar",
components: {
vuedraggable
},
props: {
settingList: {
type: Array,
default: () => []
}
},
data() {
return {
lockColumn: [],
useColumn: [],
notUseColumn: []
};
},
//可访问data属性
created() {
this.settingHeaderClassify();
},
//计算集
computed: {
},
//方法集
methods: {
// 表头当前状态分类
settingHeaderClassify() {
if (this.settingList?.length) {
const temp = JSON.parse(JSON.stringify(this.settingList));
const len = temp.length;
for (let index = 0; index < len; index++) {
if (temp[index].lock) {
this.lockColumn.push({
...temp[index],
use: true
});
continue;
}
// 设置了false值
if (temp[index].hasOwnProperty("use") && temp[index].use === false) {
this.notUseColumn.push(temp[index]);
continue;
}
// 默认为true 展示
this.useColumn.push({
...temp[index],
use: true
});
}
console.log(this.useColumn);
}
}
},
}
</script>
<style lang="scss" scoped>
.dsk-table-header-setting-bar {
position: absolute;
top: 24px;
left: 0px;
width: 236px;
height: 456px;
background: #fff;
border: 1px solid #eeeeee;
box-sizing: border-box;
z-index: 3000;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
.dsk-table-header-setting-bar-inner {
width: 100%;
height: 100%;
}
}
</style>
<template>
<div class="dsk-table-header-setting" @click="showHeaderSetting">
<svg-icons :icon-class="'table-header-setting-icon'" :class-name="'table-header-setting-icon'"></svg-icons>
<div class="table-header-setting-text">表头设置</div>
<setting-bar v-if="showHeaderSettingStatus" :settingList="settingList"></setting-bar>
</div>
</template>
<script>
import svgIcons from "@/components/SvgIcon";
import SettingBar from "./components/SettingBar";
export default {
components: {
svgIcons,
SettingBar
},
name: "dskTableHeaderSetting",
props: {
settingList: {
type: Array,
default: () => []
}
},
data() {
return {
showHeaderSettingStatus: false
};
},
//可访问data属性
created() {
},
//计算集
computed: {
},
//方法集
methods: {
showHeaderSetting() {
this.showHeaderSettingStatus = true;
}
},
}
</script>
<style lang="scss" scoped>
.dsk-table-header-setting {
display: flex;
align-items: center;
position: relative;
&:hover {
.table-header-setting-text {
color: #0081ff;
}
.table-header-setting-icon {
fill: #0081ff;
}
}
.table-header-setting-icon {
cursor: pointer;
}
.table-header-setting-text {
color: rgba(35, 35, 35, 0.8);
font-size: 14px;
margin-left: 6px;
cursor: pointer;
}
}
</style>
<template>
<el-skeleton animated class="skeleton-container">
<template slot="template">
<el-skeleton-item variant="text" style="width: 60%;"/>
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 60%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
<el-skeleton-item variant="text" style="width: 100%;" />
</template>
</el-skeleton>
</template>
<script>
export default {
name: 'skeleton'
}
</script>
<style lang="scss" scoped>
.el-skeleton__item{
height: 20px;
border-radius: 0;
margin: 9px 0;
background: #f0f0f0;
}
</style>
...@@ -3,17 +3,28 @@ ...@@ -3,17 +3,28 @@
<div class="table-item"> <div class="table-item">
<el-table v-if="tableDataTotal>0" class="fixed-table" :class="headerFixed ? 'headerFixed':''" v-loading="tableLoading" :data="tableData" <el-table v-if="tableDataTotal>0" class="fixed-table" :class="headerFixed ? 'headerFixed':''" v-loading="tableLoading" :data="tableData"
element-loading-text="Loading" ref="tableRef" border fit highlight-current-row v-sticky-header.always="stickyHeader" element-loading-text="Loading" ref="tableRef" border fit highlight-current-row v-sticky-header.always="stickyHeader"
:default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange" @selection-change="selectionChange" :cell-class-name="cellClassName" :cell-style="cellStyle"> :default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange" @selection-change="selectionChange" :cell-class-name="cellClassName"
:cell-style="cellStyle">
<el-table-column type="selection" :width="needSelection.width ? needSelection.width : '38px'" v-if="needSelection.flag" <el-table-column type="selection" :width="needSelection.width ? needSelection.width : '38px'" v-if="needSelection.flag"
:fixed="needSelection.fixed" :align="needSelection.align" :show-overflow-tooltip="needSelection.showOverflowTooltip"> :fixed="needSelection.fixed" :align="needSelection.align" :show-overflow-tooltip="needSelection.showOverflowTooltip">
</el-table-column> </el-table-column>
<el-table-column v-if="isIndex" label="序号" :width="flexWidth(tableData)" align="left" :fixed="indexFixed" :resizable="false"> <el-table-column type="index" v-if="isIndex" label="序号" :width="flexWidth(tableData)" align="left" :fixed="indexFixed" :resizable="false">
<template slot-scope="scope">{{ queryParams.pageNum * queryParams.pageSize - queryParams.pageSize + scope.$index + 1 }}</template> <template slot-scope="scope">{{ queryParams.pageNum * queryParams.pageSize - queryParams.pageSize + scope.$index + 1 }}</template>
</el-table-column> </el-table-column>
<template> <template v-for="(item,index) in formColum">
<el-table-column v-for="(item,index) in formColum" :key="index" :label="item.label" :prop="item.prop" :width="item.width" <!-- 复选框列 -->
:min-width="item.minWidth" :align="item.align?item.align:'left'" :fixed="item.fixed" <el-table-column v-if="item.type == 'selection'" type="selection" :key="index" :width="item.width ? item.width : '38px'" :fixed="item.fixed"
:sortable="item.sortable ?item.sortable=='custom'? 'custom':true : false" :resizable="false"> :align="item.align?item.align:'left'" :show-overflow-tooltip="item.showOverflowTooltip">
</el-table-column>
<!-- 序号列 -->
<el-table-column v-else-if="item.type == 'index'" type="index" :key="index" :label="item.label ? item.label : '序号'"
:width="flexWidth(tableData)" :align="item.align?item.align:'left'" :fixed="item.fixed" :resizable="false">
<template slot-scope="scope">{{ queryParams.pageNum * queryParams.pageSize - queryParams.pageSize + scope.$index + 1 }}</template>
</el-table-column>
<!-- 普通列 -->
<el-table-column v-else :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth"
:align="item.align?item.align:'left'" :fixed="item.fixed" :sortable="item.sortable ?item.sortable=='custom'? 'custom':true : false"
:resizable="false">
<template v-if="item.children&&item.children.length"> <template v-if="item.children&&item.children.length">
<el-table-column v-for="(cld, i) in item.children" :key="i" :prop="cld.prop" :label="cld.label" :width="cld.width" :resizable="false"> <el-table-column v-for="(cld, i) in item.children" :key="i" :prop="cld.prop" :label="cld.label" :width="cld.width" :resizable="false">
<template slot-scope="cldscope"> <template slot-scope="cldscope">
...@@ -21,7 +32,7 @@ ...@@ -21,7 +32,7 @@
<slot :name="cld.prop" :row="cldscope.row" :data="cld"></slot> <slot :name="cld.prop" :row="cldscope.row" :data="cld"></slot>
</template> </template>
<template v-else> <template v-else>
<span>{{cldscope.row[cld.prop] || '--'}}</span> <span>{{cldscope.row[cld.prop] || '-'}}</span>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
...@@ -34,7 +45,7 @@ ...@@ -34,7 +45,7 @@
<!-- 操作栏 --> <!-- 操作栏 -->
<slot v-else-if="item.prop == 'action-field-bar'" name="action-field-bar" :row="scope.row" :index="scope.$index" :data="item"></slot> <slot v-else-if="item.prop == 'action-field-bar'" name="action-field-bar" :row="scope.row" :index="scope.$index" :data="item"></slot>
<span v-else> <span v-else>
{{ scope.row[item.prop] || '--' }} {{ scope.row[item.prop] || '-' }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -43,7 +54,7 @@ ...@@ -43,7 +54,7 @@
</template> </template>
</el-table> </el-table>
<div style="padding: 30px 0" v-else> <div style="padding: 30px 0;box-sizing:border-box;" v-else>
<no-data /> <no-data />
</div> </div>
</div> </div>
...@@ -61,7 +72,7 @@ export default { ...@@ -61,7 +72,7 @@ export default {
props: { props: {
isIndex: { isIndex: {
type: Boolean, type: Boolean,
default: true default: false
}, },
needSelection: { needSelection: {
type: Object, type: Object,
...@@ -170,7 +181,7 @@ export default { ...@@ -170,7 +181,7 @@ export default {
this.$emit("selectionChange", selectionArray); this.$emit("selectionChange", selectionArray);
}, },
flexWidth(tableData) { flexWidth(tableData) {
let currentMax = this.queryParams.pageNum * this.queryParams.pageSize - this.queryParams.pageSize + tableData.length, wdth = 59; let currentMax = this.queryParams.pageNum * this.queryParams.pageSize - this.queryParams.pageSize + tableData.length, wdth = 50;
if (currentMax.toString().length > 3) { if (currentMax.toString().length > 3) {
wdth = wdth + (currentMax.toString().length - 3) * 10; wdth = wdth + (currentMax.toString().length - 3) * 10;
} }
...@@ -185,9 +196,6 @@ export default { ...@@ -185,9 +196,6 @@ export default {
::v-deep .el-table__body tr.current-row > td.el-table__cell { ::v-deep .el-table__body tr.current-row > td.el-table__cell {
background-color: #ffffff; background-color: #ffffff;
} }
/*::v-deep .el-table__fixed{
height: calc(100% - 16px) !important;
}*/
::v-deep .el-table__row { ::v-deep .el-table__row {
&:nth-child(even) { &:nth-child(even) {
...@@ -215,9 +223,11 @@ export default { ...@@ -215,9 +223,11 @@ export default {
::v-deep .el-table th.el-table__cell.is-leaf, ::v-deep .el-table th.el-table__cell.is-leaf,
::v-deep .el-table td.el-table__cell { ::v-deep .el-table td.el-table__cell {
border-bottom: 1px solid #e6eaf1; border-bottom: 1px solid #e6eaf1;
box-sizing: border-box;
} }
::v-deep .el-table--border .el-table__cell { ::v-deep .el-table--border .el-table__cell {
border-right: 1px solid #e6eaf1; border-right: 1px solid #e6eaf1;
box-sizing: border-box;
} }
::v-deep .el-table__body tr.hover-row.current-row > td, ::v-deep .el-table__body tr.hover-row.current-row > td,
::v-deep .el-table__body tr.hover-row.el-table__row--striped.current-row > td, ::v-deep .el-table__body tr.hover-row.el-table__row--striped.current-row > td,
...@@ -232,22 +242,5 @@ export default { ...@@ -232,22 +242,5 @@ export default {
::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td { ::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
background-color: #dcebff; background-color: #dcebff;
} }
::v-deep .el-table__header-wrapper {
position: sticky;
top: 0;
z-index: 99;
}
::v-deep .el-table__fixed {
overflow-x: clip;
overflow-y: clip;
}
}
.table-list-com-ins {
::v-deep .el-table {
.el-table__fixed-header-wrapper {
top: 0px;
}
}
} }
</style> </style>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<template slot="title"> <template slot="title">
<item v-if="item.meta" :icon="sideIcon(item)" :title="item.meta.title" /> <item v-if="item.meta" :icon="sideIcon(item)" :title="item.meta.title" />
</template> </template>
<sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child" :base-path="resolvePath(child.path,child.query)" <sidebar-item v-for="child in item.children" :key="child.path" :is-nest="true" :item="child" :base-path="resolvePath(child.path)"
:active-menu="activeMenu" class="nest-menu secondary-menu-item-sub" /> :active-menu="activeMenu" class="nest-menu secondary-menu-item-sub" />
</el-submenu> </el-submenu>
</template> </template>
......
<template>
</template>
<script>
export default {
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="cooperation-desk-account-enterprise">
</div>
</template>
<script>
export default {
name : "cooperationDeskAccountEnterprise",
data() {
return {
}
},
//可访问data属性
created(){
},
//计算集
computed:{
},
//方法集
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="cooperation-desk-account default-layout-container">
<div class="default-layout-container-inner">
<!-- 顶部tab切换栏 -->
<dsk-tab-toggle v-model="currentList" :tabs="toggleTabs"></dsk-tab-toggle>
<!-- 项目列表 -->
<project-list v-if="currentList == 'project'"></project-list>
<!-- 企业列表 -->
<enterprise-list v-if="currentList == 'enterprise'"></enterprise-list>
</div>
</div>
</template>
<script>
import DskTabToggle from "@/components/DskTabToggle";
import ProjectList from "@/views/consultingOrgManagement/components/ProjectList";
import EnterpriseList from "@/views/consultingOrgManagement/components/EnterpriseList";
import { v4 } from 'uuid';
export default {
name: "cooperationDeskAccount",
components: {
DskTabToggle,
ProjectList,
EnterpriseList
},
data() {
return {
currentList: "project",
toggleTabs: [
{
value: "project",
name: "项目列表",
id: v4()
},
{
value: "enterprise",
name: "企业列表",
id: v4()
}
]
};
},
//可访问data属性
created() {
},
//计算集
computed: {
},
//方法集
methods: {
},
}
</script>
<style lang="scss" scoped>
.cooperation-desk-account {
.default-layout-container-inner {
.cooperation-desk-account-project,
.cooperation-desk-account-enterprise {
height: calc(100% - 48px);
}
}
}
</style>
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="历史发包数量" min-width="107" :resizable="false" :sortable="'custom'" prop="inviteTenderCount"> <el-table-column label="历史发包数量" min-width="120" :resizable="false" :sortable="'custom'" prop="inviteTenderCount">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link v-if="scope.row.inviteTenderCount" <router-link v-if="scope.row.inviteTenderCount"
:to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=hiscontract` : `/enterprise/${encodeStr(scope.row.id)}?path=hiscontract`" :to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=hiscontract` : `/enterprise/${encodeStr(scope.row.id)}?path=hiscontract`"
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="历史发包总金额" min-width="120" :resizable="false" :sortable="'custom'" prop="inviteTenderSumAmount"> <el-table-column label="历史发包总金额" min-width="130" :resizable="false" :sortable="'custom'" prop="inviteTenderSumAmount">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="text-align:right;white-space: nowrap;"> <div style="text-align:right;white-space: nowrap;">
{{parseFloat(scope.row.inviteTenderSumAmount) ? `${scope.row.inviteTenderSumAmount}万元`:"--"}} {{parseFloat(scope.row.inviteTenderSumAmount) ? `${scope.row.inviteTenderSumAmount}万元`:"--"}}
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最近一次招标" min-width="107" :resizable="false" :sortable="'custom'" prop="inviteTenderLastTime"> <el-table-column label="最近一次招标" min-width="120" :resizable="false" :sortable="'custom'" prop="inviteTenderLastTime">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link v-if="scope.row.inviteTenderLastTime" <router-link v-if="scope.row.inviteTenderLastTime"
:to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=announcement` : `/enterprise/${encodeStr(scope.row.id)}?path=announcement`" :to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=announcement` : `/enterprise/${encodeStr(scope.row.id)}?path=announcement`"
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重点项目" min-width="107" :resizable="false" :sortable="'custom'" prop="importantProjectCount"> <el-table-column label="重点项目" min-width="120" :resizable="false" :sortable="'custom'" prop="importantProjectCount">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link v-if="scope.row.importantProjectCount" <router-link v-if="scope.row.importantProjectCount"
:to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=majorProject` : `/enterprise/${encodeStr(scope.row.id)}?path=majorProject`" :to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=majorProject` : `/enterprise/${encodeStr(scope.row.id)}?path=majorProject`"
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="拟建项目" min-width="107" :resizable="false" :sortable="'custom'" prop="approvalProjectCount"> <el-table-column label="拟建项目" min-width="120" :resizable="false" :sortable="'custom'" prop="approvalProjectCount">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link v-if="scope.row.approvalProjectCount" <router-link v-if="scope.row.approvalProjectCount"
:to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=proposed` : `/enterprise/${encodeStr(scope.row.id)}?path=proposed`" :to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=proposed` : `/enterprise/${encodeStr(scope.row.id)}?path=proposed`"
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="招标计划" min-width="107" :resizable="false" :sortable="'custom'" prop="bidPlanCount"> <el-table-column label="招标计划" min-width="120" :resizable="false" :sortable="'custom'" prop="bidPlanCount">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link v-if="scope.row.bidPlanCount" <router-link v-if="scope.row.bidPlanCount"
:to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=biddingplan` : `/enterprise/${encodeStr(scope.row.id)}?path=biddingplan`" :to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=biddingplan` : `/enterprise/${encodeStr(scope.row.id)}?path=biddingplan`"
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="招标公告" min-width="107" :resizable="false" :sortable="'custom'" prop="jskBidCount"> <el-table-column label="招标公告" min-width="120" :resizable="false" :sortable="'custom'" prop="jskBidCount">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link v-if="scope.row.jskBidCount" <router-link v-if="scope.row.jskBidCount"
:to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=announcement` : `/enterprise/${encodeStr(scope.row.id)}?path=announcement`" :to="scope.row.other ? `/enterprise/${encodeStr(scope.row.id)}?path=announcement` : `/enterprise/${encodeStr(scope.row.id)}?path=announcement`"
......
<template>
<div class="app-container enterprise_contatiner">
<div class="header">
<el-tabs v-model="activeName" >
<el-tab-pane label="查资质" name="first"></el-tab-pane>
<el-tab-pane label="现行资质标准" name="second"></el-tab-pane>
<el-tab-pane label="历史批量查询结果" name="third"></el-tab-pane>
</el-tabs>
</div>
<SearchAptitude v-if="activeName === 'first'"></SearchAptitude>
<AptitudeStandard v-if="activeName === 'second'"></AptitudeStandard>
<SearchResult v-if="activeName === 'third'"></SearchResult>
</div>
</template>
<script>
import SearchAptitude from './components/SearchAptitude'
import AptitudeStandard from './components/AptitudeStandard'
import SearchResult from './components/SearchResult'
export default {
name: 'Assistant',
components: {
SearchAptitude,AptitudeStandard,SearchResult
},
data() {
return {
activeName: 'first'
}
},
}
</script>
<style lang="scss" scoped>
.header{
justify-content: space-between;
height: 48px;
background: #FFFFFF;
border-radius: 4px 4px 0 0 ;
border-bottom: 1px solid #EEEEEE;
color: #232323;
position: sticky;
top: 54px;
z-index: 999;
::v-deep .el-tabs{
height: 48px;
line-height: 48px;
.el-tabs__nav-wrap::after {
position: static !important;
}
.el-tabs__header{
margin: 0;
.el-tabs__item{
padding: 0 16px;
font-size: 16px;
}
.is-active{
font-weight: bold;
}
}
.el-tabs__content{
width: 100%;
}
}
.location{
font-size: 14px;
color: #0081FF;
i{
margin-right: 6px;
font-size: 16px;
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<div class="apt_stan_header">
<span v-for="(item,index) in list" class="apt_stan_header_span" :class="activeIndex==index?'active_span':''" :key="index" @click="activeIndex=index">{{item}}</span>
</div>
<div class="apt_stan_content">
<div class="apt_stan_content_header">
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div style="padding:16px;">
<el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}" v-horizontal-scroll="'hover'"
class="table-item1 fixed-table" border highlight-current-row>
<el-table-column label="资质名称" fixed >
<template slot-scope="scope">
{{scope.row.province}}
</template>
</el-table-column>
<el-table-column label="等级" width="274">
<template slot-scope="scope">
{{scope.row.biddingCount||"--"}}
</template>
</el-table-column>
<el-table-column label="经营范围" >
<template slot-scope="scope">
{{scope.row.landInfoCount||"--"}}
</template>
</el-table-column>
</el-table>
<div class="apt_stan_content_text_box">·建筑工程是指各类结构形式的民用建筑工程、工业建筑工程、构筑物工程以及相配套的道路、通信、管网管线等设施工程。工程内容包括地基与基础、主体结构、建筑屋面、装修装饰、建筑幕墙、附建人防工程以及给水排水及供暖、通风与空调、电气、消防、智能化、防雷等配套工程;</div>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
tableData:[],
activeIndex:0,
list:['建筑业企业资质','工程监理','工程设计','工程勘察','工程造价咨询'],
options: [
{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}
],
value: ''
}
},
}
</script>
<style lang="scss" scoped>
.apt_stan_header{
border-radius: 0px 0px 4px 4px;
display: flex;
padding: 16px;
background: #FFFFFF;
.apt_stan_header_span{
cursor: pointer;
font-size: 14px;
color: #3D3D3D;
height: 32px;
border-radius: 4px;
padding: 5px 12px;
margin-right: 12px;
display: inline-block;
background: #F3F4F5;
}
.active_span{
background: #F6F9FC;
color: #0081FF;
}
}
.apt_stan_content{
margin-top: 16px;
background: #FFFFFF;
border-radius: 4px 4px 0px 0px;
.apt_stan_content_header{
padding: 16px;
border-width: 0px 0px 1px 0px;
border-style: solid;
border-color: #EEEEEE;
}
::v-deep .el-input__inner{
border: none;
}
.apt_stan_content_text_box{
border-radius: 0px 0px 4px 4px;
padding: 16px;
background: #FFFFFF;
border: 1px solid #E6EAF1;
color: #3D3D3D;
font-size: 12px;
margin-top: 16px;
}
}
</style>
\ No newline at end of file
<template>
<el-dialog title="批量查资质" custom-class="batch_import_dialog" :visible.sync="visible">
<div class="upload" v-if="addfile==false">
<div class="up_title">导入Excel文件,高效查询或导出企业信息;查询成功后可使用筛选项二次筛选</div>
<div>
<div class="step_box" v-for="(item,index) in list" :key="index">
<span class="step">{{ index+1 }}</span><span class="step_text">{{ item }}</span><span class="step_line" v-if="index!=3"></span>
</div>
</div>
<div class="up_box">
<el-upload class="batch_import_upload"
:action="action"
:multiple="false"
accept=".xls,.xlsx"
drag
ref="upload"
:auto-upload="false"
:file-list="fileList"
:on-change="handleFileListChange"
:headers="headers"
:on-success="onSuccess">
<img class="up_img" src="@/assets/images/plus.png">
<div class="up_text">点击选择文件或将文件拖拽至此导入企业名录</div>
<div class="up_tip">· 导入的文件内容必须依照下载模板的要求填写);</div>
<div class="up_tip">· 上传文件最大为2M,仅支持Excel表格文件(xls,xlsx);</div>
<div class="up_tip">· 单次查询企业数量限时免费 5000 家。</div>
</el-upload>
</div>
<div class="bd"></div>
<div class="btns1 clearfix">
<div class="btn btn_default dowload" @click="downloadClick"><img src="@/assets/images/download.png" alt="">下载模板</div>
<div class="btn btn_primary btn_disabled fr" v-if="isUpload==false">查询</div>
<div class="btn btn_primary fr" @click="importConfirmClick" v-else>查询</div>
<div class="btn btn_default fr" @click="importCancel">取消</div>
</div>
</div>
<div class="success" v-if="addfile==true">
<div v-if="addsuccess==false">
<img class="img" src="@/assets/images/project/clock.png">
<div class="p1">查询客户中...</div>
<div class="p2">请耐心等待,过程大概30秒</div>
</div>
<div v-if="addsuccess == true">
<div class="p3">
<img src="@/assets/images/project/success.png">查询成功
</div>
<div class="p2">{{messages}}</div>
<div class="btns">
<div class="btn btn_primary h32" @click="getmsg">查看</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import { getToken } from "@/utils/auth";
import "@/assets/styles/project.scss"
import {importData} from '@/api/custom/custom'
export default {
name: 'batchImport',
props:{
importtype:''
},
data(){
return{
list:['下载模版','按要求在模板内填写企业全称名录','上传文件','查询结果'],
visible:false,
isUpload:false,//有上传的文件
addfile:false,//已上传文件
addsuccess:false,//已成功加入数据
//批量导入
action:"",
fileList: [],
headers: {
Authorization: "Bearer " + getToken(),
},
downloadhref:'',//样例地址
successCount:0,//成功条数
messages:'',
}
},
created(){
if(this.importtype == 'project'){//项目管理
this.downloadhref = '/file/projectTemplate.xlsx'
this.action = process.env.VUE_APP_BASE_API + '/business/info/upload'
}
if(this.importtype == 'custom'){//客户管理
this.downloadhref = '/file/Template.xlsx'
this.action = process.env.VUE_APP_BASE_API + "/customer/importData"
}
},
methods:{
getmsg(){
this.importCancel()
this.$emit('getdatas')
},
handleFileListChange(file, fileList) {
var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
const extension = testmsg === "xlsx";
const extension1 = testmsg === "xls";
if (!extension && !extension1 ) {
this.$message({
message: "上传文件只能是.xls,.xlsx格式!",
type: "warning",
});
return false;
}
const isLt2M = file.size / 1024 / 1024 < 2
if (!isLt2M) {
this.$refs.upload.clearFiles()
this.$message({
message: '上传文件大小不能超过 2MB!',
type: 'warning'
})
return false
}
if (fileList.length > 0) {
this.fileList = [fileList[fileList.length - 1]];
this.isUpload = true
}
},
onSuccess(res, file, fileList) {
if (res.code == 200) {
this.successCount = res.successCount
if(this.importtype == 'project'){//项目管理
this.messages = res.msg
}
if(this.importtype == 'custom'){//客户管理
let num = res.data?res.data.length:0
let str = '成功导入客户条数'+res.successCount+',客户去重条数'+ num
this.messages = str
}
this.addsuccess = true
}else {
this.importCancel()
this.$message.error({ message: res.msg, showClose: true })
}
},
downloadClick() {
let a = document.createElement("a");
a.setAttribute("href", this.downloadhref);
a.setAttribute("download", "批量导入模版.xlsx");
document.body.appendChild(a);
a.click();
a.remove();
},
// 批量导入
importConfirmClick() {
if (this.fileList.length > 0) {
this.$refs["upload"].submit();
this.addfile = true
} else {
this.$message("请先选择文件");
}
},
importCancel(){
this.addfile = false
this.isUpload = false
this.addsuccess = false
this.fileList = []
this.$emit('cancels')
},
}
}
</script>
<style lang="scss" scoped>
::v-deep .batch_import_dialog{
width: 656px;
border-radius: 4px;
.el-dialog__header{
font-size: 16px;
color:#232323;
font-weight:700;
}
.el-dialog__body{
border-top: 1px solid #E5E6EB;
}
.up_title{
font-size: 12px;
color: #666666;
position: absolute;
top: 23px;
left: 116px;
}
.upload{
.step_box{
display: inline-block;
font-size: 12px;
color: #3D3D3D;
.step{
display: inline-block;
width: 12px;
height: 12px;
background: #0081FF;
color: #ffffff;
margin-right: 4px;
text-align: center;
border-radius: 50%;
}
.step_line{
width: 27px;
height: 1px;
display: inline-block;
background:#D8D8D8;
position: relative;
top: -4px;
margin:0 12px;
}
}
.up_box{
margin-top: 20px;
.batch_import_upload{
.el-upload-dragger{
width: 616px;
height: 224px;
background: #F2F3F5;
border-radius: 2px 2px 2px 2px;
border: 1px solid #E5E6EB;
.up_img{
width: 14px;
height: 14px;
margin-top: 50px;
margin-bottom: 24px;
}
.up_text{
font-size: 14px;
color: #232323;
margin-bottom: 4px;
}
.up_tip{
color: #999999;
font-size: 12px;
height: 20px;
line-height: 20px;
}
}
}
.el-upload-list__item{
height: 36px;
line-height: 36px;
background: #F7F8FA;
border-radius: 2px 2px 2px 2px;
a{
color: #1D2129;
}
.el-icon-close{
top: 10px;
}
}
}
.bd{
width: 656px;
margin-left: -20px;
height: 1px;
background:#E5E6EB ;
margin-top: 17px;
}
.btns1{
.btn{
border-radius: 2px;
padding: 0 16px;
width: auto;
height: 32px;
line-height: 32px;
margin-top: 16px;
}
.btn_default{
border-color: #DCDFE6;
color: #232323;
margin-left: 0;
}
.fr{
float:right;
}
.dowload{
img{
width: 16px;
height: 16px;
}
}
.btn_disabled{
background: #94BFFF;
color: #ffffff;
}
}
}
}
</style>
<template>
<div class="search_result_box">
<el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}" v-horizontal-scroll="'hover'"
class="table-item1 fixed-table" border highlight-current-row>
<el-table-column type="index" label="序号" fixed width="60">
<template slot-scope="scope">
<span>{{(pageNum - 1) *pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="表格名称" >
<template slot-scope="scope">
{{scope.row.biddingCount||"--"}}
</template>
</el-table-column>
<el-table-column label="查询时间" width="189">
<template slot-scope="scope">
{{scope.row.landInfoCount||"--"}}
</template>
</el-table-column>
<el-table-column label="操作" width="154">
<template slot-scope="scope">
{{scope.row.bondBalance||"--"}}
</template>
</el-table-column>
</el-table>
<el-pagination background :current-page="pageNum" @current-change="handleCurrentChange" layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
</template>
<script>
export default {
data(){
return{
tableData:[],
total: 0,
pageNum: 1,
}
},
methods:{
handleCurrentChange(pageNum) {
this.pageNum = pageNum;
},
}
}
</script>
<style lang="scss" scoped>
.search_result_box{
background: #ffffff;
padding: 16px;
.el-pagination{
display: flex;
justify-content: end;
padding: 0;
margin-right: -5px;
margin-top: 16px;
}
}
</style>
\ No newline at end of file
...@@ -293,6 +293,11 @@ ...@@ -293,6 +293,11 @@
{{scope.row.legalPerson||"--"}} {{scope.row.legalPerson||"--"}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注说明" :resizable="false">
<template slot-scope="scope">
{{scope.row.legalPerson||"--"}}
</template>
</el-table-column>
<el-table-column label="考察项目" :resizable="false"> <el-table-column label="考察项目" :resizable="false">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.legalPerson||"--"}} {{scope.row.legalPerson||"--"}}
......
<template> <template>
<!--供应商考评--> <!--供应商处置-->
<div class="supplier"> <div class="supplier">
<div class="search-supplier"> <div class="search-supplier">
<div class="title_wrap i"> <div class="title_wrap i">
<div class="enterprise_title"> <div class="enterprise_title">
供应商考评 供应商处置
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment