Commit 7e95479d authored by 皮倩雯's avatar 皮倩雯

fix: '打包'

parent d46b0961
Pipeline #81687 failed with stages
......@@ -2,7 +2,7 @@ import React, { useState, useEffect, useCallback, useRef } from 'react';
import { Form, Modal, Space, Divider, Radio, Checkbox } from 'antd';
import {} from '@/services/tablemanager/tablemanager';
import Sortable from 'sortablejs';
import styles from './index.less'
import styles from './index.less';
const CheckboxGroup = Checkbox.Group;
const AddModal = props => {
const {
......@@ -121,13 +121,14 @@ const AddModal = props => {
if (el) {
let sortable = Sortable.create(el, {
animation: 100, // 动画参数
onEnd (evt) { //拖拽完毕之后发生,只需关注该事件
onEnd(evt) {
//拖拽完毕之后发生,只需关注该事件
let arr = [];
let len = evt.from.children.length;
for (let i = 0; i < len; i++) {
arr.push(evt.from.children[i].getAttribute('drag-id'))
arr.push(evt.from.children[i].getAttribute('drag-id'));
}
setSelectData(arr)
setSelectData(arr);
},
});
}
......@@ -187,9 +188,30 @@ const AddModal = props => {
待选字段列表
</Divider>
<div className={styles.cardContent}>
{title.map((item, index) => <div className={styles.cardItemData} key={index}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', color: '#15428b', borderTopColor: '#99bbe8' }}>{item} <Checkbox indeterminate={indeterminate[index]} onChange={onCheckAllChange} index={index} checkvalue={filed[item]} checked={checkAll[index]}> </Checkbox></Divider>
<CheckboxGroup options={filed[item]} value={checkedList[index]} onChange={(e) => onChangeList(e, index,item)} /></div>)}
{title.map((item, index) => (
<div className={styles.cardItemData} key={index}>
<Divider
orientation="left"
style={{ margin: '0 0 10px 0', color: '#15428b', borderTopColor: '#99bbe8' }}
>
{item}{' '}
<Checkbox
indeterminate={indeterminate[index]}
onChange={onCheckAllChange}
index={index}
checkvalue={filed[item]}
checked={checkAll[index]}
>
{' '}
</Checkbox>
</Divider>
<CheckboxGroup
options={filed[item]}
value={checkedList[index]}
onChange={e => onChangeList(e, index, item)}
/>
</div>
))}
</div>
</div>
<div className={styles.cardItem}>
......@@ -209,10 +231,13 @@ const AddModal = props => {
</thead>
<tbody id="doctor-drag-items">
{selectData && selectData.length > 0 ? (
selectData.map((item, index) => <tr drag-id={item} key={index} style={{ cursor: 'move' }}>
<td><span title={item}>{item}</span></td>
</tr>)
})
selectData.map((item, index) => (
<tr drag-id={item} key={index} style={{ cursor: 'move' }}>
<td>
<span title={item}>{item}</span>
</td>
</tr>
))
) : (
<tr>
<td colSpan="10" style={{ textAlign: 'center' }}>
......
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