You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1532 lines
79 KiB

from dash import dcc, html
import feffery_antd_components as fac
from flask import session
# from . import profile, allocate_role
from api.dassetdict import get_dassetdict_list_api
from api.dasset import get_dasset_tree_api
from config.global_config import ApiBaseUrlConfig
import callbacks.dasset_c.dassetdict_c
def render(*args, **kwargs):
button_perms = kwargs.get('button_perms')
dasset_params = dict(dasset_name='')
dassetdict_params = dict(page_num=1, page_size=15)
tree_info = get_dasset_tree_api(dasset_params)
table_info = get_dassetdict_list_api(dassetdict_params)
tree_data = []
table_data = []
page_num = 1
page_size = 15
total = 0
if tree_info['code'] == 200:
tree_data= tree_info['data']
for item in tree_data:
callbacks.dasset_c.dassetdict_c.update_value_with_title(item)
if table_info['code'] == 200:
table_data = table_info['data']['rows']
page_num = table_info['data']['page_num']
page_size = table_info['data']['page_size']
total = table_info['data']['total']
for item in table_data:
if item['status'] == '0':
item['status'] = dict(checked=True)
else:
item['status'] = dict(checked=False)
item['key'] = str(item['dict_id'])
item['operation'] = [
{
'title': '修改',
'icon': 'antd-edit'
} if 'dasset:mates:dassetdict:edit' in button_perms else None,
{
'title': '删除',
'icon': 'antd-delete'
} if 'dasset:mates:dassetdict:delete' in button_perms else None
]
return [
dcc.Store(id='dassetdict-button-perms-container', data=button_perms),
# 用于导出成功后重置dcc.Download的状态,防止多次下载文件
dcc.Store(id='dassetdict-export-complete-judge-container'),
# 绑定的导出组件
dcc.Download(id='dassetdict-export-container'),
# 字段管理模块操作类型存储容器
dcc.Store(id='dassetdict-operations-store'),
# 字段管理模块修改操作行key存储容器
dcc.Store(id='dassetdict-edit-id-store'),
# 字段管理模块删除操作行key存储容器
dcc.Store(id='dassetdict-delete-ids-store'),
fac.AntdRow(
[
fac.AntdCol(
[
fac.AntdInput(
id='dasset-input-search',
placeholder='请输入表英文名称',
autoComplete='off',
allowClear=True,
prefix=fac.AntdIcon(
icon='antd-search'
),
style={
'width': '85%'
}
),
fac.AntdTree(
id='dasset-tree',
treeData=tree_data,
defaultExpandAll=True,
showLine=False,
style={
'margin-top': '10px',
'font-size': '14px', # 内联样式中设置字体大小
'color': 'black', # 内联样式中设置字体颜色
}
)
],
span=4
),
fac.AntdCol(
[
fac.AntdRow(
[
fac.AntdCol(
html.Div(
[
fac.AntdForm(
[
fac.AntdSpace(
[
fac.AntdFormItem(
fac.AntdInput(
id='dassetdict-dict_fn-input',
placeholder='请输入字段英文名',
autoComplete='off',
allowClear=True,
style={
'width': 150
}
),
label='字段英文名'
),
fac.AntdFormItem(
fac.AntdInput(
id='dassetdict-dict_fccn-input',
placeholder='请输入字段中文名',
autoComplete='off',
allowClear=True,
style={
'width': 150
}
),
label='字段中文名'
),
fac.AntdFormItem(
fac.AntdInput(
id='dassetdict-data_dict_no-input',
placeholder='请输入字典编号',
autoComplete='off',
allowClear=True,
style={
'width': 150
}
),
label='字典编号'
),
fac.AntdFormItem(
fac.AntdSelect(
id='dassetdict-status-select',
placeholder='字段状态',
options=[
{
'label': '正常',
'value': '0'
},
{
'label': '停用',
'value': '1'
}
],
style={
'width': 150
}
),
label='字段状态'
),
fac.AntdFormItem(
fac.AntdButton(
'搜索',
id='dassetdict-search',
type='primary',
icon=fac.AntdIcon(
icon='antd-search'
)
)
),
fac.AntdFormItem(
fac.AntdButton(
'重置',
id='dassetdict-reset',
icon=fac.AntdIcon(
icon='antd-sync'
)
)
)
],
style={
'paddingBottom': '10px'
}
),
],
layout='inline',
)
],
id='dassetdict-search-form-container',
hidden=False
),
)
]
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdSpace(
[
fac.AntdButton(
[
fac.AntdIcon(
icon='antd-plus'
),
'新增',
],
id='dassetdict-add',
style={
'color': '#1890ff',
'background': '#e8f4ff',
'border-color': '#a3d3ff'
}
) if 'dasset:mates:dassetdict:add' in button_perms else [],
fac.AntdButton(
[
fac.AntdIcon(
icon='antd-edit'
),
'修改',
],
id={
'type': 'dassetdict-operation-button',
'index': 'edit'
},
#disabled=True,
style={
'color': '#71e2a3',
'background': '#e7faf0',
'border-color': '#d0f5e0'
}
) if 'dasset:mates:dassetdict:edit' in button_perms else [],
fac.AntdButton(
[
fac.AntdIcon(
icon='antd-minus'
),
'删除',
],
id={
'type': 'dassetdict-operation-button',
'index': 'delete'
},
#disabled=True,
style={
'color': '#ff9292',
'background': '#ffeded',
'border-color': '#ffdbdb'
}
) if 'dasset:mates:dassetdict:delete' in button_perms else [],
fac.AntdButton(
[
fac.AntdIcon(
icon='antd-arrow-up'
),
'导入',
],
id='dassetdict-import',
style={
'color': '#909399',
'background': '#f4f4f5',
'border-color': '#d3d4d6'
}
) if 'dasset:mates:dassetdict:import' in button_perms else [],
fac.AntdButton(
[
fac.AntdIcon(
icon='antd-arrow-down'
),
'导出',
],
id='dassetdict-export',
style={
'color': '#ffba00',
'background': '#fff8e6',
'border-color': '#ffe399'
}
) if 'dasset:mates:dassetdict:export' in button_perms else [],
],
style={
'paddingBottom': '10px'
}
),
span=16
),
fac.AntdCol(
fac.AntdSpace(
[
html.Div(
fac.AntdTooltip(
fac.AntdButton(
[
fac.AntdIcon(
icon='antd-search'
),
],
id='dassetdict-hidden',
shape='circle'
),
id='dassetdict-hidden-tooltip',
title='隐藏搜索'
)
),
html.Div(
fac.AntdTooltip(
fac.AntdButton(
[
fac.AntdIcon(
icon='antd-sync'
),
],
id='dassetdict-refresh',
shape='circle'
),
title='刷新'
)
),
],
style={
'float': 'right',
'paddingBottom': '10px'
}
),
span=8,
style={
'paddingRight': '10px'
}
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdSpin(
fac.AntdTable(
id='dassetdict-list-table',
data=table_data,
columns=[
{
'dataIndex': 'order_asc',
'title': '序号',
'width': 80,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'tab_cn_name',
'title': '表中文名',
'width': 150,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'tab_name',
'title': '表英文名',
'width': 150,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_fccn',
'title': '字段中文名',
'width': 150,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_fn',
'title': '字段英文名',
#'width': 100,
#'align': 'left', # 左对齐
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_pk',
'title': '是否主键',
'width': 80,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'data_dict_no',
'title': '字典编号',
'width': 150,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_dft',
'title': '数据类型',
#'width': 120,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_ft',
'title': '字段类型',
#'width': 120,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_bc',
'title': '业务含义',
#'width': 280,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_al',
'title': '字段别名',
#'width': 120,
'renderOptions': {
'renderType': 'ellipsis'
},
},
# {
# 'dataIndex': 'order_asc',
# 'title': '排序',
# #'width': 120,
# 'renderOptions': {
# 'renderType': 'ellipsis'
# },
# },
{
'dataIndex': 'memo',
'title': '备注',
#'width': 120,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'dict_sg',
'title': '安全分级',
'width': 80,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'status',
'title': '状态',
#'width': 70,
'renderOptions': {
'renderType': 'switch'
},
},
{
'dataIndex': 'update_by',
'title': '负责人',
#'width': 100,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'dataIndex': 'update_time',
'title': '更新时间',
#'width': 100,
'renderOptions': {
'renderType': 'ellipsis'
},
},
{
'title': '操作',
'dataIndex': 'operation',
'renderOptions': {
'renderType': 'dropdown',
'dropdownProps': {
'title': '更多'
}
},
}
],
#scroll = {"x": "max-content"},
rowSelectionType='checkbox',
rowSelectionWidth=50,
bordered=True,
maxWidth=2000,
maxHeight=500,
style={'width': '100%','text-align': 'center','paddingRight': '10px'},
pagination={
'pageSize': page_size,
'current': page_num,
'showSizeChanger': True,
'pageSizeOptions': [15, 30, 50],
'showQuickJumper': True,
'total': total
},
mode='server-side'
),
text='数据加载中'
),
)
]
),
],
span=20
)
],
gutter=5
),
# 新增元数据字段表单modal
fac.AntdModal(
[
fac.AntdForm(
[
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdTreeSelect(
id={
'type': 'dassetdict_add-form-value',
'index': 'dasset_id'
},
placeholder='请选择归属',
treeData=[],
treeNodeFilterProp='title',
style={
'width': '490px'
}
),
label='资产归属',
required= True,
id={
'type': 'dassetdict_add-form-label',
'index': 'dasset_id',
'required': True
},
labelCol={
'offset': 1
}
),
span=24
)
],
gutter=0
),
# fac.AntdRow(
# [
# fac.AntdCol(
# fac.AntdFormItem(
# fac.AntdInput(
# id={
# 'type': 'dassetdict_add-form-value',
# 'index': 'tab_cn_name'
# },
# placeholder='请输入表中文名',
# allowClear=True,
# style={
# 'width': '100%'
# }
# ),
# label='表中文名',
# required=True,
# id={
# 'type': 'dassetdict_add-form-label',
# 'index': 'tab_cn_name',
# 'required': True
# }
# ),
# span=12
# ),
# fac.AntdCol(
# fac.AntdFormItem(
# fac.AntdInput(
# id={
# 'type': 'dassetdict_add-form-value',
# 'index': 'tab_name'
# },
# placeholder='请输入表英文名',
# allowClear=True,
# style={
# 'width': '100%'
# }
# ),
# label='表英文名',
# required=True,
# id={
# 'type': 'dassetdict_add-form-label',
# 'index': 'tab_name',
# 'required': True
# }
# ),
# span=12
# )
# ],
# gutter=5
# ),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_fccn'
},
placeholder='请输入字段中文名',
allowClear=True,
style={
'width': '100%'
}
),
label='字段中文名',
required=True,
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_fccn',
'required': True
}
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_fn'
},
placeholder='请输入字段英文名',
allowClear=True,
style={
'width': '100%'
}
),
label='字段英文名',
required=True,
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_fn',
'required': True
}
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'data_dict_no'
},
placeholder='请输入字典编号',
allowClear=True,
style={
'width': '100%'
}
),
label='字典编号',
required=True,
id={
'type': 'dassetdict_add-form-label',
'index': 'data_dict_no',
'required': True
}
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdSelect(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_pk'
},
placeholder='请选择是否主键',
options=[
{
'label': '',
'value': '0'
},
{
'label': '',
'value': '1'
},
],
style={
'width': '100%'
}
),
label='是否主键',
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_pk',
'required': False
},
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdSelect(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_dft'
},
placeholder='请选择字段数据类型',
options=[
{
'label': '日期类型',
'value': 'date'
},
{
'label': '数值类型',
'value': 'number'
},
{
'label': '枚举类型',
'value': 'enum'
},
{
'label': '文本类型',
'value': 'text'
},
{
'label': '指示器类型',
'value': 'indicator'
},
{
'label': '代码类型',
'value': 'dict'
},
{
'label': '编码类型',
'value': 'encode'
},
{
'label': '时间类型',
'value': 'time'
},
],
style={
'width': '100%'
}
),
label='数据类型',
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_dft',
'required': False
},
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_ft'
},
placeholder='请输入字段类型',
allowClear=True,
style={
'width': '100%'
}
),
label='字段类型',
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_ft',
'required': False
},
# labelCol={
# 'offset': 2
# },
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_al'
},
placeholder='请输入字段别名',
allowClear=True,
style={
'width': '100%'
}
),
label='字段别名',
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_al',
'required': False
},
#labelCol={
# 'offset': 1
#},
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_sg'
},
placeholder='请输入安全分级',
allowClear=True,
style={
'width': '100%'
}
),
label='安全分级',
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_sg',
'required': False
},
#labelCol={
# 'offset': 4
#},
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdSelect(
id={
'type': 'dassetdict_add-form-value',
'index': 'status'
},
placeholder='请选择字段状态',
options=[
{
'label': '正常',
'value': '0'
},
{
'label': '停用',
'value': '1'
},
],
style={
'width': '100%'
}
),
label='字段状态',
id={
'type': 'dassetdict_add-form-label',
'index': 'status',
'required': False
},
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'memo'
},
placeholder='请输入备注',
allowClear=True,
style={
'width': '100%'
}
),
label='备注',
id={
'type': 'dassetdict_add-form-label',
'index': 'memo',
'required': False
},
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
html.Div(
[
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_add-form-value',
'index': 'dict_bc'
},
placeholder='请输入业务含义',
allowClear=True,
mode='text-area',
style={
'width': '495px',
'height': '90px'
}
),
label='业务含义',
id={
'type': 'dassetdict_add-form-label',
'index': 'dict_bc',
'required': False
},
labelCol={
'offset': 1
},
),
],
id='dept-parent_id-div1',
hidden=False
),
span=24
),
]
)
],
labelCol={
'span': 8
},
wrapperCol={
'span': 16
},
style={
'marginRight': '10px'
}
)
],
id='dassetdict-add-modal',
title='新增字段',
mask=False,
width=650,
renderFooter=True,
okClickClose=False
),
# 编辑表单modal
fac.AntdModal(
[
fac.AntdForm(
[
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdTreeSelect(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dasset_id'
},
placeholder='请选择归属资产',
treeData=[],
treeNodeFilterProp='title',
style={
'width': '490px'
}
),
label='归属资产',
id={
'type': 'dassetdict_add-form-label',
'index': 'dasset_id',
'required': False
},
labelCol={
'offset': 1
}
),
span=24
)
],
gutter=5
),
# fac.AntdRow(
# [
# fac.AntdCol(
# fac.AntdFormItem(
# fac.AntdInput(
# id={
# 'type': 'dassetdict_edit-form-value',
# 'index': 'tab_cn_name'
# },
# placeholder='请输入表中文名',
# allowClear=True,
# style={
# 'width': '100%'
# }
# ),
# label='表中文名',
# id={
# 'type': 'dassetdict_edit-form-label',
# 'index': 'tab_cn_name',
# 'required': False
# },
# # labelCol={
# # 'offset': 1
# # },
# ),
# span=12
# ),
# fac.AntdCol(
# fac.AntdFormItem(
# fac.AntdInput(
# id={
# 'type': 'dassetdict_edit-form-value',
# 'index': 'tab_name'
# },
# placeholder='请输入表英文名',
# allowClear=True,
# style={
# 'width': '100%'
# }
# ),
# label='表英文名',
# required=True,
# id={
# 'type': 'dassetdict_edit-form-label',
# 'index': 'tab_name',
# 'required': True
# }
# ),
# span=12
# )
# ],
# gutter=5
# ),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_fccn'
},
placeholder='请输入字段中文名',
allowClear=True,
style={
'width': '100%'
}
),
label='字段中文名',
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_fccn',
'required': False
},
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_fn'
},
placeholder='请输入字段英文名',
allowClear=True,
style={
'width': '100%'
}
),
label='字段英文名',
required=True,
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_fn',
'required': True
}
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'data_dict_no'
},
placeholder='请输入字典编号',
allowClear=True,
style={
'width': '100%'
}
),
label='字典编号',
required=True,
id={
'type': 'dassetdict_edit-form-label',
'index': 'data_dict_no',
'required': True
}
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdSelect(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_pk'
},
placeholder='请选择是否主键',
options=[
{
'label': '',
'value': '0'
},
{
'label': '',
'value': '1'
},
],
style={
'width': '100%'
}
),
label='是否主键',
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_pk',
'required': False
},
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdSelect(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_dft'
},
placeholder='请选择字段数据类型',
options=[
{
'label': '日期类型',
'value': 'date'
},
{
'label': '数值类型',
'value': 'number'
},
{
'label': '枚举类型',
'value': 'enum'
},
{
'label': '文本类型',
'value': 'text'
},
{
'label': '指示器类型',
'value': 'indicator'
},
{
'label': '代码类型',
'value': 'dict'
},
{
'label': '编码类型',
'value': 'encode'
},
{
'label': '时间类型',
'value': 'time'
},
],
style={
'width': '100%'
}
),
label='数据类型',
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_dft',
'required': False
},
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_ft'
},
placeholder='请输入字段类型',
allowClear=True,
style={
'width': '100%'
}
),
label='字段类型',
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_ft',
'required': False
},
# labelCol={
# 'offset': 2
# },
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_al'
},
placeholder='请输入字段别名',
allowClear=True,
style={
'width': '100%'
}
),
label='字段别名',
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_al',
'required': False
},
#labelCol={
# 'offset': 1
#},
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_sg'
},
placeholder='请输入安全分级',
allowClear=True,
style={
'width': '100%'
}
),
label='安全分级',
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_sg',
'required': False
},
#labelCol={
# 'offset': 4
#},
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
fac.AntdFormItem(
fac.AntdSelect(
id={
'type': 'dassetdict_edit-form-value',
'index': 'status'
},
placeholder='请选择字段状态',
options=[
{
'label': '正常',
'value': '0'
},
{
'label': '停用',
'value': '1'
},
],
style={
'width': '100%'
}
),
label='字段状态',
id={
'type': 'dassetdict_edit-form-label',
'index': 'status',
'required': False
},
),
span=12
),
fac.AntdCol(
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'memo'
},
placeholder='请输入备注',
allowClear=True,
style={
'width': '100%'
}
),
label='备注',
id={
'type': 'dassetdict_edit-form-label',
'index': 'memo',
'required': False
},
#labelCol={
# 'offset': 4
#},
),
span=12
)
],
gutter=5
),
fac.AntdRow(
[
fac.AntdCol(
html.Div(
[
fac.AntdFormItem(
fac.AntdInput(
id={
'type': 'dassetdict_edit-form-value',
'index': 'dict_bc'
},
placeholder='请输入业务含义',
allowClear=True,
mode='text-area',
style={
'width': '495px',
'height': '90px'
}
),
label='业务含义',
id={
'type': 'dassetdict_edit-form-label',
'index': 'dict_bc',
'required': False
},
labelCol={
'offset': 1
},
),
],
id='dept-parent_id-div',
hidden=False
),
span=24
),
]
)
],
labelCol={
'span': 8
},
wrapperCol={
'span': 16
},
style={
'marginRight': '10px'
}
)
],
id='dassetdict-edit-modal',
title='编辑字段',
mask=False,
width=650,
renderFooter=True,
okClickClose=False
),
# 元数据字段表导入modal
fac.AntdModal(
[
html.Div(
fac.AntdDraggerUpload(
id='dassetdict-upload-choose',
apiUrl=f'{ApiBaseUrlConfig.BaseUrl}/common/upload',
apiUrlExtraParams={'taskPath': 'dassetdictUpload'},
downloadUrl=f'{ApiBaseUrlConfig.BaseUrl}/common/caches',
downloadUrlExtraParams={'taskPath': 'dassetdictUpload', 'token': session.get('Authorization')},
headers={'Authorization': 'Bearer ' + session.get('Authorization')},
fileTypes=['xls', 'xlsx'],
fileListMaxLength=1,
text='元数据字段导入',
hint='点击或拖拽文件至此处进行上传'
),
style={
'marginTop': '10px'
}
),
html.Div(
[
fac.AntdCheckbox(
id='dassetdict-import-update-check',
checked=False
),
fac.AntdText(
'是否更新已经存在的元数据字段数据',
style={
'marginLeft': '5px'
}
)
],
style={
'textAlign': 'center',
'marginTop': '10px'
}
),
html.Div(
[
fac.AntdText('仅允许导入xls、xlsx格式文件。'),
fac.AntdButton(
'下载模板',
id='download-dassetdict-import-template',
type='link'
)
],
style={
'textAlign': 'center',
'marginTop': '10px'
}
)
],
id='dassetdict-import-confirm-modal',
visible=False,
title='元数据字段导入',
width=600,
renderFooter=True,
centered=True,
okText='导入',
confirmAutoSpin=True,
loadingOkText='导入中',
okClickClose=False
),
fac.AntdModal(
fac.AntdText(
id='batch-result-content',
className={
'whiteSpace': 'break-spaces'
}
),
id='batch-result-modal',
visible=False,
title='元数据字段导入结果',
renderFooter=False,
centered=True
),
# 删除用户二次确认modal
fac.AntdModal(
fac.AntdText('是否确认删除?', id='dassetdict-delete-text'),
id='dassetdict-delete-confirm-modal',
visible=False,
title='提示',
renderFooter=True,
centered=True
)
]