XiaBx 3 лет назад
Родитель
Сommit
f690bf3c44

+ 39 - 4
src/api/index.ts

@@ -403,6 +403,7 @@ export const getCoustomClomuns = (): any => {
 export const setChannelRate = (data: {
   rate: string | number;
   channel_id: string;
+  report_platform?:string
 }) => {
   return axios.post("/setChannelConfig", data);
 };
@@ -483,9 +484,10 @@ export const getAuthorUser = (): AxiosPromise<IUserAdmin> => {
 
 // 获取公众号回传配置
 export const getOfficialBackConfig = (
-  channel_id: number
+  channel_id: number,
+  report_platform?: string,
 ): AxiosPromise<AccountPlanConfig> => {
-  return axios("/channel/reportConfig", { params: { channel_id } });
+  return axios("/channel/reportConfig", { params: { channel_id,report_platform } });
 };
 
 // 保存公众号回传配置
@@ -496,11 +498,13 @@ export const setOfficialBackConfig = (data: any) => {
 // 切换公众号回传方式
 export const onUpdateOfficialReportType = (
   channel_id: number,
-  report_module: string
+  report_module: string,
+  report_platform?: string
 ) => {
   return axios.post("/channel/switchReportModule", {
     channel_id,
     report_module,
+    report_platform
   });
 };
 
@@ -842,7 +846,7 @@ export const deleteImage = (
 /**
  * 上传视频
  * @data
- */
+ */  
 export const uploadVideo = (data: {
   video: any,
   is_public: number | string,
@@ -1072,4 +1076,35 @@ export const createCustomCreative = (
   }
 ): any => {
   return axios.post("/ad/customCreative/create", data);
+};
+
+/**
+ * 
+ * @param
+ */
+ export const  getVideoLog = (
+  query: {
+    page?: string | number,
+  }
+): any => {
+  return axios.get("/material/uploadStatus", { params: query });
+};
+
+
+
+/**
+ * 回传日志
+ * @param campaign_id
+ * @param budget_mode
+ * @returns
+ */
+ export const backLogList = (
+  query: Partial<{
+    channel_id: string;
+    platform: string;
+    page: number;
+    report_platform: string;
+  }>
+): any => {
+  return axios("/getReportLogs", { params: query });
 };

+ 2 - 2
src/hooks/composable/useAuthUser.ts

@@ -5,7 +5,7 @@ import { getAuthorUser } from "@/api";
 
 const useAuthUser = () => {
   const state = reactive({
-    is_admin: 0,
+    showDropDownBox: false,
     available_uids: ref<IUserItem[]>([])
   });
 
@@ -13,7 +13,7 @@ const useAuthUser = () => {
     try {
       const { data } = await getAuthorUser();
       state.available_uids = data.available_uids;
-      state.is_admin = data.is_admin;
+      state.showDropDownBox = data.showDropDownBox;
       console.log(state);
     } catch (error) {
       console.log("error happened in get auth user:", error.message);

+ 1 - 9
src/main.ts

@@ -10,21 +10,13 @@ import store from "./store";
 import install from "@/plugins/install";
 import createGlobalData from "./plugins/createGlobal";
 
-import ElementPlus from 'element-plus';
-import 'element-plus/lib/theme-chalk/index.css';
-import 'dayjs/locale/zh-cn'
-import locale from 'element-plus/lib/locale/lang/zh-cn'
-import { ElIcon } from 'element-plus'
+
 
 const app = createApp(App);
 
 // 初始化三方库和插件
 install(app);
 createGlobalData(app);
-
-
-app.use(ElementPlus, { locale })
-app.use(ElIcon)
 app.use(store).use(router);
 
 router.isReady().then((_) => app.mount("#app"));

+ 37 - 12
src/router/async.ts

@@ -3,13 +3,46 @@ import { RouteConfig } from "#/route";
 export const AccountManager: RouteConfig = {
   name: "AccountManager",
   path: "/account",
-  icon: "ProjectOutlined",
   meta: {
     title: "公众号管理"
   },
   component: () => import("@/views/account/account.vue")
 };
 
+export const QuickApp: RouteConfig = {
+  name: "QuickApp",
+  path: "/quickapp",
+  meta: {
+    title: "阅文快应用"
+  },
+  component: () => import("@/views/read/quick-app.vue")
+};
+
+export const KuaiShou: RouteConfig = {
+  name: "KuaiShou",
+  path: "/kuaishou",
+  meta: {
+    title: "快手回传"
+  },
+  component: () => import("@/views/account/kuaishou.vue")
+};
+
+export const BackManager: RouteConfig = {
+  name: "BackManager",
+  path: "/backmanage",
+  icon: "ProjectOutlined",
+  meta: {
+    title: "回传管理"
+  },
+  component: () => import("@/views/account/index.vue"),
+  children: [
+    AccountManager,
+    QuickApp,
+    KuaiShou
+  ]
+};
+
+
 const PutBook: RouteConfig = {
   name: "PutBook",
   path: "book",
@@ -230,15 +263,7 @@ export const Financial: RouteConfig = {
   component: () => import("@/views/financial/index.vue")
 };
 
-export const QuickApp: RouteConfig = {
-  name: "QuickApp",
-  path: "/quickapp",
-  icon: "ReadOutlined",
-  meta: {
-    title: "阅文快应用"
-  },
-  component: () => import("@/views/read/quick-app.vue")
-};
+
 
 export const PerformanceDetial: RouteConfig = {
   name: "PerformanceDetial",
@@ -321,8 +346,8 @@ export const ForgetPwd: RouteConfig = {
 };
 
 
-const asyncRoutes: RouteConfig[] = [AccountManager, DataAnalysis, PutManager,
-  PlanCreate, Financial, QuickApp, PerformanceDetial, ForgetPwd, MaterialCenter];
+const asyncRoutes: RouteConfig[] = [BackManager, DataAnalysis, PutManager,
+  PlanCreate, Financial, PerformanceDetial, ForgetPwd, MaterialCenter];
 // const asyncRoutes: RouteConfig[] = [AccountManager, DataAnalysis, PutManager,
 //   Financial, QuickApp, PerformanceDetial, ForgetPwd, MaterialCenter];
 

+ 58 - 12
src/views/_pageOptions/table-account.ts

@@ -10,30 +10,30 @@ export const TableColumnOfAccount = [
   {
     title: "公众号名称",
     dataIndex: "account_name",
-    ellipsis: true
+    ellipsis: true,
   },
   {
     title: "公众号appid",
     dataIndex: "app_id",
-    ellipsis: true
+    ellipsis: true,
   },
   {
     title: "平台",
     dataIndex: "platform",
-    ellipsis: true
+    ellipsis: true,
   },
   {
     title: "站点",
     dataIndex: "channel_id",
-    ellipsis: true
+    ellipsis: true,
   },
   {
     title: "回传方式",
     width: 140,
     dataIndex: "module",
     slots: {
-      customRender: "module"
-    }
+      customRender: "module",
+    },
   },
   // {
   //   title: "开始/结束时间",
@@ -49,8 +49,8 @@ export const TableColumnOfAccount = [
     dataIndex: "rate",
     width: 140,
     slots: {
-      customRender: "rate"
-    }
+      customRender: "rate",
+    },
   },
   // {
   //   title: "回传状态",
@@ -63,9 +63,55 @@ export const TableColumnOfAccount = [
   {
     title: "操作",
     dataIndex: "action",
-    width: 150,
+    width: 250,
     slots: {
-      customRender: "action"
-    }
-  }
+      customRender: "action",
+    },
+  },
+];
+
+export const TableColumnOfLog = [
+  {
+    title: "订单名称",
+    dataIndex: "order_no",
+    ellipsis: true,
+  },
+  {
+    title: "uid",
+    dataIndex: "uid",
+    ellipsis: true,
+  },
+  {
+    title: "计划平台",
+    dataIndex: "report_platform",
+    ellipsis: true,
+  },
+  {
+    title: "注册时间",
+    dataIndex: "register_time",
+    ellipsis: true,
+  },
+  {
+    title: "支付时间",
+    width: 140,
+    dataIndex: "pay_time",
+  },
+  {
+    title: "充值金额",
+    width: 140,
+    dataIndex: "pay_amount",
+  },
+  {
+    title: "回传状态",
+    width: 140,
+    dataIndex: "report_status",
+  },
+  {
+    title: "操作",
+    dataIndex: "action",
+    width: 250,
+    slots: {
+      customRender: "action",
+    },
+  },
 ];

+ 30 - 0
src/views/_pageOptions/table_material.ts

@@ -87,4 +87,34 @@ export const TableColumnOfImage = [
     dataIndex: 'operation',
     slots: { customRender: 'operation' },
   },
+]
+
+
+// 素材库-日志状态
+export const TableColumnOfLog = [
+  {
+    title: '昵称',
+    dataIndex: 'nickname',
+  },
+  {
+    title: '广告名',
+    dataIndex: 'advertiser_name',
+  },
+  {
+    title: '名称',
+    dataIndex: 'name',
+  },
+  {
+    title: '上传状态',
+    dataIndex: 'upload_status',
+  },
+  {
+    title: '错误信息',
+    dataIndex: 'fail_msg',
+  },
+  {
+    title: '最后更新',
+    dataIndex: 'updated_at',
+  },
+
 ]

+ 21 - 0
src/views/account/index.vue

@@ -0,0 +1,21 @@
+<template>
+  <router-view></router-view>
+</template>
+
+<script lang="ts">
+import { defineComponent } from "vue";
+
+import useStore from "@/hooks/useStore";
+
+import { getOfficialSimpleAccount } from "@/api";
+import { ActionType } from "@/store/modules/app/_type";
+
+const DataIndex = defineComponent({
+  setup() {
+    const store = useStore();
+    store.dispatch(ActionType.doSaveOfficial);
+  },
+});
+
+export default DataIndex;
+</script>

+ 463 - 0
src/views/account/kuaishou.vue

@@ -0,0 +1,463 @@
+<template>
+  <div class="page-wrap page-wrap-account">
+    <tool-bar
+      :text="['name']"
+      :label="['公众号名称']"
+      v-model:loading="searching"
+      @confirm="onSearch"
+      @cancel="onCancel"
+    >
+      <!-- <div class="tool-bar-item">
+        <p class="label">小说平台</p>
+        <a-select class="full-width" v-model:value="query.platform">
+          <a-select-option
+            v-for="platform in platforms"
+            :key="platform.value"
+            :value="platform.value"
+            >{{ platform.label }}</a-select-option
+          >
+        </a-select>
+      </div> -->
+      <!-- <div class="tool-bar-item">
+        <p class="label">回传状态</p>
+        <a-select class="full-width" v-model:value="query.report_status">
+          <a-select-option :key="-1" :value="-1">全部</a-select-option>
+          <a-select-option :key="1" :value="1">开启</a-select-option>
+          <a-select-option :key="0" :value="0">关闭</a-select-option>
+        </a-select>
+      </div> -->
+      <div class="tool-bar-item">
+        <p class="label">回传方式</p>
+        <a-select class="full-width" v-model:value="query.report_module">
+          <a-select-option key="all" :value="''">全部</a-select-option>
+          <a-select-option key="channel" value="channel"
+            >按站点回传</a-select-option
+          >
+          <a-select-option key="ad" value="ad">按计划回传</a-select-option>
+        </a-select>
+      </div>
+    </tool-bar>
+    <a-table
+      rowKey="id"
+      :loading="loading"
+      :pagination="tablePageOptions"
+      :columns="columns"
+      :scroll="{ y: 600 }"
+      bordered
+      :data-source="list"
+      @change="onLoadOfficials"
+    >
+      <!-- <template #rate="{ text, record }">
+        <editable-cell
+          :text="`${text}`"
+          title="回传比例"
+          :maxValue="100"
+          :minValue="1"
+          @change="(val) => onCellChange(record, 'rate', val)"
+        />
+      </template> -->
+      <template #module="{ record }">
+        <p>{{ moduleType[record.report_module] }}</p>
+      </template>
+      <template #status="{ text }">
+        <p>{{ text == 0 ? "关闭" : "开启" }}</p>
+      </template>
+      <template #time="{ record }">
+        <p>起:{{ record.start_time }}</p>
+        <p>止:{{ record.end_time }}</p>
+      </template>
+      <template #action="{ record }">
+        <a-button type="primary" @click="initBackData(record)">
+          回传配置
+        </a-button>
+        <a-button style="margin-left: 5px" @click="getLogs(record)">
+          操作日志
+        </a-button>
+      </template>
+      <!-- <template #operte="{ text, record }">
+        <p
+          v-clipboard:copy="record.fans_add_monitor_link"
+          v-clipboard:success="copySuccess"
+        >
+          <a>复制监测链接</a>
+        </p>
+      </template> -->
+    </a-table>
+    <!-- 站点回传配置drawer -->
+    <a-drawer
+      v-model:visible="visible"
+      title="回传配置"
+      width="40%"
+      class="drawer-back-config"
+    >
+      <div class="wrap-box">
+        <p class="title">回传方式</p>
+        <a-radio-group
+          v-model:value="report_module"
+          @change="showConfig = report_module == 'ad' ? false : true"
+        >
+          <a-radio value="ad">计划</a-radio>
+          <a-radio value="channel">站点</a-radio>
+        </a-radio-group>
+        <a href="javascript:;" @click="onReportModuleChange">保存</a>
+      </div>
+      <div class="wrap-box" v-show="!showConfig">
+        <p class="title">按计划回传配置</p>
+        <a-form :label-col="{ span: 6 }" :wrapper-col="{ offset: 1, span: 11 }">
+          <a-form-item label="回传比例">
+            <a-input-number v-model:value="ad_config.rate" />
+          </a-form-item>
+          <a-form-item :wrapper-col="{ offset: 7 }">
+            <a-button type="primary" @click="onRateChange"> 保存 </a-button>
+          </a-form-item>
+        </a-form>
+      </div>
+      <div class="wrap-box" v-show="showConfig">
+        <p class="title">按站点回传配置</p>
+        <a-tabs size="small" @change="onTabChange">
+          <a-tab-pane
+            v-for="(d, i) in popForm"
+            :key="i"
+            :tab="d.desc"
+          ></a-tab-pane>
+        </a-tabs>
+        <a-form :label-col="{ span: 6 }" :wrapper-col="{ offset: 1, span: 11 }">
+          <a-form-item label="回传条件">
+            <a-select
+              style="width: 150px"
+              size="small"
+              v-model:value="popForm[currentTab].condition"
+            >
+              <a-select-option
+                :value="item.name"
+                v-for="item in popForm[currentTab].report_conditions"
+                :key="item.name"
+              >
+                {{ item.desc }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+          <a-form-item label="回传开关">
+            <a-switch
+              v-model:checked="popForm[currentTab].back_on"
+              checked-children="开"
+              un-checked-children="关"
+            />
+          </a-form-item>
+          <a-form-item label="回传比例">
+            <a-input
+              v-model:value="popForm[currentTab].rate"
+              size="small"
+              style="width: 150px"
+              type="number"
+              placeholder="回传比例"
+            >
+              <template #suffix>
+                <a-tooltip title="比例0-100">
+                  <info-circle-outlined style="color: rgba(0, 0, 0, 0.45)" />
+                </a-tooltip>
+              </template>
+            </a-input>
+          </a-form-item>
+          <a-form-item label="回传平台">
+            <a-input
+              v-model:value="popForm[currentTab].back_platform"
+              disabled
+              size="small"
+              style="width: 150px"
+            />
+          </a-form-item>
+          <a-form-item
+            label="回传付费最低金额"
+            v-if="popForm[currentTab].report_type === 'recharge'"
+          >
+            <a-input
+              v-model:value="popForm[currentTab].price"
+              size="small"
+              style="width: 150px"
+              type="number"
+              placeholder="回传付费最低金额"
+            />
+          </a-form-item>
+          <a-form-item label="浮动回传比例">
+            <a-input
+              v-model:value="popForm[currentTab].float_rate"
+              size="small"
+              style="width: 150px"
+              type="number"
+              placeholder="浮动回传比例"
+            >
+              <template #suffix>
+                <a-tooltip title="浮动比例小于固定回传比例">
+                  <info-circle-outlined style="color: rgba(0, 0, 0, 0.45)" />
+                </a-tooltip>
+              </template>
+            </a-input>
+          </a-form-item>
+          <a-form-item :wrapper-col="{ offset: 7 }">
+            <a-button
+              :disabled="!hasPopFormData"
+              :loading="saving"
+              type="primary"
+              @click="onSaveConfig"
+            >
+              保存
+            </a-button>
+          </a-form-item>
+        </a-form>
+      </div>
+    </a-drawer>
+    <!--回传日志-->
+    <a-drawer title="日志详情"
+      placement="right"
+      :closable="true"
+      width="80%"
+      v-model:visible="visibleLog">
+      <log-list :visible="visibleLog" :channel_id="curChannel_id">
+
+      </log-list>
+    </a-drawer>
+  </div>
+</template>
+
+<script lang="ts">
+import {
+  computed,
+  defineComponent,
+  inject,
+  onMounted,
+  reactive,
+  ref,
+  toRefs,
+} from "vue";
+import EditableCell from "@/components/edit-cell/index.vue";
+import ToolBar from "@/components/tool-bar/index.vue";
+import useApp from "@/hooks/useApp";
+import usePagination from "@/hooks/usePagination";
+import logList from "./log.vue";
+import { TableColumnOfAccount } from "@/views/_pageOptions/table-account";
+import {
+  getOfficialAccounts,
+  setChannelRate,
+  getOfficialBackConfig,
+} from "@/api";
+import { IOfficials, PlanBack } from "#/api";
+import { message } from "ant-design-vue";
+import { InfoCircleOutlined } from "@ant-design/icons-vue";
+import {
+  setOfficialBackConfig,
+  onUpdateOfficialReportType,
+} from "../../api/index";
+
+const Account = defineComponent({
+  components: {
+    ToolBar,
+    EditableCell,
+    InfoCircleOutlined,
+    logList
+  },
+  setup() {
+    let { loading, meta, tablePageOptions } = usePagination();
+    const { store } = useApp();
+    const state = reactive({
+      platforms: computed(() => store.getters.platforms),
+      list: ref<IOfficials[]>([]),
+      columns: TableColumnOfAccount,
+      searching: false,
+      moduleType: ref<any>({
+        channel: "按站点回传",
+        ad: "按计划回传",
+      }),
+      query: {
+        official_name: "",
+        platform: "",
+        page: 1,
+        // report_status: -1,
+        report_module: "",
+      },
+      hasPopFormData: false,
+      popForm: ref<any[]>([
+        {
+          id: 0,
+          back_on: false,
+          rate: 0,
+          condition: "",
+          price: 0,
+          float_rate: 0,
+          desc: "",
+        },
+      ]),
+      ad_config: {
+        channel_id: "",
+        id: 0,
+        rate: 0,
+      },
+      report_module: "ad",
+      report_channel_id: 0,
+      showConfig: false,
+      visible: false,
+      saving: false,
+      visibleLog:false,
+      curChannel_id:0,
+      currentTab: 0,
+    });
+
+    const onSearch = (fields: Record<string, string>) => {
+      const { name } = fields;
+      state.query.official_name = name;
+      onLoadOfficials();
+    };
+    const onCancel = () => {
+      // state.query.report_status = -1;
+      state.query.report_module = "";
+      onSearch({ name: "" });
+    };
+
+    const onLoadOfficials = (query?: { current: number }) => {
+      let params = JSON.parse(JSON.stringify(state.query));
+      if (query) params.page = query.current;
+      loading.value = true;
+      // if (state.query.report_status === -1) delete params.report_status;
+      if (state.query.report_module === "") delete params.report_module;
+      getOfficialAccounts(params).then(({ data }) => {
+        state.list = data.list;
+        meta.value = data.meta;
+        loading.value = false;
+        state.searching = false;
+      });
+    };
+
+    onMounted(onLoadOfficials);
+
+    const initBackData = async (item: IOfficials) => {
+      try {
+        const { data } = await getOfficialBackConfig(item.channel_id,'kuaishou');
+        state.ad_config.channel_id = data.ad_config.channel_id;
+        state.ad_config.id = data.ad_config.id;
+        state.ad_config.rate = data.ad_config.rate;
+        state.report_module = data.report_module;
+        state.showConfig = data.report_module == "ad" ? false : true;
+        state.report_channel_id = +data.channel_id;
+        let list = data.channel_configs.map((r: PlanBack) => {
+          r.price = r.extra?.price;
+          r.float_rate = r.extra?.float_rate;
+          r.back_on = !!Number(r.back_on);
+          return r;
+        });
+        list.length > 0
+          ? (state.hasPopFormData = true)
+          : (state.hasPopFormData = false);
+        state.popForm = list;
+        state.visible = true;
+      } catch (error) {
+        console.log("error happened in get back plan data:", error.message);
+      }
+    };
+
+    const onTabChange = (key: number) => {
+      state.currentTab = key;
+    };
+
+    const onRateChange = () => {
+      const { rate, channel_id } = state.ad_config;
+      setChannelRate({ rate, channel_id,report_platform:'kuaishou' }).then((res) => {
+        onLoadOfficials();
+        message.success("修改回传比例成功!");
+        state.visible = false;
+      });
+    };
+    const onReportModuleChange = () => {
+      // state.showConfig = state.report_module == "ad" ? false : true;
+      onUpdateOfficialReportType(
+        state.report_channel_id,
+        state.report_module,
+        "kuaishou"
+      ).then((_) => {
+        onLoadOfficials();
+        message.success("修改回传方式成功!");
+      });
+    };
+
+    const onSaveConfig = () => {
+      let { id, back_on, rate, condition, price, float_rate } =
+        state.popForm[state.currentTab];
+      if (float_rate && float_rate >= rate) {
+        message.error("浮动比例必须小于固定回传比例");
+        return;
+      }
+
+      state.saving = true;
+
+      let data = {
+        id,
+        back_on: Number(back_on),
+        rate,
+        condition,
+        price,
+        float_rate,
+        report_platform:'kuaishou'
+      };
+
+      setOfficialBackConfig(data)
+        .then((_) => {
+          onLoadOfficials();
+          message.success("保存成功");
+          state.visible = false;
+        })
+        .catch((e) => {
+          message.error(e.message || e.msg || "系统错误");
+        })
+        .finally(() => {
+          state.saving = false;
+        });
+    };
+
+    return {
+      ...toRefs(state),
+      loading,
+      tablePageOptions,
+      onSearch,
+      onCancel,
+      onLoadOfficials,
+      initBackData,
+      onTabChange,
+      onRateChange,
+      onSaveConfig,
+      onReportModuleChange,
+    };
+  },
+  methods: {
+    copySuccess() {
+      this.$message.success("复制成功");
+    },
+    onCellChange(record: any, dataIndex: string, value: string) {
+      setChannelRate({ rate: value, channel_id: record.channel_id }).then(
+        (res) => {
+          this.$message.success("修改回传比例成功!");
+        }
+      );
+    },
+    getLogs(record:any){
+        this.curChannel_id = record.channel_id;
+        this.visibleLog = true;
+    },
+  },
+});
+
+export default Account;
+</script>
+
+<style lang="scss">
+.drawer-back-config {
+  .wrap-box {
+    margin-bottom: 15px;
+
+    .title {
+      font-size: 16px;
+      color: #333;
+      font-weight: bold;
+      margin-bottom: 5px;
+    }
+  }
+}
+</style>

+ 80 - 0
src/views/account/log.vue

@@ -0,0 +1,80 @@
+<template>
+  <div>
+    <a-table
+      bordered
+      :data-source="list"
+      :columns="columns"
+      @change="getList"
+      rowKey="id"
+      :loading="loading"
+      :pagination="tablePageOptions"
+    >
+     <template #report_recharge_num="{ text, record }">
+        <p v-if="record.report_recharge_num >= 1">
+          已上报
+        </p>
+        <a-popconfirm
+          title="是否要继续强制回传?"
+          ok-text="是"
+          cancel-text="否"
+          @confirm="confirmEdit"
+        >
+          <p
+            @click="mustUp(record, 'recharge', 'report_recharge_num')"
+            v-if="record.report_recharge_num <= 0"
+          >
+            <a>强制回传</a>
+          </p>
+        </a-popconfirm>
+      </template>
+    </a-table>
+  </div>
+</template>
+
+<script lang="ts">
+import usePagination from "@/hooks/usePagination";
+import PreviewBox from "./preview.vue";
+import { defineComponent, reactive, toRefs, ref, watch } from "vue";
+import { TableColumnOfLog } from "@/views/_pageOptions/table-account";
+
+import { backLogList } from "@/api";
+import { message } from "ant-design-vue";
+const CommonTable = defineComponent({
+  props: ["visible","channel_id"],
+  setup(props) {
+    let { meta, tablePageOptions } = usePagination();
+    const state = reactive({
+      loading: false,
+      list: ref<any[]>([]),
+      columns: TableColumnOfLog,
+      pushVisible: false,
+    });
+    const getList = async (page?: any) => {
+      state.loading = true;
+      let { data } = await backLogList({
+        page: page ? page.current : 1,
+        report_platform:'kuaishou',
+        platform:'zhuishuyun',
+        channel_id:props.channel_id
+      });
+      state.loading = false;
+      state.list = data.list;
+      meta.value = data.meta;
+    };
+
+    watch(
+      () => [props.visible,props.channel_id],
+      ([newVal], [oldVal]) => {
+        if (newVal) {
+          getList();
+        }
+      }
+    );
+    return { ...toRefs(state), tablePageOptions, getList };
+  },
+  mounted() {},
+});
+
+export default CommonTable;
+</script>
+<style lang="scss" scoped></style>

+ 59 - 0
src/views/material/component/logList.vue

@@ -0,0 +1,59 @@
+<template>
+  <div>
+    <a-table
+      bordered
+      :data-source="list"
+      :columns="columns"
+      @change="getList"
+      rowKey="id"
+      :loading="loading"
+      :pagination="tablePageOptions"
+    >
+    </a-table>
+  </div>
+</template>
+
+<script lang="ts">
+import usePagination from "@/hooks/usePagination";
+import PreviewBox from "./preview.vue";
+import { defineComponent, reactive, toRefs, ref, watch } from "vue";
+import { TableColumnOfLog } from "../../_pageOptions/table_material";
+
+import { getVideoLog } from "@/api";
+import { message } from "ant-design-vue";
+const CommonTable = defineComponent({
+  props: ["visible"],
+  setup(props) {
+    let { meta, tablePageOptions } = usePagination();
+    const state = reactive({
+      loading: false,
+      list: ref<any[]>([]),
+      columns: TableColumnOfLog,
+      pushVisible: false,
+    });
+    const getList = async (page?: any) => {
+      state.loading = true;
+      let { data } = await getVideoLog({
+        page: page ? page.current : 1,
+      });
+      state.loading = false;
+      state.list = data.list;
+      meta.value = data.meta;
+    };
+
+    watch(
+      () => props.visible,
+      (newVal, oldVal) => {
+        if (newVal) {
+          getList();
+        }
+      }
+    );
+    return { ...toRefs(state), tablePageOptions, getList };
+  },
+  mounted() {},
+});
+
+export default CommonTable;
+</script>
+<style lang="scss" scoped></style>

+ 25 - 2
src/views/material/video.vue

@@ -2,7 +2,8 @@
   <div class="video">
     <div class="title-box-common">
       <h3>视频库</h3>
-      <a-button
+      <div>
+         <a-button
         type="primary"
         @click="
           uploadVisible = true;
@@ -11,6 +12,14 @@
         "
         >上传</a-button
       >
+       <a-button
+        type="primary"
+        @click="getLogs"
+        style="margin-left:10px"
+        >日志</a-button
+      >
+      </div>
+     
     </div>
     <div class="padding-box-common">
       <search :materialType="'video'" @search="onSearch"></search>
@@ -38,6 +47,15 @@
         @getList="$refs.commonTable.getList()"
       ></upload-video>
     </a-modal>
+    <a-drawer title="日志详情"
+      placement="right"
+      :closable="true"
+      width="80%"
+      v-model:visible="visible">
+      <log-list :visible="visible">
+
+      </log-list>
+    </a-drawer>
   </div>
 </template>
 
@@ -46,6 +64,7 @@ import Search from "./component/search.vue";
 import CommonTable from "./component/common-table.vue";
 import UploadVideo from "./component/upload-video.vue";
 import usePagination from "@/hooks/usePagination";
+import logList from "./component/logList.vue";
 import { defineComponent, reactive, toRefs, ref } from "vue";
 import { onBeforeRouteUpdate } from "vue-router";
 // import { TableColumnOfYuewen } from "../_pageOptions/table_yuewen";
@@ -53,7 +72,7 @@ import { onBeforeRouteUpdate } from "vue-router";
 import {} from "@/api";
 import { message } from "ant-design-vue";
 const VideoLibrary = defineComponent({
-  components: { Search, CommonTable, UploadVideo },
+  components: { Search, CommonTable, UploadVideo,logList },
   setup() {
     let { tablePageOptions } = usePagination();
     const formRef = ref();
@@ -61,6 +80,7 @@ const VideoLibrary = defineComponent({
       searchForm: {},
       uploadVisible: false,
       confirmLoading: false, // 上传视频按钮loading
+      visible:false,
     });
     return { ...toRefs(state), formRef, tablePageOptions };
   },
@@ -76,6 +96,9 @@ const VideoLibrary = defineComponent({
       upload.onUploadVideo();
       // this.confirmLoading = true;
     },
+    getLogs(){
+      this.visible = true;
+    }
   },
 });
 

+ 3 - 3
src/views/put/ad-countdata.vue

@@ -16,7 +16,7 @@
           @change="changeTime"
         />
       </template>
-      <template v-if="!!is_admin">
+      <template v-if="!!showDropDownBox">
         <div class="tool-bar-item">
           <p class="label">推广员</p>
           <a-select
@@ -126,7 +126,7 @@ const Adgroup = defineComponent({
   },
   setup() {
     let { loading, meta, tablePageOptions } = usePagination();
-    const { is_admin, available_uids } = useAuthUser();
+    const { showDropDownBox, available_uids } = useAuthUser();
 
     const { router, store } = useApp();
 
@@ -274,7 +274,7 @@ const Adgroup = defineComponent({
     onMounted(getData);
     return {
       ...toRefs(state),
-      is_admin,
+      showDropDownBox,
       available_uids,
       loading,
       tablePageOptions,

+ 3 - 3
src/views/put/ad-group.vue

@@ -25,7 +25,7 @@
           @change="changeTime"
         />
       </template>
-      <template v-if="!!is_admin">
+      <template v-if="!!showDropDownBox">
         <div class="tool-bar-item">
           <p class="label">推广员</p>
           <a-select
@@ -145,7 +145,7 @@ const Adgroup = defineComponent({
   setup() {
     const toolbarref: any = ref(null);
     let { loading, meta, tablePageOptions } = usePagination();
-    const { is_admin, available_uids } = useAuthUser();
+    const { showDropDownBox, available_uids } = useAuthUser();
 
     const { router, route, store } = useApp();
 
@@ -370,7 +370,7 @@ const Adgroup = defineComponent({
 
     return {
       ...toRefs(state),
-      is_admin,
+      showDropDownBox,
       available_uids,
       loading,
       tablePageOptions,

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

@@ -34,7 +34,7 @@
         </a-select>
       </div>
 
-      <template v-if="!!is_admin">
+      <template v-if="!!showDropDownBox">
         <div class="tool-bar-item">
           <p class="label">推广员</p>
           <a-select
@@ -391,7 +391,7 @@ const PutAdPlan = defineComponent({
 
   setup() {
     let { loading, meta, tablePageOptions } = usePagination();
-    const { is_admin, available_uids } = useAuthUser();
+    const { showDropDownBox, available_uids } = useAuthUser();
     const { router, route, store } = useApp();
 
     let list: any[] = [],
@@ -745,7 +745,7 @@ const PutAdPlan = defineComponent({
 
     return {
       ...toRefs(state),
-      is_admin,
+      showDropDownBox,
       available_uids,
       handleTableChange,
       onSearch,

+ 3 - 3
src/views/put/put-data.vue

@@ -16,7 +16,7 @@
           @change="changeTime"
         />
       </template>
-      <template v-if="!!is_admin">
+      <template v-if="!!showDropDownBox">
         <div class="tool-bar-item">
           <p class="label">推广员</p>
           <a-select
@@ -106,7 +106,7 @@ const PutData = defineComponent({
   },
   setup() {
     const { router, route, store } = useApp();
-    const { is_admin, available_uids } = useAuthUser();
+    const { showDropDownBox, available_uids } = useAuthUser();
     let { loading, meta, tablePageOptions } = usePagination();
     let listed: any = [];
     const state = reactive({
@@ -239,7 +239,7 @@ const PutData = defineComponent({
     });
     return {
       ...toRefs(state),
-      is_admin,
+      showDropDownBox,
       available_uids,
       onSearch,
       meta,

+ 2 - 1
types/api.d.ts

@@ -388,7 +388,7 @@ export interface GroupDatas {
 
 interface IUserAdmin {
   uid: number;
-  is_admin: number;
+  showDropDownBox: boolean;
   available_uids: IUserItem[];
 }
 
@@ -396,6 +396,7 @@ interface IUserItem {
   account: string;
   nickname: string;
   id: number;
+
 }
 
 interface AccountPlanConfig {