刘翔宇-旅管家 3 years ago
parent a8be4c2720
commit d553fa8f1b

@ -1,32 +1,21 @@
<template>
<div>
<Drawer width="46" title="图片集合" :closable="false" v-model="drawer">
<Button
@click="
<Button @click="
$refs['addImg'].setForm(
['map_point_id', 'activity_list_id'],
[select.filter[0].value, 7]
),
$refs['addImg'].setType('add'),
$refs['addImg'].show()
"
>新增</Button
>
">新增</Button>
<xy-table
style="margin-top: 20px"
:total="total"
:list="list"
:table-item="talbe"
:is-page="false"
@pageSizeChange="pageSizeChange"
@pageIndexChange="pageChange"
@delete="row => destroy({
<xy-table style="margin-top: 20px" :total="total" :list="list" :table-item="talbe" :is-page="false"
@pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" @delete="row => destroy({
table_name: 'map_point_images',
id: row.id,
activity_list_id: 7
}).then(_ => getList())"
@editor="
}).then(_ => getList())" @editor="
(row) => {
$refs['addImg'].setForm(
['map_point_id', 'activity_list_id'],
@ -36,8 +25,7 @@
$refs['addImg'].setType('editor');
$refs['addImg'].show();
}
"
>
">
</xy-table>
</Drawer>
@ -46,10 +34,13 @@
</template>
<script>
import { index, destroy } from "@/api/index";
import {
index,
destroy
} from "@/api/index";
import addImg from "./addImg.vue";
export default {
import addImg from "./addImg.vue";
export default {
components: {
addImg,
},
@ -61,23 +52,34 @@ export default {
page_size: 999,
activity_list_id: 7,
table_name: "map_point_images",
filter: [
{
with_relations:["image"],
filter: [{
key: "map_point_id",
value: 7,
op: "eq",
},
],
}, ],
},
total: 0,
list: [],
talbe: [
{
talbe: [{
prop: "name",
label: "标题",
minWidth: 220,
align: "left",
},
{
prop: "img",
label: "图片",
minWidth: 130,
align: "center",
customFn: (row) => {
return ( <div><img src={row.image?.url} style = 'width:120px;' /> </div>
)
}
},
{
prop: "created_at",
label: "创建信息",
@ -134,7 +136,7 @@ export default {
}
},
},
};
};
</script>
<style scoped lang="scss"></style>

@ -120,6 +120,17 @@ export default {
minWidth: 220,
align: "left",
},
{
prop: "img",
label: "图片",
minWidth: 200,
align: "center",
customFn: (row) => {
return ( <div><img src={row.image?.url} style = 'width:180px;' /> </div>
)
}
},
{
prop: "lng,lat",
label: "经度,纬度",

Loading…
Cancel
Save