Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform-ui
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
2
Merge Requests
2
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
周健威
rs-cloud-platform-ui
Commits
943895ad
Commit
943895ad
authored
Jan 13, 2021
by
rencs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.13 批量操作
parent
0556b38a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
1 deletion
+108
-1
index.js
src/api/website/imageLibrary/index.js
+9
-0
list.vue
src/views/webSiteManagement/imageLibrary/list.vue
+99
-1
No files found.
src/api/website/imageLibrary/index.js
View file @
943895ad
...
@@ -39,3 +39,12 @@ export function getDetail(query) {
...
@@ -39,3 +39,12 @@ export function getDetail(query) {
method
:
'get'
method
:
'get'
});
});
}
}
// /api/website/imageImgStorage/getDetail/{id}
export
function
imgmoreUpdata
(
query
)
{
return
fetch
({
url
:
'/api/website/imageImgStorage/updateBatch'
,
method
:
'post'
,
data
:
query
});
}
src/views/webSiteManagement/imageLibrary/list.vue
View file @
943895ad
...
@@ -38,6 +38,9 @@
...
@@ -38,6 +38,9 @@
<el-button
type=
"primary"
plain
@
click=
"clearFilterData"
<el-button
type=
"primary"
plain
@
click=
"clearFilterData"
>
清除搜索
</el-button
>
清除搜索
</el-button
>
>
<el-button
type=
"text"
@
click=
"moreUp"
>
批量上架
</el-button>
<el-button
type=
"text"
@
click=
"moreDown"
>
批量下架
</el-button>
<el-button
type=
"text"
@
click=
"moreDel"
>
批量删除
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -46,9 +49,12 @@
...
@@ -46,9 +49,12 @@
v-loading
.
body=
"listLoading"
v-loading
.
body=
"listLoading"
border
border
fit
fit
@
selection-change=
"handleSelectionChange"
highlight-current-row
highlight-current-row
style=
"width: 100%"
style=
"width: 100%"
>
>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
>
</el-table-column>
<el-table-column
<el-table-column
align=
"center"
align=
"center"
label=
"序号"
label=
"序号"
...
@@ -126,7 +132,12 @@
...
@@ -126,7 +132,12 @@
<
script
>
<
script
>
import
{
satelliteIntroduction
}
from
"@/utils/formDatas.js"
;
import
{
satelliteIntroduction
}
from
"@/utils/formDatas.js"
;
import
{
page
,
update
,
updateStatus
}
from
"@/api/website/imageLibrary"
;
import
{
page
,
update
,
updateStatus
,
imgmoreUpdata
,
}
from
"@/api/website/imageLibrary"
;
export
default
{
export
default
{
name
:
"satelliteIntroduction"
,
name
:
"satelliteIntroduction"
,
...
@@ -163,12 +174,17 @@ export default {
...
@@ -163,12 +174,17 @@ export default {
},
},
dialogVisible
:
false
,
dialogVisible
:
false
,
dialogTitle
:
"新增卫星"
,
dialogTitle
:
"新增卫星"
,
multipleSelection
:
[],
};
};
},
},
mounted
()
{
mounted
()
{
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
console
.
log
(
this
.
multipleSelection
);
},
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
listQuery
.
limit
=
val
;
...
@@ -178,6 +194,88 @@ export default {
...
@@ -178,6 +194,88 @@ export default {
// this.listQuery = page;
// this.listQuery = page;
this
.
$emit
(
"recordPageInfo"
,
page
);
this
.
$emit
(
"recordPageInfo"
,
page
);
},
},
//批量上架
moreUp
()
{
if
(
this
.
multipleSelection
.
length
<
1
)
{
this
.
$message
.
warning
(
"请选择至少一条数据"
);
return
;
}
this
.
$confirm
(
"批量上架操作, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
//1
let
list
=
[];
this
.
multipleSelection
.
forEach
((
item
)
=>
{
list
.
push
(
item
.
id
);
});
imgmoreUpdata
({
ids
:
list
.
join
(
","
),
status
:
1
}).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
})
.
catch
(()
=>
{});
},
moreDown
()
{
if
(
this
.
multipleSelection
.
length
<
1
)
{
this
.
$message
.
warning
(
"请选择至少一条数据"
);
return
;
}
this
.
$confirm
(
"批量下架操作, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
//2
let
list
=
[];
this
.
multipleSelection
.
forEach
((
item
)
=>
{
list
.
push
(
item
.
id
);
});
imgmoreUpdata
({
ids
:
list
.
join
(
","
),
status
:
2
}).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
})
.
catch
(()
=>
{});
},
moreDel
()
{
if
(
this
.
multipleSelection
.
length
<
1
)
{
this
.
$message
.
warning
(
"请选择至少一条数据"
);
return
;
}
this
.
$confirm
(
"批量删除操作, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
//3
let
list
=
[];
this
.
multipleSelection
.
forEach
((
item
)
=>
{
list
.
push
(
item
.
id
);
});
imgmoreUpdata
({
ids
:
list
.
join
(
","
),
isDel
:
1
}).
then
((
res
)
=>
{
if
(
res
.
status
==
200
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
getList
();
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
});
})
.
catch
(()
=>
{});
},
//搜索按钮
//搜索按钮
search
()
{
search
()
{
this
.
listQuery
=
{
this
.
listQuery
=
{
...
...
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