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
a13adf79
Commit
a13adf79
authored
Oct 12, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目初始化
parent
340ababc
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
347 additions
and
135 deletions
+347
-135
ApiHeader.java
...n/java/cn/datax/service/data/market/api/vo/ApiHeader.java
+0
-1
ServiceHeader.java
...va/cn/datax/service/data/market/api/vo/ServiceHeader.java
+14
-0
ServiceIntegrationController.java
.../integration/controller/ServiceIntegrationController.java
+7
-0
ServiceIntegrationService.java
...market/integration/service/ServiceIntegrationService.java
+3
-0
ServiceIntegrationServiceImpl.java
...tegration/service/impl/ServiceIntegrationServiceImpl.java
+24
-0
ApiExecuteController.java
.../data/market/mapping/controller/ApiExecuteController.java
+0
-25
ApiExecuteService.java
...ervice/data/market/mapping/service/ApiExecuteService.java
+0
-8
ApiExecuteServiceImpl.java
...ta/market/mapping/service/impl/ApiExecuteServiceImpl.java
+0
-31
DataApiController.java
...tax/service/data/market/controller/DataApiController.java
+7
-0
DataApiService.java
.../cn/datax/service/data/market/service/DataApiService.java
+3
-0
DataApiServiceImpl.java
.../service/data/market/service/impl/DataApiServiceImpl.java
+19
-0
MetadataColumnEntity.java
...ervice/data/metadata/api/entity/MetadataColumnEntity.java
+11
-1
MetadataTableEntity.java
...service/data/metadata/api/entity/MetadataTableEntity.java
+5
-1
MetadataColumnVo.java
.../datax/service/data/metadata/api/vo/MetadataColumnVo.java
+3
-0
MetadataTableVo.java
...n/datax/service/data/metadata/api/vo/MetadataTableVo.java
+1
-0
MetadataColumnController.java
...ce/data/metadata/controller/MetadataColumnController.java
+3
-3
MetadataTableController.java
...ice/data/metadata/controller/MetadataTableController.java
+2
-2
MetadataColumnDao.java
...cn/datax/service/data/metadata/dao/MetadataColumnDao.java
+6
-0
MetadataTableDao.java
.../cn/datax/service/data/metadata/dao/MetadataTableDao.java
+6
-0
MetadataColumnMapper.xml
...ervice/src/main/resources/mapper/MetadataColumnMapper.xml
+20
-0
MetadataSourceMapper.xml
...ervice/src/main/resources/mapper/MetadataSourceMapper.xml
+13
-13
MetadataTableMapper.xml
...service/src/main/resources/mapper/MetadataTableMapper.xml
+17
-0
apimapping.js
datax-ui/src/api/market/apimapping.js
+0
-7
dataapi.js
datax-ui/src/api/market/dataapi.js
+7
-0
dataservice.js
datax-ui/src/api/market/dataservice.js
+7
-0
DataApiCall.vue
datax-ui/src/views/market/dataapi/DataApiCall.vue
+8
-15
DataServiceDetail.vue
datax-ui/src/views/market/dataservice/DataServiceDetail.vue
+28
-4
ColumnPane.vue
datax-ui/src/views/metadata/datasearch/ColumnPane.vue
+37
-8
SourcePane.vue
datax-ui/src/views/metadata/datasearch/SourcePane.vue
+59
-8
TablePane.vue
datax-ui/src/views/metadata/datasearch/TablePane.vue
+37
-8
No files found.
datax-modules/data-market-service-parent/data-market-service-api/src/main/java/cn/datax/service/data/market/api/vo/ApiHeader.java
View file @
a13adf79
...
@@ -9,7 +9,6 @@ public class ApiHeader implements Serializable {
...
@@ -9,7 +9,6 @@ public class ApiHeader implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
private
String
authorization
;
private
String
apiKey
;
private
String
apiKey
;
private
String
secretKey
;
private
String
secretKey
;
}
}
datax-modules/data-market-service-parent/data-market-service-api/src/main/java/cn/datax/service/data/market/api/vo/ServiceHeader.java
0 → 100644
View file @
a13adf79
package
cn
.
datax
.
service
.
data
.
market
.
api
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
ServiceHeader
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
serviceKey
;
private
String
secretKey
;
}
datax-modules/data-market-service-parent/data-market-service-integration/src/main/java/cn/datax/service/data/market/integration/controller/ServiceIntegrationController.java
View file @
a13adf79
...
@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import
cn.datax.common.base.BaseController
;
import
cn.datax.common.base.BaseController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -133,4 +134,10 @@ public class ServiceIntegrationController extends BaseController {
...
@@ -133,4 +134,10 @@ public class ServiceIntegrationController extends BaseController {
serviceIntegrationService
.
deleteServiceIntegrationBatch
(
ids
);
serviceIntegrationService
.
deleteServiceIntegrationBatch
(
ids
);
return
R
.
ok
();
return
R
.
ok
();
}
}
@GetMapping
(
"/detail/{id}"
)
public
R
getServiceIntegrationDetailById
(
@PathVariable
String
id
)
{
Map
<
String
,
Object
>
map
=
serviceIntegrationService
.
getServiceIntegrationDetailById
(
id
);
return
R
.
ok
().
setData
(
map
);
}
}
}
datax-modules/data-market-service-parent/data-market-service-integration/src/main/java/cn/datax/service/data/market/integration/service/ServiceIntegrationService.java
View file @
a13adf79
...
@@ -5,6 +5,7 @@ import cn.datax.service.data.market.api.dto.ServiceIntegrationDto;
...
@@ -5,6 +5,7 @@ import cn.datax.service.data.market.api.dto.ServiceIntegrationDto;
import
cn.datax.common.base.BaseService
;
import
cn.datax.common.base.BaseService
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <p>
* <p>
...
@@ -25,4 +26,6 @@ public interface ServiceIntegrationService extends BaseService<ServiceIntegratio
...
@@ -25,4 +26,6 @@ public interface ServiceIntegrationService extends BaseService<ServiceIntegratio
void
deleteServiceIntegrationById
(
String
id
);
void
deleteServiceIntegrationById
(
String
id
);
void
deleteServiceIntegrationBatch
(
List
<
String
>
ids
);
void
deleteServiceIntegrationBatch
(
List
<
String
>
ids
);
Map
<
String
,
Object
>
getServiceIntegrationDetailById
(
String
id
);
}
}
datax-modules/data-market-service-parent/data-market-service-integration/src/main/java/cn/datax/service/data/market/integration/service/impl/ServiceIntegrationServiceImpl.java
View file @
a13adf79
package
cn
.
datax
.
service
.
data
.
market
.
integration
.
service
.
impl
;
package
cn
.
datax
.
service
.
data
.
market
.
integration
.
service
.
impl
;
import
cn.datax.common.utils.MD5Util
;
import
cn.datax.common.utils.SecurityUtil
;
import
cn.datax.service.data.market.api.entity.ServiceIntegrationEntity
;
import
cn.datax.service.data.market.api.entity.ServiceIntegrationEntity
;
import
cn.datax.service.data.market.api.dto.ServiceIntegrationDto
;
import
cn.datax.service.data.market.api.dto.ServiceIntegrationDto
;
import
cn.datax.service.data.market.api.vo.ApiHeader
;
import
cn.datax.service.data.market.api.vo.ServiceHeader
;
import
cn.datax.service.data.market.integration.service.ServiceIntegrationService
;
import
cn.datax.service.data.market.integration.service.ServiceIntegrationService
;
import
cn.datax.service.data.market.integration.mapstruct.ServiceIntegrationMapper
;
import
cn.datax.service.data.market.integration.mapstruct.ServiceIntegrationMapper
;
import
cn.datax.service.data.market.integration.dao.ServiceIntegrationDao
;
import
cn.datax.service.data.market.integration.dao.ServiceIntegrationDao
;
...
@@ -12,7 +16,9 @@ import org.springframework.stereotype.Service;
...
@@ -12,7 +16,9 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <p>
* <p>
...
@@ -67,4 +73,22 @@ public class ServiceIntegrationServiceImpl extends BaseServiceImpl<ServiceIntegr
...
@@ -67,4 +73,22 @@ public class ServiceIntegrationServiceImpl extends BaseServiceImpl<ServiceIntegr
public
void
deleteServiceIntegrationBatch
(
List
<
String
>
ids
)
{
public
void
deleteServiceIntegrationBatch
(
List
<
String
>
ids
)
{
serviceIntegrationDao
.
deleteBatchIds
(
ids
);
serviceIntegrationDao
.
deleteBatchIds
(
ids
);
}
}
@Override
public
Map
<
String
,
Object
>
getServiceIntegrationDetailById
(
String
id
)
{
ServiceIntegrationEntity
serviceIntegrationEntity
=
super
.
getById
(
id
);
ServiceHeader
serviceHeader
=
new
ServiceHeader
();
MD5Util
mt
=
null
;
try
{
mt
=
MD5Util
.
getInstance
();
serviceHeader
.
setSecretKey
(
mt
.
encode
(
id
));
serviceHeader
.
setSecretKey
(
mt
.
encode
(
SecurityUtil
.
getUserId
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
2
);
map
.
put
(
"data"
,
serviceIntegrationMapper
.
toVO
(
serviceIntegrationEntity
));
map
.
put
(
"header"
,
serviceHeader
);
return
map
;
}
}
}
datax-modules/data-market-service-parent/data-market-service-mapping/src/main/java/cn/datax/service/data/market/mapping/controller/ApiExecuteController.java
deleted
100644 → 0
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
market
.
mapping
.
controller
;
import
cn.datax.common.base.BaseController
;
import
cn.datax.common.core.R
;
import
cn.datax.service.data.market.mapping.service.ApiExecuteService
;
import
cn.datax.service.data.market.api.vo.ApiHeader
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/apis"
)
public
class
ApiExecuteController
extends
BaseController
{
@Autowired
private
ApiExecuteService
apiExecuteService
;
@GetMapping
(
value
=
"/{id}/header"
)
public
R
getApiHeader
(
@PathVariable
String
id
){
ApiHeader
apiHeader
=
apiExecuteService
.
getApiHeader
(
id
);
return
R
.
ok
().
setData
(
apiHeader
);
}
}
datax-modules/data-market-service-parent/data-market-service-mapping/src/main/java/cn/datax/service/data/market/mapping/service/ApiExecuteService.java
deleted
100644 → 0
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
market
.
mapping
.
service
;
import
cn.datax.service.data.market.api.vo.ApiHeader
;
public
interface
ApiExecuteService
{
ApiHeader
getApiHeader
(
String
id
);
}
datax-modules/data-market-service-parent/data-market-service-mapping/src/main/java/cn/datax/service/data/market/mapping/service/impl/ApiExecuteServiceImpl.java
deleted
100644 → 0
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
market
.
mapping
.
service
.
impl
;
import
cn.datax.common.utils.MD5Util
;
import
cn.datax.common.utils.SecurityUtil
;
import
cn.datax.common.utils.ThrowableUtil
;
import
cn.datax.service.data.market.mapping.service.ApiExecuteService
;
import
cn.datax.service.data.market.api.vo.ApiHeader
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
@Slf4j
@Service
@Transactional
(
propagation
=
Propagation
.
SUPPORTS
,
readOnly
=
true
,
rollbackFor
=
Exception
.
class
)
public
class
ApiExecuteServiceImpl
implements
ApiExecuteService
{
@Override
public
ApiHeader
getApiHeader
(
String
id
)
{
try
{
ApiHeader
apiHeader
=
new
ApiHeader
();
MD5Util
mt
=
MD5Util
.
getInstance
();
apiHeader
.
setApiKey
(
mt
.
encode
(
id
));
apiHeader
.
setSecretKey
(
mt
.
encode
(
SecurityUtil
.
getUserId
()));
return
apiHeader
;
}
catch
(
Exception
e
)
{
log
.
error
(
"全局异常信息ex={}, StackTrace={}"
,
e
.
getMessage
(),
ThrowableUtil
.
getStackTrace
(
e
));
return
null
;
}
}
}
datax-modules/data-market-service-parent/data-market-service/src/main/java/cn/datax/service/data/market/controller/DataApiController.java
View file @
a13adf79
...
@@ -32,6 +32,7 @@ import cn.datax.common.base.BaseController;
...
@@ -32,6 +32,7 @@ import cn.datax.common.base.BaseController;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -208,4 +209,10 @@ public class DataApiController extends BaseController {
...
@@ -208,4 +209,10 @@ public class DataApiController extends BaseController {
out
.
flush
();
out
.
flush
();
out
.
close
();
out
.
close
();
}
}
@GetMapping
(
"/detail/{id}"
)
public
R
getDataApiDetailById
(
@PathVariable
String
id
)
{
Map
<
String
,
Object
>
map
=
dataApiService
.
getDataApiDetailById
(
id
);
return
R
.
ok
().
setData
(
map
);
}
}
}
datax-modules/data-market-service-parent/data-market-service/src/main/java/cn/datax/service/data/market/service/DataApiService.java
View file @
a13adf79
...
@@ -8,6 +8,7 @@ import cn.datax.service.data.market.api.vo.SqlParseVo;
...
@@ -8,6 +8,7 @@ import cn.datax.service.data.market.api.vo.SqlParseVo;
import
com.aspose.words.Document
;
import
com.aspose.words.Document
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <p>
* <p>
...
@@ -38,4 +39,6 @@ public interface DataApiService extends BaseService<DataApiEntity> {
...
@@ -38,4 +39,6 @@ public interface DataApiService extends BaseService<DataApiEntity> {
void
cancelDataApi
(
String
id
);
void
cancelDataApi
(
String
id
);
Document
wordDataApi
(
String
id
)
throws
Exception
;
Document
wordDataApi
(
String
id
)
throws
Exception
;
Map
<
String
,
Object
>
getDataApiDetailById
(
String
id
);
}
}
datax-modules/data-market-service-parent/data-market-service/src/main/java/cn/datax/service/data/market/service/impl/DataApiServiceImpl.java
View file @
a13adf79
...
@@ -13,6 +13,7 @@ import cn.datax.common.utils.ThrowableUtil;
...
@@ -13,6 +13,7 @@ import cn.datax.common.utils.ThrowableUtil;
import
cn.datax.service.data.market.api.dto.*
;
import
cn.datax.service.data.market.api.dto.*
;
import
cn.datax.service.data.market.api.entity.DataApiEntity
;
import
cn.datax.service.data.market.api.entity.DataApiEntity
;
import
cn.datax.service.data.market.api.enums.ConfigType
;
import
cn.datax.service.data.market.api.enums.ConfigType
;
import
cn.datax.service.data.market.api.vo.ApiHeader
;
import
cn.datax.service.data.market.api.vo.SqlParseVo
;
import
cn.datax.service.data.market.api.vo.SqlParseVo
;
import
cn.datax.service.data.market.service.DataApiService
;
import
cn.datax.service.data.market.service.DataApiService
;
import
cn.datax.service.data.market.mapstruct.DataApiMapper
;
import
cn.datax.service.data.market.mapstruct.DataApiMapper
;
...
@@ -450,4 +451,22 @@ public class DataApiServiceImpl extends BaseServiceImpl<DataApiDao, DataApiEntit
...
@@ -450,4 +451,22 @@ public class DataApiServiceImpl extends BaseServiceImpl<DataApiDao, DataApiEntit
WordUtil
.
getInstance
().
insertWatermarkText
(
doc
,
SecurityUtil
.
getUserName
());
WordUtil
.
getInstance
().
insertWatermarkText
(
doc
,
SecurityUtil
.
getUserName
());
return
doc
;
return
doc
;
}
}
@Override
public
Map
<
String
,
Object
>
getDataApiDetailById
(
String
id
)
{
DataApiEntity
dataApiEntity
=
super
.
getById
(
id
);
ApiHeader
apiHeader
=
new
ApiHeader
();
MD5Util
mt
=
null
;
try
{
mt
=
MD5Util
.
getInstance
();
apiHeader
.
setApiKey
(
mt
.
encode
(
id
));
apiHeader
.
setSecretKey
(
mt
.
encode
(
SecurityUtil
.
getUserId
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
2
);
map
.
put
(
"data"
,
dataApiMapper
.
toVO
(
dataApiEntity
));
map
.
put
(
"header"
,
apiHeader
);
return
map
;
}
}
}
datax-modules/data-metadata-service-parent/data-metadata-service-api/src/main/java/cn/datax/service/data/metadata/api/entity/MetadataColumnEntity.java
View file @
a13adf79
package
cn
.
datax
.
service
.
data
.
metadata
.
api
.
entity
;
package
cn
.
datax
.
service
.
data
.
metadata
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -18,7 +19,7 @@ import java.io.Serializable;
...
@@ -18,7 +19,7 @@ import java.io.Serializable;
*/
*/
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"metadata_column"
)
@TableName
(
value
=
"metadata_column"
,
autoResultMap
=
true
)
public
class
MetadataColumnEntity
implements
Serializable
{
public
class
MetadataColumnEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -88,4 +89,13 @@ public class MetadataColumnEntity implements Serializable {
...
@@ -88,4 +89,13 @@ public class MetadataColumnEntity implements Serializable {
* 数据默认值
* 数据默认值
*/
*/
private
String
dataDefault
;
private
String
dataDefault
;
@TableField
(
exist
=
false
)
private
String
sourceName
;
@TableField
(
exist
=
false
)
private
String
tableName
;
@TableField
(
exist
=
false
)
private
String
tableComment
;
}
}
datax-modules/data-metadata-service-parent/data-metadata-service-api/src/main/java/cn/datax/service/data/metadata/api/entity/MetadataTableEntity.java
View file @
a13adf79
package
cn
.
datax
.
service
.
data
.
metadata
.
api
.
entity
;
package
cn
.
datax
.
service
.
data
.
metadata
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -18,7 +19,7 @@ import java.io.Serializable;
...
@@ -18,7 +19,7 @@ import java.io.Serializable;
*/
*/
@Data
@Data
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"metadata_table"
)
@TableName
(
value
=
"metadata_table"
,
autoResultMap
=
true
)
public
class
MetadataTableEntity
implements
Serializable
{
public
class
MetadataTableEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -43,4 +44,7 @@ public class MetadataTableEntity implements Serializable {
...
@@ -43,4 +44,7 @@ public class MetadataTableEntity implements Serializable {
* 表注释
* 表注释
*/
*/
private
String
tableComment
;
private
String
tableComment
;
@TableField
(
exist
=
false
)
private
String
sourceName
;
}
}
datax-modules/data-metadata-service-parent/data-metadata-service-api/src/main/java/cn/datax/service/data/metadata/api/vo/MetadataColumnVo.java
View file @
a13adf79
...
@@ -30,4 +30,7 @@ public class MetadataColumnVo implements Serializable {
...
@@ -30,4 +30,7 @@ public class MetadataColumnVo implements Serializable {
private
String
dataPrecision
;
private
String
dataPrecision
;
private
String
dataScale
;
private
String
dataScale
;
private
String
dataDefault
;
private
String
dataDefault
;
private
String
sourceName
;
private
String
tableName
;
private
String
tableComment
;
}
}
datax-modules/data-metadata-service-parent/data-metadata-service-api/src/main/java/cn/datax/service/data/metadata/api/vo/MetadataTableVo.java
View file @
a13adf79
...
@@ -21,4 +21,5 @@ public class MetadataTableVo implements Serializable {
...
@@ -21,4 +21,5 @@ public class MetadataTableVo implements Serializable {
private
String
sourceId
;
private
String
sourceId
;
private
String
tableName
;
private
String
tableName
;
private
String
tableComment
;
private
String
tableComment
;
private
String
sourceName
;
}
}
datax-modules/data-metadata-service-parent/data-metadata-service/src/main/java/cn/datax/service/data/metadata/controller/MetadataColumnController.java
View file @
a13adf79
...
@@ -85,9 +85,9 @@ public class MetadataColumnController extends BaseController {
...
@@ -85,9 +85,9 @@ public class MetadataColumnController extends BaseController {
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
getDataMetadataColumnPage
(
MetadataColumnQuery
metadataColumnQuery
)
{
public
R
getDataMetadataColumnPage
(
MetadataColumnQuery
metadataColumnQuery
)
{
QueryWrapper
<
MetadataColumnEntity
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
MetadataColumnEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
metadataColumnQuery
.
getColumnName
()),
"column_name"
,
metadataColumnQuery
.
getColumnName
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
metadataColumnQuery
.
getColumnName
()),
"c
.c
olumn_name"
,
metadataColumnQuery
.
getColumnName
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
metadataColumnQuery
.
getSourceId
()),
"source_id"
,
metadataColumnQuery
.
getSourceId
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
metadataColumnQuery
.
getSourceId
()),
"
c.
source_id"
,
metadataColumnQuery
.
getSourceId
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
metadataColumnQuery
.
getTableId
()),
"table_id"
,
metadataColumnQuery
.
getTableId
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
metadataColumnQuery
.
getTableId
()),
"
c.
table_id"
,
metadataColumnQuery
.
getTableId
());
IPage
<
MetadataColumnEntity
>
page
=
metadataColumnService
.
page
(
new
Page
<>(
metadataColumnQuery
.
getPageNum
(),
metadataColumnQuery
.
getPageSize
()),
queryWrapper
);
IPage
<
MetadataColumnEntity
>
page
=
metadataColumnService
.
page
(
new
Page
<>(
metadataColumnQuery
.
getPageNum
(),
metadataColumnQuery
.
getPageSize
()),
queryWrapper
);
List
<
MetadataColumnVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
metadataColumnMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
List
<
MetadataColumnVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
metadataColumnMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
JsonPage
<
MetadataColumnVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
JsonPage
<
MetadataColumnVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
...
...
datax-modules/data-metadata-service-parent/data-metadata-service/src/main/java/cn/datax/service/data/metadata/controller/MetadataTableController.java
View file @
a13adf79
...
@@ -83,8 +83,8 @@ public class MetadataTableController extends BaseController {
...
@@ -83,8 +83,8 @@ public class MetadataTableController extends BaseController {
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
getDataMetadataTablePage
(
MetadataTableQuery
metadataTableQuery
)
{
public
R
getDataMetadataTablePage
(
MetadataTableQuery
metadataTableQuery
)
{
QueryWrapper
<
MetadataTableEntity
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
MetadataTableEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
metadataTableQuery
.
getTableName
()),
"table_name"
,
metadataTableQuery
.
getTableName
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
metadataTableQuery
.
getTableName
()),
"t
.t
able_name"
,
metadataTableQuery
.
getTableName
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
metadataTableQuery
.
getSourceId
()),
"source_id"
,
metadataTableQuery
.
getSourceId
());
queryWrapper
.
eq
(
StrUtil
.
isNotBlank
(
metadataTableQuery
.
getSourceId
()),
"
t.
source_id"
,
metadataTableQuery
.
getSourceId
());
IPage
<
MetadataTableEntity
>
page
=
metadataTableService
.
page
(
new
Page
<>(
metadataTableQuery
.
getPageNum
(),
metadataTableQuery
.
getPageSize
()),
queryWrapper
);
IPage
<
MetadataTableEntity
>
page
=
metadataTableService
.
page
(
new
Page
<>(
metadataTableQuery
.
getPageNum
(),
metadataTableQuery
.
getPageSize
()),
queryWrapper
);
List
<
MetadataTableVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
metadataTableMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
List
<
MetadataTableVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
metadataTableMapper:
:
toVO
).
collect
(
Collectors
.
toList
());
JsonPage
<
MetadataTableVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
JsonPage
<
MetadataTableVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
...
...
datax-modules/data-metadata-service-parent/data-metadata-service/src/main/java/cn/datax/service/data/metadata/dao/MetadataColumnDao.java
View file @
a13adf79
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.metadata.dao;
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.metadata.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.data.metadata.api.entity.MetadataColumnEntity
;
import
cn.datax.service.data.metadata.api.entity.MetadataColumnEntity
;
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.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* <p>
* <p>
...
@@ -15,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -15,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
@Mapper
public
interface
MetadataColumnDao
extends
BaseDao
<
MetadataColumnEntity
>
{
public
interface
MetadataColumnDao
extends
BaseDao
<
MetadataColumnEntity
>
{
@Override
<
E
extends
IPage
<
MetadataColumnEntity
>>
E
selectPage
(
E
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
MetadataColumnEntity
>
queryWrapper
);
}
}
datax-modules/data-metadata-service-parent/data-metadata-service/src/main/java/cn/datax/service/data/metadata/dao/MetadataTableDao.java
View file @
a13adf79
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.metadata.dao;
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.metadata.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.data.metadata.api.entity.MetadataTableEntity
;
import
cn.datax.service.data.metadata.api.entity.MetadataTableEntity
;
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.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* <p>
* <p>
...
@@ -15,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -15,4 +19,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
@Mapper
public
interface
MetadataTableDao
extends
BaseDao
<
MetadataTableEntity
>
{
public
interface
MetadataTableDao
extends
BaseDao
<
MetadataTableEntity
>
{
@Override
<
E
extends
IPage
<
MetadataTableEntity
>>
E
selectPage
(
E
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
MetadataTableEntity
>
queryWrapper
);
}
}
datax-modules/data-metadata-service-parent/data-metadata-service/src/main/resources/mapper/MetadataColumnMapper.xml
View file @
a13adf79
...
@@ -19,10 +19,30 @@
...
@@ -19,10 +19,30 @@
<result
column=
"data_default"
property=
"dataDefault"
/>
<result
column=
"data_default"
property=
"dataDefault"
/>
</resultMap>
</resultMap>
<resultMap
id=
"ExtendResultMap"
type=
"cn.datax.service.data.metadata.api.entity.MetadataColumnEntity"
extends=
"BaseResultMap"
>
<result
column=
"source_name"
property=
"sourceName"
/>
<result
column=
"table_name"
property=
"tableName"
/>
<result
column=
"table_comment"
property=
"tableComment"
/>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,
id,
source_id, table_id, column_name, column_comment, column_key, column_nullable, column_position, data_type, data_length, data_precision, data_scale, data_default
source_id, table_id, column_name, column_comment, column_key, column_nullable, column_position, data_type, data_length, data_precision, data_scale, data_default
</sql>
</sql>
<sql
id=
"Column_Column_List"
>
${alias}.id,
${alias}.source_id, ${alias}.table_id, ${alias}.column_name, ${alias}.column_comment, ${alias}.column_key, ${alias}.column_nullable, ${alias}.column_position, ${alias}.data_type, ${alias}.data_length, ${alias}.data_precision, ${alias}.data_scale, ${alias}.data_default
</sql>
<select
id=
"selectPage"
resultMap=
"ExtendResultMap"
>
SELECT s.source_name, t.table_name, t.table_comment,
<include
refid=
"Column_Column_List"
><property
name=
"alias"
value=
"c"
/></include>
FROM metadata_column c
LEFT JOIN metadata_source s ON s.id = c.source_id
LEFT JOIN metadata_table t ON t.id = c.table_id
${ew.customSqlSegment}
</select>
</mapper>
</mapper>
datax-modules/data-metadata-service-parent/data-metadata-service/src/main/resources/mapper/MetadataSourceMapper.xml
View file @
a13adf79
...
@@ -34,23 +34,23 @@
...
@@ -34,23 +34,23 @@
db_type, source_name, is_sync
db_type, source_name, is_sync
</sql>
</sql>
<sql
id=
"
Extend
_Column_List"
>
<sql
id=
"
Source
_Column_List"
>
id,
${alias}.
id,
status,
${alias}.
status,
create_by,
${alias}.
create_by,
create_time,
${alias}.
create_time,
create_dept,
${alias}.
create_dept,
update_by,
${alias}.
update_by,
update_time,
${alias}.
update_time,
remark,
${alias}.
remark,
db_type, source_name, source_sync,
db_schema
${alias}.db_type, ${alias}.source_name, ${alias}.is_sync, ${alias}.
db_schema
</sql>
</sql>
<select
id=
"selectById"
resultMap=
"ExtendResultMap"
>
<select
id=
"selectById"
resultMap=
"ExtendResultMap"
>
SELECT
SELECT
<include
refid=
"
Extend_Column_List"
></include>
<include
refid=
"
Source_Column_List"
><property
name=
"alias"
value=
"s"
/
></include>
FROM metadata_source
FROM metadata_source
s
WHERE 1=1 AND id = #{id}
WHERE 1=1 AND
s.
id = #{id}
</select>
</select>
<select
id=
"selectList"
resultMap=
"BaseResultMap"
>
<select
id=
"selectList"
resultMap=
"BaseResultMap"
>
...
...
datax-modules/data-metadata-service-parent/data-metadata-service/src/main/resources/mapper/MetadataTableMapper.xml
View file @
a13adf79
...
@@ -10,10 +10,27 @@
...
@@ -10,10 +10,27 @@
<result
column=
"table_comment"
property=
"tableComment"
/>
<result
column=
"table_comment"
property=
"tableComment"
/>
</resultMap>
</resultMap>
<resultMap
id=
"ExtendResultMap"
type=
"cn.datax.service.data.metadata.api.entity.MetadataTableEntity"
extends=
"BaseResultMap"
>
<result
column=
"source_name"
property=
"sourceName"
/>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id,
id,
source_id, table_name, table_comment
source_id, table_name, table_comment
</sql>
</sql>
<sql
id=
"Table_Column_List"
>
${alias}.id,
${alias}.source_id, ${alias}.table_name, ${alias}.table_comment
</sql>
<select
id=
"selectPage"
resultMap=
"ExtendResultMap"
>
SELECT s.source_name,
<include
refid=
"Table_Column_List"
><property
name=
"alias"
value=
"t"
/></include>
FROM metadata_table t
LEFT JOIN metadata_source s ON s.id = t.source_id
${ew.customSqlSegment}
</select>
</mapper>
</mapper>
datax-ui/src/api/market/apimapping.js
View file @
a13adf79
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
export
function
getApiHeader
(
id
)
{
return
request
({
url
:
'/data/api/apis/'
+
id
+
'/header'
,
method
:
'get'
})
}
export
function
getApiCall
(
url
,
header
,
data
)
{
export
function
getApiCall
(
url
,
header
,
data
)
{
return
request
({
return
request
({
url
:
'/data/api/'
+
url
,
url
:
'/data/api/'
+
url
,
...
...
datax-ui/src/api/market/dataapi.js
View file @
a13adf79
...
@@ -89,3 +89,10 @@ export function word(id) {
...
@@ -89,3 +89,10 @@ export function word(id) {
responseType
:
'blob'
responseType
:
'blob'
})
})
}
}
export
function
getDataApiDetail
(
id
)
{
return
request
({
url
:
'/data/market/dataApis/detail/'
+
id
,
method
:
'get'
})
}
datax-ui/src/api/market/dataservice.js
View file @
a13adf79
...
@@ -44,3 +44,10 @@ export function updateDataService(data) {
...
@@ -44,3 +44,10 @@ export function updateDataService(data) {
data
:
data
data
:
data
})
})
}
}
export
function
getDataServiceDetail
(
id
)
{
return
request
({
url
:
`/data/service/services/detail/
${
id
}
`
,
method
:
'get'
})
}
datax-ui/src/views/market/dataapi/DataApiCall.vue
View file @
a13adf79
...
@@ -161,8 +161,8 @@
...
@@ -161,8 +161,8 @@
</template>
</template>
<
script
>
<
script
>
import
{
getDataApi
}
from
'@/api/market/dataapi'
import
{
getDataApi
Detail
}
from
'@/api/market/dataapi'
import
{
getApi
Header
,
getApi
Call
,
postApiCall
}
from
'@/api/market/apimapping'
import
{
getApiCall
,
postApiCall
}
from
'@/api/market/apimapping'
export
default
{
export
default
{
name
:
'DataApiCall'
,
name
:
'DataApiCall'
,
...
@@ -216,7 +216,6 @@ export default {
...
@@ -216,7 +216,6 @@ export default {
this
.
paramTypeOptions
=
response
.
data
this
.
paramTypeOptions
=
response
.
data
}
}
})
})
this
.
getApiHeader
(
this
.
data
.
id
)
},
},
mounted
()
{
mounted
()
{
this
.
getDataApi
(
this
.
data
.
id
)
this
.
getDataApi
(
this
.
data
.
id
)
...
@@ -227,19 +226,13 @@ export default {
...
@@ -227,19 +226,13 @@ export default {
},
},
/** 获取详情 */
/** 获取详情 */
getDataApi
:
function
(
id
)
{
getDataApi
:
function
(
id
)
{
getDataApi
(
id
).
then
(
response
=>
{
getDataApi
Detail
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
const
{
data
}
=
response
}
this
.
form
=
data
.
data
})
this
.
apiHeader
=
data
.
header
},
this
.
apiHeaderList
.
push
({
'KEY'
:
'api_key'
,
'VALUE'
:
data
.
header
.
apiKey
,
'DESCRIPTION'
:
''
})
getApiHeader
:
function
(
id
)
{
this
.
apiHeaderList
.
push
({
'KEY'
:
'secret_key'
,
'VALUE'
:
data
.
header
.
secretKey
,
'DESCRIPTION'
:
''
})
getApiHeader
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
const
data
=
response
.
data
this
.
apiHeader
=
data
this
.
apiHeaderList
.
push
({
'KEY'
:
'api_key'
,
'VALUE'
:
this
.
apiHeader
.
apiKey
,
'DESCRIPTION'
:
''
})
this
.
apiHeaderList
.
push
({
'KEY'
:
'secret_key'
,
'VALUE'
:
this
.
apiHeader
.
secretKey
,
'DESCRIPTION'
:
''
})
}
}
})
})
},
},
...
...
datax-ui/src/views/market/dataservice/DataServiceDetail.vue
View file @
a13adf79
...
@@ -7,6 +7,26 @@
...
@@ -7,6 +7,26 @@
</el-button-group>
</el-button-group>
</div>
</div>
<div
class=
"body-wrapper"
>
<div
class=
"body-wrapper"
>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"请求头"
>
<el-table
:data=
"serviceHeaderList"
stripe
border
:max-height=
"300"
style=
"width: 100%; margin: 15px 0;"
>
<el-table-column
label=
"序号"
width=
"55"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"KEY"
label=
"键"
align=
"center"
show-overflow-tooltip
/>
<el-table-column
prop=
"VALUE"
label=
"值"
align=
"center"
show-overflow-tooltip
/>
<el-table-column
prop=
"DESCRIPTION"
label=
"描述"
align=
"center"
show-overflow-tooltip
/>
</el-table>
</el-tab-pane>
</el-tabs>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
disabled
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
disabled
>
<el-form-item
label=
"服务名称"
>
<el-form-item
label=
"服务名称"
>
<el-input
v-model=
"form.serviceName"
placeholder=
"请输入服务名称"
/>
<el-input
v-model=
"form.serviceName"
placeholder=
"请输入服务名称"
/>
...
@@ -77,7 +97,7 @@
...
@@ -77,7 +97,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
getDataService
}
from
'@/api/market/dataservice'
import
{
getDataService
Detail
}
from
'@/api/market/dataservice'
export
default
{
export
default
{
name
:
'DataServiceDetail'
,
name
:
'DataServiceDetail'
,
...
@@ -105,7 +125,8 @@ export default {
...
@@ -105,7 +125,8 @@ export default {
// 状态数据字典
// 状态数据字典
statusOptions
:
[],
statusOptions
:
[],
serviceTypeOptions
:
[],
serviceTypeOptions
:
[],
httpMethodOptions
:
[]
httpMethodOptions
:
[],
serviceHeaderList
:
[]
}
}
},
},
created
()
{
created
()
{
...
@@ -135,9 +156,12 @@ export default {
...
@@ -135,9 +156,12 @@ export default {
},
},
/** 获取详情 */
/** 获取详情 */
getDataService
:
function
(
id
)
{
getDataService
:
function
(
id
)
{
getDataService
(
id
).
then
(
response
=>
{
getDataService
Detail
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
if
(
response
.
success
)
{
this
.
form
=
response
.
data
const
{
data
}
=
response
this
.
form
=
data
.
data
this
.
serviceHeaderList
.
push
({
'KEY'
:
'service_key'
,
'VALUE'
:
data
.
header
.
serviceKey
,
'DESCRIPTION'
:
''
})
this
.
serviceHeaderList
.
push
({
'KEY'
:
'secret_key'
,
'VALUE'
:
data
.
header
.
secretKey
,
'DESCRIPTION'
:
''
})
}
}
})
})
}
}
...
...
datax-ui/src/views/metadata/datasearch/ColumnPane.vue
View file @
a13adf79
<
template
>
<
template
>
<
div
class=
"app-container
"
>
<
ul
class=
"list-group
"
>
ColumnPane
<li
v-for=
"(item, index) in data"
:key=
"index"
class=
"list-group-item"
>
<div
v-for=
"(item, index) in data"
:key=
"index"
>
<span
class=
"list-group-item-heading"
>
{{
item
.
columnName
}}
(
{{
item
.
columnComment
}}
)
</span
>
{{
item
.
id
}}
<p
class=
"list-group-item-text"
>
数据源:
{{
item
.
sourceName
}}
数据表:
{{
item
.
tableName
}}
(
{{
item
.
tableComment
}}
)
</p>
</
div
>
</
li
>
</
div
>
</
ul
>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -13,7 +13,7 @@ export default {
...
@@ -13,7 +13,7 @@ export default {
props
:
{
props
:
{
data
:
{
data
:
{
type
:
Array
,
type
:
Array
,
default
:
function
()
{
default
:
function
()
{
return
[]
return
[]
}
}
}
}
...
@@ -22,5 +22,34 @@ export default {
...
@@ -22,5 +22,34 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.list-group
{
margin-bottom
:
20px
;
padding-left
:
0
;
.list-group-item
{
position
:
relative
;
display
:
block
;
padding
:
10px
15px
;
margin-bottom
:
-1px
;
background-color
:
#fff
;
border
:
1px
solid
#ddd
;
&:first-child
{
border-top-left-radius
:
4px
;
border-top-right-radius
:
4px
;
}
&
:last-child
{
margin-bottom
:
0
;
border-bottom-left-radius
:
4px
;
border-bottom-right-radius
:
4px
;
}
.list-group-item-heading
{
margin-top
:
0
;
margin-bottom
:
5px
;
}
.list-group-item-text
{
margin-bottom
:
0
;
line-height
:
1.3
;
font-size
:
14px
;
}
}
}
</
style
>
</
style
>
datax-ui/src/views/metadata/datasearch/SourcePane.vue
View file @
a13adf79
<
template
>
<
template
>
<div
class=
"app-container"
>
<ul
class=
"list-group"
>
SourcePane
<li
v-for=
"(item, index) in data"
:key=
"index"
class=
"list-group-item"
>
<div
v-for=
"(item, index) in data"
:key=
"index"
>
<span
class=
"list-group-item-heading"
>
{{
item
.
sourceName
}}
{{
item
.
id
}}
<el-badge
v-if=
"item.isSync === '0'"
value=
"未同步"
type=
"danger"
/>
</div>
<el-badge
v-if=
"item.isSync === '1'"
value=
"已同步"
type=
"success"
/>
</div>
</span>
<p
class=
"list-group-item-text"
>
数据源类型:
{{
item
.
dbTypeName
}}
</p>
</li>
</ul>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -13,14 +16,62 @@ export default {
...
@@ -13,14 +16,62 @@ export default {
props
:
{
props
:
{
data
:
{
data
:
{
type
:
Array
,
type
:
Array
,
default
:
function
()
{
default
:
function
()
{
return
[]
return
[]
}
}
}
}
},
data
()
{
return
{
// 数据源类型数据字典
dbTypeOptions
:
[]
}
},
created
()
{
this
.
getDicts
(
'data_db_type'
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
dbTypeOptions
=
response
.
data
this
.
data
.
map
(
d
=>
{
const
item
=
this
.
dbTypeOptions
.
find
((
item
,
index
,
arr
)
=>
{
return
item
.
itemText
===
d
.
dbType
})
d
.
dbTypeName
=
item
?
item
.
itemValue
:
''
})
}
})
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.list-group
{
margin-bottom
:
20px
;
padding-left
:
0
;
.list-group-item
{
position
:
relative
;
display
:
block
;
padding
:
10px
15px
;
margin-bottom
:
-1px
;
background-color
:
#fff
;
border
:
1px
solid
#ddd
;
&:first-child
{
border-top-left-radius
:
4px
;
border-top-right-radius
:
4px
;
}
&
:last-child
{
margin-bottom
:
0
;
border-bottom-left-radius
:
4px
;
border-bottom-right-radius
:
4px
;
}
.list-group-item-heading
{
margin-top
:
0
;
margin-bottom
:
5px
;
}
.list-group-item-text
{
margin-bottom
:
0
;
line-height
:
1.3
;
font-size
:
14px
;
}
}
}
</
style
>
</
style
>
datax-ui/src/views/metadata/datasearch/TablePane.vue
View file @
a13adf79
<
template
>
<
template
>
<
div
class=
"app-container
"
>
<
ul
class=
"list-group
"
>
TablePane
<li
v-for=
"(item, index) in data"
:key=
"index"
class=
"list-group-item"
>
<div
v-for=
"(item, index) in data"
:key=
"index"
>
<span
class=
"list-group-item-heading"
>
{{
item
.
tableName
}}
(
{{
item
.
tableComment
}}
)
</span
>
{{
item
.
id
}}
<p
class=
"list-group-item-text"
>
数据源:
{{
item
.
sourceName
}}
</p>
</
div
>
</
li
>
</
div
>
</
ul
>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -13,7 +13,7 @@ export default {
...
@@ -13,7 +13,7 @@ export default {
props
:
{
props
:
{
data
:
{
data
:
{
type
:
Array
,
type
:
Array
,
default
:
function
()
{
default
:
function
()
{
return
[]
return
[]
}
}
}
}
...
@@ -22,5 +22,34 @@ export default {
...
@@ -22,5 +22,34 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.list-group
{
margin-bottom
:
20px
;
padding-left
:
0
;
.list-group-item
{
position
:
relative
;
display
:
block
;
padding
:
10px
15px
;
margin-bottom
:
-1px
;
background-color
:
#fff
;
border
:
1px
solid
#ddd
;
&:first-child
{
border-top-left-radius
:
4px
;
border-top-right-radius
:
4px
;
}
&
:last-child
{
margin-bottom
:
0
;
border-bottom-left-radius
:
4px
;
border-bottom-right-radius
:
4px
;
}
.list-group-item-heading
{
margin-top
:
0
;
margin-bottom
:
5px
;
}
.list-group-item-text
{
margin-bottom
:
0
;
line-height
:
1.3
;
font-size
:
14px
;
}
}
}
</
style
>
</
style
>
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