f8d07716 by xukangle

update: 联调分类分级目录接口

1 parent e74fabf2
# 页面标题
VITE_APP_TITLE = 数据资产管理系统
# 接口域名
VITE_API_BASEURL = https://www.zgsjzc.com/api
VITE_API_BASEURL = http://192.168.6.20:28052/
# VITE_API_BASEURL = http://49.4.26.201:31709/
# # 平台用户 接口请地址
# VITE_APP_USER_API_BASEURL = gateway-server
# # 系统管理 接口地址
# VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# # 文件上传请求地址
# VITE_APP_ADD_FILE = ms-daop-import-data-service
# # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
# VITE_APP_DEBUG_TOOL =
# # 是否开启代理
# VITE_OPEN_PROXY = true
# # vite serve base
# VITE_SERVE_BASE = /
# # 流程设计访问地址
# VITE_BPMN_URL = https://workflow.zgsjzc.com
# # 数据标准、元数据、数据目录 接口地址
# VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
# #数据质量接口地址
# VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
# #门户接口
# VITE_API_PORTALURL = https://www.zgsjzc.com/portal
# #数据资产接口地址
# VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
# #数据同步接口地址
# VITE_API_DATA_SYNC = ms-swzl-data-sync-service
# #消息接口
# VITE_API_MESSAGE = ms-swzl-message-notification-service
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server
#AUTH服务
VITE_APP_AUTH_URL = 'ms-daop-auth-service'
# 系统管理 接口地址
VITE_APP_API_BASEURL = ms-daop-zcgl-system-manager-service
# 文件上传请求地址
VITE_APP_ADD_FILE = ms-daop-import-data-service
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
......@@ -16,14 +49,22 @@ VITE_OPEN_PROXY = true
# vite serve base
VITE_SERVE_BASE = /
# 流程设计访问地址
VITE_BPMN_URL = https://workflow.zgsjzc.com
VITE_BPMN_URL = https://workflow-swzl-test.csbr.cn
# 数据标准、元数据、数据目录 接口地址
VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service
#数据质量接口地址
VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
#数据盘点接口地址ms-daop-zcgl-data-inventory
# VITE_APP_CHECK_BASEURL = /mock
VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory
# 数据字典接口地址
VITE_APP_CONFIG_URL = 'ms-daop-configure-service'
#门户接口
VITE_API_PORTALURL = https://www.zgsjzc.com/portal
VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal
#数据资产接口地址
VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
......
FROM 192.168.5.4:82/csbr/nginx:stable-alpine
FROM 192.168.6.22:8081/csbr/nginx:stable-alpine
VOLUME /tmp
#将当前文件夹的dist文件复制到容器的/usr/share/nginx/html目录
COPY ./dist/* /usr/share/nginx/html/
COPY ./dist/assets /usr/share/nginx/html/assets
#COPY ./dist/importTemplate /usr/share/nginx/html/importTemplate
COPY default.conf /etc/nginx/conf.d/
#声明运行时容器暴露的端口(容器提供的服务端口)
EXPOSE 8911
RUN chown -R nginx:nginx /usr/share/nginx/html
EXPOSE 29900
#CMD:指定容器启动时要运行的命令
CMD ["nginx", "-g", "daemon off;"]
......
......@@ -3,21 +3,22 @@ pipeline {
//环境定义
environment{
//服务名称
SVN_FOLD = "fe-swzl-asset-temp"
SVN_FOLD = "fe-data-asset-management"
//部署远程服务器
//192.168.4.4服务器
//SSH_PATH = "csbr4.4"
//192.168.5.4
SSH_PATH = "csbr5.2"
SSH_PATH = "csbr20"
SVN_TYPE = "dev"
//139.9.190.186
//SSH_PATH = "csbr190.186"
//SVN_TYPE = "master"
//镜像版本号
image_tag = "1.0.0"
//docker私服ip
ip = "192.168.5.4:82"
ip = "192.168.6.22:8081"
//前端端口号
port = "8911"
port = "29900"
//映射端口号
vport = "80"
......@@ -63,9 +64,9 @@ pipeline {
steps {
//分分支构建
script{
if(env.BRANCH_NAME=='master-asset'){
if(env.BRANCH_NAME=='develop'){
//master-asset分支环境
echo 'start to deploy ${SVN_FOLD} on master-asset ...'
echo 'start to deploy ${SVN_FOLD} on develop ...'
sh '''
#docker rmi -f $(docker images | grep "none" | awk '{print $3}')
CID=$(docker ps -a | grep "${SVN_FOLD}" | awk '{print $1}')
......@@ -107,14 +108,14 @@ pipeline {
echo 'Deploying'
//分分支部署
script{
if(env.BRANCH_NAME=='master-asset'){
if(env.BRANCH_NAME=='develop'){
//master-asset分支环境
echo 'start to deploy ${SVN_FOLD} on master-asset ...'
echo 'start to deploy ${SVN_FOLD} on develop ...'
//调用Publish Over SSH插件,上传docker-compose.yaml文件并且执行deploy脚本
sshPublisher(publishers: [sshPublisherDesc(configName: "csbr5.3", transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: """
#使用k8s构建
kubectl delete -f /mnt/k8s/production/fe-swzl-asset.yaml
kubectl apply -f /mnt/k8s/production/fe-swzl-asset.yaml
kubectl delete -f /mnt/k8s/develop/daop-jgjf/fe-data-asset-management.yaml
kubectl apply -f /mnt/k8s/develop/daop-jgjf/fe-data-asset-management.yaml
""", execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/mnt/csbr/data', remoteDirectorySDF: false, removePrefix: '', sourceFiles: 'output/*.*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
echo 'Depoly ${SVN_FOLD} success ...'
......
......@@ -2,48 +2,53 @@ server {
listen 80;
listen [::]:80;
server_name localhost;
# server_name http://192.168.6.20:8052;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
# 设置允许跨域的域名,可以使用通配符 '*' 允许所有域访问
add_header 'Access-Control-Allow-Origin' * always;
# 设置允许的 HTTP 方法
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# 设置允许的请求头
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Accept, Origin, X-Requested-With';
# 如果需要支持 cookie,可以设置以下 header
add_header 'Access-Control-Allow-Credentials' 'true';
# 缓存设置
add_header Cache-Control no-cache;
add_header Cache-Control private;
# # 预检请求处理
# if ($request_method = OPTIONS) {
# return 204;
# }
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
expires -1s;
}
location /api {
# 设置允许跨域的域名,可以使用通配符 '*' 允许所有域访问
add_header 'Access-Control-Allow-Origin' * always;
# 设置允许的 HTTP 方法
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# 设置允许的请求头
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Accept, Origin, X-Requested-With';
# 如果需要支持 cookie,可以设置以下 header
add_header 'Access-Control-Allow-Credentials' 'true';
# 缓存设置
add_header Cache-Control no-cache;
add_header Cache-Control private;
expires -1s;
# 使用 rewrite 将 /api 替换为 /new-api
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://192.168.6.20:28052;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
......
......@@ -4,6 +4,7 @@ import request from "@/utils/request";
/**
* 数据字典
**/
// 编码规则流水号
export const getCoderuleList = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/code-rule/list`,
......@@ -48,11 +49,11 @@ export const checkDeleteDictionaryScheme = (params) => request({
data: params
})
// 分页查询
export const getDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/page-list`,
method: 'post',
data: params
})
// export const getDictionary = (params) => request({
// url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/page-list`,
// method: 'post',
// data: params
// })
// 查询数据字典启用状态的数据
export const getDictionaryAll = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all`,
......@@ -161,10 +162,14 @@ export const checkDictionaryData = (params) => request({
* DATA-CLASSIFY 数据类别
* DATA-GRADE 数据级别
*/
export const getLargeCategoryList = (data) => request({
url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
method: 'post',
data
// export const getLargeCategoryList = (data) => request({
// url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
// method: 'post',
// data
// })
export const getLargeCategoryList = (params) => request({
url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${params.dictType}`,
method: 'get',
})
......@@ -355,6 +360,18 @@ export const getCgTemplateClassifyTreeList = (data) => request({
/**-------------------------分类分级目录--------------------------------- */
/**
* 查询执行guid和目录名称
* @param {no params}
* @path /cg-dir/get-exec-guid-and-name
*/
export const getExecGuidAndName = () => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/get-exec-guid-and-name`,
method: 'post',
})
/**
* 分类分级目录树形列表
......@@ -383,10 +400,10 @@ export const getCgDirFieldPageList = (data) => request({
/** 获取字典列表
* VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据
*/
// export const getDictionary = (params) => request({
// url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`,
// method: 'post'
// })
export const getDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`,
method: 'post'
})
......@@ -422,7 +439,109 @@ export const getDbDirTablePageList = (data) => request({
data
})
/**
* 数据库目录-已有数据库列表
* @param {no params}
* @path /db-dir/data-source/list
*/
export const getDbDirDataSourceList = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/data-source/list?execGuid=${params.execGuid}`,
method: 'post',
})
/**
* 获取列表
* @param {Object}
* @path /db-dir/field/page-list
* @returns
*/
export const getDbDirFieldPageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/field/page-list`,
method: 'post',
data
})
/** 获取已有字段信息 */
export const getDsTableStructure= (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/field/list-by-table-guid`,
method: 'post',
data
});
/** 根据选择的连接池获取表列表 */
export const getDsTableByDs = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/list-by-datasource-guid`,
method: 'post',
data: params
})
/** 根据数据表获取表结构 */
export const getDsData= (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-catalog-subject/table-column-list`,
method: 'post',
data: params
});
/**
* 数据库新建目录表
* @param {Object}
* @path /db-dir/table/save
*/
export const saveDbDirTable = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/save`,
method: 'post',
data
})
/**
* 数据库目录修改表
* @param {Object}
* @path /db-dir/table/update
*/
export const updateDbDirTable = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/update`,
method: 'post',
data
})
/**
* 生成建表sql语句
* @param {Object}
* @path /db-dir/table/create-table-sql
*/
export const createTableSql = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/create-table-sql`,
method: 'post',
data
})
/*********************业务规则配置 ************数据库目录************************* */
/**
* 业务规则配置-详情
* @param {Object}
* @path /biz-rule-config/detail
* @returns
*/
export const getBizRuleConfigDetail = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/detail?tableGuid=${params.tableGuid}&execGuid=${params.execGuid}`,
method: 'get',
})
/**
* 业务规则配置-修改
* @param {Object}
* @path /biz-rule-config/update
* @returns
*/
export const updateBizRuleConfig = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/update`,
method: 'post',
data
})
......
......@@ -284,14 +284,340 @@ export const getDbDirTablePageList = {
databaseChName: '@cword(3, 5)',
foundMode: '@integer(1, 3)',
state: '@integer(0,2)',
isDataAsset: 'Y'
isDataAsset: 'Y',
description: '@cword(10, 15)',
}]
}
}
}
}
/**
* export const getDbDirDataSourceList = () => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/data-source/list`,
method: 'post',
})
"data": [
{
"tableGuid": "string",
"tableName": "string",
"tableChName": "string",
"databaseGuid": "string",
"database": "string",
"databaseChName": "string"
}
],
*/
export const getDbDirDataSourceList = {
url: '/mock/db-dir/data-source/list',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功',
'data|10-30': [{
tableGuid: '@guid',
tableName: '@cword(3, 5)',
tableChName: '@cword(3, 5)',
databaseGuid: '@guid',
database: '@cword(3, 5)',
databaseChName: '@cword(3, 5)'
}]
}
}
}
/**
* export const getDsData = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/list-by-datasource-guid`,
method: 'post',
data: params
});
"data": {
"totalRows": 0,
"totalPages": 0,
"pageSize": 0,
"pageIndex": 0,
"records": [
{
"tableGuid": "string",
"tableName": "string",
"tableChName": "string",
"databaseGuid": "string",
"database": "string",
"databaseChName": "string"
}
],
*/
export const getDsTableByDs = {
url: '/mock/db-dir/table/list-by-datasource-guid',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功',
'data': {
totalRows: '@integer(50, 100)',
totalPages: '@integer(1, 10)',
pageSize: 10,
pageIndex: 1,
'records|50-100': [{
tableGuid: '@guid',
tableName: '@cword(3, 5)',
tableChName: '@cword(3, 5)',
databaseGuid: '@guid',
database: '@cword(3, 5)',
databaseChName: '@cword(3, 5)'
}]
}
}
}
}
export const getDsTableStructure = {
url: '/mock/db-dir/field/list-by-table-guid',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功',
'data|2-5': [{
guid: '@guid',
tableGuid: '@guid',
tableName: '@cword(3, 5)',
tableChName: '@cword(3, 5)',
databaseGuid: '@guid',
database: '@cword(3, 5)',
databaseChName: '@cword(3, 5)',
fieldGuid: '@guid',
fieldName: '@cword(3, 5)',
fieldChName: '@cword(3, 5)',
fieldType: '@cword(3, 5)',
fieldLength: '@integer(1, 100)',
fieldPrecision: '@integer(1, 100)',
dimGuid: '@guid',
dictionaryGuid: '@guid',
sortValue: '@integer(1, 100)',
isPrimary: 'Y',
isFk: 'Y',
isNotNull: 'Y'
}]
}
}
}
/**
* export const getDbDirFieldPageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/field/page-list`,
method: 'post',
data
})
{
"code": "string",
"msg": "string",
"data": {
"totalRows": 0,
"totalPages": 0,
"pageSize": 0,
"pageIndex": 0,
"records": [
{
"guid": "string",
"tenantGuid": "string",
"cgDirName": "string",
"dirGuid": "string",
"classifyName": "string",
"gradeDetailName": "string",
"label": "string",
"fieldName": "string",
"fieldChName": "string",
"tableName": "string",
"tableChName": "string",
"database": "string",
"databaseChName": "string"
}
],
*/
export const getDbDirFieldPageList = {
url: '/mock/db-dir/field/page-list',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功',
'data': {
totalRows: '@integer(50, 100)',
totalPages: '@integer(1, 10)',
pageSize: 10,
pageIndex: 1,
'records|20-30': [{
guid: '@guid',
tenantGuid: '@guid',
cgDirName: '@cword(3, 5)',
dirGuid: '@guid',
classifyName: '@cword(3, 5)',
gradeDetailName: '@cword(3, 5)',
label: '@cword(3, 5)',
fieldName: '@cword(3, 5)',
fieldChName: '@cword(3, 5)',
tableName: '@cword(3, 5)',
tableChName: '@cword(3, 5)',
database: '@cword(3, 5)',
databaseChName: '@cword(3, 5)'
}]
}
}
}
}
/**
* export const getBizRuleConfigDetail = (params) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/detail?tableGuid=${params.tableGuid}&execGuid=${params.execGuid}`,
method: 'get',
})
"data": [
{
"guid": "string",
"tenantGuid": "string",
"classifyName": "string",
"gradeDetailName": "string",
"fieldName": "string",
"fieldChName": "string",
"fieldGuid": "string",
"fieldType": "string",
"fieldLengthCondition": "string",
"fieldPrecision": 0,
"dictionaryGuid": "string",
"isUnique": "string",
"isNotNull": "string",
"fieldValueRange": "string"
}
],
*/
export const getBizRuleConfigDetail = {
url: '/mock/biz-rule-config/detail',
method: 'get',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功',
'data|1-3': [{
guid: '@guid',
tenantGuid: '@guid',
classifyName: '@cword(3, 5)',
gradeDetailName: '@cword(3, 5)',
fieldName: '@cword(3, 5)',
fieldChName: '@cword(3, 5)',
fieldGuid: '@guid',
fieldType: '@cword(3, 5)',
fieldLengthCondition: '>#10',
fieldPrecision: '@integer(1, 100)',
dictionaryGuid: '@guid',
isUnique: 'Y',
isNotNull: 'Y',
fieldValueRange: '0-100'
}]
}
}
}
/**
* export const updateBizRuleConfig = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/update`,
method: 'post',
data
}){
"code": "string",
"msg": "string",
"data": true,
"at": "string",
"serviceCode": "string"
}
*/
export const updateBizRuleConfig = {
url: '/mock/biz-rule-config/update',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功',
data: true,
at: 'string',
serviceCode: 'string'
}
}
}
/**
* /**
* 数据库新建目录表
* @param {Object}
* @path /db-dir/table/save
* export const saveDbDirTable = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/save`,
method: 'post',
data
})
*/
export const saveDbDirTable = {
url: '/mock/db-dir/table/save',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功'
}
}
}
/**
* /**
* 数据库目录修改表
* @param {Object}
* @path /db-dir/table/update
* export const updateDbDirTable = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/update`,
method: 'post',
data
})
*/
export const updateDbDirTable = {
url: '/mock/db-dir/table/update',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功'
}
}
}
/***
* /**
* 生成建表sql语句
* @param {Object}
* @path /db-dir/table/create-table-sql
* export const createTableSql = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/create-table-sql`,
method: 'post',
data
})
*/
export const createTableSql = {
url: '/mock/db-dir/table/create-table-sql',
method: 'post',
response: ({body}:{body:any}) => {
return {
code: '00000',
message: '成功',
data: 'create table test_table (id int, name varchar(255))'
}
}
}
export default [getCgDirTreeList,getCgDirFieldPageList, getDictionary,saveBizRuleConfig, getDbDirTreeList, getDbDirTablePageList] as MockMethod[]
export default [getCgDirTreeList,getCgDirFieldPageList,
getDictionary,saveBizRuleConfig, getDbDirTreeList,
getDbDirTablePageList,getDbDirDataSourceList,getDsTableByDs,
getDsTableStructure,getDbDirFieldPageList,getBizRuleConfigDetail,
updateBizRuleConfig,saveDbDirTable,createTableSql,updateDbDirTable] as MockMethod[]
......
......@@ -219,7 +219,7 @@ const routes: RouteRecordRaw[] = [
{
path: 'configure-rules',
name: 'configureRules',
component: () => import('@/views/data_inventory/configureRules.vue'),
component: () => import('@/views/data_inventory/configureRules1.vue'),
meta: {
title: '配置业务规则',
sidebar: false,
......@@ -230,10 +230,43 @@ const routes: RouteRecordRaw[] = [
activeMenu: '/data-inventory/classify-grade-catalogue',
},
},
{
path: 'table-create-existing',
name: 'tableCreateExisting',
component: () => import('@/views/data_inventory/tableCreateExisting.vue'),
meta: {
title: '已有表新建',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
},
beforeEnter: (to, from) => {
if (to.query.domainName) {
to.meta.title = `已有表新建(${to.query.domainName})`;
to.meta.editPage = true;
}
}
},
{
path: 'table-create-file',
name: 'tableCreateFile',
component: () => import('@/views/data_inventory/tableCreateFile.vue'),
meta: {
title: '根据文件新建',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
},
beforeEnter: (to, from) => {
}
},
],
},
{
path: '/data-standards/data-dictionary',
path: '/data-inventory/data-dictionary',
component: Layout,
meta: {
title: '数据字典',
......@@ -243,7 +276,7 @@ const routes: RouteRecordRaw[] = [
{
path: '',
name: 'dictionary',
component: () => import('@/views/data_standards/dictionary.vue'),
component: () => import('@/views/data_inventory/dictionary.vue'),
meta: {
title: '数据字典',
sidebar: false,
......
......@@ -101,6 +101,13 @@ const systemRoutes: RouteRecordRaw[] = [
// 动态路由(异步路由、导航栏路由)
const asyncRoutes: Route.recordMainRaw[] = [
{
meta:{
title: '首页',
},
children: [
],
},
{
meta: {
title: '数据资产管理',
},
......
......@@ -72,9 +72,12 @@ const tableInfo = ref({
return status == 'Y' ? '有效' : '停用';
}
},
{ label: "定义说明", width: 360, field: "description", },
{ label: "定义说明", width: 140, field: "description", },
{
label: "最低安全级别参考", field: "name", width: 140,
label: "最低安全级别参考", field: "name", width: 140, getName: (scope) => {
let dataGrade = scope.row.dataGrade;
return dataGrade + '级';
}
},
{ label: "修改人", field: "updateUserName", width: 140 },
{ label: "更新时间", field: "updateTime", width: 180 },
......@@ -386,6 +389,7 @@ const getGradeListData = async () => {
const newCreateClass = () => {
drawerInfo.value.visible = true;
classEditFormItems.value[2].options = treeListData.value;
drawerInfo.value.header.title = '添加分类';
classEditFormItems.value.forEach(item => {
if (item.field == 'status') {
......@@ -702,7 +706,7 @@ onMounted(() => {
style="margin-top:16px; height: calc(100% - 161px)">
<div class="tools_btns">
<el-button v-show="dataShowMethod == 'table'" type="primary" @click="newCreateClass">添加分类</el-button>
<el-button v-show="dataShowMethod == 'table'" @click="importClass">导入分类</el-button>
<!-- <el-button v-show="dataShowMethod == 'table'" @click="importClass">导入分类</el-button> -->
<el-button class="show-change-btn" @click="changeShowMethod">{{ '图形展示' }}</el-button>
</div>
<Table v-show="dataShowMethod == 'table'" :tableInfo="tableInfo" />
......
......@@ -31,14 +31,14 @@ const getGradeListData = async () => {
// 获取数据类别
const getDataGrade = async () => {
const params = {
paramCode: "DATA-CLASSIFY"
dictType: "数据类别"
}
const res: any = await getLargeCategoryList(params);
if (res.code == proxy.$passCode) {
// 提出value和label 作为select的options
const options = res.data.map((item: any) => ({
label: item.paramName,
value: item.paramValue
label: item.label,
value: item.value
}));
newCreateGradeFormItems.value[1].options = options;
classDataRef.value = options;
......@@ -50,14 +50,14 @@ const getDataGrade = async () => {
// 获取数据级别
const getDataClassify = async () => {
const params = {
paramCode: "DATA-GRADE"
dictType: "数据级别"
}
const res: any = await getLargeCategoryList(params);
if (res.code == proxy.$passCode) {
// 提出value和label 作为select的options
const options = res.data.map((item: any) => ({
label: item.paramName,
value: item.paramValue
label: item.label,
value: item.value
}));
newCreateGradeFormItems.value[0].options = options;
// 这里需要过滤已经在表格中数据级别
......
<template>
<el-select v-if="!readonly && isEdit && isSelectType(dbType, scope)" v-model="scope.row['defaultValue']" placeholder="请选择" collapse-tags-tooltip
filterable allow-create default-first-option :reserve-keyword="false">
<el-option v-for="opt in optionsConfig[dataType]" :key="opt['value']" :label="opt['label']" :value="opt['value']" />
</el-select>
<el-date-picker v-else-if="!readonly && isEdit && dataType === 'date'" v-model="scope.row['defaultValue']" type="date"
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择" />
<el-date-picker v-else-if="!readonly && isEdit && dbType === 'mysql' && dataType === 'datetime'"
v-model="scope.row['defaultValue']" placeholder="请选择" type="datetime" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" />
<el-input v-else-if="!readonly && isEdit" v-model.trim="scope.row['defaultValue']" placeholder="请填写"
@input="(val) => inputChange(val, scope.row.dataType, scope)" />
<span v-else>{{ scope.row["defaultValue"] == null ? '--' : (isSelectType(dbType, scope) ?
(optionsConfig[dataType].find(s => s.value == scope.row["defaultValue"])?.label ??
scope.row["defaultValue"]) : scope.row["defaultValue"]) }}</span>
</template>
<script lang="ts" setup name="tableDefaultValue">
import { ref } from "vue";
import { useDefault } from "@/hooks/useDefault";
const { optionsConfig, inputChange, isSelectType } = useDefault()
const props = defineProps({
dbType: {
type: String,
default: ''
},
scope: {
type: Object,
default: {}
},
readonly: {
type: Boolean,
default: false
}
})
const isEdit = computed(() => {
return props.scope.row['isEdit'];
});
const dataType = computed(() => {
return props.scope.row['dataType'];
});
</script>
\ No newline at end of file
......@@ -123,7 +123,7 @@ const treeInfo = ref<any>({
filter: true,
queryValue: "",
className: 'tree-list',
queryPlaceholder: "输入标准集名称搜索",
queryPlaceholder: "输入目录名称搜索",
props: {
label: "classifyName",
value: "guid",
......
<route lang="yaml">
name: tableCreateFile
</route>
<script lang="ts" setup name="tableCreateFile">
import { ref } from "vue";
import { ElMessage, ElMessageBox, ElTable } from "element-plus";
import useUserStore from "@/store/modules/user";
import useDataCatalogStore from "@/store/modules/dataCatalog";
import expandPropertyDialog from "./expandPropertyDialog.vue";
import tableDefaultValue from "./components/tableDefaultValue.vue";
// import {
// getDatabase,
// getFileStandards,
// getDictionary,
// getSubjectFieldByFile,
// tableCategoryList,
// syncPolicys,
// getDataTypeList,
// tableModels,
// aggMethodList,
// getCharacterList,
// saveSubjectTable,
// updateSubjectTable,
// getTableStandardDetail,
// getSubjectDomainDetail,
// saveSubjectTableDraft,
// updateSubjectTableDraft,
// getFieldStandardTree,
// dimTypeList,
// getDimList,
// getSubjectTableDetail,
// checkSubjectTableData
// } from "@/api/modules/dataCatalogService";
import { useDefault } from "@/hooks/useDefault";
import uploadExcelFile from "./components/uploadExcelFile.vue";
const userStore = useUserStore();
const dataCatalogStore = useDataCatalogStore();
const { checkDefault } = useDefault();
const userData = JSON.parse(userStore.userData);
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
const isDimTable = route.query.isDim;
const subjectDomainGuid: any = ref(route.query.domainGuid);
const fullPath = route.fullPath;
const standardSetGuids = ref([]);
//记录已入库的表创建信息。
const originTableCreateInfo = ref({});
//记录当前正在编辑的表创建信息。
const tableCreateInfo: Ref<any> = ref({
guid: "",
isCreate: false,
inputNameValue: '',
isSync: 'Y', //是否默认同步数据。
sheetName: '', //所选择的sheet页。
tableData: [
{
//数据库表信息。
dataSourceGuid: '',
dataServerName: "",
dataServerChName: "",
enName: "",
chName: "",
subjectDomain: route.query.domainName,
subjectDomainGuid: subjectDomainGuid.value,
tableCategory: route.query.layereAttribute == '3' ? 6 : 1,
dimType: isDimTable ? 1 : null,
codeColumn: '',
codeName: '',
syncPolicy: 3,
characterSet: 'utf8mb3',
tableModel: 1, //若是聚合模型,下方出现一列聚合方式选择。处了主键列,其余列都需要选择。每个表里都要有主键。
description: "",
},
],
partitionAttribute: {},
tableFields: [], // 字段标准数组。
});
const stepsInfo = ref({
step: 0,
list: [
{ title: "上传文件", value: 1 },
{ title: "设置属性字段", value: 2 },
],
});
/** 上传的文件字段信息。 */
const fileTableFields: any = ref([]);
/** 上传的文件数据信息 */
const fileTableData: any = ref([]);
/** 上传的文件信息。 */
const uploadDataFileInfo: any = ref([]);
const handleFileDataChange = (fileFields, files, sheetName, data) => {
if (fileTableFields.value != fileFields) {//文件字段改变,下一步时需要清空。
fileTableFields.value = fileFields.slice(0);
tableCreateInfo.value.tableFields = [];
}
fileTableData.value = data;
uploadDataFileInfo.value = files;
tableCreateInfo.value.sheetName = sheetName;
console.log(files);
}
const uploadFileRef = ref();
// const getSubjectField = () => {
// tableFieldsLoading.value = true;
// getSubjectFieldByFile(fileTableFields.value.map(f => f.chName), tableCreateInfo.value.tableData[0].subjectDomainGuid).then((res: any) => {
// tableFieldsLoading.value = false;
// if (res.code == proxy.$passCode) {
// tableCreateInfo.value.tableFields = res.data?.map((field, i) => {
// field.dimOrdictionaryGuid = field.dictionaryGuid;
// field.fileFieldName = fileTableFields.value[i].chName;
// field.isEdit = true;
// !field.notNull && (field.notNull = 'N');
// return field;
// }) || [];
// } else {
// ElMessage.error(res.msg);
// }
// });
// }
const nextStep = () => {
uploadFileRef.value.fileFormRef.ruleFormRef.validate((valid) => {
if (valid) {
if (!fileTableFields.value.length) {
ElMessage({
type: "error",
message: "上传文件字段不能为空!",
});
return;
}
if (!fileTableData.value.length) {
tableCreateInfo.value.isSync = 'N';
} else {
tableCreateInfo.value.isSync = 'Y';
}
stepsInfo.value.step = 1;
// getDictionaryList();
// getDimListData();
// if (!fieldTypes.value.length) {
// getFieldTypeList();
// getCharacterListData();
// }
// if (!databaseList.value.length) {
// getDatabaseList();
// }
// getDomainDetail(subjectDomainGuid.value);
// if (!tableCreateInfo.value.tableFields.length) {
// getSubjectField();
// }
}
});
};
const isPrevious = ref(false);
/** 上一步 */
const previousStep = () => {
stepsInfo.value.step = 0;
isPrevious.value = true;
};
/** 记录是否开启字段标准,根据主题域相关信息获取 */
const isOpenStandard = ref(true);
const selectTableFieldRows = ref([]);
const tableStandardGuid = ref('');
const tableStandardDetail: any = ref({});
const fieldStandardSetGuids = ref([]);
// 实际显示的字段标准列表
const standardListOptions: any = ref([]);
const databaseList: any = ref([]);
//字段类型
const fieldTypes: any = ref([]);
//字符集
const characterList: any = ref([]);
//是否列表
const isNotList = ref([
{
label: "Y",
value: "Y",
},
{
label: "N",
value: "N",
},
]);
const batchAddFieldStandardPage = ref({
pageSize: 50,
pageIndex: 1,
standardSetGuids: [],
approveState: 'Y',
name: '',
standardSetLevelCode: ""
});
const init = ref(true);
const fullscreenLoading = ref(false);
/** 表里有数据时不能修改字段类型,长度,精度 */
const hasSubjectData = ref(false);
/** 保存表 */
const saveTable = () => {
}
</script>
<template>
<div class="container_wrap full" v-loading.fullscreen.lock="fullscreenLoading">
<div class="content_main">
<div class="top_tool_wrap">
<StepBar :steps-info="stepsInfo" />
</div>
<uploadExcelFile ref="uploadFileRef" v-show="stepsInfo.step === 0" @fileDataChange="handleFileDataChange">
</uploadExcelFile>
<div class="second-step-content" v-show="stepsInfo.step === 1">
aaa
</div>
</div>
<div class="bottom_tool_wrap">
<template v-if="stepsInfo.step == 0">
<el-button type="primary" @click="nextStep">下一步</el-button>
</template>
<template v-else>
<el-checkbox v-model="tableCreateInfo.isSync" true-label="Y" :disabled="!fileTableData?.length"
false-label="N">同步数据(说明:勾选代表建表同时写入表格数据。)</el-checkbox>
<el-button @click="previousStep">上一步</el-button>
<el-button type="primary">保存为草稿</el-button>
<el-button type="primary" @click="saveTable">提交</el-button>
</template>
</div>
</div>
</template>
<style lang="scss" scoped>
.top_tool_wrap {
width: 100%;
height: 80px;
display: flex;
justify-content: center;
align-items: center;
border-bottom: 1px solid #d9d9d9;
:deep(.el-steps) {
width: 30%;
}
}
.content_main {
height: calc(100% - 40px);
.header-bg-title {
margin: 16px 16px 0px;
background: #F5F5F5;
padding-left: 16px;
height: 48px;
font-size: 14px;
color: #212121;
letter-spacing: 0;
line-height: 21px;
font-weight: 600;
display: flex;
align-items: center;
position: relative;
.preview-data-totals {
position: absolute;
right: 16px;
line-height: 32px;
font-size: 14px;
color: #666666;
font-weight: 400;
}
.fontC-4fa1a4 {
color: var(--el-color-primary);
}
}
.form-main {
border: 1px solid #d9d9d9;
margin: 0px 16px;
padding: 16px 16px 0px 16px;
height: 125px;
.dialog-form-inline {
align-items: flex-start;
}
:deep(.el-form) {
.item-label {
width: 100%;
}
.el-select {
max-width: 300px;
}
}
}
.table-main {
height: calc(100% - 350px);
border: 1px solid #d9d9d9;
margin: 0px 16px 16px 16px;
padding: 16px;
}
.empty-content {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
flex-direction: column;
.empty-text {
font-size: 14px;
color: #b2b2b2;
}
}
.second-step-content {
height: calc(100% - 80px);
width: 100%;
padding: 16px;
.tools_btns {
padding: 8px 0;
}
:deep(.el-table) {
.cell {
.prefix-or-suffix-cell {
display: inline-flex;
align-items: center;
}
}
}
.table_panel {
height: calc(100% - 114px);
}
:deep(.el-table) {
& td.el-table__cell {
padding: 3px 0;
height: 36px;
}
}
}
}
:deep(.el-dialog) {
.dialog-form-inline {
.checkbox_input {
display: flex;
flex-direction: column;
.input_panel {
margin: 0;
}
}
.select_group {
.el-form-item__content>.el-input {
margin-top: 21px;
}
}
.radio_panel {
.panel_content {
display: none;
}
}
}
}
:deep(.batchDialog) {
.el-tree-node__content {
padding-left: 8px !important;
.el-icon {
display: none;
}
}
}
.bottom_tool_wrap {
height: 40px;
padding: 0 16px;
border-top: 1px solid #d9d9d9;
display: flex;
justify-content: flex-end;
align-items: center;
.el-checkbox {
margin-right: 20px;
}
:deep(.el-checkbox__input.is-checked + .el-checkbox__label) {
color: var(--el-color-regular);
}
}
</style>
......@@ -137,6 +137,9 @@ const handleClassDataEdit = (params) => {
if (item.field === 'classStandardName') {
item.default = params.name
}
if (item.field === 'description') {
item.default = params.description
}
})
}
......@@ -209,6 +212,15 @@ const classStandardFormItems = ref([{
default: '',
required: true,
block: true,
}, {
label: '分类描述',
type: 'textarea',
placeholder: '请输入',
field: 'description',
default: '',
clearable: true,
required: false,
block: true
}]);
const classStandardFormRules = ref({
......@@ -235,6 +247,7 @@ const newCreateClassStandardDialogInfo = ref({
if (newCreateClassStandardDialogInfo.value.title === '新增分类') {
newCreateClassStandardDialogInfo.value.submitBtnLoading = true;
const params = {
description: info.description,
name: info.classStandardName,
refGradeGuid: info.refGradeGuid,
type: 'C'
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!