Commit 884921f8 authored by 皮倩雯's avatar 皮倩雯

修改数据字典界面UI

parent a42d0aca
Pipeline #32046 skipped with stages
......@@ -274,7 +274,7 @@ const AppDic = () => {
}).then(
res => {
if (res.code == 0) {
setAddVisible(false);
setEditVisible(false);
getData();
notification.success({
message: '提交成功',
......@@ -317,11 +317,12 @@ const AppDic = () => {
// .catch(err => {
// message.error(err);
// });
console.log(select)
DeleteKeyValue({
key: select.Key,
}).then(
res => {
if (res.code == 0) {
if (res.code === 0) {
getData(select.parentID);
notification.success({
message: '删除成功',
......
......@@ -32,6 +32,7 @@ const WebDic = () => {
const [searchData, setSearchData] = useState([]);// 搜索框表格数据
const [first, setFirst] = useState(true); // 是否第一次加载
const [select, setSelect] = useState({}); // 当前选中条目,可以是一级/二级,修改/删除时设置
const [twoSelectColor, setTwoSelectColor] = useState({});
const [selectColor, setSelectColor] = useState({}); // 当前选中一级条目颜色,修改/删除时设置
const [selectID, setSelectID] = useState('-1'); // 当前选中一级条目的ID,添加二级条目时使用
const [addVisible, setAddVisible] = useState(false);//添加二级条目
......@@ -220,8 +221,13 @@ const WebDic = () => {
}
]
const setRowClassName = record =>
record.nodeID === selectColor.nodeID ? styles.clickRowStyle : '';
const setRowClassName = record => {
return record.nodeID === selectColor.nodeID ? styles.clickRowStyle : '';
}
const setRowClassName1 = record => {
return record.nodeID === twoSelectColor.nodeID ? styles.clickRowStyle : '';
}
// 获取搜索框的值
const handleSearch = e => {
......@@ -601,16 +607,16 @@ const WebDic = () => {
<Table
size="small"
bordered
width="99%"
columns={columns1}
className={styles.tab}
dataSource={subData}
scroll={{ x: 'max-content', y: 'calc(100vh - 340px)' }}
rowClassName={setRowClassName}
rowClassName={setRowClassName1}
onRow={record => ({
onClick: () => {
setSelect(record);
setSelectColor(record);
setTwoSelectColor(record);
setSelectID(record.nodeID);
},
})}
......@@ -728,7 +734,7 @@ const WebDic = () => {
))}
<Form.Item>
<Button type="dashed" onClick={() => add()} block icon={<PlusOutlined />} style={{ width: '353px', marginLeft: '61px' }}>
新增表单
新增条目
</Button>
</Form.Item>
</>
......@@ -820,7 +826,7 @@ const WebDic = () => {
/>
</Modal>
<Modal
title={'查找条目'}
title={'导入数据'}
visible={InPutVisible}
onOk={input1}
onCancel={() => {
......@@ -829,7 +835,7 @@ const WebDic = () => {
okText="确认"
cancelText="取消">
<Upload {...props}>
<UploadOutlined /><span style={{ verticalAlign: 'middle', marginLeft: '6px', marginRight: "40px", cursor: "pointer" }}><a style={{ color: 'rgba(0, 0, 0, 0.85)' }}>导入数据</a></span>
<UploadOutlined /><span style={{ verticalAlign: 'middle', marginLeft: '6px', marginRight: "40px", cursor: "pointer" }}><a style={{ color: 'rgb(24 144 255)' }}>请选择将要导入的数据文件(仅支持Excel文件)</a></span>
</Upload>
</Modal>
</div>
......
......@@ -24,6 +24,7 @@
.ant-table-body{
max-height: calc(100vh - 338px) !important;
min-height:calc(100vh - 338px);
margin-right: -6px;
}
.ant-table-pagination.ant-pagination {
margin: 10px 0 !important;
......@@ -37,5 +38,8 @@
margin-right: -7px;
}
}
.ant-table-wrapper {
max-width: 98%;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment