Commit 1ac2f3f0 by zhaochengxiang

导入资产增加刷新

parent 0bc36754
import React, { useState, useEffect } from 'react';
import React, { useState, useEffect, useContext } from 'react';
import { Button, Upload, Drawer, Table, Pagination, Divider, Form } from 'antd';
import { UploadOutlined, DownloadOutlined } from '@ant-design/icons';
import { dispatch } from '../../../../model';
import { showMessage, formatDate } from '../../../../util';
import { AppContext } from '../../../../App';
const ImportAssetDrawer = (props) => {
const { onCancel, onSuccess, visible, nodeId } = props;
......@@ -16,6 +17,8 @@ const ImportAssetDrawer = (props) => {
const { pageNum, pageSize } = pagination;
const [ total, setTotal ] = useState(0);
const app = useContext(AppContext);
const columns = [
{
title: '序号',
......@@ -137,10 +140,9 @@ const ImportAssetDrawer = (props) => {
dirId: nodeId
},
callback: data => {
console.log('path', data.path);
dispatch({
type: 'assetmanage.assetImport',
payload: { fileList: fileList, params: { parentPath: data?.path||'' } },
payload: { fileList: fileList, params: { parentPath: data?.path||'', env: `${app?.env?.domainId}` } },
callback: data => {
setConfirmLoading(false);
setFileList([]);
......@@ -192,6 +194,7 @@ const ImportAssetDrawer = (props) => {
<Form.Item>
<Button type='primary' onClick={handleOk} loading={confirmLoading}>确定导入</Button>
</Form.Item>
<Button onClick={() => getLogs()} style={{ marginLeft: 'auto' }}>刷新日志</Button>
</Form>
</div>
<Divider orientation="left">导入日志</Divider>
......
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