Commit ee819e2f authored by 皮倩雯's avatar 皮倩雯

fix: '表字段字段配置大保存'

parent 0e4f51a3
Pipeline #46690 skipped with stages
......@@ -21,6 +21,8 @@ import LoadGroup from '../components/Field/loadGroupNew';
const AddModal = props => {
const history = useHistory();
const [allData, setAllData] = useState([]);
const [treeData, setTreeData] = useState([]);
const [keepTreeFirst, setKeepTreeFirst] = useState([]);
const [tableList, setTableList] = useState([]);
const [tableData, setTableData] = useState([]);
const [treeLoading, setTreeLoading] = useState(false);
......@@ -265,8 +267,16 @@ const AddModal = props => {
newArr.push({ type: item, key: index, id: index });
});
setAllData(arr);
console.log(arr);
let aa = [];
let bb = [];
Object.keys(arr).forEach((item, index) => {
aa.push({ name: item, key: index, ID: index, children: arr[item] });
bb.push(item);
});
setKeepTreeFirst(bb);
setTreeData(aa);
setTableData(newArr);
console.log(newArr);
setSelect(newArr);
}
});
......@@ -382,7 +392,7 @@ const AddModal = props => {
<Spin tip="loading..." spinning={treeLoading}>
<div className={styles.containerBox}>
<div className={styles.config}>
<div className={styles.title}>{formObj}(字段配置)</div>
<div className={styles.title}>{formObj}</div>
<div className={styles.btn}>
<Button type="primary" icon={<PlusSquareOutlined />} onClick={add}>
附加
......@@ -420,6 +430,8 @@ const AddModal = props => {
itemData={itemData}
formObj1={formObj}
onCancel={() => setIsVisible(false)}
treeData={treeData}
keepTreeFirst={keepTreeFirst}
callBackSubmit={Submit}
/>
{visible && type === 'affiliateAdd' && (
......
.field{
width:100%;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
max-height: 20rem;
.field {
width: 100%;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
max-height: 20rem;
overflow-y: scroll;
.ant-card {
width: 80%;
margin-left: 4rem;
}
.ant-card-head-title {
flex: none;
}
.ant-card-extra {
margin-left: 0.2rem;
}
.ant-card-body {
// padding: 0 ;
height: 15rem;
overflow-y: scroll;
.ant-card{
width: 80%;
margin-left: 4rem;
}
.ant-card-head-title{
flex: none;
}
.ant-card-extra{
margin-left: 0.2rem;
}
.ant-card-body{
// padding: 0 ;
height: 15rem;
overflow-y: scroll;
}
}
.ant-drawer-body {
overflow: hidden;
}
}
.containerBox {
width: 100vm;
height: calc(100vh - 90px) ;
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container{
border: none;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
width: 100vm;
height: calc(100vh - 90px);
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table {
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container {
border: none;
}
.clickRowStyle {
background: #cfe7fd;
}
.ant-table-thead tr th {
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
}
.paneTitle{
font-weight: bold;
font-size: 18px;
margin: 0 0 0.5rem 4rem;
.paneTitle {
font-weight: bold;
font-size: 18px;
margin: 0 0 0.5rem 4rem;
}
.listEvent{
display: flex;
.listEvent {
display: flex;
}
.cardList{
.ant-card-body{
overflow-y:none !important;
}
.cardList {
.ant-card-body {
overflow-y: none !important;
}
}
.unit{
display: flex;
margin-left: 1.1rem;
align-items: center;
.unit {
display: flex;
margin-left: 1.1rem;
align-items: center;
}
.listCard{
display: flex;
.cardItem{
width: 50%;
padding: 0.5rem;
}
.cardContent{
height: 25rem;
overflow-y: scroll;
width: 19.5rem;
}
.cardItemData{
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
}
.listCard {
display: flex;
.cardItem {
width: 50%;
padding: 0.5rem;
}
.cardContent {
height: 25rem;
overflow-y: scroll;
width: 19.5rem;
}
.cardItemData {
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
}
}
.sortable-ghost {
border-bottom: 2px dashed #1890ff;
}
.doctorTable {
margin-bottom: 16px;
table {
width: 100%;
td {
padding: 6px;
border: 1px solid #e8e8e8;
}
thead {
tr {
font-weight: 600;
background: #FAFAFA;
}
border-bottom: 2px dashed #1890ff;
}
.doctorTable {
margin-bottom: 16px;
table {
width: 100%;
td {
padding: 6px;
border: 1px solid #e8e8e8;
}
thead {
tr {
font-weight: 600;
background: #fafafa;
}
tbody{
tr:hover{
background-color:#ededed ;
}
}
tbody {
tr:hover {
background-color: #ededed;
}
}
}
.config{
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn{
display: flex;
justify-content: space-around;
width: 20rem;
}
.ant-btn{
display: flex;
align-items: center;
}
}
.config {
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title {
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn {
display: flex;
justify-content: space-around;
width: 20rem;
}
.ant-btn {
display: flex;
align-items: center;
}
}
......@@ -535,7 +535,7 @@ const TableManager = props => {
expandRowByClick
expandedRowKeys={chooseLine}
dataSource={groupArr}
scroll={{ y: 'calc(100vh - 190px)' }}
scroll={{ y: 'calc(100vh - 170px)' }}
size="small"
pagination={false}
onExpand={onUnfold}
......
......@@ -128,7 +128,7 @@ const AddModal = props => {
},
]}
>
<Input placeholder="请输入名称" />
<Input placeholder="请输入名称" maxlength="20px" />
</Item>
</Col>
{(() => {
......@@ -390,7 +390,7 @@ const AddModal = props => {
},
]}
>
<Input placeholder="账户登录名" />
<Input placeholder="账户登录名" maxlength="100px" />
</Item>
</Col>
<Col span={12}>
......@@ -542,7 +542,7 @@ const AddModal = props => {
name="PlayZeroChannel"
rules={[
{
validator: (rule, value) => {
validator: (__rule, value) => {
if (form.getFieldsValue().PlayZeroChannel == '') {
return Promise.reject('请输入设备端口');
}
......@@ -616,7 +616,7 @@ const AddModal = props => {
name="StreamType"
rules={[
{
validator: (rule, value) => {
validator: (_rule, value) => {
if (form.getFieldsValue().StreamType == '') {
return Promise.reject('请选择码流类型');
}
......
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