Commit d69062ec754b6b15c793a02ecc8fafa07160fcf5

Authored by 曾国涛
2 parents 9c4a4924 8534395e

Merge branch 'warningNew'

# Conflicts:
#	src/pages/Order/Order/index.tsx

Too many changes to show.

To preserve performance only 1 of 48 files are displayed.

src/pages/Client/Client/Components/ClientModal.tsx
@@ -20,7 +20,62 @@ import { @@ -20,7 +20,62 @@ import {
20 import { Button, Col, Form, Row, message } from 'antd'; 20 import { Button, Col, Form, Row, message } from 'antd';
21 import { RcFile } from 'antd/es/upload'; 21 import { RcFile } from 'antd/es/upload';
22 import './style.css'; 22 import './style.css';
  23 +// import { useRef, useState } from 'react';
23 export default ({ data, type, reloadTable }) => { 24 export default ({ data, type, reloadTable }) => {
  25 + // const initialItems = [
  26 + // { label: 'Tab 1', children: 'Content of Tab 1', key: '1' },
  27 + // ];
  28 + // const [activeKey, setActiveKey] = useState(initialItems[0].key);
  29 + // const [items, setItems] = useState(initialItems);
  30 + // const newTabIndex = useRef(1);
  31 +
  32 + // const onChange = (newActiveKey: string) => {
  33 + // setActiveKey(newActiveKey);
  34 + // };
  35 +
  36 + // const add = () => {
  37 + // // 生成新的标签名,格式为 'Tab {num}'
  38 + // const newTabLabel = `Tab ${newTabIndex.current + 1}`;
  39 + // // 增加索引,保证下次生成新的Tab名称时,num会递增
  40 + // newTabIndex.current++;
  41 + // // 创建新的panes,追加新Tab
  42 + // const newActiveKey = `newTab${newTabIndex.current}`;
  43 + // const newPanes = [...items];
  44 + // newPanes.push({ label: newTabLabel, children: 'Content of new Tab', key: newActiveKey });
  45 + // setItems(newPanes);
  46 + // setActiveKey(newActiveKey);
  47 + // };
  48 +
  49 + // const remove = (targetKey: TargetKey) => {
  50 + // let newActiveKey = activeKey;
  51 + // let lastIndex = -1;
  52 + // items.forEach((item, i) => {
  53 + // if (item.key === targetKey) {
  54 + // lastIndex = i - 1;
  55 + // }
  56 + // });
  57 + // const newPanes = items.filter((item) => item.key !== targetKey);
  58 + // if (newPanes.length && newActiveKey === targetKey) {
  59 + // if (lastIndex >= 0) {
  60 + // newActiveKey = newPanes[lastIndex].key;
  61 + // } else {
  62 + // newActiveKey = newPanes[0].key;
  63 + // }
  64 + // }
  65 + // setItems(newPanes);
  66 + // setActiveKey(newActiveKey);
  67 + // };
  68 +
  69 + // const onEdit = (
  70 + // targetKey: React.MouseEvent | React.KeyboardEvent | string,
  71 + // action: 'add' | 'remove',
  72 + // ) => {
  73 + // if (action === 'add') {
  74 + // add();
  75 + // } else {
  76 + // remove(targetKey);
  77 + // }
  78 + // };
24 const [form] = Form.useForm(); 79 const [form] = Form.useForm();
25 const onfinish = async (values) => { 80 const onfinish = async (values) => {
26 const res = await postAdminClientAddOrModifyClientComunicationInfo({ 81 const res = await postAdminClientAddOrModifyClientComunicationInfo({
@@ -263,6 +318,13 @@ export default ({ data, type, reloadTable }) => { @@ -263,6 +318,13 @@ export default ({ data, type, reloadTable }) => {
263 hidden 318 hidden
264 ></ProFormText> 319 ></ProFormText>
265 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText> 320 <ProFormText initialValue={data?.id} name="id" hidden></ProFormText>
  321 + {/* <Tabs
  322 + type="editable-card"
  323 + onChange={onChange}
  324 + activeKey={activeKey}
  325 + onEdit={onEdit}
  326 + items={items}
  327 + /> */}
266 <div className="styled-text"> 328 <div className="styled-text">
267 <div className="vertical-line"></div> 329 <div className="vertical-line"></div>
268 <span className="text">工单指派</span> 330 <span className="text">工单指派</span>