Browse Source

应用管理关联去除已经过滤的app

小杜 4 tháng trước cách đây
mục cha
commit
3aa432ece0
2 tập tin đã thay đổi với 12 bổ sung18 xóa
  1. 8 0
      src/api/formworkErection.js
  2. 4 18
      src/views/main/formworkErection/appAdmin.vue

+ 8 - 0
src/api/formworkErection.js

@@ -56,6 +56,14 @@ export function channelList(data) {
         data
     })
 }
+// 过滤指定app已经关联过的渠道
+export function relativeChannelList(data) {
+    return request({
+        url: '/agent-service/channel/relativeChannel',
+        method: 'post',
+        data
+    })
+}
 // 获取广告位列表
 export function placementList(data) {
     return request({

+ 4 - 18
src/views/main/formworkErection/appAdmin.vue

@@ -293,7 +293,7 @@ import {
   channelUpdateOne,
   appList,
   saveOrUpdate,
-  delApp, channelList, getSecondaryCategories, getPrimaryCategories, relativeChannel
+  delApp, channelList, getSecondaryCategories, getPrimaryCategories, relativeChannel, relativeChannelList
 } from "@/api/formworkErection.js";
 import { attachFile, attachImage } from '@/api/common.js'
 import From from "@/components/from/index.vue";
@@ -343,7 +343,6 @@ const dynamicFormItems = ref([]);
 onBeforeMount(() => {
   settingData();
   getList();
-  getChannelList();
 });
 
 
@@ -401,21 +400,6 @@ const changeTableData = () => {
 };
 
 
-const getChanelData = () => {
-  channelSearch.value.pageNum = channelPage.pageNum;
-  channelSearch.value.pageSize = channelPage.pageSize;
-  channelSearch.value.limit = channelPage.limit;
-  // 分页切换
-  getChannelList();
-};
-
-// 分页数据
-const getChannelList = async () => {
-  let res = await channelList({ ...channelSearch.value });
-  channelData.value = res.data;
-  channelPage.total = res.pageMeta.total;
-};
-
 
 // 搜索
 const handleFormSubmitted = (formData) => {
@@ -537,9 +521,11 @@ const edit = (row) => {
 };
 
 const channelAppId = ref('')
-const openChannelLayer = (row) => {
+const openChannelLayer = async (row) => {
   if (row) {
     channelAppId.value = row.appId
+    let res =await relativeChannelList({appId: row.appId})
+    channelData.value = res.data;
     channelLayer.value.show = true;
   }