Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
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
张伯涛
bigDataSystem
Commits
138ba3bb
Commit
138ba3bb
authored
Dec 09, 2024
by
冷玲鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API数据安全-分类分级-列表bug
parent
33ab308c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
154 deletions
+169
-154
classificationAndGrading.data.ts
...classificationAndGrading/classificationAndGrading.data.ts
+3
-3
index.vue
...ervice/APIDataSecurity/classificationAndGrading/index.vue
+166
-151
No files found.
src/views/dataService/APIDataSecurity/classificationAndGrading/classificationAndGrading.data.ts
View file @
138ba3bb
...
@@ -31,7 +31,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -31,7 +31,7 @@ export const searchFormSchema: FormSchema[] = [
field
:
'APIModel'
,
field
:
'APIModel'
,
label
:
' '
,
label
:
' '
,
component
:
'Select'
,
component
:
'Select'
,
colProps
:
{
span
:
2
},
colProps
:
{
span
:
3
},
componentProps
:
{
componentProps
:
{
placeholder
:
'API模式'
,
placeholder
:
'API模式'
,
options
:
[
options
:
[
...
@@ -45,7 +45,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -45,7 +45,7 @@ export const searchFormSchema: FormSchema[] = [
field
:
'sensitiveState'
,
field
:
'sensitiveState'
,
label
:
' '
,
label
:
' '
,
component
:
'Select'
,
component
:
'Select'
,
colProps
:
{
span
:
2
},
colProps
:
{
span
:
3
},
componentProps
:
{
componentProps
:
{
placeholder
:
'敏感状态'
,
placeholder
:
'敏感状态'
,
options
:
[
options
:
[
...
@@ -58,7 +58,7 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -58,7 +58,7 @@ export const searchFormSchema: FormSchema[] = [
field
:
'level'
,
field
:
'level'
,
label
:
' '
,
label
:
' '
,
component
:
'Select'
,
component
:
'Select'
,
colProps
:
{
span
:
2
},
colProps
:
{
span
:
3
},
componentProps
:
{
componentProps
:
{
placeholder
:
'安全分级'
,
placeholder
:
'安全分级'
,
options
:
[
options
:
[
...
...
src/views/dataService/APIDataSecurity/classificationAndGrading/index.vue
View file @
138ba3bb
<
template
>
<
template
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<template
#
title
>
<div
style=
"display: flex;align-items: center"
>
<Icon
icon=
"ant-design:switcher-outlined"
:size=
"24"
style=
"color:#0960BD;"
/>
<span
style=
"margin-left: 10px"
>
分类分级
</span>
</div>
</
template
>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<
template
#
toolbar
>
<
template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"handleImport"
>
批量导入
</a-button>
<a-button
type=
"primary"
@
click=
"handleImport"
>
批量导入
</a-button>
...
@@ -23,31 +29,32 @@
...
@@ -23,31 +29,32 @@
</
template
>
</
template
>
</template>
</template>
</BasicTable>
</BasicTable>
<ClassificationAndGradingModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
<ClassificationAndGradingModal
@
register=
"registerModal"
@
success=
"handleSuccess"
/>
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
reactive
,
onMounted
}
from
'vue'
;
import
{
ref
,
reactive
,
onMounted
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
Icon
from
"@/components/Icon/Icon.vue"
;
import
{
columns
,
searchFormSchema
}
from
'./classificationAndGrading.data'
;
import
{
columns
,
searchFormSchema
}
from
'./classificationAndGrading.data'
;
import
{
tableList
}
from
'./mock'
;
import
{
tableList
}
from
'./mock'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
router
}
from
'@/router'
;
import
{
router
}
from
'@/router'
;
import
ClassificationAndGradingModal
from
'@/views/dataService/APIDataSecurity/classificationAndGrading/ClassificationAndGradingModal.vue'
;
import
ClassificationAndGradingModal
import
{
metadataData
}
from
'@/views/metadata/metadataData'
;
from
'@/views/dataService/APIDataSecurity/classificationAndGrading/ClassificationAndGradingModal.vue'
;
import
{
metadataData
}
from
'@/views/metadata/metadataData'
;
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
route
=
useRoute
();
const
route
=
useRoute
();
let
tableData
=
ref
(
tableList
);
let
tableData
=
ref
(
tableList
);
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
[
registerImport
,
{
openModal
:
openImportModal
}]
=
useModal
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
searchInfo
=
reactive
<
Recordable
>
({});
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
}]
=
useTable
({
title
:
'分类分级结果'
,
title
:
'分类分级结果'
,
api
:
async
(
params
)
=>
{
api
:
async
(
params
)
=>
{
// console.log(params);
// console.log(params);
...
@@ -61,12 +68,15 @@
...
@@ -61,12 +68,15 @@
data
:
tableData
.
value
,
data
:
tableData
.
value
,
};
};
return
{
...
response
};
return
{...
response
};
},
},
rowKey
:
'id'
,
rowKey
:
'id'
,
columns
,
columns
,
formConfig
:
{
formConfig
:
{
// labelWidth: 10,
// labelWidth: 10,
actionColOptions
:
{
span
:
3
,
},
schemas
:
searchFormSchema
,
schemas
:
searchFormSchema
,
autoSubmitOnEnter
:
true
,
autoSubmitOnEnter
:
true
,
},
},
...
@@ -95,32 +105,34 @@
...
@@ -95,32 +105,34 @@
dataIndex
:
'action'
,
dataIndex
:
'action'
,
// slots: { customRender: 'action' },
// slots: { customRender: 'action' },
},
},
});
});
/** 新增按钮*/
function
handleCreate
()
{
/** 新增按钮*/
function
handleCreate
()
{
openModal
(
true
,
{
openModal
(
true
,
{
isUpdate
:
false
,
isUpdate
:
false
,
});
});
}
}
/** 编辑按钮*/
function
handleEdit
(
record
:
Recordable
,
isUpdate
)
{
/** 编辑按钮*/
function
handleEdit
(
record
:
Recordable
,
isUpdate
)
{
console
.
log
(
isUpdate
);
console
.
log
(
isUpdate
);
openModal
(
true
,
{
openModal
(
true
,
{
record
,
record
,
isUpdate
:
isUpdate
,
isUpdate
:
isUpdate
,
});
});
}
}
/** 重置密码弹窗确定按钮*/
/** 重置密码弹窗确定按钮*/
/** 删除按钮*/
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
function
handleDelete
(
record
:
Recordable
)
{
console
.
log
(
record
);
console
.
log
(
record
);
createMessage
.
success
(
'删除成功!'
);
createMessage
.
success
(
'删除成功!'
);
reload
();
reload
();
}
}
/** 新增/编辑成功*/
/** 新增/编辑成功*/
function
handleSuccess
({
isUpdate
,
values
})
{
function
handleSuccess
({
isUpdate
,
values
})
{
if
(
isUpdate
)
{
if
(
isUpdate
)
{
// 演示不刷新表格直接更新内部数据。
// 演示不刷新表格直接更新内部数据。
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
...
@@ -130,12 +142,12 @@
...
@@ -130,12 +142,12 @@
}
else
{
}
else
{
reload
();
reload
();
}
}
}
}
let
source
=
0
;
// 源目标数据序号
let
source
=
0
;
// 源目标数据序号
let
target
=
0
;
// 目标数据序号
let
target
=
0
;
// 目标数据序号
// Table拖拽
// Table拖拽
function
customRow
(
record
,
index
)
{
function
customRow
(
record
,
index
)
{
console
.
log
(
record
,
index
);
// 这里输出是表格全部的数据
console
.
log
(
record
,
index
);
// 这里输出是表格全部的数据
return
{
return
{
props
:
{
props
:
{
...
@@ -185,6 +197,9 @@
...
@@ -185,6 +197,9 @@
console
.
log
(
record
,
index
,
'target'
,
source
,
target
);
console
.
log
(
record
,
index
,
'target'
,
source
,
target
);
},
},
};
};
}
}
onMounted
(()
=>
{});
onMounted
(()
=>
{
});
</
script
>
</
script
>
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