|
@@ -8,6 +8,7 @@ import service from './service';
|
|
|
import UpdateForm from "@/pages/Memory/components/UpdateForm";
|
|
|
import {getTextFromHtml, minuteToDay} from "@/utils/utils";
|
|
|
import {ExclamationCircleOutlined} from "@ant-design/icons/lib";
|
|
|
+import Quill from "@/pages/Memory/components/Quill";
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -33,7 +34,19 @@ const handleRemove = async (fields: TableListItem) => {
|
|
|
const TableList: React.FC<{}> = () => {
|
|
|
const [sorter, setSorter] = useState<string>('');
|
|
|
const [modelVisible, setModalVisible] = useState<boolean>(false);
|
|
|
- const [formValues, setFormValues] = useState({});
|
|
|
+ const [formValues, setFormValues] = useState<TableListItem>({
|
|
|
+ back: "",
|
|
|
+ front: "",
|
|
|
+ id: 0,
|
|
|
+ period: 0,
|
|
|
+ remindTime: new Date(),
|
|
|
+ tag: "",
|
|
|
+ updateTime: "",
|
|
|
+ userId: 0
|
|
|
+ });
|
|
|
+
|
|
|
+ const [showVisible, setShowVisible] = useState(false); // 是否查看
|
|
|
+
|
|
|
const actionRef = useRef<ActionType>();
|
|
|
|
|
|
const { confirm } = Modal;
|
|
@@ -119,7 +132,8 @@ const TableList: React.FC<{}> = () => {
|
|
|
render: (_, record, index, action) => (
|
|
|
<>
|
|
|
<a
|
|
|
- onClick={() => {
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
changeForm(record);
|
|
|
}}
|
|
|
>
|
|
@@ -184,7 +198,8 @@ const TableList: React.FC<{}> = () => {
|
|
|
onRow={record => {
|
|
|
return {
|
|
|
onClick: event => {
|
|
|
- changeForm(record);
|
|
|
+ setFormValues(record);
|
|
|
+ setShowVisible(true);
|
|
|
}, // 点击行
|
|
|
onDoubleClick: event => {},
|
|
|
onContextMenu: event => {},
|
|
@@ -205,6 +220,24 @@ const TableList: React.FC<{}> = () => {
|
|
|
values={formValues}>
|
|
|
</UpdateForm>
|
|
|
) : null}
|
|
|
+ {showVisible?(
|
|
|
+ <Modal
|
|
|
+ destroyOnClose
|
|
|
+ width={640}
|
|
|
+ bodyStyle={{padding: '15px 15px 15px'}}
|
|
|
+ title="配置模型"
|
|
|
+ visible={showVisible}
|
|
|
+ onCancel={() => setShowVisible(false)}
|
|
|
+ footer={null}
|
|
|
+ >
|
|
|
+ 正面:
|
|
|
+ <p />
|
|
|
+ <Quill theme="bubble" readonly onChange={() => {}} value={formValues.front} />
|
|
|
+ 反面:
|
|
|
+ <p />
|
|
|
+ <Quill theme="bubble" readonly onChange={() => {}} value={formValues.back} />
|
|
|
+ </Modal>
|
|
|
+ ):null}
|
|
|
|
|
|
</PageHeaderWrapper>
|
|
|
);
|