Commit 075fee91 by zhaochengxiang

资产导入增加环境

parent 9f5a3742
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect, useContext } from 'react';
import { Button, Upload, Drawer, Table, Pagination, Divider, Form } from 'antd'; import { Button, Upload, Drawer, Table, Pagination, Divider, Form } from 'antd';
import { UploadOutlined, DownloadOutlined } from '@ant-design/icons'; import { UploadOutlined, DownloadOutlined } from '@ant-design/icons';
import { dispatch } from '../../../../model'; import { dispatch } from '../../../../model';
import { showMessage, formatDate } from '../../../../util'; import { showMessage, formatDate } from '../../../../util';
import { AppContext } from '../../../../App';
const ImportAssetDrawer = (props) => { const ImportAssetDrawer = (props) => {
const { onCancel, onSuccess, visible, nodeId } = props; const { onCancel, onSuccess, visible, nodeId } = props;
...@@ -16,6 +17,8 @@ const ImportAssetDrawer = (props) => { ...@@ -16,6 +17,8 @@ const ImportAssetDrawer = (props) => {
const { pageNum, pageSize } = pagination; const { pageNum, pageSize } = pagination;
const [ total, setTotal ] = useState(0); const [ total, setTotal ] = useState(0);
const { env } = useContext(AppContext);
const columns = [ const columns = [
{ {
title: '序号', title: '序号',
...@@ -140,7 +143,7 @@ const ImportAssetDrawer = (props) => { ...@@ -140,7 +143,7 @@ const ImportAssetDrawer = (props) => {
console.log('path', data.path); console.log('path', data.path);
dispatch({ dispatch({
type: 'assetmanage.assetImport', type: 'assetmanage.assetImport',
payload: { fileList: fileList, params: { parentPath: data?.path||'' } }, payload: { fileList: fileList, params: { parentPath: data?.path||'', env: env?.domainId } },
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
setFileList([]); setFileList([]);
......
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