si@aidatagov.com 4 weeks ago
parent
commit
6614447619
  1. 6
      vue-fastapi-backend/module_admin/controller/meta_controller.py
  2. 37
      vue-fastapi-backend/module_admin/dao/meta_dao.py
  3. 6
      vue-fastapi-backend/module_admin/entity/do/meta_do.py
  4. 8
      vue-fastapi-backend/module_admin/entity/vo/meta_vo.py
  5. 3
      vue-fastapi-backend/module_admin/service/approval_service.py
  6. 3
      vue-fastapi-backend/module_admin/service/data_ast_content_service.py
  7. 90
      vue-fastapi-backend/module_admin/service/meta_service.py
  8. 2
      vue-fastapi-frontend/src/views/meta/metaInfo/businssRelation.vue
  9. 73
      vue-fastapi-frontend/src/views/meta/metaInfo/index.vue
  10. 2
      vue-fastapi-frontend/src/views/metadataConfig/metaclas/index.vue
  11. 4
      vue-fastapi-frontend/src/views/metadataConfig/relconf/index.vue
  12. 69
      vue-fastapi-frontend/src/views/system/flow/index.vue

6
vue-fastapi-backend/module_admin/controller/meta_controller.py

@ -8,7 +8,7 @@ from utils.common_util import bytes2file_response
from module_admin.service.meta_service import MetaService
from module_admin.entity.vo.meta_vo import MetaPageObject, MetaColObject, SuppleModel, MetaBusinessRelShipObject, \
MetaProcQueryObject
MetaProcQueryObject, MetaBusinessDetail
metaController = APIRouter(prefix='/dasset', dependencies=[Depends(LoginService.get_current_user)])
@ -45,9 +45,9 @@ async def meta_supp(request: Request,
@metaController.get("/meta/getMetaInfoApplyBusinessDetail")
async def getMetaInfoApplyBusinessDetail(request: Request,
businessId: str,
metaBusinessDetail: MetaBusinessDetail = Depends(MetaBusinessDetail.as_query),
query_db: AsyncSession = Depends(get_db)):
result = await MetaService.get_meta_apply_detail_services(query_db, businessId)
result = await MetaService.get_meta_apply_detail_services(query_db, metaBusinessDetail)
return ResponseUtil.success(data=result)

37
vue-fastapi-backend/module_admin/dao/meta_dao.py

@ -1,6 +1,6 @@
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy import select, text, cast, Integer, and_, or_, outerjoin, func, join, update, desc
from module_admin.entity.vo.meta_vo import MetaPageObject, MetaColObject
from module_admin.entity.vo.meta_vo import MetaPageObject, MetaColObject, MetaBusinessDetail
from module_admin.entity.do.datastd_do import DataStdDict
from module_admin.entity.do.meta_do import MetadataExtractInfo, MetadataSuppInfo, MetadataFldTabExtractInfo, \
MetadataFldSuppInfo, MetadataClas, MetadataSuppInfoVett, MetadataFldSuppInfoVett, MetaBatchTabClas, \
@ -126,7 +126,7 @@ class MetaDao:
MetadataExtractInfo.tab_eng_name == MetadataFldSuppInfo.tab_eng_name
), isouter=True)
.where(
MetadataExtractInfo.ssys_id == query_object.ssys_id if query_object.ssys_id else True,
MetadataExtractInfo.ssys_id == query_object.ssys_id if query_object.ssys_id and query_object.ssys_id != -1 else True,
MetadataExtractInfo.mdl_name == query_object.mdl_name if query_object.mdl_name else True,
or_(MetadataExtractInfo.tab_eng_name.like(f'%{query_object.tab_name}%'),
MetadataExtractInfo.tab_cn_name.like(f'%{query_object.tab_name}%'),
@ -291,15 +291,22 @@ class MetaDao:
return query_result
@classmethod
async def get_supp_table_vett_by_businessId(cls, businessId: str, db: AsyncSession):
query_result = (
(
await db.execute(
select(MetadataSuppInfoVett).where(MetadataSuppInfoVett.business_id == businessId).distinct()
)
).scalars().all()
async def get_supp_table_vett_by_businessId(cls, metaBusinessDetail: MetaBusinessDetail, db: AsyncSession):
query = (
select(MetadataSuppInfoVett).where(
MetadataSuppInfoVett.business_id == metaBusinessDetail.business_id).distinct()
)
return query_result
result = await PageUtil.paginate(db, query, metaBusinessDetail.page_num, metaBusinessDetail.page_size, True)
return result
@classmethod
async def get_supp_table_vett_by_businessId_no_page(cls, businuessId: str, db: AsyncSession):
query = (
select(MetadataSuppInfoVett).where(
MetadataSuppInfoVett.business_id == businuessId).distinct()
)
result = (await db.execute(query)).scalars().all()
return result
@classmethod
async def get_supp_column_vett_by_tableInfo(cls, db: AsyncSession, tableInfo):
@ -430,9 +437,10 @@ class MetaDao:
@classmethod
async def get_meta_col_supp_vett(cls, table: MetadataSuppInfoVett, db: AsyncSession):
sql_query = text("select max(apply_time) from t_metadata_fld_supp_info_vett where ssys_id =" + str(table.ssys_id) +
" and mdl_name = '" + table.mdl_name + "' and tab_eng_name = '" + table.tab_eng_name +
"'")
sql_query = text(
"select max(apply_time) from t_metadata_fld_supp_info_vett where ssys_id =" + str(table.ssys_id) +
" and mdl_name = '" + table.mdl_name + "' and tab_eng_name = '" + table.tab_eng_name +
"'")
maxTime = (await db.execute(sql_query)).scalar()
query_result = (
@ -464,7 +472,8 @@ class MetaDao:
return query_result
@classmethod
async def get_supp_column_by_columnInfo(cls, ssys_id: int, mdlName: str, tabEngName: str, fldEngName: str, db: AsyncSession):
async def get_supp_column_by_columnInfo(cls, ssys_id: int, mdlName: str, tabEngName: str, fldEngName: str,
db: AsyncSession):
query_result = (
(
await db.execute(

6
vue-fastapi-backend/module_admin/entity/do/meta_do.py

@ -107,9 +107,9 @@ class MetadataFldTabExtractInfo(Base):
fld_eng_name = Column(String(255, collation='utf8_general_ci'), comment='字段英文名称')
fld_cn_name = Column(String(255, collation='utf8_general_ci'), comment='字段中文名称')
fld_type = Column(String(50, collation='utf8_general_ci'), comment='字段类型')
pk_flag = Column(Boolean, default=False, comment='是否为主键') # 待确认字段类型
require_flag = Column(Boolean, default=False, comment='是否必填')
idx_flag = Column(Boolean, default=False, comment='是否为索引')
pk_flag = Column(String(50, collation='utf8_general_ci'), comment='是否为主键') # 待确认字段类型
require_flag = Column(String(50, collation='utf8_general_ci'), comment='是否必填')
idx_flag = Column(String(50, collation='utf8_general_ci'), comment='是否为索引')
upd_time = Column(DateTime, comment='更新时间')

8
vue-fastapi-backend/module_admin/entity/vo/meta_vo.py

@ -73,3 +73,11 @@ class MetaProcQueryObject(BaseModel):
ssys_id: Optional[int]
mdl_name: Optional[str]
tab_eng_name: Optional[str]
@as_query
class MetaBusinessDetail(BaseModel):
model_config = ConfigDict(alias_generator=to_camel, from_attributes=True)
business_id: Optional[str]
page_num: Optional[int]
page_size: Optional[int]

3
vue-fastapi-backend/module_admin/service/approval_service.py

@ -4,6 +4,7 @@ import uuid
from typing import Optional
from sqlalchemy.ext.asyncio import AsyncSession
from module_admin.entity.vo.common_vo import CrudResponseModel
from module_admin.entity.vo.meta_vo import MetaBusinessDetail
from module_admin.entity.vo.approval_vo import ApplyModel, OperateModel, ApprovalQueryObject, EditObjectModel, \
SaveConfModel
from module_admin.entity.vo.user_vo import CurrentUserModel
@ -113,7 +114,7 @@ class ApprovalService:
@classmethod
async def syncSuppInfo(cls, result_db: AsyncSession, businessId: str, operateType: str):
tableList = await MetaDao.get_supp_table_vett_by_businessId(businessId, result_db)
tableList = await MetaDao.get_supp_table_vett_by_businessId_no_page(businessId, result_db)
if tableList is None or len(tableList) == 0:
raise ServiceException(message='所查询的业务数据不存在')
if tableList[0].apply_status == 'succeed' or tableList[0].apply_status == 'rejected':

3
vue-fastapi-backend/module_admin/service/data_ast_content_service.py

@ -84,7 +84,6 @@ class DataCatalogService:
'dataAstUpdTime': item['dataAstUpdTime'],
'dataAstSrc': item['dataAstSrc'],
'astNo': item['astNo'],
'relaOnum': item['relaOnum'],
'bookmarkOrde': item['bookmarkOrde'],
'bookmarkFlag': item['bookmarkFlag'],
'sczcFlag': item['sczcFlag']
@ -286,7 +285,7 @@ class DataCatalogService:
# 添加子节点
sys_groups[sys_name]["children"].append({
"dataAssetCatalogNo": eng_name,
"dataAssetCatalogName": cn_name,
"dataAssetCatalogName": cn_name if cn_name else eng_name,
"dataAssetCatalogAstno": ast_no,
"rel_status": rel_status
})

90
vue-fastapi-backend/module_admin/service/meta_service.py

@ -5,7 +5,7 @@ import uuid
import pandas as pd
from fastapi import UploadFile
from module_admin.entity.vo.meta_vo import MetaPageObject, MetaColObject, SuppleModel, MetaBusinessRelShipObject, \
MetaProcQueryObject
MetaProcQueryObject, MetaBusinessDetail
from module_admin.entity.do.meta_do import MetadataSuppInfo, MetadataFldSuppInfo, MetadataSuppInfoVett, \
MetadataFldSuppInfoVett, MetadataExtractInfo, MetadataFldTabExtractInfo
from module_admin.dao.meta_dao import MetaDao
@ -199,12 +199,12 @@ class MetaService:
return json.dumps(columnDict)
@classmethod
async def get_meta_apply_detail_services(cls, result_db: AsyncSession, businessId: str):
tableDataList = await MetaDao.get_supp_table_vett_by_businessId(businessId, result_db)
tableList = CamelCaseUtil.transform_result(tableDataList)
async def get_meta_apply_detail_services(cls, result_db: AsyncSession, metaBusinessDetail: MetaBusinessDetail):
tableResult = await MetaDao.get_supp_table_vett_by_businessId(metaBusinessDetail, result_db)
tableList = CamelCaseUtil.transform_result(tableResult.rows)
for tableData in tableList:
clas_list = await MetaDao.get_meta_tab_clas(result_db, tableData['ssysId'], tableData['mdlName'],
tableData['tabEngName'])
tableData['tabEngName'])
tableData['batchTabClas'] = CamelCaseUtil.transform_result(clas_list)
columnData = await MetaDao.get_supp_column_vett_by_tableInfo(result_db, tableData)
column_list = CamelCaseUtil.transform_result(columnData)
@ -213,7 +213,14 @@ class MetaService:
column['tabEngName'], column['fldEngName'])
column['batchColClas'] = CamelCaseUtil.transform_result(col_list)
tableData['columnList'] = column_list
return tableList
result = dict(
rows=tableList,
pageNum=tableResult.page_num,
pageSize=tableResult.page_size,
total=tableResult.total,
hasNext=tableResult.has_next,
)
return result
@classmethod
async def get_table_by_id(cls, result_db: AsyncSession, tableId: int):
@ -527,7 +534,7 @@ class MetaService:
"""
table_header_list = ['系统代码', '模式名称', '对象英文名', '补录对象名称', '补录对象描述', '负责人']
column_header_list = ['系统代码', '模式名称', '对象英文名', '字段英文名', '字段补录名', '补录主键',
'补录字段描述', '引用字典/标准', '安全等级', '负责人']
'补录字段描述', '引用字典/标准', '安全等级']
selector_header_list = ['补录主键', '安全等级']
option_list = [{}, {'补录主键': ['', ''], '安全等级': ['S1', 'S2', 'S3', 'S4']}]
sheet_config1 = dict(
@ -571,7 +578,7 @@ class MetaService:
'对象英文名': 'tab_eng_name',
'补录对象名称': 'tab_crrct_name',
'补录对象描述': 'tab_desc',
'负责人': 'rec_subm_prsn'
'负责人': 'pic'
}
column_header_dict = {
'系统代码': 'ssys_cd',
@ -582,8 +589,7 @@ class MetaService:
'补录主键': 'crrct_pk_flag',
'补录字段描述': 'fld_desc',
'引用字典/标准': 'data_dict_id',
'安全等级': 'data_sec_lvl',
'负责人': 'rec_subm_prsn'
'安全等级': 'data_sec_lvl'
}
contents = await file.read()
excel_file = pd.ExcelFile(io.BytesIO(contents))
@ -597,35 +603,36 @@ class MetaService:
# 校验, 1、各必填内容不能为空, 2.系统代码映射的系统是否存在 3.表是否存在 4.字段是否存在5.引用的字典标准是否存在6.标准的系统与表系统是否对应
if tableSheet == '表信息':
# 表信息补录
df = excel_file.parse(sheet_name=tableSheet)
df = excel_file.parse(sheet_name=tableSheet, dtype=str, keep_default_na=False, na_values=[])
df.rename(columns=table_header_dict, inplace=True)
for index, row in df.iterrows():
noneValid = ''
if row['ssys_cd'] is None or len(row['ssys_cd']) == 0:
noneValid += "sheet[表信息]中行:" + str(index+1) + "中的系统代码不能为空"
noneValid += "sheet[表信息]中行:" + str(index + 2) + "中的系统代码不能为空"
if row['mdl_name'] is None or len(row['mdl_name']) == 0:
if len(noneValid) > 0:
noneValid += ",模式名称不能为空"
else:
noneValid += "sheet[表信息]中行:" + str(index+1) + "中的模式名称不能为空"
noneValid += "sheet[表信息]中行:" + str(index + 2) + "中的模式名称不能为空"
if row['tab_eng_name'] is None or len(row['tab_eng_name']) == 0:
if len(noneValid) > 0:
noneValid += ",表英文名称不能为空"
else:
noneValid += "sheet[表信息]中行:" + str(index+1) + "中的表英文名不能为空"
noneValid += "sheet[表信息]中行:" + str(index + 2) + "中的表英文名不能为空"
if len(noneValid) > 0:
import_err_msg.append(noneValid)
continue
ssysId = next((item["id"] for item in dataSourceList if item["name"] == row['ssys_cd']), None)
if ssysId is None:
import_err_msg.append("行:" + str(index+1) + "中的系统不存在,需重新修正")
import_err_msg.append("行:" + str(index + 2) + "中的系统不存在,需重新修正")
continue
hasTable = await MetaDao.get_lastest_meta_data_supp_vett(result_db, ssysId, row['mdl_name'],
row['tab_eng_name'])
if hasTable:
if hasTable.apply_status == 'waiting':
import_err_msg.append(
'sheet[表信息]中行:' + str(index+1) + ' 导入的系统代码:' + row['ssys_cd'] + ',模式名称:' + row['mdl_name'] +
'sheet[表信息]中行:' + str(index + 2) + ' 导入的系统代码:' + row['ssys_cd'] + ',模式名称:' +
row['mdl_name'] +
',对象英文名:' + row['tab_eng_name'] +
'已存在补录待审核记录,请等待审批完成或撤回申请后,再行导入')
skip_table.append({'ssys_id': ssysId, 'mdl_name': row['mdl_name'],
@ -633,7 +640,8 @@ class MetaService:
continue
if hasTable.apply_status == 'pending':
import_err_msg.append(
'sheet[字段信息]中行:' + str(index+1) + ' 导入的系统代码:' + row['ssys_cd'] + ',模式名称:' + row['mdl_name'] +
'sheet[字段信息]中行:' + str(index + 2) + ' 导入的系统代码:' + row[
'ssys_cd'] + ',模式名称:' + row['mdl_name'] +
',对象英文名:' + row['tab_eng_name'] +
'已存在待审核记录,请等待审批完成或撤回申请后,再行导入')
skip_table.append({'ssys_id': ssysId, 'mdl_name': row['mdl_name'],
@ -645,7 +653,7 @@ class MetaService:
tableInfo = await MetaDao.get_meta_table(ssysId, row['mdl_name'],
row['tab_eng_name'], result_db)
if tableInfo is None:
import_err_msg.append("sheet[表信息]中行:"+str(index+1) + "中所对应的表不存在,无法上传补录")
import_err_msg.append("sheet[表信息]中行:" + str(index + 2) + "中所对应的表不存在,无法上传补录")
continue
tableOnum = uuid.uuid4()
suppTableInfo = MetadataSuppInfoVett()
@ -656,15 +664,18 @@ class MetaService:
if overWrite:
suppTableInfo.tab_crrct_name = row['tab_crrct_name']
suppTableInfo.tab_desc = row['tab_desc']
suppTableInfo.rec_subm_prsn = row['rec_subm_prsn']
suppTableInfo.rec_subm_prsn = row['pic']
else:
suppTableInfo.tab_crrct_name = row['tab_crrct_name'] if row['tab_crrct_name'] and \
str(row['tab_crrct_name']).strip() != '' else oldTable.tab_crrct_name if oldTable else None
str(row[
'tab_crrct_name']).strip() != '' else oldTable.tab_crrct_name if oldTable else None
suppTableInfo.tab_desc = row['tab_desc'] if row['tab_desc'] and \
str(row['tab_desc']).strip() != '' else oldTable.tab_desc if oldTable else None
suppTableInfo.rec_subm_prsn = row['rec_subm_prsn'] if row['rec_subm_prsn'] and \
str(row['rec_subm_prsn']).strip() != '' else oldTable.rec_subm_prsn if oldTable else None
suppTableInfo.pic = oldTable.pic if oldTable else None
str(row[
'tab_desc']).strip() != '' else oldTable.tab_desc if oldTable else None
suppTableInfo.rec_subm_prsn = row['pic'] if row['pic'] and \
str(row[
'pic']).strip() != '' else oldTable.pic if oldTable else None
suppTableInfo.rec_subm_prsn = current_user.user.user_name
suppTableInfo.gov_flag = oldTable.gov_flag if oldTable else None
suppTableInfo.tab_clas = oldTable.tab_clas if oldTable else None
suppTableInfo.apply_time = applyTime
@ -675,22 +686,22 @@ class MetaService:
successCount += 1
if columnSheet == '字段信息':
# 字段信息补录
df = excel_file.parse(sheet_name=columnSheet)
df = excel_file.parse(sheet_name=columnSheet, dtype=str, keep_default_na=False, na_values=[])
df.rename(columns=column_header_dict, inplace=True)
for index, row in df.iterrows():
noneValid = ''
if row['ssys_cd'] is None or len(row['ssys_cd']) == 0:
noneValid += "sheet[字段信息]中行:" + str(index+1) + "中的系统代码不能为空"
noneValid += "sheet[字段信息]中行:" + str(index + 2) + "中的系统代码不能为空"
if row['mdl_name'] is None or len(row['mdl_name']) == 0:
if len(noneValid) > 0:
noneValid += ",模式名称不能为空"
else:
noneValid += "sheet[字段信息]中行:" + str(index+1) + "中的模式名称不能为空"
noneValid += "sheet[字段信息]中行:" + str(index + 2) + "中的模式名称不能为空"
if row['tab_eng_name'] is None or len(row['tab_eng_name']) == 0:
if len(noneValid) > 0:
noneValid += ",表英文名称不能为空"
else:
noneValid += "sheet[字段信息]中行:" + str(index+1) + "中的表英文名不能为空"
noneValid += "sheet[字段信息]中行:" + str(index + 2) + "中的表英文名不能为空"
if len(noneValid) > 0:
import_err_msg.append(noneValid)
continue
@ -713,17 +724,19 @@ class MetaService:
row['tab_eng_name'],
row['fld_eng_name'], result_db)
if columnInfo is None:
import_err_msg.append("sheet[字段信息]中行:"+str(index+1) + "中所对应的字段不存在,无法上传补录")
import_err_msg.append("sheet[字段信息]中行:" + str(index + 2) + "中所对应的字段不存在,无法上传补录")
continue
dataDictId = ''
if row['data_dict_id'] and len(row['data_dict_id']) > 0:
dataDict = await DataStdDao.get_data_dict_by_code(result_db, row['data_dict_id'])
if dataDict is None:
import_err_msg.append("sheet[字段信息]中行:"+str(index+1) + "中所对应的数据字典不存在,无法上传补录")
import_err_msg.append(
"sheet[字段信息]中行:" + str(index + 2) + "中所对应的数据字典不存在,无法上传补录")
continue
else:
if int(dataDict.src_sys) != ssysId:
import_err_msg.append("sheet[字段信息]中行:"+str(index+1) + "中所对应的数据字典所属系统与表所属系统不一致,无法上传补录")
import_err_msg.append("sheet[字段信息]中行:" + str(
index + 2) + "中所对应的数据字典所属系统与表所属系统不一致,无法上传补录")
continue
else:
dataDictId = dataDict.onum
@ -735,22 +748,23 @@ class MetaService:
suppColumnInfo.fld_eng_name = row['fld_eng_name']
if overWrite:
suppColumnInfo.fld_crrct_name = row['fld_crrct_name']
suppColumnInfo.crrct_pk_flag = True if row['crrct_pk_flag'] and row['crrct_pk_flag'] == '' else False
suppColumnInfo.crrct_pk_flag = 'Y' if row['crrct_pk_flag'] and row[
'crrct_pk_flag'] == '' else 'N'
suppColumnInfo.fld_desc = row['fld_desc']
suppColumnInfo.data_sec_lvl = row['data_sec_lvl']
suppColumnInfo.rec_subm_prsn = row['rec_subm_prsn']
suppColumnInfo.data_dict_id = dataDictId if dataDictId != '' else None
else:
suppColumnInfo.fld_crrct_name = row['fld_crrct_name'] if row['fld_crrct_name'] and \
str(row['fld_crrct_name']).strip() != '' else oldColumn.fld_crrct_name if oldColumn else None
str(row[
'fld_crrct_name']).strip() != '' else oldColumn.fld_crrct_name if oldColumn else None
suppColumnInfo.crrct_pk_flag = oldColumn.crrct_pk_flag if row['crrct_pk_flag'] is None \
else True if row['crrct_pk_flag'] and row['crrct_pk_flag'] == '' else False
suppColumnInfo.fld_desc = row['fld_desc'] if row['fld_desc'] and \
str(row['fld_desc']).strip() != '' else oldColumn.fld_desc if oldColumn else None
str(row[
'fld_desc']).strip() != '' else oldColumn.fld_desc if oldColumn else None
suppColumnInfo.data_sec_lvl = row['data_sec_lvl'] if row['data_sec_lvl'] and \
str(row['data_sec_lvl'].strip()) != '' else oldColumn.data_sec_lvl if oldColumn else None
suppColumnInfo.rec_subm_prsn = row['rec_subm_prsn'] if row['rec_subm_prsn'] and \
str(row['rec_subm_prsn']).strip() != '' else oldColumn.rec_subm_prsn if oldColumn else None
str(row[
'data_sec_lvl'].strip()) != '' else oldColumn.data_sec_lvl if oldColumn else None
suppColumnInfo.data_dict_id = dataDictId if dataDictId != '' else oldColumn.data_dict_id \
if oldColumn else None
suppColumnInfo.pic = oldColumn.pic if oldColumn else None

2
vue-fastapi-frontend/src/views/meta/metaInfo/businssRelation.vue

@ -317,7 +317,7 @@ function initG6() {
let currentTableLabel = props.currentTable.tabEngName
if (props.currentTable.tabCnName && props.currentTable.tabCnName.length>0){
currentTableLabel += "("+props.currentTable.tabCnName+")"
}else if (props.currentTable.tabCrrctName && props.currentTable.tabCnName.tabCrrctName>0){
}else if (props.currentTable.tabCrrctName && props.currentTable.tabCrrctName.length>0){
currentTableLabel += "("+props.currentTable.tabCrrctName+")"
}
const list = attrs;

73
vue-fastapi-frontend/src/views/meta/metaInfo/index.vue

@ -27,7 +27,7 @@
</el-col>
<el-col :span="20" :xs="24">
<el-form :model="queryParams" :inline="true" label-width="75px">
<el-form-item label="对象名称:" prop="userName">
<el-form-item label="对象名称:">
<el-input
v-model="queryParams.tabName"
placeholder="请输入搜索表中文/英文名"
@ -36,6 +36,15 @@
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="模式名称:">
<el-input
v-model="queryParams.mdlName"
placeholder="请输入搜索模式名称"
clearable
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="列名称:">
<el-input
v-model="queryParams.colName"
@ -227,7 +236,7 @@
<el-form-item label="对象负责人">
<el-input
v-model="currentMetaData.pic"
placeholder="请输入搜索状态"
placeholder="请输入负责人"
clearable
/>
</el-form-item>
@ -261,20 +270,20 @@
<el-table-column label="字段类型" width="170" align="center" prop="fldType" ></el-table-column>
<el-table-column label="主键标志" width="100" align="center" prop="pkFlag">
<template #default="scope">
<span v-if="scope.row.pkFlag === '1' || scope.row.pkFlag === 'Y' || scope.row.pkFlag === true"></span>
<span v-if="scope.row.pkFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
<!-- <el-table-column label="字段描述" width="250" align="center" prop="fldDesc"></el-table-column>-->
<el-table-column label="是否必填" width="70" align="center" prop="requireFlag">
<template #default="scope">
<span v-if="scope.row.requireFlag === '1' || scope.row.requireFlag === 'Y' || scope.row.requireFlag === true"></span>
<span v-if="scope.row.requireFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="是否索引" width="150" align="center" prop="idxFlag">
<template #default="scope">
<span v-if="scope.row.idxFlag === '1' || scope.row.idxFlag === 'Y' || scope.row.idxFlag === true"></span>
<span v-if="scope.row.idxFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
@ -285,7 +294,8 @@
</el-table-column>
<el-table-column label="补录主键" align="center" prop="crrctPkFlag">
<template #default="scope">
<span>{{scope.row.crrctPkFlag}}</span>
<span v-if="scope.row.crrctPkFlag"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="补录字段描述" align="center" prop="fldDesc">
@ -298,11 +308,11 @@
<!-- <span>{{scope.row.suppRecStat}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="负责人" align="center" prop="pic">
<template #default="scope">
<span>{{scope.row.pic}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="负责人" align="center" prop="pic">-->
<!-- <template #default="scope">-->
<!-- <span>{{scope.row.pic}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="字段标签" width="150" align="center" prop="fldClas">
<template #default="scope">
<el-popover v-for="item in scope.row.tempFldClas" placement="right" width="auto" trigger="hover">
@ -471,7 +481,7 @@
<el-input disabled v-model="currentColumnData.fldType"></el-input>
</el-form-item>
<el-form-item label="主键标志">
<template v-if="currentColumnData.pkFlag === '1' || currentColumnData.pkFlag === 'Y' || currentColumnData.pkFlag === true">
<template v-if="currentColumnData.pkFlag === 'Y'">
<el-input disabled :model-value="'是'"></el-input>
</template>
<template v-else>
@ -479,7 +489,7 @@
</template>
</el-form-item>
<el-form-item label="是否必填">
<template v-if="currentColumnData.requireFlag === '1' || currentColumnData.requireFlag === 'Y' || currentColumnData.requireFlag === true">
<template v-if="currentColumnData.requireFlag === 'Y'">
<el-input disabled :model-value="'是'"></el-input>
</template>
<template v-else>
@ -487,7 +497,7 @@
</template>
</el-form-item>
<el-form-item label="是否索引">
<template v-if="currentColumnData.idxFlag === '1' || currentColumnData.idxFlag === 'Y' || currentColumnData.idxFlag === true">
<template v-if="currentColumnData.idxFlag === 'Y'">
<el-input disabled :model-value="'是'"></el-input>
</template>
<template v-else>
@ -508,9 +518,9 @@
<!-- <el-form-item label="状态">-->
<!-- <el-input v-model="currentColumnData.suppRecStat"/>-->
<!-- </el-form-item>-->
<el-form-item label="负责人">
<el-input v-model="currentColumnData.pic"/>
</el-form-item>
<!-- <el-form-item label="负责人">-->
<!-- <el-input v-model="currentColumnData.pic"/>-->
<!-- </el-form-item>-->
<el-form-item label="字段空值率">
<el-input v-model="currentColumnData.fldNullRate"/>
</el-form-item>
@ -772,13 +782,28 @@
</template>
</el-upload>
<el-form>
<el-form-item label="开启覆盖">
<el-form-item>
<template #label>
开启覆盖
<el-tooltip
class="box-item"
effect="dark"
placement="right"
>
<template #content>
<div>打开开启覆盖则原补录信息会被模板中未填信息覆盖为空值<br>
关闭开启覆盖则模板中留空数据不会影响原补录信息
</div>
</template>
<el-link :underline="false" type="primary"><i class="ri-question-line"></i></el-link>
</el-tooltip>
</template>
<el-switch v-model="upload.overWrite"></el-switch>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button type="primary" :disabled="upload.isUploading" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</template>
@ -1037,10 +1062,10 @@
// if (columnList.value[i].suppRecStat !== currentColumnData.value.suppRecStat){
// columnList.value[i].suppRecStat = currentColumnData.value.suppRecStat
// }
if (columnList.value[i].pic !== currentColumnData.value.pic){
columnList.value[i].pic = currentColumnData.value.pic
changed = true
}
// if (columnList.value[i].pic !== currentColumnData.value.pic){
// columnList.value[i].pic = currentColumnData.value.pic
// changed = true
// }
if (columnList.value[i].fldNullRate !== currentColumnData.value.fldNullRate){
columnList.value[i].fldNullRate = currentColumnData.value.fldNullRate
changed = true
@ -1395,7 +1420,7 @@
password:cache.local.get("password")
}
getDataSourceList(query).then(res=>{
databaseList.value = [{ id: 100, name: "数据源", parentId: 0, children: res.data.totalList.map(element => ({ ...element, parentId: "100" })) }]
databaseList.value = [{ id: -1, name: "数据源", parentId: 0, children: res.data.totalList.map(element => ({ ...element, parentId: -1 })) }]
})
}
function handleQuery(){

2
vue-fastapi-frontend/src/views/metadataConfig/metaclas/index.vue

@ -3,7 +3,7 @@
<el-row :gutter="10" class="mb8">
<el-form :inline="true" :model="queryForm">
<el-form-item label="归属系统">
<el-select v-model="queryForm.ssysId" placeholder="请选择系统" clearable allow-create filterable style="width: 180px">
<el-select v-model="queryForm.ssysId" placeholder="请选择系统" clearable filterable style="width: 180px">
<el-option v-for="item in dsSysList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>

4
vue-fastapi-frontend/src/views/metadataConfig/relconf/index.vue

@ -4,7 +4,7 @@
<el-form :inline="true" :model="queryForm">
<el-row>
<el-form-item label="归属系统A">
<el-select v-model="queryForm.aSsysId" placeholder="请选择系统" clearable allow-create filterable style="width: 180px">
<el-select v-model="queryForm.aSsysId" placeholder="请选择系统" clearable filterable style="width: 180px">
<el-option v-for="item in dsSysList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
@ -14,7 +14,7 @@
</el-row>
<el-row>
<el-form-item label="归属系统B">
<el-select v-model="queryForm.bSsysId" placeholder="请选择系统" clearable allow-create filterable style="width: 180px">
<el-select v-model="queryForm.bSsysId" placeholder="请选择系统" clearable filterable style="width: 180px">
<el-option v-for="item in dsSysList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>

69
vue-fastapi-frontend/src/views/system/flow/index.vue

@ -281,20 +281,20 @@
<el-table-column label="字段类型" width="170" align="center" prop="fldType" ></el-table-column>
<el-table-column label="主键标志" width="100" align="center" prop="pkFlag">
<template #default="scope">
<span v-if="scope.row.pkFlag === '1' || scope.row.pkFlag === 'Y' || scope.row.pkFlag === true"></span>
<span v-if="scope.row.pkFlag && scope.row.pkFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
<!-- <el-table-column label="字段描述" width="250" align="center" prop="fldDesc"></el-table-column>-->
<el-table-column label="是否必填" width="70" align="center" prop="requireFlag">
<template #default="scope">
<span v-if="scope.row.requireFlag === '1' || scope.row.requireFlag === 'Y' || scope.row.requireFlag === true"></span>
<span v-if="scope.row.requireFlag && scope.row.requireFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="是否索引" width="150" align="center" prop="idxFlag">
<template #default="scope">
<span v-if="scope.row.idxFlag === '1' || scope.row.idxFlag === 'Y' || scope.row.idxFlag === true"></span>
<span v-if="scope.row.idxFlag && scope.row.idxFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
@ -467,20 +467,20 @@
<el-table-column label="字段类型" width="170" align="center" prop="fldType" ></el-table-column>
<el-table-column label="主键标志" width="100" align="center" prop="pkFlag">
<template #default="scope">
<span v-if="scope.row.pkFlag === '1' || scope.row.pkFlag === 'Y' || scope.row.pkFlag === true"></span>
<span v-if="scope.row.pkFlag && scope.row.pkFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
<!-- <el-table-column label="字段描述" width="250" align="center" prop="fldDesc"></el-table-column>-->
<el-table-column label="是否必填" width="70" align="center" prop="requireFlag">
<template #default="scope">
<span v-if="scope.row.requireFlag === '1' || scope.row.requireFlag === 'Y' || scope.row.requireFlag === true"></span>
<span v-if="scope.row.requireFlag && scope.row.requireFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="是否索引" width="150" align="center" prop="idxFlag">
<template #default="scope">
<span v-if="scope.row.idxFlag === '1' || scope.row.idxFlag === 'Y' || scope.row.idxFlag === true"></span>
<span v-if="scope.row.idxFlag&&scope.row.idxFlag === 'Y'"></span>
<span v-else></span>
</template>
</el-table-column>
@ -539,9 +539,9 @@
</el-table>
</div>
</el-dialog>
<el-dialog v-model="metaDataListDialog" width="80%" title="导入元数据">
<el-dialog v-model="metaData.metaDataListDialog" width="80%" title="导入元数据">
<el-table
:data="metaDataList"
:data="metaData.metaDataList"
style="width: 100%"
>
<el-table-column type="expand">
@ -558,7 +558,7 @@
<el-table-column prop="fldDesc" label="补录字段描述" align="center" />
<el-table-column prop="dataDictName" label="引用字典/标准" align="center" />
<el-table-column prop="dataSecLvl" label="安全等级" align="center" />
<el-table-column prop="recSubmPrsn" label="负责人" align="center" />
<!-- <el-table-column prop="recSubmPrsn" label="负责人" align="center" />-->
</el-table>
</template>
</el-table-column>
@ -573,10 +573,10 @@
</el-table-column>
<el-table-column prop="mdlName" label="模式名称" align="center" />
<el-table-column prop="tabEngName" label="表英文名" align="center" />
<el-table-column prop="tabCnName" label="表中文名" align="center" />
<!-- <el-table-column prop="tabCnName" label="表中文名" align="center" />-->
<el-table-column prop="tabCrrctName" label="表补录名" align="center" />
<el-table-column prop="tabRecNum" label="记录数" align="center" />
<el-table-column prop="tabType" label="对象类型" align="center" />
<!-- <el-table-column prop="tabRecNum" label="记录数" align="center" />-->
<!-- <el-table-column prop="tabType" label="对象类型" align="center" />-->
<el-table-column prop="govFlag" label="对象治理标志" align="center" />
<el-table-column prop="pic" label="负责人" align="center" />
<el-table-column prop="pic" label="对象标签" align="center" >
@ -596,6 +596,13 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="metaData.total > 0"
:total="metaData.total"
v-model:page="metaData.pageNum"
v-model:limit="metaData.pageSize"
@pagination="getMetaDataList"
/>
</el-dialog>
<!-- 弹窗 -->
@ -648,9 +655,15 @@ const data = reactive({
});
const showFlowDialog = ref(false);
const businessDialog = ref(false);
const metaDataListDialog = ref(false);
const metaData = ref({
metaDataListDialog: false,
metaDataList:[],
pageNum: 1,
pageSize: 10,
total: 0,
businessId: ''
});
const oldTableInfo = ref([]);
const metaDataList = ref([]);
const oldColumnList = ref([]);
const newTableInfo = ref([]);
const newColumnList = ref([]);
@ -1065,18 +1078,34 @@ function transformMetaDetailData(data){
}
businessDialog.value = true
}
function getMetaDataList(){
let param = {
businessId: metaData.value.businessId,
pageNum: metaData.value.pageNum,
pageSize: metaData.value.pageSize
}
getMetaInfoApplyBusinessDetail(param).then(res=>{
let data = JSON.parse(JSON.stringify(res.data))
metaData.value.metaDataList = data.rows
metaData.value.total = data.total
})
}
function showBusinessDataDialog(row){
if (row.businessType === 'metaDataInfo'){
metaData.value.businessId = row.businessId
let param = {
businessId: row.businessId
businessId: row.businessId,
pageNum: metaData.value.pageNum,
pageSize: metaData.value.pageSize
}
getMetaInfoApplyBusinessDetail(param).then(res=>{
let data = JSON.parse(JSON.stringify(res.data))
if (data.length === 1){
transformMetaDetailData(data[0])
}else if (data.length > 1){
metaDataList.value = data
metaDataListDialog.value = true
if (data.rows.length === 1){
transformMetaDetailData(data.rows[0])
}else if (data.rows.length > 1){
metaData.value.metaDataList = data.rows
metaData.value.total = data.total
metaData.value.metaDataListDialog = true
}
})
}else if(row.businessType ==="dataStdMain"){

Loading…
Cancel
Save