Commit 376541ec authored by rencs's avatar rencs

Merge branch 'dev_ren' into 'master'

1.5 上下架操作接口更改

See merge request !24
parents 7cb05221 8094adc6
import fetch from 'utils/fetch'; import fetch from 'utils/fetch';
//获取影像图库列表 // 获取影像图库列表
export function page(query) { export function page(query) {
return fetch({ return fetch({
url: '/api/website/imageImgStorage/getList', url: '/api/website/imageImgStorage/getList',
...@@ -7,7 +7,7 @@ export function page(query) { ...@@ -7,7 +7,7 @@ export function page(query) {
params: query params: query
}); });
} }
//新增或修改影像图库 // 新增或修改影像图库
export function update(query) { export function update(query) {
return fetch({ return fetch({
url: '/api/website/imageImgStorage/addUpdate', url: '/api/website/imageImgStorage/addUpdate',
...@@ -15,7 +15,16 @@ export function update(query) { ...@@ -15,7 +15,16 @@ export function update(query) {
data: query data: query
}); });
} }
//获取所有相似图像
// 影像图库上下架
export function updateStatus(query) {
return fetch({
url: '/api/website/imageImgStorage/updateStatus',
method: 'post',
data: query
});
}
// 获取所有相似图像
export function getAll(query) { export function getAll(query) {
return fetch({ return fetch({
url: '/api/website/imageInfoRelation/getAll', url: '/api/website/imageInfoRelation/getAll',
...@@ -23,11 +32,10 @@ export function getAll(query) { ...@@ -23,11 +32,10 @@ export function getAll(query) {
params: query params: query
}); });
} }
///api/website/imageImgStorage/getDetail/{id} // /api/website/imageImgStorage/getDetail/{id}
export function getDetail(query) { export function getDetail(query) {
return fetch({ return fetch({
url: `/api/website/imageImgStorage/getDetail/${query}`, url: `/api/website/imageImgStorage/getDetail/${query}`,
method: 'get' method: 'get'
}); });
} }
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<script> <script>
import { satelliteIntroduction } from "@/utils/formDatas.js"; import { satelliteIntroduction } from "@/utils/formDatas.js";
import { page, update } from "@/api/website/imageLibrary"; import { page, update, updateStatus } from "@/api/website/imageLibrary";
export default { export default {
name: "satelliteIntroduction", name: "satelliteIntroduction",
...@@ -243,6 +243,19 @@ export default { ...@@ -243,6 +243,19 @@ export default {
} }
}); });
}, },
//上下架
updateStatus() {
updateStatus({ id: this.editForm.id, status: this.editForm.status }).then(
(res) => {
if (res.status == 200) {
this.dialogVisible = false;
this.getList();
} else {
this.$message.error(res.message);
}
}
);
},
//取消表单 //取消表单
resetForm() { resetForm() {
this.$refs.ruleForm.resetFields(); this.$refs.ruleForm.resetFields();
...@@ -268,6 +281,8 @@ export default { ...@@ -268,6 +281,8 @@ export default {
this.editForm[key] = row[key] == 0 ? 1 : 0; this.editForm[key] = row[key] == 0 ? 1 : 0;
} else { } else {
this.editForm[key] = row[key] == 1 ? 2 : 1; this.editForm[key] = row[key] == 1 ? 2 : 1;
this.updateStatus();
return;
} }
//更新专题 //更新专题
......
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