Commit 6043b9e3 by zhaochengxiang

资产打标签

parent e02e68dc
...@@ -366,3 +366,7 @@ svg { ...@@ -366,3 +366,7 @@ svg {
max-height: 70vh; max-height: 70vh;
overflow: auto; overflow: auto;
} }
tbody > tr > td.table-tag-cell {
padding: 12px 8px !important;
}
\ No newline at end of file
...@@ -218,10 +218,18 @@ export const callFetchRaw = (method, url, options) => { ...@@ -218,10 +218,18 @@ export const callFetchRaw = (method, url, options) => {
const templateType = getTemplateType(); const templateType = getTemplateType();
var bodyFormData = new FormData();
Object.keys(params||[]).forEach(key => {
bodyFormData.append(key, params[key]);
});
bodyFormData.append(templateType, templateType);
return axios.request({ return axios.request({
method, method,
url, url,
params: {templateType, ...params}, data: bodyFormData,
...config, ...config,
...reqConfig ...reqConfig
}) })
......
...@@ -182,7 +182,8 @@ const AssetTable = (props) => { ...@@ -182,7 +182,8 @@ const AssetTable = (props) => {
dataIndex: 'tag', dataIndex: 'tag',
width: 360, width: 360,
className: 'table-tag-cell', className: 'table-tag-cell',
render: (_, record) => <TagCell render: (_, record) => <div onClick={(e) => e.stopPropagation()}>
<TagCell
id={record.id} id={record.id}
did={record.dirId} did={record.dirId}
type='dataAsset' type='dataAsset'
...@@ -195,6 +196,7 @@ const AssetTable = (props) => { ...@@ -195,6 +196,7 @@ const AssetTable = (props) => {
}) })
}} }}
/> />
</div>
} }
const actionCol = { const actionCol = {
...@@ -296,6 +298,12 @@ const AssetTable = (props) => { ...@@ -296,6 +298,12 @@ const AssetTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [ keyword, pagination, elementsChanged ]) }, [ keyword, pagination, elementsChanged ])
React.useEffect(() => {
if (assets) {
getResourceTag()
}
}, [assets])
const realAssets = useMemo(() => { const realAssets = useMemo(() => {
const newAssets = [...assets]; const newAssets = [...assets];
// if (users?.length > 0 && assets?.length > 0 && columns?.length > 0) { // if (users?.length > 0 && assets?.length > 0 && columns?.length > 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