|  | @@ -16,7 +16,6 @@ const img = require('@/assets/air-conditioner.png');
 | 
											
												
													
														|  |  const chartIcon = require('@/assets/deviceManager/chartIcon.png');
 |  |  const chartIcon = require('@/assets/deviceManager/chartIcon.png');
 | 
											
												
													
														|  |  const DeviceManager = () => {
 |  |  const DeviceManager = () => {
 | 
											
												
													
														|  |    const { projectId } = useParams();
 |  |    const { projectId } = useParams();
 | 
											
												
													
														|  | -  const [type, setType] = useState(0); //0 全部  1维修  2保养
 |  | 
 | 
											
												
													
														|  |    const year = dayjs().format('YYYY');
 |  |    const year = dayjs().format('YYYY');
 | 
											
												
													
														|  |    const params = {
 |  |    const params = {
 | 
											
												
													
														|  |      project_id: Number(projectId),
 |  |      project_id: Number(projectId),
 | 
											
										
											
												
													
														|  | @@ -58,9 +57,6 @@ const DeviceManager = () => {
 | 
											
												
													
														|  |    );
 |  |    );
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  |  const Device = ({ projectId }) => {
 |  |  const Device = ({ projectId }) => {
 | 
											
												
													
														|  | -  const style = {
 |  | 
 | 
											
												
													
														|  | -    color: '#4a90e2',
 |  | 
 | 
											
												
													
														|  | -  };
 |  | 
 | 
											
												
													
														|  |    const [type, setType] = useState(0); //0 全部  1维修  2保养
 |  |    const [type, setType] = useState(0); //0 全部  1维修  2保养
 | 
											
												
													
														|  |    const [activeCode, setActiveCode] = useState();
 |  |    const [activeCode, setActiveCode] = useState();
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -153,7 +149,7 @@ const Device = ({ projectId }) => {
 | 
											
												
													
														|  |      const items = data?.map((item, idx) => {
 |  |      const items = data?.map((item, idx) => {
 | 
											
												
													
														|  |        const itemLen = item?.List?.length;
 |  |        const itemLen = item?.List?.length;
 | 
											
												
													
														|  |        return {
 |  |        return {
 | 
											
												
													
														|  | -        key: idx,
 |  | 
 | 
											
												
													
														|  | 
 |  | +        key: `${idx + 1}`,
 | 
											
												
													
														|  |          label: (
 |  |          label: (
 | 
											
												
													
														|  |            <div className={styles.lineContent}>
 |  |            <div className={styles.lineContent}>
 | 
											
												
													
														|  |              <span>{item.Type}</span>
 |  |              <span>{item.Type}</span>
 | 
											
										
											
												
													
														|  | @@ -293,12 +289,7 @@ const Device = ({ projectId }) => {
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
												
													
														|  |        </Space>
 |  |        </Space>
 | 
											
												
													
														|  |        {type == 0 && (
 |  |        {type == 0 && (
 | 
											
												
													
														|  | -        <Collapse
 |  | 
 | 
											
												
													
														|  | -          defaultActiveKey={['1']}
 |  | 
 | 
											
												
													
														|  | -          bordered={false}
 |  | 
 | 
											
												
													
														|  | -          onChange={onChange}
 |  | 
 | 
											
												
													
														|  | -          items={allData?.items}
 |  | 
 | 
											
												
													
														|  | -        />
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <Collapse bordered={false} onChange={onChange} items={allData?.items} />
 | 
											
												
													
														|  |        )}
 |  |        )}
 | 
											
												
													
														|  |        {type == 1 && (
 |  |        {type == 1 && (
 | 
											
												
													
														|  |          <Table
 |  |          <Table
 | 
											
										
											
												
													
														|  | @@ -311,9 +302,9 @@ const Device = ({ projectId }) => {
 | 
											
												
													
														|  |        )}
 |  |        )}
 | 
											
												
													
														|  |        {type == 2 && (
 |  |        {type == 2 && (
 | 
											
												
													
														|  |          <Table
 |  |          <Table
 | 
											
												
													
														|  | -          loading={repairLoading}
 |  | 
 | 
											
												
													
														|  | 
 |  | +          loading={maintaiLoading}
 | 
											
												
													
														|  |            style={{ marginTop: '10px' }}
 |  |            style={{ marginTop: '10px' }}
 | 
											
												
													
														|  | -          dataSource={repairData?.filter((item) => item.DeviceCode)}
 |  | 
 | 
											
												
													
														|  | 
 |  | +          dataSource={maintainData?.filter((item) => item.DeviceCode)}
 | 
											
												
													
														|  |            columns={columns}
 |  |            columns={columns}
 | 
											
												
													
														|  |            pagination={false}
 |  |            pagination={false}
 | 
											
												
													
														|  |          />
 |  |          />
 |