Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
5d8f2420
Commit
5d8f2420
authored
Nov 06, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉不用的代码
parent
9ea2318b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
6 additions
and
378 deletions
+6
-378
table.jsx
src/view/Manage/AssetBrowse/table.jsx
+1
-1
AssetManageTree.jsx
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
+0
-0
AssetManageTree.less
src/view/Manage/AssetManage/Component/AssetManageTree.less
+0
-60
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+0
-0
UpdateDirectoryModal.jsx
...iew/Manage/AssetManage/Component/UpdateDirectoryModal.jsx
+0
-235
table.jsx
src/view/Manage/AssetManage/table.jsx
+1
-1
table.less
src/view/Manage/AssetManage/table.less
+1
-1
AssetMount.jsx
src/view/Manage/AssetRecycle/Component/AssetMount.jsx
+0
-77
table.jsx
src/view/Manage/AssetRecycle/table.jsx
+1
-1
table.jsx
src/view/Manage/AssetResourceBrowse/table.jsx
+1
-1
table.jsx
src/view/Manage/AssetResourceManage/table.jsx
+1
-1
No files found.
src/view/Manage/AssetBrowse/table.jsx
View file @
5d8f2420
...
...
@@ -23,7 +23,7 @@ import TagCell from '../Model/Component/tag-help'
import
{
MetadataColumn
}
from
'../AssetResourceManage/table'
import
AssetDetailDrawer
from
'../AssetManage/Component/AssetDetailDrawer'
import
'../AssetManage/
Component/AssetT
able.less'
import
'../AssetManage/
t
able.less'
const
FC
=
(
props
)
=>
{
const
{
node
,
onFullScreenChange
}
=
props
...
...
src/view/Manage/AssetManage/Component/AssetManageTree.jsx
deleted
100644 → 0
View file @
9ea2318b
This diff is collapsed.
Click to expand it.
src/view/Manage/AssetManage/Component/AssetManageTree.less
deleted
100644 → 0
View file @
9ea2318b
@import '../../../../variables.less';
.asset-manage-tree {
.yy-card-head-title {
padding: 0;
}
.yy-tree{
height: calc(100vh - @header-height - @breadcrumb-height - 25px - 40px - 62px) !important;
overflow: auto !important;
}
// .root {
// display: flex;
// position: relative;
// width: 100%;
// background-color: #e7f2ff;
// margin-bottom: 3px;
// padding: 5px;
// align-items: center;
// .yy-tree-switcher {
// display: block;
// position: absolute;
// opacity: 0 !important;
// left: 0;
// top: 0;
// width: 100%;
// height: 100%;
// }
// .yy-tree-node-content-wrapper {
// margin-left: 20px;
// }
// }
// .yy-tree-indent .yy-tree-indent-unit:first-child {
// opacity: 0 !important;
// }
.site-tree-search-value {
color: #f50;
}
}
.asset-manage-tree-read-only {
.yy-tree {
height: calc(100vh - @header-height - @breadcrumb-height - 25px - 62px) !important;;
overflow: auto !important;
}
}
.asset-manage-tree-asset-mount-reference {
.yy-tree {
height: 400px !important;
overflow: auto !important;
}
}
\ No newline at end of file
src/view/Manage/AssetManage/Component/AssetTable.jsx
deleted
100644 → 0
View file @
9ea2318b
This diff is collapsed.
Click to expand it.
src/view/Manage/AssetManage/Component/UpdateDirectoryModal.jsx
deleted
100644 → 0
View file @
9ea2318b
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Input
,
Space
,
Button
,
Radio
,
Select
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
showMessage
}
from
'../../../../util'
;
const
resourceTypes
=
[
{
key
:
'innerSource'
,
name
:
'内部资源'
},
{
key
:
'outerSource'
,
name
:
'外部资源'
},
{
key
:
'dataAsset'
,
name
:
'资产'
},
{
key
:
'custom'
,
name
:
'自定义'
},
]
const
UpdateDirectoryModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
,
dirId
,
action
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
dir
,
setDir
]
=
useState
(
null
);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
[
isThemeAdd
,
setIsThemeAdd
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
visible
)
{
setDir
(
null
);
form
.
resetFields
();
if
((
dirId
||
''
)
!==
''
)
{
getDirectory
();
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
visible
])
const
getDirectory
=
()
=>
{
setDir
(
null
);
dispatch
({
type
:
'assetmanage.getDirectoryById'
,
payload
:
{
dirId
},
callback
:
data
=>
{
setDir
(
data
);
if
(
action
!==
'add'
)
{
form
.
setFieldsValue
({
code
:
data
?.
code
,
name
:
data
?.
name
||
''
,
desc
:
data
?.
desc
||
''
,
remarks
:
data
?.
remarks
||
''
,
resourceType
:
data
?.
resourceType
});
}
}
})
}
const
onOk
=
async
()
=>
{
try
{
const
row
=
await
form
.
validateFields
();
setConfirmLoading
(
true
);
let
payload
=
{
data
:
{
code
:
row
.
code
,
name
:
row
.
name
,
desc
:
row
.
desc
,
remarks
:
row
.
remarks
,
resourceType
:
row
.
resourceType
}
};
if
(
action
===
'add'
)
{
if
(
row
.
type
===
'directory'
)
{
if
(
dir
===
null
)
{
showMessage
(
'warn'
,
'资产目录节点信息正在加载中...'
);
return
;
}
payload
=
{
...
payload
,
params
:
{
parentPath
:
dir
.
path
||
''
}};
}
else
{
payload
.
data
.
resourceType
=
row
.
resourceType
;
}
}
else
{
if
(
dir
===
null
)
{
showMessage
(
'warn'
,
'资产目录节点信息正在加载中...'
);
return
;
}
payload
.
data
=
{
...
payload
.
data
,
...{
order
:
dir
.
order
,
id
:
dirId
}
};
const
parentPath
=
dir
.
path
.
substring
(
0
,
dir
.
path
.
lastIndexOf
(
"/"
));;
payload
=
{
...
payload
,
params
:
{
parentPath
}};
}
dispatch
({
type
:
'assetmanage.addOrUpdateDirectory'
,
payload
:
payload
,
callback
:
data
=>
{
setConfirmLoading
(
false
);
onCancel
&&
onCancel
(
true
,
data
?.
id
||
''
);
},
error
:
()
=>
{
setConfirmLoading
(
false
);
}
})
}
catch
(
errInfo
)
{
console
.
log
(
'Validate Failed:'
,
errInfo
);
}
}
const
onReset
=
()
=>
{
if
(
action
===
'add'
)
{
setIsThemeAdd
(
false
);
form
.
resetFields
();
}
else
{
if
(
dir
===
null
)
{
showMessage
(
'warn'
,
'资产目录节点信息正在加载中...'
);
return
;
}
form
.
resetFields
();
}
}
const
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
if
(
action
===
'add'
)
{
if
(
changedValues
.
type
===
'theme'
)
{
setIsThemeAdd
(
true
);
}
else
if
(
changedValues
.
type
===
'directory'
)
{
setIsThemeAdd
(
false
);
}
}
}
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
17
},
},
};
return
(
<
Modal
forceRender
title=
{
'资产目录信息'
}
visible=
{
visible
}
width=
{
600
}
onCancel=
{
()
=>
{
onCancel
&&
onCancel
()
}
}
footer=
{
<
Space
>
<
Button
type=
"primary"
onClick=
{
onOk
}
loading=
{
confirmLoading
}
>
提交
</
Button
>
<
Button
onClick=
{
onReset
}
>
重置
</
Button
>
<
Button
onClick=
{
()
=>
onCancel
&&
onCancel
()
}
>
返回
</
Button
>
</
Space
>
}
>
<
Form
{
...
formItemLayout
}
form=
{
form
}
onValuesChange=
{
onValuesChange
}
>
{
action
===
'add'
&&
<
Form
.
Item
label=
"类型"
name=
"type"
rules=
{
[{
required
:
true
,
message
:
'必填项'
}]
}
>
<
Radio
.
Group
>
<
Radio
value=
'theme'
>
栏目
</
Radio
>
<
Radio
value=
'directory'
disabled=
{
dirId
===
null
}
>
目录
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
}
{
((
action
===
'add'
&&
isThemeAdd
)
||
action
!==
'add'
)
&&
<
Form
.
Item
label=
"资产类型"
name=
"resourceType"
rules=
{
[{
required
:
false
}]
}
>
<
Select
allowClear
>
{
resourceTypes
.
map
((
item
,
index
)
=>
{
return
<
Select
.
Option
key=
{
item
.
key
}
>
{
item
.
name
}
</
Select
.
Option
>
})
}
</
Select
>
</
Form
.
Item
>
}
<
Form
.
Item
label=
"编号"
name=
"code"
rules=
{
[{
required
:
true
,
message
:
'必填项'
}]
}
>
<
Input
placeholder=
"请输入编号"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"名称"
name=
"name"
rules=
{
[{
required
:
true
,
message
:
'必填项'
}]
}
>
<
Input
placeholder=
"请输入名称"
/>
</
Form
.
Item
>
{
action
!==
'add'
&&
(
<
Form
.
Item
label=
"路径"
name=
"path"
>
<
span
>
{
dir
?
(
dir
.
path
||
''
):
''
}
</
span
>
</
Form
.
Item
>
)
}
<
Form
.
Item
label=
"描述"
name=
"desc"
>
<
Input
.
TextArea
placeholder=
"请输入描述"
autoSize=
{
{
minRows
:
4
,
maxRows
:
4
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"备注"
name=
"remarks"
>
<
Input
.
TextArea
placeholder=
"请输入备注"
autoSize=
{
{
minRows
:
4
,
maxRows
:
4
}
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
}
export
default
UpdateDirectoryModal
;
\ No newline at end of file
src/view/Manage/AssetManage/table.jsx
View file @
5d8f2420
...
...
@@ -27,7 +27,7 @@ import { AssetDirectorySubject } from './Component/AssetDirectory'
import
{
AssetActionSubject
}
from
'./Component/AssetAction'
import
TagCell
from
'../Model/Component/tag-help'
import
'./
Component/AssetT
able.less'
import
'./
t
able.less'
import
{
MetadataColumn
}
from
'../AssetResourceManage/table'
const
operationMap
=
{
...
...
src/view/Manage/AssetManage/
Component/AssetT
able.less
→
src/view/Manage/AssetManage/
t
able.less
View file @
5d8f2420
@import '../../../
../
variables.less';
@import '../../../variables.less';
.asset-list {
background-color: #fff;
...
...
src/view/Manage/AssetRecycle/Component/AssetMount.jsx
deleted
100644 → 0
View file @
9ea2318b
import
React
,
{
useState
}
from
"react"
;
import
{
Modal
}
from
"antd"
;
import
{
dispatch
}
from
'../../../../model'
;
import
AssetTree
from
'../../AssetManage/Component/AssetManageTree'
;
import
{
showMessage
,
showNotifaction
}
from
'../../../../util'
;
import
{
AssetManageReference
,
AssetRecycleReference
,
AssetMountReference
}
from
"../../../../util/constant"
;
const
AssetMount
=
(
props
)
=>
{
const
{
onCancel
,
visible
,
ids
,
reference
=
AssetManageReference
}
=
props
;
const
[
dirIds
,
setDirIds
]
=
useState
([]);
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
);
const
onCheck
=
(
values
)
=>
{
setDirIds
(
values
||
[]);
}
const
onOk
=
()
=>
{
if
((
dirIds
||
[]).
length
===
0
)
{
showMessage
(
'warn'
,
'请先选择资产目录'
);
return
;
}
setConfirmLoading
(
true
);
dispatch
({
type
:
'assetmanage.loadDataAssets'
,
payload
:
{
params
:
{
dirId
:
dirIds
.
join
(
","
),
},
data
:
ids
},
callback
:
data
=>
{
setConfirmLoading
(
false
);
if
(
data
?.
message
)
{
showNotifaction
(
'提示'
,
data
?.
message
,
5
);
}
reset
();
onCancel
&&
onCancel
(
true
);
},
error
:
()
=>
{
setConfirmLoading
(
false
);
}
})
}
const
reset
=
()
=>
{
setConfirmLoading
(
false
);
}
return
(
<
Modal
title=
{
(
reference
===
AssetRecycleReference
)?
'挂载目录详情'
:
'变更目录详情'
}
visible=
{
visible
}
width=
{
400
}
confirmLoading=
{
confirmLoading
}
onCancel=
{
()
=>
{
reset
();
onCancel
&&
onCancel
()
}
}
onOk=
{
onOk
}
>
<
AssetTree
checkable=
{
true
}
onCheck=
{
onCheck
}
tableId=
{
(
reference
===
AssetManageReference
&&
(
ids
||
[].
length
>
0
))?
ids
[
0
]:
''
}
reference=
{
AssetMountReference
}
/>
</
Modal
>
)
}
export
default
AssetMount
;
\ No newline at end of file
src/view/Manage/AssetRecycle/table.jsx
View file @
5d8f2420
...
...
@@ -20,7 +20,7 @@ import TagCell from '../Model/Component/tag-help'
import
{
MetadataColumn
}
from
'../AssetResourceManage/table'
import
AssetDetailDrawer
from
'../AssetManage/Component/AssetDetailDrawer'
import
'../AssetManage/
Component/AssetT
able.less'
import
'../AssetManage/
t
able.less'
const
FC
=
()
=>
{
const
[
args
,
setArgs
]
=
React
.
useState
(()
=>
({
...
...
src/view/Manage/AssetResourceBrowse/table.jsx
View file @
5d8f2420
...
...
@@ -23,7 +23,7 @@ import TagCell from '../Model/Component/tag-help'
import
{
MetadataColumn
}
from
'../AssetResourceManage/table'
import
AssetDetailDrawer
from
'../AssetManage/Component/AssetDetailDrawer'
import
'../AssetManage/
Component/AssetT
able.less'
import
'../AssetManage/
t
able.less'
const
FC
=
(
props
)
=>
{
const
{
node
,
onFullScreenChange
}
=
props
...
...
src/view/Manage/AssetResourceManage/table.jsx
View file @
5d8f2420
...
...
@@ -31,7 +31,7 @@ import RedistributeTask from './redistribute-task'
import
AutoDistributeTask
from
'./auto-distribute-task'
import
CheckAssets
from
'./check-assets'
import
'../AssetManage/
Component/AssetT
able.less'
import
'../AssetManage/
t
able.less'
const
operationMap
=
{
addAsAsset
:
'新增为资产'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment