浏览代码

🎨 更改广告计划结构

晓晓晓晓丶vv 4 年之前
父节点
当前提交
7878a7235c
共有 2 个文件被更改,包括 66 次插入3 次删除
  1. 27 0
      src/views/_pageOptions/table-put.ts
  2. 39 3
      src/views/put/put-ad-plan.vue

+ 27 - 0
src/views/_pageOptions/table-put.ts

@@ -135,3 +135,30 @@ export const TableColumnOfPutData = [
     slots: { customRender: "operator" },
   },
 ];
+
+export const TableColumnOfPutAdPlan = [
+  {
+    fixed: "left",
+    title: "",
+    dataIndex: "check",
+    width: 120,
+  },
+  {
+    fixed: "left",
+    title: "账户ID",
+    dataIndex: "account_id",
+    width: 120,
+  },
+  {
+    fixed: "left",
+    title: "邮箱",
+    dataIndex: "email",
+    width: 150,
+  },
+  {
+    fixed: "left",
+    title: "用户名",
+    dataIndex: "user_name",
+    width: 150,
+  },
+];

+ 39 - 3
src/views/put/put-ad-plan.vue

@@ -6,9 +6,17 @@
         <p class="label">日期</p>
         <a-range-picker size="large" />
       </template>
+      <div class="tool-bar-item">
+        <p class="label">计划状态</p>
+        <a-select class="full-width"
+                  size="large">
+          <a-select-option value="status1">状态一</a-select-option>
+        </a-select>
+      </div>
     </tool-bar>
     <a-table :columns="columns"
-             :data-source="list"></a-table>
+             :data-source="list"
+             :scroll="{ x: 2500 }"></a-table>
   </div>
 </template>
 
@@ -17,7 +25,7 @@ import { defineComponent, reactive, toRefs } from "vue";
 
 import ToolBar from "@/components/tool-bar/index.vue";
 
-import { TableColumnOfAccount } from "@/views/_pageOptions/table-account";
+import { TableColumnOfPutAdPlan } from "../_pageOptions/table-put";
 
 const Account = defineComponent({
   components: {
@@ -27,9 +35,37 @@ const Account = defineComponent({
     const data = reactive({
       platform: "platform1",
       list: [],
-      columns: TableColumnOfAccount,
+      columns: TableColumnOfPutAdPlan,
+      customColumns: [
+        {
+          title: "计划名称",
+          dataIndex: "plan_name",
+        },
+        {
+          title: "计划状态",
+          dataIndex: "plan_status",
+        },
+        {
+          title: "计划预算(元)",
+          dataIndex: "plan_money",
+        },
+        {
+          title: "出价",
+          dataIndex: "price",
+        },
+        {
+          title: "计划ID",
+          dataIndex: "plan_id",
+        },
+      ],
     });
 
+    // TODO 动态column需要根据具体接口来决定如何写逻辑
+
+    data.columns.push(...(data.customColumns as any[]));
+
+    console.log(data.columns);
+
     return { ...toRefs(data) };
   },
 });