495dd53e by lxs

合并

2 parents abc5146e 98d58c5e
......@@ -13,6 +13,7 @@ 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,如果不需要开启则留空
......@@ -32,6 +33,10 @@ VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service
# 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://swzl-test.zgsjzc.com/portal
......
# 页面标题
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"
......@@ -49,8 +50,10 @@ pipeline {
steps {
nodejs('node 16.20.2'){}
//配置私有npm仓库
sh 'npm config set registry http://192.168.5.4:8001/repository/csbr-npm/'
sh 'yarn config set registry http://192.168.5.4:8001/repository/csbr-npm/'
// sh 'npm config set registry http://192.168.5.4:8001/repository/csbr-npm/'
// sh 'yarn config set registry http://192.168.5.4:8001/repository/csbr-npm/'
sh 'npm config set registry http://49.4.23.228:8001/repository/csbr-npm/'
sh 'yarn config set registry http://49.4.23.228:8001/repository/csbr-npm/'
// 配置后可通过下面方式来验证是否成功
sh 'npm config get registry'
sh 'npm install -g pnpm'
......@@ -63,9 +66,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}')
......@@ -77,15 +80,15 @@ pipeline {
##构建镜像到远程仓库
docker login "${ip}" -u admin -p E6w611g864wQ2
#docker tag "${SVN_FOLD}":"${image_tag}" "${ip}"/csbr/"${SVN_FOLD}":"${image_tag}"
docker build -t "${ip}"/csbr/"${SVN_FOLD}":"${image_tag}" .
docker push "${ip}"/csbr/"${SVN_FOLD}":"${image_tag}"
docker build -t "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}" .
docker push "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}"
else
echo "不存在'${SVN_FOLD}'镜像,开始构建镜像"
##构建镜像到远程仓库
docker login "${ip}" -u admin -p E6w611g864wQ2
#docker tag "${SVN_FOLD}":"${image_tag}" "${ip}"/csbr/"${SVN_FOLD}":"${image_tag}"
docker build -t "${ip}"/csbr/"${SVN_FOLD}":"${image_tag}" .
docker push "${ip}"/csbr/"${SVN_FOLD}":"${image_tag}"
docker build -t "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}" .
docker push "${ip}"/csbr/"${SVN_FOLD}""-${SVN_TYPE}":"${image_tag}"
fi
'''
echo 'Depoly ${SVN_FOLD} success ...'
......@@ -107,14 +110,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: """
sshPublisher(publishers: [sshPublisherDesc(configName: "csbr20", 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;
#}
}
......
/** --------------------- 质量评估模型 ------------------------------- */
import request from "@/utils/request";
/** 获取质量评估方案资产名称列表 */
export const getQualityDamList = () => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/dam-name-list`,
method: 'get'
})
/** 获取质量评估列表 */
export const getQualityList = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/dam-list`,
method: 'post',
data: params
})
/** 获取可选择的资产目录列表 */
export const getDamList = () => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/dam-name-list`,
method: 'post',
data: {}
})
/** 获取资产目录的表列表 */
export const getDamTableList = (damGuid) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/get-table-list?damGuid=${damGuid}`,
method: 'get'
})
/** 获取资产目录表的详情 */
export const getTableFields = (subjectGuid) => request({
url:`${import.meta.env.VITE_API_ASSET_BASEURL}/dam-catalog-table/get-table-detail?subjectGuid=${subjectGuid}`,
method: 'get'
});
/** 获取资产表的规则列表 */
export const getDamTableRulesList = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/list/rule-by-dam-guid`,
method: 'post',
data: params
})
/** 批量新增资产表的规则 */
export const saveDamTableRules = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/add`,
method: 'post',
data: params
})
/** 获取资产表的单个规则 */
export const getRuleConfDetail = (param) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/detail?ruleConfGuid=${param}`,
method: 'get'
})
/** 获取对应执行方案的规则详情 */
export const getRecordRuleConfDetail = (param) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model-record/conf/detail?ruleConfGuid=${param.ruleConfGuid}&planExecGuid=${param.planExecGuid}`,
method: 'get'
});
/** 编辑资产表的单个规则 */
export const updateDamTableRule = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/update`,
method: 'post',
data: params
})
/** 删除资产表的单个规则 */
export const deleteDamTableRule = (ruleConfGuid, planGuid: any = null) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/del?ruleConfGuid=${ruleConfGuid}&planGuid=${planGuid}`,
method: 'delete'
})
// 获取规则类型的接口
export const getRuleTypeList = () => request({
url:`${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-rule/list`,
method: 'post',
data: {}
})
// 获取规则大类的接口
export const getLargeCategoryList = () => request({
url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
method: 'post',
data: { paramCode: "LARGE-CATEGORY" }
})
// 获取规则小类的接口
export const getSmallCategoryList = () => request({
url:`${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
method: 'post',
data: { paramCode: "SMALL-CATEGORY" }
})
/** 表的逻辑条件和sql检验。 */
export const validateSubjectTableRule = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/sql-operate/check-sql`,
method: 'post',
data: params
})
/** 自定义sql检验 */
export const validateCustomSql = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/conf/check-custom-sql`,
method: 'post',
data: params
})
/** 批量验证过滤条件 */
export const batchValidateSubjectTableRule = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/sql-operate/batch-check-sql`,
method: 'post',
data: params
})
/** ---------- 第二步,规则权重设置接口 ------ - */
/** 获取规则大类统计 */
export const getModelRuleCount = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-model/list/model-rule-category-count`,
method: 'post',
data: params
})
/** 保存质量评估方案 */
export const saveQualityPlan = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/add`,
method: 'post',
data: params
})
/** 更新质量方案 */
export const updateQualityPlan = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/update`,
method: 'put',
data: params
})
/** 删除质量方案 */
export const deleteQualityPlan = (guids) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/del`,
method: 'delete',
data: guids
})
/** 获取方案详情,用于编辑 */
export const getPlanDetail = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/detail/${params}`,
method: 'get'
})
/** 获取方案详情中的过滤条件,用于编辑 */
export const getPlanFilterDetail = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-plan-filter?planGuid=${params}`,
method: 'get'
})
/** 手动执行方案 */
export const executePlan = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/dam-exec-plan?planGuid=${params.planGuid}&reportGuid=${params.reportGuid}`,
method: 'post'
})
/** 获取方案查看详情列表数据。 */
export const getAssessDetailTableData = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/page-exec-log-list`,
method: 'post',
data: params
})
/** 根据执行guid,获取方案执行详情。 */
export const getExecPlanDetailTableData = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-exec-detail?&planExecGuid=${params.planExecGuid}`,
method: 'get'
})
/** 获取方案详情中每个表的规则详细执行列表数据。 */
export const getAssessTableRulesData = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/query-exec-table-detail?planExecGuid=${params.planExecGuid}&qualityModelGuid=${params.qualityModelGuid}`,
method: 'get'
})
/** 下载脏数据 */
export const downloadDirtyData = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/down-dirty-data`,
method: 'post',
data: params,
responseType: 'blob'
})
/** html转word接口 */
export const htmlToWord = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/download/html-to-word`,
method: 'postJsonD',
data: params,
responseType: 'blob'
});
/** 获取方案执行表规则查看 */
export const getTableRuleDetail= (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/query-exec-table-rule-detail?reportExecGuid=${params}`,
method: 'get'
});
/** 获取数据质量一级指标得分统计 */
export const getLargeCategoryScore = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/get-largeCategory-score?reportExecGuid=${params}`,
method: 'get'
});
/** 获取质量分析报告的详细内容,根绝报告guid。 */
export const getReportDetail = (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/get-report-data`,
method: 'post',
data: params
});
/** 获取方案执行明细 */
export const getPlanReportDetail= (params) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-analysis-report/query-exec-table-detail?reportExecGuid=${params.reportExecGuid}&planGuid=${params.planGuid}`,
method: 'get'
});
/** 下载sql语句执行 */
export const downPlanSql = (planGuid) => request({
url: `${import.meta.env.VITE_APP_QUALITY_BASEURL}/quality-plan/down-plan-sql?planGuid=${planGuid}`,
method: 'post',
responseType: 'blob'
})
import request from "@/utils/request";
/**
* 流通撮合
**/
/** 获取已添加的数据产品列表 */
export const getMatchList = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/circulation-matching/page-list`,
method: 'post',
data: params
})
/** 获取撮合详情 */
export const getMatchDetail = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/circulation-matching/detail`,
method: 'get',
params
})
/** 新增撮合信息 */
export const matchSave = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/circulation-matching/save`,
method: 'post',
data: params
});
/** 更新撮合信息 */
export const matchUpdate = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/circulation-matching/update`,
method: 'post',
data: params
});
/** 删除撮合信息 */
export const matchDelete = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/circulation-matching/delete`,
method: 'delete',
data: params
});
/** 获取撮合日志 */
export const getMatchLog = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/circulation-matching/state-change-log-list`,
method: 'get',
params
});
/**
* 金融产品
**/
/** 获取金融产品列表。 */
export const getFinancialList = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/financial-products/page-list`,
method: 'post',
data: params
})
/** 获取金融产品详情 */
export const getFinancialDetail = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/financial-products/detail`,
method: 'get',
params
})
/** 新增金融产品信息 */
export const financialSave = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/financial-products/save`,
method: 'post',
data: params
});
/** 更新金融产品信息 */
export const financialUpdate = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/financial-products/update`,
method: 'post',
data: params
});
/** 删除金融产品信息 */
export const financialDelete = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/financial-products/delete`,
method: 'delete',
data: params
});
/** 更新金融产品上架状态 */
export const financialUpdateStatus = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/financial-products/update-listing-Status`,
method: 'post',
data: params
});
/** 验证金融产品名称唯一性 */
export const checkFinancialName = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/financial-products/verify-data-name`,
method: 'get',
params
})
// 数据要素乘
export const orderStates = [{
value: 'N',
label: '待沟通'
}, {
value: 'I',
label: '沟通中'
}, {
value: 'R',
label: '达成意向'
}, {
value: 'C',
label: '合同拟定'
}, {
value: 'S',
label: '合同签署'
}, {
value: 'P',
label: '合同执行中'
}, {
value: 'Y',
label: '合同执行完'
}, {
value: 'D',
label: '撮合关闭'
}]
export const filterVal = (val, type) => {
if(type == 'orderState'){
const row = orderStates.filter(d => d.value == val);
return row.length?row[0].label:'--';
} else if(type == 'tenantNature'){
let approval = '--';
switch (val) {
case 1:
approval = '数据字典数据治理';
break;
case 2:
approval = '律师事务所';
break;
case 3:
approval = '会计师事务所';
break;
case 4:
approval = '金融机构';
break;
case 5:
approval = '资产评估机构';
break;
case 6:
approval = '申请数据资产化企业';
break;
case 7:
approval = '其他';
break;
default:
approval = '--';
break;
}
return approval;
}
}
export const filterStatus = (row, type) => {
let state = 'info'
if (type == 'orderState') {
switch (row[type]) {
case "N":
state = 'warning'
break;
case "I":
state = 'warning'
break;
case "R":
state = "warning"
break
case "C":
state = "warning"
break
case "S":
state = "primary"
break
case "P":
state = "primary"
break
case "Y":
state = 'success';
break;
case "D":
state = "info"
break
default:
state = "info"
break
}
}
return state;
}
......@@ -2,16 +2,174 @@ import request from "@/utils/request";
/**
* 数据字典
**/
// 编码规则流水号
export const getCoderuleList = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/code-rule/list`,
method: 'post',
data: params
})
// 获取数据类型的接口
export const getDataTypeList = (params) => request({
url: `${import.meta.env.VITE_APP_API_BASEURL}/data-dict/get-data-list`,
method: 'post',
data: params,
})
// 获取数据库列表
export const getDataBaseList = (params) => request({
url: `${import.meta.env.VITE_APP_API_BASEURL}/data-source/get-source-list`,
method: 'post',
data: params,
})
// 新增
export const addDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/add`,
method: 'post',
data: params
})
// 删除
export const deleteDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/del`,
method: 'delete',
data: params
})
// 删除数据字典前的校验
export const checkDeleteDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/check-del`,
method: 'delete',
data: params
})
// 编辑校验数据结构删除的条件
export const checkDeleteDictionaryScheme = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/check-del/dictionary-scheme`,
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`,
method: 'post',
params
})
// 修改
export const updateDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/update`,
method: 'put',
data: params
})
// 详情
export const getDictionaryDetail = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/detail/${params}`,
method: 'get'
})
// 查看数据字典数据
export const getDictionaryFileds = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/dictionary-data/${params}`,
method: 'get'
})
// 数据字典启用停用
export const updateDictionaryState = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/change-state`,
method: 'get',
params
})
// 检验是否存在
export const checkDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/check-exist`,
method: 'get',
params
})
// 数据字典新增数据时生成编码规则
export const getDictionaryRuleData = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/generate/code-rule/byGuid`,
method: 'get',
params
})
// 数据字典树形数据
export const getDictionaryTree = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/tree-list`,
method: 'post',
params
})
// 保存动态数据字典数据
export const saveDictionaryData = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/save/dictionary-data`,
method: 'post',
data: params
})
// 更新数据字典数据
export const updateDictionaryData = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/update/dictionary-data`,
method: 'post',
data: params
})
// 删除数据字典数据
export const deleteDictionaryData = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/del/dictionary-data`,
method: 'delete',
data: params
})
// 导入数据字典
export const importDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/import/data-dictionary`,
method: 'post',
data: params
})
// 显示导入的数据字典数据
export const showDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/import/show/data-dictionary`,
method: 'post',
data: params,
headers: {
'Content-Type': 'multipart/form-data'
}
})
// 导出数据字典模板
export const exportDictionary = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/export/data-dictionary/schema`,
method: 'post',
data: params,
responseType: 'blob'
})
// 导出数据字典数据
export const exportDictionaryFileds = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/export/data-dictionary/data`,
method: 'post',
data: params,
responseType: 'blob'
})
// 验证数据是否符合标准
export const checkDictionaryData = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/check/dictionary-data`,
method: 'post',
data: params
})
/**
* 获取数据级别
* @param {Object}
* { paramCode: "DATA-CLASSIFY" }
* 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',
})
......@@ -213,6 +371,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',
})
/**
* 分类分级目录树形列表
......@@ -390,3 +560,152 @@ export const filterVal = (val, type) => {
}
return status;
}
/** 获取字典列表
* 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'
})
/** 业务规则配置-新增
* @param {Object}
* @path /biz-rule-config/save
*/
export const saveBizRuleConfig = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/save`,
method: 'post',
data
})
/**树形目录
* @param {Object}
* @path /db-dir/tree-list
*/
export const getDbDirTreeList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/tree-list`,
method: 'post',
data
})
/**
* 数据库目录-表数据列表查询
* @param {Object}
* @path /db-dir/table/page-list
*/
export const getDbDirTablePageList = (data) => request({
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/page-list`,
method: 'post',
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
})
......
......@@ -17,10 +17,11 @@ export const deleteMetaDataTask = (params) => request({
})
// 分页查询
export const getMetaDataTask = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/page-list`,
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/page-list`,
method: 'post',
data: params
})
// 修改
export const updateMetaDataTask = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/update`,
......@@ -92,7 +93,7 @@ export const getMetaDataSheet = (params) => request({
})
// 表字段查询
export const getMetaSheetField = (params) => request({
url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-field-list`,
url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-table-field-list`,
method: 'post',
params
})
......
import request from "@/utils/request";
/** 校验公司名称是否重复 */
export const checkCompanyName = (params) => request({
url: `${import.meta.env.VITE_API_PORTALURL}/portal/cooperate-register/verify-company-name`,
method: 'get',
params
})
/** 获取短信验证码 */
export const getRegisterCode = (params) => request({
url: `${import.meta.env.VITE_API_PORTALURL}/portal/sms/get-verify-code`,
method: 'post',
params
})
/** 校验短信验证码 */
export const checkRegisterCode = (params) => request({
url: `${import.meta.env.VITE_API_PORTALURL}/portal/sms/get-verify-code-validation`,
method: 'post',
params
})
/** 注册信息申请 */
export const registerInfoSave = (params) => request({
url: `${import.meta.env.VITE_API_PORTALURL}/portal/cooperate/save`,
method: 'post',
data: params
});
/** 获取注册信息列表。 */
export const getRegisterInfoList = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/cooperate-register/page-list`,
method: 'post',
data: params
})
/** 获取注册信息详情 */
export const getRegiaterInfoDetail = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/cooperate-register/detail`,
method: 'get',
params
})
/** 更新注册信息 */
export const registerInfoUpdate = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/cooperate-register/update`,
method: 'post',
data: params
});
/** 删除注册信息 */
export const registerInfoDelete = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/cooperate-register/delete`,
method: 'delete',
data: params
});
/** 验证管理员账号是否重复 */
export const checkAccount = (params) => request({
url: `${import.meta.env.VITE_API_ASSET_BASEURL}/cooperate-register/verify-admin-account`,
method: 'get',
params
})
/** 获取登录日志 */
export const getAccountLog = (params) => request({
url: `${import.meta.env.VITE_APP_API_BASEURL}/user/user-login-record`,
method: 'post',
data: params
})
/** 获取图形验证码 **/
export const getImgCodeSrc = (params={}) => request({
url: `${import.meta.env.VITE_API_PORTALURL}/portal/get-captcha`,
method: 'get',
params
})
/** 校验图形验证码 **/
export const checkImgCode = (params={}) => request({
url: `${import.meta.env.VITE_API_PORTALURL}/portal/check`,
method: 'post',
params
})
......@@ -209,8 +209,76 @@ const routes: RouteRecordRaw[] = [
cache: true
},
},
],
{
path: 'configure-rules',
name: 'configureRules',
component: () => import('@/views/data_inventory/configureRules.vue'),
meta: {
title: '配置业务规则',
sidebar: false,
breadcrumb: false,
cache: true,
reuse: true,
editPage: true,
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-inventory/data-dictionary',
component: Layout,
meta: {
title: '数据字典',
icon: 'sidebar-cooperation',
},
children: [
{
path: '',
name: 'dictionary',
component: () => import('@/views/data_inventory/dictionary.vue'),
meta: {
title: '数据字典',
sidebar: false,
breadcrumb: false,
cache: true
},
},
],
},
]
export default routes
......
......@@ -101,6 +101,13 @@ const systemRoutes: RouteRecordRaw[] = [
// 动态路由(异步路由、导航栏路由)
const asyncRoutes: Route.recordMainRaw[] = [
{
meta:{
title: '首页',
},
children: [
],
},
{
meta: {
title: '数据资产管理',
},
......
......@@ -218,7 +218,7 @@ const rulesDetailTableInfo: any = ref({
oneRulesDetailDialogVisible.value = true;
} else {
detailJson.value[row.ruleConfGuid] = { isRequest: true };
getRecordRuleConfDetail({ruleConfGuid: row.ruleConfGuid, planExecGuid: planExecGuid }).then((res: any) => {
getRecordRuleConfDetail({ ruleConfGuid: row.ruleConfGuid, planExecGuid: planExecGuid }).then((res: any) => {
detailLoading.value = false;
oneRulesDetailDialogVisible.value = true;
if (res.code == proxy.$passCode) {
......
......@@ -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
......@@ -7,7 +7,7 @@ import TableTools from '@/components/Tools/table_tools.vue';
import { getGradeList } from "@/api/modules/dataInventory";
import { getLabelList, getClassifyGradeTreeList, saveLabel, getLabelPageList, deleteLabel, updateLabel } from "@/api/modules/dataLabel";
import { CirclePlus, Delete } from "@element-plus/icons-vue";
import { el, tr } from 'element-plus/es/locale';
const { proxy } = getCurrentInstance() as any;
const dialogLabelFormRef = ref();
......@@ -123,7 +123,7 @@ const treeInfo = ref<any>({
filter: true,
queryValue: "",
className: 'tree-list',
queryPlaceholder: "输入标准集名称搜索",
queryPlaceholder: "输入目录名称搜索",
props: {
label: "classifyName",
value: "guid",
......@@ -560,7 +560,6 @@ const searchClass = async (val: any, clear: boolean = false) => {
return;
}
if (val?.labelName?.length !== 0) {
console.log('调用了吗');
tableInfo.value.loading = true;
const params = {
pageIndex: page.value.curr,
......
<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'
......
......@@ -4,14 +4,14 @@
<script lang="ts" setup name="importFile">
import { ref } from "vue";
import { useRoute,useRouter } from "vue-router"
import { useRoute, useRouter } from "vue-router"
import useUserStore from "@/store/modules/user";
import { ElMessage, ElMessageBox } from "element-plus";
import Tabs from '@/components/Tabs/index.vue'
import Table from '@/components/Table/index.vue'
import Dialog from '@/components/Dialog/index.vue'
import useCatchStore from "@/store/modules/catch";
import { download, downFile,getDownloadUrl } from '@/utils/common'
import { download, downFile, getDownloadUrl } from '@/utils/common'
import {
addImportData,
deleteImportData,
......@@ -45,15 +45,15 @@ const defaulttabs = [
{ label: '数据字典导入', name: 'dictionary' },
// { label: '质量模型导入', name: 'qualityModelGroup' },
// { label: '质量规则导入', name: 'qualityRule' },
]
]
const importTabs = [
{ label: '导入文件数据', name: 'importFile' },
// { label: '质量模型导入', name: 'qualityModelGroup' },
// { label: '质量规则导入', name: 'qualityRule' },
]
]
const tabsInfo = ref({
activeName: '',
tabs: isfileImport?importTabs:defaulttabs
tabs: isfileImport ? importTabs : defaulttabs
})
const currTableData: any = ref<Object>({});
......@@ -232,7 +232,7 @@ const tableBtnClick = async (scope, btn) => {
if (res && !res.msg) {
let name = row.errorFilePath;
var fileSuffix = name ? name.substring(name.lastIndexOf('.') + 1) : '';
let fileName = name ? name.substring(name.lastIndexOf('/') + 1) :''
let fileName = name ? name.substring(name.lastIndexOf('/') + 1) : ''
download(res, fileName, fileSuffix);
} else {
res?.msg && ElMessage.error(res?.msg);
......@@ -267,7 +267,7 @@ const batching = (type) => {
return
}
open("此操作将永久删除, 是否继续?", "warning", true);
} else if(type === 'importFile') {
} else if (type === 'importFile') {
if (isfileImport == '2' || isfileImport == '4') {
dialogInfo.value.header.title = '导入数据'
dialogInfo.value.type = 'upload'
......@@ -279,8 +279,8 @@ const batching = (type) => {
dialogInfo.value.visible = true
} else {
router.push({
name:"importData",
query:route.query
name: "importData",
query: route.query
})
}
}
......@@ -391,7 +391,7 @@ const importData = (info) => {
uploadFiles.value.forEach((item: any, index: number) => {
params.append("uploadFile", item.raw);
});
paramUrl = `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/meta-collect-import?staffGuid=${userData.staffGuid}&databaseNameZh=${info.databaseNameZh}&databaseNameEn=${info.databaseNameEn}&isCover=${info.isCover}`
paramUrl = `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/meta-collect-import?staffGuid=${userData.staffGuid}&databaseNameZh=${info.databaseNameZh}&databaseNameEn=${info.databaseNameEn}&isCover=${info.isCover}`
} else {
uploadFiles.value.forEach((item: any, index: number) => {
params.append("file", item.raw);
......@@ -643,7 +643,7 @@ const setUploadInfo = () => {
onActivated(() => {
uploadSetting.value = cacheStore.getCatch('uploadSetting') ?? {}
if(isfileImport) {
if (isfileImport) {
tabsActiveName.value = 'importFile'
} else {
tabsActiveName.value = uploadSetting.value?.type || 'standard'
......@@ -660,8 +660,10 @@ onActivated(() => {
<Tabs v-if="!isfileImport" :tabs-info="tabsInfo" @tabChange="tabsChange" />
<div class="table_tool_wrap">
<div class="tools_btns">
<el-button type="primary" @click="batching('import')" v-if="tabsActiveName !== 'importFile'" v-preReClick>批量导入</el-button>
<el-button type="primary" @click="batching('importFile')" v-if="tabsActiveName == 'importFile'" v-preReClick>文件导入</el-button>
<el-button type="primary" @click="batching('import')" v-if="tabsActiveName !== 'importFile'"
v-preReClick>批量导入</el-button>
<el-button type="primary" @click="batching('importFile')" v-if="tabsActiveName == 'importFile'"
v-preReClick>文件导入</el-button>
<el-button @click="batching('delete')" v-preReClick>批量删除</el-button>
<el-button @click="getFirstPageData" v-preReClick>刷新结果</el-button>
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!