Commit 6755ceae authored by rencs's avatar rencs

Merge branch 'dev_ren' into 'dev'

Dev ren

See merge request !55
parents d5389122 709a4fab
......@@ -39,3 +39,12 @@ export function getDetail(query) {
method: 'get'
});
}
// /api/website/imageImgStorage/getDetail/{id}
export function imgmoreUpdata(query) {
return fetch({
url: '/api/website/imageImgStorage/updateBatch',
method: 'post',
data: query
});
}
......@@ -60,7 +60,7 @@
align="center"
>
</el-table-column>
<el-table-column prop="imageResolution" label="分辨率" align="center">
<el-table-column prop="imageResolutionStr" label="分辨率" align="center">
</el-table-column>
<el-table-column prop="imageTakeTimeStr" label="拍摄时间" align="center">
</el-table-column>
......@@ -142,7 +142,9 @@ export default {
if (res.status == 200) {
this.total = res.data.totalCount;
this.list = res.data.data;
this.list.map((item) => {
item.imageResolutionStr = item.imageResolution.join("m,") + "m";
item.imageTakeTimeStr = timestamp2DateAuto(
item.imageTakeTime,
"yyyy-MM-dd hh:mm:ss"
......
......@@ -38,6 +38,9 @@
<el-button type="primary" plain @click="clearFilterData"
>清除搜索</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>
</div>
......@@ -46,9 +49,12 @@
v-loading.body="listLoading"
border
fit
@selection-change="handleSelectionChange"
highlight-current-row
style="width: 100%"
>
<el-table-column type="selection" width="40" align="center">
</el-table-column>
<el-table-column
align="center"
label="序号"
......@@ -126,7 +132,12 @@
<script>
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 {
name: "satelliteIntroduction",
......@@ -163,12 +174,17 @@ export default {
},
dialogVisible: false,
dialogTitle: "新增卫星",
multipleSelection: [],
};
},
mounted() {
this.getList();
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(this.multipleSelection);
},
handleSizeChange(val) {
this.listQuery.limit = val;
......@@ -178,6 +194,88 @@ export default {
// this.listQuery = 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() {
this.listQuery = {
......
......@@ -163,13 +163,14 @@
}}</span>
</template>
</el-table-column>
<el-table-column label="父级" align="center">
<!-- <el-table-column label="父级" align="center">
<template slot-scope="scope">
<span class="typelevel">{{
getFatherTypeName(scope.row.pid)
getFatherTypeName(scope.row.pid)
}}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="排序" align="center">
<template slot-scope="scope">
<span>{{ scope.row.sort }}</span>
......@@ -529,9 +530,12 @@ export default {
}
});
}
this.tableData.forEach((obj,index)=> {
obj.index = ((this.typePagination.currentPage-1)*this.typePagination.pageSize)+(++index)
})
this.tableData.forEach((obj, index) => {
obj.index =
(this.typePagination.currentPage - 1) *
this.typePagination.pageSize +
++index;
});
}
},
// 删除类型
......
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