Commit 7c49961f authored by yht15023815643's avatar yht15023815643

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

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents b2112fb1 26316b29
...@@ -6,7 +6,9 @@ import com.dsk.common.constant.PushConstants; ...@@ -6,7 +6,9 @@ import com.dsk.common.constant.PushConstants;
import com.dsk.common.utils.DateUtils; import com.dsk.common.utils.DateUtils;
import com.dsk.system.domain.SysConfig; import com.dsk.system.domain.SysConfig;
import com.dsk.system.domain.SysPush; import com.dsk.system.domain.SysPush;
import com.dsk.system.domain.SysPushRecord;
import com.dsk.system.domain.SysStatutoryHoliday; import com.dsk.system.domain.SysStatutoryHoliday;
import com.dsk.system.mapper.SysPushRecordMapper;
import com.dsk.system.mapper.SysStatutoryHolidayMapper; import com.dsk.system.mapper.SysStatutoryHolidayMapper;
import com.dsk.system.service.ISysConfigService; import com.dsk.system.service.ISysConfigService;
import com.dsk.system.service.ISysPushService; import com.dsk.system.service.ISysPushService;
...@@ -20,10 +22,7 @@ import org.springframework.util.ObjectUtils; ...@@ -20,10 +22,7 @@ import org.springframework.util.ObjectUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.DayOfWeek; import java.time.DayOfWeek;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 推送相关定时任务 * 推送相关定时任务
...@@ -45,6 +44,9 @@ public class PushTask { ...@@ -45,6 +44,9 @@ public class PushTask {
@Resource @Resource
private SysStatutoryHolidayMapper statutoryHolidayMapper; private SysStatutoryHolidayMapper statutoryHolidayMapper;
@Resource
private SysPushRecordMapper pushRecordMapper;
/** /**
* 供应商不良推送(每分钟) * 供应商不良推送(每分钟)
*/ */
...@@ -54,15 +56,22 @@ public class PushTask { ...@@ -54,15 +56,22 @@ public class PushTask {
if (!isPush()) return; if (!isPush()) return;
//2.推送数据(当前时段是否存在数据) //2.推送数据(当前时段是否存在数据)
List<SysPushRecord> records = new ArrayList<>();
//3.推送人员 //3.推送人员
List<SysPush> list = pushService.list(Wrappers.<SysPush>lambdaQuery().eq(SysPush::getStatus, 0)); List<SysPush> list = pushService.list(Wrappers.<SysPush>lambdaQuery().eq(SysPush::getStatus, 0));
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
SysPushRecord record = new SysPushRecord();
list.parallelStream().forEach(item -> { list.parallelStream().forEach(item -> {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("name", item.getName()); param.put("name", item.getName());
}); });
records.add(record);
} }
//4.添加推送记录
records.forEach(item -> pushRecordMapper.insert(item));
} }
//是否推送 //是否推送
......
...@@ -163,6 +163,7 @@ tenant: ...@@ -163,6 +163,7 @@ tenant:
- sys_user_file_record - sys_user_file_record
- sys_oss_config - sys_oss_config
- sys_region - sys_region
- sys_push_record
- d_customer - d_customer
- d_project - d_project
- d_subcontract - d_subcontract
...@@ -181,6 +182,7 @@ tenant: ...@@ -181,6 +182,7 @@ tenant:
- d_customer_qualification_certificate - d_customer_qualification_certificate
- d_customer_safety_certificate - d_customer_safety_certificate
- d_customer_tax_certificate - d_customer_tax_certificate
- f_supplier_limited
# MyBatisPlus配置 # MyBatisPlus配置
......
package com.dsk.cscec.controller;
import com.dsk.cscec.service.DProjectTypeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 维表:工程类型,源于IPM(DProjectType)表控制层
*
* @author sxk
* @since 2024-01-05 11:45:43
*/
@RestController
@RequestMapping("dProjectType")
public class DProjectTypeController {
/**
* 服务对象
*/
@Resource
private DProjectTypeService dProjectTypeService;
}
package com.dsk.cscec.controller;
import com.dsk.cscec.service.FSupplierLimitedService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 供应商限制信息表(FSupplierLimited)表控制层
*
* @author sxk
* @since 2024-01-05 11:34:19
*/
@RestController
@RequestMapping("fSupplierLimited")
public class FSupplierLimitedController {
/**
* 服务对象
*/
@Resource
private FSupplierLimitedService fSupplierLimitedService;
}
package com.dsk.cscec.domain;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 维表:工程类型,源于IPM(DProjectType)实体类
*
* @author sxk
* @since 2024-01-05 11:45:46
*/
@Data
public class DProjectType implements Serializable {
private static final long serialVersionUID = -28204467748448386L;
/**
* 工程类型主键
*/
private Long projectTypeKey;
/**
* 工程类型编码
*/
private String projectTypeCode;
/**
* 工程类型名称
*/
private String projectTypeName;
/**
* 工程类型上级名称1
*/
private String projectTypeName1;
/**
* 工程类型上级名称2
*/
private String projectTypeName2;
/**
* 工程类型层级
*/
private Long levelNo;
/**
* 是否叶子节点
*/
private String isleaf;
/**
* 是否有效
*/
private String isvalid;
/**
* 备注
*/
private String remark;
/**
* 工程类型ID
*/
private String projectTypeId;
/**
* 工程类型父ID
*/
private String parentId;
/**
* 数据加载时间
*/
private Date loadTime;
}
package com.dsk.cscec.domain;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 供应商限制信息表(FSupplierLimited)实体类
*
* @author sxk
* @since 2024-01-05 11:34:22
*/
@Data
public class FSupplierLimited implements Serializable {
private static final long serialVersionUID = 868547854171128623L;
private String fid;
/**
* 版本
*/
private Long version;
/**
* 单据编号
*/
private String frecordno;
/**
* 子企业
*/
private String fjobunitname;
/**
* 子企业id
*/
private String fjobunitid;
/**
* 供应商名称
*/
private String fsuppliername;
/**
* 供应商统一社会信用代码
*/
private String funifiedsocialcreditcode;
/**
* 限用情形
*/
private String flimitsituation;
/**
* 禁用情形
*/
private String fdisablesituation;
/**
* 限用/禁用状态
*/
private String fstate;
/**
* 解除前状态
*/
private String fbeforestate;
/**
* 限用日期
*/
private Date flimitdate;
/**
* 解除限用理由
*/
private String frelievereason;
/**
* 附件
*/
private String fattachment;
/**
* 备注
*/
private String fremarks;
/**
* 流程状态
*/
private String fbizstate;
/**
* 流程状态名称
*/
private String fbizstatename;
/**
* 数据类型
*/
private String fdatatype;
/**
* 时间戳
*/
private Date fts;
/**
* 创建时间
*/
private Date fcreatetime;
/**
* 创建人fullid
*/
private String fcreatepsnfid;
/**
* 创建人fullname
*/
private String fcreatepsnfname;
/**
* 是否为局名义被诉案件
*/
private String fisgroupcase;
private String fcategoryname;
/**
* 劳务分包id
*/
private String flaowufbid;
/**
* 专业分包id
*/
private String fzhuanyefbid;
/**
* 分供id
*/
private String ffgid;
/**
* 租赁id
*/
private String fzlid;
/**
* 数据加载时间
*/
private Date loadTime;
}
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.DProjectType;
/**
* 维表:工程类型,源于IPM(DProjectType)表数据库访问层
*
* @author sxk
* @since 2024-01-05 11:45:43
*/
public interface DProjectTypeMapper extends BaseMapper<DProjectType> {
}
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.FSupplierLimited;
/**
* 供应商限制信息表(FSupplierLimited)表数据库访问层
*
* @author sxk
* @since 2024-01-05 11:34:19
*/
public interface FSupplierLimitedMapper extends BaseMapper<FSupplierLimited> {
}
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.DProjectType;
/**
* 维表:工程类型,源于IPM(DProjectType)表服务接口
*
* @author sxk
* @since 2024-01-05 11:45:49
*/
public interface DProjectTypeService extends IService<DProjectType> {
}
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.FSupplierLimited;
/**
* 供应商限制信息表(FSupplierLimited)表服务接口
*
* @author sxk
* @since 2024-01-05 11:34:23
*/
public interface FSupplierLimitedService extends IService<FSupplierLimited> {
}
package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.cscec.domain.DProjectType;
import com.dsk.cscec.mapper.DProjectTypeMapper;
import com.dsk.cscec.service.DProjectTypeService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 维表:工程类型,源于IPM(DProjectType)表服务实现类
*
* @author sxk
* @since 2024-01-05 11:45:49
*/
@Service("dProjectTypeService")
public class DProjectTypeServiceImpl extends ServiceImpl<DProjectTypeMapper, DProjectType> implements DProjectTypeService {
@Resource
private DProjectTypeMapper baseMapper;
}
package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.cscec.domain.FSupplierLimited;
import com.dsk.cscec.mapper.FSupplierLimitedMapper;
import com.dsk.cscec.service.FSupplierLimitedService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 供应商限制信息表(FSupplierLimited)表服务实现类
*
* @author sxk
* @since 2024-01-05 11:34:23
*/
@Service("fSupplierLimitedService")
public class FSupplierLimitedServiceImpl extends ServiceImpl<FSupplierLimitedMapper, FSupplierLimited> implements FSupplierLimitedService {
@Resource
private FSupplierLimitedMapper baseMapper;
}
...@@ -43,6 +43,9 @@ public class EnterpriseService { ...@@ -43,6 +43,9 @@ public class EnterpriseService {
@Autowired @Autowired
private ICustomerInfoService iCustomerInfoService; private ICustomerInfoService iCustomerInfoService;
@Autowired
private CompanyRelationTableV1Service relationTableV1Service;
public R label(EnterpriseInfoLabelBody body) throws Exception { public R label(EnterpriseInfoLabelBody body) throws Exception {
List<Map<String, Object>> mapList = new ArrayList<>(); List<Map<String, Object>> mapList = new ArrayList<>();
if (body.isVaildCid()) { if (body.isVaildCid()) {
...@@ -137,6 +140,27 @@ public class EnterpriseService { ...@@ -137,6 +140,27 @@ public class EnterpriseService {
if (code.equals(HttpStatus.OK.value())) { if (code.equals(HttpStatus.OK.value())) {
statisticMapData.put("combineMember", MapUtils.getMap(combineMemberMap, "data", null)); statisticMapData.put("combineMember", MapUtils.getMap(combineMemberMap, "data", null));
} }
// 咨询业务往来
JskCompanyRelationTableV1Dto v1Dto = new JskCompanyRelationTableV1Dto();
Map<String, Object> businessTransactionsMap = new HashMap<>();
v1Dto.setCompanyId(body.getCompanyId());
v1Dto.setCompanyType(1);
TableDataInfo page1 = relationTableV1Service.page(v1Dto);
long total1 = page1.getTotal();
businessTransactionsMap.put("owner", total1);
v1Dto.setCompanyType(2);
TableDataInfo page2 = relationTableV1Service.page(v1Dto);
long total2 = page2.getTotal();
businessTransactionsMap.put("construction", total2);
v1Dto.setCompanyType(3);
TableDataInfo page3 = relationTableV1Service.page(v1Dto);
long total3 = page3.getTotal();
businessTransactionsMap.put("combine", total3);
if (total1+total2+total3 >0) {
statisticMapData.put("businessTransactions", businessTransactionsMap);
} else {
statisticMapData.put("businessTransactions", null);
}
return R.ok(statisticMapData); return R.ok(statisticMapData);
} }
......
<?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.DProjectTypeMapper">
</mapper>
<?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.FSupplierLimitedMapper">
</mapper>
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"json-editor-vue": "^0.11.1", "json-editor-vue": "^0.11.1",
"mitt": "^3.0.1",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
......
...@@ -317,16 +317,21 @@ li { ...@@ -317,16 +317,21 @@ li {
font-size: 14px; font-size: 14px;
color: #232323; color: #232323;
th { th {
font-size: 13px !important; height: 40px;
font-weight: 400 !important; padding: 9px 0px;
} }
td { td {
font-size: 14px; padding: 9px 0px;
.cell {
color: #232323;
}
} }
.cell { .cell {
padding-right: 12px; padding-right: 12px;
padding-left: 12px; padding-left: 12px;
line-height: 18px; line-height: 21px;
font-size: 12px;
font-weight: 400;
} }
thead { thead {
color: rgba(35, 35, 35, 0.7); color: rgba(35, 35, 35, 0.7);
......
...@@ -1284,7 +1284,7 @@ ...@@ -1284,7 +1284,7 @@
padding-left: 16px; padding-left: 16px;
} }
.el-tooltip__popper.is-dark { .el-tooltip__popper.is-dark {
opacity: 0.5; // opacity: 0.5;
//background: rgba(0, 0, 0, 0.5); //background: rgba(0, 0, 0, 0.5);
//.el-tooltip__popper[x-placement^=top] .popper__arrow { //.el-tooltip__popper[x-placement^=top] .popper__arrow {
// border-top-color:rgba(0, 0, 0, 0.5); // border-top-color:rgba(0, 0, 0, 0.5);
......
...@@ -106,6 +106,14 @@ ...@@ -106,6 +106,14 @@
color: #d8d8d8; color: #d8d8d8;
} }
.el-submenu.is-opened {
& > .el-submenu__title {
.el-submenu__icon-arrow {
transform: translateY(-50%) rotateZ(180deg);
}
}
}
.el-menu { .el-menu {
border: none; border: none;
height: 100%; height: 100%;
...@@ -133,10 +141,10 @@ ...@@ -133,10 +141,10 @@
.el-submenu__title { .el-submenu__title {
display: flex; display: flex;
align-items: center; align-items: center;
height: 40px; height: 38px;
line-height: 40px; line-height: 38px;
border: 1px solid #141b2f; border: 1px solid #141b2f;
border-radius: 10px; border-radius: 4px;
color: #fff; color: #fff;
margin-bottom: 8px; margin-bottom: 8px;
padding: 0 8px !important; padding: 0 8px !important;
...@@ -173,7 +181,7 @@ ...@@ -173,7 +181,7 @@
// menu hover // menu hover
.submenu-title-noDropdown, .submenu-title-noDropdown,
.el-submenu__title { .el-submenu__title {
border-radius: 10px; border-radius: 4px;
color: #fff !important; color: #fff !important;
&:hover { &:hover {
background-color: #1e2c4c !important; background-color: #1e2c4c !important;
...@@ -186,7 +194,7 @@ ...@@ -186,7 +194,7 @@
.sidebar-container .nest-menu .el-submenu > .el-submenu__title:hover { .sidebar-container .nest-menu .el-submenu > .el-submenu__title:hover {
background-color: #1e2c4c !important; background-color: #1e2c4c !important;
color: #fff !important; color: #fff !important;
border-radius: 10px; border-radius: 4px;
border: 1px solid #2b3f69; border: 1px solid #2b3f69;
} }
...@@ -426,8 +434,8 @@ ...@@ -426,8 +434,8 @@
} }
} }
.side-retract { .side-retract {
height: 40px; height: 38px;
line-height: 48px; line-height: 38px;
border: 1px solid #141b2f; border: 1px solid #141b2f;
margin-bottom: 6px; margin-bottom: 6px;
padding: 0 6px !important; padding: 0 6px !important;
...@@ -435,7 +443,7 @@ ...@@ -435,7 +443,7 @@
cursor: pointer; cursor: pointer;
&:hover { &:hover {
background-color: #1e2c4c !important; background-color: #1e2c4c !important;
border-radius: 10px; border-radius: 4px;
border: 1px solid #2b3f69; border: 1px solid #2b3f69;
} }
.svg-icon { .svg-icon {
......
...@@ -178,11 +178,10 @@ export default { ...@@ -178,11 +178,10 @@ export default {
.avatar-wrapper { .avatar-wrapper {
font-size: 12px; font-size: 12px;
color: #232323; color: #232323;
line-height: 20px;
cursor: pointer; cursor: pointer;
.pic-avatar{ .pic-avatar{
width: 20px; width: 32px;
height: 20px; height: 32px;
border-radius: 50%; border-radius: 50%;
margin-right: 4px; margin-right: 4px;
overflow: hidden; overflow: hidden;
...@@ -190,9 +189,9 @@ export default { ...@@ -190,9 +189,9 @@ export default {
.user-avatar { .user-avatar {
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
width: 24px; width: 32px;
height: 24px; height: 32px;
line-height: 24px; line-height: 32px;
text-align: center; text-align: center;
background: #E3EEF9; background: #E3EEF9;
color: #0081FF; color: #0081FF;
......
import Vue from 'vue'; import Vue from 'vue';
import VCA from '@vue/composition-api'; //composition APi import VCA from '@vue/composition-api'; //composition APi
import mitt from "mitt";
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import Element from 'element-ui'; import Element from 'element-ui';
...@@ -60,6 +62,7 @@ Vue.prototype.selectDictLabel = selectDictLabel; ...@@ -60,6 +62,7 @@ Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.selectDictLabels = selectDictLabels; Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download; Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree; Vue.prototype.handleTree = handleTree;
Vue.prototype.$mitt = mitt();
// 全局组件挂载 // 全局组件挂载
Vue.component('DictTag', DictTag); Vue.component('DictTag', DictTag);
......
...@@ -4,12 +4,17 @@ ...@@ -4,12 +4,17 @@
* 模块模板 * 模块模板
*/ */
export const subfieldModuleTemplate = { export const subfieldModuleTemplate = {
defaultSubfieldModuleName: "分栏名称", defaultSubfieldModuleName: "",
subfieldModuleName: "", subfieldModuleName: "",
subfieldModuleNameRules: { subfieldModuleNameRules: {
required: true, trigger: ["blur", "change"],
message: "请输入分栏名称", validator: (rule, value, callback) => {
trigger: "change" alert(1);
if (!value) {
return callback(new Error("请输入分栏名称"));
}
callback();
}
}, },
subfieldModulePlaceholder: "请输入分栏标题", subfieldModulePlaceholder: "请输入分栏标题",
edit: false, edit: false,
...@@ -22,6 +27,8 @@ export const defaultComOptions = [ ...@@ -22,6 +27,8 @@ export const defaultComOptions = [
comType: "el-input", comType: "el-input",
// 组件展示图标 // 组件展示图标
comShowIcon: require("@/assets/images/consultingAgencyManagement/customForm/icon_single_line_text@2x.png"), comShowIcon: require("@/assets/images/consultingAgencyManagement/customForm/icon_single_line_text@2x.png"),
// 验证通过
checkedAllow: false,
// 表单属性 // 表单属性
formAttribute: { formAttribute: {
// 验证规则 // 验证规则
...@@ -32,6 +39,8 @@ export const defaultComOptions = [ ...@@ -32,6 +39,8 @@ export const defaultComOptions = [
fieldName: "", fieldName: "",
// 展示label // 展示label
label: "单行文本", label: "单行文本",
// 组件宽度
width: 100
}, },
// 组件属性 // 组件属性
componentAttribute: { componentAttribute: {
......
...@@ -677,7 +677,7 @@ export function createAreaSelect(node, tree, idkey) { ...@@ -677,7 +677,7 @@ export function createAreaSelect(node, tree, idkey) {
// 没有children 已经是最底层 看parent // 没有children 已经是最底层 看parent
const parentNode = findParentNode(tree, node, idkey); const parentNode = findParentNode(tree, node, idkey);
console.log(parentNode,"没有children"); console.log(parentNode, "没有children");
// const _temp = nodeList.map(item => { // const _temp = nodeList.map(item => {
// // 找节点parent // // 找节点parent
...@@ -911,6 +911,18 @@ export const detailSideBar = new Map([ ...@@ -911,6 +911,18 @@ export const detailSideBar = new Map([
// 风险信息 法院公告 // 风险信息 法院公告
["courtAnnouncement", "courtNotice"], ["courtAnnouncement", "courtNotice"],
// 风险信息 开庭公告 // 风险信息 开庭公告
["openAnnouncement", "openacourtsessionNotice"] ["openAnnouncement", "openacourtsessionNotice"],
// 咨询业务往来 常合作业主单位
["owner", "cooperativeOwnerUnits"],
// 咨询业务往来 常合作施工单位
["construction", "cooperativeConstructionUnit"],
// 咨询业务往来 常合作集团
["combine", "cooperativeGroup"],
// 内部合作 咨询机构合作
["advisoryList", "consultingAgencyCooperation"],
// 内部合作 咨询机构合作
["cooperationList", "cooperationRecord"],
// 内部合作 准入情况
["approveInfo", "accessCondition"],
]) ])
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
<div class="design-main fields-main"> <div class="design-main fields-main">
<vuedraggable :list="defaultComOptions" :group="{name: 'customComGroup', pull: 'clone', put: false}" class="design-draggable-fields" <vuedraggable :list="defaultComOptions" :group="{name: 'customComGroup', pull: 'clone', put: false}" class="design-draggable-fields"
draggable=".draggable-fields-item" ghostClass="subfield-origin-dragClass" :clone="targetComClone" :sort="false" draggable=".draggable-fields-item" ghostClass="subfield-origin-dragClass" :clone="targetComClone" :sort="false"
:disabled="!subfieldModuleList.length"> :disabled="!subfieldModuleForm.subfieldModuleList.length" :move="onMove">
<transition-group name="fade" tag="div" class="draggable-fields-list"> <transition-group name="fade" tag="div" class="draggable-fields-list">
<div class="draggable-fields-item" :class="{'has-no-subfield-module' : !subfieldModuleList.length}" <div class="draggable-fields-item" :class="{'has-no-subfield-module' : !subfieldModuleForm.subfieldModuleList.length}"
v-for="(item,index) of defaultComOptions" :key="index" @click="fieldsItemClick"> v-for="(item,index) of defaultComOptions" :key="index" @click="fieldsItemClick">
<img :src="item.comShowIcon" alt=""> <img :src="item.comShowIcon" alt="">
<span>{{item.formAttribute.label}}</span> <span>{{item.formAttribute.label}}</span>
...@@ -22,21 +22,20 @@ ...@@ -22,21 +22,20 @@
<div class="custom-form-design-options"> <div class="custom-form-design-options">
<div class="design-header options-header">表单配置</div> <div class="design-header options-header">表单配置</div>
<div class="design-main options-main"> <div class="design-main options-main">
<el-form class="custom-design-el-form" ref="customDesignFormRef" :model="{}" :rules="{}" @submit.native.prevent> <el-form class="custom-design-el-form" ref="customDesignFormRef" :model="subfieldModuleForm" @submit.native.prevent :show-message="false">
<!-- 最外层dragg容器 拖动模块module .subfield-module-dragg-target-icon --> <!-- 最外层dragg容器 拖动模块module .subfield-module-dragg-target-icon -->
<vuedraggable :list="subfieldModuleList" group="customSubfieldmodule" class="subfield-module-container" <vuedraggable :list="subfieldModuleForm.subfieldModuleList" group="customSubfieldmodule" class="subfield-module-container"
draggable=".subfield-module-item-container" handle=".subfield-module-dragg-target-icon" :animation="340"> draggable=".subfield-module-item-container" handle=".subfield-module-dragg-target-icon" :animation="340" :move="onMove">
<!-- 添加的分栏模块以及chidren模块 --> <!-- 添加的分栏模块以及chidren模块 -->
<transition-group name="fade" tag="div" class="subfield-module-list"> <transition-group name="fade" tag="div" class="subfield-module-list">
<!-- <div class="subfield-module-draggable-list" v-for="(item,index) of subfieldModuleList" :key="item.uid"> --> <vuedraggable v-for="(item,index) of subfieldModuleForm.subfieldModuleList" :key="item.uid" draggable=".subfield-item-container"
<vuedraggable v-for="(item,index) of subfieldModuleList" :key="item.uid" draggable=".subfield-item-container"
handle=".subfield-module-item-dragg-target-icon" tag="subfield-module" :list="item.children" group="customComGroup" handle=".subfield-module-item-dragg-target-icon" tag="subfield-module" :list="item.children" group="customComGroup"
:component-data="createComponentData(item)" :animation="340" ghostClass="subfield-item-dragClass" :sort="true" @change="dataChange"> :component-data="createComponentData(item,index)" :animation="340" :move="onMove" ghostClass="subfield-item-dragClass" :sort="true"
@change="dataChange">
<subfield-item v-for="(child,index) of item.children" :key="child.uid" :activeUid="activeUid" :parentUid="item.uid" <subfield-item v-for="(child,index) of item.children" :key="child.uid" :activeUid="activeUid" :parentUid="item.uid"
:childModuleInfo="child" @removeModuleItem="removeModuleItem" @activeSubfieldItem="activeSubfieldItem"></subfield-item> :childModuleInfo="child" @removeModuleItem="removeModuleItem" @activeSubfieldItem="activeSubfieldItem"></subfield-item>
</vuedraggable> </vuedraggable>
<!-- </div> -->
</transition-group> </transition-group>
</vuedraggable> </vuedraggable>
<!-- 添加分栏 --> <!-- 添加分栏 -->
...@@ -51,17 +50,24 @@ ...@@ -51,17 +50,24 @@
<div class="custom-form-design-field-options"> <div class="custom-form-design-field-options">
<div class="design-header field-options-header">字段设置</div> <div class="design-header field-options-header">字段设置</div>
<div class="design-main field-options-main"> <div class="design-main field-options-main">
<set-field-option :activeFieldData="activeItemData"></set-field-option> <set-field-option v-if="showSetOption" :activeFieldData="activeItemData" :activeUid="activeUid" :parentUid="activeModuleId"
ref="setFieldOptionRef" @cancelSetOptions="cancelSetOptions" @setOptionsFinish="setOptionsFinish"></set-field-option>
</div> </div>
</div> </div>
</div> </div>
<!-- 底部 -->
<div class="custom-form-design-footer">
<el-button type="primary" @click="saveOptions">保存设置</el-button>
<el-button @click="cancelCreate">取消</el-button>
</div>
<!-- 删除分栏提示弹窗 --> <!-- 删除分栏提示弹窗 -->
<el-dialog title="提示" :visible.sync="removeSubFiledModuleDialog" width="480px" :close-on-click-modal="false" class="subfield-module-dialog-outer" <el-dialog title="提示" :visible.sync="removeSubFiledModuleDialog" width="480px" :close-on-click-modal="false" class="subfield-module-dialog-outer"
:custom-class="'subfield-module-dialog-inner'" @close="removeDialogClose"> :custom-class="'subfield-module-dialog-inner'" @close="removeDialogClose">
<div class="subfield-module-dialog-content"> <div class="subfield-module-dialog-content">
<img src="@/assets/images/consultingAgencyManagement/customForm/icon_tips@2x.png" alt=""> <img src="@/assets/images/consultingAgencyManagement/customForm/icon_tips@2x.png" alt="">
<span>{{removeSubfieldModule.subfieldModuleName ? `确认删除分栏“${removeSubfieldModule.subfieldModuleName}”吗?` : "确认删除该分栏吗?"}}</span> <span>{{`确认删除“${removeSubfieldModule.subfieldModuleName ? removeSubfieldModule.subfieldModuleName : removeSubfieldModule.defaultSubfieldModuleName}”吗?`}}</span>
</div> </div>
<div class="subfield-module-dialog-footer"> <div class="subfield-module-dialog-footer">
<el-button size="default" @click="removeSubFiledModuleDialog = false">取消</el-button> <el-button size="default" @click="removeSubFiledModuleDialog = false">取消</el-button>
...@@ -75,6 +81,7 @@ ...@@ -75,6 +81,7 @@
import { defaultComOptions, subfieldModuleTemplate } from "@/utils/generator/custom-design-options"; import { defaultComOptions, subfieldModuleTemplate } from "@/utils/generator/custom-design-options";
import SubfieldItem from "@/views/consultingOrgManagement/components/CustomForm/components/SubfieldItem"; import SubfieldItem from "@/views/consultingOrgManagement/components/CustomForm/components/SubfieldItem";
import SetFieldOption from "@/views/consultingOrgManagement/components/CustomForm/components/SetFieldOption"; import SetFieldOption from "@/views/consultingOrgManagement/components/CustomForm/components/SetFieldOption";
import { elementMessageSingleton } from "@/utils";
import vuedraggable from "vuedraggable"; import vuedraggable from "vuedraggable";
import { v4 } from 'uuid'; import { v4 } from 'uuid';
export default { export default {
...@@ -88,8 +95,11 @@ export default { ...@@ -88,8 +95,11 @@ export default {
return { return {
// 字段组件 // 字段组件
defaultComOptions, defaultComOptions,
// 中间编辑的模块 // 验证表单
subfieldModuleList: [], subfieldModuleForm: {
// 中间编辑的模块
subfieldModuleList: [],
},
// 删除分栏提示 // 删除分栏提示
removeSubFiledModuleDialog: false, removeSubFiledModuleDialog: false,
// 要删除的分栏信息 // 要删除的分栏信息
...@@ -98,33 +108,89 @@ export default { ...@@ -98,33 +108,89 @@ export default {
activeUid: "", activeUid: "",
// 编辑的组件数据 // 编辑的组件数据
activeItemData: {}, activeItemData: {},
// 编辑的组件原始数据
activeItemDataOrigin: {},
// active moduleId 当前命中的模块id // active moduleId 当前命中的模块id
activeModuleId: "" activeModuleId: "",
// 分栏计数
moduleCount: 0,
}; };
}, },
watch: {
subfieldModuleForm: {
handler(newValue) {
console.log(newValue);
},
deep: true
}
},
//可访问data属性 //可访问data属性
created() { created() {
this.initModule();
}, },
//计算集 //计算集
computed: { computed: {
showSetOption() {
return this.activeUid ? true : false;
}
}, },
//方法集 //方法集
methods: { methods: {
saveOptions() {
},
cancelCreate() {
},
generateRandomLowerCaseLetter() {
const alphabet = 'abcdefghijklmnopqrstuvwxyz';
const randomIndex = Math.floor(Math.random() * alphabet.length);
return alphabet[randomIndex];
},
initModule() {
// 模块初始化
this.addSubfieldModule();
const component = JSON.parse(JSON.stringify(defaultComOptions[0]));
component.uid = v4();
component.formAttribute.fieldName = this.generateRandomLowerCaseLetter() + component.uid.split("-").join("");
this.activeItemData = component;
this.activeItemDataOrigin = JSON.parse(JSON.stringify(this.activeItemData));
this.activeModuleId = this.subfieldModuleForm.subfieldModuleList[0].uid;
this.activeUid = component.uid;
this.subfieldModuleForm.subfieldModuleList[0].children.push(component);
},
onMove(e, originalEvent) {
try {
if (this.activeUid && !this.activeItemData?.checkedAllow) {
elementMessageSingleton("warning", "请先保存字段设置");
return false;
}
return true;
} catch (error) {
console.log(error);
}
},
resetCurrent() {
this.activeUid = "";
this.activeModuleId = "";
this.activeItemData = {};
this.activeItemDataOrigin = {};
},
// 克隆目标组件 // 克隆目标组件
targetComClone(v) { targetComClone(v) {
console.log("clone", v); console.log("clone", v);
const cloneTarget = JSON.parse(JSON.stringify(v)); const cloneTarget = JSON.parse(JSON.stringify(v));
cloneTarget.uid = v4(); cloneTarget.uid = v4();
cloneTarget.formAttribute.fieldName = this.generateRandomLowerCaseLetter() + cloneTarget.uid.split("-").join("");
return cloneTarget; return cloneTarget;
}, },
// 字段组件点击事件 // 字段组件点击事件
fieldsItemClick() { fieldsItemClick() {
if (!this.subfieldModuleList?.length) { if (!this.subfieldModuleForm.subfieldModuleList?.length) {
this.$message.warning("请先添加分栏"); this.$message.warning("请先添加分栏");
} }
}, },
// 模块内部变化处理
dataChange({ added, removed, moved }) { dataChange({ added, removed, moved }) {
if (added) { if (added) {
this.currentActiveByItemId(added.element); this.currentActiveByItemId(added.element);
...@@ -133,41 +199,91 @@ export default { ...@@ -133,41 +199,91 @@ export default {
this.currentActiveByItemId(moved.element); this.currentActiveByItemId(moved.element);
} }
}, },
// 取消当前焦点设置
cancelSetOptions() {
this.activeItemData = JSON.parse(JSON.stringify(this.activeItemDataOrigin));
},
// 设置表单完成
setOptionsFinish(current, parentUid) {
const _temp = JSON.parse(JSON.stringify(current));
_temp.checkedAllow = true;
const index = this.subfieldModuleForm.subfieldModuleList.findIndex(item => item.uid == parentUid);
if (index > -1) {
const childIndex = this.subfieldModuleForm.subfieldModuleList[index].children.findIndex(child => child.uid == current.uid);
if (childIndex > -1) {
this.subfieldModuleForm.subfieldModuleList[index].children.splice(childIndex, 1, _temp);
this.resetCurrent();
}
}
},
// 命中变化的表单元素 // 命中变化的表单元素
currentActiveByItemId(current) { currentActiveByItemId(current) {
const _temp = JSON.parse(JSON.stringify(current));
_temp.checkedAllow = false;
this.activeUid = current.uid; this.activeUid = current.uid;
this.activeItemData = current; this.activeItemData = _temp;
this.activeModuleId = this.subfieldModuleList.find(item => item?.children?.findIndex(child => child.uid == current.uid) > -1).uid; this.activeItemDataOrigin = _temp;
console.log(this.activeModuleId); this.activeModuleId = this.subfieldModuleForm.subfieldModuleList.find(item => item?.children?.findIndex(child => child.uid == current.uid) > -1).uid;
console.log(this.activeModuleId, "模块uid");
console.log(this.activeUid, "表单元素uid");
}, },
// 添加分栏 // 添加分栏
addSubfieldModule() { addSubfieldModule() {
const _temp = JSON.parse(JSON.stringify(subfieldModuleTemplate)); const _temp = JSON.parse(JSON.stringify(subfieldModuleTemplate));
_temp.uid = v4(); _temp.uid = v4();
this.subfieldModuleList.push(_temp); this.moduleCount += 1;
_temp.defaultSubfieldModuleName = `分栏${this.moduleCount}`;
this.subfieldModuleForm.subfieldModuleList.push(_temp);
}, },
createComponentData(item) { // 传递模块事件
createComponentData(item, index) {
return { return {
props: { props: {
moduleInfo: item, moduleInfo: item,
moduleIndex: index
}, },
on: { on: {
"removeModule": this.removeModule, "removeModule": this.removeModule,
"editOK": this.editOK "editFinish": this.editFinish,
"editModule": this.editModule
} }
}; };
}, },
editOK(module) { // 编辑模块 更新title
editModule(module) {
const _temp = JSON.parse(JSON.stringify(module));
const flag = this.onMove();
if (!flag) return;
const index = this.subfieldModuleForm.subfieldModuleList.findIndex(item => item.uid == _temp.uid);
if (index > -1) {
_temp.edit = true;
this.subfieldModuleForm.subfieldModuleList.splice(index, 1, _temp);
}
}, },
// 编辑模块名称结束
editFinish(module) {
const index = this.subfieldModuleForm.subfieldModuleList.findIndex(item => item.uid == module.uid);
if (index > -1) {
this.subfieldModuleForm.subfieldModuleList.splice(index, 1, { ...module, ...this.subfieldModuleForm.subfieldModuleList[index].children });
}
},
// 命中的模块
activeSubfieldItem(itemModule, parentUid) { activeSubfieldItem(itemModule, parentUid) {
this.activeUid = itemModule.uid; const flag = this.onMove();
if (!flag) return;
const _temp = JSON.parse(JSON.stringify(itemModule));
_temp.checkedAllow = false;
this.activeUid = _temp.uid;
this.activeModuleId = parentUid; this.activeModuleId = parentUid;
this.activeItemData = itemModule; this.activeItemData = _temp;
this.activeItemDataOrigin = _temp;
}, },
// 删除模块表单输入框
removeModuleItem(itemModule, parentUid) { removeModuleItem(itemModule, parentUid) {
if (itemModule.uid == this.activeUid) this.activeUid = ""; if (itemModule.uid == this.activeUid) {
const parentModule = this.subfieldModuleList.find(item => item.uid == parentUid); this.resetCurrent();
}
const parentModule = this.subfieldModuleForm.subfieldModuleList.find(item => item.uid == parentUid);
if (parentModule) { if (parentModule) {
const index = parentModule?.children?.findIndex(item => item.uid == itemModule.uid); const index = parentModule?.children?.findIndex(item => item.uid == itemModule.uid);
if (index > -1) { if (index > -1) {
...@@ -189,13 +305,12 @@ export default { ...@@ -189,13 +305,12 @@ export default {
if (this.removeSubfieldModule?.children?.length) { if (this.removeSubfieldModule?.children?.length) {
const index = this.removeSubfieldModule.children.findIndex(item => item.uid == this.activeUid); const index = this.removeSubfieldModule.children.findIndex(item => item.uid == this.activeUid);
if (index > -1) { if (index > -1) {
this.activeUid = ""; this.resetCurrent();
this.activeItemData = {};
} }
} }
const index = this.subfieldModuleList.findIndex(item => item.uid == this.removeSubfieldModule.uid); const index = this.subfieldModuleForm.subfieldModuleList.findIndex(item => item.uid == this.removeSubfieldModule.uid);
if (index > -1) { if (index > -1) {
this.subfieldModuleList.splice(index, 1); this.subfieldModuleForm.subfieldModuleList.splice(index, 1);
} }
this.removeSubFiledModuleDialog = false; this.removeSubFiledModuleDialog = false;
}, },
...@@ -212,12 +327,13 @@ export default { ...@@ -212,12 +327,13 @@ export default {
.custom-form-design-inner { .custom-form-design-inner {
width: 100%; width: 100%;
height: 100%; height: calc(100% - 48px);
display: flex; display: flex;
min-width: 1140px; min-width: 1140px;
.subfield-origin-dragClass, .subfield-origin-dragClass,
.subfield-item-dragClass { .subfield-item-dragClass {
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
background: rgba(0, 129, 255, 0.3); background: rgba(0, 129, 255, 0.3);
...@@ -356,7 +472,7 @@ export default { ...@@ -356,7 +472,7 @@ export default {
border-left: none; border-left: none;
.custom-design-el-form { .custom-design-el-form {
width: 100%; width: 100%;
height: 100%; min-height: 100%;
/* .subfield-module-draggable-list { /* .subfield-module-draggable-list {
margin-bottom: 12px; margin-bottom: 12px;
...@@ -378,6 +494,28 @@ export default { ...@@ -378,6 +494,28 @@ export default {
.field-options-main { .field-options-main {
border-left: none; border-left: none;
} }
.field-options-main {
padding: 0px;
}
}
}
.custom-form-design-footer {
height: 32px;
margin-top: 16px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
button {
height: 32px;
padding: 0px 16px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
} }
} }
......
<template> <template>
<div class="set-field-option-container"> <div class="set-field-option-container">
<el-form class="set-field-option-form" ref="customDesignFormRef" :model="comActiveFieldData">
<!-- 字段名称 -->
<el-form-item label="字段名称" class="set-field-option-item" prop="formAttribute.fieldName" v-if="comActiveFieldData.formAttribute"
:rules="setFieldOptionRules.fieldName">
<el-input v-model="comActiveFieldData.formAttribute.fieldName" placeholder="请输入字段名称" clearable></el-input>
</el-form-item>
<!-- label展示名称 -->
<el-form-item label="字段label" class="set-field-option-item" prop="formAttribute.label" v-if="comActiveFieldData.formAttribute">
<el-input v-model="comActiveFieldData.formAttribute.label" placeholder="请输入字段label" clearable></el-input>
</el-form-item>
<!-- placeholder文字 -->
<el-form-item label="提示文字" class="set-field-option-item" prop="componentAttribute.placeholder" v-if="comActiveFieldData.componentAttribute">
<el-input v-model="comActiveFieldData.componentAttribute.placeholder" placeholder="请输入提示文字" clearable></el-input>
</el-form-item>
<!-- 默认值 -->
<el-form-item label="默认值" class="set-field-option-item" prop="componentAttribute.value" v-if="comActiveFieldData.componentAttribute">
<el-input v-model="comActiveFieldData.componentAttribute.value" placeholder="请输入默认值" clearable></el-input>
</el-form-item>
<!-- 表单样式 -->
<div class="set-field-option-styles-item" v-if="comActiveFieldData.formAttribute">
<span class="set-field-option-label">字段宽度</span>
<div class="set-field-option-block">
<el-radio-group v-model="comActiveFieldData.formAttribute.width">
<el-radio-button :label="100">100%</el-radio-button>
<el-radio-button :label="50">50%</el-radio-button>
<el-radio-button :label="33">33%</el-radio-button>
<el-radio-button :label="25">25%</el-radio-button>
</el-radio-group>
</div>
</div>
<div class="set-field-option-styles-item" v-if="comActiveFieldData.formAttribute">
<span class="set-field-option-label">字段控制</span>
<div class="set-field-option-block">
<el-radio-group v-model="comActiveFieldData.formAttribute.required">
<el-radio :label="false">选填</el-radio>
<el-radio :label="true">必填</el-radio>
</el-radio-group>
</div>
</div>
</el-form>
<!-- 确定编辑 -->
<div class="set-field-option-footer">
<div class="set-field-option-inner" v-if="this.comActiveFieldData && this.comActiveFieldData.uid">
<el-button @click="cancelSet">取消</el-button>
<el-button type="primary" @click="formCheck">确定</el-button>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "setFieldOption", name: "setFieldOption",
props: { props: {
activeFieldData: Object // 当前命中的表单组件数据
activeFieldData: {
type: Object,
default: () => ({
formAttribute: {},
componentAttribute: {},
componentOptions: {}
})
},
parentUid: String,
activeUid: String
}, },
watch: { watch: {
activeFieldData: { "activeFieldData.uid": {
handler(newValue) { handler(newValue) {
this.comActiveFieldData = newValue; this.$refs["customDesignFormRef"].clearValidate();
} }
},
activeFieldData: {
handler(newValue) {
// 通过保存更新源数据按钮
this.comActiveFieldData = JSON.parse(JSON.stringify(newValue));
},
deep: true
},
comActiveFieldData: {
handler(newValue) {
// 通过保存更新源数据按钮
this.$mitt.emit("fieldOptionChange", newValue);
},
deep: true
} }
}, },
data() { data() {
const fieldNameValidor = (rule, value, callback) => {
const reg = /^[a-zA-Z0-9_]+$/;
const numReg = /^[0-9]/;
if (!value) {
return callback(new Error("请输入字段名称"));
}
if (numReg.test(value)) {
return callback(new Error("字段名称不能以数字开头"));
}
if (!reg.test(value)) {
return callback(new Error("字段名称只能为数字、字母(大小写)、下划线组成"));
}
callback();
};
return { return {
comActiveFieldData: this.activeFieldData // 通过保存更新源数据按钮
comActiveFieldData: JSON.parse(JSON.stringify(this.activeFieldData)),
setFieldOptionRules: {
fieldName: [{ required: true, trigger: ["blur", "change"], validator: fieldNameValidor }]
}
}; };
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.$mitt.on("subfieldItemChange", this.setOptions);
},
beforeDestroy() {
this.$mitt.off("subfieldItemChange");
}, },
//计算集 //计算集
computed: { computed: {
...@@ -31,7 +123,22 @@ export default { ...@@ -31,7 +123,22 @@ export default {
}, },
//方法集 //方法集
methods: { methods: {
setOptions(value) {
this.comActiveFieldData = value;
},
cancelSet() {
this.$emit("cancelSetOptions");
},
async formCheck() {
try {
const result = await this.$refs["customDesignFormRef"].validate();
if (result) {
this.$emit("setOptionsFinish", this.comActiveFieldData, this.parentUid);
}
} catch (error) {
console.log(error);
}
}
}, },
} }
</script> </script>
...@@ -39,5 +146,114 @@ export default { ...@@ -39,5 +146,114 @@ export default {
.set-field-option-container { .set-field-option-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
.set-field-option-form {
width: 100%;
height: calc(100% - 56px);
/* height: 100%; */
padding: 16px;
overflow-y: auto;
overflow-x: hidden;
box-sizing: border-box;
}
.set-field-option-footer {
height: 56px;
display: flex;
justify-content: flex-end;
align-items: center;
border-top: 1px solid #eeeeee;
box-sizing: border-box;
padding: 0px 12px;
.set-field-option-inner {
button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 60px;
border-radius: 4px;
}
}
}
::v-deep .set-field-option-item {
display: flex;
flex-direction: column;
margin-bottom: 20px;
.el-form-item__label {
color: rgba(35, 35, 35, 0.8);
font-size: 14px;
font-weight: 400;
line-height: 22px;
float: unset;
text-align: left;
margin-bottom: 8px;
}
.el-form-item__content {
.el-input {
.el-input__inner {
height: 32px;
line-height: 32px;
border-radius: 2px;
color: #232323;
}
}
}
}
::v-deep .set-field-option-styles-item {
display: flex;
flex-direction: column;
border-top: 1px solid #eeeeee;
padding-top: 20px;
box-sizing: border-box;
.set-field-option-label {
font-size: 14px;
font-weight: 400;
color: rgba(35, 35, 35, 0.8);
line-height: 22px;
margin-bottom: 8px;
}
.set-field-option-block {
display: flex;
align-items: center;
.el-radio-group {
display: flex;
align-items: center;
.el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #0081ff;
border-color: #0081ff;
&:hover {
color: #fff;
}
}
.el-radio__input.is-checked .el-radio__inner {
background: #0081ff;
border-color: #0081ff;
}
.el-radio-button__inner {
width: 70px;
height: 38px;
line-height: 38px;
padding: 0px;
display: flex;
justify-content: center;
box-sizing: border-box;
&:hover {
color: #0081ff;
}
}
}
}
}
} }
</style> </style>
<template> <template>
<div class="subfield-item-container" :class="{'is-active-subfield-item' : activeUid == comChildModuleInfo.uid}" @click="activeSubfieldItem"> <div class="subfield-item-container" :class="{'is-active-subfield-item' : activeUid == comChildModuleInfo.uid}" :style="styles"
@click="activeSubfieldItem">
<img src="@/assets/images/consultingAgencyManagement/customForm/icon_drag@2x.png" alt="" class="subfield-module-item-dragg-target-icon"> <img src="@/assets/images/consultingAgencyManagement/customForm/icon_drag@2x.png" alt="" class="subfield-module-item-dragg-target-icon">
<el-form-item class="subfield-module-form-item" :label="comChildModuleInfo.formAttribute.label"> <el-form-item class="subfield-module-form-item" :class="{'is-required' : comChildModuleInfo.formAttribute.required}"
<component :is="comChildModuleInfo.comType" v-model="comChildModuleInfo.componentAttribute.value" :label="comChildModuleInfo.formAttribute.label">
:placeholder="comChildModuleInfo.componentAttribute.placeholder" clearable></component> <!-- 输入框类型 -->
<el-input v-model="comChildModuleInfo.componentAttribute.value" :placeholder="comChildModuleInfo.componentAttribute.placeholder" clearable
v-if="comChildModuleInfo.comType == 'el-input'"></el-input>
</el-form-item> </el-form-item>
<img src="@/assets/images/consultingAgencyManagement/customForm/icon_delete@2x.png" alt="" class="remove-subfield-item-icon" <img src="@/assets/images/consultingAgencyManagement/customForm/icon_delete@2x.png" alt="" class="remove-subfield-item-icon"
@click.stop="removeModuleItem"> @click.stop="removeModuleItem">
...@@ -20,30 +23,47 @@ export default { ...@@ -20,30 +23,47 @@ export default {
watch: { watch: {
childModuleInfo: { childModuleInfo: {
handler(newValue) { handler(newValue) {
this.comChildModuleInfo = newValue; this.comChildModuleInfo = JSON.parse(JSON.stringify(newValue));
},
deep: true
},
comChildModuleInfo: {
handler(newValue) {
this.$mitt.emit("subfieldItemChange", newValue);
}, },
deep: true deep: true
} }
}, },
data() { data() {
return { return {
comChildModuleInfo: this.childModuleInfo, comChildModuleInfo: JSON.parse(JSON.stringify(this.childModuleInfo)),
}; };
}, },
//可访问data属性 //可访问data属性
created() { created() {
this.$mitt.on("fieldOptionChange", this.setFieldOption);
},
beforeDestroy() {
this.$mitt.off("fieldOptionChange");
}, },
//计算集 //计算集
computed: { computed: {
styles() {
return {
width: this.comChildModuleInfo.formAttribute ? `${this.comChildModuleInfo.formAttribute.width}%` : "100%"
};
}
}, },
//方法集 //方法集
methods: { methods: {
setFieldOption(value) {
this.comChildModuleInfo = value;
},
removeModuleItem() { removeModuleItem() {
this.$emit("removeModuleItem", this.comChildModuleInfo, this.parentUid); this.$emit("removeModuleItem", this.comChildModuleInfo, this.parentUid);
}, },
activeSubfieldItem() { activeSubfieldItem() {
if (this.activeUid == this.comChildModuleInfo?.uid) return;
this.$emit("activeSubfieldItem", this.comChildModuleInfo, this.parentUid); this.$emit("activeSubfieldItem", this.comChildModuleInfo, this.parentUid);
} }
}, },
...@@ -59,6 +79,8 @@ export default { ...@@ -59,6 +79,8 @@ export default {
align-items: center; align-items: center;
background: #dcebff; background: #dcebff;
transition: width 0.3s linear;
&.is-active-subfield-item { &.is-active-subfield-item {
border: 1px solid #0081ff; border: 1px solid #0081ff;
} }
...@@ -77,6 +99,7 @@ export default { ...@@ -77,6 +99,7 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: rgba(35, 35, 35, 0.8); color: rgba(35, 35, 35, 0.8);
white-space: nowrap;
} }
.el-form-item__content { .el-form-item__content {
flex: 1; flex: 1;
......
...@@ -3,14 +3,15 @@ ...@@ -3,14 +3,15 @@
<div class="subfield-module-header"> <div class="subfield-module-header">
<div class="subfield-module-title"> <div class="subfield-module-title">
<img src="@/assets/images/consultingAgencyManagement/customForm/icon_drag@2x.png" alt="" class="subfield-module-dragg-target-icon"> <img src="@/assets/images/consultingAgencyManagement/customForm/icon_drag@2x.png" alt="" class="subfield-module-dragg-target-icon">
<el-form-item v-if="comModuleInfo.edit" class="subfield-module-form-item" :rules="comModuleInfo.subfieldModuleNameRules" prop=""> <el-form-item v-if="comModuleInfo.edit" class="subfield-module-form-item" :rules="comModuleInfo.subfieldModuleNameRules"
:prop="subfieldModuleComName">
<el-input v-model="comModuleInfo.subfieldModuleName" :placeholder="comModuleInfo.subfieldModulePlaceholder" clearable <el-input v-model="comModuleInfo.subfieldModuleName" :placeholder="comModuleInfo.subfieldModulePlaceholder" clearable
@keyup.enter.native.stop="editOK"></el-input> @keyup.enter.native.stop="editOk"></el-input>
</el-form-item> </el-form-item>
<span v-else>{{comModuleInfo.defaultSubfieldModuleName}}</span> <span v-else>{{comModuleInfo.defaultSubfieldModuleName}}</span>
</div> </div>
<div class="subfield-module-title-tool" v-if="comModuleInfo.edit"> <div class="subfield-module-title-tool" v-if="comModuleInfo.edit">
<img src="@/assets/images/consultingAgencyManagement/customForm/icon_verify@2x.png" alt="" class="title-tool-edit-ok" @click="editOK"> <img src="@/assets/images/consultingAgencyManagement/customForm/icon_verify@2x.png" alt="" class="title-tool-edit-ok" @click.stop="editOk">
<img src="@/assets/images/consultingAgencyManagement/customForm/icon_cancle@2x.png" alt="" class="title-tool-edit-cancel" <img src="@/assets/images/consultingAgencyManagement/customForm/icon_cancle@2x.png" alt="" class="title-tool-edit-cancel"
@click.stop="editCancel"> @click.stop="editCancel">
</div> </div>
...@@ -26,29 +27,40 @@ ...@@ -26,29 +27,40 @@
export default { export default {
name: "subfieldModule", name: "subfieldModule",
props: { props: {
moduleInfo: Object moduleInfo: Object,
moduleIndex: Number
}, },
watch: { watch: {
moduleInfo: { moduleInfo: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
this.comModuleInfo = newValue; // 深克隆 避免未保存修改源数据 通过 订阅 editFinish事件处理更改源数据
this.comModuleInfo = JSON.parse(JSON.stringify(newValue));
}, },
deep: true deep: true
}, },
moduleIndex: {
handler(newValue) {
this.comModuleIndex = newValue;
}
}
}, },
data() { data() {
return { return {
oldComModuleName: this.moduleInfo.subfieldModuleName, oldComModuleName: this.moduleInfo.subfieldModuleName,
comModuleInfo: this.moduleInfo // 深克隆 避免未保存修改源数据 通过 订阅 editFinish事件处理更改源数据
comModuleInfo: JSON.parse(JSON.stringify(this.moduleInfo)),
comModuleIndex: this.moduleIndex
}; };
}, },
//可访问data属性 //可访问data属性
created() { created() {
console.log(this.subfieldModuleComName);
}, },
//计算集 //计算集
computed: { computed: {
subfieldModuleComName() {
return `subfieldModuleList[${this.comModuleIndex}].subfieldModuleName`;
}
}, },
//方法集 //方法集
methods: { methods: {
...@@ -56,23 +68,26 @@ export default { ...@@ -56,23 +68,26 @@ export default {
this.$emit("removeModule", this.comModuleInfo); this.$emit("removeModule", this.comModuleInfo);
}, },
editModule() { editModule() {
this.comModuleInfo.edit = true; this.$emit("editModule", this.comModuleInfo);
// this.comModuleInfo.edit = true;
}, },
editCancel() { editCancel() {
this.comModuleInfo.edit = false; this.comModuleInfo.edit = false;
this.comModuleInfo.subfieldModuleName = this.oldComModuleName; this.comModuleInfo.subfieldModuleName = this.oldComModuleName;
}, },
editOK() { editOk() {
this.comModuleInfo.edit = false; this.comModuleInfo.edit = false;
this.comModuleInfo.defaultSubfieldModuleName = this.comModuleInfo.subfieldModuleName; this.comModuleInfo.defaultSubfieldModuleName = this.comModuleInfo.subfieldModuleName;
this.oldComModuleName = this.comModuleInfo.subfieldModuleName; this.oldComModuleName = this.comModuleInfo.subfieldModuleName;
this.$emit("editOk", this.comModuleInfo); this.$emit("editFinish", this.comModuleInfo);
} }
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.subfield-module-item-container { .subfield-module-item-container {
display: flex;
flex-wrap: wrap;
margin-bottom: 12px; margin-bottom: 12px;
width: 100%; width: 100%;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
...@@ -81,6 +96,7 @@ export default { ...@@ -81,6 +96,7 @@ export default {
overflow: hidden; overflow: hidden;
.subfield-module-header { .subfield-module-header {
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
......
...@@ -102,12 +102,12 @@ export default { ...@@ -102,12 +102,12 @@ export default {
.custom-form-design-container { .custom-form-design-container {
height: calc(100% - 108px); height: calc(100% - 108px);
width: 100%; width: 100%;
padding: 16px;
box-sizing: border-box; box-sizing: border-box;
.custom-form-design-outer { .custom-form-design-outer {
width: 100%; width: 100%;
height: calc(100% - 32px); height: 100%;
padding: 16px;
box-sizing: border-box; box-sizing: border-box;
} }
} }
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
<script> <script>
export default { export default {
name: "consultingAgency", name: "consultingAgency",
props: {
projectDetailInfo: Object
},
data() { data() {
return { return {
......
...@@ -93,6 +93,24 @@ ...@@ -93,6 +93,24 @@
{{row.advisoryBody.advisoryBodyName}}</div> {{row.advisoryBody.advisoryBodyName}}</div>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<!-- 项目负责人姓名 -->
<template slot="projectLeader" slot-scope="{row}">
<div v-if="row.advisoryBody && row.advisoryBodyProject.projectLeader">
{{row.advisoryBodyProject.projectLeader}}</div>
<span v-else>-</span>
</template>
<!-- 项目负责人专业 -->
<template slot="projectLeaderMajor" slot-scope="{row}">
<div v-if="row.advisoryBody && row.advisoryBodyProject.projectLeaderMajor">
{{row.advisoryBodyProject.projectLeaderMajor}}</div>
<span v-else>-</span>
</template>
<!-- 项目负责人电话 -->
<template slot="projectLeaderPhone" slot-scope="{row}">
<div v-if="row.advisoryBody && row.advisoryBodyProject.projectLeaderPhone">
{{row.advisoryBodyProject.projectLeaderPhone}}</div>
<span v-else>-</span>
</template>
</table-list-com> </table-list-com>
</div> </div>
...@@ -154,13 +172,13 @@ export default { ...@@ -154,13 +172,13 @@ export default {
{ label: '省市', prop: 'provinceName', width: "100px", uid: v4() }, { label: '省市', prop: 'provinceName', width: "100px", uid: v4() },
{ label: '项目承接类型', prop: 'isinvestproject', width: "100px", uid: v4() }, { label: '项目承接类型', prop: 'isinvestproject', width: "100px", uid: v4() },
{ label: '工程基础大类', prop: 'projectType1', minWidth: "100px", uid: v4() }, { label: '工程基础大类', prop: 'projectType1', minWidth: "100px", uid: v4() },
{ label: '工程类别明细', prop: 'projectType', minWidth: "100px", uid: v4() }, { label: '工程类别明细', prop: 'projectType2', minWidth: "100px", uid: v4() },
{ label: '项目负责人姓名', prop: 'projectLeader', width: "110px", uid: v4() }, { label: '项目负责人姓名', prop: 'projectLeader', width: "110px", uid: v4(), slot: true },
{ label: '项目负责人专业', prop: 'projectLeaderMajor', width: "110px", uid: v4() }, { label: '项目负责人专业', prop: 'projectLeaderMajor', width: "110px", uid: v4(), slot: true },
{ label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "135px", uid: v4() }, { label: '项目负责人联系电话', prop: 'projectLeaderPhone', width: "135px", uid: v4(), slot: true },
{ label: '合同金额(元)', prop: 'contractOrigValue', width: "110px", align: "right", uid: v4() }, { label: '合同金额(元)', prop: 'contractOrigValue', width: "110px", align: "right", uid: v4() },
{ label: '业主单位', prop: 'ownerName', slot: true, uid: v4(), width: "185px", showOverflowTooltip: true }, // { label: '业主单位', prop: 'ownerName', slot: true, uid: v4(), width: "185px", showOverflowTooltip: true },
{ label: '项目承接单位', prop: 'contractOrgName', width: "196px", slot: true, uid: v4() }, // { label: '项目承接单位', prop: 'contractOrgName', width: "196px", slot: true, uid: v4() },
{ label: '咨询机构名称', prop: 'advisoryBodyName', width: "172px", slot: true, uid: v4() }, { label: '咨询机构名称', prop: 'advisoryBodyName', width: "172px", slot: true, uid: v4() },
{ label: '创建时间', prop: 'contractSignDate', width: "172px", uid: v4() }, { label: '创建时间', prop: 'contractSignDate', width: "172px", uid: v4() },
], ],
......
...@@ -78,9 +78,8 @@ ...@@ -78,9 +78,8 @@
</template> </template>
<div v-else class="flex-box"> <div v-else class="flex-box">
<span class="flex-box ability-total" v-if="isTotal">共有{{ total }}条</span> <span class="flex-box ability-total" v-if="isTotal">共有{{ total }}条</span>
<span class="flex-box ability-excel" v-hasPermi="['combine:info:export:win:bid','combine:info:export:bid']" <span class="flex-box ability-excel" v-hasPermi="['combine:info:export:win:bid','combine:info:export:bid']" @click="clickEXCEL"
v-if="isExcel && title ==='集团业绩'|| title ==='集团招标' " @click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span> v-if="isExcel"><img src="@/assets/images/ability_excel.png">导出EXCEL</span>
<span class="flex-box ability-excel" v-else-if="isExcel" @click="clickEXCEL"><img src="@/assets/images/ability_excel.png">导出EXCEL</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -183,7 +182,7 @@ export default { ...@@ -183,7 +182,7 @@ export default {
async getPlaceholder() { async getPlaceholder() {
try { try {
await this.$nextTick(); await this.$nextTick();
const doms = document.querySelectorAll("[class*='select-adaptive-']"); const doms = this.$el.querySelectorAll("[class*='select-adaptive-']");
if (doms?.length) { if (doms?.length) {
doms.forEach(dom => { doms.forEach(dom => {
const realStyles = window.getComputedStyle(dom); const realStyles = window.getComputedStyle(dom);
...@@ -230,7 +229,7 @@ export default { ...@@ -230,7 +229,7 @@ export default {
async multipleAdaptiveHandle(uid) { async multipleAdaptiveHandle(uid) {
try { try {
await this.$nextTick(); await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`); const dom = this.$el.querySelector(`.select-adaptive-${uid}`);
const iptChild = dom.querySelector(".el-input__inner"); const iptChild = dom.querySelector(".el-input__inner");
if (dom) { if (dom) {
const textContainer = document.createElement("span"); const textContainer = document.createElement("span");
...@@ -277,7 +276,7 @@ export default { ...@@ -277,7 +276,7 @@ export default {
async iptAdaptiveHandle(uid) { async iptAdaptiveHandle(uid) {
try { try {
await this.$nextTick(); await this.$nextTick();
const dom = document.querySelector(`.select-adaptive-${uid}`); const dom = this.$el.querySelector(`.select-adaptive-${uid}`);
const realStyles = window.getComputedStyle(dom); const realStyles = window.getComputedStyle(dom);
if (dom) { if (dom) {
const iptChild = dom.querySelector(".el-input__inner"); const iptChild = dom.querySelector(".el-input__inner");
...@@ -306,7 +305,14 @@ export default { ...@@ -306,7 +305,14 @@ export default {
this.$emit('handle-search', this.comFormData); this.$emit('handle-search', this.comFormData);
}, },
clickEXCEL() { clickEXCEL() {
this.$emit('handle-excel'); if (["集团业绩", "集团招标", "供应商合作记录"].includes(this.title)) {
this.$emit('handle-excel');
} else {
this.$message({
message: '功能正在开发中',
type: 'warning'
});
}
}, },
clickFocus(e) { clickFocus(e) {
document.getElementById(e).classList.toggle('span-ba'); document.getElementById(e).classList.toggle('span-ba');
......
...@@ -333,8 +333,9 @@ export default { ...@@ -333,8 +333,9 @@ export default {
getFinancial(id) { getFinancial(id) {
financial({ cid: String(id) }).then(res => { financial({ cid: String(id) }).then(res => {
if ((res.code == 200 && !res.data) || !res.data?.totalAssets) { if ((res.code == 200 && !res.data) || !res.data?.totalAssets) {
// 禁用务信息 // 禁用务信息
this.$set(this.findNodeIndex(this.sideRoute, "business"), "disabled", true); this.$set(this.findNodeIndex(this.sideRoute, "business"), "disabled", true);
this.$set(this.findNodeIndex(this.sideRoute, "financial"), "disabled", true);
this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute)); this.defaultRoute = JSON.parse(JSON.stringify(this.sideRoute));
} }
}); });
......
...@@ -226,11 +226,13 @@ export default { ...@@ -226,11 +226,13 @@ export default {
.cell { .cell {
font-size: 12px; font-size: 12px;
} }
.el-table__header-wrapper {
min-height: 40px;
}
} }
.el-table--border th.gutter:last-of-type { .el-table--border th.gutter:last-of-type {
display: block !important; display: block !important;
padding-right: 16px; padding-right: 16px;
height: 55px;
} }
} }
::v-deep .el-table th.el-table__cell.is-leaf, ::v-deep .el-table th.el-table__cell.is-leaf,
......
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
cooperationRecordDialog: false, cooperationRecordDialog: false,
dialogQueryParams: { dialogQueryParams: {
companyId: "", companyId: "",
combineId: "",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
companyType: 2, companyType: 2,
...@@ -119,6 +120,7 @@ export default { ...@@ -119,6 +120,7 @@ export default {
dialogtableDataTotal: 0, dialogtableDataTotal: 0,
dialogTableData: [], dialogTableData: [],
statisticsData: {}, statisticsData: {},
selectDialogOptions: {}
}; };
}, },
//可访问data属性 //可访问data属性
...@@ -133,13 +135,13 @@ export default { ...@@ -133,13 +135,13 @@ export default {
methods: { methods: {
async initDetail() { async initDetail() {
try { try {
await this.setOptions(true); await this.setOptions();
await this.handleQuery(); await this.handleQuery();
} catch (error) { } catch (error) {
} }
}, },
async setOptions(flag) { async setOptions() {
try { try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId }); const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) { if (options.code == 200 && options.data) {
...@@ -150,8 +152,25 @@ export default { ...@@ -150,8 +152,25 @@ export default {
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]]; const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => { optionsKey.forEach(([key, value]) => {
flag ? this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]) : null; this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]);
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]); });
}
} catch (error) {
console.log(error);
}
},
async setDialogOptions() {
try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) {
for (const key in options.data) {
options.data[key] = options.data[key].map(item => ({ name: item, value: item }));
}
this.selectDialogOptions = options.data;
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => {
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectDialogOptions[key]);
}); });
} }
} catch (error) { } catch (error) {
...@@ -220,6 +239,9 @@ export default { ...@@ -220,6 +239,9 @@ export default {
async sortChange({ column, order, prop }) { async sortChange({ column, order, prop }) {
let sort = null; let sort = null;
switch (prop) { switch (prop) {
case "count":
order == "ascending" ? sort = 6 : sort = 5;
break;
case "time": case "time":
order == "ascending" ? sort = 4 : sort = 3; order == "ascending" ? sort = 4 : sort = 3;
break; break;
...@@ -232,8 +254,9 @@ export default { ...@@ -232,8 +254,9 @@ export default {
if (!order) sort = ""; if (!order) sort = "";
this.queryParams.sort = sort; this.queryParams.sort = sort;
try { try {
let data = this.queryParams; const params = this.createQueryCondition(this.formData);
const res = await getCooperativeOwnerUnitsListApi(data); const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.queryParams }));
const res = await getCooperativeOwnerUnitsListApi(searchParams);
this.tableData = res.rows ? res.rows : []; this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0; this.tableDataTotal = res.total ? res.total : 0;
} catch (error) { } catch (error) {
...@@ -242,6 +265,7 @@ export default { ...@@ -242,6 +265,7 @@ export default {
}, },
viewProject(row) { viewProject(row) {
this.dialogQueryParams.companyId = row.companyId; this.dialogQueryParams.companyId = row.companyId;
this.dialogQueryParams.combineId = row.counterpartCompanyId;
this.cooperationRecordDialog = true; this.cooperationRecordDialog = true;
}, },
async dialogHandleQurey(params) { async dialogHandleQurey(params) {
...@@ -285,11 +309,12 @@ export default { ...@@ -285,11 +309,12 @@ export default {
if (!order) sort = ""; if (!order) sort = "";
this.dialogQueryParams.sort = sort; this.dialogQueryParams.sort = sort;
try { try {
let data = this.dialogQueryParams; const params = this.createQueryCondition(this.dialogFormData);
const res = await getCooperativeOwnerUnitsDetailApi(data); const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
const res = await getCooperativeOwnerUnitsDetailApi(searchParams);
this.dialogTableData = res.rows ? res.rows : []; this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0; this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data); const count = await getCooperativeOwnerUnitsCountAmountApi(JSON.parse(JSON.stringify(this.dialogQueryParams)));
if (count.code == 200 && count.data) { if (count.code == 200 && count.data) {
this.statisticsData = count.data; this.statisticsData = count.data;
} }
...@@ -304,7 +329,7 @@ export default { ...@@ -304,7 +329,7 @@ export default {
this.dialogHandleQurey(searchParams); this.dialogHandleQurey(searchParams);
}, },
async dialogOPen() { async dialogOPen() {
await this.setOptions(); await this.setDialogOptions();
await this.dialogHandleQurey(); await this.dialogHandleQurey();
}, },
dialogClose() { dialogClose() {
...@@ -356,7 +381,7 @@ export default { ...@@ -356,7 +381,7 @@ export default {
::v-deep .cooperation-record-dialog-container { ::v-deep .cooperation-record-dialog-container {
.cooperation-record-dialog { .cooperation-record-dialog {
height: 60%; height: 75%;
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
......
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
v-html="scope.row.companyName">{{scope.row.companyName}}</span> v-html="scope.row.companyName">{{scope.row.companyName}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<!-- 合作项目数量 -->
<template slot="count" slot-scope="scope">
<span v-if="scope.row.count" style="color: #0081FF;cursor: pointer;">{{scope.row.count}}</span>
<span v-else>-</span>
</template>
</dialog-tables> </dialog-tables>
</template> </template>
...@@ -125,7 +130,7 @@ export default { ...@@ -125,7 +130,7 @@ export default {
{ label: '集团名称', prop: 'combineName', width: '295', slot: true, showOverflowTooltip: true }, { label: '集团名称', prop: 'combineName', width: '295', slot: true, showOverflowTooltip: true },
{ label: '合作项目数量', prop: 'count', minWidth: '190', align: "right", slot: true, sortable: "custom" }, { label: '合作项目数量', prop: 'count', minWidth: '190', align: "right", slot: true, sortable: "custom" },
{ label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" }, { label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" },
{ label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" }, // { label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" },
], ],
formData: [ formData: [
{ type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() }, { type: 4, fieldName: 'businessTypes', value: '', placeholder: '咨询机构业务', options: [], uid: this.getUid() },
...@@ -143,7 +148,9 @@ export default { ...@@ -143,7 +148,9 @@ export default {
// 合作项目详情弹窗 // 合作项目详情弹窗
cooperationRecordDialog: false, cooperationRecordDialog: false,
dialogQueryParams: { dialogQueryParams: {
companyId: "", companyId: this.companyId,
memberId: "",
combineId: "",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
companyType: 3, companyType: 3,
...@@ -151,9 +158,9 @@ export default { ...@@ -151,9 +158,9 @@ export default {
}, },
memberForData: [ memberForData: [
{ label: '合作成员', prop: 'companyName', width: '351', slot: true, showOverflowTooltip: true }, { label: '合作成员', prop: 'companyName', width: '351', slot: true, showOverflowTooltip: true },
{ label: '合作次数', prop: 'count ', minWidth: '223', align: "right", slot: true, sortable: "custom" }, { label: '合作次数', prop: 'count', minWidth: '223', align: "right", slot: true, sortable: "custom" },
{ label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" }, { label: '最近一次合作时间', prop: 'time', minWidth: '214', sortable: "custom" },
{ label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" }, // { label: '合作总金额(万元)', prop: 'amount', minWidth: '226', align: "right", sortable: "custom" },
], ],
dialogForData: [ dialogForData: [
{ label: '合作项目/工程名称', prop: 'projectName', width: '182', slot: true, showOverflowTooltip: true }, { label: '合作项目/工程名称', prop: 'projectName', width: '182', slot: true, showOverflowTooltip: true },
...@@ -176,6 +183,7 @@ export default { ...@@ -176,6 +183,7 @@ export default {
dialogIsSkeleton: true, dialogIsSkeleton: true,
dialogtableDataTotal: 0, dialogtableDataTotal: 0,
dialogTableData: [], dialogTableData: [],
selectDialogOptions: {},
statisticsData: {}, statisticsData: {},
}; };
}, },
...@@ -191,13 +199,14 @@ export default { ...@@ -191,13 +199,14 @@ export default {
methods: { methods: {
async initDetail() { async initDetail() {
try { try {
await this.setOptions(true); await this.setOptions();
await this.setDialogOptions();
await this.handleQuery(); await this.handleQuery();
} catch (error) { } catch (error) {
} }
}, },
async setOptions(flag) { async setOptions() {
try { try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId }); const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) { if (options.code == 200 && options.data) {
...@@ -208,8 +217,25 @@ export default { ...@@ -208,8 +217,25 @@ export default {
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]]; const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => { optionsKey.forEach(([key, value]) => {
flag ? this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]) : null; this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]);
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]); });
}
} catch (error) {
console.log(error);
}
},
async setDialogOptions() {
try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) {
for (const key in options.data) {
options.data[key] = options.data[key].map(item => ({ name: item, value: item }));
}
this.selectDialogOptions = options.data;
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => {
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectDialogOptions[key]);
}); });
} }
} catch (error) { } catch (error) {
...@@ -278,6 +304,9 @@ export default { ...@@ -278,6 +304,9 @@ export default {
async sortChange({ column, order, prop }) { async sortChange({ column, order, prop }) {
let sort = null; let sort = null;
switch (prop) { switch (prop) {
case "count":
order == "ascending" ? sort = 6 : sort = 5;
break;
case "time": case "time":
order == "ascending" ? sort = 4 : sort = 3; order == "ascending" ? sort = 4 : sort = 3;
break; break;
...@@ -290,8 +319,9 @@ export default { ...@@ -290,8 +319,9 @@ export default {
if (!order) sort = ""; if (!order) sort = "";
this.queryParams.sort = sort; this.queryParams.sort = sort;
try { try {
let data = this.queryParams; const params = this.createQueryCondition(this.formData);
const res = await getCooperativeOwnerUnitsListApi(data); const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.queryParams }));
const res = await getCooperativeOwnerUnitsListApi(searchParams);
this.tableData = res.rows ? res.rows : []; this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0; this.tableDataTotal = res.total ? res.total : 0;
} catch (error) { } catch (error) {
...@@ -299,17 +329,22 @@ export default { ...@@ -299,17 +329,22 @@ export default {
} }
}, },
viewProject(row) { viewProject(row) {
this.dialogQueryParams.companyId = row.companyId; this.dialogQueryParams.memberId = row.combineId;
this.dialogQueryParams.combineId = row.combineId;
this.cooperationRecordDialog = true; this.cooperationRecordDialog = true;
}, },
async dialogHandleQurey(params) { async dialogHandleQurey(params) {
try { try {
let data = params ? params : this.dialogQueryParams; let data = params ? params : this.dialogQueryParams;
const _tempData = JSON.parse(JSON.stringify(data));
this.currentList == "cooperativeMember" ? delete _tempData.memberId : delete _tempData.memberId;
this.dialogIsSkeleton = true; this.dialogIsSkeleton = true;
const res = currentList == "cooperativeMember" ? await getCooperativeGroupMemberApi(data) : await getCooperativeOwnerUnitsDetailApi(data); const res = this.currentList == "cooperativeMember" ? await getCooperativeGroupMemberApi(_tempData) : await getCooperativeOwnerUnitsDetailApi(_tempData);
this.dialogTableData = res.rows ? res.rows : []; this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0; this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data); const dialogData = JSON.parse(JSON.stringify(data));
delete dialogData.memberId;
const count = await getCooperativeOwnerUnitsCountAmountApi(dialogData);
if (count.code == 200 && count.data) { if (count.code == 200 && count.data) {
this.statisticsData = count.data; this.statisticsData = count.data;
} }
...@@ -343,11 +378,15 @@ export default { ...@@ -343,11 +378,15 @@ export default {
if (!order) sort = ""; if (!order) sort = "";
this.dialogQueryParams.sort = sort; this.dialogQueryParams.sort = sort;
try { try {
let data = this.dialogQueryParams; const params = this.createQueryCondition(this.dialogFormData);
const res = currentList == "cooperativeMember" ? await getCooperativeGroupMemberApi(data) : await getCooperativeOwnerUnitsDetailApi(data); const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
this.currentList == "cooperativeMember" ? delete searchParams.memberId : delete searchParams.memberId;
const res = this.currentList == "cooperativeMember" ? await getCooperativeGroupMemberApi(searchParams) : await getCooperativeOwnerUnitsDetailApi(searchParams);
this.dialogTableData = res.rows ? res.rows : []; this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0; this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data); const dialogData = JSON.parse(JSON.stringify(this.dialogQueryParams));
delete dialogData.memberId;
const count = await getCooperativeOwnerUnitsCountAmountApi(dialogData);
if (count.code == 200 && count.data) { if (count.code == 200 && count.data) {
this.statisticsData = count.data; this.statisticsData = count.data;
} }
...@@ -362,7 +401,7 @@ export default { ...@@ -362,7 +401,7 @@ export default {
this.dialogHandleQurey(searchParams); this.dialogHandleQurey(searchParams);
}, },
async dialogOPen() { async dialogOPen() {
await this.setOptions(); await this.setDialogOptions();
await this.dialogHandleQurey(); await this.dialogHandleQurey();
}, },
dialogClose() { dialogClose() {
...@@ -372,9 +411,24 @@ export default { ...@@ -372,9 +411,24 @@ export default {
this.dialogtableDataTotal = data.dialogtableDataTotal; this.dialogtableDataTotal = data.dialogtableDataTotal;
this.dialogTableData = data.dialogTableData; this.dialogTableData = data.dialogTableData;
}, },
async resetDialogQuery() {
try {
const data = this.$options.data.call(this);
this.dialogTableData = data.dialogTableData;
this.statisticsData = data.statisticsData;
this.dialogtableDataTotal = data.dialogtableDataTotal;
this.dialogFormData = data.dialogFormData;
this.dialogQueryParams.pageNum = 1;
this.dialogQueryParams.pageSize = 10;
await this.setDialogOptions();
} catch (error) {
console.log(error);
}
},
// 切换tab // 切换tab
tabToggle() { async tabToggle() {
await this.resetDialogQuery();
await this.dialogHandleQurey();
} }
}, },
} }
...@@ -418,7 +472,7 @@ export default { ...@@ -418,7 +472,7 @@ export default {
::v-deep .cooperation-record-dialog-container { ::v-deep .cooperation-record-dialog-container {
.cooperation-record-dialog { .cooperation-record-dialog {
height: 60%; height: 75%;
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
......
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
cooperationRecordDialog: false, cooperationRecordDialog: false,
dialogQueryParams: { dialogQueryParams: {
companyId: "", companyId: "",
combineId: "",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
companyType: 1, companyType: 1,
...@@ -118,7 +119,8 @@ export default { ...@@ -118,7 +119,8 @@ export default {
dialogIsSkeleton: true, dialogIsSkeleton: true,
dialogtableDataTotal: 0, dialogtableDataTotal: 0,
dialogTableData: [], dialogTableData: [],
statisticsData: {} statisticsData: {},
selectDialogOptions: {}
}; };
}, },
//可访问data属性 //可访问data属性
...@@ -133,13 +135,13 @@ export default { ...@@ -133,13 +135,13 @@ export default {
methods: { methods: {
async initDetail() { async initDetail() {
try { try {
await this.setOptions(true); await this.setOptions();
await this.handleQuery(); await this.handleQuery();
} catch (error) { } catch (error) {
} }
}, },
async setOptions(flag) { async setOptions() {
try { try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId }); const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) { if (options.code == 200 && options.data) {
...@@ -150,8 +152,25 @@ export default { ...@@ -150,8 +152,25 @@ export default {
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]]; const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => { optionsKey.forEach(([key, value]) => {
flag ? this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]) : null; this.$set(this.formData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]);
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectOptions[key]); });
}
} catch (error) {
console.log(error);
}
},
async setDialogOptions() {
try {
const options = await getCooperativeOwnerUnitsOptionsApi({ companyId: this.queryParams.companyId });
if (options.code == 200 && options.data) {
for (const key in options.data) {
options.data[key] = options.data[key].map(item => ({ name: item, value: item }));
}
this.selectDialogOptions = options.data;
const optionsKey = [["businessType", "businessTypes"], ["counterpartCompanyRole", "counterpartCompanyRoles"], ["projectType", "projectTypes"]];
optionsKey.forEach(([key, value]) => {
this.$set(this.dialogFormData.find(formItem => value == formItem.fieldName), "options", this.selectDialogOptions[key]);
}); });
} }
} catch (error) { } catch (error) {
...@@ -220,6 +239,9 @@ export default { ...@@ -220,6 +239,9 @@ export default {
async sortChange({ column, order, prop }) { async sortChange({ column, order, prop }) {
let sort = null; let sort = null;
switch (prop) { switch (prop) {
case "count":
order == "ascending" ? sort = 6 : sort = 5;
break;
case "time": case "time":
order == "ascending" ? sort = 4 : sort = 3; order == "ascending" ? sort = 4 : sort = 3;
break; break;
...@@ -232,8 +254,9 @@ export default { ...@@ -232,8 +254,9 @@ export default {
if (!order) sort = ""; if (!order) sort = "";
this.queryParams.sort = sort; this.queryParams.sort = sort;
try { try {
let data = this.queryParams; const params = this.createQueryCondition(this.formData);
const res = await getCooperativeOwnerUnitsListApi(data); const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.queryParams }));
const res = await getCooperativeOwnerUnitsListApi(searchParams);
this.tableData = res.rows ? res.rows : []; this.tableData = res.rows ? res.rows : [];
this.tableDataTotal = res.total ? res.total : 0; this.tableDataTotal = res.total ? res.total : 0;
} catch (error) { } catch (error) {
...@@ -242,6 +265,7 @@ export default { ...@@ -242,6 +265,7 @@ export default {
}, },
viewProject(row) { viewProject(row) {
this.dialogQueryParams.companyId = row.companyId; this.dialogQueryParams.companyId = row.companyId;
this.dialogQueryParams.combineId = row.companyId;
this.cooperationRecordDialog = true; this.cooperationRecordDialog = true;
}, },
async dialogHandleQurey(params) { async dialogHandleQurey(params) {
...@@ -285,11 +309,12 @@ export default { ...@@ -285,11 +309,12 @@ export default {
if (!order) sort = ""; if (!order) sort = "";
this.dialogQueryParams.sort = sort; this.dialogQueryParams.sort = sort;
try { try {
let data = this.dialogQueryParams; const params = this.createQueryCondition(this.dialogFormData);
const res = await getCooperativeOwnerUnitsDetailApi(data); const searchParams = JSON.parse(JSON.stringify({ ...params, ...this.dialogQueryParams }));
const res = await getCooperativeOwnerUnitsDetailApi(searchParams);
this.dialogTableData = res.rows ? res.rows : []; this.dialogTableData = res.rows ? res.rows : [];
this.dialogtableDataTotal = res.total ? res.total : 0; this.dialogtableDataTotal = res.total ? res.total : 0;
const count = await getCooperativeOwnerUnitsCountAmountApi(data); const count = await getCooperativeOwnerUnitsCountAmountApi(JSON.parse(JSON.stringify(this.dialogQueryParams)));
if (count.code == 200 && count.data) { if (count.code == 200 && count.data) {
this.statisticsData = count.data; this.statisticsData = count.data;
} }
...@@ -304,7 +329,7 @@ export default { ...@@ -304,7 +329,7 @@ export default {
this.dialogHandleQurey(searchParams); this.dialogHandleQurey(searchParams);
}, },
async dialogOPen() { async dialogOPen() {
await this.setOptions(); await this.setDialogOptions();
await this.dialogHandleQurey(); await this.dialogHandleQurey();
}, },
dialogClose() { dialogClose() {
...@@ -356,7 +381,7 @@ export default { ...@@ -356,7 +381,7 @@ export default {
::v-deep .cooperation-record-dialog-container { ::v-deep .cooperation-record-dialog-container {
.cooperation-record-dialog { .cooperation-record-dialog {
height: 60%; height: 75%;
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
......
<template> <template>
<div class="equity-freezing-container"> <div class="equity-freezing-container">
<el-tabs v-model="queryParams.type" @tab-click="handleClick" class="detail-tab"> <el-tabs :value="queryParams.type" @tab-click="handleClick" class="detail-tab">
<el-tab-pane label="股权冻结" name="0"></el-tab-pane> <el-tab-pane label="股权冻结" name="0"></el-tab-pane>
<el-tab-pane label="历史股权冻结" :disabled="tableDataTotal==0" name="1"></el-tab-pane> <el-tab-pane label="历史股权冻结" :disabled="historyTableDataTotal == 0" name="1"></el-tab-pane>
</el-tabs> </el-tabs>
<head-form-new ref="headFormNew" title="" :form-data="formData" :query-params="queryParams" :total="tableDataTotal" :isExcel="true" <head-form-new ref="headFormNew" title="" :form-data="formData" :query-params="queryParams" :total="tableDataTotal" :isExcel="true"
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</template> </template>
<!-- 操作 --> <!-- 操作 -->
<template slot="operation-table" slot-scope="scope"> <template slot="operation-table" slot-scope="scope">
<span style="color: #0081FF;cursor: pointer;" @click="viewDetail(scope.row)">操作</span> <span style="color: #0081FF;cursor: pointer;" @click="viewDetail(scope.row)">详情</span>
</template> </template>
</tables> </tables>
...@@ -97,14 +97,14 @@ export default { ...@@ -97,14 +97,14 @@ export default {
type: "0" type: "0"
}, },
forData: [ forData: [
{ label: '执行通知书文号', prop: 'number', width: '164' }, { label: '执行通知书文号', prop: 'number', width: '220', showOverflowTooltip: true },
{ label: '被执行人', prop: 'beExecutedPerson', minWidth: '146' }, { label: '被执行人', prop: 'beExecutedPerson', width: '220', showOverflowTooltip: true },
{ label: '股权数额', prop: 'amount', width: '113' }, { label: '股权数额', prop: 'amount', width: '160' },
{ label: '执行法院', prop: 'executiveCourt', minWidth: '146' }, { label: '执行法院', prop: 'executiveCourt', minWidth: '146' },
{ label: '状态', prop: 'status', width: '50' }, { label: '状态', prop: 'status', width: '120' },
{ label: '冻结起止日期', prop: 'freezeStartDate', width: '171', slot: true }, { label: '冻结起止日期', prop: 'freezeStartDate', width: '171', slot: true },
{ label: '公式时间', prop: 'source', width: '93' }, { label: '公示时间', prop: 'publicDate', width: '93' },
{ label: '操作', prop: 'operation-table', width: '50', slot: true }, { label: '操作', prop: 'operation-table', width: '120', slot: true },
], ],
formData: [ formData: [
{ type: 5, fieldName: 'time', value: '', placeholder: '选择日期', startTime: 'dateFrom', endTime: 'dateTo', uid: this.getUid() }, { type: 5, fieldName: 'time', value: '', placeholder: '选择日期', startTime: 'dateFrom', endTime: 'dateTo', uid: this.getUid() },
...@@ -113,9 +113,8 @@ export default { ...@@ -113,9 +113,8 @@ export default {
tableLoading: false, tableLoading: false,
tableData: [], tableData: [],
tableDataTotal: 0, tableDataTotal: 0,
showList: [], historyTableDataTotal: 0,
isSkeleton: false, isSkeleton: false,
resetStatus: false,
// 股权冻结详情 // 股权冻结详情
equityFreezingDetailDialog: false, equityFreezingDetailDialog: false,
// 详情缓存 // 详情缓存
...@@ -135,15 +134,27 @@ export default { ...@@ -135,15 +134,27 @@ export default {
async initDetail() { async initDetail() {
try { try {
await this.handleQuery(); await this.handleQuery();
await this.getHistoryList();
} catch (error) { } catch (error) {
} }
}, },
resetQueryParams() { resetQueryParams() {
const data = this.$options.data.call(this); const data = this.$options.data.call(this);
this.tableData = data.tableData;
this.tableDataTotal = data.tableDataTotal;
this.queryParams = { ...data.queryParams, type: this.queryParams.type }; this.queryParams = { ...data.queryParams, type: this.queryParams.type };
this.formData[0].value = ""; this.formData[0].value = "";
}, },
async getHistoryList(params) {
try {
let data = params ? { ...params, type: 1 } : { ...this.queryParams, type: 1 };
const res = await getEquityFreezingApi(data);
this.historyTableDataTotal = res.total ? res.total : 0;
} catch (error) {
console.log(error);
}
},
async handleQuery(params) { async handleQuery(params) {
try { try {
let data = params ? { ...params, type: parseInt(params.type) } : { ...this.queryParams, type: parseInt(this.queryParams.type) }; let data = params ? { ...params, type: parseInt(params.type) } : { ...this.queryParams, type: parseInt(this.queryParams.type) };
...@@ -159,6 +170,7 @@ export default { ...@@ -159,6 +170,7 @@ export default {
}, },
handleClick(v) { handleClick(v) {
if (v.name == this.queryParams.type) return; if (v.name == this.queryParams.type) return;
this.queryParams.type = v.name;
this.resetQueryParams(); this.resetQueryParams();
this.handleQuery(); this.handleQuery();
}, },
......
...@@ -80,6 +80,9 @@ export default { ...@@ -80,6 +80,9 @@ export default {
}, },
// 查看原文 // 查看原文
viewOriginalArticle(row) { viewOriginalArticle(row) {
if (row.source) {
window.open(row.source);
}
} }
}, },
} }
......
...@@ -4,6 +4,7 @@ import java.util.Date; ...@@ -4,6 +4,7 @@ import java.util.Date;
import java.io.Serializable; import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
/** /**
...@@ -13,6 +14,7 @@ import lombok.Data; ...@@ -13,6 +14,7 @@ import lombok.Data;
* @since 2023-12-14 10:09:24 * @since 2023-12-14 10:09:24
*/ */
@Data @Data
@TableName("sys_push")
public class SysPush implements Serializable { public class SysPush implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.dsk.system.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 推送记录
*
* @Author lcl
* @Data 2024/1/2 17:02
*/
@Data
@TableName("sys_push_record")
public class SysPushRecord implements Serializable {
@TableId(value = "id")
private Long id;
/**
* 数据id
*/
private String dataId;
/**
* 推送类型code
*/
private String push_type_code;
/**
* 推送时间
*/
private Date pushTime;
}
package com.dsk.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.system.domain.SysPush;
import com.dsk.system.domain.SysPushRecord;
/**
* 系统推送记录(SysPushRecord)表数据库访问层
*
* @author lcl
* @since 2023-12-14 10:09:24
*/
public interface SysPushRecordMapper extends BaseMapper<SysPushRecord> {
}
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