Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
datax-cloud
Commits
22527469
Commit
22527469
authored
Sep 28, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目初始化
parent
3ca6334f
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
2621 additions
and
44 deletions
+2621
-44
MetadataChangeRecordEntity.java
.../data/metadata/api/entity/MetadataChangeRecordEntity.java
+5
-0
CheckRuleDto.java
...a/cn/datax/service/data/quality/api/dto/CheckRuleDto.java
+8
-2
CheckReportEntity.java
...ax/service/data/quality/api/entity/CheckReportEntity.java
+37
-1
CheckRuleEntity.java
...atax/service/data/quality/api/entity/CheckRuleEntity.java
+16
-5
RuleTypeReportEntity.java
...service/data/quality/api/entity/RuleTypeReportEntity.java
+14
-0
CheckReportQuery.java
...atax/service/data/quality/api/query/CheckReportQuery.java
+5
-1
CheckRuleQuery.java
.../datax/service/data/quality/api/query/CheckRuleQuery.java
+6
-0
CheckReportVo.java
...a/cn/datax/service/data/quality/api/vo/CheckReportVo.java
+5
-0
CheckRuleVo.java
...ava/cn/datax/service/data/quality/api/vo/CheckRuleVo.java
+2
-0
CheckReportController.java
...ervice/data/quality/controller/CheckReportController.java
+7
-1
CheckRuleController.java
.../service/data/quality/controller/CheckRuleController.java
+6
-0
RuleTypeController.java
...x/service/data/quality/controller/RuleTypeController.java
+10
-3
CheckReportDao.java
...ava/cn/datax/service/data/quality/dao/CheckReportDao.java
+6
-0
CheckRuleDao.java
.../java/cn/datax/service/data/quality/dao/CheckRuleDao.java
+6
-0
RuleTypeDao.java
...n/java/cn/datax/service/data/quality/dao/RuleTypeDao.java
+4
-0
RuleTypeService.java
...n/datax/service/data/quality/service/RuleTypeService.java
+5
-0
RuleTypeServiceImpl.java
...ervice/data/quality/service/impl/RuleTypeServiceImpl.java
+9
-0
CheckReportMapper.xml
...y-service/src/main/resources/mapper/CheckReportMapper.xml
+24
-1
CheckRuleMapper.xml
...ity-service/src/main/resources/mapper/CheckRuleMapper.xml
+23
-1
RuleTypeMapper.xml
...lity-service/src/main/resources/mapper/RuleTypeMapper.xml
+12
-0
ContrastDictDto.java
.../datax/service/data/standard/api/dto/ContrastDictDto.java
+7
-4
ContrastDto.java
...a/cn/datax/service/data/standard/api/dto/ContrastDto.java
+2
-2
ContrastDictEntity.java
.../service/data/standard/api/entity/ContrastDictEntity.java
+36
-5
ContrastEntity.java
...atax/service/data/standard/api/entity/ContrastEntity.java
+2
-2
ContrastDictQuery.java
...ax/service/data/standard/api/query/ContrastDictQuery.java
+4
-0
ContrastDictVo.java
...cn/datax/service/data/standard/api/vo/ContrastDictVo.java
+8
-2
ContrastVo.java
...ava/cn/datax/service/data/standard/api/vo/ContrastVo.java
+1
-0
DictVo.java
...in/java/cn/datax/service/data/standard/api/vo/DictVo.java
+1
-0
TypeVo.java
...in/java/cn/datax/service/data/standard/api/vo/TypeVo.java
+1
-1
ContrastController.java
.../service/data/standard/controller/ContrastController.java
+6
-0
ContrastDictController.java
...vice/data/standard/controller/ContrastDictController.java
+4
-0
ContrastDictDao.java
...a/cn/datax/service/data/standard/dao/ContrastDictDao.java
+6
-0
ContrastService.java
.../datax/service/data/standard/service/ContrastService.java
+2
-0
ContrastServiceImpl.java
...rvice/data/standard/service/impl/ContrastServiceImpl.java
+5
-0
ContrastDictMapper.xml
...-service/src/main/resources/mapper/ContrastDictMapper.xml
+31
-3
checkreport.js
datax-ui/src/api/quality/checkreport.js
+1
-1
contrast.js
datax-ui/src/api/standard/contrast.js
+32
-0
contrastdict.js
datax-ui/src/api/standard/contrastdict.js
+46
-0
CheckReportList.vue
datax-ui/src/views/quality/checkreport/CheckReportList.vue
+221
-0
index.vue
datax-ui/src/views/quality/checkreport/index.vue
+20
-2
CheckRuleAdd.vue
datax-ui/src/views/quality/checkrule/CheckRuleAdd.vue
+244
-0
CheckRuleDetail.vue
datax-ui/src/views/quality/checkrule/CheckRuleDetail.vue
+168
-0
CheckRuleEdit.vue
datax-ui/src/views/quality/checkrule/CheckRuleEdit.vue
+253
-0
CheckRuleList.vue
datax-ui/src/views/quality/checkrule/CheckRuleList.vue
+412
-0
index.vue
datax-ui/src/views/quality/checkrule/index.vue
+35
-2
DataContrastAdd.vue
datax-ui/src/views/standard/datacontrast/DataContrastAdd.vue
+135
-0
DataContrastDetail.vue
...ui/src/views/standard/datacontrast/DataContrastDetail.vue
+96
-0
DataContrastEdit.vue
...x-ui/src/views/standard/datacontrast/DataContrastEdit.vue
+140
-0
DataContrastList.vue
...x-ui/src/views/standard/datacontrast/DataContrastList.vue
+454
-0
index.vue
datax-ui/src/views/standard/datacontrast/index.vue
+35
-2
BusinessAdd.vue
datax-ui/src/views/workflow/business/BusinessAdd.vue
+1
-1
BusinessDetail.vue
datax-ui/src/views/workflow/business/BusinessDetail.vue
+1
-1
BusinessEdit.vue
datax-ui/src/views/workflow/business/BusinessEdit.vue
+1
-1
No files found.
datax-modules/data-metadata-service-parent/data-metadata-service-api/src/main/java/cn/datax/service/data/metadata/api/entity/MetadataChangeRecordEntity.java
View file @
22527469
package
cn
.
datax
.
service
.
data
.
metadata
.
api
.
entity
;
import
cn.datax.common.base.DataScopeBaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -55,12 +56,16 @@ public class MetadataChangeRecordEntity extends DataScopeBaseEntity {
/**
* 数据源
*/
@TableField
(
exist
=
false
)
private
String
sourceId
;
@TableField
(
exist
=
false
)
private
String
sourceName
;
/**
* 数据库表
*/
@TableField
(
exist
=
false
)
private
String
tableId
;
@TableField
(
exist
=
false
)
private
String
tableName
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/dto/CheckRuleDto.java
View file @
22527469
...
...
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
...
...
@@ -39,10 +40,15 @@ public class CheckRuleDto implements Serializable {
private
String
ruleTableId
;
@ApiModelProperty
(
value
=
"数据表"
)
private
String
ruleTable
;
@ApiModelProperty
(
value
=
"字段主键"
)
@ApiModelProperty
(
value
=
"
核查
字段主键"
)
private
String
ruleColumnId
;
@ApiModelProperty
(
value
=
"字段"
)
@ApiModelProperty
(
value
=
"
核查
字段"
)
private
String
ruleColumn
;
@ApiModelProperty
(
value
=
"核查脚本"
)
private
String
ruleSql
;
@ApiModelProperty
(
value
=
"状态"
)
@NotNull
(
message
=
"状态不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
private
String
status
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/entity/CheckReportEntity.java
View file @
22527469
package
cn
.
datax
.
service
.
data
.
quality
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -19,7 +20,7 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"quality_check_report"
)
@TableName
(
value
=
"quality_check_report"
,
autoResultMap
=
true
)
public
class
CheckReportEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -54,4 +55,39 @@ public class CheckReportEntity implements Serializable {
* 报错数量
*/
private
Integer
checkErrorCount
;
/**
* 核查批次号
*/
private
String
checkBatch
;
/**
* 规则名称
*/
@TableField
(
exist
=
false
)
private
String
ruleName
;
/**
* 规则类型
*/
@TableField
(
exist
=
false
)
private
String
ruleType
;
/**
* 数据源
*/
@TableField
(
exist
=
false
)
private
String
ruleSource
;
/**
* 数据表
*/
@TableField
(
exist
=
false
)
private
String
ruleTable
;
/**
* 核查字段
*/
@TableField
(
exist
=
false
)
private
String
ruleColumn
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/entity/CheckRuleEntity.java
View file @
22527469
package
cn
.
datax
.
service
.
data
.
quality
.
api
.
entity
;
import
cn.datax.common.base.DataScopeBaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
cn.datax.common.base.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"quality_check_rule"
)
@TableName
(
value
=
"quality_check_rule"
,
autoResultMap
=
true
)
public
class
CheckRuleEntity
extends
DataScopeBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -29,11 +29,17 @@ public class CheckRuleEntity extends DataScopeBaseEntity {
private
String
ruleName
;
/**
* 规则类型
* 规则类型
主键
*/
private
String
ruleTypeId
;
/**
* 规则类型
*/
@TableField
(
exist
=
false
)
private
String
ruleType
;
/**
* 规则级别(3高、2中、1低)
*/
private
String
ruleLevel
;
...
...
@@ -59,12 +65,12 @@ public class CheckRuleEntity extends DataScopeBaseEntity {
private
String
ruleTable
;
/**
* 字段主键
*
核查
字段主键
*/
private
String
ruleColumnId
;
/**
* 字段
*
核查
字段
*/
private
String
ruleColumn
;
...
...
@@ -72,4 +78,9 @@ public class CheckRuleEntity extends DataScopeBaseEntity {
* 核查脚本
*/
private
String
ruleSql
;
/**
* 最近核查批次号(关联确定唯一核查报告)
*/
private
String
lastCheckBatch
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/entity/RuleTypeReportEntity.java
0 → 100644
View file @
22527469
package
cn
.
datax
.
service
.
data
.
quality
.
api
.
entity
;
import
lombok.Data
;
@Data
public
class
RuleTypeReportEntity
extends
RuleTypeEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 报错数量
*/
private
Integer
checkErrorCount
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/query/CheckReportQuery.java
View file @
22527469
...
...
@@ -18,5 +18,9 @@ public class CheckReportQuery extends BaseQueryParams {
private
static
final
long
serialVersionUID
=
1L
;
private
String
checkRuleId
;
private
String
ruleTypeId
;
private
String
ruleName
;
private
String
ruleSource
;
private
String
ruleTable
;
private
String
ruleColumn
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/query/CheckRuleQuery.java
View file @
22527469
...
...
@@ -17,4 +17,10 @@ import lombok.EqualsAndHashCode;
public
class
CheckRuleQuery
extends
BaseQueryParams
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
ruleTypeId
;
private
String
ruleName
;
private
String
ruleSource
;
private
String
ruleTable
;
private
String
ruleColumn
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/vo/CheckReportVo.java
View file @
22527469
...
...
@@ -26,4 +26,9 @@ public class CheckReportVo implements Serializable {
private
String
checkResult
;
private
Integer
checkTotalCount
;
private
Integer
checkErrorCount
;
private
String
ruleName
;
private
String
ruleType
;
private
String
ruleSource
;
private
String
ruleTable
;
private
String
ruleColumn
;
}
datax-modules/data-quality-service-parent/data-quality-service-api/src/main/java/cn/datax/service/data/quality/api/vo/CheckRuleVo.java
View file @
22527469
...
...
@@ -23,8 +23,10 @@ public class CheckRuleVo implements Serializable {
private
String
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
private
String
remark
;
private
String
ruleName
;
private
String
ruleTypeId
;
private
String
ruleType
;
private
String
ruleLevel
;
private
String
ruleSourceId
;
private
String
ruleSource
;
...
...
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/controller/CheckReportController.java
View file @
22527469
...
...
@@ -69,7 +69,13 @@ public class CheckReportController extends BaseController {
@GetMapping
(
"/page"
)
public
R
getCheckReportPage
(
CheckReportQuery
checkReportQuery
)
{
QueryWrapper
<
CheckReportEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
checkReportQuery
.
getCheckRuleId
()),
"check_rule_id"
,
checkReportQuery
.
getCheckRuleId
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
checkReportQuery
.
getRuleTypeId
()),
"r.rule_type_id"
,
checkReportQuery
.
getRuleTypeId
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkReportQuery
.
getRuleName
()),
"r.rule_name"
,
checkReportQuery
.
getRuleName
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkReportQuery
.
getRuleSource
()),
"r.rule_source"
,
checkReportQuery
.
getRuleSource
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkReportQuery
.
getRuleTable
()),
"r.rule_table"
,
checkReportQuery
.
getRuleTable
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkReportQuery
.
getRuleColumn
()),
"r.rule_column"
,
checkReportQuery
.
getRuleColumn
());
// 确定唯一核查报告
queryWrapper
.
eq
(
"c.check_batch"
,
"r.last_check_batch"
);
IPage
<
CheckReportEntity
>
page
=
checkReportService
.
page
(
new
Page
<>(
checkReportQuery
.
getPageNum
(),
checkReportQuery
.
getPageSize
()),
queryWrapper
);
List
<
CheckReportVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
checkReportMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
JsonPage
<
CheckReportVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
...
...
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/controller/CheckRuleController.java
View file @
22527469
...
...
@@ -9,6 +9,7 @@ import cn.datax.service.data.quality.api.vo.CheckRuleVo;
import
cn.datax.service.data.quality.api.query.CheckRuleQuery
;
import
cn.datax.service.data.quality.mapstruct.CheckRuleMapper
;
import
cn.datax.service.data.quality.service.CheckRuleService
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -71,6 +72,11 @@ public class CheckRuleController extends BaseController {
@GetMapping
(
"/page"
)
public
R
getCheckRulePage
(
CheckRuleQuery
checkRuleQuery
)
{
QueryWrapper
<
CheckRuleEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
checkRuleQuery
.
getRuleTypeId
()),
"r.rule_type_id"
,
checkRuleQuery
.
getRuleTypeId
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkRuleQuery
.
getRuleName
()),
"r.rule_name"
,
checkRuleQuery
.
getRuleName
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkRuleQuery
.
getRuleSource
()),
"r.rule_source"
,
checkRuleQuery
.
getRuleSource
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkRuleQuery
.
getRuleTable
()),
"r.rule_table"
,
checkRuleQuery
.
getRuleTable
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
checkRuleQuery
.
getRuleColumn
()),
"r.rule_column"
,
checkRuleQuery
.
getRuleColumn
());
IPage
<
CheckRuleEntity
>
page
=
checkRuleService
.
page
(
new
Page
<>(
checkRuleQuery
.
getPageNum
(),
checkRuleQuery
.
getPageSize
()),
queryWrapper
);
List
<
CheckRuleVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
checkRuleMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
JsonPage
<
CheckRuleVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
...
...
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/controller/RuleTypeController.java
View file @
22527469
...
...
@@ -3,6 +3,7 @@ package cn.datax.service.data.quality.controller;
import
cn.datax.common.core.JsonPage
;
import
cn.datax.common.core.R
;
import
cn.datax.service.data.quality.api.entity.RuleTypeEntity
;
import
cn.datax.service.data.quality.api.entity.RuleTypeReportEntity
;
import
cn.datax.service.data.quality.api.vo.RuleTypeVo
;
import
cn.datax.service.data.quality.api.query.RuleTypeQuery
;
import
cn.datax.service.data.quality.mapstruct.RuleTypeMapper
;
...
...
@@ -59,10 +60,16 @@ public class RuleTypeController extends BaseController {
@ApiOperation
(
value
=
"获取列表"
,
notes
=
""
)
@GetMapping
(
"/list"
)
public
R
get
VisualDataSet
List
()
{
public
R
get
RuleType
List
()
{
List
<
RuleTypeEntity
>
list
=
ruleTypeService
.
list
(
Wrappers
.
emptyWrapper
());
List
<
RuleTypeVo
>
collect
=
list
.
stream
().
map
(
ruleTypeMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
return
R
.
ok
().
setData
(
collect
);
return
R
.
ok
().
setData
(
list
);
}
@ApiOperation
(
value
=
"获取列表"
,
notes
=
""
)
@GetMapping
(
"/report/list"
)
public
R
getRuleTypeListForReport
()
{
List
<
RuleTypeReportEntity
>
list
=
ruleTypeService
.
getRuleTypeListForReport
();
return
R
.
ok
().
setData
(
list
);
}
/**
...
...
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/dao/CheckReportDao.java
View file @
22527469
...
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.quality.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.data.quality.api.entity.CheckReportEntity
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* <p>
...
...
@@ -15,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
CheckReportDao
extends
BaseDao
<
CheckReportEntity
>
{
@Override
<
E
extends
IPage
<
CheckReportEntity
>>
E
selectPage
(
E
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
CheckReportEntity
>
queryWrapper
);
}
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/dao/CheckRuleDao.java
View file @
22527469
...
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.quality.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.data.quality.api.entity.CheckRuleEntity
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* <p>
...
...
@@ -15,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
CheckRuleDao
extends
BaseDao
<
CheckRuleEntity
>
{
@Override
<
E
extends
IPage
<
CheckRuleEntity
>>
E
selectPage
(
E
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
CheckRuleEntity
>
queryWrapper
);
}
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/dao/RuleTypeDao.java
View file @
22527469
...
...
@@ -2,8 +2,11 @@ package cn.datax.service.data.quality.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.data.quality.api.entity.RuleTypeEntity
;
import
cn.datax.service.data.quality.api.entity.RuleTypeReportEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* <p>
* 规则类型信息表 Mapper 接口
...
...
@@ -15,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
RuleTypeDao
extends
BaseDao
<
RuleTypeEntity
>
{
List
<
RuleTypeReportEntity
>
selectListForReport
();
}
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/service/RuleTypeService.java
View file @
22527469
...
...
@@ -2,6 +2,9 @@ package cn.datax.service.data.quality.service;
import
cn.datax.service.data.quality.api.entity.RuleTypeEntity
;
import
cn.datax.common.base.BaseService
;
import
cn.datax.service.data.quality.api.entity.RuleTypeReportEntity
;
import
java.util.List
;
/**
* <p>
...
...
@@ -14,4 +17,6 @@ import cn.datax.common.base.BaseService;
public
interface
RuleTypeService
extends
BaseService
<
RuleTypeEntity
>
{
RuleTypeEntity
getRuleTypeById
(
String
id
);
List
<
RuleTypeReportEntity
>
getRuleTypeListForReport
();
}
datax-modules/data-quality-service-parent/data-quality-service/src/main/java/cn/datax/service/data/quality/service/impl/RuleTypeServiceImpl.java
View file @
22527469
package
cn
.
datax
.
service
.
data
.
quality
.
service
.
impl
;
import
cn.datax.service.data.quality.api.entity.RuleTypeEntity
;
import
cn.datax.service.data.quality.api.entity.RuleTypeReportEntity
;
import
cn.datax.service.data.quality.service.RuleTypeService
;
import
cn.datax.service.data.quality.mapstruct.RuleTypeMapper
;
import
cn.datax.service.data.quality.dao.RuleTypeDao
;
...
...
@@ -10,6 +11,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
* <p>
* 规则类型信息表 服务实现类
...
...
@@ -33,4 +36,10 @@ public class RuleTypeServiceImpl extends BaseServiceImpl<RuleTypeDao, RuleTypeEn
RuleTypeEntity
ruleTypeEntity
=
super
.
getById
(
id
);
return
ruleTypeEntity
;
}
@Override
public
List
<
RuleTypeReportEntity
>
getRuleTypeListForReport
()
{
List
<
RuleTypeReportEntity
>
list
=
ruleTypeDao
.
selectListForReport
();
return
list
;
}
}
datax-modules/data-quality-service-parent/data-quality-service/src/main/resources/mapper/CheckReportMapper.xml
View file @
22527469
...
...
@@ -10,12 +10,35 @@
<result
column=
"check_result"
property=
"checkResult"
/>
<result
column=
"check_total_count"
property=
"checkTotalCount"
/>
<result
column=
"check_error_count"
property=
"checkErrorCount"
/>
<result
column=
"check_batch"
property=
"checkBatch"
/>
</resultMap>
<resultMap
id=
"ExtendResultMap"
type=
"cn.datax.service.data.quality.api.entity.CheckReportEntity"
extends=
"BaseResultMap"
>
<result
column=
"rule_name"
property=
"ruleName"
/>
<result
column=
"rule_type"
property=
"ruleType"
/>
<result
column=
"rule_source"
property=
"ruleSource"
/>
<result
column=
"rule_table"
property=
"ruleTable"
/>
<result
column=
"rule_column"
property=
"ruleColumn"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id,
check_rule_id, check_date, check_result, check_total_count, check_error_count
check_rule_id, check_date, check_result, check_total_count, check_error_count
, check_batch
</sql>
<sql
id=
"Report_Column_List"
>
${alias}.id,
${alias}.check_rule_id, ${alias}.check_date, ${alias}.check_result, ${alias}.check_total_count, ${alias}.check_error_count, ${alias}.check_batch
</sql>
<select
id=
"selectPage"
resultMap=
"ExtendResultMap"
>
SELECT r.rule_name, t.name as rule_type, r.rule_source, r.rule_table, r.rule_column,
<include
refid=
"Report_Column_List"
><property
name=
"alias"
value=
"c"
/></include>
FROM quality_check_report c
LEFT JOIN quality_check_rule r ON r.id = c.check_rule_id
LEFT JOIN quality_rule_type t ON t.id = r.rule_type_id
${ew.customSqlSegment}
</select>
</mapper>
datax-modules/data-quality-service-parent/data-quality-service/src/main/resources/mapper/CheckRuleMapper.xml
View file @
22527469
...
...
@@ -14,6 +14,7 @@
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"rule_name"
property=
"ruleName"
/>
<result
column=
"rule_type_id"
property=
"ruleTypeId"
/>
<result
column=
"rule_type"
property=
"ruleType"
/>
<result
column=
"rule_level"
property=
"ruleLevel"
/>
<result
column=
"rule_source_id"
property=
"ruleSourceId"
/>
<result
column=
"rule_source"
property=
"ruleSource"
/>
...
...
@@ -22,6 +23,7 @@
<result
column=
"rule_column_id"
property=
"ruleColumnId"
/>
<result
column=
"rule_column"
property=
"ruleColumn"
/>
<result
column=
"rule_sql"
property=
"ruleSql"
/>
<result
column=
"last_check_batch"
property=
"lastCheckBatch"
/>
</resultMap>
<!-- 通用查询结果列 -->
...
...
@@ -34,7 +36,27 @@
update_by,
update_time,
remark,
rule_name, rule_type_id, rule_level, rule_source_id, rule_source, rule_table_id, rule_table, rule_column_id, rule_column, rule_sql
rule_name, rule_type_id, rule_level, rule_source_id, rule_source, rule_table_id, rule_table, rule_column_id, rule_column, rule_sql
, last_check_batch
</sql>
<sql
id=
"Rule_Column_List"
>
${alias}.id,
${alias}.status,
${alias}.create_by,
${alias}.create_time,
${alias}.create_dept,
${alias}.update_by,
${alias}.update_time,
${alias}.remark,
${alias}.rule_name, ${alias}.rule_type_id, ${alias}.rule_level, ${alias}.rule_source_id, ${alias}.rule_source, ${alias}.rule_table_id, ${alias}.rule_table, ${alias}.rule_column_id, ${alias}.rule_column, ${alias}.rule_sql, ${alias}.last_check_batch
</sql>
<select
id=
"selectPage"
resultMap=
"BaseResultMap"
>
SELECT t.name as rule_type,
<include
refid=
"Rule_Column_List"
><property
name=
"alias"
value=
"r"
/></include>
FROM quality_check_rule r
LEFT JOIN quality_rule_type t ON t.id = r.rule_type_id
${ew.customSqlSegment}
</select>
</mapper>
datax-modules/data-quality-service-parent/data-quality-service/src/main/resources/mapper/RuleTypeMapper.xml
View file @
22527469
...
...
@@ -8,10 +8,22 @@
<result
column=
"name"
property=
"name"
/>
</resultMap>
<resultMap
id=
"ExtendResultMap"
type=
"cn.datax.service.data.quality.api.entity.RuleTypeReportEntity"
extends=
"BaseResultMap"
>
<result
column=
"check_error_count"
property=
"checkErrorCount"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id,
name
</sql>
<select
id=
"selectListForReport"
resultMap=
"ExtendResultMap"
>
SELECT t.id, t.name,
(SELECT COALESCE(SUM(c.check_error_count), 0) FROM quality_check_rule r
LEFT JOIN quality_check_report c ON c.check_rule_id = r.id AND c.check_batch = r.last_check_batch
WHERE r.rule_type_id = t.id AND r.status = 1) AS check_error_count
FROM quality_rule_type t
</select>
</mapper>
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/dto/ContrastDictDto.java
View file @
22527469
...
...
@@ -6,7 +6,9 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* <p>
* 字典对照信息表 实体DTO
...
...
@@ -30,8 +32,9 @@ public class ContrastDictDto implements Serializable {
private
String
colCode
;
@ApiModelProperty
(
value
=
"字典名称"
)
private
String
colName
;
@ApiModelProperty
(
value
=
"标准编码"
)
private
String
gbCode
;
@ApiModelProperty
(
value
=
"标准名称"
)
private
String
gbName
;
@ApiModelProperty
(
value
=
"状态"
)
@NotNull
(
message
=
"状态不能为空"
,
groups
=
{
ValidationGroups
.
Insert
.
class
,
ValidationGroups
.
Update
.
class
})
private
String
status
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/dto/ContrastDto.java
View file @
22527469
...
...
@@ -33,9 +33,9 @@ public class ContrastDto implements Serializable {
private
String
tableId
;
@ApiModelProperty
(
value
=
"数据表"
)
private
String
tableName
;
@ApiModelProperty
(
value
=
"字段主键"
)
@ApiModelProperty
(
value
=
"
对照
字段主键"
)
private
String
columnId
;
@ApiModelProperty
(
value
=
"字段"
)
@ApiModelProperty
(
value
=
"
对照
字段"
)
private
String
columnName
;
@ApiModelProperty
(
value
=
"标准类别主键"
)
private
String
gbTypeId
;
...
...
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/entity/ContrastDictEntity.java
View file @
22527469
package
cn
.
datax
.
service
.
data
.
standard
.
api
.
entity
;
import
cn.datax.common.base.DataScopeBaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -17,7 +18,7 @@ import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"standard_contrast_dict"
)
@TableName
(
value
=
"standard_contrast_dict"
,
autoResultMap
=
true
)
public
class
ContrastDictEntity
extends
DataScopeBaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -28,6 +29,36 @@ public class ContrastDictEntity extends DataScopeBaseEntity {
private
String
contrastId
;
/**
* 数据源
*/
@TableField
(
exist
=
false
)
private
String
sourceName
;
/**
* 数据表
*/
@TableField
(
exist
=
false
)
private
String
tableName
;
/**
* 对照字段
*/
@TableField
(
exist
=
false
)
private
String
columnName
;
/**
* 标准类别编码
*/
@TableField
(
exist
=
false
)
private
String
gbTypeCode
;
/**
* 标准类别名称
*/
@TableField
(
exist
=
false
)
private
String
gbTypeName
;
/**
* 字典编码
*/
private
String
colCode
;
...
...
@@ -38,12 +69,12 @@ public class ContrastDictEntity extends DataScopeBaseEntity {
private
String
colName
;
/**
* 标准编码
*
对照的
标准编码
*/
private
String
g
bCode
;
private
String
contrastG
bCode
;
/**
* 标准名称
*
对照的
标准名称
*/
private
String
g
bName
;
private
String
contrastG
bName
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/entity/ContrastEntity.java
View file @
22527469
...
...
@@ -43,12 +43,12 @@ public class ContrastEntity extends DataScopeBaseEntity {
private
String
tableName
;
/**
* 字段主键
*
对照
字段主键
*/
private
String
columnId
;
/**
* 字段
*
对照
字段
*/
private
String
columnName
;
...
...
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/query/ContrastDictQuery.java
View file @
22527469
...
...
@@ -17,4 +17,8 @@ import lombok.EqualsAndHashCode;
public
class
ContrastDictQuery
extends
BaseQueryParams
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
contrastId
;
private
String
colCode
;
private
String
colName
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/vo/ContrastDictVo.java
View file @
22527469
...
...
@@ -23,9 +23,15 @@ public class ContrastDictVo implements Serializable {
private
String
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
private
String
remark
;
private
String
contrastId
;
private
String
colCode
;
private
String
colName
;
private
String
gbCode
;
private
String
gbName
;
private
String
contrastGbCode
;
private
String
contrastGbName
;
private
String
sourceName
;
private
String
tableName
;
private
String
columnName
;
private
String
gbTypeCode
;
private
String
gbTypeName
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/vo/ContrastVo.java
View file @
22527469
...
...
@@ -23,6 +23,7 @@ public class ContrastVo implements Serializable {
private
String
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
private
String
remark
;
private
String
sourceId
;
private
String
sourceName
;
private
String
tableId
;
...
...
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/vo/DictVo.java
View file @
22527469
...
...
@@ -23,6 +23,7 @@ public class DictVo implements Serializable {
private
String
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
private
String
remark
;
private
String
typeId
;
private
String
gbTypeCode
;
private
String
gbTypeName
;
...
...
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/vo/TypeVo.java
View file @
22527469
...
...
@@ -23,7 +23,7 @@ public class TypeVo implements Serializable {
private
String
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
private
String
createDept
;
private
String
remark
;
private
String
gbTypeCode
;
private
String
gbTypeName
;
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/controller/ContrastController.java
View file @
22527469
...
...
@@ -131,4 +131,10 @@ public class ContrastController extends BaseController {
contrastService
.
deleteContrastBatch
(
ids
);
return
R
.
ok
();
}
@GetMapping
(
"/tree"
)
public
R
getContrastTree
()
{
contrastService
.
getContrastTree
();
return
R
.
ok
().
setData
(
null
);
}
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/controller/ContrastDictController.java
View file @
22527469
...
...
@@ -9,6 +9,7 @@ import cn.datax.service.data.standard.api.vo.ContrastDictVo;
import
cn.datax.service.data.standard.api.query.ContrastDictQuery
;
import
cn.datax.service.data.standard.mapstruct.ContrastDictMapper
;
import
cn.datax.service.data.standard.service.ContrastDictService
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -71,6 +72,9 @@ public class ContrastDictController extends BaseController {
@GetMapping
(
"/page"
)
public
R
getContrastDictPage
(
ContrastDictQuery
contrastDictQuery
)
{
QueryWrapper
<
ContrastDictEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
contrastDictQuery
.
getContrastId
()),
"d.contrast_id"
,
contrastDictQuery
.
getContrastId
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
contrastDictQuery
.
getColCode
()),
"d.col_code"
,
contrastDictQuery
.
getColCode
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
contrastDictQuery
.
getColName
()),
"d.col_name"
,
contrastDictQuery
.
getColName
());
IPage
<
ContrastDictEntity
>
page
=
contrastDictService
.
page
(
new
Page
<>(
contrastDictQuery
.
getPageNum
(),
contrastDictQuery
.
getPageSize
()),
queryWrapper
);
List
<
ContrastDictVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
contrastDictMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
JsonPage
<
ContrastDictVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
...
...
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/dao/ContrastDictDao.java
View file @
22527469
...
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.standard.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.data.standard.api.entity.ContrastDictEntity
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* <p>
...
...
@@ -15,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
ContrastDictDao
extends
BaseDao
<
ContrastDictEntity
>
{
@Override
<
E
extends
IPage
<
ContrastDictEntity
>>
E
selectPage
(
E
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
ContrastDictEntity
>
queryWrapper
);
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/service/ContrastService.java
View file @
22527469
...
...
@@ -25,4 +25,6 @@ public interface ContrastService extends BaseService<ContrastEntity> {
void
deleteContrastById
(
String
id
);
void
deleteContrastBatch
(
List
<
String
>
ids
);
void
getContrastTree
();
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/service/impl/ContrastServiceImpl.java
View file @
22527469
...
...
@@ -64,4 +64,9 @@ public class ContrastServiceImpl extends BaseServiceImpl<ContrastDao, ContrastEn
public
void
deleteContrastBatch
(
List
<
String
>
ids
)
{
contrastDao
.
deleteBatchIds
(
ids
);
}
@Override
public
void
getContrastTree
()
{
}
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/resources/mapper/ContrastDictMapper.xml
View file @
22527469
...
...
@@ -15,8 +15,16 @@
<result
column=
"contrast_id"
property=
"contrastId"
/>
<result
column=
"col_code"
property=
"colCode"
/>
<result
column=
"col_name"
property=
"colName"
/>
<result
column=
"gb_code"
property=
"gbCode"
/>
<result
column=
"gb_name"
property=
"gbName"
/>
<result
column=
"contrast_gb_code"
property=
"contrastGbCode"
/>
<result
column=
"contrast_gb_name"
property=
"contrastGbName"
/>
</resultMap>
<resultMap
id=
"ExtendResultMap"
type=
"cn.datax.service.data.standard.api.entity.ContrastDictEntity"
extends=
"BaseResultMap"
>
<result
column=
"source_name"
property=
"sourceName"
/>
<result
column=
"table_name"
property=
"tableName"
/>
<result
column=
"column_name"
property=
"columnName"
/>
<result
column=
"gb_type_code"
property=
"gbTypeCode"
/>
<result
column=
"gb_type_name"
property=
"gbTypeName"
/>
</resultMap>
<!-- 通用查询结果列 -->
...
...
@@ -29,7 +37,27 @@
update_by,
update_time,
remark,
contrast_id, col_code, col_name,
gb_code,
gb_name
contrast_id, col_code, col_name,
contrast_gb_code, contrast_
gb_name
</sql>
<sql
id=
"Dict_Column_List"
>
${alias}.id,
${alias}.status,
${alias}.create_by,
${alias}.create_time,
${alias}.create_dept,
${alias}.update_by,
${alias}.update_time,
${alias}.remark,
${alias}.contrast_id, ${alias}.col_code, ${alias}.col_name, ${alias}.contrast_gb_code, ${alias}.contrast_gb_name
</sql>
<select
id=
"selectPage"
resultMap=
"ExtendResultMap"
>
SELECT c.source_name, c.table_name, c.column_name, c.gb_type_code, c.gb_type_name,
<include
refid=
"Dict_Column_List"
><property
name=
"alias"
value=
"d"
/></include>
FROM standard_contrast_dict d
LEFT JOIN standard_contrast c ON c.id = d.contrast_id
${ew.customSqlSegment}
</select>
</mapper>
datax-ui/src/api/quality/checkreport.js
View file @
22527469
...
...
@@ -2,7 +2,7 @@ import request from '@/utils/request'
export
function
listRuleType
(
data
)
{
return
request
({
url
:
'/data/quality/ruleTypes/list'
,
url
:
'/data/quality/ruleTypes/
report/
list'
,
method
:
'get'
,
params
:
data
})
...
...
datax-ui/src/api/standard/contrast.js
0 → 100644
View file @
22527469
import
request
from
'@/utils/request'
export
function
getContrastTree
(
data
)
{
return
request
({
url
:
'/data/standard/contrasts/tree'
,
method
:
'get'
,
params
:
data
})
}
export
function
addContrast
(
data
)
{
return
request
({
url
:
'/data/standard/contrasts'
,
method
:
'post'
,
data
:
data
})
}
export
function
updateContrast
(
data
)
{
return
request
({
url
:
'/data/standard/contrasts/'
+
data
.
id
,
method
:
'put'
,
data
:
data
})
}
export
function
delContrast
(
id
)
{
return
request
({
url
:
'/data/standard/contrasts/'
+
id
,
method
:
'delete'
})
}
datax-ui/src/api/standard/contrastdict.js
0 → 100644
View file @
22527469
import
request
from
'@/utils/request'
export
function
pageContrastDict
(
data
)
{
return
request
({
url
:
'/data/standard/contrastDicts/page'
,
method
:
'get'
,
params
:
data
})
}
export
function
getContrastDict
(
id
)
{
return
request
({
url
:
'/data/standard/contrastDicts/'
+
id
,
method
:
'get'
})
}
export
function
delContrastDict
(
id
)
{
return
request
({
url
:
'/data/standard/contrastDicts/'
+
id
,
method
:
'delete'
})
}
export
function
delContrastDicts
(
ids
)
{
return
request
({
url
:
'/data/standard/contrastDicts/batch/'
+
ids
,
method
:
'delete'
})
}
export
function
addContrastDict
(
data
)
{
return
request
({
url
:
'/data/standard/contrastDicts'
,
method
:
'post'
,
data
:
data
})
}
export
function
updateContrastDict
(
data
)
{
return
request
({
url
:
'/data/standard/contrastDicts/'
+
data
.
id
,
method
:
'put'
,
data
:
data
})
}
datax-ui/src/views/quality/checkreport/CheckReportList.vue
0 → 100644
View file @
22527469
<
template
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-card
class=
"box-card tree-wrapper"
shadow=
"always"
>
<div
class=
"body-wrapper"
>
<el-tree
ref=
"ruleType"
:data=
"ruleTypeOptions"
node-key=
"id"
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
default-expand-all
highlight-current
:expand-on-click-node=
"false"
@
node-click=
"handleNodeClick"
>
<template
slot-scope=
"
{ node, data }">
<span
class=
"custom-tree-node"
>
<span
v-if=
"node.level === 1"
><i
class=
"iconfont icon-zuzhi tree-folder"
/>
{{
node
.
label
}}
</span>
<span
v-else
>
{{
node
.
label
}}
(错误数:
<span
style=
"color: #ef5b5b"
>
{{
data
.
checkErrorCount
}}
</span>
)
</span>
</span>
</
template
>
</el-tree>
</div>
</el-card>
</el-col>
<el-col
:span=
"18"
>
<el-card
class=
"box-card"
shadow=
"always"
>
<el-form
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"queryParams.ruleName"
placeholder=
"请输入规则名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"tableDataList"
border
tooltip-effect=
"dark"
:height=
"tableHeight"
style=
"width: 100%;margin: 15px 0;"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
width=
"55"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<
template
v-for=
"(item, index) in tableColumns"
>
<el-table-column
v-if=
"item.show"
:key=
"index"
:prop=
"item.prop"
:label=
"item.label"
:formatter=
"item.formatter"
align=
"center"
show-overflow-tooltip
/>
</
template
>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, sizes, prev, pager, next, jumper"
:current-page
.
sync=
"queryParams.pageNum"
:page-size
.
sync=
"queryParams.pageSize"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</el-card>
</el-col>
</el-row>
</template>
<
script
>
import
{
listRuleType
,
pageCheckReport
}
from
'@/api/quality/checkreport'
export
default
{
name
:
'CheckReportList'
,
data
()
{
return
{
tableHeight
:
document
.
body
.
offsetHeight
-
310
+
'px'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
},
// 遮罩层
loading
:
true
,
// 表格头
tableColumns
:
[
{
prop
:
'ruleName'
,
label
:
'规则名称'
,
show
:
true
},
{
prop
:
'ruleType'
,
label
:
'规则类型'
,
show
:
true
},
{
prop
:
'ruleSource'
,
label
:
'数据源'
,
show
:
true
},
{
prop
:
'ruleTable'
,
label
:
'数据表'
,
show
:
true
},
{
prop
:
'ruleColumn'
,
label
:
'核查字段'
,
show
:
true
},
{
prop
:
'checkTotalCount'
,
label
:
'核查数量'
,
show
:
true
},
{
prop
:
'checkErrorCount'
,
label
:
'报错数量'
,
show
:
true
},
{
prop
:
'checkDate'
,
label
:
'核查时间'
,
show
:
true
}
],
// 表格数据
tableDataList
:
[],
// 总数据条数
total
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
20
,
ruleTypeId
:
''
,
ruleName
:
''
},
// 左侧树
ruleTypeOptions
:
[],
defaultProps
:
{
children
:
'children'
,
label
:
'name'
}
}
},
created
()
{
this
.
getTree
()
this
.
getList
()
},
methods
:
{
getTree
()
{
listRuleType
().
then
(
response
=>
{
if
(
response
.
success
)
{
const
{
data
}
=
response
const
tree
=
{}
tree
.
name
=
'核查规则类型'
tree
.
children
=
data
this
.
ruleTypeOptions
=
[]
this
.
ruleTypeOptions
.
push
(
tree
)
}
})
},
/** 节点单击事件 */
handleNodeClick
(
data
)
{
if
(
data
.
id
)
{
this
.
queryParams
.
ruleTypeId
=
data
.
id
this
.
getList
()
}
},
/** 查询数据源列表 */
getList
()
{
this
.
loading
=
true
pageCheckReport
(
this
.
queryParams
).
then
(
response
=>
{
this
.
loading
=
false
if
(
response
.
success
)
{
const
{
data
}
=
response
this
.
tableDataList
=
data
.
data
this
.
total
=
data
.
total
}
})
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
20
,
ruleTypeId
:
''
,
ruleName
:
''
}
this
.
handleQuery
()
},
handleSizeChange
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
)
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
)
this
.
queryParams
.
pageNum
=
val
this
.
getList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.right-toolbar
{
float
:
right
;
}
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
170px
);
}
.tree-wrapper
{
overflow-y
:
auto
;
.body-wrapper
{
margin
:
-10px
;
::v-deep
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
.tree-folder
{
margin-right
:
5px
;
color
:
#f6cf07
;
}
}
}
}
</
style
>
datax-ui/src/views/quality/checkreport/index.vue
View file @
22527469
<
template
>
<div
class=
"app-container"
>
CheckReport
<transition
name=
"el-zoom-in-center"
>
<check-report-list
v-if=
"options.showList"
@
showCard=
"showCard"
/>
</transition>
</div>
</
template
>
<
script
>
import
CheckReportList
from
'./CheckReportList'
export
default
{
name
:
'CheckReport'
name
:
'CheckReport'
,
components
:
{
CheckReportList
},
data
()
{
return
{
options
:
{
data
:
{},
showList
:
true
}
}
},
methods
:
{
showCard
(
data
)
{
Object
.
assign
(
this
.
options
,
data
)
}
}
}
</
script
>
...
...
datax-ui/src/views/quality/checkrule/CheckRuleAdd.vue
0 → 100644
View file @
22527469
<
template
>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
@
click=
"submitForm"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
class=
"body-wrapper"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"form.ruleName"
placeholder=
"请输入规则名称"
/>
</el-form-item>
<el-form-item
label=
"规则级别"
prop=
"ruleLevel"
>
<el-radio-group
v-model=
"form.ruleLevel"
>
<el-radio
v-for=
"dict in ruleLevelOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"数据源"
prop=
"ruleSourceId"
>
<el-select
v-model=
"form.ruleSourceId"
placeholder=
"请选择数据源"
@
change=
"sourceSelectChanged"
>
<el-option
v-for=
"source in sourceOptions"
:key=
"source.id"
:label=
"source.sourceName"
:value=
"source.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"数据表"
prop=
"ruleTableId"
>
<el-select
v-model=
"form.ruleTableId"
placeholder=
"请选择数据表"
@
change=
"tableSelectChanged"
>
<el-option
v-for=
"table in tableOptions"
:key=
"table.id"
:label=
"table.tableName"
:value=
"table.id"
>
<span
style=
"float: left"
>
{{
table
.
tableName
+
'('
+
table
.
tableComment
+
')'
}}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"核查字段"
prop=
"ruleColumnId"
>
<el-select
v-model=
"form.ruleColumnId"
placeholder=
"请选择核查字段"
@
change=
"columnSelectChanged"
>
<el-option
v-for=
"column in columnOptions"
:key=
"column.id"
:label=
"column.columnName"
:value=
"column.id"
>
<span
style=
"float: left"
>
{{
column
.
columnName
+
'('
+
column
.
columnComment
+
')'
}}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"核查脚本"
prop=
"ruleSql"
>
<el-input
v-model=
"form.ruleSql"
type=
"textarea"
placeholder=
"请输入核查脚本"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</
template
>
<
script
>
import
{
addCheckRule
}
from
'@/api/quality/checkrule'
import
{
listDataSource
}
from
'@/api/metadata/datasource'
import
{
listDataTable
}
from
'@/api/metadata/datatable'
import
{
listDataColumn
}
from
'@/api/metadata/datacolumn'
export
default
{
name
:
'CheckRuleAdd'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
title
:
'核查规则新增'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
ruleName
:
undefined
,
ruleLevel
:
'1'
,
ruleSourceId
:
undefined
,
ruleSource
:
undefined
,
ruleTableId
:
undefined
,
ruleTable
:
undefined
,
ruleColumnId
:
undefined
,
ruleColumn
:
undefined
,
ruleSql
:
undefined
,
status
:
'1'
},
// 表单校验
rules
:
{
ruleName
:
[
{
required
:
true
,
message
:
'规则名称不能为空'
,
trigger
:
'blur'
}
],
ruleSourceId
:
[
{
required
:
true
,
message
:
'数据源不能为空'
,
trigger
:
'blur'
}
],
ruleTableId
:
[
{
required
:
true
,
message
:
'数据表不能为空'
,
trigger
:
'blur'
}
],
ruleColumnId
:
[
{
required
:
true
,
message
:
'核查字段不能为空'
,
trigger
:
'blur'
}
]
},
// 状态数据字典
statusOptions
:
[],
// 规则级别数据字典
ruleLevelOptions
:
[],
sourceOptions
:
[],
tableOptions
:
[],
columnOptions
:
[]
}
},
created
()
{
console
.
log
(
'data:'
+
this
.
data
)
this
.
form
.
ruleTypeId
=
this
.
data
.
ruleTypeId
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getDicts
(
'data_check_rule_level'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
ruleLevelOptions
=
response
.
data
}
})
this
.
getDataSourceList
()
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
getDataSourceList
()
{
listDataSource
().
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
sourceOptions
=
response
.
data
}
})
},
sourceSelectChanged
(
val
)
{
listDataTable
({
sourceId
:
val
}).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableOptions
=
response
.
data
this
.
columnOptions
=
[]
const
source
=
this
.
sourceOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
val
})
this
.
form
.
ruleSource
=
source
.
sourceName
this
.
form
.
ruleTableId
=
''
this
.
form
.
ruleTable
=
''
this
.
form
.
ruleColumnId
=
''
this
.
form
.
ruleColumn
=
''
}
})
},
tableSelectChanged
(
val
)
{
listDataColumn
({
sourceId
:
this
.
form
.
ruleSourceId
,
tableId
:
val
}).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
columnOptions
=
response
.
data
const
table
=
this
.
tableOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
val
})
this
.
form
.
ruleTable
=
table
.
tableName
this
.
form
.
ruleColumnId
=
''
this
.
form
.
ruleColumn
=
''
}
})
},
columnSelectChanged
(
val
)
{
const
column
=
this
.
columnOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
val
})
this
.
form
.
ruleColumn
=
column
.
columnName
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addCheckRule
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
setTimeout
(()
=>
{
// 2秒后跳转列表页
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
}).
catch
(()
=>
{
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
})
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
230px
);
overflow-y
:
auto
;
}
</
style
>
datax-ui/src/views/quality/checkrule/CheckRuleDetail.vue
0 → 100644
View file @
22527469
<
template
>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
class=
"body-wrapper"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
disabled
>
<el-form-item
label=
"规则名称"
>
<el-input
v-model=
"form.ruleName"
/>
</el-form-item>
<el-form-item
label=
"规则级别"
>
<el-radio-group
v-model=
"form.ruleLevel"
>
<el-radio
v-for=
"dict in ruleLevelOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"数据源"
>
<el-select
v-model=
"form.ruleSourceId"
>
<el-option
v-for=
"source in sourceOptions"
:key=
"source.id"
:label=
"source.sourceName"
:value=
"source.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"数据表"
>
<el-select
v-model=
"form.ruleTableId"
>
<el-option
v-for=
"table in tableOptions"
:key=
"table.id"
:label=
"table.tableName"
:value=
"table.id"
>
<span
style=
"float: left"
>
{{
table
.
tableName
+
'('
+
table
.
tableComment
+
')'
}}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"核查字段"
>
<el-select
v-model=
"form.ruleColumnId"
>
<el-option
v-for=
"column in columnOptions"
:key=
"column.id"
:label=
"column.columnName"
:value=
"column.id"
>
<span
style=
"float: left"
>
{{
column
.
columnName
+
'('
+
column
.
columnComment
+
')'
}}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"核查脚本"
prop=
"ruleSql"
>
<el-input
v-model=
"form.ruleSql"
type=
"textarea"
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</
template
>
<
script
>
import
{
getCheckRule
}
from
'@/api/quality/checkrule'
import
{
listDataSource
}
from
'@/api/metadata/datasource'
import
{
listDataTable
}
from
'@/api/metadata/datatable'
import
{
listDataColumn
}
from
'@/api/metadata/datacolumn'
export
default
{
name
:
'CheckRuleDetail'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
title
:
'核查规则详情'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 表单参数
form
:
{},
// 状态数据字典
statusOptions
:
[],
// 规则级别数据字典
ruleLevelOptions
:
[],
sourceOptions
:
[],
tableOptions
:
[],
columnOptions
:
[]
}
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getDicts
(
'data_check_rule_level'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
ruleLevelOptions
=
response
.
data
}
})
this
.
getDataSourceList
()
},
mounted
()
{
this
.
getCheckRule
(
this
.
data
.
id
)
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 获取详情 */
async
getCheckRule
(
id
)
{
this
.
form
=
await
getCheckRule
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
this
.
tableOptions
=
await
listDataTable
({
sourceId
:
this
.
form
.
ruleSourceId
}).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
||
[]
this
.
columnOptions
=
await
listDataColumn
({
sourceId
:
this
.
form
.
ruleSourceId
,
tableId
:
this
.
form
.
ruleTableId
}).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
||
[]
},
getDataSourceList
()
{
listDataSource
().
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
sourceOptions
=
response
.
data
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
230px
);
overflow-y
:
auto
;
}
</
style
>
datax-ui/src/views/quality/checkrule/CheckRuleEdit.vue
0 → 100644
View file @
22527469
<
template
>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
@
click=
"submitForm"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
class=
"body-wrapper"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"form.ruleName"
placeholder=
"请输入规则名称"
/>
</el-form-item>
<el-form-item
label=
"规则级别"
prop=
"ruleLevel"
>
<el-radio-group
v-model=
"form.ruleLevel"
>
<el-radio
v-for=
"dict in ruleLevelOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"数据源"
prop=
"ruleSourceId"
>
<el-select
v-model=
"form.ruleSourceId"
placeholder=
"请选择数据源"
@
change=
"sourceSelectChanged"
>
<el-option
v-for=
"source in sourceOptions"
:key=
"source.id"
:label=
"source.sourceName"
:value=
"source.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"数据表"
prop=
"ruleTableId"
>
<el-select
v-model=
"form.ruleTableId"
placeholder=
"请选择数据表"
@
change=
"tableSelectChanged"
>
<el-option
v-for=
"table in tableOptions"
:key=
"table.id"
:label=
"table.tableName"
:value=
"table.id"
>
<span
style=
"float: left"
>
{{
table
.
tableName
+
'('
+
table
.
tableComment
+
')'
}}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"核查字段"
prop=
"ruleColumnId"
>
<el-select
v-model=
"form.ruleColumnId"
placeholder=
"请选择核查字段"
@
change=
"columnSelectChanged"
>
<el-option
v-for=
"column in columnOptions"
:key=
"column.id"
:label=
"column.columnName"
:value=
"column.id"
>
<span
style=
"float: left"
>
{{
column
.
columnName
+
'('
+
column
.
columnComment
+
')'
}}
</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"核查脚本"
prop=
"ruleSql"
>
<el-input
v-model=
"form.ruleSql"
type=
"textarea"
placeholder=
"请输入核查脚本"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</
template
>
<
script
>
import
{
getCheckRule
,
updateCheckRule
}
from
'@/api/quality/checkrule'
import
{
listDataSource
}
from
'@/api/metadata/datasource'
import
{
listDataTable
}
from
'@/api/metadata/datatable'
import
{
listDataColumn
}
from
'@/api/metadata/datacolumn'
export
default
{
name
:
'CheckRuleEdit'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
title
:
'核查规则编辑'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
ruleName
:
[
{
required
:
true
,
message
:
'规则名称不能为空'
,
trigger
:
'blur'
}
],
ruleSourceId
:
[
{
required
:
true
,
message
:
'数据源不能为空'
,
trigger
:
'change'
}
],
ruleTableId
:
[
{
required
:
true
,
message
:
'数据表不能为空'
,
trigger
:
'change'
}
],
ruleColumnId
:
[
{
required
:
true
,
message
:
'核查字段不能为空'
,
trigger
:
'change'
}
]
},
// 状态数据字典
statusOptions
:
[],
// 规则级别数据字典
ruleLevelOptions
:
[],
sourceOptions
:
[],
tableOptions
:
[],
columnOptions
:
[]
}
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getDicts
(
'data_check_rule_level'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
ruleLevelOptions
=
response
.
data
}
})
this
.
getDataSourceList
()
},
mounted
()
{
this
.
getCheckRule
(
this
.
data
.
id
)
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 获取详情 */
async
getCheckRule
(
id
)
{
this
.
form
=
await
getCheckRule
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
this
.
tableOptions
=
await
listDataTable
({
sourceId
:
this
.
form
.
ruleSourceId
}).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
this
.
columnOptions
=
await
listDataColumn
({
sourceId
:
this
.
form
.
ruleSourceId
,
tableId
:
this
.
form
.
ruleTableId
}).
then
(
response
=>
{
if
(
response
.
success
)
{
return
response
.
data
}
})
},
getDataSourceList
()
{
listDataSource
().
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
sourceOptions
=
response
.
data
}
})
},
sourceSelectChanged
(
val
)
{
listDataTable
({
sourceId
:
val
}).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
tableOptions
=
response
.
data
this
.
columnOptions
=
[]
const
source
=
this
.
sourceOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
val
})
this
.
form
.
ruleSource
=
source
.
sourceName
this
.
form
.
ruleTableId
=
''
this
.
form
.
ruleTable
=
''
this
.
form
.
ruleColumnId
=
''
this
.
form
.
ruleColumn
=
''
}
})
},
tableSelectChanged
(
val
)
{
listDataColumn
({
sourceId
:
this
.
form
.
ruleSourceId
,
tableId
:
val
}).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
columnOptions
=
response
.
data
const
table
=
this
.
tableOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
val
})
this
.
form
.
ruleTable
=
table
.
tableName
this
.
form
.
ruleColumnId
=
''
this
.
form
.
ruleColumn
=
''
}
})
},
columnSelectChanged
(
val
)
{
const
column
=
this
.
columnOptions
.
find
(
function
(
item
)
{
return
item
.
id
===
val
})
this
.
form
.
ruleColumn
=
column
.
columnName
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateCheckRule
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
setTimeout
(()
=>
{
// 2秒后跳转列表页
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
}).
catch
(()
=>
{
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
})
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
230px
);
overflow-y
:
auto
;
}
</
style
>
datax-ui/src/views/quality/checkrule/CheckRuleList.vue
0 → 100644
View file @
22527469
<
template
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-card
class=
"box-card tree-wrapper"
shadow=
"always"
>
<div
class=
"body-wrapper"
>
<el-tree
ref=
"ruleType"
:data=
"ruleTypeOptions"
node-key=
"id"
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
default-expand-all
highlight-current
:expand-on-click-node=
"false"
@
node-click=
"handleNodeClick"
>
<template
slot-scope=
"
{ node, data }">
<span
class=
"custom-tree-node"
>
<span><i
v-if=
"node.level === 1"
class=
"iconfont icon-zuzhi tree-folder"
/>
{{
node
.
label
}}
</span>
</span>
</
template
>
</el-tree>
</div>
</el-card>
</el-col>
<el-col
:span=
"18"
>
<el-card
class=
"box-card"
shadow=
"always"
>
<el-form
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"规则名称"
prop=
"ruleName"
>
<el-input
v-model=
"queryParams.ruleName"
placeholder=
"请输入规则名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"12"
>
<el-button-group>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button>
</el-button-group>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"right-toolbar"
>
<el-tooltip
content=
"密度"
effect=
"dark"
placement=
"top"
>
<el-dropdown
trigger=
"click"
@
command=
"handleCommand"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"colum-height"
/>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"medium"
>
正常
</el-dropdown-item>
<el-dropdown-item
command=
"small"
>
中等
</el-dropdown-item>
<el-dropdown-item
command=
"mini"
>
紧凑
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-tooltip>
<el-tooltip
content=
"刷新"
effect=
"dark"
placement=
"top"
>
<el-button
circle
size=
"mini"
@
click=
"handleRefresh"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shuaxin"
/>
</el-button>
</el-tooltip>
<el-tooltip
content=
"列设置"
effect=
"dark"
placement=
"top"
>
<el-popover
placement=
"bottom"
width=
"100"
trigger=
"click"
>
<el-checkbox-group
v-model=
"checkedTableColumns"
@
change=
"handleCheckedColsChange"
>
<el-checkbox
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.prop"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
<span
slot=
"reference"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shezhi"
/>
</el-button>
</span>
</el-popover>
</el-tooltip>
</div>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tableDataList"
border
tooltip-effect=
"dark"
:size=
"tableSize"
:height=
"tableHeight"
style=
"width: 100%;margin: 15px 0;"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
width=
"55"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<
template
v-for=
"(item, index) in tableColumns"
>
<el-table-column
v-if=
"item.show"
:key=
"index"
:prop=
"item.prop"
:label=
"item.label"
:formatter=
"item.formatter"
align=
"center"
show-overflow-tooltip
/>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, sizes, prev, pager, next, jumper"
:current-page
.
sync=
"queryParams.pageNum"
:page-size
.
sync=
"queryParams.pageSize"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</el-card>
</el-col>
</el-row>
</template>
<
script
>
import
{
listRuleType
,
pageCheckRule
,
delCheckRule
}
from
'@/api/quality/checkrule'
export
default
{
name
:
'CheckRuleList'
,
data
()
{
return
{
tableHeight
:
document
.
body
.
offsetHeight
-
310
+
'px'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 遮罩层
loading
:
true
,
// 表格头
tableColumns
:
[
{
prop
:
'ruleName'
,
label
:
'规则名称'
,
show
:
true
},
{
prop
:
'ruleType'
,
label
:
'规则类型'
,
show
:
true
},
{
prop
:
'ruleSource'
,
label
:
'数据源'
,
show
:
true
},
{
prop
:
'ruleTable'
,
label
:
'数据表'
,
show
:
true
},
{
prop
:
'ruleColumn'
,
label
:
'核查字段'
,
show
:
true
},
{
prop
:
'ruleLevel'
,
label
:
'规则级别'
,
show
:
true
,
formatter
:
this
.
ruleLevelFormatter
},
{
prop
:
'status'
,
label
:
'状态'
,
show
:
true
,
formatter
:
this
.
statusFormatter
},
{
prop
:
'createTime'
,
label
:
'创建时间'
,
show
:
true
}
],
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 表格数据
tableDataList
:
[],
// 总数据条数
total
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
20
,
ruleTypeId
:
''
,
ruleName
:
''
},
// 左侧树
ruleTypeOptions
:
[],
defaultProps
:
{
children
:
'children'
,
label
:
'name'
},
// 规则级别数据字典
ruleLevelOptions
:
[]
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getDicts
(
'data_check_rule_level'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
ruleLevelOptions
=
response
.
data
}
})
this
.
getTree
()
this
.
getList
()
},
mounted
()
{
this
.
initCols
()
},
methods
:
{
getTree
()
{
listRuleType
().
then
(
response
=>
{
if
(
response
.
success
)
{
const
{
data
}
=
response
const
tree
=
{}
tree
.
name
=
'核查规则类型'
tree
.
children
=
data
this
.
ruleTypeOptions
=
[]
this
.
ruleTypeOptions
.
push
(
tree
)
}
})
},
/** 节点单击事件 */
handleNodeClick
(
data
)
{
if
(
data
.
id
)
{
this
.
queryParams
.
ruleTypeId
=
data
.
id
this
.
getList
()
}
},
/** 查询数据源列表 */
getList
()
{
this
.
loading
=
true
pageCheckRule
(
this
.
queryParams
).
then
(
response
=>
{
this
.
loading
=
false
if
(
response
.
success
)
{
const
{
data
}
=
response
this
.
tableDataList
=
data
.
data
this
.
total
=
data
.
total
}
})
},
initCols
()
{
this
.
checkedTableColumns
=
this
.
tableColumns
.
map
(
col
=>
col
.
prop
)
},
handleCheckedColsChange
(
val
)
{
this
.
tableColumns
.
forEach
(
col
=>
{
if
(
!
this
.
checkedTableColumns
.
includes
(
col
.
prop
))
{
col
.
show
=
false
}
else
{
col
.
show
=
true
}
})
},
handleCommand
(
command
)
{
this
.
tableSize
=
command
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
20
,
ruleTypeId
:
''
,
ruleName
:
''
}
this
.
handleQuery
()
},
/** 刷新列表 */
handleRefresh
()
{
this
.
getList
()
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
showOptions
.
data
=
{}
if
(
!
this
.
queryParams
.
ruleTypeId
)
{
this
.
$message
.
warning
(
'请先选择核查规则类型'
)
return
}
this
.
showOptions
.
data
.
ruleTypeId
=
this
.
queryParams
.
ruleTypeId
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
true
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 修改按钮操作 */
handleEdit
(
row
)
{
this
.
showOptions
.
data
.
id
=
row
.
id
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
true
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 详情按钮操作 */
handleDetail
(
row
)
{
this
.
showOptions
.
data
.
id
=
row
.
id
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
true
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
$confirm
(
'选中数据将被永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delCheckRule
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}
})
}).
catch
(()
=>
{
})
},
handleSizeChange
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
)
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
)
this
.
queryParams
.
pageNum
=
val
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
'success'
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
'warning'
>
{
dictLabel
}
<
/el-tag
>
}
},
ruleLevelFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
dictLabel
=
this
.
selectDictLabel
(
this
.
ruleLevelOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
'success'
>
{
dictLabel
}
<
/el-tag
>
}
else
if
(
cellValue
===
'2'
)
{
return
<
el
-
tag
type
=
'warning'
>
{
dictLabel
}
<
/el-tag
>
}
else
if
(
cellValue
===
'3'
)
{
return
<
el
-
tag
type
=
'danger'
>
{
dictLabel
}
<
/el-tag
>
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.right-toolbar
{
float
:
right
;
}
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
170px
);
}
.tree-wrapper
{
overflow-y
:
auto
;
.body-wrapper
{
margin
:
-10px
;
::v-deep
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
.tree-folder
{
margin-right
:
5px
;
color
:
#f6cf07
;
}
}
}
}
</
style
>
datax-ui/src/views/quality/checkrule/index.vue
View file @
22527469
<
template
>
<div
class=
"app-container"
>
CheckRule
<transition
name=
"el-zoom-in-center"
>
<check-rule-list
v-if=
"options.showList"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-top"
>
<check-rule-add
v-if=
"options.showAdd"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-top"
>
<check-rule-edit
v-if=
"options.showEdit"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-bottom"
>
<check-rule-detail
v-if=
"options.showDetail"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
</div>
</
template
>
<
script
>
import
CheckRuleList
from
'./CheckRuleList'
import
CheckRuleAdd
from
'./CheckRuleAdd'
import
CheckRuleEdit
from
'./CheckRuleEdit'
import
CheckRuleDetail
from
'./CheckRuleDetail'
export
default
{
name
:
'CheckRule'
name
:
'CheckRule'
,
components
:
{
CheckRuleList
,
CheckRuleAdd
,
CheckRuleEdit
,
CheckRuleDetail
},
data
()
{
return
{
options
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
}
}
},
methods
:
{
showCard
(
data
)
{
Object
.
assign
(
this
.
options
,
data
)
}
}
}
</
script
>
...
...
datax-ui/src/views/standard/datacontrast/DataContrastAdd.vue
0 → 100644
View file @
22527469
<
template
>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
@
click=
"submitForm"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
class=
"body-wrapper"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"字典编码"
prop=
"colCode"
>
<el-input
v-model=
"form.colCode"
placeholder=
"请输入字典编码"
/>
</el-form-item>
<el-form-item
label=
"字典名称"
prop=
"colName"
>
<el-input
v-model=
"form.colName"
placeholder=
"请输入字典名称"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
disabled
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</
template
>
<
script
>
import
{
addContrastDict
}
from
'@/api/standard/contrastdict'
export
default
{
name
:
'DataContrastAdd'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
title
:
'对照字典新增'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{
contrastId
:
undefined
,
colCode
:
undefined
,
colName
:
undefined
,
status
:
'0'
},
// 表单校验
rules
:
{
colCode
:
[
{
required
:
true
,
message
:
'字典编码不能为空'
,
trigger
:
'blur'
}
],
colName
:
[
{
required
:
true
,
message
:
'字典名称不能为空'
,
trigger
:
'blur'
}
]
},
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
console
.
log
(
'data:'
+
this
.
data
)
this
.
form
.
contrastId
=
this
.
data
.
contrastId
this
.
getDicts
(
'data_contrast_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
addContrastDict
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
setTimeout
(()
=>
{
// 2秒后跳转列表页
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
}).
catch
(()
=>
{
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
})
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
230px
);
overflow-y
:
auto
;
}
</
style
>
datax-ui/src/views/standard/datacontrast/DataContrastDetail.vue
0 → 100644
View file @
22527469
<
template
>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
class=
"body-wrapper"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
disabled
>
<el-form-item
label=
"字典编码"
>
<el-input
v-model=
"form.colCode"
/>
</el-form-item>
<el-form-item
label=
"字典名称"
>
<el-input
v-model=
"form.colName"
/>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-radio-group
v-model=
"form.status"
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</
template
>
<
script
>
import
{
getContrastDict
}
from
'@/api/standard/contrastdict'
export
default
{
name
:
'DataContrastDetail'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
title
:
'对照字典详情'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 表单参数
form
:
{},
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'data_contrast_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
},
mounted
()
{
this
.
getContrastDict
(
this
.
data
.
id
)
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 获取详情 */
getContrastDict
:
function
(
id
)
{
getContrastDict
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
230px
);
overflow-y
:
auto
;
}
</
style
>
datax-ui/src/views/standard/datacontrast/DataContrastEdit.vue
0 → 100644
View file @
22527469
<
template
>
<el-card
class=
"box-card"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
title
}}
</span>
<el-button-group
style=
"float: right;"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
round
:loading=
"loadingOptions.loading"
:disabled=
"loadingOptions.isDisabled"
@
click=
"submitForm"
>
{{
loadingOptions
.
loadingText
}}
</el-button>
<el-button
size=
"mini"
icon=
"el-icon-back"
round
@
click=
"showCard"
>
返回
</el-button>
</el-button-group>
</div>
<div
class=
"body-wrapper"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"字典编码"
prop=
"colCode"
>
<el-input
v-model=
"form.colCode"
placeholder=
"请输入字典编码"
/>
</el-form-item>
<el-form-item
label=
"字典名称"
prop=
"colName"
>
<el-input
v-model=
"form.colName"
placeholder=
"请输入字典名称"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
disabled
>
<el-radio
v-for=
"dict in statusOptions"
:key=
"dict.id"
:label=
"dict.itemText"
>
{{
dict
.
itemValue
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
</div>
</el-card>
</
template
>
<
script
>
import
{
getContrastDict
,
updateContrastDict
}
from
'@/api/standard/contrastdict'
export
default
{
name
:
'DataContrastEdit'
,
props
:
{
data
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
data
()
{
return
{
title
:
'对照字典编辑'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 保存按钮
loadingOptions
:
{
loading
:
false
,
loadingText
:
'保存'
,
isDisabled
:
false
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
colCode
:
[
{
required
:
true
,
message
:
'字典编码不能为空'
,
trigger
:
'blur'
}
],
colName
:
[
{
required
:
true
,
message
:
'字典名称不能为空'
,
trigger
:
'blur'
}
]
},
// 状态数据字典
statusOptions
:
[]
}
},
created
()
{
console
.
log
(
'id:'
+
this
.
data
.
id
)
this
.
getDicts
(
'data_contrast_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
},
mounted
()
{
this
.
getContrastDict
(
this
.
data
.
id
)
},
methods
:
{
showCard
()
{
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 获取详情 */
getContrastDict
:
function
(
id
)
{
getContrastDict
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
}
})
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loadingOptions
.
loading
=
true
this
.
loadingOptions
.
loadingText
=
'保存中...'
this
.
loadingOptions
.
isDisabled
=
true
updateContrastDict
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'保存成功'
)
setTimeout
(()
=>
{
// 2秒后跳转列表页
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
2000
)
}
else
{
this
.
$message
.
error
(
'保存失败'
)
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
}
}).
catch
(()
=>
{
this
.
loadingOptions
.
loading
=
false
this
.
loadingOptions
.
loadingText
=
'保存'
this
.
loadingOptions
.
isDisabled
=
false
})
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
230px
);
overflow-y
:
auto
;
}
</
style
>
datax-ui/src/views/standard/datacontrast/DataContrastList.vue
0 → 100644
View file @
22527469
<
template
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
>
<el-card
class=
"box-card tree-wrapper"
shadow=
"always"
>
<div
class=
"body-wrapper"
>
<el-tree
ref=
"tree"
:data=
"treeOptions"
node-key=
"id"
empty-text=
"加载中,请稍后"
:props=
"defaultProps"
default-expand-all
highlight-current
:expand-on-click-node=
"false"
@
node-click=
"handleNodeClick"
>
<template
slot-scope=
"
{ node, data }">
<span
class=
"custom-tree-node"
@
mouseenter=
"mouseenter(data)"
@
mouseleave=
"mouseleave(data)"
>
<span><i
v-if=
"node.level === 1"
class=
"iconfont icon-zuzhi tree-folder"
/>
{{
node
.
label
}}
</span>
<span
class=
"tree-bts"
>
<i
v-show=
"node.level === 1 && data.show"
class=
"el-icon-circle-plus-outline bt-add"
@
click=
"() => handleAddContrast()"
/>
<i
v-show=
"node.level === 4 && data.show"
class=
"el-icon-edit-outline bt-edit"
@
click=
"() => handleEditContrast(data)"
/>
<i
v-show=
"node.level === 4 && data.show"
class=
"el-icon-delete bt-delete"
@
click=
"() => handleDelContrast(data)"
/>
</span>
</span>
</
template
>
</el-tree>
</div>
</el-card>
</el-col>
<el-col
:span=
"18"
>
<el-card
class=
"box-card"
shadow=
"always"
>
<el-form
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"字典编码"
prop=
"colCode"
>
<el-input
v-model=
"queryParams.colCode"
placeholder=
"请输入字典编码"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"字典名称"
prop=
"colName"
>
<el-input
v-model=
"queryParams.colName"
placeholder=
"请输入字典名称"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"12"
>
<el-button-group>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
新增
</el-button>
</el-button-group>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"right-toolbar"
>
<el-tooltip
content=
"密度"
effect=
"dark"
placement=
"top"
>
<el-dropdown
trigger=
"click"
@
command=
"handleCommand"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"colum-height"
/>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"medium"
>
正常
</el-dropdown-item>
<el-dropdown-item
command=
"small"
>
中等
</el-dropdown-item>
<el-dropdown-item
command=
"mini"
>
紧凑
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-tooltip>
<el-tooltip
content=
"刷新"
effect=
"dark"
placement=
"top"
>
<el-button
circle
size=
"mini"
@
click=
"handleRefresh"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shuaxin"
/>
</el-button>
</el-tooltip>
<el-tooltip
content=
"列设置"
effect=
"dark"
placement=
"top"
>
<el-popover
placement=
"bottom"
width=
"100"
trigger=
"click"
>
<el-checkbox-group
v-model=
"checkedTableColumns"
@
change=
"handleCheckedColsChange"
>
<el-checkbox
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.prop"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
<span
slot=
"reference"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shezhi"
/>
</el-button>
</span>
</el-popover>
</el-tooltip>
</div>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tableDataList"
border
tooltip-effect=
"dark"
:size=
"tableSize"
:height=
"tableHeight"
style=
"width: 100%;margin: 15px 0;"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
width=
"55"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<
template
v-for=
"(item, index) in tableColumns"
>
<el-table-column
v-if=
"item.show"
:key=
"index"
:prop=
"item.prop"
:label=
"item.label"
:formatter=
"item.formatter"
align=
"center"
show-overflow-tooltip
/>
</
template
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"left"
trigger=
"click"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit-outline"
@
click=
"handleEdit(scope.row)"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
slot=
"reference"
>
操作
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, sizes, prev, pager, next, jumper"
:current-page
.
sync=
"queryParams.pageNum"
:page-size
.
sync=
"queryParams.pageSize"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</el-card>
</el-col>
</el-row>
</template>
<
script
>
import
{
getContrastTree
,
delContrast
}
from
'@/api/standard/contrast'
import
{
pageContrastDict
,
delContrastDict
}
from
'@/api/standard/contrastdict'
export
default
{
name
:
'DataContrastList'
,
data
()
{
return
{
tableHeight
:
document
.
body
.
offsetHeight
-
310
+
'px'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
},
// 遮罩层
loading
:
true
,
// 表格头
tableColumns
:
[
{
prop
:
'sourceName'
,
label
:
'数据源'
,
show
:
true
},
{
prop
:
'tableName'
,
label
:
'数据表'
,
show
:
true
},
{
prop
:
'columnName'
,
label
:
'对照字段'
,
show
:
true
},
{
prop
:
'gbTypeCode'
,
label
:
'标准类别编码'
,
show
:
true
},
{
prop
:
'gbTypeName'
,
label
:
'标准类别名称'
,
show
:
true
},
{
prop
:
'colCode'
,
label
:
'字典编码'
,
show
:
true
},
{
prop
:
'colName'
,
label
:
'字典名称'
,
show
:
true
},
{
prop
:
'status'
,
label
:
'状态'
,
show
:
true
,
formatter
:
this
.
statusFormatter
},
{
prop
:
'createTime'
,
label
:
'创建时间'
,
show
:
true
}
],
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 状态数据字典
statusOptions
:
[],
// 表格数据
tableDataList
:
[],
// 总数据条数
total
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
20
,
contrastId
:
''
,
colCode
:
''
,
colName
:
''
},
// 左侧树
treeOptions
:
[],
defaultProps
:
{
children
:
'children'
,
label
:
'label'
}
}
},
created
()
{
this
.
getDicts
(
'sys_common_status'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
statusOptions
=
response
.
data
}
})
this
.
getTree
()
this
.
getList
()
},
mounted
()
{
this
.
initCols
()
},
methods
:
{
getTree
()
{
getContrastTree
().
then
(
response
=>
{
if
(
response
.
success
)
{
const
{
data
}
=
response
const
tree
=
{}
tree
.
label
=
'对照表'
tree
.
children
=
data
this
.
treeOptions
=
[]
this
.
treeOptions
.
push
(
tree
)
}
})
},
/** 节点单击事件 */
handleNodeClick
(
data
,
node
)
{
if
(
node
.
level
===
4
)
{
this
.
queryParams
.
contrastId
=
data
.
id
this
.
getList
()
}
},
/** 树节点鼠标移入移出 */
mouseenter
(
data
)
{
this
.
$set
(
data
,
'show'
,
true
)
},
mouseleave
(
data
)
{
this
.
$set
(
data
,
'show'
,
false
)
},
handleAddContrast
()
{
},
handleEditContrast
(
data
)
{
},
handleDelContrast
(
data
)
{
this
.
$confirm
(
'选中数据将被永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delContrast
(
data
.
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getTree
()
}
})
}).
catch
(()
=>
{
})
},
/** 查询数据源列表 */
getList
()
{
this
.
loading
=
true
pageContrastDict
(
this
.
queryParams
).
then
(
response
=>
{
this
.
loading
=
false
if
(
response
.
success
)
{
const
{
data
}
=
response
this
.
tableDataList
=
data
.
data
this
.
total
=
data
.
total
}
})
},
initCols
()
{
this
.
checkedTableColumns
=
this
.
tableColumns
.
map
(
col
=>
col
.
prop
)
},
handleCheckedColsChange
(
val
)
{
this
.
tableColumns
.
forEach
(
col
=>
{
if
(
!
this
.
checkedTableColumns
.
includes
(
col
.
prop
))
{
col
.
show
=
false
}
else
{
col
.
show
=
true
}
})
},
handleCommand
(
command
)
{
this
.
tableSize
=
command
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
20
,
contrastId
:
''
,
colCode
:
''
,
colName
:
''
}
this
.
handleQuery
()
},
/** 刷新列表 */
handleRefresh
()
{
this
.
getList
()
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
showOptions
.
data
=
{}
if
(
!
this
.
queryParams
.
contrastId
)
{
this
.
$message
.
warning
(
'请先选择对照表字段'
)
return
}
this
.
showOptions
.
data
.
contrastId
=
this
.
queryParams
.
contrastId
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
true
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 修改按钮操作 */
handleEdit
(
row
)
{
this
.
showOptions
.
data
.
id
=
row
.
id
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
true
this
.
showOptions
.
showDetail
=
false
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 详情按钮操作 */
handleDetail
(
row
)
{
this
.
showOptions
.
data
.
id
=
row
.
id
this
.
showOptions
.
showList
=
false
this
.
showOptions
.
showAdd
=
false
this
.
showOptions
.
showEdit
=
false
this
.
showOptions
.
showDetail
=
true
this
.
$emit
(
'showCard'
,
this
.
showOptions
)
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
$confirm
(
'选中数据将被永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delContrastDict
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
getList
()
}
})
}).
catch
(()
=>
{
})
},
handleSizeChange
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
)
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
)
this
.
queryParams
.
pageNum
=
val
this
.
getList
()
},
statusFormatter
(
row
,
column
,
cellValue
,
index
)
{
const
dictLabel
=
this
.
selectDictLabel
(
this
.
statusOptions
,
cellValue
)
if
(
cellValue
===
'1'
)
{
return
<
el
-
tag
type
=
'success'
>
{
dictLabel
}
<
/el-tag
>
}
else
{
return
<
el
-
tag
type
=
'warning'
>
{
dictLabel
}
<
/el-tag
>
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.right-toolbar
{
float
:
right
;
}
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
170px
);
}
.tree-wrapper
{
overflow-y
:
auto
;
.body-wrapper
{
margin
:
-10px
;
::v-deep
.custom-tree-node
{
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
.tree-folder
{
margin-right
:
5px
;
color
:
#f6cf07
;
}
.tree-bts
{
.bt-add
{
color
:
#409eff
;
}
.bt-edit
{
color
:
#67c23a
;
}
.bt-delete
{
color
:
#f56c6c
;
}
i
{
margin-right
:
10px
;
padding
:
0px
;
}
}
}
}
}
</
style
>
datax-ui/src/views/standard/datacontrast/index.vue
View file @
22527469
<
template
>
<div
class=
"app-container"
>
DataContrast
<transition
name=
"el-zoom-in-center"
>
<data-contrast-list
v-if=
"options.showList"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-top"
>
<data-contrast-add
v-if=
"options.showAdd"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-top"
>
<data-contrast-edit
v-if=
"options.showEdit"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
<transition
name=
"el-zoom-in-bottom"
>
<data-contrast-detail
v-if=
"options.showDetail"
:data=
"options.data"
@
showCard=
"showCard"
/>
</transition>
</div>
</
template
>
<
script
>
import
DataContrastList
from
'./DataContrastList'
import
DataContrastAdd
from
'./DataContrastAdd'
import
DataContrastEdit
from
'./DataContrastEdit'
import
DataContrastDetail
from
'./DataContrastDetail'
export
default
{
name
:
'DataContrast'
name
:
'DataContrast'
,
components
:
{
DataContrastList
,
DataContrastAdd
,
DataContrastEdit
,
DataContrastDetail
},
data
()
{
return
{
options
:
{
data
:
{},
showList
:
true
,
showAdd
:
false
,
showEdit
:
false
,
showDetail
:
false
}
}
},
methods
:
{
showCard
(
data
)
{
Object
.
assign
(
this
.
options
,
data
)
}
}
}
</
script
>
...
...
datax-ui/src/views/workflow/business/BusinessAdd.vue
View file @
22527469
...
...
@@ -14,7 +14,7 @@
<el-option
v-for=
"item in menuOptions"
:key=
"item.menuCode"
:label=
"item.menu
Nam
e"
:label=
"item.menu
Cod
e"
:value=
"item.menuCode"
>
<span
style=
"float: left"
>
{{
'业务名称:'
+
item
.
menuName
+
'-业务编码:'
+
item
.
menuCode
}}
</span>
</el-option>
...
...
datax-ui/src/views/workflow/business/BusinessDetail.vue
View file @
22527469
...
...
@@ -13,7 +13,7 @@
<el-option
v-for=
"item in menuOptions"
:key=
"item.menuCode"
:label=
"item.menu
Nam
e"
:label=
"item.menu
Cod
e"
:value=
"item.menuCode"
>
<span
style=
"float: left"
>
{{
'业务名称:'
+
item
.
menuName
+
'-业务编码:'
+
item
.
menuCode
}}
</span>
</el-option>
...
...
datax-ui/src/views/workflow/business/BusinessEdit.vue
View file @
22527469
...
...
@@ -14,7 +14,7 @@
<el-option
v-for=
"item in menuOptions"
:key=
"item.menuCode"
:label=
"item.menu
Nam
e"
:label=
"item.menu
Cod
e"
:value=
"item.menuCode"
>
<span
style=
"float: left"
>
{{
'业务名称:'
+
item
.
menuName
+
'-业务编码:'
+
item
.
menuCode
}}
</span>
</el-option>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment