Commit 618e8a91 authored by TZW's avatar TZW

bug

parent b894cdf5
...@@ -220,11 +220,12 @@ function TreeRender({ ...@@ -220,11 +220,12 @@ function TreeRender({
)} )}
{(!item.children || item.children.length == 0) && item.key != '0' && ( {(!item.children || item.children.length == 0) && item.key != '0' && (
<Popconfirm <Popconfirm
placement="bottom" placement="top"
title="是否删除该节点?" title="是否删除该节点?"
okText="删除" okText="删除"
cancelText="取消" cancelText="取消"
onConfirm={() => { onConfirm={(e) => {
console.log(111);
doFetch({ url: deleteurl, params: { id: item.key } }).then((res) => { doFetch({ url: deleteurl, params: { id: item.key } }).then((res) => {
if (res.code == '0000') { if (res.code == '0000') {
message.success('操作成功'); message.success('操作成功');
...@@ -237,7 +238,14 @@ function TreeRender({ ...@@ -237,7 +238,14 @@ function TreeRender({
<Tooltip title="删除"> <Tooltip title="删除">
<MinusSquareOutlined <MinusSquareOutlined
onClick={(e) => { onClick={(e) => {
// console.log(e);
e.stopPropagation(); e.stopPropagation();
doFetch({ url: deleteurl, params: { id: item.key } }).then((res) => {
if (res.code == '0000') {
message.success('操作成功');
refresh();
}
});
}} }}
style={{ color: 'red' }} style={{ color: 'red' }}
/> />
......
...@@ -145,6 +145,7 @@ function Setting(props) { ...@@ -145,6 +145,7 @@ function Setting(props) {
saveurl="/sparepart/sparePartType/save" saveurl="/sparepart/sparePartType/save"
submitKey="sparePartTypeName" submitKey="sparePartTypeName"
onselected={(vals) => { onselected={(vals) => {
console.log(vals);
setsparePartTypeId(vals[0] ?? ''); setsparePartTypeId(vals[0] ?? '');
}} }}
/> />
......
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