Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
鲁尚清
3 years ago
Commit
e754640aa18034006d16b0635cd8a47b5984b4b8
1 parent
f3e77290
【无】对比分析增加批量删除
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
hg-monitor-web-qh/src/main/resources/static/vue3/src/views/analysis/index.html
hg-monitor-web-qh/src/main/resources/static/vue3/src/views/analysis/index.js
hg-monitor-web-qh/src/main/resources/static/vue3/src/views/analysis/index.html
View file @
e754640
...
...
@@ -26,6 +26,9 @@
<i
class=
"el-icon-plus"
></i>
新增
</el-button>
</router-link>
<el-button
:size=
"$global.elementConfig.size.button"
@
click=
"handleDelete()"
style=
"margin-left:6px;"
class=
"search-text button-flex-div-center"
type=
"primary"
>
删除
</el-button>
</div>
</el-col>
...
...
@@ -35,7 +38,7 @@
<el-col
:span=
"24"
>
<el-table
:data=
"tableData"
@
selection-change=
"handleSelectionChange"
border
ref=
"multipleTable"
stripe
style=
"width: 100%"
>
<
!-- <el-table-column align="center" type="selection" width="55" />--
>
<
el-table-column
align=
"center"
type=
"selection"
width=
"55"
/
>
<el-table-column
align=
"center"
label=
"配置项名称"
prop=
"configName"
sortable
/>
<el-table-column
align=
"center"
label=
"配置项描述"
prop=
"configDepict"
sortable
/>
<el-table-column
align=
"center"
label=
"时间范围"
prop=
"timeScopeName"
sortable
></el-table-column>
...
...
hg-monitor-web-qh/src/main/resources/static/vue3/src/views/analysis/index.js
View file @
e754640
...
...
@@ -38,7 +38,6 @@ export default {
}
$
.
get
(
proxy
.
domainName
+
proxy
.
apiUrl
+
'?access_token='
+
localStorage
.
getItem
(
'access_token'
),
params
,
function
(
res
)
{
if
(
res
)
{
console
.
log
(
"res"
,
res
)
proxy
.
totalCount
=
res
.
count
;
proxy
.
tableData
=
res
.
data
;
proxy
.
tableData
.
map
((
item
,
index
)
=>
{
...
...
@@ -67,14 +66,31 @@ export default {
this
.
$refs
.
multipleTable
.
clearSelection
()
}
}
let
multipleSelection
=
Vue
.
ref
([]);
const
handleSelectionChange
=
(
val
)
=>
{
this
.
multipleSelection
=
val
multipleSelection
.
value
=
val
}
//单个删除
const
handleDelete
=
(
item
)
=>
{
//lsq 增加批量删除 2022-08-29
let
idList
=
''
;
if
(
item
){
idList
=
item
.
id
}
else
{
if
(
multipleSelection
.
value
&&
multipleSelection
.
value
.
length
>
0
){
let
idArr
=
[];
multipleSelection
.
value
.
map
(
item
=>
{
idArr
.
push
(
item
.
id
)
})
if
(
idArr
.
length
>
0
){
idList
=
idArr
.
join
(
','
)
}
}
else
{
proxy
.
$global
.
showMsg
(
"请选择数据"
,
"warning"
);
}
}
let
params
=
{
id
:
i
tem
.
id
id
:
i
dList
}
proxy
.
$global
.
confirm
(
"确认删除数据吗?"
,
function
()
{
...
...
@@ -90,7 +106,6 @@ export default {
}
})
// $.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),params,function (res) {
// if(res){
// proxy.$global.confirm("确认删除数据吗?", function () {
...
...
Please
register
or
login
to post a comment