Commit b5426710 by fanyongjun

4.9.5

parent b22c90b1
import React,{useState, useEffect} from "react"
import {Card,Spin,Button,Tooltip,Modal,Tree,Input,Dropdown,Menu} from "antd"
import { PlusOutlined, ImportOutlined,EditOutlined,DeleteOutlined,ExportOutlined } from '@ant-design/icons';
import {Card,Spin,Button,Tooltip,Modal,Tree,Input,Dropdown,Menu,Space} from "antd"
import { PlusOutlined, ImportOutlined,EditOutlined,DeleteOutlined,ExportOutlined,SyncOutlined } from '@ant-design/icons';
import { showMessage, generateList } from '../../../../util';
import { dispatch } from '../../../../model';
import TreeModal from "./TreeModal"
......@@ -280,6 +280,11 @@ const LeftTree = (props)=>{
}
});
const rebuildTree=()=>{
setTreeRebuild({build:new Date().getTime(),type:'build'})
}
const menu = (
<Menu>
<Menu.Item>
......@@ -299,7 +304,7 @@ const LeftTree = (props)=>{
<Card
className={"asset-tree"}
title={<div >
title={<Space>
<Tooltip title="新增目录">
<Button
shape="circle"
......@@ -307,14 +312,21 @@ const LeftTree = (props)=>{
onClick={add}
/>
</Tooltip>
<Tooltip title="修改" className='ml-3'>
<Tooltip title="修改">
<Button
shape="circle"
icon={<EditOutlined />}
onClick={update}
/>
</Tooltip>
<Tooltip title="导入" className='ml-3'>
<Tooltip title="刷新">
<Button
shape="circle"
icon={<SyncOutlined />}
onClick={rebuildTree}
/>
</Tooltip>
<Tooltip title="导入">
<Button
shape="circle"
icon={<ImportOutlined />}
......@@ -322,7 +334,7 @@ const LeftTree = (props)=>{
/>
</Tooltip>
<Dropdown overlay={menu} placement="bottomLeft">
<Tooltip title="导出" className='ml-3'>
<Tooltip title="导出">
<Button
shape="circle"
icon={<ExportOutlined />}
......@@ -332,14 +344,14 @@ const LeftTree = (props)=>{
</Dropdown>
<Tooltip title="删除" className='ml-3'>
<Tooltip title="删除">
<Button
shape="circle"
icon={<DeleteOutlined />}
onClick={deleteNode}
/>
</Tooltip>
</div>}
</Space>}
bordered={false}
style={{ width: '100%' }}
bodyStyle={{padding:10}}
......
......@@ -30,6 +30,9 @@ const ThemeFile = (props)=>{
if (!isLt20M) {
return showMessage("warn","上传文件不能超过 20MB!")
}
if ( file.type !== "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ) {
return showMessage("warn","上传格式错误")
}
return false;
},
......@@ -54,8 +57,9 @@ const ThemeFile = (props)=>{
handleCancle()
},
error: () => {
error: (error) => {
console.log(error)
setUpLoad(false)
}
})
}else{
......
......@@ -145,8 +145,8 @@ const TreeModal = (props)=>{
rules={[{ required: true, message: '必填项' }]}
>
<Radio.Group >
<Radio value={1} >目录</Radio>
<Radio value={2} disabled={selectKey!==undefined?false:true}>主题</Radio>
<Radio value={1} >主题</Radio>
<Radio value={2} disabled={selectKey!==undefined?false:true}>目录</Radio>
</Radio.Group>
</Form.Item>}
<Form.Item
......
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