Commit 8418baa3 authored by 皮倩雯's avatar 皮倩雯

数据字典界面修改

parent a5cad1b7
Pipeline #36757 skipped with stages
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: leizhe * @Author: leizhe
* @Date: 2021-05-27 16:31:05 * @Date: 2021-05-27 16:31:05
* @LastEditTime: 2021-10-28 13:57:57 * @LastEditTime: 2021-10-28 14:35:23
* @LastEditors: leizhe * @LastEditors: leizhe
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -45,6 +45,7 @@ const dictionary = () => { ...@@ -45,6 +45,7 @@ const dictionary = () => {
const [select, setSelect] = useState({}); // 当前选中条目,可以是一级/二级,修改/删除时设置 const [select, setSelect] = useState({}); // 当前选中条目,可以是一级/二级,修改/删除时设置
const history = useHistory(); const history = useHistory();
const [editForm] = Form.useForm(); const [editForm] = Form.useForm();
const [title, setTitle] = useState('')
const { Search } = Input; const { Search } = Input;
const columns2 = [ const columns2 = [
...@@ -93,7 +94,7 @@ const dictionary = () => { ...@@ -93,7 +94,7 @@ const dictionary = () => {
<div onClick={e => e.stopPropagation()}> <div onClick={e => e.stopPropagation()}>
<Tooltip title="删除"> <Tooltip title="删除">
<Popconfirm <Popconfirm
title="是否确认删除该数据?" title={title}
okText="确认" okText="确认"
cancelText="取消" cancelText="取消"
onConfirm={submitDelete} onConfirm={submitDelete}
...@@ -102,6 +103,11 @@ const dictionary = () => { ...@@ -102,6 +103,11 @@ const dictionary = () => {
<DeleteOutlined <DeleteOutlined
onClick={() => { onClick={() => {
setSelect(record); setSelect(record);
if (record.parentID === '-1' || record.parentID === null) {
setTitle('确认删除一级目录数据,删除一级目录数据会将其二级目录子数据一起删除');
} else {
setTitle('确认删除二级条目数据');
}
} }
} }
style={{ style={{
......
...@@ -652,8 +652,9 @@ const WebDic = () => { ...@@ -652,8 +652,9 @@ const WebDic = () => {
key='' key=''
columns={columns} columns={columns}
dataSource={data} dataSource={data}
scroll={{ x: 'max-content', y: 'calc(100vh - 370px)' }} scroll={{y: 'calc(100vh - 370px)' }}
bordered bordered
className={styles.pab}
title={() => { title={() => {
return <div > return <div >
<span>一级条目</span> <span>一级条目</span>
...@@ -663,7 +664,7 @@ const WebDic = () => { ...@@ -663,7 +664,7 @@ const WebDic = () => {
style={{ style={{
color: '#1890FF', color: '#1890FF',
fontSize: '25px', fontSize: '25px',
verticalAlign: 'middle', marginTop:'3px',
float: 'right', float: 'right',
}} }}
/> />
...@@ -710,7 +711,7 @@ const WebDic = () => { ...@@ -710,7 +711,7 @@ const WebDic = () => {
style={{ style={{
color: '#1890FF', color: '#1890FF',
fontSize: '25px', fontSize: '25px',
verticalAlign: 'middle', marginTop:'3px',
float: 'right', float: 'right',
}} }}
/> />
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
.ant-table-body{ .ant-table-body{
max-height: calc(100vh - 345px) !important; max-height: calc(100vh - 345px) !important;
min-height:calc(100vh - 345px); min-height:calc(100vh - 345px);
margin-right: -6px; margin-right: -6px;
width:100%;
} }
.ant-table-pagination.ant-pagination { .ant-table-pagination.ant-pagination {
margin: 10px 0 !important; margin: 10px 0 !important;
...@@ -43,6 +44,9 @@ ...@@ -43,6 +44,9 @@
margin-right: -7px; margin-right: -7px;
} }
} }
// .pad{
// overflow-x: hidden;
// }
.ant-table-wrapper { .ant-table-wrapper {
max-width: 98%; max-width: 98%;
margin-left: 2%; margin-left: 2%;
......
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