|
@@ -1,9 +1,10 @@
|
|
<template>
|
|
<template>
|
|
- <div class="default-main ba-table-box">
|
|
+ <div class="default-main ">
|
|
<el-alert class="ba-table-alert" v-if="baTable.table.remark" :title="baTable.table.remark" type="info"
|
|
<el-alert class="ba-table-alert" v-if="baTable.table.remark" :title="baTable.table.remark" type="info"
|
|
show-icon />
|
|
show-icon />
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
|
|
+
|
|
<!-- 表格顶部菜单 -->
|
|
<!-- 表格顶部菜单 -->
|
|
<TableHeader :buttons="['refresh', 'add', 'edit', 'delete', 'comSearch']"
|
|
<TableHeader :buttons="['refresh', 'add', 'edit', 'delete', 'comSearch']"
|
|
quick-search-placeholder="通过标题模糊搜索"
|
|
quick-search-placeholder="通过标题模糊搜索"
|
|
@@ -21,60 +22,29 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-<script setup>
|
|
+<script setup lang="ts">
|
|
import { ref, onMounted, provide } from "vue";
|
|
import { ref, onMounted, provide } from "vue";
|
|
-import { advertisement, document } from "/@/api/controllerUrls";
|
|
+import { community } from "/@/api/controllerUrls";
|
|
import Table from "/@/components/table/index.vue";
|
|
import Table from "/@/components/table/index.vue";
|
|
import TableHeader from "/@/components/table/header/index.vue";
|
|
import TableHeader from "/@/components/table/header/index.vue";
|
|
|
|
+import { defaultOptButtons } from "/@/components/table";
|
|
import PopupForm from "./popupForm.vue";
|
|
import PopupForm from "./popupForm.vue";
|
|
import { baTableApi } from "/@/api/common";
|
|
import { baTableApi } from "/@/api/common";
|
|
import baTableClass from "/@/utils/baTable";
|
|
import baTableClass from "/@/utils/baTable";
|
|
-import { defaultOptButtons } from "/@/components/table";
|
|
|
|
|
|
|
|
|
|
|
|
const baTable = new baTableClass(
|
|
const baTable = new baTableClass(
|
|
- new baTableApi(advertisement),
|
|
+ new baTableApi(community),
|
|
{
|
|
{
|
|
dblClickNotEditColumn: [undefined, "status"],
|
|
dblClickNotEditColumn: [undefined, "status"],
|
|
column: [
|
|
column: [
|
|
{ type: "selection", align: "center", operator: false },
|
|
{ type: "selection", align: "center", operator: false },
|
|
- { label: "标题", prop: "adTitle", align: "left", operator: "LIKE" },
|
|
+ { label: "小区名称", prop: "communityName", align: "left", operator: "LIKE" },
|
|
- {
|
|
+ { label: "所在区(县)", prop: "districtName", align: "center", operator: false },
|
|
- label: "场景",
|
|
+ { label: "现有车位", prop: "carportCount", align: "center",width:"100", operator: false },
|
|
- prop: "sceneType",
|
|
+ { label: "剩余车位", prop: "carportReminderCount", align: "center",width:"100", operator: false },
|
|
- align: "center",
|
|
+ { label: "现有车库", prop: "garageCount", align: "center",width:"100", operator: false },
|
|
- width: "120",
|
|
+ { label: "剩余车库", prop: "garageReminderCount", align: "center",width:"100", operator: false },
|
|
- render: "tag",
|
|
|
|
- operator: "=",
|
|
|
|
- replaceValue: { 0: "开机", 1: "轮播" }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "类型",
|
|
|
|
- prop: "adType",
|
|
|
|
- align: "center",
|
|
|
|
- width: "120",
|
|
|
|
- render: "tag",
|
|
|
|
- operator: "=",
|
|
|
|
- custom: { 0: "", 1: "", 2: "" },
|
|
|
|
- replaceValue: { 0: "展示", 1: "推广", 2: "好物" }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "曝光量",
|
|
|
|
- prop: "viewCount",
|
|
|
|
- align: "center",
|
|
|
|
- width: "120",
|
|
|
|
- operator: false
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "是否上架",
|
|
|
|
- prop: "adStatus",
|
|
|
|
- align: "center",
|
|
|
|
- width: "120",
|
|
|
|
- render: "tag",
|
|
|
|
- operator: "=",
|
|
|
|
- custom: { 0: "success", 1: "info" },
|
|
|
|
- replaceValue: { 0: "上架", 1: "下架" }
|
|
|
|
- },
|
|
|
|
{ label: "创建人", prop: "creatorName", align: "center", width: "120", operator: false },
|
|
{ label: "创建人", prop: "creatorName", align: "center", width: "120", operator: false },
|
|
{ label: "创建时间", prop: "createTime", align: "center", width: "160", operator: false },
|
|
{ label: "创建时间", prop: "createTime", align: "center", width: "160", operator: false },
|
|
{
|
|
{
|
|
@@ -88,9 +58,7 @@ const baTable = new baTableClass(
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- defaultItems: {
|
|
+ defaultItems: {}
|
|
- sceneType: 0
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
// 获得编辑数据后
|
|
// 获得编辑数据后
|
|
@@ -100,16 +68,13 @@ const baTable = new baTableClass(
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
-
|
|
|
|
provide("baTable", baTable);
|
|
provide("baTable", baTable);
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
baTable.mount();
|
|
baTable.mount();
|
|
baTable.getIndex();
|
|
baTable.getIndex();
|
|
});
|
|
});
|
|
-
|
|
|
|
-
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
|
|
|
|
|
-</style>
|
|
+<style scoped lang="scss"></style>
|